From 44cf9c6d2d274eac37502e835155f7e985f1b8e6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:30:08 +0200 Subject: Adding upstream version 1.22.7. Signed-off-by: Daniel Baumann --- .dist-vcs-id | 1 + .dist-vcs-url | 1 + .dist-version | 2 +- .gitlab-ci.yml | 74 - ChangeLog | 2272 ++++++++++++++++++++ Makefile.am | 14 +- Makefile.in | 40 +- aclocal.m4 | 1 + build-aux/autotest.am | 9 + build-aux/config.rpath | 6 +- build-aux/get-vcs-id | 49 + build-aux/subst.am | 52 +- build-aux/tap.am | 4 + build-aux/test-runner | 9 + config.h.in | 12 - configure | 669 +++--- configure.ac | 13 +- doc/spec/build-driver.txt | 44 + dselect/Makefile.in | 7 +- dselect/main.cc | 2 +- dselect/method.cc | 8 +- dselect/methods/Makefile.in | 59 +- dselect/methods/ftp/setup.pl | 2 +- dselect/pkgtop.cc | 6 +- dselect/po/Makefile.in.in | 24 +- dselect/po/POTFILES.in | 6 + dselect/po/bs.gmo | Bin 3231 -> 3231 bytes dselect/po/bs.po | 2 +- dselect/po/ca.po | 2 +- dselect/po/cs.po | 2 +- dselect/po/da.po | 2 +- dselect/po/de.po | 6 +- dselect/po/dselect.pot | 4 +- dselect/po/el.po | 2 +- dselect/po/es.po | 2 +- dselect/po/et.po | 2 +- dselect/po/eu.po | 2 +- dselect/po/fr.po | 2 +- dselect/po/gl.po | 2 +- dselect/po/hu.gmo | Bin 16439 -> 16439 bytes dselect/po/hu.po | 2 +- dselect/po/id.po | 2 +- dselect/po/it.po | 2 +- dselect/po/ja.po | 2 +- dselect/po/ko.po | 2 +- dselect/po/nb.po | 2 +- dselect/po/nl.po | 2 +- dselect/po/nn.po | 2 +- dselect/po/pl.po | 2 +- dselect/po/pt.po | 2 +- dselect/po/pt_BR.po | 2 +- dselect/po/ro.po | 2 +- dselect/po/ru.po | 2 +- dselect/po/sk.po | 2 +- dselect/po/sv.po | 2 +- dselect/po/tl.po | 2 +- dselect/po/vi.po | 2 +- dselect/po/zh_CN.po | 2 +- dselect/po/zh_TW.po | 2 +- lib/Makefile.in | 7 +- lib/compat/Makefile.in | 7 +- lib/compat/strnlen.c | 2 + lib/compat/vasprintf.c | 6 +- lib/dpkg/Makefile.am | 5 +- lib/dpkg/Makefile.in | 55 +- lib/dpkg/buffer.c | 6 +- lib/dpkg/command.c | 1 - lib/dpkg/command.h | 1 + lib/dpkg/db-ctrl-access.c | 2 - lib/dpkg/db-ctrl-format.c | 1 - lib/dpkg/db-ctrl-upgrade.c | 3 - lib/dpkg/db-fsys-divert.c | 63 +- lib/dpkg/db-fsys-files.c | 75 +- lib/dpkg/db-fsys-load.c | 91 + lib/dpkg/db-fsys-override.c | 69 +- lib/dpkg/db-fsys.h | 26 + lib/dpkg/dbmodify.c | 22 +- lib/dpkg/dpkg-db.h | 12 +- lib/dpkg/dump.c | 10 +- lib/dpkg/execname.c | 166 ++ lib/dpkg/execname.h | 43 + lib/dpkg/fdio.c | 12 +- lib/dpkg/fields.c | 26 +- lib/dpkg/file.c | 45 +- lib/dpkg/file.h | 3 + lib/dpkg/i18n.c | 23 +- lib/dpkg/libdpkg.map | 11 +- lib/dpkg/log.c | 1 - lib/dpkg/mustlib.c | 4 +- lib/dpkg/parse.c | 17 +- lib/dpkg/parsedump.h | 5 + lib/dpkg/parsehelp.c | 18 +- lib/dpkg/pkg-format.c | 7 +- lib/dpkg/pkg-format.h | 2 + lib/dpkg/pkg-show.c | 9 +- lib/dpkg/subproc.c | 4 +- lib/dpkg/t/c-tarextract.c | 4 +- lib/dpkg/t/t-arch.c | 12 +- lib/dpkg/t/t-file.c | 17 +- lib/dpkg/t/t-pkg-format.c | 2 +- lib/dpkg/t/t-subproc.c | 6 +- lib/dpkg/t/t-varbuf.c | 122 +- lib/dpkg/tarfn.c | 3 +- lib/dpkg/trigdeferred.c | 5 +- lib/dpkg/triglib.c | 1 - lib/dpkg/triglib.h | 2 + lib/dpkg/varbuf.c | 93 +- lib/dpkg/varbuf.h | 12 +- m4/build-to-host.m4 | 79 + m4/dpkg-types.m4 | 4 +- m4/gettext.m4 | 101 +- m4/host-cpu-c-abi.m4 | 250 +-- m4/iconv.m4 | 101 +- m4/intlmacosx.m4 | 18 +- m4/lib-ld.m4 | 16 +- m4/lib-link.m4 | 53 +- m4/lib-prefix.m4 | 42 +- m4/nls.m4 | 2 +- m4/po.m4 | 13 +- m4/progtest.m4 | 18 +- man/Makefile.am | 2 + man/Makefile.in | 15 +- man/de/deb-buildinfo.pod | 10 +- man/de/deb-changelog.pod | 2 +- man/de/deb-changes.pod | 10 +- man/de/deb-conffiles.pod | 2 +- man/de/deb-control.pod | 2 +- man/de/deb-extra-override.pod | 2 +- man/de/deb-md5sums.pod | 2 +- man/de/deb-old.pod | 2 +- man/de/deb-origin.pod | 2 +- man/de/deb-override.pod | 2 +- man/de/deb-postinst.pod | 2 +- man/de/deb-postrm.pod | 2 +- man/de/deb-preinst.pod | 2 +- man/de/deb-prerm.pod | 2 +- man/de/deb-shlibs.pod | 2 +- man/de/deb-split.pod | 2 +- man/de/deb-src-control.pod | 8 +- man/de/deb-src-files.pod | 2 +- man/de/deb-src-rules.pod | 2 +- man/de/deb-src-symbols.pod | 2 +- man/de/deb-substvars.pod | 4 +- man/de/deb-symbols.pod | 2 +- man/de/deb-triggers.pod | 2 +- man/de/deb-version.pod | 2 +- man/de/deb.pod | 2 +- man/de/deb822.pod | 2 +- man/de/dpkg-architecture.pod | 2 +- man/de/dpkg-build-api.pod | 2 +- man/de/dpkg-buildapi.pod | 10 +- man/de/dpkg-buildflags.pod | 10 +- man/de/dpkg-buildpackage.pod | 24 +- man/de/dpkg-buildtree.pod | 16 +- man/de/dpkg-checkbuilddeps.pod | 6 +- man/de/dpkg-deb.pod | 6 +- man/de/dpkg-distaddfile.pod | 2 +- man/de/dpkg-divert.pod | 6 +- man/de/dpkg-fsys-usrunmess.pod | 2 +- man/de/dpkg-genbuildinfo.pod | 10 +- man/de/dpkg-genchanges.pod | 6 +- man/de/dpkg-gencontrol.pod | 6 +- man/de/dpkg-gensymbols.pod | 6 +- man/de/dpkg-maintscript-helper.pod | 2 +- man/de/dpkg-mergechangelogs.pod | 2 +- man/de/dpkg-name.pod | 6 +- man/de/dpkg-parsechangelog.pod | 2 +- man/de/dpkg-query.pod | 14 +- man/de/dpkg-realpath.pod | 6 +- man/de/dpkg-scanpackages.pod | 2 +- man/de/dpkg-scansources.pod | 2 +- man/de/dpkg-shlibdeps.pod | 16 +- man/de/dpkg-source.pod | 2 +- man/de/dpkg-split.pod | 6 +- man/de/dpkg-statoverride.pod | 6 +- man/de/dpkg-trigger.pod | 6 +- man/de/dpkg-vendor.pod | 2 +- man/de/dpkg.cfg.pod | 2 +- man/de/dpkg.pod | 12 +- man/de/dsc.pod | 10 +- man/de/dselect.cfg.pod | 2 +- man/de/dselect.pod | 2 +- man/de/start-stop-daemon.pod | 2 +- man/de/update-alternatives.pod | 2 +- man/deb-buildinfo.pod | 9 +- man/deb-changes.pod | 12 +- man/deb-src-control.pod | 10 +- man/deb-substvars.pod | 13 +- man/dpkg-buildapi.pod | 12 + man/dpkg-buildflags.pod | 11 +- man/dpkg-buildpackage.pod | 33 +- man/dpkg-buildtree.pod | 18 + man/dpkg-checkbuilddeps.pod | 6 + man/dpkg-deb.pod | 6 + man/dpkg-divert.pod | 6 + man/dpkg-genbuildinfo.pod | 12 + man/dpkg-genchanges.pod | 4 + man/dpkg-gencontrol.pod | 4 + man/dpkg-gensymbols.pod | 4 + man/dpkg-name.pod | 7 +- man/dpkg-query.pod | 16 +- man/dpkg-realpath.pod | 6 + man/dpkg-shlibdeps.pod | 21 + man/dpkg-split.pod | 6 + man/dpkg-statoverride.pod | 6 + man/dpkg-trigger.pod | 6 + man/dpkg.pod | 14 +- man/dsc.pod | 9 +- man/fr/deb-buildinfo.pod | 30 +- man/fr/deb-changelog.pod | 26 +- man/fr/deb-changes.pod | 32 +- man/fr/deb-conffiles.pod | 2 +- man/fr/deb-control.pod | 42 +- man/fr/deb-extra-override.pod | 6 +- man/fr/deb-md5sums.pod | 4 +- man/fr/deb-old.pod | 4 +- man/fr/deb-origin.pod | 8 +- man/fr/deb-override.pod | 8 +- man/fr/deb-postinst.pod | 2 +- man/fr/deb-postrm.pod | 8 +- man/fr/deb-preinst.pod | 6 +- man/fr/deb-prerm.pod | 4 +- man/fr/deb-shlibs.pod | 6 +- man/fr/deb-split.pod | 6 +- man/fr/deb-src-control.pod | 32 +- man/fr/deb-src-rules.pod | 4 +- man/fr/deb-src-symbols.pod | 40 +- man/fr/deb-substvars.pod | 30 +- man/fr/deb-symbols.pod | 14 +- man/fr/deb-triggers.pod | 18 +- man/fr/deb-version.pod | 18 +- man/fr/deb.pod | 14 +- man/fr/deb822.pod | 12 +- man/fr/dpkg-architecture.pod | 116 +- man/fr/dpkg-checkbuilddeps.pod | 12 +- man/fr/dpkg-deb.pod | 48 +- man/fr/dpkg-distaddfile.pod | 4 +- man/fr/dpkg-divert.pod | 28 +- man/fr/dpkg-fsys-usrunmess.pod | 10 +- man/fr/dpkg-genbuildinfo.pod | 20 +- man/fr/dpkg-genchanges.pod | 34 +- man/fr/dpkg-gencontrol.pod | 20 +- man/fr/dpkg-gensymbols.pod | 26 +- man/fr/dpkg-maintscript-helper.pod | 24 +- man/fr/dpkg-mergechangelogs.pod | 16 +- man/fr/dpkg-name.pod | 12 +- man/fr/dpkg-parsechangelog.pod | 26 +- man/fr/dpkg-query.pod | 94 +- man/fr/dpkg-realpath.pod | 10 +- man/fr/dpkg-scanpackages.pod | 14 +- man/fr/dpkg-scansources.pod | 8 +- man/fr/dpkg-shlibdeps.pod | 52 +- man/fr/dpkg-source.pod | 124 +- man/fr/dpkg-split.pod | 26 +- man/fr/dpkg-statoverride.pod | 189 -- man/fr/dpkg-trigger.pod | 20 +- man/fr/dpkg-vendor.pod | 8 +- man/fr/dpkg.cfg.pod | 2 +- man/fr/dsc.pod | 28 +- man/fr/dselect.pod | 76 +- man/fr/start-stop-daemon.pod | 26 +- man/fr/update-alternatives.pod | 38 +- man/libdpkg.pod | 44 + man/nl/deb-buildinfo.pod | 8 +- man/nl/deb-changes.pod | 8 +- man/nl/deb-src-control.pod | 6 + man/nl/deb-substvars.pod | 2 +- man/nl/dpkg-buildapi.pod | 8 + man/nl/dpkg-buildflags.pod | 28 +- man/nl/dpkg-buildpackage.pod | 40 +- man/nl/dpkg-buildtree.pod | 14 + man/nl/dpkg-checkbuilddeps.pod | 4 + man/nl/dpkg-deb.pod | 6 +- man/nl/dpkg-divert.pod | 4 + man/nl/dpkg-genbuildinfo.pod | 8 + man/nl/dpkg-genchanges.pod | 4 + man/nl/dpkg-gencontrol.pod | 4 + man/nl/dpkg-gensymbols.pod | 4 + man/nl/dpkg-name.pod | 6 +- man/nl/dpkg-parsechangelog.pod | 2 +- man/nl/dpkg-query.pod | 14 +- man/nl/dpkg-realpath.pod | 4 + man/nl/dpkg-shlibdeps.pod | 16 +- man/nl/dpkg-source.pod | 2 +- man/nl/dpkg-split.pod | 6 +- man/nl/dpkg-statoverride.pod | 4 + man/nl/dpkg-trigger.pod | 4 + man/nl/dpkg.pod | 12 +- man/nl/dsc.pod | 8 +- man/nl/update-alternatives.pod | 2 +- man/po/de.add | 2 +- man/po/de.po | 481 ++++- man/po/dpkg-man.pot | 309 ++- man/po/es.po | 423 +++- man/po/fr.po | 493 ++++- man/po/hu.po | 338 ++- man/po/it.po | 423 +++- man/po/ja.po | 406 +++- man/po/nl.po | 687 ++++-- man/po/pl.po | 410 +++- man/po/pt.po | 494 ++++- man/po/pt_BR.po | 340 ++- man/po/ru.po | 345 ++- man/po/sv.po | 822 ++++--- man/po/zh_CN.po | 343 ++- man/pt/deb-buildinfo.pod | 8 +- man/pt/deb-changes.pod | 8 +- man/pt/deb-src-control.pod | 6 + man/pt/deb-substvars.pod | 2 +- man/pt/dpkg-buildapi.pod | 8 + man/pt/dpkg-buildflags.pod | 8 +- man/pt/dpkg-buildpackage.pod | 22 +- man/pt/dpkg-buildtree.pod | 14 + man/pt/dpkg-checkbuilddeps.pod | 4 + man/pt/dpkg-deb.pod | 4 + man/pt/dpkg-divert.pod | 4 + man/pt/dpkg-genbuildinfo.pod | 8 + man/pt/dpkg-genchanges.pod | 4 + man/pt/dpkg-gencontrol.pod | 4 + man/pt/dpkg-gensymbols.pod | 4 + man/pt/dpkg-name.pod | 6 +- man/pt/dpkg-query.pod | 14 +- man/pt/dpkg-realpath.pod | 4 + man/pt/dpkg-shlibdeps.pod | 14 + man/pt/dpkg-split.pod | 4 + man/pt/dpkg-statoverride.pod | 4 + man/pt/dpkg-trigger.pod | 4 + man/pt/dpkg.pod | 10 +- man/pt/dsc.pod | 8 +- man/pt/update-alternatives.pod | 2 +- man/sv/deb-buildinfo.pod | 8 +- man/sv/deb-changes.pod | 8 +- man/sv/deb-src-control.pod | 6 + man/sv/deb-src-files.pod | 4 +- man/sv/deb-substvars.pod | 2 +- man/sv/dpkg-buildapi.pod | 8 + man/sv/dpkg-buildflags.pod | 32 +- man/sv/dpkg-buildpackage.pod | 48 +- man/sv/dpkg-buildtree.pod | 104 + man/sv/dpkg-checkbuilddeps.pod | 4 + man/sv/dpkg-deb.pod | 6 +- man/sv/dpkg-divert.pod | 6 +- man/sv/dpkg-genbuildinfo.pod | 10 +- man/sv/dpkg-genchanges.pod | 4 + man/sv/dpkg-gencontrol.pod | 4 + man/sv/dpkg-gensymbols.pod | 4 + man/sv/dpkg-maintscript-helper.pod | 2 +- man/sv/dpkg-name.pod | 6 +- man/sv/dpkg-parsechangelog.pod | 2 +- man/sv/dpkg-query.pod | 14 +- man/sv/dpkg-realpath.pod | 4 + man/sv/dpkg-shlibdeps.pod | 16 +- man/sv/dpkg-source.pod | 2 +- man/sv/dpkg-split.pod | 6 +- man/sv/dpkg-statoverride.pod | 4 + man/sv/dpkg-trigger.pod | 4 + man/sv/dpkg.pod | 14 +- man/sv/dsc.pod | 8 +- man/sv/update-alternatives.pod | 2 +- man/update-alternatives.pod | 2 +- po/Makefile.in.in | 24 +- po/POTFILES.in | 12 +- po/ast.gmo | Bin 57991 -> 57565 bytes po/ast.po | 477 ++-- po/bs.po | 454 ++-- po/ca.gmo | Bin 179478 -> 178913 bytes po/ca.po | 467 ++-- po/cs.gmo | Bin 170271 -> 169823 bytes po/cs.po | 441 ++-- po/da.gmo | Bin 112446 -> 112090 bytes po/da.po | 453 ++-- po/de.gmo | Bin 175532 -> 176531 bytes po/de.po | 461 ++-- po/dpkg.pot | 385 ++-- po/dz.gmo | Bin 77525 -> 76673 bytes po/dz.po | 456 ++-- po/el.gmo | Bin 66783 -> 66239 bytes po/el.po | 471 ++-- po/eo.gmo | Bin 112752 -> 112378 bytes po/eo.po | 457 ++-- po/es.gmo | Bin 132836 -> 132425 bytes po/es.po | 485 +++-- po/et.gmo | Bin 18574 -> 18494 bytes po/et.po | 439 ++-- po/eu.gmo | Bin 117139 -> 116743 bytes po/eu.po | 461 ++-- po/fr.gmo | Bin 185047 -> 184485 bytes po/fr.po | 470 ++-- po/gl.gmo | Bin 51521 -> 51163 bytes po/gl.po | 475 ++-- po/hu.gmo | Bin 58217 -> 57828 bytes po/hu.po | 432 ++-- po/id.gmo | Bin 67694 -> 67321 bytes po/id.po | 451 ++-- po/it.gmo | Bin 133914 -> 133512 bytes po/it.po | 476 ++-- po/ja.gmo | Bin 138105 -> 137579 bytes po/ja.po | 454 ++-- po/km.gmo | Bin 67214 -> 66647 bytes po/km.po | 446 ++-- po/ko.gmo | Bin 77308 -> 76874 bytes po/ko.po | 447 ++-- po/ku.po | 393 ++-- po/lt.gmo | Bin 32855 -> 32770 bytes po/lt.po | 432 ++-- po/mr.gmo | Bin 59080 -> 58420 bytes po/mr.po | 452 ++-- po/nb.gmo | Bin 67932 -> 67539 bytes po/nb.po | 456 ++-- po/ne.gmo | Bin 61694 -> 61278 bytes po/ne.po | 452 ++-- po/nl.gmo | Bin 173906 -> 173342 bytes po/nl.po | 452 ++-- po/nn.gmo | Bin 33397 -> 32994 bytes po/nn.po | 445 ++-- po/oc.gmo | Bin 66884 -> 66396 bytes po/oc.po | 441 ++-- po/pa.po | 401 ++-- po/pl.gmo | Bin 150684 -> 150167 bytes po/pl.po | 443 ++-- po/pt.gmo | Bin 172179 -> 171727 bytes po/pt.po | 471 ++-- po/pt_BR.gmo | Bin 51155 -> 50785 bytes po/pt_BR.po | 474 ++-- po/ro.gmo | Bin 183571 -> 182963 bytes po/ro.po | 500 +++-- po/ru.gmo | Bin 224975 -> 224389 bytes po/ru.po | 447 ++-- po/sk.gmo | Bin 111052 -> 110580 bytes po/sk.po | 455 ++-- po/sv.gmo | Bin 168005 -> 167634 bytes po/sv.po | 429 ++-- po/th.gmo | Bin 254926 -> 254333 bytes po/th.po | 433 ++-- po/tl.gmo | Bin 34793 -> 34415 bytes po/tl.po | 465 ++-- po/tr.gmo | Bin 130145 -> 129739 bytes po/tr.po | 459 ++-- po/vi.gmo | Bin 133454 -> 133028 bytes po/vi.po | 463 ++-- po/zh_CN.gmo | Bin 161210 -> 160786 bytes po/zh_CN.po | 430 ++-- po/zh_TW.gmo | Bin 108933 -> 108589 bytes po/zh_TW.po | 445 ++-- scripts/Dpkg/Archive/Ar.pm | 440 ++++ scripts/Dpkg/BuildDriver.pm | 196 ++ scripts/Dpkg/BuildDriver/DebianRules.pm | 298 +++ scripts/Dpkg/Control/FieldsCore.pm | 5 + scripts/Dpkg/OpenPGP/Backend/GnuPG.pm | 14 + scripts/Dpkg/OpenPGP/ErrorCodes.pm | 19 +- scripts/Dpkg/Shlibs/Cppfilt.pm | 10 +- scripts/Dpkg/Source/Package.pm | 33 +- scripts/Dpkg/Source/Package/V1.pm | 3 +- scripts/Dpkg/Source/Package/V2.pm | 3 +- scripts/Dpkg/Source/Package/V3/Bzr.pm | 4 - scripts/Dpkg/Substvars.pm | 34 +- scripts/Dpkg/Vendor/Debian.pm | 37 +- scripts/Dpkg/Vendor/Ubuntu.pm | 2 +- scripts/Makefile.am | 11 +- scripts/Makefile.in | 79 +- scripts/dpkg-ar.pl | 127 ++ scripts/dpkg-buildpackage.pl | 317 +-- scripts/dpkg-genbuildinfo.pl | 6 +- scripts/dpkg-shlibdeps.pl | 72 +- scripts/dpkg-source.pl | 3 +- scripts/mk/Makefile.am | 21 - scripts/mk/Makefile.in | 97 +- scripts/mk/architecture.mk | 18 +- scripts/mk/buildapi.mk | 11 +- scripts/mk/buildflags.mk | 56 +- scripts/mk/buildopts.mk | 13 +- scripts/mk/buildtools.mk | 23 +- scripts/mk/default.mk | 8 +- scripts/mk/pkg-info.mk | 36 +- scripts/mk/vendor.mk | 15 +- scripts/po/Makefile.in.in | 24 +- scripts/po/POTFILES.in | 14 +- scripts/po/ca.gmo | Bin 121651 -> 118502 bytes scripts/po/ca.po | 473 ++-- scripts/po/de.gmo | Bin 121226 -> 121524 bytes scripts/po/de.po | 467 ++-- scripts/po/dpkg-dev.pot | 371 +++- scripts/po/es.gmo | Bin 53962 -> 53574 bytes scripts/po/es.po | 453 ++-- scripts/po/fr.gmo | Bin 113434 -> 110270 bytes scripts/po/fr.po | 493 +++-- scripts/po/nl.gmo | Bin 106650 -> 103509 bytes scripts/po/nl.po | 465 +++- scripts/po/pl.gmo | Bin 56253 -> 55896 bytes scripts/po/pl.po | 459 ++-- scripts/po/pt.gmo | Bin 106808 -> 103740 bytes scripts/po/pt.po | 465 +++- scripts/po/ru.gmo | Bin 74118 -> 73657 bytes scripts/po/ru.po | 453 ++-- scripts/po/sv.gmo | Bin 115257 -> 113149 bytes scripts/po/sv.po | 508 +++-- scripts/t/Dpkg_BuildFlags_Ubuntu.t | 2 + scripts/t/Dpkg_Deps.t | 93 +- scripts/t/Dpkg_Shlibs.t | 7 +- scripts/t/Dpkg_Shlibs_Cppfilt.t | 8 +- scripts/t/Dpkg_Substvars.t | 28 +- scripts/t/Dpkg_Substvars/substvars-req | 1 + scripts/t/dpkg_buildpackage.t | 3 + .../t/dpkg_buildpackage/test-source_0_source.hook | 2 +- scripts/t/mk.t | 2 +- scripts/t/mk/architecture.mk | 60 +- scripts/t/mk/buildapi.mk | 13 +- scripts/t/mk/buildflags.mk | 53 +- scripts/t/mk/buildopts.mk | 11 +- scripts/t/mk/buildtools.mk | 64 +- scripts/t/mk/pkg-info.mk | 31 +- scripts/t/mk/vendor-v0.mk | 1 + scripts/t/mk/vendor-v1.mk | 1 + scripts/t/mk/vendor.mk | 17 +- src/Makefile.am | 7 +- src/Makefile.in | 117 +- src/at/deb-format.at | 110 +- src/at/deb-split.at | 37 +- src/at/divert.at | 26 +- src/at/local.at | 26 + src/at/package.m4 | 4 +- src/at/testsuite | 1013 ++++++--- src/common/force.c | 1 - src/common/force.h | 2 + src/common/selinux.c | 2 +- src/deb/build.c | 10 +- src/deb/extract.c | 2 +- src/deb/info.c | 11 +- src/deb/main.c | 2 +- src/divert/main.c | 7 +- src/dpkg-realpath.sh | 179 -- src/main/archives.c | 25 +- src/main/configure.c | 86 +- src/main/depcon.c | 6 +- src/main/enquiry.c | 1 - src/main/help.c | 14 +- src/main/main.c | 25 +- src/main/main.h | 4 + src/main/packages.c | 7 +- src/main/remove.c | 25 +- src/main/script.c | 3 +- src/main/select.c | 12 +- src/main/trigproc.c | 11 +- src/main/unpack.c | 42 +- src/main/verify.c | 3 +- src/query/main.c | 3 +- src/realpath/main.c | 247 +++ src/split/main.c | 2 +- src/split/split.c | 6 +- src/statoverride/main.c | 9 +- src/trigger/main.c | 2 +- t/cppcheck.t | 1 + t/pod-spell.t | 3 + t/shellcheck.t | 2 +- tests/README | 5 +- tests/Test.mk | 3 + tests/t-db/Makefile | 10 + .../t-db/db-bogus-versioned-provides-update/status | 10 + .../updates/.keep | 0 .../updates/0001 | 10 + tests/t-db/db-bogus-versioned-provides/status | 21 + .../t-db/db-bogus-versioned-provides/updates/.keep | 0 tests/t-provides/Makefile | 15 +- tests/t-provides/pkg-provides-bogus/DEBIAN/control | 8 + utils/Makefile.am | 10 +- utils/Makefile.in | 20 +- utils/start-stop-daemon.c | 28 +- utils/update-alternatives.c | 10 +- 568 files changed, 28673 insertions(+), 14508 deletions(-) create mode 100644 .dist-vcs-id create mode 100644 .dist-vcs-url delete mode 100644 .gitlab-ci.yml create mode 100755 build-aux/get-vcs-id create mode 100644 doc/spec/build-driver.txt create mode 100644 lib/dpkg/db-fsys-load.c create mode 100644 lib/dpkg/execname.c create mode 100644 lib/dpkg/execname.h create mode 100644 m4/build-to-host.m4 delete mode 100644 man/fr/dpkg-statoverride.pod create mode 100644 man/libdpkg.pod create mode 100644 man/sv/dpkg-buildtree.pod create mode 100644 scripts/Dpkg/Archive/Ar.pm create mode 100644 scripts/Dpkg/BuildDriver.pm create mode 100644 scripts/Dpkg/BuildDriver/DebianRules.pm create mode 100755 scripts/dpkg-ar.pl create mode 100644 scripts/t/Dpkg_Substvars/substvars-req delete mode 100755 src/dpkg-realpath.sh create mode 100644 src/realpath/main.c create mode 100644 tests/t-db/db-bogus-versioned-provides-update/status create mode 100644 tests/t-db/db-bogus-versioned-provides-update/updates/.keep create mode 100644 tests/t-db/db-bogus-versioned-provides-update/updates/0001 create mode 100644 tests/t-db/db-bogus-versioned-provides/status create mode 100644 tests/t-db/db-bogus-versioned-provides/updates/.keep create mode 100644 tests/t-provides/pkg-provides-bogus/DEBIAN/control diff --git a/.dist-vcs-id b/.dist-vcs-id new file mode 100644 index 0000000..66148ba --- /dev/null +++ b/.dist-vcs-id @@ -0,0 +1 @@ +7603b54e29911e4ff534c73f0c37d25a0a35c578 diff --git a/.dist-vcs-url b/.dist-vcs-url new file mode 100644 index 0000000..68213a5 --- /dev/null +++ b/.dist-vcs-url @@ -0,0 +1 @@ +https://git.dpkg.org/git/dpkg/dpkg.git diff --git a/.dist-version b/.dist-version index 013173a..87b26e8 100644 --- a/.dist-version +++ b/.dist-version @@ -1 +1 @@ -1.22.6 +1.22.7 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b21e089..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,74 +0,0 @@ -image: debian:sid - -variables: - FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 - -before_script: - - apt update -qq - - apt install -qq -y eatmydata - - eatmydata apt -P pkg.dpkg.author-release build-dep -qq -y . - - ./autogen - -# Test whether the release can be done. -dist-check: - stage: test - script: - - ./configure - - make -j$(nproc) distcheck - -# Test whether the author checks pass. -author-check: - stage: test - script: - - eatmydata apt -P pkg.dpkg.author-testing build-dep -qq -y . - - ./configure - - make -j$(nproc) authorcheck - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) - -# Test whether the sanitized unit tests pass. -unit-tests: - stage: test - script: - - ./configure --enable-compiler-sanitizer - - make -j$(nproc) -C lib check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) - -# Test whether the unit tests pass on a VPATH build. -vpath-tests: - stage: test - script: - - mkdir -p build-tree - - cd build-tree - - ../configure - - make -j$(nproc) check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) - -# Test whether the unit tests pass with minimal library dependencies. -minlib-tests: - stage: test - script: - - ./configure - --without-liblzma - --without-libz - --without-libz-ng - --without-libzstd - --without-libbz2 - --without-libselinux - - make -j$(nproc) check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) - -# Test whether we can build the shared library. -shlib-tests: - stage: test - script: - - AUTHOR_TESTING=1 ./configure --enable-shared - - make -j$(nproc) check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) - -# Test whether the functional tests pass. -func-tests: - stage: test - script: - - ./configure - - make - - eatmydata make -C tests test diff --git a/ChangeLog b/ChangeLog index 3afded3..5b3f973 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2275 @@ +commit 7603b54e29911e4ff534c73f0c37d25a0a35c578 +Author: Guillem Jover +Date: Wed Jul 17 01:14:41 2024 +0200 + + Release 1.22.7 + + debian/changelog | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 183 insertions(+), 3 deletions(-) + +commit 956bede103217a78f004e1317ee4dd31d115c3ec +Author: Guillem Jover +Date: Wed Jul 17 01:10:41 2024 +0200 + + po: Regenerate .pot files and merge .po files with them + + dselect/po/bs.po | 2 +- + dselect/po/ca.po | 2 +- + dselect/po/cs.po | 2 +- + dselect/po/da.po | 2 +- + dselect/po/de.po | 6 +- + dselect/po/dselect.pot | 4 +- + dselect/po/el.po | 2 +- + dselect/po/es.po | 2 +- + dselect/po/et.po | 2 +- + dselect/po/eu.po | 2 +- + dselect/po/fr.po | 2 +- + dselect/po/gl.po | 2 +- + dselect/po/hu.po | 2 +- + dselect/po/id.po | 2 +- + dselect/po/it.po | 2 +- + dselect/po/ja.po | 2 +- + dselect/po/ko.po | 2 +- + dselect/po/nb.po | 2 +- + dselect/po/nl.po | 2 +- + dselect/po/nn.po | 2 +- + dselect/po/pl.po | 2 +- + dselect/po/pt.po | 2 +- + dselect/po/pt_BR.po | 2 +- + dselect/po/ro.po | 2 +- + dselect/po/ru.po | 2 +- + dselect/po/sk.po | 2 +- + dselect/po/sv.po | 2 +- + dselect/po/tl.po | 2 +- + dselect/po/vi.po | 2 +- + dselect/po/zh_CN.po | 2 +- + dselect/po/zh_TW.po | 2 +- + man/po/de.po | 100 ++++++++-- + man/po/dpkg-man.pot | 309 ++++++++++++++++++++++++----- + man/po/es.po | 423 +++++++++++++++++++++++++++++++++------- + man/po/fr.po | 493 +++++++++++++++++++++++++++++++++++++++------- + man/po/hu.po | 338 +++++++++++++++++++++++++++----- + man/po/it.po | 423 +++++++++++++++++++++++++++++++++------- + man/po/ja.po | 406 +++++++++++++++++++++++++++++++------- + man/po/nl.po | 288 ++++++++++++++++++++++++--- + man/po/pl.po | 410 ++++++++++++++++++++++++++++++++------- + man/po/pt.po | 494 ++++++++++++++++++++++++++++++++++++++++------ + man/po/pt_BR.po | 340 +++++++++++++++++++++++++++----- + man/po/ru.po | 345 +++++++++++++++++++++++++++------ + man/po/sv.po | 506 +++++++++++++++++++++++++++++++++++++++++------- + man/po/zh_CN.po | 343 +++++++++++++++++++++++++++----- + po/ast.po | 477 +++++++++++++++++++++++++-------------------- + po/bs.po | 454 ++++++++++++++++++++++++------------------- + po/ca.po | 467 +++++++++++++++++++++++++------------------- + po/cs.po | 441 +++++++++++++++++++++++------------------ + po/da.po | 453 +++++++++++++++++++++++++------------------ + po/de.po | 311 +++++++++++++++-------------- + po/dpkg.pot | 385 ++++++++++++++++++++---------------- + po/dz.po | 456 ++++++++++++++++++++++++------------------- + po/el.po | 471 +++++++++++++++++++++++++------------------- + po/eo.po | 457 +++++++++++++++++++++++++------------------ + po/es.po | 485 ++++++++++++++++++++++++++-------------------- + po/et.po | 439 +++++++++++++++++++++++------------------ + po/eu.po | 461 ++++++++++++++++++++++++------------------- + po/fr.po | 470 +++++++++++++++++++++++++------------------- + po/gl.po | 475 ++++++++++++++++++++++++++------------------- + po/hu.po | 432 ++++++++++++++++++++++++----------------- + po/id.po | 451 ++++++++++++++++++++++++------------------ + po/it.po | 476 ++++++++++++++++++++++++++------------------- + po/ja.po | 454 +++++++++++++++++++++++++------------------ + po/km.po | 446 ++++++++++++++++++++++++------------------ + po/ko.po | 447 ++++++++++++++++++++++++------------------ + po/ku.po | 393 ++++++++++++++++++++----------------- + po/lt.po | 432 +++++++++++++++++++++++------------------ + po/mr.po | 452 ++++++++++++++++++++++++------------------ + po/nb.po | 456 ++++++++++++++++++++++++------------------- + po/ne.po | 452 ++++++++++++++++++++++++------------------ + po/nl.po | 452 ++++++++++++++++++++++++------------------ + po/nn.po | 445 +++++++++++++++++++++++------------------- + po/oc.po | 441 +++++++++++++++++++++++------------------ + po/pa.po | 401 +++++++++++++++++++++----------------- + po/pl.po | 443 ++++++++++++++++++++++++------------------ + po/pt.po | 471 +++++++++++++++++++++++++------------------- + po/pt_BR.po | 474 ++++++++++++++++++++++++++------------------- + po/ro.po | 500 +++++++++++++++++++++++++++-------------------- + po/ru.po | 447 ++++++++++++++++++++++++------------------ + po/sk.po | 455 +++++++++++++++++++++++++------------------ + po/sv.po | 397 +++++++++++++++++++++---------------- + po/th.po | 433 ++++++++++++++++++++++++----------------- + po/tl.po | 465 +++++++++++++++++++++++++------------------- + po/tr.po | 459 +++++++++++++++++++++++++------------------ + po/vi.po | 463 +++++++++++++++++++++++++------------------- + po/zh_CN.po | 430 +++++++++++++++++++++++----------------- + po/zh_TW.po | 445 ++++++++++++++++++++++++------------------ + scripts/po/ca.po | 473 ++++++++++++++++++++++++++++++++------------ + scripts/po/de.po | 390 +++++++++++++++++++++++++++---------- + scripts/po/dpkg-dev.pot | 371 +++++++++++++++++++++++++---------- + scripts/po/es.po | 453 ++++++++++++++++++++++++++++++------------- + scripts/po/fr.po | 493 +++++++++++++++++++++++++++++++++------------- + scripts/po/nl.po | 465 +++++++++++++++++++++++++++++++++----------- + scripts/po/pl.po | 459 ++++++++++++++++++++++++++++++------------- + scripts/po/pt.po | 465 +++++++++++++++++++++++++++++++++----------- + scripts/po/ru.po | 453 ++++++++++++++++++++++++++++++------------- + scripts/po/sv.po | 463 +++++++++++++++++++++++++++++++++----------- + 98 files changed, 18795 insertions(+), 10190 deletions(-) + +commit 3eca339ccdd14f2812ca252fd4243fdfeac9ad1d +Author: Guillem Jover +Date: Wed Aug 17 00:54:47 2016 +0200 + + dpkg-buildpackage: Reference the .dsc in .buildinfo if building from one + + If we have been passed a .dsc filename as an argument, so that we have + extracted it, we can then tell dpkg-genbuildinfo to include references + to the source package, as we can ascertain the provenance of the source + tree. + + Closes: #882511 + + man/dpkg-buildpackage.pod | 3 +++ + scripts/dpkg-buildpackage.pl | 11 ++++++++++- + 2 files changed, 13 insertions(+), 1 deletion(-) + +commit 555f9fe3c7ae8e9f166253ae049ce6c03914920f +Author: Guillem Jover +Date: Tue Apr 9 03:58:26 2024 +0200 + + dpkg-buildpackage: Add support for building from a specified .dsc or dir + + This adds support to build directly from a source package .dsc, or to + specify a source directory to use for the build. In the first case we + will extract the source package. For both .dsc and directory we will + change directory to the source tree. + + man/dpkg-buildpackage.pod | 19 +++++++++++-- + scripts/dpkg-buildpackage.pl | 66 ++++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 80 insertions(+), 5 deletions(-) + +commit a0e40ff858f09d3441e38da60f75aab423e33d48 +Author: Guillem Jover +Date: Tue Apr 9 03:53:10 2024 +0200 + + perl: Use new Dpkg::Source::Package->get_basedirname() method + + Instead of open coding this, use the method provided by the class. + + scripts/Dpkg/Source/Package/V1.pm | 3 +-- + scripts/Dpkg/Source/Package/V2.pm | 3 +-- + scripts/dpkg-source.pl | 3 +-- + 3 files changed, 3 insertions(+), 6 deletions(-) + +commit 5ca492db5c16b71d0d2db25ce48208f291fc1ea2 +Author: Guillem Jover +Date: Tue Apr 9 03:49:49 2024 +0200 + + Dpkg::Source::Package: Add a new get_basedirname() method + + This centralizes the generation of the base directory name for a source + package. + + scripts/Dpkg/Source/Package.pm | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +commit 98adc2ec51754fb7f47e5ef73d6d166ba6adf4e7 +Author: Guillem Jover +Date: Tue Apr 9 03:48:59 2024 +0200 + + Dpkg::Source::Package::V3::Bzr: Remove unused variables + + scripts/Dpkg/Source/Package/V3/Bzr.pm | 4 ---- + 1 file changed, 4 deletions(-) + +commit 044955f9b8dc1a2d2dd698f4e5860514f7400990 +Author: Guillem Jover +Date: Tue Apr 9 03:45:04 2024 +0200 + + Dpkg::Source::Package: Document method additions with an object + + Add an object so that it is clear these are methods, just as we do with + all other entries in other modules. + + scripts/Dpkg/Source/Package.pm | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 00f0fb17355717a8ed80134fed66eb9c264915b9 +Author: Guillem Jover +Date: Fri Feb 23 00:14:25 2024 +0100 + + Dpkg::Substvars: Add support for required substvars assigned with != + + Some packaging helpers (namely debhelper) set various substvars that + must always be used by the packaging. Marking those as required means + the maintainer will never forget to use them. + + We add a new operator «!=» to make it possible for other tools to mark + those variables as required. Track those internally too so that they can + be printed back properly. + + man/deb-substvars.pod | 13 ++++++++----- + scripts/Dpkg/Substvars.pm | 34 +++++++++++++++++++++++++++------- + scripts/Makefile.am | 1 + + scripts/t/Dpkg_Substvars.t | 28 +++++++++++++++++++++++++++- + scripts/t/Dpkg_Substvars/substvars-req | 1 + + 5 files changed, 64 insertions(+), 13 deletions(-) + +commit df60765ed4bc6640b788c796dd0c627d7714f807 +Author: Guillem Jover +Date: Tue Jul 2 23:21:47 2024 +0200 + + Dpkg::Vendor::Debian: Guarantee UTF-8 locale codeset on sanitize-env + + If LC_ALL is set move it to LANG (as it is the lowest priority in the + override stack), and delete all other LC_* variables which would have + been shadowed anyway. Set LC_CTYPE C.UTF-8. + + scripts/Dpkg/Vendor/Debian.pm | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +commit 259debe76b8d3283c20ddaa476e6ee95270e593f +Author: Guillem Jover +Date: Wed Apr 3 12:10:35 2024 +0200 + + build: Do not include VCS specific files in the distributed tarball + + These files only make sense when they are part of the VCS. + + Makefile.am | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 5a381b45ab3c6708c4dd96fc9756547768a52d7e +Author: Guillem Jover +Date: Wed Apr 3 12:18:35 2024 +0200 + + build: Include a .dist-vcs-url file in the distributed tarball + + This file contains the URL for the VCS the tarball was hosted from. + + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit 4c6e077bfb53e5c66578bd0d55b20c81f4820224 +Author: Guillem Jover +Date: Thu Jul 11 02:55:39 2024 +0200 + + libdpkg: Do not try to strdup() a NULL pointer in dpkg_get_pid_execname() + + If the function is compiled on a port that is currently not handled by + the function port specific pre-processor conditionals, the code would + try to strdup() a NULL pointer. Handle this explicitly and return NULL + in that case. + + Fixes: commit d6a9bb6951166a7254ab2b4f887c69c4bd4fb1a7 + Warned-by: cppcheck + Changelog: silent + + lib/dpkg/execname.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 4ec4dcd01dba74783744d2dfac34666309aea3eb +Author: Guillem Jover +Date: Thu Jul 11 02:54:54 2024 +0200 + + libdpkg: Remove unused variable in dpkg_get_pid_execname() on GNU/Hurd + + Fixes: commit d6a9bb6951166a7254ab2b4f887c69c4bd4fb1a7 + Warned-by: cppcheck + Changelog: silent + + lib/dpkg/execname.c | 1 - + 1 file changed, 1 deletion(-) + +commit 99bba12f0de89c12a6ab34cc466e8dc1402b1356 +Author: Guillem Jover +Date: Mon Apr 29 09:55:46 2024 +0200 + + libdpkg: Try to print the executable name of the lock contending process + + Just printing the PID is not very useful to try to track down the + contending process as its presence might be momentary and might no + longer be present when the user tries to look for that specific PID. + + Try to get the executable name to give a better hint to what might be + going wrong. + + Closes: #1070027 + + lib/dpkg/file.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit d6a9bb6951166a7254ab2b4f887c69c4bd4fb1a7 +Author: Guillem Jover +Date: Mon Apr 29 09:55:19 2024 +0200 + + libdpkg: Add new execname module + + This module tries to return the executable name for a specific process + given its PID. If it cannot gather the information either because the + process is gone, or the port does not yet have support for it, then + the code will return NULL. + + lib/dpkg/Makefile.am | 2 + + lib/dpkg/execname.c | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++ + lib/dpkg/execname.h | 43 ++++++++++++++ + lib/dpkg/libdpkg.map | 3 + + po/POTFILES.in | 1 + + 5 files changed, 214 insertions(+) + +commit b7dc60447121858bd3ed5da1183a28d906a849e4 +Author: Guillem Jover +Date: Wed Jul 10 23:03:42 2024 +0200 + + dselect: Use enum values instead of literal integers + + Makes the code more clear on what it is comparing against. + + Changelog: internal + + dselect/pkgtop.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit e56be216525ad13f00e81e960c97b1454efee9ad +Author: Guillem Jover +Date: Wed Jul 10 22:47:00 2024 +0200 + + libdpkg: Check for updateslength < 0 instead of == -1 in ulist_select() + + Make the check more future proof against tracking other negative values, + and match the recent coding style switch to check for all negative + values instead of a specific -1 (although in this case this does not + signal an error, but an uninitialized value. + + lib/dpkg/dbmodify.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit af5c8d99e08c0e9bc5e929f56a2753fa0bc5d10c +Author: Guillem Jover +Date: Wed Jul 10 22:38:16 2024 +0200 + + libdpkg: Check for limit >= 0 instead of != -1 in buffer_copy() + + Make the check both more future proof against passing other negative + values (which is what is triggering warnings in static analyzers), and + match the recent coding style switch to check for all negative values + instead of a specific -1 (although in this case this does not signal an + error, but an unlimited copy). + + Warned-by: coverity + + lib/dpkg/buffer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 1a7b7d52ef6e637718bccdefc78bb1437b9af27e +Author: Guillem Jover +Date: Wed Jul 10 22:36:18 2024 +0200 + + dpkg: Check for < 0 instead of == -1 for conffderef() return values + + This is a dpkg specific function that returns 0 on success and -1 on + error. While a static analyzer should have enough in-tree information + to be able to avoid emitting bogus diagnostics, we switch to the same + pattern as we just did for syscall return values so that the coding + style is uniform. + + While at it we improve the debug output for the newly handled values. + + Changelog: internal + + src/main/configure.c | 2 +- + src/main/remove.c | 10 +++++++--- + src/main/unpack.c | 2 +- + 3 files changed, 9 insertions(+), 5 deletions(-) + +commit 4682652aabe4423177f26982c613e2e79765a393 +Author: Guillem Jover +Date: Wed Jul 10 23:20:52 2024 +0200 + + Check for >= 0 instead of != -1 for syscall return values + + While checking for != -1 is correct for all these calls, as that is + what the non-error condition is specified to return, this can confuse + static analyzers where these might consider other negative return values + as unhandled and emit bogus potential overflow or underflow conditions. + + Make these checks >= 0, which is shorter, also correct, and should pacify + static analyzers. + + Changelog: internal + + lib/dpkg/buffer.c | 2 +- + lib/dpkg/db-fsys-files.c | 2 +- + lib/dpkg/dbmodify.c | 4 ++-- + src/deb/extract.c | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +commit 5601b476929a896e1ab67e66e1192d5a90346e75 +Author: Guillem Jover +Date: Wed Jul 10 22:32:23 2024 +0200 + + Check for < 0 instead of == -1 from syscall return values + + While checking for == -1 is correct for all these calls, as that is + what the error condition is specified to return, this can confuse static + analyzers where these might consider other negative return values as + unhandled and emit bogus potential overflow or underflow conditions. + + Make these checks < 0, which is shorter, also correct, and should pacify + static analyzers. We leave alone the nice() function because it can + return other negative values as part of its interface definition. + + Changelog: internal + + dselect/method.cc | 8 ++++---- + lib/dpkg/dbmodify.c | 12 ++++++------ + lib/dpkg/fdio.c | 4 ++-- + lib/dpkg/file.c | 14 +++++++------- + lib/dpkg/mustlib.c | 4 ++-- + lib/dpkg/parse.c | 4 ++-- + lib/dpkg/subproc.c | 4 ++-- + lib/dpkg/t/t-subproc.c | 6 +++--- + lib/dpkg/trigdeferred.c | 4 ++-- + src/common/selinux.c | 2 +- + src/deb/build.c | 4 ++-- + src/deb/info.c | 2 +- + utils/start-stop-daemon.c | 12 ++++++------ + utils/update-alternatives.c | 10 +++++----- + 14 files changed, 45 insertions(+), 45 deletions(-) + +commit 040922cf08e03566a38b1c82ef66f9d01ab30ec3 +Author: Guillem Jover +Date: Wed Jul 10 06:28:38 2024 +0200 + + dpkg-realpath: Guarantee varbufs have been allocated + + This makes sure all the relevant varbufs are allocated and their buf + member is not NULL. This is an alternative robustness fix and a + workaround for commit 0fee7b211d8f31067bb444268860d995a8c1ba1e + and commit f724d507677674d4386816098bf038aa1567c081. + + Changelog: internal + + src/realpath/main.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit f724d507677674d4386816098bf038aa1567c081 +Author: Guillem Jover +Date: Wed Jul 10 06:25:24 2024 +0200 + + Revert "dpkg-realpath: Switch direct varbuf accesses to varbuf_str()" + + This reverts commit 0fee7b211d8f31067bb444268860d995a8c1ba1e. + + This was making cppcheck hit a bogus syntax error, and making the + authorcheck fail. We'll workaround the issue by using an alternative + method to make the code more robust. + + Ref: https://bugs.debian.org/1076061 + Changelog: internal + + src/realpath/main.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 0fee7b211d8f31067bb444268860d995a8c1ba1e +Author: Guillem Jover +Date: Tue Jul 9 04:18:47 2024 +0200 + + dpkg-realpath: Switch direct varbuf accesses to varbuf_str() + + Make these accesses more robust by using varbuf_str(), so that even + if the varbufs are empty we do not need to worry about handling a + NULL pointer. + + Changelog: internal + + src/realpath/main.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 474db9879aac91f4f97d3e7b0d205d4c2b63c360 +Author: Guillem Jover +Date: Tue Jul 9 04:15:50 2024 +0200 + + dpkg-realpath: Do not allow an empty pathname argument + + The code was expecting a non-empty string, and resolving an empty + pathname does not make much sense anyway. + + Warned-by: coverity + + src/realpath/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 983fadb9e00bb7a7816ace1952b4f704632c6c83 +Author: Guillem Jover +Date: Tue Jul 9 03:00:57 2024 +0200 + + libdpkg: Do not accept len >= INT_MAX in fd_read() and fd_write() + + The read() and write() functions return errors as negative numbers + via a ssize_t type, and also the amount read or written. This means + that if we pass a value greater than SSIZE_MAX, then it might not be + representable as a return value and would overflow. + + Warned-by: coverity + + lib/dpkg/fdio.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 9ff1f50b1cf672569de4fe438be268dcf9495a33 +Author: Guillem Jover +Date: Tue Jul 9 02:57:47 2024 +0200 + + libcompat: Fix vasprintf() to error out if vsnprintf() returns >= INT_MAX + + If the initial vsnprintf() call inside vasprintf() returns the needed + amount of bytes >= INT_MAX, that means we could overflow either when + adding one for the allocation if sizeof(size_t) == sizeof(int), or when + passing the size of that buffer to the next vsnprintf() call where even + if sizeof(size_t) > sizeof(int), the function will still need to return + the number of written bytes. Set errno appropriately and return -1. + + Warned-by: coverity + + lib/compat/vasprintf.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 811651673916b07d74b8e7284da71e02b12019f6 +Author: Guillem Jover +Date: Mon May 27 00:45:20 2024 +0200 + + build: Check whether HAVE_* macros for headers are defined + + The autoconf HAVE_ macros for headers are only defined if the header is + present. So we should check for that and not only for whether the macro + is true. + + dselect/main.cc | 2 +- + lib/dpkg/t/c-tarextract.c | 4 ++-- + lib/dpkg/tarfn.c | 2 +- + m4/dpkg-types.m4 | 4 ++-- + src/deb/main.c | 2 +- + src/divert/main.c | 2 +- + src/main/main.c | 2 +- + src/query/main.c | 2 +- + src/realpath/main.c | 2 +- + src/split/main.c | 2 +- + src/statoverride/main.c | 2 +- + src/trigger/main.c | 2 +- + utils/start-stop-daemon.c | 10 +++++----- + 13 files changed, 19 insertions(+), 19 deletions(-) + +commit 83c6705c1b6ecc4a7d27e02a9c44667760843d80 +Author: Guillem Jover +Date: Sun May 26 13:24:40 2024 +0200 + + s-s-d: Fix typos in code comments + + Changelog: internal + + utils/start-stop-daemon.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 4993ac06a949095ad85de0d6be081fb366eec1bb +Author: Guillem Jover +Date: Mon Jul 8 05:33:23 2024 +0200 + + build: Add missing files and sort POTFILES.in + + Let's add all files even if they currently do not contain any + translation, as not listing them all unconditionally is error prone, + as we might end up adding translations and those getting missed due + to the file already existing. + + Also this way we can add an author check for this. + + dselect/po/POTFILES.in | 6 ++++++ + po/POTFILES.in | 8 +++++--- + scripts/po/POTFILES.in | 13 +++++++++++-- + 3 files changed, 22 insertions(+), 5 deletions(-) + +commit 45317f8730922706541ad935804731adca3e346f +Author: Guillem Jover +Date: Sun Jul 7 02:00:58 2024 +0200 + + test: Switch ar m4 macros to use internal dpkg-ar implementation + + This implementation is system independent, so it will work regardless + of the system ar specific behavior, be that not handling GNU terminated + names, or handling completely different formats such as on AIX with its + big and small ar formats, which are unrelated to the common Unix ar + format. + + src/at/local.at | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +commit 865322b2a8fd321218f97e83a4be56a80c874f75 +Author: Guillem Jover +Date: Mon Jul 8 03:59:30 2024 +0200 + + dpkg-ar: New internal ar implementation script + + This script is going to be used in the test suite to guarantee we + have an implementation that conforms to the common Unix ar format, + independently of what the system supports. + + This is a minimal interface, which is intended to be used internally + for now, and might get replaced with a C implementation later on. + + Changelog: internal + + scripts/Makefile.am | 1 + + scripts/dpkg-ar.pl | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 128 insertions(+) + +commit fbee9f6d46dc89e416c3c586fc712ffe30f89d4a +Author: Guillem Jover +Date: Mon Jul 8 04:05:41 2024 +0200 + + Dpkg::Archive::Ar: New module + + This new module implements the minimal interface needed to write a + new local ar command to be used by the test suite, but will also be + used (and extended if needed) later on for the upcoming dpkg-sign, + once that handles signatures for .deb archives. + + scripts/Dpkg/Archive/Ar.pm | 440 +++++++++++++++++++++++++++++++++++++++++++++ + scripts/Makefile.am | 1 + + scripts/po/POTFILES.in | 1 + + t/pod-spell.t | 1 + + 4 files changed, 443 insertions(+) + +commit 9b2f0100fe89477bbbda060e324d0bdc83532633 +Author: Guillem Jover +Date: Sun Jul 7 01:45:24 2024 +0200 + + test: Refactor ar handling into m4 macros + + We abstract the create, list and extract operations into m4 macros, so + that we can easily change the underlying implementation in a single + place. + + src/at/deb-format.at | 98 ++++++++++++++++++++++++++-------------------------- + src/at/deb-split.at | 36 +++++++++---------- + src/at/local.at | 15 ++++++++ + 3 files changed, 82 insertions(+), 67 deletions(-) + +commit 59ce405f33d510ee81220b9505d0ddf07802bfee +Author: Guillem Jover +Date: Sat Jul 6 20:06:35 2024 +0200 + + test: Unify all ar invocations into create, extract and list + + Instead of modifying ar archives, simplify the handling into three + actions, so that we can replace the external ar usage with our own + simple implementation. This also makes the format of the archives + we are creating more obvious. + + src/at/deb-format.at | 15 +++++---------- + src/at/deb-split.at | 11 +++++------ + 2 files changed, 10 insertions(+), 16 deletions(-) + +commit 7e27cbae0ed0aef3e2da3f28256b671c6a9aecd2 +Author: Guillem Jover +Date: Fri Jul 5 01:16:18 2024 +0200 + + Dpkg::Shlibs::Cppfilt: Normalize demangled symbols with llvm or C++11 format + + The output from c++filt from llvm produces no spaces between ending + angle brackets (<>) as allowed by C++11, contrary to what + GNU binutils does by default as it was not allowed before C++11. + + Because this is used to compare against demangled symbols in symbols + files, we need to use an unified format, given that the space around + angle brackets is more compatible, and has been the default when using + GNU binutils, we normalize into that. + + scripts/Dpkg/Shlibs/Cppfilt.pm | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit 1c7f9f2be3c78d115d2cd4652c59ea4a42bf78ee +Author: Guillem Jover +Date: Sat Jul 6 16:57:00 2024 +0200 + + test: Only execute Dpkg::Shlibs checks on ELF platforms + + We currently only support ELF, and systems with other executable formats + such as Mach-O on macOS are not supported and will fail the tests. Skip + them for now. + + scripts/t/Dpkg_Shlibs.t | 7 ++++++- + scripts/t/Dpkg_Shlibs_Cppfilt.t | 8 +++++++- + 2 files changed, 13 insertions(+), 2 deletions(-) + +commit ef9d366feadb0b6ea5d0a77a10bdedf1262a8cd9 +Author: Guillem Jover +Date: Sat Jul 6 14:08:42 2024 +0200 + + test: Add new DPKG_CHECK_DIFF macro to abstract file comparisons + + On some systems, such as ones based on SunOS/illumos, the diff tool does + not honor the -q option and outputs «No differences encountered» when + there are no file differences. + + Instead of requiring GNU diff, abstract the check into a new macro that + uses the internal autotest machinery to compare the files for us via the + expout mechanism. + + src/at/divert.at | 26 +++++++++++++------------- + src/at/local.at | 6 ++++++ + 2 files changed, 19 insertions(+), 13 deletions(-) + +commit 3533e05c2038cb47e5446c0ba8de02dc8ce3f275 +Author: Guillem Jover +Date: Fri Jul 5 00:29:03 2024 +0200 + + Dpkg::Vendor::Debian: Set -Wno-error on qa=-bug-implicit-func + + Starting with gcc 14, the -Werror=implicit-function-declaration is + enabled by default by the compiler, so disabling the feature flag (which + would imply not passing any flag) will have no effect. Explicitly set + -Wno-error=implicit-function-declaration if the feature has been + disabled. + + Closes: #1075769 + + scripts/Dpkg/Vendor/Debian.pm | 2 ++ + 1 file changed, 2 insertions(+) + +commit 0dff3528b5c0d7f19bbda0899a29582fab4aef5f +Author: Helge Kreutzmann +Date: Wed Jul 3 21:56:40 2024 +0200 + + po: Update German scripts translation + + scripts/po/de.po | 191 +++++++++++++++++++++++++++++-------------------------- + 1 file changed, 102 insertions(+), 89 deletions(-) + +commit 0b7988833b2b778562b1d07c1836b5fd71ae9893 +Author: Helge Kreutzmann +Date: Wed Jul 3 21:56:16 2024 +0200 + + po: Update German man pages translation + + man/po/de.po | 61 ++++++++++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 49 insertions(+), 12 deletions(-) + +commit 33e3074db621e07ea1ea565cb6d1953f323b68de +Author: Guillem Jover +Date: Fri Jun 21 00:01:05 2024 +0200 + + Dpkg::OpenPGP::ErrorCodes: Update error codes from SOP draft version 10 + + Add relevant error codes for operations we can handle. + + Ref: https://ietf.org/archive/id/draft-dkg-openpgp-stateless-cli-10.html + + scripts/Dpkg/OpenPGP/ErrorCodes.pm | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +commit 0274e3d358022ddd270c6c40a048a27d8f6b4eb8 +Author: Guillem Jover +Date: Thu Jun 20 23:33:59 2024 +0200 + + dpkg-buildpackage: Make newline injection during signing GnuPG specific + + This is a bug in GnuPG, that other implementations do not suffer from, + and adding this newline causes multiple unnecessary newlines to be + added which is odd on the output. + + Ref: https://dev.gnupg.org/T7106 + + scripts/Dpkg/OpenPGP/Backend/GnuPG.pm | 14 ++++++++++++++ + scripts/dpkg-buildpackage.pl | 18 ++++-------------- + 2 files changed, 18 insertions(+), 14 deletions(-) + +commit 8389e701086116f8dd570b8897a7413595faf07b +Author: Guillem Jover +Date: Fri Jun 7 03:53:11 2024 +0200 + + lib, src: Include missing + + Reported-by: Simon Richter + Changelog: internal + + lib/dpkg/command.h | 1 + + lib/dpkg/parsedump.h | 1 + + lib/dpkg/pkg-format.h | 2 ++ + lib/dpkg/triglib.h | 2 ++ + lib/dpkg/varbuf.h | 1 + + src/common/force.h | 2 ++ + src/main/main.h | 2 ++ + 7 files changed, 11 insertions(+) + +commit c94e16d93815aafe81daf68400ff1debc487b805 +Author: Guillem Jover +Date: Fri Jun 7 03:43:47 2024 +0200 + + Dpkg::Vendor::Debian: On native builds map *_FOR_BUILD flags to * flags + + This should always be safe to do, and reduces the false positives in + automatic tools analyzing the flags being set, which can trip over + the _FOR_BUILD flags being blank. + + Closes: #1072332 + + scripts/Dpkg/Vendor/Debian.pm | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +commit 17456a341a1c63501e8dbfa6e93c4bf08cb8354e +Author: Guillem Jover +Date: Fri May 31 00:21:15 2024 +0200 + + Merge conffile obsolete and remove-on-upgrade into a single flags member + + Use a single flag member, so that it's easier to copy around, and test + for multiple conditions at once, or delegate the check to a function via + a bitmask. + + Changelog: internal + + lib/dpkg/dpkg-db.h | 12 ++++++++++-- + lib/dpkg/dump.c | 4 ++-- + lib/dpkg/fields.c | 20 +++++++++++--------- + src/main/archives.c | 2 +- + src/main/help.c | 4 ++-- + src/main/remove.c | 2 +- + src/main/unpack.c | 8 +++++--- + 7 files changed, 32 insertions(+), 20 deletions(-) + +commit b11ffedcae076e420b55c28d46c885a7280b92c3 +Author: Guillem Jover +Date: Fri May 31 00:31:15 2024 +0200 + + dpkg: Refactor conffile disappearing check into a new function + + Centralize the check into a function, which will make it easier to + extend its logic in the future. + + Changelog: internal + + src/main/archives.c | 2 +- + src/main/configure.c | 4 ++-- + src/main/help.c | 12 +++++++++++- + src/main/main.h | 2 ++ + 4 files changed, 16 insertions(+), 4 deletions(-) + +commit 09ae886184684990ec59ed01e66212cb7e41342a +Author: Guillem Jover +Date: Mon Feb 26 02:12:30 2024 +0100 + + dpkg-shlibdeps: Add support for new --package option + + This option takes care of changing some of the defaults based on the + information from the debian/control file. + + We select whether to use the Pre-Depends or Depends field as the default + on whether the package is Essential:yes. We select the package type from + the Package-Type field. And add the package to the set of packages + excluded by -x. + + man/dpkg-shlibdeps.pod | 15 +++++++++++++++ + scripts/dpkg-shlibdeps.pl | 32 ++++++++++++++++++++++++++++++-- + 2 files changed, 45 insertions(+), 2 deletions(-) + +commit e16a155f57c8c6f449ad949e876a160b393d6a55 +Author: Guillem Jover +Date: Mon Feb 26 01:57:38 2024 +0100 + + dpkg-shlibdeps: Refactor executable CLI parsing + + Instead of handling the executable and the dependency field it needs to + use for the substvars it generates, queue them into an array and process + all of them afterwards. This reduces duplicated parsing logic, and will + make it possible to use a different default for the field. + +Notes: + Changelog: internal + + scripts/dpkg-shlibdeps.pl | 42 +++++++++++++++++++++++++----------------- + 1 file changed, 25 insertions(+), 17 deletions(-) + +commit 01505a92295ee7767ebf92986ab569d9eb1d4f30 +Author: Guillem Jover +Date: Mon May 20 01:07:09 2024 +0200 + + libdpkg: Factor fsys_list_parse_buffer() out of ensure_packagefiles_available() + + Split the .list file specific parsing out of this more general files + metadata loading function. + + lib/dpkg/db-fsys-files.c | 73 ++++++++++++++++++++++++++++-------------------- + 1 file changed, 42 insertions(+), 31 deletions(-) + +commit 6410d905bd5f491ca764debc2c25c44a4b561fe1 +Author: Guillem Jover +Date: Mon Jul 1 05:33:50 2024 +0200 + + test: Clarify the Makefile fragment variable being tested via comments + + The current output is very confusing as it does not really mention the + actual variable being tested, and only expanded values are shown, which + makes for a harder time when trying to diagnose issues in the tests. + + scripts/t/mk/architecture.mk | 4 ++-- + scripts/t/mk/buildapi.mk | 1 + + scripts/t/mk/buildflags.mk | 4 ++-- + scripts/t/mk/buildopts.mk | 1 + + scripts/t/mk/buildtools.mk | 4 ++-- + scripts/t/mk/pkg-info.mk | 2 ++ + scripts/t/mk/vendor-v0.mk | 1 + + scripts/t/mk/vendor-v1.mk | 1 + + scripts/t/mk/vendor.mk | 2 ++ + 9 files changed, 14 insertions(+), 6 deletions(-) + +commit 1e9c98a43156b1724e8a1de2d63556c432bd8b7e +Author: Guillem Jover +Date: Mon Jul 1 05:32:11 2024 +0200 + + test: Parametrize all Makefile fragment functional tests + + Switch the tests to use variable lists instead of testing each variable + individually. This will make extending and adding comments to identify + the variables being tested easier and with less repetition. + + scripts/t/mk/buildapi.mk | 12 ++++++++++-- + scripts/t/mk/buildopts.mk | 10 ++++++++-- + scripts/t/mk/pkg-info.mk | 29 +++++++++++++++++++++-------- + scripts/t/mk/vendor.mk | 15 ++++++++++++--- + 4 files changed, 51 insertions(+), 15 deletions(-) + +commit 7e73ffda963a579bb7199301985a267586d0f7ff +Author: Guillem Jover +Date: Mon Jul 1 05:00:31 2024 +0200 + + test: Set CC to gcc in make fragments functional tests + + We are setting the CC environment variable for the TAP driver, from + the value detected at configure time, which means we might not have + the expected mock binary to control the output. Just set the CC + variable to a known value for the make fragments functional tests. + + scripts/t/mk.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d8ff5ef854c5fd3f6e9e5fa24a9e394a9b295276 +Author: Nicolas Boulenguez +Date: Tue Jul 2 11:54:55 2024 +0200 + + scripts/mk: Stop hard-coding dpkg_datadir + + This path differ during tests and after installation. Instead of + rewriting the file with a hardcoded path, compute it within Make. + + Signed-off-by: Guillem Jover + + build-aux/subst.am | 8 -------- + scripts/mk/Makefile.am | 10 ---------- + scripts/mk/buildtools.mk | 2 +- + scripts/mk/default.mk | 3 ++- + scripts/mk/vendor.mk | 2 +- + 5 files changed, 4 insertions(+), 21 deletions(-) + +commit a0b4da48cade31ac32d59c70813d747cd14503d8 +Author: Nicolas Boulenguez +Date: Tue Jul 2 10:44:20 2024 +0200 + + scripts/mk: Replace more GNU sed constructs with POSIX ones + + This fixes tests with BSD sed. + + Fixes: commit e146a68a375453db89bc3b5e816d9405e5fd5634 + Signed-off-by: Guillem Jover + Changelog: silent + + scripts/mk/pkg-info.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 57048fc8c3d0810091b73b444c1c42db1a665fb9 +Author: Guillem Jover +Date: Mon May 20 12:20:33 2024 +0200 + + build: Fix test verbose and parallel option propagation + + Unify the handling of these flags in the automake fragment files instead + of setting TESTSUITEFLAGS all over the place in addition to these flags + for the various test suite drivers. + + .gitlab-ci.yml | 10 +++++----- + build-aux/autotest.am | 9 +++++++++ + build-aux/tap.am | 2 ++ + debian/rules | 6 ++---- + debian/tests/test-not-root | 2 +- + debian/tests/test-root | 2 +- + 6 files changed, 20 insertions(+), 11 deletions(-) + +commit deb4cfe6071c27805fdb611b317096d97ebfdc41 +Author: Guillem Jover +Date: Thu Jun 13 00:33:16 2024 +0200 + + build: Workaround Tap::Harness verbose misbehavior on parallel mode + + The Tap::Harness module misbehaves when enabling both parallel and + verbose mode, where the verbose output is eaten by some concurrency + statistics output, and only the last test output is emitted. + + We set the formatter_class explicitly to the file formatter in case we + are running in verbose and parallel modes as a workaround. + + Ref: https://github.com/Perl-Toolchain-Gang/Test-Harness/issues/105 + + build-aux/test-runner | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit f2407763ce5198f29281b7524a55ce32cb56ad2e +Author: Guillem Jover +Date: Mon May 20 00:42:23 2024 +0200 + + doc: Fix casing after admonition + + In documentation, uppercase the admonition and the first word after the + colon. In output from programs, lowercase both the admonition and the + first word after the colon. + + dselect/methods/ftp/setup.pl | 2 +- + man/dpkg-buildflags.pod | 4 ++-- + man/dpkg-query.pod | 2 +- + man/update-alternatives.pod | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +commit 153a7c8de9c61f720fab6dc68fd5d017b9b3fe3d +Author: Guillem Jover +Date: Mon May 20 00:36:10 2024 +0200 + + doc: Fix grammar for fallback + + lib/dpkg/pkg-show.c | 2 +- + man/dpkg-name.pod | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 86fe73a5afd87962fe2b33f4e046f3f7008c7ad8 +Author: Helge Kreutzmann +Date: Tue May 21 21:00:56 2024 +0200 + + po: Update German man pages translation + + man/po/de.po | 36 ++++++++++++++++++++++++++++-------- + 1 file changed, 28 insertions(+), 8 deletions(-) + +commit 17dd898818b423c1ec1c2f1b80de4eda4a727012 +Author: Guillem Jover +Date: Fri May 17 23:35:26 2024 +0200 + + libdpkg: Make varbuf_detach() always return a string + + When we have added no content into a varbuf, we avoid allocating + memory, but when calling varbuf_detach() the caller expects a valid + string no matter what, and having to care about it returning NULL + is error-prone. Instead, when we have no buffer, we return an allocated + empty string. + + lib/dpkg/t/t-varbuf.c | 27 +++++++++++++++++++++++---- + lib/dpkg/varbuf.c | 3 +++ + 2 files changed, 26 insertions(+), 4 deletions(-) + +commit 0e589d3fcd3e94b70dd37d73fc21121ed2035609 +Author: Guillem Jover +Date: Sun May 19 11:21:10 2024 +0200 + + libdpkg: Make prefix and suffix varbuf checks cope with unallocated varbufs + + If the varbufs have not been allocated, we should not be passing them to + functions that expect their arguments not to be NULL. + + Changelog: silent + + lib/dpkg/t/t-varbuf.c | 8 +++++++- + lib/dpkg/varbuf.c | 10 ++++++++++ + 2 files changed, 17 insertions(+), 1 deletion(-) + +commit 7f287adcd0b7c09d9c212ecc38190fd0d393c0bc +Author: Guillem Jover +Date: Sun May 19 14:12:58 2024 +0200 + + libdpkg: Compute string slice for varbuf_has_suffix() check on good values + + We should not compute the slice with «used» members values that we know + will produce a wrong pointer, even if we do not end up using it, as that + can trip static analyzers. + + Changelog: silent + + lib/dpkg/varbuf.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 61b221cf7bab32d62f43a1bcb2b9eb88a42d94c5 +Author: Guillem Jover +Date: Wed May 15 02:30:35 2024 +0200 + + man: Update verify format example to also include M + + We implemented partial support for the M flag in the output, so mention + it in the example format to make it clear it is supported. + + man/dpkg.pod | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6d6488a9ed96967a0568890c0929b9ac5e7cdbed +Author: Guillem Jover +Date: Wed May 15 01:55:57 2024 +0200 + + dpkg: Do not run hooks or loggers with --dry-run or unprivileged + + If we have been told to run in dry mode, we should not be executing + the invocation hooks, as those might have side effects. We should + not run either if we are running as an unprivileged user without + --force-not-root. + + Closes: #1071124 + + man/dpkg.pod | 6 ++++++ + src/main/main.c | 22 ++++++++++++++++++++-- + 2 files changed, 26 insertions(+), 2 deletions(-) + +commit bc4dc7153597fc7a1f1343567a148e5df2365b44 +Author: Johannes Schauer Marin Rodrigues +Date: Tue May 14 03:16:20 2024 +0200 + + debian: Suppress s-s-d compat symlink if /sbin is missing + + When bootstrapping, if base-files has not yet been unpacked, the /sbin + pathname is going to be missing and we will not be able to create a + compat symlink, and «ln» will fail aborting the package installation. + + We cannot unconditionally create the /sbin directory as that would break + on usr-merged systems that ship a symlink in a package such as base-files. + + Ideally base-files would be unpacked first by the bootstrapping tool, + but that would required encoding this ordering somehow. + + Closes: #1071078 + Signed-off-by: Guillem Jover + + debian/dpkg.postinst | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 98e16e2eb9d69fbecc1a45361c394998fe288604 +Author: Guillem Jover +Date: Sat May 11 21:12:33 2024 +0200 + + dpkg-genbuildinfo: Parse Provides as virtual packages + + We did not specify that the dependencies to be parsed were virtual + packages. + + scripts/dpkg-genbuildinfo.pl | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit b126d97260a4e93cf1a1b8cd8524fdcbf50c647a +Author: Guillem Jover +Date: Sun May 12 19:27:05 2024 +0200 + + test: Refactor real and virtual package setup + + Use a list of real and virtual packages to use, and feed them into the + known facts object in a loop. + + Based-on-patch-by: Johannes Schauer Marin Rodrigues + + scripts/t/Dpkg_Deps.t | 93 ++++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 81 insertions(+), 12 deletions(-) + +commit b33121e1f73d336fe2eee8d0b1e117c7290e2bff +Author: Helge Kreutzmann +Date: Fri May 10 17:32:07 2024 +0200 + + po: Update German man pages translation + + man/po/de.po | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 67 insertions(+), 11 deletions(-) + +commit b33417497676318daf9fcc7f8d9ab189b5a2da1e +Author: Guillem Jover +Date: Fri May 10 00:21:16 2024 +0200 + + libdpkg: Turn the warning on Provides version relation into a lax error + + This is not allowed and it is unexpected by several tools. We should be + strict here and refuse parsing these kind of packages, when the context + (non database files) allows it. + + Ref: #930317 + + lib/dpkg/fields.c | 6 +++--- + tests/t-db/Makefile | 10 ++++++++++ + .../t-db/db-bogus-versioned-provides-update/status | 10 ++++++++++ + .../updates/.keep | 0 + .../db-bogus-versioned-provides-update/updates/0001 | 10 ++++++++++ + tests/t-db/db-bogus-versioned-provides/status | 21 +++++++++++++++++++++ + .../t-db/db-bogus-versioned-provides/updates/.keep | 0 + tests/t-provides/Makefile | 15 ++++++++++++++- + tests/t-provides/pkg-provides-bogus/DEBIAN/control | 8 ++++++++ + 9 files changed, 76 insertions(+), 4 deletions(-) + +commit 77cd6c000d433c8ebe6dfcf51579ed0f985e45ee +Author: Guillem Jover +Date: Fri May 10 00:18:47 2024 +0200 + + libdpkg: Refactor lax problem reporting into parse_lax_problem() function + + This function checks whether need to report a warning or an error + depending on whether we are currently in one of the specific lax modes, + as specified by the passed flags. + + lib/dpkg/parse.c | 12 ++++-------- + lib/dpkg/parsedump.h | 4 ++++ + lib/dpkg/parsehelp.c | 17 +++++++++++++++++ + 3 files changed, 25 insertions(+), 8 deletions(-) + +commit 4ed783dc7f83f97642ca206d05fc155c636dfb3a +Author: Guillem Jover +Date: Tue Jun 6 23:56:25 2023 +0200 + + man: Document weak checksum algorithms + + Add an attribute describing whether the fields are weak or strong, and + a note explicitly explaining their secure verification status. + + man/deb-buildinfo.pod | 9 ++++++--- + man/deb-changes.pod | 12 ++++++++++-- + man/dsc.pod | 9 ++++++--- + 3 files changed, 22 insertions(+), 8 deletions(-) + +commit e5fb453b3a68c5d79c0b79279cc763d269be8f2d +Author: Guillem Jover +Date: Tue Jun 6 23:54:05 2023 +0200 + + man: Document missing Packages front-end fields in dpkg-query(1) + + These are part of the Packages files in repositories, which can end up + in the available database shown by dpkg-query(1). + + man/dpkg-query.pod | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 77f1ce33aa905e7745db396b587a1a08f390c41e +Author: Frans Spiesschaert +Date: Mon May 6 22:54:23 2024 +0200 + + po: Update Dutch man pages translations + + Closes: #1070144 + Signed-off-by: Guillem Jover + + man/po/nl.po | 401 +++++++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 250 insertions(+), 151 deletions(-) + +commit 9dff672909dd6e294c5ac199c3c48bf44c823e3a +Author: Guillem Jover +Date: Sat May 4 02:27:44 2024 +0200 + + libdpkg: Mark file_slurp_fd() NUL-terminate the varbuf + + While this is not a concern with the current users of these functions, + it's still better to NUL-terminate the resulting varbuf, in case a + caller will try to use it as a C string directly. + +Notes: + Changelog: s/Mark/Make/ + + lib/dpkg/file.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit e146a68a375453db89bc3b5e816d9405e5fd5634 +Author: Nicolas Boulenguez +Date: Sun Mar 10 20:18:52 2024 +0100 + + scripts/mk: Reduce the number of subprocesses + + In architecture.mk, each unset variable was spawning a shell. + + In buildapi.mk, each expansion was spawning a shell. Where + default.mk and vendor.mk both expand DPKG_BUILD_API. + + In buildflags.mk, each first expansion of an unset variable was + spawning a shell. DPKG_EXPORT_BUILDFLAGS expands all variables. + + In pkg-info.mk, each variable was spawning its own shell. + + In vendors.mk the usage was correct but we switch to use the same + mechanism for consistency. + + [guillem@debian.org: + - Rename dpkg_lazy to dpkg_lazy_eval. + - Reword commit message. + - Fix indentation. ] + + Closes: #872381 + Signed-off-by: Guillem Jover + + scripts/mk/architecture.mk | 15 ++++++++++----- + scripts/mk/buildapi.mk | 6 +++++- + scripts/mk/buildflags.mk | 36 +++++++++++++++++------------------- + scripts/mk/pkg-info.mk | 33 +++++++++++++++++++++++---------- + scripts/mk/vendor.mk | 8 ++++---- + 5 files changed, 59 insertions(+), 39 deletions(-) + +commit 970350af0c0d0e672408757de5709908addac44f +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:23:19 2024 +0200 + + test: Test override of a build tool + + Signed-off-by: Guillem Jover + + scripts/t/mk/buildtools.mk | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 48a52db4125efa792f4021efb2fc9f3f712947e3 +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:21:58 2024 +0200 + + test: Add missing test for CPP build tool + + Signed-off-by: Guillem Jover + + scripts/t/mk/buildtools.mk | 1 + + 1 file changed, 1 insertion(+) + +commit 0b4d3ad3d079ca590072b5c917d84bdb8622ed6e +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:20:42 2024 +0200 + + test: Test DEB_CXXFLAGS_MAINT_SET + + Signed-off-by: Guillem Jover + + scripts/t/mk/buildflags.mk | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 0a3195357bf092330f7e8536ff71a51362029796 +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:16:20 2024 +0200 + + test: Test variable override + + Signed-off-by: Guillem Jover + + scripts/t/mk/architecture.mk | 3 +++ + 1 file changed, 3 insertions(+) + +commit 4b04e760a43e70c888b2d2b2953b1e3d25be8925 +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:14:27 2024 +0200 + + test: Test exported variables in addition to Make variables + + [guillem@debian.org: + - Fix comments format. ] + + Signed-off-by: Guillem Jover + + scripts/t/mk/architecture.mk | 3 +++ + scripts/t/mk/buildflags.mk | 5 +++++ + scripts/t/mk/buildtools.mk | 5 +++++ + 3 files changed, 13 insertions(+) + +commit bb01e59d881655bdb5046b318b2a99a29fb899ea +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:27:16 2024 +0200 + + test: Replace double quotes with single quote in shell recipes + + This escapes more characters for the shell, and makes the intent of + the dollar character more explicit. + + Signed-off-by: Guillem Jover + + scripts/t/mk/architecture.mk | 2 +- + scripts/t/mk/buildflags.mk | 2 +- + scripts/t/mk/buildtools.mk | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +commit d583f4846c26b421c8bc7b833925da7af986f71f +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:09:43 2024 +0200 + + test: Use loops instead of repetitions in mk fragment tests + + [guillem@debian.org: + - Wrap line at foreach. ] + + Signed-off-by: Guillem Jover + + scripts/t/mk/architecture.mk | 54 ++++++++++++++++---------------------------- + scripts/t/mk/buildflags.mk | 39 +++++++++++++++----------------- + scripts/t/mk/buildtools.mk | 54 +++++++++++++++++++------------------------- + 3 files changed, 61 insertions(+), 86 deletions(-) + +commit 4c77028718afc79082c2a07e881db646aa7028fd +Author: Nicolas Boulenguez +Date: Wed Apr 10 00:41:42 2024 +0200 + + test: Simplify buildflags.mk test of _MAINT_APPEND when TEST_ is empty + + When TEST_CPPFLAGS is empty, the right hand side of the comparison + starts with a space character. Append to the variable with += so that we + do not need to care whether the TEST_ variables were previously set or + not. + + Signed-off-by: Guillem Jover + + scripts/t/mk/buildflags.mk | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit ce5c5af1678760adf23fc0fcb2aa49fe88767a38 +Author: Guillem Jover +Date: Mon May 6 00:42:46 2024 +0200 + + test: Unset DEB_BUILD_MAINT_OPTIONS in build flags tests + + If we set this environment variable with optimize=+lto, then the test + fails. We need to unset it, like we do in other test files, to be + resilient against users or packaging setting this variable. + + scripts/t/Dpkg_BuildFlags_Ubuntu.t | 2 ++ + 1 file changed, 2 insertions(+) + +commit f1175056f53ec254b4234cb533881b671f7e5e35 +Author: Guillem Jover +Date: Thu Apr 11 04:32:39 2024 +0200 + + build: Rework subst handling for built or installed artifacts + + Switch from sed to perl so that we can perform in-place substitutions in + a portable way. Make the variable naming usage uniform. + + This reduces the amount of code duplication to deal with these + substitutions. + + We do not use AM_V_GEN any longer for the subst_.*_file macros, as + those get the filename as an argument, and are used in install-data-hook + targets, which then generate very confusing output such as + « GEN install-data-hook» for every modified file. And for the + subst_.*_filter macros we use AM_V_GEN in the call sites, if needed, + as that might not be appropriate if called after a pipe. + + build-aux/subst.am | 54 +++++++++++++++++++++++++++++--------------------- + scripts/Makefile.am | 6 +----- + scripts/mk/Makefile.am | 19 ++++-------------- + utils/Makefile.am | 10 ++++++---- + 4 files changed, 42 insertions(+), 47 deletions(-) + +commit 84d82aaaf5ae6ec761d8a6c811cc17e47b6a91b5 +Author: Sven Joachim +Date: Mon Apr 29 18:35:19 2024 +0200 + + po: Update German programs translation + + Update to 1195t. + + po/de.po | 152 ++++++++++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 107 insertions(+), 45 deletions(-) + +commit f8d4dc399cee2a36767e7cade336824953d3151d +Author: Helge Kreutzmann +Date: Mon Apr 29 09:53:13 2024 +0200 + + po: Update German man pages translation + + man/po/de.po | 72 +++++++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 50 insertions(+), 22 deletions(-) + +commit 24a7aee4631c8fb6f6482297810937f93bcc85da +Author: Guillem Jover +Date: Mon Apr 29 03:47:24 2024 +0200 + + Revert "test: Pass -T+1 to xz to workaround spurious warning with xz 5.6.0" + + This reverts commit 5822b37460127d772f06a09b0acceaf87a1fec66. + + This got fixed in xz 5.6.1, but those two versions were backdoored + anyway. New version will not emit the warnings that made the test suite + fail, and we should not keep workarounds for versions that were + backdoored anyway. + + The workaround was causing test failures on systems with older xz + version where the -T+1 option form is unknown. + + src/at/deb-format.at | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +commit 0f4000a29e2c8fdbe007a645028c10a04bdebbcc +Author: Guillem Jover +Date: Mon Apr 29 03:30:45 2024 +0200 + + test: Initialize varbuf before use + + This was already fixed in another branch, but the commit with the fix + did not end up in the main branch. + + Fixes: commit 9d410b39199e46dab8268b70e4557901f3e8af85 + Changelog: silent + + lib/dpkg/t/t-file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 489c0f4b2fcee6169640328fa8188174f2e4888e +Author: Guillem Jover +Date: Mon Apr 29 03:17:52 2024 +0200 + + libdpkg: Add missing header includes + + Fixes: commit e5c856f7368a71a6dbcb8fb1fd318f836a246f78 + + lib/dpkg/i18n.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 51b9b23c4fcf740fcc516b3bbb64860c850bf1c9 +Author: Peter Krefting +Date: Sun Apr 28 15:43:47 2024 +0100 + + po: Update Swedish translations + + Closes: #1070011 + Signed-off-by: Peter Krefting + Signed-off-by: Guillem Jover + + man/po/sv.po | 324 ++++++++++++++++++++----------------------------------- + po/sv.po | 34 +++--- + scripts/po/sv.po | 45 +++----- + 3 files changed, 146 insertions(+), 257 deletions(-) + +commit 0f503ee3aafaa0a3a955fdd3c63c043b42664d6c +Author: Guillem Jover +Date: Thu Apr 25 22:44:19 2024 +0200 + + src: Check whether SOURCE_DATE_EPOCH is set before parsing it + + The dpkg-deb and dpkg-split program try to parse this environment + variable to use it for their timestamps inside files to generate + reproducible artifacts. But when the environment variable is set + but empty then the parsing function fails with a confusing error + message. + + This is an issue when building a package directly via debian/rules + that uses the pkg-info.mk fragment file, because that one tries to + set the SOURCE_DATE_EPOCH and can end up setting it to an empty value + if the changelog contains an unfinished trailer. This is not an issue + when using dpkg-buildpackage, though because the code there will + fallback to use the current time if it there is no value from the + changelog. + + Closes: #1069846 + Based-on-patch-by: Rainer Weikusat + + src/deb/build.c | 2 +- + src/split/split.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 2b771a88ea8d66fd63acf73f93e5d0e486652982 +Author: Guillem Jover +Date: Thu Apr 25 23:02:31 2024 +0200 + + src: Fix timestamp parse error reporting + + We should distinguish between errors causing errno to be set, and errors + from partial conversions or no conversions at all. Otherwise we might + get an error message that states "Success" which is more confusing than + helpful. + + Ref: #1069846 + + src/deb/build.c | 4 +++- + src/split/split.c | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +commit f6d747035eef2c9a86f6ac749444ed80673d4ccf +Author: Guillem Jover +Date: Thu Apr 18 00:50:31 2024 +0200 + + dpkg: Use a variable for each conffile pathname type + + Instead of reusing two variables for various purposes, which makes the + code hard to follow and is rather confusing, use a dedicated variable + for each pathname type to make this all obvious. + + This also removes the rather unsafe code pattern of tracking a pointer + state to then append to with strcpy(). + + Changelog: internal + + src/main/configure.c | 67 +++++++++++++++++++++++++--------------------------- + 1 file changed, 32 insertions(+), 35 deletions(-) + +commit 42158472a5e6854888a16aa2e0216040ec2eae36 +Author: Guillem Jover +Date: Sat Apr 13 22:51:39 2024 +0200 + + dpkg-realpath: Rewrite in C + + This should make the code more robust against system issues on missing + shell interpreters or realpath and readlink commands. + + po/POTFILES.in | 2 + + src/Makefile.am | 7 +- + src/dpkg-realpath.sh | 179 ------------------------------------- + src/realpath/main.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++ + t/shellcheck.t | 1 - + 5 files changed, 249 insertions(+), 182 deletions(-) + +commit 9d410b39199e46dab8268b70e4557901f3e8af85 +Author: Guillem Jover +Date: Sat Apr 20 01:08:06 2024 +0200 + + libdpkg: Add new file_getcwd() function + + This new function abstracts the logic to retry getting the current + working directory by growing a buffer so that the result can fit. + + lib/dpkg/file.c | 14 ++++++++++++++ + lib/dpkg/file.h | 3 +++ + lib/dpkg/libdpkg.map | 1 + + lib/dpkg/t/t-file.c | 17 ++++++++++++++++- + 4 files changed, 34 insertions(+), 1 deletion(-) + +commit f382029ba92a2b626acc243f2bba278395df5e03 +Author: Guillem Jover +Date: Sat Apr 13 22:39:44 2024 +0200 + + libdpkg: Add new varbuf prefix and suffix handling functions + + These add checks for whether a prefix or a suffix is present in a + varbuf, and functions to trim varbuf or repeated character prefixes. + + lib/dpkg/libdpkg.map | 4 ++++ + lib/dpkg/t/t-varbuf.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++- + lib/dpkg/varbuf.c | 46 ++++++++++++++++++++++++++++++++++++ + lib/dpkg/varbuf.h | 5 ++++ + 4 files changed, 119 insertions(+), 1 deletion(-) + +commit e5c856f7368a71a6dbcb8fb1fd318f836a246f78 +Author: Guillem Jover +Date: Wed Feb 28 04:34:21 2024 +0100 + + libdpkg: Add support for DPKG_NLS environment variable + + This implements the DPKG_NLS environment variable support that all other + perl scripts already support, unifying the interface. This also covers + the case where a frontend might want to be translated but get + untranslated messages from dpkg itself. + + lib/dpkg/i18n.c | 21 ++++++++++++++++++++- + man/dpkg-deb.pod | 6 ++++++ + man/dpkg-divert.pod | 6 ++++++ + man/dpkg-query.pod | 6 ++++++ + man/dpkg-realpath.pod | 6 ++++++ + man/dpkg-split.pod | 6 ++++++ + man/dpkg-statoverride.pod | 6 ++++++ + man/dpkg-trigger.pod | 6 ++++++ + man/dpkg.pod | 6 ++++++ + 9 files changed, 68 insertions(+), 1 deletion(-) + +commit 24287281f6f0ecd3191adbae287410e00dd2c586 +Author: Guillem Jover +Date: Sat Apr 13 04:42:57 2024 +0200 + + man: Document DPKG_COLORS and DPKG_NLS for all perl scripts honoring them + + The dpkg-buildapi and dpkg-buildtree scripts honor these environment + variables by way of the Dpkg::ErrorHandling and Dpkg::Gettext modules, + but that was not documented in the manual pages. + + man/dpkg-buildapi.pod | 12 ++++++++++++ + man/dpkg-buildtree.pod | 18 ++++++++++++++++++ + 2 files changed, 30 insertions(+) + +commit e309f8639d2beb84c1f74b9bd0e9933f7fc7f58b +Author: Guillem Jover +Date: Thu Apr 11 00:52:34 2024 +0200 + + man: Add new libdpkg(7) manual page + + This is intended to document the library as a whole, give some overview + of its usage, API stability and deprecations. + + The API documentation for this library will not be translated, so it + seems a bit pointless to translate this manual page. It is thus not + marked for translation. + + Makefile.am | 1 + + debian/libdpkg-dev.manpages | 1 + + man/Makefile.am | 2 ++ + man/libdpkg.pod | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 48 insertions(+) + +commit 46ca7d944d1c876b0d345a6853ce3ff1ea42dea9 +Author: Guillem Jover +Date: Sat Apr 20 19:28:54 2024 +0200 + + build: Pass abs_srcdir and abs_builddir to the TAP driver + + We will need at least the abs_builddir to add tests for getcwd(), so we + add both out of completeness. + + build-aux/tap.am | 2 ++ + 1 file changed, 2 insertions(+) + +commit ae03bfd28afea2fdc10be9657d78a1fe29dfa58a +Author: Guillem Jover +Date: Wed Jul 12 04:50:59 2023 +0200 + + libdpkg: Remove varbuf_end_str() function + + Calling this function is not needed anymore, as varbuf handling is now + C string safe, because every varbuf function terminates strings with a + NUL character. + + lib/dpkg/command.c | 1 - + lib/dpkg/db-ctrl-access.c | 2 -- + lib/dpkg/db-ctrl-format.c | 1 - + lib/dpkg/db-ctrl-upgrade.c | 3 --- + lib/dpkg/dbmodify.c | 3 --- + lib/dpkg/dump.c | 2 -- + lib/dpkg/file.c | 1 - + lib/dpkg/libdpkg.map | 1 - + lib/dpkg/log.c | 1 - + lib/dpkg/parse.c | 1 - + lib/dpkg/parsehelp.c | 1 - + lib/dpkg/pkg-format.c | 2 -- + lib/dpkg/pkg-show.c | 3 --- + lib/dpkg/t/t-varbuf.c | 4 ---- + lib/dpkg/tarfn.c | 1 - + lib/dpkg/trigdeferred.c | 1 - + lib/dpkg/triglib.c | 1 - + lib/dpkg/varbuf.c | 10 ---------- + lib/dpkg/varbuf.h | 1 - + src/common/force.c | 1 - + src/deb/info.c | 1 - + src/divert/main.c | 1 - + src/main/archives.c | 9 --------- + src/main/configure.c | 5 ----- + src/main/depcon.c | 4 +--- + src/main/enquiry.c | 1 - + src/main/main.c | 1 - + src/main/packages.c | 2 -- + src/main/remove.c | 9 --------- + src/main/script.c | 1 - + src/main/select.c | 2 -- + src/main/trigproc.c | 3 --- + src/main/unpack.c | 8 -------- + src/main/verify.c | 1 - + src/query/main.c | 1 - + src/statoverride/main.c | 1 - + 36 files changed, 1 insertion(+), 90 deletions(-) + +commit cae07d61c3659836c7f37e52e3bf9297951849fd +Author: Guillem Jover +Date: Wed Jul 12 04:41:33 2023 +0200 + + libdpkg: Always NUL terminate varbufs + + This guarantees the varbufs returned by functions are always printable + and prepared to be handled by C string functions. + + lib/dpkg/t/t-varbuf.c | 14 -------------- + lib/dpkg/varbuf.c | 22 ++++++++++++++++------ + 2 files changed, 16 insertions(+), 20 deletions(-) + +commit fe1c99810a21e24b7ec0bcc8dfd82488cf30c6dc +Author: Guillem Jover +Date: Fri Sep 1 03:53:31 2023 +0200 + + Use varbuf_str() instead of direct access + + Replace any access that can result in an uninitialized buf member, in + case it only gets conditionally added strings to it. We might do a + second pass for the remaining read-only accesses in the future. + + Changelog: internal + + lib/dpkg/dump.c | 4 ++-- + lib/dpkg/pkg-format.c | 5 ++--- + lib/dpkg/pkg-show.c | 4 ++-- + lib/dpkg/t/t-arch.c | 12 ++++-------- + lib/dpkg/t/t-pkg-format.c | 2 +- + lib/dpkg/varbuf.c | 5 +---- + src/deb/info.c | 8 ++++---- + src/divert/main.c | 4 ++-- + src/main/archives.c | 12 +++++++----- + src/main/configure.c | 8 ++++---- + src/main/depcon.c | 2 +- + src/main/packages.c | 5 +++-- + src/main/remove.c | 4 ++-- + src/main/script.c | 2 +- + src/main/select.c | 10 ++++++---- + src/main/trigproc.c | 8 +++++--- + src/main/unpack.c | 24 ++++++++++++------------ + src/main/verify.c | 2 +- + src/statoverride/main.c | 6 +++--- + 19 files changed, 63 insertions(+), 64 deletions(-) + +commit 426997f8358701a14d03d6890390207c28a009c0 +Author: Guillem Jover +Date: Fri Jul 21 00:11:30 2023 +0200 + + libdpkg: Rename varbuf_get_str() to varbuf_str() + + This shortens a bit the function name so that we can still fit it in + long lines without having to wrap them around, and without losing any + semantic meaning from its name (it resembles the C++ c_str() member). + + lib/dpkg/libdpkg.map | 2 +- + lib/dpkg/t/t-varbuf.c | 8 ++++---- + lib/dpkg/varbuf.c | 2 +- + lib/dpkg/varbuf.h | 5 +++-- + 4 files changed, 9 insertions(+), 8 deletions(-) + +commit aea0858f52cb2ca100f34389d1864cd6a0fe1fb5 +Author: Guillem Jover +Date: Fri Jul 21 00:11:30 2023 +0200 + + libdpkg: Change varbuf_get_str() to return "" instead of initializing it + + When we have a varbuf that has not been populated, growing its memory to + simply add a NUL character is a waste. Instead simply return a constant + empty string. + + lib/dpkg/varbuf.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit bfecc8f132c74397eb0cd47891688067698c2c7d +Author: Guillem Jover +Date: Fri Apr 26 09:48:42 2024 +0200 + + test: Pass --check-level=exhaustive to cppcheck + + Starting with cppcheck 2.14.0, it emits an information level tag that it + is not analyzing all branches, which makes the test suite fail. + + Warned-by: cppcheck (normalCheckLevelMaxBranches) + + t/cppcheck.t | 1 + + 1 file changed, 1 insertion(+) + +commit 54a1a23d3960b496e6d12dbb973b895f5c2e4d3b +Author: Nicolas Boulenguez +Date: Sat Mar 9 17:21:53 2024 +0100 + + scripts/mk: Generate the _FOR_BUILD variant of each variable automatically + + Use a loop instead of duplicating the same variable with and without + _FOR_BUILD suffix. + + Signed-off-by: Guillem Jover + + scripts/mk/buildflags.mk | 14 ++------------ + 1 file changed, 2 insertions(+), 12 deletions(-) + +commit 61f824cf17ca87db571f2754207726aae78986cd +Author: Nicolas Boulenguez +Date: Tue Apr 9 05:31:16 2024 +0200 + + scripts/mk: Search once for parrallel= in DEB_BUILD_OPTIONS + + Previously each expansion of DEB_BUILD_OPTION_PARALLEL was parsing + DEB_BUILD_OPTIONS. + + Signed-off-by: Guillem Jover + +Notes: + Changelog: s/parrallel/parallel/ + + scripts/mk/buildopts.mk | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit d5835c5873f6eb8557a6ae54653cc7817e0057f0 +Author: Nicolas Boulenguez +Date: Tue Apr 9 04:56:26 2024 +0200 + + scripts/mk: Use explicit test of $(origin) instead of ?= + + This makes the intent of each stanza more readable (first ensure that + TOOL is set, then TOOL_FOR_BUILD). + + Signed-off-by: Guillem Jover + + scripts/mk/buildtools.mk | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit c0dde13fd6cccea101dc72b3705d8d6d4e7a9ed7 +Author: Nicolas Boulenguez +Date: Tue Apr 9 04:47:05 2024 +0200 + + scripts/mk: Use filter instead of findstring + + $(filter nostrip,$(DEB_BUILD_OPTIONS)) is slightly better than + $(findstring) because the latter matches 'arduinostrip'. + + Signed-off-by: Guillem Jover + + scripts/mk/buildtools.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8966616fa592c811b2950043f0273faada383493 +Author: Nicolas Boulenguez +Date: Tue Apr 9 04:25:02 2024 +0200 + + scripts/mk: Protect files against double inclusion + + The architecture.mk fragment file is included by default.mk and by + buildtools.mk. The buildapi.mk fragment file is included by default.mk + and by vendor.mk. + + [guillem@debian.org: + - Rename variables. + - Remove ifndef from endif comment. ] + + Signed-off-by: Guillem Jover + + scripts/mk/architecture.mk | 5 +++++ + scripts/mk/buildapi.mk | 5 +++++ + scripts/mk/buildflags.mk | 6 ++++++ + scripts/mk/buildopts.mk | 5 +++++ + scripts/mk/buildtools.mk | 5 +++++ + scripts/mk/default.mk | 5 +++++ + scripts/mk/pkg-info.mk | 5 +++++ + scripts/mk/vendor.mk | 5 +++++ + 8 files changed, 41 insertions(+) + +commit f268c37333f6569f2a1d280446cc48ece1e41199 +Author: Helge Kreutzmann +Date: Tue Apr 2 20:25:32 2024 +0200 + + po: Update German man pages translation + + man/po/de.po | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 75 insertions(+), 4 deletions(-) + +commit 3e430c1f2fdf4b27ca4050ea4cb53dfec7206d76 +Author: Guillem Jover +Date: Tue Apr 2 02:40:48 2024 +0200 + + man: Document DEB_BUILD_ARCH and DEB_HOST_ARCH usage in commands + + These variables affect the operation of several tools in the dpkg + toolset. Make this clear in the ENVIRONMENT section for these tools + as otherwise it is not obvious how to modify these values, for + example when wanting to enable cross-compilation mode, or when + wanting to operate on foreign architectures. + + Prompted-by: Thorsten Glaser + + man/dpkg-buildflags.pod | 7 +++++++ + man/dpkg-checkbuilddeps.pod | 6 ++++++ + man/dpkg-genbuildinfo.pod | 12 ++++++++++++ + man/dpkg-genchanges.pod | 4 ++++ + man/dpkg-gencontrol.pod | 4 ++++ + man/dpkg-gensymbols.pod | 4 ++++ + man/dpkg-name.pod | 5 +++++ + man/dpkg-shlibdeps.pod | 6 ++++++ + 8 files changed, 48 insertions(+) + +commit 54a6ad9db3da335a40fed9020195864c4a87bdc1 +Author: Guillem Jover +Date: Mon Apr 1 16:43:48 2024 +0200 + + build: Add support to track release VCS commit id + + This adds a provenance trail from the upstream VCS commit the tarball + was supposedly generated from, so that it can be traced by interested + downstreams. + + Makefile.am | 2 ++ + build-aux/.gitignore | 1 + + build-aux/get-vcs-id | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ + configure.ac | 2 ++ + t/shellcheck.t | 1 + + 5 files changed, 55 insertions(+) + +commit 00707c50e9d456189b4f583156ca7d7a2e1e03c9 +Author: Guillem Jover +Date: Mon Apr 1 16:44:57 2024 +0200 + + build: Print the release version at the end of configure + + This should give a bit more traceability during builds by downstreams. + + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +commit 4d92144441ee31655d6cbf4669d06da73ef478bf +Author: Helge Kreutzmann +Date: Fri Mar 29 07:31:39 2024 +0100 + + po: Update German man pages translation + + man/po/de.add | 2 +- + man/po/de.po | 72 ++++++++++++++++++++++++++++++++++++++++++++--------------- + 2 files changed, 55 insertions(+), 19 deletions(-) + +commit 2c55113b69485a1f776f878a7bba777511354397 +Author: Guillem Jover +Date: Wed Mar 27 03:37:16 2024 +0100 + + build: Partially revert the sanitizer for some functional tests in CI + + We cannot yet run some of the functional tests with the sanitizer + support enabled, as there are tests that expect an empty stderr, which + we might pollute from the output from at least the leak detector, and + make them fail unintentionally. + + Revert the change for those for now. + + Fixes: commit ebd19171d8f63a3ebc01eed33c22d8af5ad0eb38 + + .gitlab-ci.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 78a5e8e243c28f7d4c849f11e9c4cf5824a077f5 +Author: Matthias Klose +Date: Wed Mar 27 02:43:39 2024 +0100 + + Dpkg::Vendor::Ubuntu: Use -fcf-protection=none instead of -fno-cf-protection + + The latter is not known to gcc. + + Signed-off-by: Guillem Jover + + scripts/Dpkg/Vendor/Ubuntu.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 281c308ee91efaebfc5fa1b347670ff39e77680a +Author: Guillem Jover +Date: Tue Mar 26 04:01:30 2024 +0100 + + libdpkg: Handle readlink() failures in file_readlink() + + We should not use the linksize to update the varbuf if readlink() + failed, as that implies a negative number. + + Reported-by: coverity + + lib/dpkg/file.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 197fa86fc71a2e46a5c70f99a594bf13ffb520f9 +Author: Guillem Jover +Date: Sun Mar 24 05:44:54 2024 +0100 + + Dpkg::BuildDriver: Refactor build driver out of dpkg-buildpackage + + Add a new module with the logic to drive debian/rules. This also adds a + new experimental field that can be used to select the build driver to + use. + + This will help experimenting with build drivers that have a design that + is not inside-out, so that most of the process can be performed by + itself, instead of delegating it to the package. + + Makefile.am | 1 + + doc/spec/build-driver.txt | 44 +++++ + man/deb-src-control.pod | 10 +- + scripts/Dpkg/BuildDriver.pm | 196 +++++++++++++++++++++ + scripts/Dpkg/BuildDriver/DebianRules.pm | 298 ++++++++++++++++++++++++++++++++ + scripts/Dpkg/Control/FieldsCore.pm | 5 + + scripts/Makefile.am | 2 + + scripts/dpkg-buildpackage.pl | 155 ++--------------- + t/pod-spell.t | 2 + + 9 files changed, 574 insertions(+), 139 deletions(-) + +commit bab74e22a6db2707e442823d6c0b2a1334e76d1b +Author: Guillem Jover +Date: Sat Feb 10 14:20:28 2024 +0100 + + dpkg-buildpackage: Refactor build target hook execution + + This unifies the handling with the other hook execution. It has a slight + behavior change, where the DPKG_BUILDPACKAGE_HOOK_BUILD_TARGET is now + set even when the hook has been disabled. + +Notes: + Changelog: internal + + man/dpkg-buildpackage.pod | 3 ++- + scripts/dpkg-buildpackage.pl | 20 ++++++++++---------- + .../t/dpkg_buildpackage/test-source_0_source.hook | 2 +- + 3 files changed, 13 insertions(+), 12 deletions(-) + +commit c711bc865b7196fada1cc02b9b80bf9110b9a889 +Author: Guillem Jover +Date: Sat Feb 3 17:58:04 2024 +0100 + + dpkg-buildpackage: Fix the debian/rules executable check to respect -R + + When the user has specified a different rules file via the -R option, + we should try to use that file for the check that makes sure it is + executable. But, unfortunately, because the -R option might be passed + other program and arguments to interpret the file or something else + entirely, we can only be sure this is a single file to be executed if + it contains a single element. + + This means the check might get disabled when passing more than one + argument, but because it's a non-fatal warning, it should be fine. + + scripts/dpkg-buildpackage.pl | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit f4a75f1382b7f69ef6ef05fc8e35190e5452a070 +Author: Guillem Jover +Date: Sat Feb 10 13:43:24 2024 +0100 + + dpkg-buildpackage: Remove fallback handling for missing required targets + + The fallback code that was auto-detecting for potentially missing + build-arch and build-indep targets has been there since 2012, and has + increasingly been restricted. In Debian there was a mass bug filing + and there's now only a handful of packages missing these. It has come + the time to remove this fallback code and fully require these targets, + which means we can now avoid the auto-detection and fallback code. + + man/dpkg-buildpackage.pod | 8 +++---- + scripts/dpkg-buildpackage.pl | 51 -------------------------------------------- + 2 files changed, 3 insertions(+), 56 deletions(-) + +commit 7b6e42a137f4096c7189012724a50b08a988e7d3 +Author: Guillem Jover +Date: Wed Mar 20 00:49:17 2024 +0100 + + libcompat: Include missing in strnlen module + + We need the header for the memchr() prototype. + + Reported-by: Simon Richter + + lib/compat/strnlen.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 6a22037c2234f68cdd25a79b676d7a1536fe5519 +Author: Guillem Jover +Date: Wed Mar 20 00:42:49 2024 +0100 + + build: Do not check for functions used unconditionally + + We expect these functions to be present as we are using them + unconditionally, so there is no point in checking for them. + + configure.ac | 2 -- + 1 file changed, 2 deletions(-) + +commit 4c586e34404b1b6a4f4030a09dbe67ee68b3ead9 +Author: Guillem Jover +Date: Wed Mar 20 00:40:49 2024 +0100 + + build: Do not check for memcpy() + + This function should be present already in C89 and we require C99 now. + In addition it was causing configure failures when building with + «-Werror». + + Reported-by: Simon Richter + + configure.ac | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 2eb48ad0cf05815698e61f59d47847040e6f98ce +Author: Guillem Jover +Date: Wed Mar 20 00:30:59 2024 +0100 + + build: Unconditionally include + + We did this for libdpkg in commit 3516d105a427ad95c4d6bacb96030e4267c842fd, + which was unifying the assumption with the rest of the code base, so there + is no point in conditionally including it, when we already assume C99. + + configure.ac | 1 - + utils/start-stop-daemon.c | 2 -- + 2 files changed, 3 deletions(-) + +commit 4921ef18c65b429e65b4131f198b2c68795cb819 +Author: Guillem Jover +Date: Tue Nov 21 22:38:36 2023 +0100 + + build: Add missing space before backslash + + lib/dpkg/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ebd19171d8f63a3ebc01eed33c22d8af5ad0eb38 +Author: Guillem Jover +Date: Sun Mar 17 19:52:25 2024 +0100 + + build: Re-enable the sanitizer for functional tests in CI + + Now that we are ignoring leak sanitizer errors, we can enable the + sanitizer checks for all the rest of issues that can be detected. + + At the same time we can now widen again the unit tests to all codebase + instead of restricting it to only the lib/ directory. + + .gitlab-ci.yml | 8 ++++---- + tests/README | 3 +++ + 2 files changed, 7 insertions(+), 4 deletions(-) + +commit 7348ad792e551dc7d6974b0deef7dccb868ae831 +Author: Guillem Jover +Date: Sun Mar 17 22:54:04 2024 +0100 + + doc: Add missing full stop to end of sentence + + tests/README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0d3527afdb9dc6155f3019ca1b9d10b83af68a9b +Author: Guillem Jover +Date: Sun Mar 17 18:40:29 2024 +0100 + + test: Do not fail the functional test suite due to memory leaks + + The codebase still has many static variables, and variables used during + error conditions that are not cleaned up on exit or error, either + because they are state or short-lived variables used during error + unwinding. + + scripts/t/dpkg_buildpackage.t | 3 +++ + tests/Test.mk | 3 +++ + 2 files changed, 6 insertions(+) + +commit 5cdc783e50b9f827182c6e7988c1878ceedc7e91 +Author: Guillem Jover +Date: Sun Mar 17 15:02:45 2024 +0100 + + libdpkg: Factor out filesystem database file loading into new function + + This code is duplicated on several places that load filesystem + databases, refactor it into a new function that takes care of the + (re)loading. + + Based-on-patch-by: Simon Richter + + lib/dpkg/Makefile.am | 1 + + lib/dpkg/db-fsys-divert.c | 63 +++++++------------------------ + lib/dpkg/db-fsys-load.c | 91 +++++++++++++++++++++++++++++++++++++++++++++ + lib/dpkg/db-fsys-override.c | 69 +++++++++------------------------- + lib/dpkg/db-fsys.h | 26 +++++++++++++ + po/POTFILES.in | 1 + + 6 files changed, 150 insertions(+), 101 deletions(-) + +commit cedd582001730c8c9661dc2de280bd4fbbfe3d20 +Author: Helge Kreutzmann +Date: Wed Mar 13 21:58:26 2024 +0100 + + po: Update German man pages translation + + man/po/de.po | 21 ++++----------------- + 1 file changed, 4 insertions(+), 17 deletions(-) + +commit dfa1ac93769b435701c88de9030a1a0b83e74d32 +Author: Guillem Jover +Date: Sun Mar 10 20:42:51 2024 +0100 + + Bump version to 1.22.7 + + debian/changelog | 6 ++++++ + 1 file changed, 6 insertions(+) + commit b2f9600ead232a2dd3c27f8b52807a9ca5854d17 Author: Guillem Jover Date: Sun Mar 10 20:23:06 2024 +0100 diff --git a/Makefile.am b/Makefile.am index 1e536c0..97f4c2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,7 @@ dist_doc_DATA = \ # EOL dist_docspec_DATA = \ + doc/spec/build-driver.txt \ doc/spec/frontend-api.txt \ doc/spec/protected-field.txt \ doc/spec/rootless-builds.txt \ @@ -54,13 +55,12 @@ dist_docspec_DATA = \ # EOL EXTRA_DIST = \ - .gitlab-ci.yml \ - .mailmap \ ChangeLog.old \ README.l10n \ autogen \ build-aux/gen-changelog \ build-aux/gen-release \ + build-aux/get-vcs-id \ build-aux/get-version \ build-aux/lcov-inject \ build-aux/run-script \ @@ -94,6 +94,7 @@ EXTRA_DIST = \ debian/dselect.manpages \ debian/dselect.postrm \ debian/libdpkg-dev.install \ + debian/libdpkg-dev.manpages \ debian/libdpkg-perl.install \ debian/source/format \ debian/source/lintian-overrides \ @@ -238,14 +239,21 @@ include $(top_srcdir)/build-aux/cpan.am # that we're not forgetting some files, and we are not storing any symlink # in the repository (except for the origins/default one) as those degrade # to regular files due to automake telling tar to dereference them. +# +# XXX: As long as we have the Makefile based functional test suite, we need +# to remove .gitignore files from it, because we are including the entire +# hierarchy in EXTRA_DIST. dist-hook: echo $(VERSION) >$(distdir)/.dist-version + echo $(PACKAGE_VCS_URL) >$(distdir)/.dist-vcs-url + echo $(PACKAGE_VCS_ID) >$(distdir)/.dist-vcs-id + find "$(distdir)/tests" -type f -name '.git*' | xargs rm -f if [ -e .git ]; then \ for file in `git ls-tree -r HEAD | grep ^12 | grep -v t/origins/default`; do \ echo "$$file is a symlink packed as a file on the dist tar" >&2 ; \ exit 1 ; \ done ; \ - for file in `git ls-files | grep -vE '\.git(ignore|-blame)'`; do \ + for file in `git ls-files | grep -vE '\.(git|mailmap)'`; do \ if [ ! -e "$(distdir)/$$file" ]; then \ echo "$$file is missing in $(distdir)" >&2 ; \ exit 1 ; \ diff --git a/Makefile.in b/Makefile.in index b4ca8e7..8e4cdb1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,8 +101,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -369,6 +369,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -450,6 +451,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ @@ -517,14 +520,15 @@ dist_doc_DATA = \ # EOL dist_docspec_DATA = \ + doc/spec/build-driver.txt \ doc/spec/frontend-api.txt \ doc/spec/protected-field.txt \ doc/spec/rootless-builds.txt \ doc/spec/triggers.txt \ # EOL -EXTRA_DIST = .gitlab-ci.yml .mailmap ChangeLog.old README.l10n autogen \ - build-aux/gen-changelog build-aux/gen-release \ +EXTRA_DIST = ChangeLog.old README.l10n autogen build-aux/gen-changelog \ + build-aux/gen-release build-aux/get-vcs-id \ build-aux/get-version build-aux/lcov-inject \ build-aux/run-script build-aux/test-runner \ doc/coding-style.txt debian/README.bug-usertags \ @@ -540,13 +544,14 @@ EXTRA_DIST = .gitlab-ci.yml .mailmap ChangeLog.old README.l10n autogen \ debian/dselect.docs debian/dselect.install \ debian/dselect.lintian-overrides debian/dselect.manpages \ debian/dselect.postrm debian/libdpkg-dev.install \ - debian/libdpkg-perl.install debian/source/format \ - debian/source/lintian-overrides debian/not-installed \ - debian/rules debian/shlibs.default debian/shlibs.override \ - debian/tests/control debian/tests/test-func \ - debian/tests/test-func-root debian/tests/test-not-root \ - debian/tests/test-root po/its/polkit.its po/its/polkit.loc \ - tests $(test_scripts) $(test_data) # EOL + debian/libdpkg-dev.manpages debian/libdpkg-perl.install \ + debian/source/format debian/source/lintian-overrides \ + debian/not-installed debian/rules debian/shlibs.default \ + debian/shlibs.override debian/tests/control \ + debian/tests/test-func debian/tests/test-func-root \ + debian/tests/test-not-root debian/tests/test-root \ + po/its/polkit.its po/its/polkit.loc tests $(test_scripts) \ + $(test_data) # EOL @COVERAGE_ENABLED_TRUE@LCOV_OPTS = --quiet --rc geninfo_checksum=1 --rc lcov_branch_coverage=1 @COVERAGE_ENABLED_TRUE@LCOV_CAPTURE_OPTS = $(LCOV_OPTS) --no-recursion \ @COVERAGE_ENABLED_TRUE@ --directory $(top_builddir)/lib/dpkg \ @@ -1255,6 +1260,10 @@ tap-clean: tap-check: $(test_data) $(test_programs) $(test_scripts) [ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir) $(TEST_ENV_VARS) \ + TEST_PARALLEL=$(TEST_PARALLEL) \ + TEST_VERBOSE=$(TEST_VERBOSE) \ + abs_srcdir=$(abs_srcdir) \ + abs_builddir=$(abs_builddir) \ abs_top_srcdir=$(abs_top_srcdir) \ abs_top_builddir=$(abs_top_builddir) \ srcdir=$(srcdir) builddir=$(builddir) \ @@ -1323,14 +1332,21 @@ dist-cpan: # that we're not forgetting some files, and we are not storing any symlink # in the repository (except for the origins/default one) as those degrade # to regular files due to automake telling tar to dereference them. +# +# XXX: As long as we have the Makefile based functional test suite, we need +# to remove .gitignore files from it, because we are including the entire +# hierarchy in EXTRA_DIST. dist-hook: echo $(VERSION) >$(distdir)/.dist-version + echo $(PACKAGE_VCS_URL) >$(distdir)/.dist-vcs-url + echo $(PACKAGE_VCS_ID) >$(distdir)/.dist-vcs-id + find "$(distdir)/tests" -type f -name '.git*' | xargs rm -f if [ -e .git ]; then \ for file in `git ls-tree -r HEAD | grep ^12 | grep -v t/origins/default`; do \ echo "$$file is a symlink packed as a file on the dist tar" >&2 ; \ exit 1 ; \ done ; \ - for file in `git ls-files | grep -vE '\.git(ignore|-blame)'`; do \ + for file in `git ls-files | grep -vE '\.(git|mailmap)'`; do \ if [ ! -e "$(distdir)/$$file" ]; then \ echo "$$file is missing in $(distdir)" >&2 ; \ exit 1 ; \ diff --git a/aclocal.m4 b/aclocal.m4 index 9ddeb83..d050819 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1552,6 +1552,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/build-to-host.m4]) m4_include([m4/dpkg-arch.m4]) m4_include([m4/dpkg-build.m4]) m4_include([m4/dpkg-compiler.m4]) diff --git a/build-aux/autotest.am b/build-aux/autotest.am index a4bb8ea..19054c5 100644 --- a/build-aux/autotest.am +++ b/build-aux/autotest.am @@ -4,6 +4,15 @@ DISTCLEANFILES += at/atconfig AUTOTEST_DEPS = at/atconfig at/atlocal $(TESTSUITE) +TEST_VERBOSE ?= 0 +TEST_PARALLEL ?= 1 + +TEST_VERBOSE_OPT = $(TEST_VERBOSE:0=) + +TESTSUITEFLAGS = +TESTSUITEFLAGS += -j$(TEST_PARALLEL) +TESTSUITEFLAGS += $(TEST_VERBOSE_OPT:1=--verbose) + # The ":;" works around a Bash 3.2 bug when the output is not writable. $(srcdir)/at/package.m4: $(top_srcdir)/configure.ac :;{ \ diff --git a/build-aux/config.rpath b/build-aux/config.rpath index 24be79c..3893ddd 100755 --- a/build-aux/config.rpath +++ b/build-aux/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2020 Free Software Foundation, Inc. +# Copyright 1996-2024 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # @@ -371,7 +371,7 @@ else hardcode_direct=yes hardcode_minus_L=yes ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; @@ -547,7 +547,7 @@ case "$host_os" in freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) library_names_spec='$libname$shrext' ;; gnu*) diff --git a/build-aux/get-vcs-id b/build-aux/get-vcs-id new file mode 100755 index 0000000..cca511a --- /dev/null +++ b/build-aux/get-vcs-id @@ -0,0 +1,49 @@ +#!/bin/sh +# +# get-vcs-id +# +# Copyright © 2009-2024 Guillem Jover +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +error() +{ + echo "get-vcs-id: error: $*" 1>&2 + exit 1 +} + +if [ -f .dist-vcs-id ]; then + # Get the VCS id from the file distributed in the tarball. + id="$(cat .dist-vcs-id)" +elif [ -d .git ] || [ -f .git ]; then + if ! command -v git >/dev/null; then + error "cannot get project VCS id, git checkout but git program not found" + fi + + # Get the VCS id from the git repository. + id="$(git rev-list -1 HEAD 2>/dev/null)" + + # Check if we are on a dirty checkout. + git update-index --refresh -q >/dev/null + dirty=$(git diff-index --name-only HEAD 2>/dev/null) + if [ -n "$dirty" ]; then + id="$id-dirty" + fi +else + error "cannot get project VCS id, not a git checkout nor a distribution tarball." +fi + +# Use printf to avoid the trailing new line that m4_esyscmd would not handle. +printf "%s" "$id" diff --git a/build-aux/subst.am b/build-aux/subst.am index 5515930..9c96e5c 100644 --- a/build-aux/subst.am +++ b/build-aux/subst.am @@ -4,44 +4,44 @@ # Shell support. -do_shell_subst = $(AM_V_GEN) $(SED) \ - -e "s:^ADMINDIR=.*$$:ADMINDIR='$(admindir)':" \ - -e "s:^BACKUPSDIR=.*$$:BACKUPSDIR='$(backupsdir)':" \ - -e "s:^PKGDATADIR_DEFAULT=.*$$:PKGDATADIR_DEFAULT='$(pkgdatadir)':" \ - -e "s:^version=['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":" \ - -e "s:^TAR=.*$$:TAR='$(TAR)':" \ - # EOL +subst_shell_rules = "\ + s{^ADMINDIR=.*$$}{ADMINDIR='$(admindir)'}; \ + s{^BACKUPSDIR=.*$$}{BACKUPSDIR='$(backupsdir)'}; \ + s{^PKGDATADIR_DEFAULT=.*$$}{PKGDATADIR_DEFAULT='$(pkgdatadir)'}; \ + s{^version=['\"][^'\"]*[\"']}{version=\"$(PACKAGE_VERSION)\"}; \ + s{^TAR=.*$$}{TAR='$(TAR)'}; \ + " + +subst_shell_filter = $(PERL) -p -e $(subst_shell_rules) +subst_shell_file = $(PERL) -i -p -e $(shell_subst_rules) SUFFIXES += .sh .sh: Makefile @test -d `dirname $@` || $(MKDIR_P) `dirname $@` - $(do_shell_subst) <$< >$@ + $(AM_V_GEN) $(subst_shell_filter) <$< >$@ $(AM_V_at) chmod +x $@ # Perl support. -do_perl_subst = $(AM_V_GEN) $(SED) \ - -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:our \$$CONFDIR = .*;:our \$$CONFDIR = '$(pkgconfdir)';:" \ - -e "s:our \$$ADMINDIR = .*;:our \$$ADMINDIR = '$(admindir)';:" \ - -e "s:our \$$LIBDIR = .*;:our \$$LIBDIR = '$(pkglibexecdir)';:" \ - -e "s:our \$$DATADIR = .*;:our \$$DATADIR = '$(pkgdatadir)';:" \ - -e "s:our \$$PROGMAKE = .*;:our \$$PROGMAKE = '$(MAKE)';:" \ - -e "s:our \$$PROGTAR = .*;:our \$$PROGTAR = '$(TAR)';:" \ - -e "s:our \$$PROGPATCH = .*;:our \$$PROGPATCH = '$(PATCH)';:" \ - -e "s:our \$$PROGVERSION = .*;:our \$$PROGVERSION = '$(PACKAGE_VERSION)';:" \ - # EOL +subst_perl_rules = "\ + s{^\#!\s*/usr/bin/perl}{\#!$(PERL)}; \ + s{our \\\$$CONFDIR = .*;}{our \\\$$CONFDIR = '$(pkgconfdir)';}; \ + s{our \\\$$ADMINDIR = .*;}{our \\\$$ADMINDIR = '$(admindir)';}; \ + s{our \\\$$LIBDIR = .*;}{our \\\$$LIBDIR = '$(pkglibexecdir)';}; \ + s{our \\\$$DATADIR = .*;}{our \\\$$DATADIR = '$(pkgdatadir)';}; \ + s{our \\\$$PROGMAKE = .*;}{our \\\$$PROGMAKE = '$(MAKE)';}; \ + s{our \\\$$PROGTAR = .*;}{our \\\$$PROGTAR = '$(TAR)';}; \ + s{our \\\$$PROGPATCH = .*;}{our \\\$$PROGPATCH = '$(PATCH)';}; \ + s{our \\\$$PROGVERSION = .*;}{our \\\$$PROGVERSION = '$(PACKAGE_VERSION)';}; \ + " + +subst_perl_filter = $(PERL) -p -e $(subst_perl_rules) +subst_perl_file = $(PERL) -i -p -e $(subst_perl_rules) SUFFIXES += .pl .pl: Makefile @test -d `dirname $@` || $(MKDIR_P) `dirname $@` - $(do_perl_subst) <$< >$@ + $(AM_V_GEN) $(subst_perl_filter) <$< >$@ $(AM_V_at) chmod +x $@ - -# Makefile support. - -do_make_subst = $(AM_V_GEN) $(SED) \ - -e "s:dpkg_datadir[[:space:]]*=[[:space:]]*[^[:space:]]*:dpkg_datadir = $(pkgdatadir):" \ - # EOL diff --git a/build-aux/tap.am b/build-aux/tap.am index 9ec8de6..f05d4ba 100644 --- a/build-aux/tap.am +++ b/build-aux/tap.am @@ -18,6 +18,10 @@ tap-clean: tap-check: $(test_data) $(test_programs) $(test_scripts) [ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir) $(TEST_ENV_VARS) \ + TEST_PARALLEL=$(TEST_PARALLEL) \ + TEST_VERBOSE=$(TEST_VERBOSE) \ + abs_srcdir=$(abs_srcdir) \ + abs_builddir=$(abs_builddir) \ abs_top_srcdir=$(abs_top_srcdir) \ abs_top_builddir=$(abs_top_builddir) \ srcdir=$(srcdir) builddir=$(builddir) \ diff --git a/build-aux/test-runner b/build-aux/test-runner index 73c33fb..d73369b 100755 --- a/build-aux/test-runner +++ b/build-aux/test-runner @@ -13,6 +13,14 @@ $ENV{LC_ALL} = 'C'; $ENV{DPKG_COLORS} = 'never'; $ENV{PATH} = "$binroot/src:$binroot/scripts:$binroot/utils:$ENV{PATH}"; +my %options; +# XXX: We need force the file formatter to workaround verbose + parallel +# not working correctly, as the console formatter eats the test output, +# see . +if ($ENV{TEST_VERBOSE} && $ENV{TEST_PARALLEL} > 1) { + $options{formatter_class} = 'TAP::Formatter::File'; +} + my $harness = TAP::Harness->new({ exec => sub { my (undef, $test) = @_; @@ -27,6 +35,7 @@ my $harness = TAP::Harness->new({ verbosity => $ENV{TEST_VERBOSE}, jobs => $ENV{TEST_PARALLEL}, failures => 1, + %options, }); my $aggregate = $harness->runtests(@ARGV); diff --git a/config.h.in b/config.h.in index 3ea8e4a..a14749f 100644 --- a/config.h.in +++ b/config.h.in @@ -136,9 +136,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `isascii' function. */ -#undef HAVE_ISASCII - /* Define to 1 if you have the header file. */ #undef HAVE_KVM_H @@ -169,9 +166,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MD5_H -/* Define to 1 if you have the `memcpy' function. */ -#undef HAVE_MEMCPY - /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H @@ -220,9 +214,6 @@ /* Define to 1 if you have the `setsid' function. */ #undef HAVE_SETSID -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -253,9 +244,6 @@ /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL -/* Define to 1 if you have the `strtoimax' function. */ -#undef HAVE_STRTOIMAX - /* Define to 1 if the system has the type `struct psinfo'. */ #undef HAVE_STRUCT_PSINFO diff --git a/configure b/configure index 7e1a705..7c7e9ff 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for dpkg 1.22.6. +# Generated by GNU Autoconf 2.71 for dpkg 1.22.7. # # Report bugs to . # @@ -681,8 +681,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dpkg' PACKAGE_TARNAME='dpkg' -PACKAGE_VERSION='1.22.6' -PACKAGE_STRING='dpkg 1.22.6' +PACKAGE_VERSION='1.22.7' +PACKAGE_STRING='dpkg 1.22.7' PACKAGE_BUGREPORT='debian-dpkg@lists.debian.org' PACKAGE_URL='https://wiki.debian.org/Teams/Dpkg' @@ -848,6 +848,8 @@ FGREP LIBTOOL ac_ct_AR AR +localedir_c_make +localedir_c POSUB LTLIBINTL LIBINTL @@ -928,6 +930,7 @@ PACKAGE_BUG_WEB PACKAGE_VCS_WEB PACKAGE_VCS_URL PACKAGE_VCS_TYPE +PACKAGE_VCS_ID PACKAGE_COPYRIGHT_HOLDER PACKAGE_DIST_IS_RELEASE PACKAGE_DIST_IS_RELEASE_FALSE @@ -1610,7 +1613,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dpkg 1.22.6 to adapt to many kinds of systems. +\`configure' configures dpkg 1.22.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1681,7 +1684,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dpkg 1.22.6:";; + short | recursive ) echo "Configuration of dpkg 1.22.7:";; esac cat <<\_ACEOF @@ -1884,7 +1887,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dpkg configure 1.22.6 +dpkg configure 1.22.7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2700,7 +2703,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dpkg $as_me 1.22.6, which was +It was created by dpkg $as_me 1.22.7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3698,6 +3701,8 @@ fi PACKAGE_COPYRIGHT_HOLDER='Dpkg Developers' +PACKAGE_VCS_ID=7603b54e29911e4ff534c73f0c37d25a0a35c578 + PACKAGE_VCS_TYPE=git PACKAGE_VCS_URL=https://git.dpkg.org/git/dpkg/dpkg.git @@ -5518,7 +5523,7 @@ fi # Define the identity of the package. PACKAGE='dpkg' - VERSION='1.22.6' + VERSION='1.22.7' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -6053,9 +6058,9 @@ else $as_nop ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -6068,7 +6073,7 @@ else $as_nop fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac @@ -6176,9 +6181,9 @@ else $as_nop ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -6191,7 +6196,7 @@ else $as_nop fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac @@ -6254,9 +6259,9 @@ else $as_nop ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -6268,7 +6273,7 @@ else $as_nop fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac @@ -6311,10 +6316,10 @@ fi else acl_final_exec_prefix="$exec_prefix" fi - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" + prefix="$acl_saved_prefix" @@ -6441,7 +6446,7 @@ else $as_nop if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in - *-*-mingw*) + *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -6471,9 +6476,9 @@ else $as_nop fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$acl_save_ifs" + IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" @@ -6490,13 +6495,13 @@ else $as_nop esac fi done - IFS="$acl_save_ifs" + IFS="$acl_saved_IFS" fi case $host in *-*-aix*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined __powerpc64__ || defined _ARCH_PPC64 +#if defined __powerpc64__ || defined __LP64__ int ok; #else error fail @@ -6619,245 +6624,51 @@ if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else $as_nop - if test -n "$gl_cv_host_cpu_c_abi"; then - case "$gl_cv_host_cpu_c_abi" in - i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) - gl_cv_host_cpu_c_abi_32bit=yes ;; - x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) - gl_cv_host_cpu_c_abi_32bit=no ;; - *) - gl_cv_host_cpu_c_abi_32bit=unknown ;; - esac - else - case "$host_cpu" in - - # CPUs that only support a 32-bit ABI. - arc \ - | bfin \ - | cris* \ - | csky \ - | epiphany \ - | ft32 \ - | h8300 \ - | m68k \ - | microblaze | microblazeel \ - | nds32 | nds32le | nds32be \ - | nios2 | nios2eb | nios2el \ - | or1k* \ - | or32 \ - | sh | sh1234 | sh1234elb \ - | tic6x \ - | xtensa* ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - # CPUs that only support a 64-bit ABI. - alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ - | mmix ) - gl_cv_host_cpu_c_abi_32bit=no - ;; - - i[34567]86 ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - x86_64 ) - # On x86_64 systems, the C compiler may be generating code in one of - # these ABIs: - # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. - # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 - # with native Windows (mingw, MSVC). - # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. - # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if (defined __x86_64__ || defined __amd64__ \ - || defined _M_X64 || defined _M_AMD64) \ - && !(defined __ILP32__ || defined _ILP32) - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - arm* | aarch64 ) - # Assume arm with EABI. - # On arm64 systems, the C compiler may be generating code in one of - # these ABIs: - # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. - # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. - # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) - # On hppa, the C compiler may be generating 32-bit code or 64-bit - # code. In the latter case, it defines _LP64 and __LP64__. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __LP64__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - ia64* ) - # On ia64 on HP-UX, the C compiler may be generating 64-bit code or - # 32-bit code. In the latter case, it defines _ILP32. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef _ILP32 - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=yes -else $as_nop - gl_cv_host_cpu_c_abi_32bit=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - mips* ) - # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this - # at 32. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - powerpc* ) - # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. - # No need to distinguish them here; the caller may distinguish - # them based on the OS. - # On powerpc64 systems, the C compiler may still be generating - # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may - # be generating 64-bit code. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __powerpc64__ || defined _ARCH_PPC64 - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - rs6000 ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - riscv32 | riscv64 ) - # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. - # Size of 'long' and 'void *': - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __LP64__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - s390* ) - # On s390x, the C compiler may be generating 64-bit (= s390x) code - # or 31-bit (= s390) code. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __LP64__ || defined __s390x__ - int ok; - #else - error fail - #endif + case "$host_cpu" in + + # CPUs that only support a 32-bit ABI. + arc \ + | bfin \ + | cris* \ + | csky \ + | epiphany \ + | ft32 \ + | h8300 \ + | m68k \ + | microblaze | microblazeel \ + | nds32 | nds32le | nds32be \ + | nios2 | nios2eb | nios2el \ + | or1k* \ + | or32 \ + | sh | sh1234 | sh1234elb \ + | tic6x \ + | xtensa* ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; + # CPUs that only support a 64-bit ABI. + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) + gl_cv_host_cpu_c_abi_32bit=no + ;; - sparc | sparc64 ) - # UltraSPARCs running Linux have `uname -m` = "sparc64", but the - # C compiler still generates 32-bit code. + *) + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + x86_64 | alpha | arm64 | aarch64c | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) + gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; + esac + else + gl_cv_host_cpu_c_abi_32bit=unknown + fi + if test $gl_cv_host_cpu_c_abi_32bit = unknown; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined __sparcv9 || defined __arch64__ - int ok; - #else - error fail - #endif +int test_pointer_size[sizeof (void *) - 5]; _ACEOF if ac_fn_c_try_compile "$LINENO" @@ -6867,13 +6678,9 @@ else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - *) - gl_cv_host_cpu_c_abi_32bit=unknown - ;; - esac - fi + fi + ;; + esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 @@ -7168,7 +6975,7 @@ then : else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __ELF__ +#if defined __ELF__ || (defined __linux__ && defined __EDG__) Extensible Linking Format #endif @@ -7186,7 +6993,7 @@ rm -rf conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf "%s\n" "$gl_cv_elf" >&6; } - if test $gl_cv_elf; then + if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then @@ -7203,19 +7010,22 @@ printf "%s\n" "$gl_cv_elf" >&6; } echo } fi + # Use 'expr', not 'test', to compare the values of func_elfclass, because on + # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, + # not 1 or 2. case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) @@ -7252,6 +7062,13 @@ else $as_nop esac fi ;; + netbsd*) + if test $HOST_CPU_C_ABI_32BIT != no; then + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparc ;; + esac + fi + ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` @@ -7268,7 +7085,7 @@ else $as_nop fi fi if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" + acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in @@ -7285,7 +7102,7 @@ else $as_nop esac fi done - IFS="$acl_save_IFS" + IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= @@ -7320,9 +7137,9 @@ printf "%s\n" "$acl_cv_libdirstems" >&6; } use_additional=yes - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -7330,8 +7147,8 @@ printf "%s\n" "$acl_cv_libdirstems" >&6; } eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" # Check whether --with-libiconv-prefix was given. @@ -7343,9 +7160,9 @@ then : else if test "X$withval" = "X"; then - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -7353,8 +7170,8 @@ then : eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" else additional_includedir="$withval/include" @@ -7466,13 +7283,13 @@ fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" case "$x" in -L*) @@ -7560,13 +7377,13 @@ fi haveit= for x in $LDFLAGS $LIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes @@ -7628,13 +7445,13 @@ fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes @@ -7650,12 +7467,12 @@ fi fi fi if test -n "$found_la"; then - save_libdir="$libdir" + saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac - libdir="$save_libdir" + libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) @@ -7677,13 +7494,13 @@ fi haveit= for x in $LDFLAGS $LIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -7698,13 +7515,13 @@ fi haveit= for x in $LDFLAGS $LTLIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -7745,7 +7562,14 @@ fi fi ;; -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + dep=`echo "X$dep" | sed -e 's/^X-l//'` + if test "X$dep" != Xc \ + || case $host_os in + linux* | gnu* | k*bsd*-gnu) false ;; + *) true ;; + esac; then + names_next_round="$names_next_round $dep" + fi ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` @@ -7771,17 +7595,17 @@ fi for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi @@ -7798,6 +7622,15 @@ fi + gl_sed_double_backslashes='s/\\/\\\\/g' + gl_sed_escape_doublequotes='s/"/\\"/g' + gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g" + gl_sed_escape_for_make_2='s,\$,\\$$,g' + case `echo r | tr -d '\r'` in + '') gl_tr_cr='\015' ;; + *) gl_tr_cr='\r' ;; + esac + @@ -7826,7 +7659,7 @@ if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else $as_nop - gt_save_LIBS="$LIBS" + gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7847,7 +7680,7 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" + LIBS="$gt_saved_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } @@ -7862,7 +7695,7 @@ if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 else $as_nop - gt_save_LIBS="$LIBS" + gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7883,7 +7716,7 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" + LIBS="$gt_saved_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } @@ -7895,7 +7728,7 @@ printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" fi @@ -7984,19 +7817,19 @@ printf "%s\n" "$ac_res" >&6; } - am_save_CPPFLAGS="$CPPFLAGS" + gl_saved_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes @@ -8041,7 +7874,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" + gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8066,7 +7899,7 @@ then : fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" + LIBS="$gl_saved_LIBS" fi fi @@ -8080,7 +7913,7 @@ then : printf %s "(cached) " >&6 else $as_nop - am_save_LIBS="$LIBS" + gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi @@ -8107,8 +7940,9 @@ int main (void) { int result = 0; - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ + /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from + successful returns. This is even documented in + */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) @@ -8226,7 +8060,7 @@ fi test "$am_cv_func_iconv_works" = no || break done - LIBS="$am_save_LIBS" + LIBS="$gl_saved_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 @@ -8249,7 +8083,7 @@ printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else - CPPFLAGS="$am_save_CPPFLAGS" + CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi @@ -8265,9 +8099,9 @@ printf "%s\n" "$LIBICONV" >&6; } use_additional=yes - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -8275,8 +8109,8 @@ printf "%s\n" "$LIBICONV" >&6; } eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" # Check whether --with-libintl-prefix was given. @@ -8288,9 +8122,9 @@ then : else if test "X$withval" = "X"; then - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -8298,8 +8132,8 @@ then : eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" else additional_includedir="$withval/include" @@ -8411,13 +8245,13 @@ fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" case "$x" in -L*) @@ -8505,13 +8339,13 @@ fi haveit= for x in $LDFLAGS $LIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes @@ -8573,13 +8407,13 @@ fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes @@ -8595,12 +8429,12 @@ fi fi fi if test -n "$found_la"; then - save_libdir="$libdir" + saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac - libdir="$save_libdir" + libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) @@ -8622,13 +8456,13 @@ fi haveit= for x in $LDFLAGS $LIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -8643,13 +8477,13 @@ fi haveit= for x in $LDFLAGS $LTLIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -8690,7 +8524,14 @@ fi fi ;; -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + dep=`echo "X$dep" | sed -e 's/^X-l//'` + if test "X$dep" != Xc \ + || case $host_os in + linux* | gnu* | k*bsd*-gnu) false ;; + *) true ;; + esac; then + names_next_round="$names_next_round $dep" + fi ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` @@ -8716,17 +8557,17 @@ fi for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi @@ -8787,8 +8628,14 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" + gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" + + case "$host_os" in + aix*) gt_LIBINTL_EXTRA="-lpthread" ;; + esac + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \ + && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then + LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8819,8 +8666,8 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION _ACEOF if ac_fn_c_try_link "$LINENO" then : - LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" + LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA" + LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA" eval "$gt_func_gnugettext_libintl=yes" fi @@ -8838,7 +8685,8 @@ printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then + && test "$PACKAGE" != gettext-tools \ + && test "$PACKAGE" != libintl; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= @@ -8899,13 +8747,13 @@ printf "%s\n" "$LIBINTL" >&6; } haveit= for x in $CPPFLAGS; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes @@ -8932,12 +8780,50 @@ printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h - INTLLIBS="$LIBINTL" + INTLLIBS="$LIBINTL" + + + + + + + + gt_save_prefix="${prefix}" + gt_save_datarootdir="${datarootdir}" + gt_save_localedir="${localedir}" + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + eval datarootdir="$datarootdir" + eval localedir="$localedir" + + + + + + gl_final_localedir="$localedir" + case "$build_os" in + cygwin*) + case "$host_os" in + mingw* | windows*) + gl_final_localedir=`cygpath -w "$gl_final_localedir"` ;; + esac + ;; + esac + localedir_c=`printf '%s\n' "$gl_final_localedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"` + localedir_c='"'"$localedir_c"'"' + localedir_c_make=`printf '%s\n' "$localedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"` + if test "$localedir_c_make" = '\"'"${gl_final_localedir}"'\"'; then + localedir_c_make='\"$(localedir)\"' + fi + localedir="${gt_save_localedir}" + datarootdir="${gt_save_datarootdir}" + prefix="${gt_save_prefix}" if test ! -f "$srcdir/.dist-version" && test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes" @@ -25578,12 +25464,6 @@ fi fi # Checks for header files. -ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" -if test "x$ac_cv_header_stddef_h" = xyes -then : - printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h - -fi ac_fn_c_check_header_compile "$LINENO" "error.h" "ac_cv_header_error_h" "$ac_includes_default" if test "x$ac_cv_header_error_h" = xyes then : @@ -26679,7 +26559,7 @@ fi #undef _FILE_OFFSET_BITS #endif #define _STRUCTURED_PROC 1 -#if HAVE_SYS_PROCFS_H +#ifdef HAVE_SYS_PROCFS_H #include #endif @@ -26784,7 +26664,7 @@ fi ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" " #include /* NetBSD declares sys_siglist in unistd.h. */ -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif @@ -27452,33 +27332,18 @@ fi - for ac_func in memcpy lchown + for ac_func in lchown do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" + ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown" +if test "x$ac_cv_func_lchown" = xyes then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h else $as_nop as_fn_error $? "missing required function" "$LINENO" 5 fi done -ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" -if test "x$ac_cv_func_strtoimax" = xyes -then : - printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii" -if test "x$ac_cv_func_isascii" = xyes -then : - printf "%s\n" "#define HAVE_ISASCII 1" >>confdefs.h - -fi ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" if test "x$ac_cv_func_setsid" = xyes then : @@ -34449,7 +34314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dpkg $as_me 1.22.6, which was +This file was extended by dpkg $as_me 1.22.7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34518,7 +34383,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -dpkg config.status 1.22.6 +dpkg config.status 1.22.7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -35836,7 +35701,9 @@ See \`config.log' for more details" "$LINENO" 5; } # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in - "$presentlang"*) useit=yes;; + "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) + useit=yes + ;; esac done if test $useit = yes; then @@ -36647,6 +36514,10 @@ fi # Print the current configuration cat < #include -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H #include #endif #include diff --git a/dselect/method.cc b/dselect/method.cc index 5e7972f..ed7e834 100644 --- a/dselect/method.cc +++ b/dselect/method.cc @@ -75,7 +75,7 @@ static void cu_unlockmethod(int, void**) { if (methlockfd < 0) internerr("method lock fd is %d < 0", methlockfd); fl.l_type=F_UNLCK; fl.l_whence= SEEK_SET; fl.l_start=fl.l_len=0; - if (fcntl(methlockfd,F_SETLK,&fl) == -1) + if (fcntl(methlockfd, F_SETLK, &fl) < 0) sthfailed(_("cannot unlock access method area")); } @@ -104,9 +104,9 @@ static enum urqresult lockmethod(void) { if (methodlockfile == nullptr) methodlockfile = dpkg_db_get_path(METHLOCKFILE); - if (methlockfd == -1) { + if (methlockfd < 0) { methlockfd= open(methodlockfile, O_RDWR|O_CREAT|O_TRUNC, 0660); - if (methlockfd == -1) { + if (methlockfd < 0) { if ((errno == EPERM) || (errno == EACCES)) { sthfailed(_("requested operation requires superuser privilege")); return urqr_fail; @@ -116,7 +116,7 @@ static enum urqresult lockmethod(void) { } } fl.l_type=F_WRLCK; fl.l_whence=SEEK_SET; fl.l_start=fl.l_len=0; - if (fcntl(methlockfd,F_SETLK,&fl) == -1) { + if (fcntl(methlockfd, F_SETLK, &fl) < 0) { if (errno == EACCES || errno == EAGAIN) { sthfailed(_("the access method area is already locked")); return urqr_fail; diff --git a/dselect/methods/Makefile.in b/dselect/methods/Makefile.in index 956af07..501aa5c 100644 --- a/dselect/methods/Makefile.in +++ b/dselect/methods/Makefile.in @@ -97,8 +97,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = dselect/methods ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -273,6 +273,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -354,6 +355,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ @@ -422,34 +425,32 @@ CLEANFILES = \ # EOL SUFFIXES = .sh .pl -do_shell_subst = $(AM_V_GEN) $(SED) \ - -e "s:^ADMINDIR=.*$$:ADMINDIR='$(admindir)':" \ - -e "s:^BACKUPSDIR=.*$$:BACKUPSDIR='$(backupsdir)':" \ - -e "s:^PKGDATADIR_DEFAULT=.*$$:PKGDATADIR_DEFAULT='$(pkgdatadir)':" \ - -e "s:^version=['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":" \ - -e "s:^TAR=.*$$:TAR='$(TAR)':" \ - # EOL +subst_shell_rules = "\ + s{^ADMINDIR=.*$$}{ADMINDIR='$(admindir)'}; \ + s{^BACKUPSDIR=.*$$}{BACKUPSDIR='$(backupsdir)'}; \ + s{^PKGDATADIR_DEFAULT=.*$$}{PKGDATADIR_DEFAULT='$(pkgdatadir)'}; \ + s{^version=['\"][^'\"]*[\"']}{version=\"$(PACKAGE_VERSION)\"}; \ + s{^TAR=.*$$}{TAR='$(TAR)'}; \ + " +subst_shell_filter = $(PERL) -p -e $(subst_shell_rules) +subst_shell_file = $(PERL) -i -p -e $(shell_subst_rules) # Perl support. -do_perl_subst = $(AM_V_GEN) $(SED) \ - -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:our \$$CONFDIR = .*;:our \$$CONFDIR = '$(pkgconfdir)';:" \ - -e "s:our \$$ADMINDIR = .*;:our \$$ADMINDIR = '$(admindir)';:" \ - -e "s:our \$$LIBDIR = .*;:our \$$LIBDIR = '$(pkglibexecdir)';:" \ - -e "s:our \$$DATADIR = .*;:our \$$DATADIR = '$(pkgdatadir)';:" \ - -e "s:our \$$PROGMAKE = .*;:our \$$PROGMAKE = '$(MAKE)';:" \ - -e "s:our \$$PROGTAR = .*;:our \$$PROGTAR = '$(TAR)';:" \ - -e "s:our \$$PROGPATCH = .*;:our \$$PROGPATCH = '$(PATCH)';:" \ - -e "s:our \$$PROGVERSION = .*;:our \$$PROGVERSION = '$(PACKAGE_VERSION)';:" \ - # EOL - - -# Makefile support. -do_make_subst = $(AM_V_GEN) $(SED) \ - -e "s:dpkg_datadir[[:space:]]*=[[:space:]]*[^[:space:]]*:dpkg_datadir = $(pkgdatadir):" \ - # EOL - +subst_perl_rules = "\ + s{^\#!\s*/usr/bin/perl}{\#!$(PERL)}; \ + s{our \\\$$CONFDIR = .*;}{our \\\$$CONFDIR = '$(pkgconfdir)';}; \ + s{our \\\$$ADMINDIR = .*;}{our \\\$$ADMINDIR = '$(admindir)';}; \ + s{our \\\$$LIBDIR = .*;}{our \\\$$LIBDIR = '$(pkglibexecdir)';}; \ + s{our \\\$$DATADIR = .*;}{our \\\$$DATADIR = '$(pkgdatadir)';}; \ + s{our \\\$$PROGMAKE = .*;}{our \\\$$PROGMAKE = '$(MAKE)';}; \ + s{our \\\$$PROGTAR = .*;}{our \\\$$PROGTAR = '$(TAR)';}; \ + s{our \\\$$PROGPATCH = .*;}{our \\\$$PROGPATCH = '$(PATCH)';}; \ + s{our \\\$$PROGVERSION = .*;}{our \\\$$PROGVERSION = '$(PACKAGE_VERSION)';}; \ + " + +subst_perl_filter = $(PERL) -p -e $(subst_perl_rules) +subst_perl_file = $(PERL) -i -p -e $(subst_perl_rules) all: all-am .SUFFIXES: @@ -750,12 +751,12 @@ uninstall-am: uninstall-nobase_dist_methodsDATA \ .sh: Makefile @test -d `dirname $@` || $(MKDIR_P) `dirname $@` - $(do_shell_subst) <$< >$@ + $(AM_V_GEN) $(subst_shell_filter) <$< >$@ $(AM_V_at) chmod +x $@ .pl: Makefile @test -d `dirname $@` || $(MKDIR_P) `dirname $@` - $(do_perl_subst) <$< >$@ + $(AM_V_GEN) $(subst_perl_filter) <$< >$@ $(AM_V_at) chmod +x $@ install-data-local: diff --git a/dselect/methods/ftp/setup.pl b/dselect/methods/ftp/setup.pl index b9e8e27..888291b 100755 --- a/dselect/methods/ftp/setup.pl +++ b/dselect/methods/ftp/setup.pl @@ -135,7 +135,7 @@ sub download() { } } if( !$got_pkgfile) { - print "Warning: Could not find a Packages file in $dir\n", + print "warning: could not find a Packages file in $dir\n", "This may not be a problem if the directory is a symbolic link\n"; $problem = 1; } diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc index e7bedc7..b904fb5 100644 --- a/dselect/pkgtop.cc +++ b/dselect/pkgtop.cc @@ -59,13 +59,15 @@ int packagelist::describemany(char buf[], const char *prioritystring, ssoabbrev= _("All"); switch (statsortorder) { case sso_avail: - if (pps->ssavail == -1) break; + if (pps->ssavail == ssa_none) + break; ssostring= ssastrings[pps->ssavail]; ssoabbrev= ssaabbrevs[pps->ssavail]; statindent++; break; case sso_state: - if (pps->ssstate == -1) break; + if (pps->ssstate == sss_none) + break; ssostring= sssstrings[pps->ssstate]; ssoabbrev= sssabbrevs[pps->ssstate]; statindent++; diff --git a/dselect/po/Makefile.in.in b/dselect/po/Makefile.in.in index 6b25f0d..2b36b11 100644 --- a/dselect/po/Makefile.in.in +++ b/dselect/po/Makefile.in.in @@ -1,13 +1,13 @@ # Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-2000 Ulrich Drepper -# Copyright (C) 2000-2020 Free Software Foundation, Inc. +# Copyright (C) 2000-2023 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # -# Origin: gettext-0.21 +# Origin: gettext-0.22 GETTEXT_MACRO_VERSION = 0.20 PACKAGE = @PACKAGE@ @@ -248,15 +248,17 @@ $(POFILES): $(POFILESDEPS) @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + 0.1[1-5] | 0.1[1-5].*) \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ @@ -464,15 +466,17 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + 0.1[1-5] | 0.1[1-5].*) \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ diff --git a/dselect/po/POTFILES.in b/dselect/po/POTFILES.in index 7e3e7a0..ee30072 100644 --- a/dselect/po/POTFILES.in +++ b/dselect/po/POTFILES.in @@ -5,11 +5,17 @@ dselect/baselist.cc dselect/basetop.cc dselect/bindings.cc dselect/curkeys.cc +dselect/cxx-support.cc dselect/helpmsgs.cc dselect/main.cc dselect/methkeys.cc dselect/methlist.cc dselect/method.cc +dselect/methods/Dselect/Method.pm +dselect/methods/Dselect/Method/Ftp.pm +dselect/methods/ftp/install.pl +dselect/methods/ftp/setup.pl +dselect/methods/ftp/update.pl dselect/methparse.cc dselect/pkgcmds.cc dselect/pkgdepcon.cc diff --git a/dselect/po/bs.gmo b/dselect/po/bs.gmo index e039fd6..91fac84 100644 Binary files a/dselect/po/bs.gmo and b/dselect/po/bs.gmo differ diff --git a/dselect/po/bs.po b/dselect/po/bs.po index 782c5e2..dbaaffb 100644 --- a/dselect/po/bs.po +++ b/dselect/po/bs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.13\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-02-17 08:55+0200\n" "Last-Translator: Safir Šećerović \n" "Language-Team: Bosnian \n" diff --git a/dselect/po/ca.po b/dselect/po/ca.po index 6d6fa2c..4babe45 100644 --- a/dselect/po/ca.po +++ b/dselect/po/ca.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.21.10\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-12-17 19:34+0100\n" "Last-Translator: Guillem Jover \n" "Language-Team: Catalan \n" diff --git a/dselect/po/cs.po b/dselect/po/cs.po index 2935365..7318cd9 100644 --- a/dselect/po/cs.po +++ b/dselect/po/cs.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-01-26 13:52+0100\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" diff --git a/dselect/po/da.po b/dselect/po/da.po index e65df40..f30c430 100644 --- a/dselect/po/da.po +++ b/dselect/po/da.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.22\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2014-11-27 02:33+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" diff --git a/dselect/po/de.po b/dselect/po/de.po index 0c5f357..1e19408 100644 --- a/dselect/po/de.po +++ b/dselect/po/de.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.22.0~\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-04-25 20:26+0200\n" "Last-Translator: Sven Joachim \n" "Language-Team: German \n" @@ -376,8 +376,8 @@ msgstr "" "können.\n" "\n" "Sie sollten die Liste der Tasten und die Erklärung der Anzeige durchlesen.\n" -"Es ist viel Hilfe verfügbar, bitte nutzen Sie sie - drücken Sie jederzeit " -"»?«,\n" +"Es ist viel Hilfe verfügbar, bitte nutzen Sie sie - drücken Sie " +"jederzeit »?«,\n" "um die Hilfe aufzurufen.\n" "\n" "Wenn Sie mit ihrer Wahl zufrieden sind, drücken Sie , um " diff --git a/dselect/po/dselect.pot b/dselect/po/dselect.pot index 57e97da..73a40ae 100644 --- a/dselect/po/dselect.pot +++ b/dselect/po/dselect.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: dpkg 1.22.6\n" +"Project-Id-Version: dpkg 1.22.7\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dselect/po/el.po b/dselect/po/el.po index 55cc372..10be82c 100644 --- a/dselect/po/el.po +++ b/dselect/po/el.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-02-17 08:56+0200\n" "Last-Translator: quad-nrg.net \n" "Language-Team: Greek \n" diff --git a/dselect/po/es.po b/dselect/po/es.po index ef7e967..a8f2b63 100644 --- a/dselect/po/es.po +++ b/dselect/po/es.po @@ -40,7 +40,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.21.20\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-01-27 22:48+0100\n" "Last-Translator: Javier Fernández-Sanguino \n" "Language-Team: Spanish \n" diff --git a/dselect/po/et.po b/dselect/po/et.po index a8d2404..a9aea10 100644 --- a/dselect/po/et.po +++ b/dselect/po/et.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.14.5\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2007-07-13 08:22+0300\n" "Last-Translator: Ivar Smolin \n" "Language-Team: Estonian \n" diff --git a/dselect/po/eu.po b/dselect/po/eu.po index 1eb555b..9dfccae 100644 --- a/dselect/po/eu.po +++ b/dselect/po/eu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.16.8\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2012-09-01 12:21+0200\n" "Last-Translator: Iñaki Larrañaga Murgoitio \n" "Language-Team: Basque \n" diff --git a/dselect/po/fr.po b/dselect/po/fr.po index 7bef36e..1d5d1fe 100644 --- a/dselect/po/fr.po +++ b/dselect/po/fr.po @@ -49,7 +49,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.21.20\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-02-05 23:47+0100\n" "Last-Translator: Sébastien Poher \n" "Language-Team: French \n" diff --git a/dselect/po/gl.po b/dselect/po/gl.po index f56863a..e68a900 100644 --- a/dselect/po/gl.po +++ b/dselect/po/gl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2008-12-27 15:56+0100\n" "Last-Translator: mvillarino \n" "Language-Team: Galician \n" diff --git a/dselect/po/hu.gmo b/dselect/po/hu.gmo index 3933615..481ffc3 100644 Binary files a/dselect/po/hu.gmo and b/dselect/po/hu.gmo differ diff --git a/dselect/po/hu.po b/dselect/po/hu.po index 0e342f5..02d94ab 100644 --- a/dselect/po/hu.po +++ b/dselect/po/hu.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-10-06 03:48+0100\n" "Last-Translator: SZERVÁC Attila \n" "Language-Team: Hungarian \n" diff --git a/dselect/po/id.po b/dselect/po/id.po index 04348a1..cd1b8f1 100644 --- a/dselect/po/id.po +++ b/dselect/po/id.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.13\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-10-06 20:20+0700\n" "Last-Translator: Arief S Fitrianto \n" "Language-Team: Indonesian \n" diff --git a/dselect/po/it.po b/dselect/po/it.po index a6a317f..114254a 100644 --- a/dselect/po/it.po +++ b/dselect/po/it.po @@ -42,7 +42,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.10.22\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-10-06 22:01+0200\n" "Last-Translator: Stefano Canepa \n" "Language-Team: Italian \n" diff --git a/dselect/po/ja.po b/dselect/po/ja.po index 7f974e0..a1ab7d9 100644 --- a/dselect/po/ja.po +++ b/dselect/po/ja.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.22\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2016-03-31 12:44+0900\n" "Last-Translator: Takuma Yamada \n" "Language-Team: Japanese \n" diff --git a/dselect/po/ko.po b/dselect/po/ko.po index 79f02a0..de40cec 100644 --- a/dselect/po/ko.po +++ b/dselect/po/ko.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.21.20\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-01-29 11:18+0100\n" "Last-Translator: Sangdo Jun \n" "Language-Team: Korean \n" diff --git a/dselect/po/nb.po b/dselect/po/nb.po index 4fe7d4a..f524486 100644 --- a/dselect/po/nb.po +++ b/dselect/po/nb.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2014-12-05 13:25+0200\n" "Last-Translator: Hans Fredrik Nordhaug \n" "Language-Team: Norwegian Bokmål \n" diff --git a/dselect/po/nl.po b/dselect/po/nl.po index fa31353..f0647cd 100644 --- a/dselect/po/nl.po +++ b/dselect/po/nl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.22.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-09-11 21:13+0200\n" "Last-Translator: Frans Spiesschaert \n" "Language-Team: Debian Dutch l10n Team \n" diff --git a/dselect/po/nn.po b/dselect/po/nn.po index 89072d1..bcea9e1 100644 --- a/dselect/po/nn.po +++ b/dselect/po/nn.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-02-17 08:57+0200\n" "Last-Translator: Håvard Korsvoll \n" "Language-Team: Norwegian Nynorsk \n" diff --git a/dselect/po/pl.po b/dselect/po/pl.po index 603083e..794b0a4 100644 --- a/dselect/po/pl.po +++ b/dselect/po/pl.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.15.4\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2014-12-21 20:58+0100\n" "Last-Translator: Łukasz Dulny \n" "Language-Team: Polish \n" diff --git a/dselect/po/pt.po b/dselect/po/pt.po index 446e1cb..0982a3a 100644 --- a/dselect/po/pt.po +++ b/dselect/po/pt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2014-11-30 13:28+0000\n" "Last-Translator: Miguel Figueiredo \n" "Language-Team: Portuguese \n" diff --git a/dselect/po/pt_BR.po b/dselect/po/pt_BR.po index 8dcd14a..0bfa349 100644 --- a/dselect/po/pt_BR.po +++ b/dselect/po/pt_BR.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.13\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2008-06-09 02:53-0300\n" "Last-Translator: Felipe Augusto van de Wiel \n" "Language-Team: Brazilian Portuguese \n" "Language-Team: Romanian \n" diff --git a/dselect/po/ru.po b/dselect/po/ru.po index 6a6adbd..29fbc1e 100644 --- a/dselect/po/ru.po +++ b/dselect/po/ru.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.21.20\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-01-31 22:38+0100\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" diff --git a/dselect/po/sk.po b/dselect/po/sk.po index a1334f4..c910560 100644 --- a/dselect/po/sk.po +++ b/dselect/po/sk.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.13\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2012-07-03 01:09+0100\n" "Last-Translator: Ivan Masár \n" "Language-Team: Slovak \n" diff --git a/dselect/po/sv.po b/dselect/po/sv.po index 558ded4..0032a9c 100644 --- a/dselect/po/sv.po +++ b/dselect/po/sv.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.22.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-10-24 18:29+0100\n" "Last-Translator: Peter Krefting \n" "Language-Team: Swedish \n" diff --git a/dselect/po/tl.po b/dselect/po/tl.po index e2fbb48..3de74ed 100644 --- a/dselect/po/tl.po +++ b/dselect/po/tl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.13\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2006-02-17 08:58+0200\n" "Last-Translator: Eric Pareja \n" "Language-Team: Tagalog \n" diff --git a/dselect/po/vi.po b/dselect/po/vi.po index f91142e..16e1d52 100644 --- a/dselect/po/vi.po +++ b/dselect/po/vi.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.17.22\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2014-12-01 08:20+0700\n" "Last-Translator: Trần Ngọc Quân \n" "Language-Team: Vietnamese \n" diff --git a/dselect/po/zh_CN.po b/dselect/po/zh_CN.po index 18262e2..4175e56 100644 --- a/dselect/po/zh_CN.po +++ b/dselect/po/zh_CN.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.21.20\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-01-27 15:29-0500\n" "Last-Translator: Boyuan Yang <073plan@gmail.com>\n" "Language-Team: Chinese (simplified) \n" diff --git a/dselect/po/zh_TW.po b/dselect/po/zh_TW.po index a08ed7c..e801038 100644 --- a/dselect/po/zh_TW.po +++ b/dselect/po/zh_TW.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: dselect 1.13\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2024-03-10 20:21+0100\n" +"POT-Creation-Date: 2024-07-17 01:10+0200\n" "PO-Revision-Date: 2023-01-28 15:57+0800\n" "Last-Translator: Cheng-Chia Tseng \n" "Language-Team: Chinese (traditional) \n" diff --git a/lib/Makefile.in b/lib/Makefile.in index a1a17a6..b881bac 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -89,8 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -290,6 +290,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -371,6 +372,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ diff --git a/lib/compat/Makefile.in b/lib/compat/Makefile.in index 9b3c41c..3f3ccbb 100644 --- a/lib/compat/Makefile.in +++ b/lib/compat/Makefile.in @@ -105,8 +105,8 @@ host_triplet = @host@ @HAVE_UNSETENV_FALSE@am__append_15 = unsetenv.c subdir = lib/compat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -353,6 +353,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -434,6 +435,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ diff --git a/lib/compat/strnlen.c b/lib/compat/strnlen.c index d02bb4b..288a298 100644 --- a/lib/compat/strnlen.c +++ b/lib/compat/strnlen.c @@ -20,6 +20,8 @@ # include #endif +#include + #include "compat.h" /* Find the length of STRING, but scan at most MAXLEN characters. diff --git a/lib/compat/vasprintf.c b/lib/compat/vasprintf.c index 9d53a32..b5a2783 100644 --- a/lib/compat/vasprintf.c +++ b/lib/compat/vasprintf.c @@ -19,6 +19,8 @@ #include +#include +#include #include #include #include @@ -36,7 +38,9 @@ vasprintf(char **strp, char const *fmt, va_list args) needed = vsnprintf(NULL, 0, fmt, args_copy); va_end(args_copy); - if (needed < 0) { + if (needed < 0 || needed >= INT_MAX) { + if (needed >= INT_MAX) + errno = EOVERFLOW; *strp = NULL; return -1; } diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am index 9ef3a37..862562c 100644 --- a/lib/dpkg/Makefile.am +++ b/lib/dpkg/Makefile.am @@ -76,6 +76,7 @@ libdpkg_la_SOURCES = \ db-fsys-digest.c \ db-fsys-divert.c \ db-fsys-files.c \ + db-fsys-load.c \ db-fsys-override.c \ deb-version.c \ debug.c \ @@ -84,10 +85,11 @@ libdpkg_la_SOURCES = \ dump.c \ ehandle.c \ error.c \ + execname.c \ fdio.c \ file.c \ fields.c \ - fsys-dir.c\ + fsys-dir.c \ fsys-iter.c \ fsys-hash.c \ glob.c \ @@ -154,6 +156,7 @@ pkginclude_HEADERS = \ dpkg-db.h \ ehandle.h \ error.h \ + execname.h \ fdio.h \ file.h \ fsys.h \ diff --git a/lib/dpkg/Makefile.in b/lib/dpkg/Makefile.in index 07f9005..3c92b54 100644 --- a/lib/dpkg/Makefile.in +++ b/lib/dpkg/Makefile.in @@ -118,8 +118,8 @@ check_PROGRAMS = $(am__EXEEXT_1) t/b-fsys-hash$(EXEEXT) \ t/c-treewalk$(EXEEXT) t/c-trigdeferred$(EXEEXT) subdir = lib/dpkg ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -196,16 +196,16 @@ am_libdpkg_la_OBJECTS = ar.lo arch.lo atomic-file.lo buffer.lo \ c-ctype.lo cleanup.lo color.lo command.lo compress.lo dbdir.lo \ dbmodify.lo db-ctrl-access.lo db-ctrl-format.lo \ db-ctrl-upgrade.lo db-fsys-digest.lo db-fsys-divert.lo \ - db-fsys-files.lo db-fsys-override.lo deb-version.lo debug.lo \ - depcon.lo dir.lo dump.lo ehandle.lo error.lo fdio.lo file.lo \ - fields.lo fsys-dir.lo fsys-iter.lo fsys-hash.lo glob.lo \ - i18n.lo log.lo meminfo.lo mustlib.lo namevalue.lo nfmalloc.lo \ - options.lo options-dirs.lo options-parsers.lo pager.lo \ - parse.lo parsehelp.lo path.lo path-remove.lo pkg.lo \ - pkg-array.lo pkg-files.lo pkg-format.lo pkg-hash.lo \ - pkg-list.lo pkg-namevalue.lo pkg-queue.lo pkg-show.lo \ - pkg-spec.lo progname.lo program.lo progress.lo report.lo \ - string.lo strhash.lo strwide.lo subproc.lo tarfn.lo \ + db-fsys-files.lo db-fsys-load.lo db-fsys-override.lo \ + deb-version.lo debug.lo depcon.lo dir.lo dump.lo ehandle.lo \ + error.lo execname.lo fdio.lo file.lo fields.lo fsys-dir.lo \ + fsys-iter.lo fsys-hash.lo glob.lo i18n.lo log.lo meminfo.lo \ + mustlib.lo namevalue.lo nfmalloc.lo options.lo options-dirs.lo \ + options-parsers.lo pager.lo parse.lo parsehelp.lo path.lo \ + path-remove.lo pkg.lo pkg-array.lo pkg-files.lo pkg-format.lo \ + pkg-hash.lo pkg-list.lo pkg-namevalue.lo pkg-queue.lo \ + pkg-show.lo pkg-spec.lo progname.lo program.lo progress.lo \ + report.lo string.lo strhash.lo strwide.lo subproc.lo tarfn.lo \ treewalk.lo trigname.lo trignote.lo triglib.lo trigdeferred.lo \ utils.lo varbuf.lo version.lo libdpkg_la_OBJECTS = $(am_libdpkg_la_OBJECTS) @@ -428,12 +428,13 @@ am__depfiles_remade = ./$(DEPDIR)/ar.Plo ./$(DEPDIR)/arch.Plo \ ./$(DEPDIR)/compress.Plo ./$(DEPDIR)/db-ctrl-access.Plo \ ./$(DEPDIR)/db-ctrl-format.Plo ./$(DEPDIR)/db-ctrl-upgrade.Plo \ ./$(DEPDIR)/db-fsys-digest.Plo ./$(DEPDIR)/db-fsys-divert.Plo \ - ./$(DEPDIR)/db-fsys-files.Plo ./$(DEPDIR)/db-fsys-override.Plo \ - ./$(DEPDIR)/dbdir.Plo ./$(DEPDIR)/dbmodify.Plo \ - ./$(DEPDIR)/deb-version.Plo ./$(DEPDIR)/debug.Plo \ - ./$(DEPDIR)/depcon.Plo ./$(DEPDIR)/dir.Plo \ - ./$(DEPDIR)/dump.Plo ./$(DEPDIR)/ehandle.Plo \ - ./$(DEPDIR)/error.Plo ./$(DEPDIR)/fdio.Plo \ + ./$(DEPDIR)/db-fsys-files.Plo ./$(DEPDIR)/db-fsys-load.Plo \ + ./$(DEPDIR)/db-fsys-override.Plo ./$(DEPDIR)/dbdir.Plo \ + ./$(DEPDIR)/dbmodify.Plo ./$(DEPDIR)/deb-version.Plo \ + ./$(DEPDIR)/debug.Plo ./$(DEPDIR)/depcon.Plo \ + ./$(DEPDIR)/dir.Plo ./$(DEPDIR)/dump.Plo \ + ./$(DEPDIR)/ehandle.Plo ./$(DEPDIR)/error.Plo \ + ./$(DEPDIR)/execname.Plo ./$(DEPDIR)/fdio.Plo \ ./$(DEPDIR)/fields.Plo ./$(DEPDIR)/file.Plo \ ./$(DEPDIR)/fsys-dir.Plo ./$(DEPDIR)/fsys-hash.Plo \ ./$(DEPDIR)/fsys-iter.Plo ./$(DEPDIR)/glob.Plo \ @@ -658,6 +659,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -739,6 +741,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ @@ -817,6 +821,7 @@ libdpkg_la_SOURCES = \ db-fsys-digest.c \ db-fsys-divert.c \ db-fsys-files.c \ + db-fsys-load.c \ db-fsys-override.c \ deb-version.c \ debug.c \ @@ -825,10 +830,11 @@ libdpkg_la_SOURCES = \ dump.c \ ehandle.c \ error.c \ + execname.c \ fdio.c \ file.c \ fields.c \ - fsys-dir.c\ + fsys-dir.c \ fsys-iter.c \ fsys-hash.c \ glob.c \ @@ -895,6 +901,7 @@ pkginclude_HEADERS = \ dpkg-db.h \ ehandle.h \ error.h \ + execname.h \ fdio.h \ file.h \ fsys.h \ @@ -1308,6 +1315,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db-fsys-digest.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db-fsys-divert.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db-fsys-files.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db-fsys-load.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db-fsys-override.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbdir.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbmodify.Plo@am__quote@ # am--include-marker @@ -1318,6 +1326,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dump.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehandle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execname.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fields.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ # am--include-marker @@ -1655,6 +1664,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/db-fsys-digest.Plo -rm -f ./$(DEPDIR)/db-fsys-divert.Plo -rm -f ./$(DEPDIR)/db-fsys-files.Plo + -rm -f ./$(DEPDIR)/db-fsys-load.Plo -rm -f ./$(DEPDIR)/db-fsys-override.Plo -rm -f ./$(DEPDIR)/dbdir.Plo -rm -f ./$(DEPDIR)/dbmodify.Plo @@ -1665,6 +1675,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/dump.Plo -rm -f ./$(DEPDIR)/ehandle.Plo -rm -f ./$(DEPDIR)/error.Plo + -rm -f ./$(DEPDIR)/execname.Plo -rm -f ./$(DEPDIR)/fdio.Plo -rm -f ./$(DEPDIR)/fields.Plo -rm -f ./$(DEPDIR)/file.Plo @@ -1812,6 +1823,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/db-fsys-digest.Plo -rm -f ./$(DEPDIR)/db-fsys-divert.Plo -rm -f ./$(DEPDIR)/db-fsys-files.Plo + -rm -f ./$(DEPDIR)/db-fsys-load.Plo -rm -f ./$(DEPDIR)/db-fsys-override.Plo -rm -f ./$(DEPDIR)/dbdir.Plo -rm -f ./$(DEPDIR)/dbmodify.Plo @@ -1822,6 +1834,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dump.Plo -rm -f ./$(DEPDIR)/ehandle.Plo -rm -f ./$(DEPDIR)/error.Plo + -rm -f ./$(DEPDIR)/execname.Plo -rm -f ./$(DEPDIR)/fdio.Plo -rm -f ./$(DEPDIR)/fields.Plo -rm -f ./$(DEPDIR)/file.Plo @@ -1968,6 +1981,10 @@ tap-clean: tap-check: $(test_data) $(test_programs) $(test_scripts) [ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir) $(TEST_ENV_VARS) \ + TEST_PARALLEL=$(TEST_PARALLEL) \ + TEST_VERBOSE=$(TEST_VERBOSE) \ + abs_srcdir=$(abs_srcdir) \ + abs_builddir=$(abs_builddir) \ abs_top_srcdir=$(abs_top_srcdir) \ abs_top_builddir=$(abs_top_builddir) \ srcdir=$(srcdir) builddir=$(builddir) \ diff --git a/lib/dpkg/buffer.c b/lib/dpkg/buffer.c index ed05f4b..3d4ed9e 100644 --- a/lib/dpkg/buffer.c +++ b/lib/dpkg/buffer.c @@ -184,7 +184,7 @@ buffer_copy(struct buffer_data *read_data, off_t bytesread = 0, byteswritten = 0; off_t totalread = 0, totalwritten = 0; - if ((limit != -1) && (limit < bufsize)) + if ((limit >= 0) && (limit < bufsize)) bufsize = limit; if (bufsize == 0) buf = NULL; @@ -202,7 +202,7 @@ buffer_copy(struct buffer_data *read_data, totalread += bytesread; - if (limit != -1) { + if (limit >= 0) { limit -= bytesread; if (limit < bufsize) bufsize = limit; @@ -267,7 +267,7 @@ buffer_skip(struct buffer_data *input, off_t limit, struct dpkg_error *err) switch (input->type) { case BUFFER_READ_FD: - if (lseek(input->arg.i, limit, SEEK_CUR) != -1) + if (lseek(input->arg.i, limit, SEEK_CUR) >= 0) return limit; if (errno != ESPIPE) return dpkg_put_errno(err, _("failed to seek")); diff --git a/lib/dpkg/command.c b/lib/dpkg/command.c index 18c917b..4831d13 100644 --- a/lib/dpkg/command.c +++ b/lib/dpkg/command.c @@ -247,7 +247,6 @@ command_in_path(const char *cmd) if (path_len) varbuf_add_char(&filename, '/'); varbuf_add_str(&filename, cmd); - varbuf_end_str(&filename); if (file_is_exec(filename.buf)) { varbuf_destroy(&filename); diff --git a/lib/dpkg/command.h b/lib/dpkg/command.h index 768aba4..b681d65 100644 --- a/lib/dpkg/command.h +++ b/lib/dpkg/command.h @@ -24,6 +24,7 @@ #include #include +#include DPKG_BEGIN_DECLS diff --git a/lib/dpkg/db-ctrl-access.c b/lib/dpkg/db-ctrl-access.c index c252336..9b788b1 100644 --- a/lib/dpkg/db-ctrl-access.c +++ b/lib/dpkg/db-ctrl-access.c @@ -73,7 +73,6 @@ pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin, pkgname = pkgbin_name(pkg, pkgbin, pnaw_never); varbuf_add_dir(&db_path, pkg_infodb_get_dir()); - varbuf_end_str(&db_path); varbuf_snapshot(&db_path, &db_path_state); db_dir = opendir(db_path.buf); @@ -108,7 +107,6 @@ pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin, varbuf_rollback(&db_path_state); varbuf_add_str(&db_path, db_de->d_name); - varbuf_end_str(&db_path); filename = db_path.buf; func(filename, filetype); diff --git a/lib/dpkg/db-ctrl-format.c b/lib/dpkg/db-ctrl-format.c index 34b5ff5..658130d 100644 --- a/lib/dpkg/db-ctrl-format.c +++ b/lib/dpkg/db-ctrl-format.c @@ -142,7 +142,6 @@ pkg_infodb_get_file(const struct pkginfo *pkg, const struct pkgbin *pkgbin, varbuf_add_archqual(&vb, pkgbin->arch); varbuf_add_char(&vb, '.'); varbuf_add_str(&vb, filetype); - varbuf_end_str(&vb); return vb.buf; } diff --git a/lib/dpkg/db-ctrl-upgrade.c b/lib/dpkg/db-ctrl-upgrade.c index 86f584b..6adffc5 100644 --- a/lib/dpkg/db-ctrl-upgrade.c +++ b/lib/dpkg/db-ctrl-upgrade.c @@ -81,7 +81,6 @@ pkg_infodb_link_multiarch_files(void) struct varbuf_state newname_state; varbuf_add_dir(&oldname, pkg_infodb_get_dir()); - varbuf_end_str(&oldname); varbuf_snapshot(&oldname, &oldname_state); varbuf_set_varbuf(&newname, &oldname); @@ -131,13 +130,11 @@ pkg_infodb_link_multiarch_files(void) varbuf_rollback(&oldname_state); varbuf_add_str(&oldname, db_de->d_name); - varbuf_end_str(&oldname); varbuf_rollback(&newname_state); varbuf_add_pkgbin_name(&newname, pkg, &pkg->installed, pnaw_always); varbuf_add_char(&newname, '.'); varbuf_add_str(&newname, filetype); - varbuf_end_str(&newname); if (link(oldname.buf, newname.buf) && errno != EEXIST) ohshite(_("error creating hard link '%.255s'"), diff --git a/lib/dpkg/db-fsys-divert.c b/lib/dpkg/db-fsys-divert.c index e0054bb..351e8ef 100644 --- a/lib/dpkg/db-fsys-divert.c +++ b/lib/dpkg/db-fsys-divert.c @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -40,78 +39,44 @@ #include static struct fsys_diversion *diversions = NULL; -static char *diversionsname; void ensure_diversions(void) { - static struct stat sb_prev; - struct stat sb_next; + static struct dpkg_db db = { + .name = DIVERSIONSFILE, + }; + enum dpkg_db_error rc; char linebuf[MAXDIVERTFILENAME]; - static FILE *file_prev; - FILE *file; struct fsys_diversion *ov, *oicontest, *oialtname; - if (diversionsname == NULL) - diversionsname = dpkg_db_get_path(DIVERSIONSFILE); - - onerr_abort++; - - file = fopen(diversionsname, "r"); - if (!file) { - if (errno != ENOENT) - ohshite(_("failed to open diversions file")); - } else { - setcloexec(fileno(file), diversionsname); - - if (fstat(fileno(file), &sb_next)) - ohshite(_("failed to fstat diversions file")); - - /* - * We need to keep the database file open so that the - * filesystem cannot reuse the inode number (f.ex. during - * multiple dpkg-divert invocations in a maintainer script), - * otherwise the following check might turn true, and we - * would skip reloading a modified database. - */ - if (file_prev && - sb_prev.st_dev == sb_next.st_dev && - sb_prev.st_ino == sb_next.st_ino) { - fclose(file); - onerr_abort--; - debug(dbg_general, "%s: same, skipping", __func__); - return; - } - sb_prev = sb_next; - } - if (file_prev) - fclose(file_prev); - file_prev = file; + rc = dpkg_db_reopen(&db); + if (rc == DPKG_DB_SAME) + return; for (ov = diversions; ov; ov = ov->next) { ov->useinstead->divert->camefrom->divert = NULL; ov->useinstead->divert = NULL; } diversions = NULL; - if (!file) { - onerr_abort--; - debug(dbg_general, "%s: none, resetting", __func__); + + if (rc == DPKG_DB_NONE) return; - } - debug(dbg_general, "%s: new, (re)loading", __func__); - while (fgets_checked(linebuf, sizeof(linebuf), file, diversionsname) >= 0) { + onerr_abort++; + + while (fgets_checked(linebuf, sizeof(linebuf), db.file, db.pathname) >= 0) { oicontest = nfmalloc(sizeof(*oicontest)); oialtname = nfmalloc(sizeof(*oialtname)); oialtname->camefrom = fsys_hash_find_node(linebuf, FHFF_NONE); oialtname->useinstead = NULL; - fgets_must(linebuf, sizeof(linebuf), file, diversionsname); + fgets_must(linebuf, sizeof(linebuf), db.file, db.pathname); oicontest->useinstead = fsys_hash_find_node(linebuf, FHFF_NONE); oicontest->camefrom = NULL; - fgets_must(linebuf, sizeof(linebuf), file, diversionsname); + fgets_must(linebuf, sizeof(linebuf), db.file, db.pathname); oicontest->pkgset = strcmp(linebuf, ":") ? pkg_hash_find_set(linebuf) : NULL; oialtname->pkgset = oicontest->pkgset; diff --git a/lib/dpkg/db-fsys-files.c b/lib/dpkg/db-fsys-files.c index 099cad3..3d7c4fc 100644 --- a/lib/dpkg/db-fsys-files.c +++ b/lib/dpkg/db-fsys-files.c @@ -70,6 +70,46 @@ enum pkg_filesdb_load_status { static enum pkg_filesdb_load_status saidread = PKG_FILESDB_LOAD_NONE; +static void +fsys_list_parse_buffer(struct varbuf *vb, struct pkginfo *pkg) +{ + struct fsys_namenode_list **files_tail; + char *loaded_list_end, *thisline; + + loaded_list_end = vb->buf + vb->used; + + files_tail = &pkg->files; + thisline = vb->buf; + + while (thisline < loaded_list_end) { + struct fsys_namenode *namenode; + char *nextline, *ptr; + + ptr = memchr(thisline, '\n', loaded_list_end - thisline); + if (ptr == NULL) + ohshit(_("files list file for package '%.250s' is missing final newline"), + pkg_name(pkg, pnaw_nonambig)); + + /* Where to start next time around. */ + nextline = ptr + 1; + + /* Strip trailing ‘/’. */ + if (ptr > thisline && ptr[-1] == '/') + ptr--; + + /* Add the file to the list. */ + if (ptr == thisline) + ohshit(_("files list file for package '%.250s' contains empty filename"), + pkg_name(pkg, pnaw_nonambig)); + *ptr = '\0'; + + namenode = fsys_hash_find_node(thisline, FHFF_NONE); + files_tail = pkg_files_add_file(pkg, namenode, files_tail); + + thisline = nextline; + } +} + /** * Load the list of files in this package into memory, or update the * list if it is there but stale. @@ -114,37 +154,8 @@ ensure_packagefiles_available(struct pkginfo *pkg) return; } - if (buf.used) { - struct fsys_namenode_list **lendp; - char *loaded_list_end, *thisline; - - loaded_list_end = buf.buf + buf.used; - - lendp = &pkg->files; - thisline = buf.buf; - while (thisline < loaded_list_end) { - struct fsys_namenode *namenode; - char *nextline, *ptr; - - ptr = memchr(thisline, '\n', loaded_list_end - thisline); - if (ptr == NULL) - ohshit(_("files list file for package '%.250s' is missing final newline"), - pkg_name(pkg, pnaw_nonambig)); - /* Where to start next time around. */ - nextline = ptr + 1; - /* Strip trailing ‘/’. */ - if (ptr > thisline && ptr[-1] == '/') ptr--; - /* Add the file to the list. */ - if (ptr == thisline) - ohshit(_("files list file for package '%.250s' contains empty filename"), - pkg_name(pkg, pnaw_nonambig)); - *ptr = '\0'; - - namenode = fsys_hash_find_node(thisline, FHFF_NONE); - lendp = pkg_files_add_file(pkg, namenode, lendp); - thisline = nextline; - } - } + if (buf.used) + fsys_list_parse_buffer(&buf, pkg); varbuf_destroy(&buf); @@ -236,7 +247,7 @@ pkg_files_optimize_load(struct pkg_array *array) listfile = pkg_infodb_get_file(pkg, &pkg->installed, LISTFILE); fd = open(listfile, O_RDONLY | O_NONBLOCK); - if (fd != -1) { + if (fd >= 0) { posix_fadvise(fd, 0, 0, POSIX_FADV_WILLNEED); close(fd); } diff --git a/lib/dpkg/db-fsys-load.c b/lib/dpkg/db-fsys-load.c new file mode 100644 index 0000000..c707f94 --- /dev/null +++ b/lib/dpkg/db-fsys-load.c @@ -0,0 +1,91 @@ +/* + * libdpkg - Debian packaging suite library routines + * db-fsys-load.c - (re)loading of database of files installed on system + * + * Copyright © 2008-2024 Guillem Jover + * Copyright © 2022 Simon Richter + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include + +enum dpkg_db_error +dpkg_db_reopen(struct dpkg_db *db) +{ + struct stat st_next; + FILE *file_next; + + if (db->pathname == NULL) + db->pathname = dpkg_db_get_path(db->name); + + onerr_abort++; + + file_next = fopen(db->pathname, "r"); + if (!file_next) { + if (errno != ENOENT) + ohshite(_("cannot open %s file"), db->pathname); + } else { + setcloexec(fileno(file_next), db->pathname); + + if (fstat(fileno(file_next), &st_next)) + ohshite(_("cannot get %s file metadata"), db->pathname); + + /* + * We need to keep the database file open so that the + * filesystem cannot reuse the inode number (f.ex. during + * multiple dpkg-divert invocations in a maintainer script), + * otherwise the following check might turn true, and we + * would skip reloading a modified database. + */ + if (db->file && + db->st.st_dev == st_next.st_dev && + db->st.st_ino == st_next.st_ino) { + fclose(file_next); + onerr_abort--; + + debug(dbg_general, "%s: unchanged %s, skipping", + __func__, db->pathname); + return DPKG_DB_SAME; + } + db->st = st_next; + } + if (db->file) + fclose(db->file); + db->file = file_next; + + onerr_abort--; + + if (db->file) { + debug(dbg_general, "%s: new %s, (re)loading", + __func__, db->pathname); + return DPKG_DB_LOAD; + } else { + debug(dbg_general, "%s: missing %s, resetting", + __func__, db->pathname); + return DPKG_DB_NONE; + } +} diff --git a/lib/dpkg/db-fsys-override.c b/lib/dpkg/db-fsys-override.c index b74f6cb..120bc3d 100644 --- a/lib/dpkg/db-fsys-override.c +++ b/lib/dpkg/db-fsys-override.c @@ -24,7 +24,6 @@ #include #include -#include #include #include @@ -41,8 +40,6 @@ #include #include -static char *statoverridename; - uid_t statdb_parse_uid(const char *str) { @@ -111,76 +108,44 @@ statdb_parse_mode(const char *str) void ensure_statoverrides(enum statdb_parse_flags flags) { - static struct stat sb_prev; - struct stat sb_next; - static FILE *file_prev; - FILE *file; + static struct dpkg_db db = { + .name = STATOVERRIDEFILE, + }; + enum dpkg_db_error rc; char *loaded_list, *loaded_list_end, *thisline, *nextline, *ptr; struct file_stat *fso; struct fsys_namenode *fnn; struct fsys_hash_iter *iter; - if (statoverridename == NULL) - statoverridename = dpkg_db_get_path(STATOVERRIDEFILE); + rc = dpkg_db_reopen(&db); + if (rc == DPKG_DB_SAME) + return; onerr_abort++; - file = fopen(statoverridename, "r"); - if (!file) { - if (errno != ENOENT) - ohshite(_("failed to open statoverride file")); - } else { - setcloexec(fileno(file), statoverridename); - - if (fstat(fileno(file), &sb_next)) - ohshite(_("failed to fstat statoverride file")); - - /* - * We need to keep the database file open so that the - * filesystem cannot reuse the inode number (f.ex. during - * multiple dpkg-statoverride invocations in a maintainer - * script), otherwise the following check might turn true, - * and we would skip reloading a modified database. - */ - if (file_prev && - sb_prev.st_dev == sb_next.st_dev && - sb_prev.st_ino == sb_next.st_ino) { - fclose(file); - onerr_abort--; - debug(dbg_general, "%s: same, skipping", __func__); - return; - } - sb_prev = sb_next; - } - if (file_prev) - fclose(file_prev); - file_prev = file; - /* Reset statoverride information. */ iter = fsys_hash_iter_new(); while ((fnn = fsys_hash_iter_next(iter))) fnn->statoverride = NULL; fsys_hash_iter_free(iter); - if (!file) { - onerr_abort--; - debug(dbg_general, "%s: none, resetting", __func__); + onerr_abort--; + + if (rc == DPKG_DB_NONE) return; - } - debug(dbg_general, "%s: new, (re)loading", __func__); /* If the statoverride list is empty we don't need to bother * reading it. */ - if (!sb_next.st_size) { - onerr_abort--; + if (!db.st.st_size) return; - } - loaded_list = m_malloc(sb_next.st_size); - loaded_list_end = loaded_list + sb_next.st_size; + onerr_abort++; + + loaded_list = m_malloc(db.st.st_size); + loaded_list_end = loaded_list + db.st.st_size; - if (fd_read(fileno(file), loaded_list, sb_next.st_size) < 0) - ohshite(_("reading statoverride file '%.250s'"), statoverridename); + if (fd_read(fileno(db.file), loaded_list, db.st.st_size) < 0) + ohshite(_("reading statoverride file '%.250s'"), db.pathname); thisline = loaded_list; while (thisline < loaded_list_end) { diff --git a/lib/dpkg/db-fsys.h b/lib/dpkg/db-fsys.h index a95b29d..2730dcd 100644 --- a/lib/dpkg/db-fsys.h +++ b/lib/dpkg/db-fsys.h @@ -22,6 +22,10 @@ #ifndef LIBDPKG_DB_FSYS_H #define LIBDPKG_DB_FSYS_H +#include + +#include + #include #include @@ -50,6 +54,28 @@ DPKG_BEGIN_DECLS struct pkginfo; struct pkgbin; +enum dpkg_db_error { + /** The database is new or has changed, should be loaded. */ + DPKG_DB_LOAD = 0, + /** No database file found. */ + DPKG_DB_NONE = -1, + /** The database is already loaded and has not changed. */ + DPKG_DB_SAME = -2, +}; + +struct dpkg_db { + /** Name of the database. Set by the caller. */ + const char *name; + + /* Database state members. */ + char *pathname; + FILE *file; + struct stat st; +}; + +enum dpkg_db_error +dpkg_db_reopen(struct dpkg_db *db); + void ensure_diversions(void); enum statdb_parse_flags { diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c index f38bece..cefbc9d 100644 --- a/lib/dpkg/dbmodify.c +++ b/lib/dpkg/dbmodify.c @@ -70,7 +70,8 @@ static int ulist_select(const struct dirent *de) { if (l > IMPORTANTMAXLEN) ohshit(_("updates directory contains file '%.250s' whose name is too long " "(length=%d, max=%d)"), de->d_name, l, IMPORTANTMAXLEN); - if (updateslength == -1) updateslength= l; + if (updateslength < 0) + updateslength = l; else if (l != updateslength) ohshit(_("updates directory contains files with different length names " "(both %d and %d)"), l, updateslength); @@ -85,7 +86,7 @@ static void cleanupdates(void) { updateslength= -1; cdn = scandir(updatesdir, &cdlist, &ulist_select, alphasort); - if (cdn == -1) { + if (cdn < 0) { if (errno == ENOENT) { if (cstatus >= msdbrw_write && dir_make_path(updatesdir, 0755) < 0) @@ -102,7 +103,6 @@ static void cleanupdates(void) { for (i=0; id_name); - varbuf_end_str(&updatefn); parsedb(updatefn.buf, pdb_parse_update, NULL); } @@ -112,7 +112,6 @@ static void cleanupdates(void) { for (i=0; id_name); - varbuf_end_str(&updatefn); if (unlink(updatefn.buf)) ohshite(_("failed to remove incorporated update file %.255s"), updatefn.buf); @@ -193,7 +192,6 @@ modstatdb_init(void) varbuf_init(&updatefn, strlen(updatesdir) + 1 + IMPORTANTMAXLEN); varbuf_add_dir(&updatefn, updatesdir); - varbuf_end_str(&updatefn); varbuf_snapshot(&updatefn, &updatefn_state); db_initialized = true; @@ -225,9 +223,9 @@ modstatdb_is_locked(void) int lockfd; bool locked; - if (dblockfd == -1) { + if (dblockfd < 0) { lockfd = open(lockfile, O_RDONLY); - if (lockfd == -1) { + if (lockfd < 0) { if (errno == ENOENT) return false; ohshite(_("unable to check lock file for dpkg database directory %s"), @@ -241,7 +239,7 @@ modstatdb_is_locked(void) /* We only close the file if there was no lock open, otherwise we would * release the existing lock on close. */ - if (dblockfd == -1) + if (dblockfd < 0) close(lockfd); return locked; @@ -255,7 +253,7 @@ modstatdb_can_lock(void) if (getenv("DPKG_FRONTEND_LOCKED") == NULL) { frontendlockfd = open(frontendlockfile, O_RDWR | O_CREAT | O_TRUNC, 0660); - if (frontendlockfd == -1) { + if (frontendlockfd < 0) { if (errno == EACCES || errno == EPERM) return false; else @@ -267,7 +265,7 @@ modstatdb_can_lock(void) } dblockfd = open(lockfile, O_RDWR | O_CREAT | O_TRUNC, 0660); - if (dblockfd == -1) { + if (dblockfd < 0) { if (errno == EACCES || errno == EPERM) return false; else @@ -285,7 +283,7 @@ modstatdb_lock(void) ohshit(_("you do not have permission to lock the dpkg database directory %s"), dpkg_db_get_dir()); - if (frontendlockfd != -1) + if (frontendlockfd >= 0) file_lock(&frontendlockfd, FILE_LOCK_NOWAIT, frontendlockfile, _("dpkg frontend lock")); file_lock(&dblockfd, FILE_LOCK_NOWAIT, lockfile, @@ -297,7 +295,7 @@ modstatdb_unlock(void) { /* Unlock. */ pop_cleanup(ehflag_normaltidy); - if (frontendlockfd != -1) + if (frontendlockfd >= 0) pop_cleanup(ehflag_normaltidy); dblockfd = -1; diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h index 61f2205..f223d74 100644 --- a/lib/dpkg/dpkg-db.h +++ b/lib/dpkg/dpkg-db.h @@ -77,12 +77,20 @@ struct arbitraryfield { const char *value; }; +enum DPKG_ATTR_ENUM_FLAGS conffile_flags { + /** No flags. */ + CONFFILE_NONE = 0, + /** The conffile is not shipped anymore in the new package. */ + CONFFILE_OBSOLETE = DPKG_BIT(0), + /** The conffile is marked to be removed during package upgrade. */ + CONFFILE_REMOVE_ON_UPGRADE = DPKG_BIT(1), +}; + struct conffile { struct conffile *next; const char *name; const char *hash; - bool obsolete; - bool remove_on_upgrade; + enum conffile_flags flags; }; struct archivedetails { diff --git a/lib/dpkg/dump.c b/lib/dpkg/dump.c index b27e5db..1883d3c 100644 --- a/lib/dpkg/dump.c +++ b/lib/dpkg/dump.c @@ -390,9 +390,9 @@ w_conffiles(struct varbuf *vb, varbuf_add_str(vb, i->name); varbuf_add_char(vb, ' '); varbuf_add_str(vb, i->hash); - if (i->obsolete) + if (i->flags & CONFFILE_OBSOLETE) varbuf_add_str(vb, " obsolete"); - if (i->remove_on_upgrade) + if (i->flags & CONFFILE_REMOVE_ON_UPGRADE) varbuf_add_str(vb, " remove-on-upgrade"); } if (flags&fw_printheader) @@ -484,9 +484,8 @@ write_stanza(FILE *file, const char *filename, struct varbuf vb = VARBUF_INIT; varbuf_stanza(&vb, pkg, pkgbin); - varbuf_end_str(&vb); - if (fputs(vb.buf, file) < 0) + if (fputs(varbuf_str(&vb), file) < 0) ohshite(_("failed to write details of '%.50s' to '%.250s'"), pkgbin_name_const(pkg, pkgbin, pnaw_nonambig), filename); @@ -524,8 +523,7 @@ writedb_stanzas(FILE *fp, const char *filename, enum writedb_flags flags) varbuf_stanza(&vb, pkg, pkgbin); varbuf_add_char(&vb, '\n'); - varbuf_end_str(&vb); - if (fputs(vb.buf, fp) < 0) + if (fputs(varbuf_str(&vb), fp) < 0) ohshite(_("failed to write %s database stanza about '%s' to '%s'"), which, pkgbin_name(pkg, pkgbin, pnaw_nonambig), filename); varbuf_reset(&vb); diff --git a/lib/dpkg/execname.c b/lib/dpkg/execname.c new file mode 100644 index 0000000..6529fcf --- /dev/null +++ b/lib/dpkg/execname.c @@ -0,0 +1,166 @@ +/* + * libdpkg - Debian packaging suite library routines + * execname.c - executable name handling functions + * + * Copyright © 2024 Guillem Jover + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_SYSCTL_H +#include +#endif +#if defined(_AIX) && defined(HAVE_SYS_PROCFS_H) +#include +#endif + +#include +#include +#include +#include +#include + +#if defined(__APPLE__) && defined(__MACH__) +#include +#endif + +#include +#include +#include + +#if defined(_AIX) && defined(HAVE_STRUCT_PSINFO) +static bool +proc_get_psinfo(pid_t pid, struct psinfo *psinfo) +{ + char filename[64]; + FILE *fp; + + sprintf(filename, "/proc/%d/psinfo", pid); + fp = fopen(filename, "r"); + if (!fp) + return false; + if (fread(psinfo, sizeof(*psinfo), 1, fp) == 0) { + fclose(fp); + return false; + } + if (ferror(fp)) { + fclose(fp); + return false; + } + + fclose(fp); + + return true; +} +#endif + +/** + * Get the executable name for a PID. + * + * Tries to obtain the executable name or process name for a specific PID, + * if the executable name cannot be obtained then it will return NULL. + * + * @return A pointer to an allocated string with the executable name, or NULL. + */ +char * +dpkg_get_pid_execname(pid_t pid) +{ + const char *execname = NULL; +#if defined(__linux__) + char lname[32]; + char lcontents[_POSIX_PATH_MAX + 1]; + int nread; + + sprintf(lname, "/proc/%d/exe", pid); + nread = readlink(lname, lcontents, sizeof(lcontents) - 1); + if (nread == -1) + return NULL; + + lcontents[nread] = '\0'; + execname = lcontents; +#elif defined(__GNU__) + struct proc_stat *ps; + + ps = get_proc_stat(pid, PSTAT_ARGS); + if (ps == NULL) + return NULL; + + /* On old Hurd systems we have to use the argv[0] value, because + * there is nothing better. */ + execname = proc_stat_args(ps); + +#ifdef PSTAT_EXE + /* On new Hurd systems we can use the correct value, as long + * as it's not NULL nor empty, as it was the case on the first + * implementation. */ + if (proc_stat_set_flags(ps, PSTAT_EXE) == 0 && + proc_stat_flags(ps) & PSTAT_EXE && + proc_stat_exe(ps) != NULL && + proc_stat_exe(ps)[0] != '\0') + execname = proc_stat_exe(ps); +#endif +#elif defined(__sun) + char filename[64]; + struct varbuf vb = VARBUF_INIT; + + sprintf(filename, "/proc/%d/execname", pid); + if (file_slurp(filename, &vb, NULL) < 0) + return NULL; + + return varbuf_detach(&vb); +#elif defined(__APPLE__) && defined(__MACH__) + char pathname[_POSIX_PATH_MAX]; + + if (proc_pidpath(pid, pathname, sizeof(pathname)) < 0) + return NULL; + + execname = pathname; +#elif defined(_AIX) && defined(HAVE_STRUCT_PSINFO) + char filename[64]; + struct psinfo psi; + + sprintf(filename, "/proc/%d/psinfo", pid); + if (!proc_get_psinfo(pid, &psi)) + return NULL; + + execname = psi.pr_fname; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + int error, mib[4]; + size_t len; + char pathname[PATH_MAX]; + + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PATHNAME; + mib[3] = pid; + len = sizeof(pathname); + + error = sysctl(mib, 4, pathname, &len, NULL, 0); + if (error != 0 && errno != ESRCH) + return NULL; + if (len == 0) + pathname[0] = '\0'; + execname = pathname; +#else + return execname; +#endif + + return m_strdup(execname); +} diff --git a/lib/dpkg/execname.h b/lib/dpkg/execname.h new file mode 100644 index 0000000..f82efc3 --- /dev/null +++ b/lib/dpkg/execname.h @@ -0,0 +1,43 @@ +/* + * libdpkg - Debian packaging suite library routines + * execname.h - executable name handling functions + * + * Copyright © 2024 Guillem Jover + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef LIBDPKG_EXECNAME_H +#define LIBDPKG_EXECNAME_H + +#include + +#include + +DPKG_BEGIN_DECLS + +/** + * @defgroup execname Executable name handling + * @ingroup dpkg-public + * @{ + */ + +char * +dpkg_get_pid_execname(pid_t pid); + +/** @} */ + +DPKG_END_DECLS + +#endif diff --git a/lib/dpkg/fdio.c b/lib/dpkg/fdio.c index b50322b..075fb41 100644 --- a/lib/dpkg/fdio.c +++ b/lib/dpkg/fdio.c @@ -22,10 +22,12 @@ #include #include +#include #include #include #include +#include ssize_t fd_read(int fd, void *buf, size_t len) @@ -33,11 +35,14 @@ fd_read(int fd, void *buf, size_t len) ssize_t total = 0; char *ptr = buf; + if (len > SSIZE_MAX) + internerr("len=%zu exceeds SSIZE_MAX=%zd", len, SSIZE_MAX); + while (len > 0) { ssize_t n; n = read(fd, ptr + total, len); - if (n == -1) { + if (n < 0) { if (errno == EINTR || errno == EAGAIN) continue; return total ? -total : n; @@ -58,11 +63,14 @@ fd_write(int fd, const void *buf, size_t len) ssize_t total = 0; const char *ptr = buf; + if (len > SSIZE_MAX) + internerr("len=%zu exceeds SSIZE_MAX=%zd", len, SSIZE_MAX); + while (len > 0) { ssize_t n; n = write(fd, ptr + total, len); - if (n == -1) { + if (n < 0) { if (errno == EINTR || errno == EAGAIN) continue; return total ? -total : n; diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c index e62b7b5..efcfb26 100644 --- a/lib/dpkg/fields.c +++ b/lib/dpkg/fields.c @@ -363,7 +363,7 @@ f_conffiles(struct pkginfo *pkg, struct pkgbin *pkgbin, const char *endent, *endfn, *hashstart; char *newptr; int c, namelen, hashlen; - bool obsolete, remove_on_upgrade; + int flags = CONFFILE_NONE; c= *value++; if (c == '\n') continue; @@ -375,18 +375,21 @@ f_conffiles(struct pkginfo *pkg, struct pkgbin *pkgbin, conffvalue_lastword(value, endent, endent, &hashstart, &hashlen, &endfn, ps); - remove_on_upgrade = (hashlen == sizeof(remove_on_upgrade_str) - 1 && - memcmp(hashstart, remove_on_upgrade_str, hashlen) == 0); - if (remove_on_upgrade) + if (hashlen == sizeof(remove_on_upgrade_str) - 1 && + memcmp(hashstart, remove_on_upgrade_str, hashlen) == 0) { + flags |= CONFFILE_REMOVE_ON_UPGRADE; conffvalue_lastword(value, endfn, endent, &hashstart, &hashlen, &endfn, ps); + } - obsolete= (hashlen == sizeof(obsolete_str)-1 && - memcmp(hashstart, obsolete_str, hashlen) == 0); - if (obsolete) + if (hashlen == sizeof(obsolete_str) - 1 && + memcmp(hashstart, obsolete_str, hashlen) == 0) { + flags |= CONFFILE_OBSOLETE; conffvalue_lastword(value, endfn, endent, &hashstart, &hashlen, &endfn, ps); + } + newlink = nfmalloc(sizeof(*newlink)); value = path_skip_slash_dotslash(value); namelen= (int)(endfn-value); @@ -403,8 +406,7 @@ f_conffiles(struct pkginfo *pkg, struct pkgbin *pkgbin, memcpy(newptr, hashstart, hashlen); newptr[hashlen] = '\0'; newlink->hash= newptr; - newlink->obsolete= obsolete; - newlink->remove_on_upgrade = remove_on_upgrade; + newlink->flags = flags; newlink->next =NULL; *lastp= newlink; lastp= &newlink->next; @@ -571,9 +573,9 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin, dop->verrel = DPKG_RELATION_EQ; } if ((dop->verrel != DPKG_RELATION_EQ) && (fip->integer == dep_provides)) - parse_warn(ps, - _("only exact versions may be used for '%s' field"), - fip->name); + parse_lax_problem(ps, pdb_lax_stanza_parser, + _("only exact versions may be used for '%s' field"), + fip->name); if (!c_isspace(*p) && !c_isalnum(*p)) { parse_warn(ps, diff --git a/lib/dpkg/file.c b/lib/dpkg/file.c index 0da51d6..f664feb 100644 --- a/lib/dpkg/file.c +++ b/lib/dpkg/file.c @@ -35,6 +35,21 @@ #include #include #include +#include + +/** + * Get the current working directory. + * + */ +void +file_getcwd(struct varbuf *cwd) +{ + varbuf_reset(cwd); + varbuf_grow(cwd, 64); + while (getcwd(cwd->buf, cwd->size) == NULL) + varbuf_grow(cwd, cwd->size * 2); + varbuf_trunc(cwd, strlen(cwd->buf)); +} /** * Read the symlink content into a varbuf. @@ -49,8 +64,10 @@ file_readlink(const char *slink, struct varbuf *content, size_t content_len) varbuf_grow(content, content_len + 1); linksize = readlink(slink, content->buf, content->size); + if (linksize < 0) + return linksize; + varbuf_trunc(content, linksize); - varbuf_end_str(content); return linksize; } @@ -85,17 +102,17 @@ file_copy_perms(const char *src, const char *dst) { struct stat stab; - if (stat(src, &stab) == -1) { + if (stat(src, &stab) < 0) { if (errno == ENOENT) return; ohshite(_("unable to stat source file '%.250s'"), src); } - if (chown(dst, stab.st_uid, stab.st_gid) == -1) + if (chown(dst, stab.st_uid, stab.st_gid) < 0) ohshite(_("unable to change ownership of target file '%.250s'"), dst); - if (chmod(dst, (stab.st_mode & ~S_IFMT)) == -1) + if (chmod(dst, (stab.st_mode & ~S_IFMT)) < 0) ohshite(_("unable to set mode of target file '%.250s'"), dst); } @@ -115,10 +132,10 @@ file_slurp_fd(int fd, const char *filename, struct varbuf *vb, if (st.st_size == 0) return 0; - varbuf_init(vb, st.st_size); + varbuf_init(vb, st.st_size + 1); if (fd_read(fd, vb->buf, st.st_size) < 0) return dpkg_put_errno(err, _("cannot read %s"), filename); - vb->used = st.st_size; + varbuf_trunc(vb, st.st_size); return 0; } @@ -165,7 +182,7 @@ file_unlock(int lockfd, const char *lockfile, const char *lockdesc) file_lock_setup(&fl, F_UNLCK); - if (fcntl(lockfd, F_SETLK, &fl) == -1) + if (fcntl(lockfd, F_SETLK, &fl) < 0) ohshite(_("unable to unlock %s"), lockdesc); } @@ -192,7 +209,7 @@ file_is_locked(int lockfd, const char *filename) file_lock_setup(&fl, F_WRLCK); - if (fcntl(lockfd, F_GETLK, &fl) == -1) + if (fcntl(lockfd, F_GETLK, &fl) < 0) ohshit(_("unable to check file '%s' lock status"), filename); if (fl.l_type == F_WRLCK && fl.l_pid != getpid()) @@ -226,8 +243,9 @@ file_lock(int *lockfd, enum file_lock_flags flags, const char *filename, else lock_cmd = F_SETLK; - if (fcntl(*lockfd, lock_cmd, &fl) == -1) { + if (fcntl(*lockfd, lock_cmd, &fl) < 0) { const char *warnmsg; + char *execname; if (errno != EACCES && errno != EAGAIN) ohshite(_("unable to lock %s"), desc); @@ -238,12 +256,15 @@ file_lock(int *lockfd, enum file_lock_flags flags, const char *filename, "See ."); file_lock_setup(&fl, F_WRLCK); - if (fcntl(*lockfd, F_GETLK, &fl) == -1) + if (fcntl(*lockfd, F_GETLK, &fl) < 0) ohshit(_("%s was locked by another process\n%s"), desc, warnmsg); - ohshit(_("%s was locked by another process with pid %d\n%s"), - desc, fl.l_pid, warnmsg); + execname = dpkg_get_pid_execname(fl.l_pid); + + ohshit(_("%s was locked by %s process with pid %d\n%s"), + desc, execname ? execname : C_("process", ""), + fl.l_pid, warnmsg); } push_cleanup(file_unlock_cleanup, ~0, 3, lockfd, filename, desc); diff --git a/lib/dpkg/file.h b/lib/dpkg/file.h index c1c25fa..f5bc50d 100644 --- a/lib/dpkg/file.h +++ b/lib/dpkg/file.h @@ -48,6 +48,9 @@ struct file_stat { char *gname; }; +void +file_getcwd(struct varbuf *cwd); + ssize_t file_readlink(const char *slink, struct varbuf *content, size_t content_len); diff --git a/lib/dpkg/i18n.c b/lib/dpkg/i18n.c index 30e28bf..7313bbb 100644 --- a/lib/dpkg/i18n.c +++ b/lib/dpkg/i18n.c @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include #ifdef HAVE_USELOCALE @@ -30,10 +34,27 @@ static locale_t dpkg_C_locale; #endif +static bool +dpkg_use_nls(void) +{ + const char *env; + + /* We mimic the behavior of the Dpkg::Gettext perl module. */ + env = getenv("DPKG_NLS"); + if (env == NULL) + return true; + + if (strcmp(env, "0") == 0 || env[0] == '\0') + return false; + + return true; +} + void dpkg_locales_init(const char *package) { - setlocale(LC_ALL, ""); + if (dpkg_use_nls()) + setlocale(LC_ALL, ""); bindtextdomain(package, LOCALEDIR); textdomain(package); diff --git a/lib/dpkg/libdpkg.map b/lib/dpkg/libdpkg.map index b7bedef..3b29ad4 100644 --- a/lib/dpkg/libdpkg.map +++ b/lib/dpkg/libdpkg.map @@ -30,6 +30,9 @@ global: dpkg_ar_normalize_name; dpkg_ar_member_is_illegal; + # Process information + dpkg_get_pid_execname; + local: *; }; @@ -114,6 +117,7 @@ LIBDPKG_PRIVATE { varbuf_reset; varbuf_grow; varbuf_trunc; + varbuf_str; varbuf_set_varbuf; varbuf_set_buf; varbuf_add_varbuf; @@ -122,8 +126,10 @@ LIBDPKG_PRIVATE { varbuf_map_char; varbuf_add_buf; varbuf_add_dir; - varbuf_get_str; - varbuf_end_str; + varbuf_has_prefix; + varbuf_has_suffix; + varbuf_trim_varbuf_prefix; + varbuf_trim_char_prefix; varbuf_printf; varbuf_vprintf; varbuf_detach; @@ -161,6 +167,7 @@ LIBDPKG_PRIVATE { treewalk_close; treewalk; + file_getcwd; file_readlink; file_is_exec; file_copy_perms; diff --git a/lib/dpkg/log.c b/lib/dpkg/log.c index 10a33a2..b416e22 100644 --- a/lib/dpkg/log.c +++ b/lib/dpkg/log.c @@ -74,7 +74,6 @@ log_message(const char *fmt, ...) varbuf_add_char(&log, ' '); varbuf_vprintf(&log, fmt, args); varbuf_add_char(&log, '\n'); - varbuf_end_str(&log); va_end(args); if (fd_write(logfd, log.buf, log.used) < 0) diff --git a/lib/dpkg/mustlib.c b/lib/dpkg/mustlib.c index 52d9752..df1a91a 100644 --- a/lib/dpkg/mustlib.c +++ b/lib/dpkg/mustlib.c @@ -141,8 +141,8 @@ setcloexec(int fd, const char *fn) int f; f = fcntl(fd, F_GETFD); - if (f == -1) + if (f < 0) ohshite(_("unable to read filedescriptor flags for %.250s"),fn); - if (fcntl(fd, F_SETFD, (f|FD_CLOEXEC))==-1) + if (fcntl(fd, F_SETFD, (f | FD_CLOEXEC)) < 0) ohshite(_("unable to set close-on-exec flag for %.250s"),fn); } diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c index 96af147..da99624 100644 --- a/lib/dpkg/parse.c +++ b/lib/dpkg/parse.c @@ -555,7 +555,7 @@ parsedb_open(const char *filename, enum parsedbflags flags) return parsedb_new(filename, STDIN_FILENO, flags); fd = open(filename, O_RDONLY); - if (fd == -1 && !(errno == ENOENT && (flags & pdb_allow_empty))) + if (fd < 0 && !(errno == ENOENT && (flags & pdb_allow_empty))) ohshite(_("failed to open package info file '%.255s' for reading"), filename); @@ -577,7 +577,7 @@ parsedb_load(struct parsedb_state *ps) if (ps->fd < 0 && (ps->flags & pdb_allow_empty)) return; - if (fstat(ps->fd, &st) == -1) + if (fstat(ps->fd, &st) < 0) ohshite(_("can't stat package info file '%.255s'"), ps->filename); if (S_ISFIFO(st.st_mode)) { @@ -589,7 +589,6 @@ parsedb_load(struct parsedb_state *ps) if (size < 0) ohshit(_("reading package info file '%s': %s"), ps->filename, err.str); - varbuf_end_str(&buf); ps->dataptr = varbuf_detach(&buf); ps->endptr = ps->dataptr + size; @@ -685,14 +684,10 @@ parse_stanza(struct parsedb_state *ps, struct field_state *fs, fs->valuestart = ps->dataptr - 1; for (;;) { if (c == '\n' || c == MSDOS_EOF_CHAR) { - if (blank_line) { - if (ps->flags & pdb_lax_stanza_parser) - parse_warn(ps, _("blank line in value of field '%.*s'"), - fs->fieldlen, fs->fieldstart); - else - parse_error(ps, _("blank line in value of field '%.*s'"), - fs->fieldlen, fs->fieldstart); - } + if (blank_line) + parse_lax_problem(ps, pdb_lax_stanza_parser, + _("blank line in value of field '%.*s'"), + fs->fieldlen, fs->fieldstart); ps->lno++; if (parse_at_eof(ps)) diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h index c43da7f..21076cc 100644 --- a/lib/dpkg/parsedump.h +++ b/lib/dpkg/parsedump.h @@ -23,6 +23,7 @@ #ifndef LIBDPKG_PARSEDUMP_H #define LIBDPKG_PARSEDUMP_H +#include #include #include @@ -160,6 +161,10 @@ void parse_error(struct parsedb_state *ps, const char *fmt, ...) void parse_warn(struct parsedb_state *ps, const char *fmt, ...) DPKG_ATTR_PRINTF(2); void +parse_lax_problem(struct parsedb_state *ps, enum parsedbflags flags_lax, + const char *fmt, ...) + DPKG_ATTR_PRINTF(3); +void parse_problem(struct parsedb_state *ps, const char *fmt, ...) DPKG_ATTR_PRINTF(2); diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c index 63a36f5..a999b5e 100644 --- a/lib/dpkg/parsehelp.c +++ b/lib/dpkg/parsehelp.c @@ -79,6 +79,23 @@ parse_warn(struct parsedb_state *ps, const char *fmt, ...) va_end(args); } +void +parse_lax_problem(struct parsedb_state *ps, enum parsedbflags flags_lax, + const char *fmt, ...) +{ + va_list args; + const char *str; + + va_start(args, fmt); + str = parse_error_msg(ps, fmt, args); + va_end(args); + + if (ps->flags & flags_lax) + warning("%s", str); + else + ohshit("%s", str); +} + void parse_problem(struct parsedb_state *ps, const char *fmt, ...) { @@ -183,7 +200,6 @@ const char *versiondescribe vb= &bufs[bufnum]; bufnum++; if (bufnum == 10) bufnum= 0; varbuf_reset(vb); varbufversion(vb,version,vdew); - varbuf_end_str(vb); return vb->buf; } diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c index b984012..846eb29 100644 --- a/lib/dpkg/pkg-format.c +++ b/lib/dpkg/pkg-format.c @@ -361,7 +361,6 @@ virt_source_upstream_version(struct varbuf *vb, if (version.version) varbuf_add_str(vb, version.version); - varbuf_end_str(vb); } static const struct fieldinfo virtinfos[] = { @@ -428,8 +427,7 @@ pkg_format_print(struct varbuf *vb, const struct pkg_format_node *head, if (fip) { fip->wcall(&wb, pkg, pkgbin, 0, fip); - varbuf_end_str(&wb); - pkg_format_item(&fb, node, wb.buf); + pkg_format_item(&fb, node, varbuf_str(&wb)); varbuf_reset(&wb); ok = true; } else { @@ -449,8 +447,7 @@ pkg_format_print(struct varbuf *vb, const struct pkg_format_node *head, if ((width != 0) && (len > width)) len = width; - varbuf_add_buf(vb, fb.buf, len); - varbuf_end_str(vb); + varbuf_add_buf(vb, varbuf_str(&fb), len); } varbuf_reset(&fb); diff --git a/lib/dpkg/pkg-format.h b/lib/dpkg/pkg-format.h index 40d41ff..ee4e7b1 100644 --- a/lib/dpkg/pkg-format.h +++ b/lib/dpkg/pkg-format.h @@ -21,6 +21,8 @@ #ifndef LIBDPKG_PKG_FORMAT_H #define LIBDPKG_PKG_FORMAT_H +#include + #include #include #include diff --git a/lib/dpkg/pkg-show.c b/lib/dpkg/pkg-show.c index 038343c..1782686 100644 --- a/lib/dpkg/pkg-show.c +++ b/lib/dpkg/pkg-show.c @@ -80,7 +80,6 @@ varbuf_add_pkgbin_name(struct varbuf *vb, varbuf_add_str(vb, pkg->set->name); if (pkgbin_name_needs_arch(pkgbin, pnaw)) varbuf_add_archqual(vb, pkgbin->arch); - varbuf_end_str(vb); } const char * @@ -395,7 +394,7 @@ pkg_sorter_by_nonambig_name_arch(const void *a, const void *b) * Add a string representation of the source package version to a varbuf. * * It parses the Source field (if present), and extracts the optional - * version enclosed in parenthesis. Otherwise it fallsback to use the + * version enclosed in parenthesis. Otherwise it falls back to use the * binary package version. It NUL terminates the varbuf. * * @param vb The varbuf struct to modify. @@ -410,7 +409,6 @@ varbuf_add_source_version(struct varbuf *vb, pkg_source_version(&version, pkg, pkgbin); varbufversion(vb, &version, vdew_nonambig); - varbuf_end_str(vb); } void @@ -434,11 +432,10 @@ pkg_source_version(struct dpkg_version *version, version_str++; len = strcspn(version_str, ")"); varbuf_add_buf(&vb, version_str, len); - varbuf_end_str(&vb); - if (parseversion(version, vb.buf, &err) < 0) + if (parseversion(version, varbuf_str(&vb), &err) < 0) ohshit(_("version '%s' has bad syntax: %s"), - vb.buf, err.str); + varbuf_str(&vb), err.str); varbuf_destroy(&vb); } diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c index 7b3fb99..e91bb62 100644 --- a/lib/dpkg/subproc.c +++ b/lib/dpkg/subproc.c @@ -104,7 +104,7 @@ subproc_fork(void) pid_t pid; pid = fork(); - if (pid == -1) { + if (pid < 0) { onerr_abort++; ohshite(_("fork failed")); } @@ -169,7 +169,7 @@ subproc_wait(pid_t pid, const char *desc) pid_t dead_pid; int status; - while ((dead_pid = waitpid(pid, &status, 0)) == -1 && errno == EINTR) ; + while ((dead_pid = waitpid(pid, &status, 0)) < 0 && errno == EINTR) ; if (dead_pid != pid) { onerr_abort++; diff --git a/lib/dpkg/t/c-tarextract.c b/lib/dpkg/t/c-tarextract.c index 82a8dab..c68b5d2 100644 --- a/lib/dpkg/t/c-tarextract.c +++ b/lib/dpkg/t/c-tarextract.c @@ -22,10 +22,10 @@ #include #include -#if HAVE_SYS_SYSMACROS_H +#ifdef HAVE_SYS_SYSMACROS_H #include /* Needed on AIX for major()/minor(). */ #endif -#if HAVE_SYS_MKDEV_H +#ifdef HAVE_SYS_MKDEV_H #include /* Needed on Solaris for major()/minor(). */ #endif diff --git a/lib/dpkg/t/t-arch.c b/lib/dpkg/t/t-arch.c index d0b5735..f2f7c7f 100644 --- a/lib/dpkg/t/t-arch.c +++ b/lib/dpkg/t/t-arch.c @@ -170,23 +170,19 @@ test_dpkg_arch_varbuf_archqual(void) struct varbuf vb = VARBUF_INIT; varbuf_add_archqual(&vb, dpkg_arch_get(DPKG_ARCH_NONE)); - varbuf_end_str(&vb); - test_str(vb.buf, ==, ""); + test_str(varbuf_str(&vb), ==, ""); varbuf_reset(&vb); varbuf_add_archqual(&vb, dpkg_arch_get(DPKG_ARCH_EMPTY)); - varbuf_end_str(&vb); - test_str(vb.buf, ==, ""); + test_str(varbuf_str(&vb), ==, ""); varbuf_reset(&vb); varbuf_add_archqual(&vb, dpkg_arch_get(DPKG_ARCH_ALL)); - varbuf_end_str(&vb); - test_str(vb.buf, ==, ":all"); + test_str(varbuf_str(&vb), ==, ":all"); varbuf_reset(&vb); varbuf_add_archqual(&vb, dpkg_arch_get(DPKG_ARCH_WILDCARD)); - varbuf_end_str(&vb); - test_str(vb.buf, ==, ":any"); + test_str(varbuf_str(&vb), ==, ":any"); varbuf_reset(&vb); varbuf_destroy(&vb); diff --git a/lib/dpkg/t/t-file.c b/lib/dpkg/t/t-file.c index 0004df4..16114f0 100644 --- a/lib/dpkg/t/t-file.c +++ b/lib/dpkg/t/t-file.c @@ -39,6 +39,20 @@ static const char ref_data[] = "containing multiple lines\n" ; +static void +test_file_getcwd(void) +{ + char *env; + struct varbuf cwd = VARBUF_INIT; + + env = getenv("abs_builddir"); + file_getcwd(&cwd); + + test_str(env, ==, cwd.buf); + + varbuf_destroy(&cwd); +} + static void test_file_slurp(void) { @@ -100,7 +114,8 @@ test_file_slurp(void) TEST_ENTRY(test) { - test_plan(32); + test_plan(33); + test_file_getcwd(); test_file_slurp(); } diff --git a/lib/dpkg/t/t-pkg-format.c b/lib/dpkg/t/t-pkg-format.c index 81e7ddb..c3afe1c 100644 --- a/lib/dpkg/t/t-pkg-format.c +++ b/lib/dpkg/t/t-pkg-format.c @@ -63,7 +63,7 @@ test_field(struct pkginfo *pkg, const char *fmt, const char *exp) head = pkg_format_parse(fmt, NULL); test_pass(head); pkg_format_print(&vb, head, pkg, &pkg->installed); - test_str(vb.buf, ==, exp); + test_str(varbuf_str(&vb), ==, exp); pkg_format_free(head); varbuf_destroy(&vb); } diff --git a/lib/dpkg/t/t-subproc.c b/lib/dpkg/t/t-subproc.c index 7ce610b..8846d90 100644 --- a/lib/dpkg/t/t-subproc.c +++ b/lib/dpkg/t/t-subproc.c @@ -62,13 +62,13 @@ test_subproc_fork(void) if (pid == 0) raise(SIGINT); ret = subproc_reap(pid, "subproc signal", SUBPROC_WARN); - test_pass(ret == -1); + test_pass(ret < 0); pid = subproc_fork(); if (pid == 0) raise(SIGTERM); ret = subproc_reap(pid, "subproc signal", SUBPROC_WARN); - test_pass(ret == -1); + test_pass(ret < 0); pid = subproc_fork(); if (pid == 0) @@ -81,7 +81,7 @@ test_subproc_fork(void) if (pid == 0) raise(SIGPIPE); ret = subproc_reap(pid, "subproc SIGPIPE", SUBPROC_WARN); - test_pass(ret == -1); + test_pass(ret < 0); } TEST_ENTRY(test) diff --git a/lib/dpkg/t/t-varbuf.c b/lib/dpkg/t/t-varbuf.c index 08998a5..1ab1cf2 100644 --- a/lib/dpkg/t/t-varbuf.c +++ b/lib/dpkg/t/t-varbuf.c @@ -238,19 +238,15 @@ test_varbuf_add_str(void) varbuf_init(&vb, 5); varbuf_add_str(&vb, "1234567890"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "1234567890"); varbuf_add_str(&vb, "abcd"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "1234567890abcd"); varbuf_add_strn(&vb, "1234567890", 5); - varbuf_end_str(&vb); test_str(vb.buf, ==, "1234567890abcd12345"); varbuf_add_strn(&vb, "abcd", 0); - varbuf_end_str(&vb); test_str(vb.buf, ==, "1234567890abcd12345"); varbuf_destroy(&vb); @@ -331,34 +327,26 @@ test_varbuf_add_dir(void) varbuf_init(&vb, 10); varbuf_add_dir(&vb, ""); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/"); varbuf_add_dir(&vb, ""); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/"); varbuf_add_dir(&vb, "aa"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/aa/"); varbuf_add_dir(&vb, ""); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/aa/"); varbuf_reset(&vb); varbuf_add_dir(&vb, "/foo/bar"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/foo/bar/"); varbuf_reset(&vb); varbuf_add_dir(&vb, "/foo/bar/"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/foo/bar/"); varbuf_add_dir(&vb, "quux"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/foo/bar/quux/"); varbuf_add_dir(&vb, "zoo"); - varbuf_end_str(&vb); test_str(vb.buf, ==, "/foo/bar/quux/zoo/"); varbuf_destroy(&vb); @@ -378,7 +366,6 @@ test_varbuf_end_str(void) varbuf_trunc(&vb, 10); - varbuf_end_str(&vb); test_pass(vb.used == 10); test_pass(vb.size >= vb.used + 1); test_pass(vb.buf[10] == '\0'); @@ -388,7 +375,7 @@ test_varbuf_end_str(void) } static void -test_varbuf_get_str(void) +test_varbuf_str(void) { struct varbuf vb; const char *str; @@ -396,7 +383,7 @@ test_varbuf_get_str(void) varbuf_init(&vb, 10); varbuf_add_buf(&vb, "1234567890", 10); - str = varbuf_get_str(&vb); + str = varbuf_str(&vb); test_pass(vb.buf == str); test_pass(vb.used == 10); test_pass(vb.buf[vb.used] == '\0'); @@ -405,7 +392,7 @@ test_varbuf_get_str(void) test_str(str, ==, "1234567890"); varbuf_add_buf(&vb, "abcde", 5); - str = varbuf_get_str(&vb); + str = varbuf_str(&vb); test_pass(vb.buf == str); test_pass(vb.used == 15); test_pass(vb.buf[vb.used] == '\0'); @@ -416,6 +403,73 @@ test_varbuf_get_str(void) varbuf_destroy(&vb); } +static void +test_varbuf_has(void) +{ + struct varbuf vb = VARBUF_OBJECT; + struct varbuf vb_prefix = VARBUF_OBJECT; + struct varbuf vb_suffix = VARBUF_OBJECT; + + test_pass(varbuf_has_prefix(&vb, &vb_prefix)); + test_pass(varbuf_has_suffix(&vb, &vb_suffix)); + + varbuf_set_str(&vb_prefix, "prefix"); + varbuf_set_str(&vb_suffix, "suffix"); + + test_fail(varbuf_has_prefix(&vb, &vb_prefix)); + test_fail(varbuf_has_suffix(&vb, &vb_suffix)); + + varbuf_set_str(&vb, "prefix and some text"); + test_pass(varbuf_has_prefix(&vb, &vb_prefix)); + test_fail(varbuf_has_prefix(&vb, &vb_suffix)); + test_fail(varbuf_has_suffix(&vb, &vb_prefix)); + test_fail(varbuf_has_suffix(&vb, &vb_suffix)); + + varbuf_set_str(&vb, "some text with suffix"); + test_fail(varbuf_has_prefix(&vb, &vb_prefix)); + test_fail(varbuf_has_prefix(&vb, &vb_suffix)); + test_fail(varbuf_has_suffix(&vb, &vb_prefix)); + test_pass(varbuf_has_suffix(&vb, &vb_suffix)); + + varbuf_set_str(&vb, "prefix and some text with suffix"); + test_pass(varbuf_has_prefix(&vb, &vb_prefix)); + test_fail(varbuf_has_prefix(&vb, &vb_suffix)); + test_fail(varbuf_has_suffix(&vb, &vb_prefix)); + test_pass(varbuf_has_suffix(&vb, &vb_suffix)); + + varbuf_destroy(&vb_prefix); + varbuf_destroy(&vb_suffix); + varbuf_destroy(&vb); +} + +static void +test_varbuf_trim(void) +{ + struct varbuf vb = VARBUF_OBJECT; + struct varbuf vb_prefix = VARBUF_OBJECT; + struct varbuf vb_suffix = VARBUF_OBJECT; + + varbuf_set_str(&vb_prefix, "prefix"); + varbuf_set_str(&vb_suffix, "suffix"); + + varbuf_set_str(&vb, "some text"); + varbuf_trim_varbuf_prefix(&vb, &vb_prefix); + varbuf_trim_char_prefix(&vb, 'a'); + test_str(vb.buf, ==, "some text"); + + varbuf_set_str(&vb, "prefix and some text"); + varbuf_trim_varbuf_prefix(&vb, &vb_prefix); + test_str(vb.buf, ==, " and some text"); + + varbuf_set_str(&vb, " and some text"); + varbuf_trim_char_prefix(&vb, ' '); + test_str(vb.buf, ==, "and some text"); + + varbuf_destroy(&vb_prefix); + varbuf_destroy(&vb_suffix); + varbuf_destroy(&vb); +} + static void test_varbuf_printf(void) { @@ -478,18 +532,15 @@ test_varbuf_snapshot(void) test_str(varbuf_rollback_start(&vbs), ==, ""); varbuf_add_buf(&vb, "1234567890", 10); - varbuf_end_str(&vb); test_pass(vb.used == 10); test_pass(varbuf_rollback_len(&vbs) == 10); test_str(varbuf_rollback_start(&vbs), ==, "1234567890"); varbuf_rollback(&vbs); - varbuf_end_str(&vb); test_pass(vb.used == 0); test_pass(varbuf_rollback_len(&vbs) == 0); test_str(varbuf_rollback_start(&vbs), ==, ""); varbuf_add_buf(&vb, "1234567890", 10); - varbuf_end_str(&vb); test_pass(vb.used == 10); test_pass(varbuf_rollback_len(&vbs) == 10); test_str(varbuf_rollback_start(&vbs), ==, "1234567890"); @@ -499,12 +550,10 @@ test_varbuf_snapshot(void) test_str(varbuf_rollback_start(&vbs), ==, ""); varbuf_add_buf(&vb, "1234567890", 10); - varbuf_end_str(&vb); test_pass(vb.used == 20); test_pass(varbuf_rollback_len(&vbs) == 10); test_str(varbuf_rollback_start(&vbs), ==, "1234567890"); varbuf_rollback(&vbs); - varbuf_end_str(&vb); test_pass(vb.used == 10); test_pass(varbuf_rollback_len(&vbs) == 0); test_str(varbuf_rollback_start(&vbs), ==, ""); @@ -519,22 +568,41 @@ test_varbuf_detach(void) char *str; varbuf_init(&vb, 0); + test_pass(vb.used == 0); + test_pass(vb.size == 0); + test_pass(vb.buf == NULL); + str = varbuf_detach(&vb); + test_str(str, ==, ""); + test_pass(vb.used == 0); + test_pass(vb.size == 0); + test_pass(vb.buf == NULL); + free(str); - varbuf_add_buf(&vb, "1234567890", 10); - + varbuf_init(&vb, 0); + varbuf_add_buf(&vb, NULL, 0); + test_pass(vb.used == 0); + test_pass(vb.size == 0); + test_pass(vb.buf == NULL); str = varbuf_detach(&vb); + test_str(str, ==, ""); + test_pass(vb.used == 0); + test_pass(vb.size == 0); + test_pass(vb.buf == NULL); + free(str); + varbuf_init(&vb, 0); + varbuf_add_buf(&vb, "1234567890", 10); + str = varbuf_detach(&vb); test_mem(str, ==, "1234567890", 10); test_pass(vb.used == 0); test_pass(vb.size == 0); test_pass(vb.buf == NULL); - free(str); } TEST_ENTRY(test) { - test_plan(172); + test_plan(205); test_varbuf_init(); test_varbuf_prealloc(); @@ -550,7 +618,9 @@ TEST_ENTRY(test) test_varbuf_map_char(); test_varbuf_add_dir(); test_varbuf_end_str(); - test_varbuf_get_str(); + test_varbuf_str(); + test_varbuf_has(); + test_varbuf_trim(); test_varbuf_printf(); test_varbuf_reset(); test_varbuf_snapshot(); diff --git a/lib/dpkg/tarfn.c b/lib/dpkg/tarfn.c index 48e3c38..2ce07a0 100644 --- a/lib/dpkg/tarfn.c +++ b/lib/dpkg/tarfn.c @@ -22,7 +22,7 @@ #include #include -#if HAVE_SYS_SYSMACROS_H +#ifdef HAVE_SYS_SYSMACROS_H #include #endif #include @@ -209,7 +209,6 @@ tar_header_get_prefix_name(struct tar_header *h) varbuf_add_strn(&path, h->prefix, sizeof(h->prefix)); varbuf_add_char(&path, '/'); varbuf_add_strn(&path, h->name, sizeof(h->name)); - varbuf_end_str(&path); return path.buf; } diff --git a/lib/dpkg/trigdeferred.c b/lib/dpkg/trigdeferred.c index e19eca7..ae31d62 100644 --- a/lib/dpkg/trigdeferred.c +++ b/lib/dpkg/trigdeferred.c @@ -56,7 +56,6 @@ constructfn(struct varbuf *vb, const char *dir, const char *tail) varbuf_reset(vb); varbuf_add_dir(vb, dir); varbuf_add_str(vb, tail); - varbuf_end_str(vb); } /** @@ -78,9 +77,9 @@ trigdef_update_start(enum trigdef_update_flags uf) if (uf & TDUF_WRITE) { constructfn(&fn, triggersdir, TRIGGERSLOCKFILE); - if (lock_fd == -1) { + if (lock_fd < 0) { lock_fd = open(fn.buf, O_RDWR | O_CREAT | O_TRUNC, 0600); - if (lock_fd == -1) { + if (lock_fd < 0) { if (!(errno == ENOENT && (uf & TDUF_NO_LOCK_OK))) ohshite(_("unable to open/create " "triggers lock file '%.250s'"), diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c index 82cb298..6cf7eba 100644 --- a/lib/dpkg/triglib.c +++ b/lib/dpkg/triglib.c @@ -291,7 +291,6 @@ trk_explicit_start(const char *trig) varbuf_reset(&trk_explicit_fn); varbuf_add_dir(&trk_explicit_fn, triggersdir); varbuf_add_str(&trk_explicit_fn, trig); - varbuf_end_str(&trk_explicit_fn); trk_explicit_f = fopen(trk_explicit_fn.buf, "r"); if (!trk_explicit_f) { diff --git a/lib/dpkg/triglib.h b/lib/dpkg/triglib.h index e4e101b..3afeb41 100644 --- a/lib/dpkg/triglib.h +++ b/lib/dpkg/triglib.h @@ -23,6 +23,8 @@ #ifndef LIBDPKG_TRIGLIB_H #define LIBDPKG_TRIGLIB_H +#include + #include #include #include diff --git a/lib/dpkg/varbuf.c b/lib/dpkg/varbuf.c index a5d3d31..5829a6f 100644 --- a/lib/dpkg/varbuf.c +++ b/lib/dpkg/varbuf.c @@ -46,10 +46,12 @@ varbuf_init(struct varbuf *v, size_t size) { v->used = 0; v->size = size; - if (size) + if (size) { v->buf = m_malloc(size); - else + v->buf[0] = '\0'; + } else { v->buf = NULL; + } } void @@ -83,18 +85,23 @@ varbuf_trunc(struct varbuf *v, size_t used_size) internerr("varbuf new_used(%zu) > size(%zu)", used_size, v->size); v->used = used_size; + if (v->buf) + v->buf[v->used] = '\0'; } void varbuf_reset(struct varbuf *v) { v->used = 0; + if (v->buf) + v->buf[0] = '\0'; } const char * -varbuf_get_str(struct varbuf *v) +varbuf_str(struct varbuf *v) { - varbuf_end_str(v); + if (v->buf == NULL) + return ""; return v->buf; } @@ -104,7 +111,6 @@ varbuf_set_buf(struct varbuf *v, const void *buf, size_t size) { varbuf_reset(v); varbuf_add_buf(v, buf, size); - varbuf_end_str(v); } void @@ -116,16 +122,18 @@ varbuf_set_varbuf(struct varbuf *v, struct varbuf *other) void varbuf_add_varbuf(struct varbuf *v, const struct varbuf *other) { - varbuf_grow(v, other->used); + varbuf_grow(v, other->used + 1); memcpy(v->buf + v->used, other->buf, other->used); v->used += other->used; + v->buf[v->used] = '\0'; } void varbuf_add_char(struct varbuf *v, int c) { - varbuf_grow(v, 1); + varbuf_grow(v, 2); v->buf[v->used++] = c; + v->buf[v->used] = '\0'; } void @@ -133,9 +141,10 @@ varbuf_dup_char(struct varbuf *v, int c, size_t n) { if (n == 0) return; - varbuf_grow(v, n); + varbuf_grow(v, n + 1); memset(v->buf + v->used, c, n); v->used += n; + v->buf[v->used] = '\0'; } void @@ -161,16 +170,68 @@ varbuf_add_buf(struct varbuf *v, const void *s, size_t size) { if (size == 0) return; - varbuf_grow(v, size); + varbuf_grow(v, size + 1); memcpy(v->buf + v->used, s, size); v->used += size; + v->buf[v->used] = '\0'; +} + +bool +varbuf_has_prefix(struct varbuf *v, struct varbuf *prefix) +{ + if (prefix->used > v->used) + return false; + + if (prefix->used == 0) + return true; + if (v->used == 0) + return false; + + return strncmp(v->buf, prefix->buf, prefix->used) == 0; +} + +bool +varbuf_has_suffix(struct varbuf *v, struct varbuf *suffix) +{ + const char *slice; + + if (suffix->used > v->used) + return false; + + if (suffix->used == 0) + return true; + if (v->used == 0) + return false; + + slice = v->buf + v->used - suffix->used; + + return strcmp(slice, suffix->buf) == 0; } void -varbuf_end_str(struct varbuf *v) +varbuf_trim_varbuf_prefix(struct varbuf *v, struct varbuf *prefix) { - varbuf_grow(v, 1); - v->buf[v->used] = '\0'; + if (!varbuf_has_prefix(v, prefix)) + return; + + memmove(v->buf, v->buf + prefix->used, v->used - prefix->used); + varbuf_trunc(v, v->used - prefix->used); +} + +void +varbuf_trim_char_prefix(struct varbuf *v, int prefix) +{ + const char *str = v->buf; + size_t len = v->used; + + while (str[0] == prefix && len > 0) { + str++; + len--; + } + if (str != v->buf) { + memmove(v->buf, str, len); + varbuf_trunc(v, len); + } } int @@ -239,10 +300,7 @@ varbuf_rollback_start(struct varbuf_state *vs) if (vs->used) internerr("varbuf buf(NULL) state_used(%zu) > 0", vs->used); - /* XXX: Ideally this would be handled by varbuf always having - * a valid buf or switching all users to the getter, but for - * now this will do. */ - return ""; + return varbuf_str(vs->v); } return vs->v->buf + vs->used; } @@ -256,6 +314,9 @@ varbuf_detach(struct varbuf *v) v->size = 0; v->used = 0; + if (buf == NULL) + buf = m_strdup(""); + return buf; } diff --git a/lib/dpkg/varbuf.h b/lib/dpkg/varbuf.h index e58dac5..2a4da2b 100644 --- a/lib/dpkg/varbuf.h +++ b/lib/dpkg/varbuf.h @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -83,6 +84,8 @@ void varbuf_reset(struct varbuf *v); void varbuf_destroy(struct varbuf *v); void varbuf_free(struct varbuf *v); +const char *varbuf_str(struct varbuf *v); + void varbuf_set_varbuf(struct varbuf *v, struct varbuf *other); void varbuf_set_buf(struct varbuf *v, const void *buf, size_t size); #define varbuf_set_str(v, s) varbuf_set_buf(v, s, strlen(s)) @@ -96,8 +99,11 @@ void varbuf_map_char(struct varbuf *v, int c_src, int c_dst); #define varbuf_add_strn(v, s, n) varbuf_add_buf(v, s, strnlen(s, n)) void varbuf_add_dir(struct varbuf *v, const char *dirname); void varbuf_add_buf(struct varbuf *v, const void *s, size_t size); -void varbuf_end_str(struct varbuf *v); -const char *varbuf_get_str(struct varbuf *v); + +bool varbuf_has_prefix(struct varbuf *v, struct varbuf *prefix); +bool varbuf_has_suffix(struct varbuf *v, struct varbuf *suffix); +void varbuf_trim_varbuf_prefix(struct varbuf *v, struct varbuf *prefix); +void varbuf_trim_char_prefix(struct varbuf *v, int prefix); int varbuf_printf(struct varbuf *v, const char *fmt, ...) DPKG_ATTR_PRINTF(2); int varbuf_vprintf(struct varbuf *v, const char *fmt, va_list va) @@ -182,7 +188,7 @@ varbuf::operator()(const char *s) inline const char * varbuf::string() { - return varbuf_get_str(this); + return varbuf_str(this); } #endif diff --git a/m4/build-to-host.m4 b/m4/build-to-host.m4 new file mode 100644 index 0000000..f928e9a --- /dev/null +++ b/m4/build-to-host.m4 @@ -0,0 +1,79 @@ +# build-to-host.m4 serial 3 +dnl Copyright (C) 2023-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Bruno Haible. + +dnl When the build environment ($build_os) is different from the target runtime +dnl environment ($host_os), file names may need to be converted from the build +dnl environment syntax to the target runtime environment syntax. This is +dnl because the Makefiles are executed (mostly) by build environment tools and +dnl therefore expect file names in build environment syntax, whereas the runtime +dnl expects file names in target runtime environment syntax. +dnl +dnl For example, if $build_os = cygwin and $host_os = mingw32, filenames need +dnl be converted from Cygwin syntax to native Windows syntax: +dnl /cygdrive/c/foo/bar -> C:\foo\bar +dnl /usr/local/share -> C:\cygwin64\usr\local\share +dnl +dnl gl_BUILD_TO_HOST([somedir]) +dnl This macro takes as input an AC_SUBSTed variable 'somedir', which must +dnl already have its final value assigned, and produces two additional +dnl AC_SUBSTed variables 'somedir_c' and 'somedir_c_make', that designate the +dnl same file name value, just in different syntax: +dnl - somedir_c is the file name in target runtime environment syntax, +dnl as a C string (starting and ending with a double-quote, +dnl and with escaped backslashes and double-quotes in +dnl between). +dnl - somedir_c_make is the same thing, escaped for use in a Makefile. + +AC_DEFUN([gl_BUILD_TO_HOST], +[ + AC_REQUIRE([AC_CANONICAL_BUILD]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_BUILD_TO_HOST_INIT]) + + dnl Define somedir_c. + gl_final_[$1]="$[$1]" + dnl Translate it from build syntax to host syntax. + case "$build_os" in + cygwin*) + case "$host_os" in + mingw* | windows*) + gl_final_[$1]=`cygpath -w "$gl_final_[$1]"` ;; + esac + ;; + esac + dnl Convert it to C string syntax. + [$1]_c=`printf '%s\n' "$gl_final_[$1]" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"` + [$1]_c='"'"$[$1]_c"'"' + AC_SUBST([$1_c]) + + dnl Define somedir_c_make. + [$1]_c_make=`printf '%s\n' "$[$1]_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"` + dnl Use the substituted somedir variable, when possible, so that the user + dnl may adjust somedir a posteriori when there are no special characters. + if test "$[$1]_c_make" = '\"'"${gl_final_[$1]}"'\"'; then + [$1]_c_make='\"$([$1])\"' + fi + AC_SUBST([$1_c_make]) +]) + +dnl Some initializations for gl_BUILD_TO_HOST. +AC_DEFUN([gl_BUILD_TO_HOST_INIT], +[ + gl_sed_double_backslashes='s/\\/\\\\/g' + gl_sed_escape_doublequotes='s/"/\\"/g' +changequote(,)dnl + gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g" +changequote([,])dnl + gl_sed_escape_for_make_2='s,\$,\\$$,g' + dnl Find out how to remove carriage returns from output. Solaris /usr/ucb/tr + dnl does not understand '\r'. + case `echo r | tr -d '\r'` in + '') gl_tr_cr='\015' ;; + *) gl_tr_cr='\r' ;; + esac +]) diff --git a/m4/dpkg-types.m4 b/m4/dpkg-types.m4 index 1159967..1e47ad2 100644 --- a/m4/dpkg-types.m4 +++ b/m4/dpkg-types.m4 @@ -23,7 +23,7 @@ AC_DEFUN([DPKG_TYPE_STRUCT_PSINFO], [ #undef _FILE_OFFSET_BITS #endif #define _STRUCTURED_PROC 1 -#if HAVE_SYS_PROCFS_H +#ifdef HAVE_SYS_PROCFS_H #include #endif ]]) @@ -37,7 +37,7 @@ AC_DEFUN([DPKG_DECL_SYS_SIGLIST], [ AC_CHECK_DECLS([sys_siglist], [], [], [[ #include /* NetBSD declares sys_siglist in unistd.h. */ -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif ]]) diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 4f25a27..16f9db1 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -1,5 +1,5 @@ -# gettext.m4 serial 71 (gettext-0.20.2) -dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. +# gettext.m4 serial 78 (gettext-0.22.4) +dnl Copyright (C) 1995-2014, 2016, 2018-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -20,11 +20,13 @@ dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL must be one of 'external', 'use-libtool'. -dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and -dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'. -dnl If INTLSYMBOL is 'use-libtool', then a libtool library -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl INTLSYMBOL must be one of 'external', 'use-libtool', 'here'. +dnl INTLSYMBOL should be 'external' for packages other than GNU gettext. +dnl It should be 'use-libtool' for the packages 'gettext-runtime' and +dnl 'gettext-tools'. +dnl It should be 'here' for the package 'gettext-runtime/intl'. +dnl If INTLSYMBOL is 'here', then a libtool library +dnl $(top_builddir)/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext @@ -55,24 +57,21 @@ dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], , + m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], , [m4_if([$1], [here], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])]) - ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], +])])])])]) + m4_if(m4_if([$1], [], [old])[]m4_if([$1], [no-libtool], [old]), [old], [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. ])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + m4_if([$2], [], , [m4_if([$2], [need-ngettext], , [m4_if([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) - define([gt_included_intl], - ifelse([$1], [external], [no], [yes])) + define([gt_building_libintl_in_same_build_tree], + m4_if([$1], [use-libtool], [yes], [m4_if([$1], [here], [yes], [no])])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl - ifelse(gt_included_intl, yes, [ - AC_REQUIRE([AM_INTL_SUBDIR])dnl - ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) @@ -82,13 +81,13 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. - ifelse(gt_included_intl, yes, , [ + m4_if(gt_building_libintl_in_same_build_tree, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) @@ -98,8 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) - ifelse(gt_included_intl, yes, [ - BUILD_INCLUDED_LIBINTL=no + m4_if(gt_building_libintl_in_same_build_tree, yes, [ USE_INCLUDED_LIBINTL=no ]) LIBINTL= @@ -118,7 +116,7 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no - ifelse(gt_included_intl, yes, [ + m4_if(gt_building_libintl_in_same_build_tree, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], @@ -174,7 +172,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. - ifelse(gt_included_intl, yes, , [ + m4_if(gt_building_libintl_in_same_build_tree, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL @@ -212,9 +210,16 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) - dnl Now see whether libintl exists and depends on libiconv. - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" + dnl Now see whether libintl exists and depends on libiconv or other + dnl OS dependent libraries, specifically on macOS and AIX. + gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + aix*) gt_LIBINTL_EXTRA="-lpthread" ;; + esac + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \ + && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then + LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ @@ -236,8 +241,8 @@ $gt_revision_test_code bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" + [LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA" + LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA" eval "$gt_func_gnugettext_libintl=yes" ]) fi @@ -252,7 +257,8 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then + && test "$PACKAGE" != gettext-tools \ + && test "$PACKAGE" != libintl; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. @@ -261,7 +267,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION INCINTL= fi - ifelse(gt_included_intl, yes, [ + m4_if(gt_building_libintl_in_same_build_tree, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. @@ -271,10 +277,9 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. - BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" + LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" + LTLIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi @@ -341,25 +346,39 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION POSUB=po fi - ifelse(gt_included_intl, yes, [ - dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes' - dnl because some of the testsuite requires it. - BUILD_INCLUDED_LIBINTL=yes - + m4_if(gt_building_libintl_in_same_build_tree, yes, [ dnl Make all variables we use known to autoconf. - AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) ]) - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST([INTLLIBS]) + m4_if(gt_building_libintl_in_same_build_tree, yes, [], [ + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) + ]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) + + dnl Define localedir_c and localedir_c_make. + dnl Find the final value of localedir. + gt_save_prefix="${prefix}" + gt_save_datarootdir="${datarootdir}" + gt_save_localedir="${localedir}" + dnl Unfortunately, prefix gets only finally determined at the end of + dnl configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + eval datarootdir="$datarootdir" + eval localedir="$localedir" + gl_BUILD_TO_HOST([localedir]) + localedir="${gt_save_localedir}" + datarootdir="${gt_save_datarootdir}" + prefix="${gt_save_prefix}" ]) diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 index 6db2aa2..e860a19 100644 --- a/m4/host-cpu-c-abi.m4 +++ b/m4/host-cpu-c-abi.m4 @@ -1,5 +1,5 @@ -# host-cpu-c-abi.m4 serial 13 -dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. +# host-cpu-c-abi.m4 serial 17 +dnl Copyright (C) 2002-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -211,7 +211,7 @@ changequote([,])dnl # be generating 64-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( - [[#if defined __powerpc64__ || defined _ARCH_PPC64 + [[#if defined __powerpc64__ || defined __LP64__ int ok; #else error fail @@ -382,6 +382,9 @@ EOF #ifndef __ia64__ #undef __ia64__ #endif +#ifndef __loongarch64__ +#undef __loongarch64__ +#endif #ifndef __m68k__ #undef __m68k__ #endif @@ -458,217 +461,66 @@ EOF dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit -dnl one, or to 'unknown' if unknown. +dnl one. dnl This is a simplified variant of gl_HOST_CPU_C_ABI. AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit], - [if test -n "$gl_cv_host_cpu_c_abi"; then - case "$gl_cv_host_cpu_c_abi" in - i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) - gl_cv_host_cpu_c_abi_32bit=yes ;; - x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) - gl_cv_host_cpu_c_abi_32bit=no ;; - *) - gl_cv_host_cpu_c_abi_32bit=unknown ;; - esac - else - case "$host_cpu" in - - # CPUs that only support a 32-bit ABI. - arc \ - | bfin \ - | cris* \ - | csky \ - | epiphany \ - | ft32 \ - | h8300 \ - | m68k \ - | microblaze | microblazeel \ - | nds32 | nds32le | nds32be \ - | nios2 | nios2eb | nios2el \ - | or1k* \ - | or32 \ - | sh | sh[1234] | sh[1234]e[lb] \ - | tic6x \ - | xtensa* ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; + [case "$host_cpu" in - # CPUs that only support a 64-bit ABI. -changequote(,)dnl - alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ - | mmix ) -changequote([,])dnl - gl_cv_host_cpu_c_abi_32bit=no - ;; + # CPUs that only support a 32-bit ABI. + arc \ + | bfin \ + | cris* \ + | csky \ + | epiphany \ + | ft32 \ + | h8300 \ + | m68k \ + | microblaze | microblazeel \ + | nds32 | nds32le | nds32be \ + | nios2 | nios2eb | nios2el \ + | or1k* \ + | or32 \ + | sh | sh[1234] | sh[1234]e[lb] \ + | tic6x \ + | xtensa* ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + # CPUs that only support a 64-bit ABI. changequote(,)dnl - i[34567]86 ) + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) changequote([,])dnl - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - x86_64 ) - # On x86_64 systems, the C compiler may be generating code in one of - # these ABIs: - # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. - # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 - # with native Windows (mingw, MSVC). - # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. - # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if (defined __x86_64__ || defined __amd64__ \ - || defined _M_X64 || defined _M_AMD64) \ - && !(defined __ILP32__ || defined _ILP32) - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - arm* | aarch64 ) - # Assume arm with EABI. - # On arm64 systems, the C compiler may be generating code in one of - # these ABIs: - # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. - # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. - # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) - # On hppa, the C compiler may be generating 32-bit code or 64-bit - # code. In the latter case, it defines _LP64 and __LP64__. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifdef __LP64__ - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - ia64* ) - # On ia64 on HP-UX, the C compiler may be generating 64-bit code or - # 32-bit code. In the latter case, it defines _ILP32. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifdef _ILP32 - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=yes], - [gl_cv_host_cpu_c_abi_32bit=no]) - ;; - - mips* ) - # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this - # at 32. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - powerpc* ) - # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. - # No need to distinguish them here; the caller may distinguish - # them based on the OS. - # On powerpc64 systems, the C compiler may still be generating - # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may - # be generating 64-bit code. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined __powerpc64__ || defined _ARCH_PPC64 - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - rs6000 ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - riscv32 | riscv64 ) - # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. - # Size of 'long' and 'void *': - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined __LP64__ - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - s390* ) - # On s390x, the C compiler may be generating 64-bit (= s390x) code - # or 31-bit (= s390) code. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined __LP64__ || defined __s390x__ - int ok; - #else - error fail - #endif - ]])], - [gl_cv_host_cpu_c_abi_32bit=no], - [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; + gl_cv_host_cpu_c_abi_32bit=no + ;; - sparc | sparc64 ) - # UltraSPARCs running Linux have `uname -m` = "sparc64", but the - # C compiler still generates 32-bit code. + *) + if test -n "$gl_cv_host_cpu_c_abi"; then + dnl gl_HOST_CPU_C_ABI has already been run. Use its result. + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + x86_64 | alpha | arm64 | aarch64c | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) + gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; + esac + else + gl_cv_host_cpu_c_abi_32bit=unknown + fi + if test $gl_cv_host_cpu_c_abi_32bit = unknown; then AC_COMPILE_IFELSE( [AC_LANG_SOURCE( - [[#if defined __sparcv9 || defined __arch64__ - int ok; - #else - error fail - #endif + [[int test_pointer_size[sizeof (void *) - 5]; ]])], [gl_cv_host_cpu_c_abi_32bit=no], [gl_cv_host_cpu_c_abi_32bit=yes]) - ;; - - *) - gl_cv_host_cpu_c_abi_32bit=unknown - ;; - esac - fi + fi + ;; + esac ]) HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" diff --git a/m4/iconv.m4 b/m4/iconv.m4 index e593b72..2a7edd3 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,5 +1,5 @@ -# iconv.m4 serial 21 -dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation, +# iconv.m4 serial 27 +dnl Copyright (C) 2000-2002, 2007-2014, 2016-2024 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,6 +7,12 @@ dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. +AC_PREREQ([2.64]) + +dnl Note: AM_ICONV is documented in the GNU gettext manual +dnl . +dnl Don't make changes that are incompatible with that documentation! + AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. @@ -32,7 +38,7 @@ AC_DEFUN([AM_ICONV_LINK], dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. - am_save_CPPFLAGS="$CPPFLAGS" + gl_saved_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ @@ -49,7 +55,7 @@ AC_DEFUN([AM_ICONV_LINK], iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" + gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( @@ -62,14 +68,14 @@ AC_DEFUN([AM_ICONV_LINK], iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) - LIBS="$am_save_LIBS" + LIBS="$gl_saved_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. - am_save_LIBS="$LIBS" + gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi @@ -86,8 +92,9 @@ AC_DEFUN([AM_ICONV_LINK], #endif ]], [[int result = 0; - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ + /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from + successful returns. This is even documented in + */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) @@ -198,7 +205,7 @@ AC_DEFUN([AM_ICONV_LINK], esac]) test "$am_cv_func_iconv_works" = no || break done - LIBS="$am_save_LIBS" + LIBS="$gl_saved_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; @@ -217,7 +224,7 @@ AC_DEFUN([AM_ICONV_LINK], else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. - CPPFLAGS="$am_save_CPPFLAGS" + CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi @@ -225,64 +232,62 @@ AC_DEFUN([AM_ICONV_LINK], AC_SUBST([LTLIBICONV]) ]) -dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to -dnl avoid warnings like +dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. -m4_define([gl_iconv_AC_DEFUN], - m4_version_prereq([2.64], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [m4_ifdef([gl_00GNULIB], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [[AC_DEFUN( - [$1], [$2])]])])) -gl_iconv_AC_DEFUN([AM_ICONV], +AC_DEFUN_ONCE([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then - AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL([am_cv_proto_iconv], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ + AC_CACHE_CHECK([whether iconv is compatible with its POSIX signature], + [gl_cv_iconv_nonconst], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ #include #include extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif - ]], - [[]])], - [am_cv_proto_iconv_arg1=""], - [am_cv_proto_iconv_arg1="const"]) - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([ - $am_cv_proto_iconv]) + ]], + [[]])], + [gl_cv_iconv_nonconst=yes], + [gl_cv_iconv_nonconst=no]) + ]) else dnl When compiling GNU libiconv on a system that does not have iconv yet, dnl pick the POSIX compliant declaration without 'const'. - am_cv_proto_iconv_arg1="" + gl_cv_iconv_nonconst=yes + fi + if test $gl_cv_iconv_nonconst = yes; then + iconv_arg1="" + else + iconv_arg1="const" fi - AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + AC_DEFINE_UNQUOTED([ICONV_CONST], [$iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) - if test -n "$am_cv_proto_iconv_arg1"; then + if test $gl_cv_iconv_nonconst != yes; then ICONV_CONST="const" fi ]) + + dnl A summary result, for those packages which want to print a summary at the + dnl end of the configuration. + if test "$am_func_iconv" = yes; then + if test -n "$LIBICONV"; then + am_cv_func_iconv_summary='yes, in libiconv' + else + am_cv_func_iconv_summary='yes, in libc' + fi + else + if test "$am_cv_func_iconv" = yes; then + am_cv_func_iconv_summary='not working, consider installing GNU libiconv' + else + am_cv_func_iconv_summary='no, consider installing GNU libiconv' + fi + fi ]) diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4 index ebd9937..450eb88 100644 --- a/m4/intlmacosx.m4 +++ b/m4/intlmacosx.m4 @@ -1,5 +1,5 @@ -# intlmacosx.m4 serial 8 (gettext-0.20.2) -dnl Copyright (C) 2004-2014, 2016, 2019-2020 Free Software Foundation, Inc. +# intlmacosx.m4 serial 10 (gettext-0.23) +dnl Copyright (C) 2004-2014, 2016, 2019-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -20,7 +20,7 @@ AC_DEFUN([gt_INTL_MACOSX], dnl Check for API introduced in Mac OS X 10.4. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" + [gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( @@ -28,7 +28,7 @@ AC_DEFUN([gt_INTL_MACOSX], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) + LIBS="$gt_saved_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) @@ -43,7 +43,7 @@ AC_DEFUN([gt_INTL_MACOSX], dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the dnl first among the preferred languages and CC is the territory. AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], - [gt_save_LIBS="$LIBS" + [gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( @@ -51,7 +51,7 @@ AC_DEFUN([gt_INTL_MACOSX], [[CFLocaleCopyPreferredLanguages();]])], [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) - LIBS="$gt_save_LIBS"]) + LIBS="$gt_saved_LIBS"]) if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) @@ -59,7 +59,11 @@ AC_DEFUN([gt_INTL_MACOSX], INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + dnl Starting with macOS version 14, CoreFoundation relies on CoreServices, + dnl and we have to link it in explicitly, otherwise an exception + dnl NSInvalidArgumentException "unrecognized selector sent to instance" + dnl occurs. + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 98c348f..b17e0fd 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 @@ -1,5 +1,5 @@ -# lib-ld.m4 serial 9 -dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc. +# lib-ld.m4 serial 13 +dnl Copyright (C) 1996-2003, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,7 +29,7 @@ AC_DEFUN([AC_LIB_PROG_LD], AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], + [AS_HELP_STRING([[--with-gnu-ld]], [assume the C compiler uses GNU ld [default=no]])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl @@ -67,7 +67,7 @@ else if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in - *-*-mingw*) + *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -97,9 +97,9 @@ else fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$acl_save_ifs" + IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" @@ -116,13 +116,13 @@ else esac fi done - IFS="$acl_save_ifs" + IFS="$acl_saved_IFS" fi case $host in *-*-aix*) AC_COMPILE_IFELSE( [AC_LANG_SOURCE( - [[#if defined __powerpc64__ || defined _ARCH_PPC64 + [[#if defined __powerpc64__ || defined __LP64__ int ok; #else error fail diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index eecf70e..1a7c127 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 @@ -1,5 +1,5 @@ -# lib-link.m4 serial 31 -dnl Copyright (C) 2001-2020 Free Software Foundation, Inc. +# lib-link.m4 serial 34 +dnl Copyright (C) 2001-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -69,11 +69,11 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" + acl_saved_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" + acl_saved_LIBS="$LIBS" dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, dnl because these -l options might require -L options that are present in dnl LIBS. -l options benefit only from the -L options listed before it. @@ -89,7 +89,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [AC_LANG_PROGRAM([[$3]], [[$4]])], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) - LIBS="$ac_save_LIBS" + LIBS="$acl_saved_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes @@ -100,7 +100,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" + CPPFLAGS="$acl_saved_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= @@ -196,8 +196,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], -[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -224,7 +224,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], additional_libdir3= fi dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. + dnl $LDFLAGS. Use breadth-first search. LIB[]NAME= LTLIB[]NAME= INC[]NAME= @@ -537,12 +537,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" + saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac - libdir="$save_libdir" + libdir="$saved_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in @@ -631,7 +631,20 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ;; -l*) dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + dnl But on GNU systems, ignore -lc options, because + dnl - linking with libc is the default anyway, + dnl - linking with libc.a may produce an error + dnl "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie" + dnl or may produce an executable that always crashes, see + dnl . + dep=`echo "X$dep" | sed -e 's/^X-l//'` + if test "X$dep" != Xc \ + || case $host_os in + linux* | gnu* | k*bsd*-gnu) false ;; + *) true ;; + esac; then + names_next_round="$names_next_round $dep" + fi ;; *.la) dnl Handle this in the next round. Throw away the .la's @@ -669,18 +682,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi @@ -777,18 +790,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" $1="${$1}${$1:+ }$flag" done fi diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index c8a0b46..f327c6e 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -1,5 +1,5 @@ -# lib-prefix.m4 serial 17 -dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. +# lib-prefix.m4 serial 22 +dnl Copyright (C) 2001-2005, 2008-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -126,10 +126,10 @@ AC_DEFUN([AC_LIB_PREPARE_PREFIX], else acl_final_exec_prefix="$exec_prefix" fi - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" + prefix="$acl_saved_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the @@ -137,13 +137,13 @@ dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates @@ -174,14 +174,14 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], [AC_EGREP_CPP([Extensible Linking Format], - [#ifdef __ELF__ + [#if defined __ELF__ || (defined __linux__ && defined __EDG__) Extensible Linking Format #endif ], [gl_cv_elf=yes], [gl_cv_elf=no]) - ]) - if test $gl_cv_elf; then + ]) + if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then @@ -198,20 +198,23 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], echo } fi + # Use 'expr', not 'test', to compare the values of func_elfclass, because on + # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, + # not 1 or 2. changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) @@ -253,6 +256,15 @@ changequote([,])dnl esac fi ;; + netbsd*) + dnl On NetBSD/sparc64, there is a 'sparc' subdirectory that contains + dnl 32-bit libraries. + if test $HOST_CPU_C_ABI_32BIT != no; then + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparc ;; + esac + fi + ;; *) dnl If $CC generates code for a 32-bit ABI, the libraries are dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. @@ -277,7 +289,7 @@ changequote([,])dnl fi fi if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" + acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in @@ -294,7 +306,7 @@ changequote([,])dnl esac fi done - IFS="$acl_save_IFS" + IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= diff --git a/m4/nls.m4 b/m4/nls.m4 index 5a506fc..4d37d37 100644 --- a/m4/nls.m4 +++ b/m4/nls.m4 @@ -1,5 +1,5 @@ # nls.m4 serial 6 (gettext-0.20.2) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2024 Free dnl Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/po.m4 b/m4/po.m4 index 3778fd7..bc6df99 100644 --- a/m4/po.m4 +++ b/m4/po.m4 @@ -1,5 +1,6 @@ -# po.m4 serial 31 (gettext-0.20.2) -dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. +# po.m4 serial 32 (gettext-0.21.1) +dnl Copyright (C) 1995-2014, 2016, 2018-2022, 2024 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -179,7 +180,9 @@ changequote([,])dnl # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in - "$presentlang"*) useit=yes;; + "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) + useit=yes + ;; esac done if test $useit = yes; then @@ -379,7 +382,9 @@ changequote([,])dnl # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in - "$presentlang"*) useit=yes;; + "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) + useit=yes + ;; esac done if test $useit = yes; then diff --git a/m4/progtest.m4 b/m4/progtest.m4 index f28010a..8dd4d60 100644 --- a/m4/progtest.m4 +++ b/m4/progtest.m4 @@ -1,5 +1,5 @@ -# progtest.m4 serial 8 (gettext-0.20.2) -dnl Copyright (C) 1996-2003, 2005, 2008-2020 Free Software Foundation, Inc. +# progtest.m4 serial 10 (gettext-0.23) +dnl Copyright (C) 1996-2003, 2005, 2008-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -16,7 +16,7 @@ dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. -AC_PREREQ([2.50]) +AC_PREREQ([2.53]) # Search path for a program which passes the given test. @@ -60,9 +60,9 @@ AC_CACHE_VAL([ac_cv_path_$1], ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in ifelse([$5], , $PATH, [$5]); do - IFS="$ac_save_IFS" + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in m4_if([$5], , $PATH, [$5]); do + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -74,15 +74,15 @@ AC_CACHE_VAL([ac_cv_path_$1], fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +m4_if([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then +if test m4_if([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) diff --git a/man/Makefile.am b/man/Makefile.am index 4f4e462..68f4c37 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -62,6 +62,7 @@ man_MANS = \ dpkg.1 \ dpkg.cfg.5 \ dsc.5 \ + libdpkg.7 \ # EOL if BUILD_DSELECT @@ -152,6 +153,7 @@ EXTRA_DIST += \ dsc.pod \ dselect.cfg.pod \ dselect.pod \ + libdpkg.pod \ start-stop-daemon.pod \ update-alternatives.pod \ # EOL diff --git a/man/Makefile.in b/man/Makefile.in index 989e7cf..617613e 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -102,8 +102,8 @@ host_triplet = @host@ subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -280,6 +280,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -361,6 +362,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ @@ -407,8 +410,8 @@ EXTRA_DIST = po/ChangeLog.old po/dpkg-man.pot po/po4a.cfg \ dpkg-scansources.pod dpkg-shlibdeps.pod dpkg-source.pod \ dpkg-split.pod dpkg-statoverride.pod dpkg-trigger.pod \ dpkg-vendor.pod dpkg.cfg.pod dpkg.pod dsc.pod dselect.cfg.pod \ - dselect.pod start-stop-daemon.pod update-alternatives.pod # \ - EOL + dselect.pod libdpkg.pod start-stop-daemon.pod \ + update-alternatives.pod # EOL CLEANFILES = $(man_MANS) man_MANS = deb-buildinfo.5 deb-changelog.5 deb-changes.5 \ deb-conffiles.5 deb-control.5 deb-extra-override.5 \ @@ -426,8 +429,8 @@ man_MANS = deb-buildinfo.5 deb-changelog.5 deb-changes.5 \ dpkg-parsechangelog.1 dpkg-query.1 dpkg-realpath.1 \ dpkg-scanpackages.1 dpkg-scansources.1 dpkg-shlibdeps.1 \ dpkg-source.1 dpkg-split.1 dpkg-statoverride.1 dpkg-trigger.1 \ - dpkg-vendor.1 dpkg.1 dpkg.cfg.5 dsc.5 $(am__append_1) \ - $(am__append_2) $(am__append_3) + dpkg-vendor.1 dpkg.1 dpkg.cfg.5 dsc.5 libdpkg.7 \ + $(am__append_1) $(am__append_2) $(am__append_3) # Extract the list of languages from the po4a config file. LINGUAS_DIST = `$(SED) -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/po/po4a.cfg` diff --git a/man/de/deb-buildinfo.pod b/man/de/deb-buildinfo.pod index 3959cad..67a5636 100644 --- a/man/de/deb-buildinfo.pod +++ b/man/de/deb-buildinfo.pod @@ -76,16 +76,18 @@ Typischerweise ist das die Original-Paketversionsnummer, in der Form, die der Pr Das mehrzeilige Feld enthält den aneinandergehängten Text des Changelog-Eintrages eines rein binären, nicht-Betreuer-Uploads (binNMU), sofern dies der Fall ist. Um ein gültiges mehrzeiliges Feld zu erhalten, werden leere Zeilen durch ein einzelnen Satzpunkt (‚.’) ersetzt und alle Zeilen mit einem Leerzeichen eingerückt. Der genaue Inhalt hängt vom Changelog-Format ab. -=item B (verpflichtend) +=item B (verpflichtend, schwach) -=item B (verpflichtend) +=item B (verpflichtend, schwach) -=item B (verpflichtend) +=item B (verpflichtend, stark) =item S< >I I I Diese mehrzeiligen Felder enthalten eine Liste von Dateien mit einer Prüfsumme und Größe für jede. Diese Felder haben die gleiche Syntax und unterscheiden sich nur im verwandten Prüfsummenalgorithmus: MD5 für B, SHA-1 für B und SHA-256 für B. +B: Die MD5- und SHA-1-Prüfsummen werden als schwach betrachtet und sollten niemals für die sichere Überprüfung als ausreichend betrachtet werden. + Die erste Zeile des Feldwertes (der Teil auf der gleichen Zeile wie der durch einen Doppelpunkt gefolgte Feldname) ist immer leer. Der Inhalt des Feldes wird durch Fortsetzungszeilen ausgedrückt, eine Zeile pro Datei. Jede Zeile besteht aus durch Leerzeichen getrennten Einträgen, die die Datei beschreiben: der Prüfsumme, der Dateigröße und dem Dateinamen. Diese Datei führt alle Dateien auf, aus denen der Bau besteht. @@ -177,7 +179,7 @@ L, L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-changelog.pod b/man/de/deb-changelog.pod index 15de7ae..9cc067c 100644 --- a/man/de/deb-changelog.pod +++ b/man/de/deb-changelog.pod @@ -167,7 +167,7 @@ L, L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-changes.pod b/man/de/deb-changes.pod index daaaea1..9a1d0cd 100644 --- a/man/de/deb-changes.pod +++ b/man/de/deb-changes.pod @@ -108,9 +108,11 @@ Die erste Zeile des Feldwertes (dem Teil auf der gleichen Zeile wie der von eine Dieses Feld führt alle Dateien, die den Upload bilden, auf. Die Liste der Dateien in diesem Feld muss auf die Liste der Dateien in den anderen zugehörigen B-Feldern passen. -=item B (verpflichtend) +B: Die MD5-Prüfsumme wird als schwach betrachtet und sollte niemals für die sichere Überprüfung als ausreichend betrachtet werden. Dieses Feld kann allerdings nicht entfallen, da es ansonsten nicht verfügbare Metadaten bereitstellt. -=item B (verpflichtend) +=item B (verpflichtend, schwach) + +=item B (verpflichtend, stark) =item S< >I I I @@ -120,6 +122,8 @@ Die erste Zeile des Feldwertes (der Teil auf der gleichen Zeile wie der durch ei Diese Felder führen alle Dateien auf, aus denen der Upload besteht. Die Liste der Dateien in diesen Feldern muss zu der Liste in dem Feld B und den anderen zugehörigen B-Feldern passen. +B: Die SHA-1-Prüfsumme wird als schwach betrachtet und sollte niemals für die sichere Überprüfung als ausreichend betrachtet werden. + =back =head1 FEHLER @@ -133,7 +137,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-conffiles.pod b/man/de/deb-conffiles.pod index 7289abb..ce882d1 100644 --- a/man/de/deb-conffiles.pod +++ b/man/de/deb-conffiles.pod @@ -45,7 +45,7 @@ L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-control.pod b/man/de/deb-control.pod index a8ceecd..29f017c 100644 --- a/man/de/deb-control.pod +++ b/man/de/deb-control.pod @@ -258,7 +258,7 @@ L, L, L, L, L =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-extra-override.pod b/man/de/deb-extra-override.pod index a17b809..b51dcb3 100644 --- a/man/de/deb-extra-override.pod +++ b/man/de/deb-extra-override.pod @@ -47,7 +47,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-md5sums.pod b/man/de/deb-md5sums.pod index 2e921e4..64e4dc2 100644 --- a/man/de/deb-md5sums.pod +++ b/man/de/deb-md5sums.pod @@ -44,7 +44,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-old.pod b/man/de/deb-old.pod index 69fd2d3..619ba0c 100644 --- a/man/de/deb-old.pod +++ b/man/de/deb-old.pod @@ -47,7 +47,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-origin.pod b/man/de/deb-origin.pod index 7f1dae7..1025ab1 100644 --- a/man/de/deb-origin.pod +++ b/man/de/deb-origin.pod @@ -69,7 +69,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-override.pod b/man/de/deb-override.pod index 4214851..2b6f3b3 100644 --- a/man/de/deb-override.pod +++ b/man/de/deb-override.pod @@ -47,7 +47,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-postinst.pod b/man/de/deb-postinst.pod index d4d4aef..930843b 100644 --- a/man/de/deb-postinst.pod +++ b/man/de/deb-postinst.pod @@ -63,7 +63,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-postrm.pod b/man/de/deb-postrm.pod index f35de10..107c252 100644 --- a/man/de/deb-postrm.pod +++ b/man/de/deb-postrm.pod @@ -75,7 +75,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-preinst.pod b/man/de/deb-preinst.pod index 6ee52f6..5679940 100644 --- a/man/de/deb-preinst.pod +++ b/man/de/deb-preinst.pod @@ -57,7 +57,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-prerm.pod b/man/de/deb-prerm.pod index c9d924e..af174b4 100644 --- a/man/de/deb-prerm.pod +++ b/man/de/deb-prerm.pod @@ -61,7 +61,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-shlibs.pod b/man/de/deb-shlibs.pod index 9f5ffe0..75d16cb 100644 --- a/man/de/deb-shlibs.pod +++ b/man/de/deb-shlibs.pod @@ -75,7 +75,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-split.pod b/man/de/deb-split.pod index ad9a08c..7d3550d 100644 --- a/man/de/deb-split.pod +++ b/man/de/deb-split.pod @@ -81,7 +81,7 @@ L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-src-control.pod b/man/de/deb-src-control.pod index 57c166f..1783abe 100644 --- a/man/de/deb-src-control.pod +++ b/man/de/deb-src-control.pod @@ -60,6 +60,12 @@ Die URL des Original- (Upstream-)Projekts. Die I der Fehlerdatenbank für dieses Paket. Das derzeit verwendete Format ist IB<://>I wie in B. Dieses Feld wird normalerweise nicht benötigt. +=item B I + +Dieses experiementelle Feld legt den Namen des Bautreibers fest, der zum Bau dieses Pakets verwendet werden soll. Falls nicht angegeben, ist die Vorgabe für I B. + +Dieses Feld wird seit Dpkg 1.22.7 unterstützt. + =item B B|B|I Dieses Feld wird verwandt, um anzuzeigen, ob die Datei B (fake)root-Priviliegien benötigt, um einige ihrer Ziele auszuführen, und falls ja, wann. @@ -308,7 +314,7 @@ I<%PKGDOCDIR%/spec/rootless-builds.txt>, L, L, L, 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-src-files.pod b/man/de/deb-src-files.pod index cac44e3..61b7247 100644 --- a/man/de/deb-src-files.pod +++ b/man/de/deb-src-files.pod @@ -49,7 +49,7 @@ L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-src-rules.pod b/man/de/deb-src-rules.pod index ea0ff16..b8ff83a 100644 --- a/man/de/deb-src-rules.pod +++ b/man/de/deb-src-rules.pod @@ -67,7 +67,7 @@ L, L, L, L, 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-src-symbols.pod b/man/de/deb-src-symbols.pod index b54b8b0..7840a97 100644 --- a/man/de/deb-src-symbols.pod +++ b/man/de/deb-src-symbols.pod @@ -212,7 +212,7 @@ L, L, L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-substvars.pod b/man/de/deb-substvars.pod index 48193c6..139413c 100644 --- a/man/de/deb-substvars.pod +++ b/man/de/deb-substvars.pod @@ -30,7 +30,7 @@ Eine Variablenersetzung hat die Form B<${>IB<}>. Variablennamen b =head2 Dateisyntax -Ersetzungsvariablen können in einer Datei festgelegt werden. Diese Dateien bestehen aus Zeilen der Form IB<=>I oder IBI. Der Operator B<=> weist eine normale Ersetzungsvariable zu, während der Operator B (seit Dpkg 1.21.8) eine optionale Ersetzungsvariable zuweist, die keine Warnungen ausgibt, selbst wenn sie nicht verwandt wird. Leerraumzeichen am Zeilenende, leere Zeilen und Zeilen, die mit dem B<#>-Symbol starten (Kommentare) werden ignoriert. +Substitution variables can be specified in a file. These files consist of lines of the form IB<=>I, IBI, or IBI. The B<=> operator assigns a normal substitution variable, the B operator (since dpkg 1.21.8) assigns an optional substitution variable which will emit no warnings even if unused, and the B operator (since dpkg 1.22.7) assigns a required substitution variable which will error out if unused. Trailing whitespace on each line, blank lines, and lines starting with a B<#> symbol (comments) are ignored. =head2 Ersetzungen @@ -156,7 +156,7 @@ L, L, L, L, L, 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-symbols.pod b/man/de/deb-symbols.pod index feb7058..d99163a 100644 --- a/man/de/deb-symbols.pod +++ b/man/de/deb-symbols.pod @@ -86,7 +86,7 @@ L, L =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-triggers.pod b/man/de/deb-triggers.pod index d17db78..41ec1d0 100644 --- a/man/de/deb-triggers.pod +++ b/man/de/deb-triggers.pod @@ -71,7 +71,7 @@ L, L, B<%PKGDOCDIR%/spec/triggers.txt>. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb-version.pod b/man/de/deb-version.pod index e92eed6..5c2bbed 100644 --- a/man/de/deb-version.pod +++ b/man/de/deb-version.pod @@ -77,7 +77,7 @@ L, L, L =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb.pod b/man/de/deb.pod index 88efc68..7fd3cb6 100644 --- a/man/de/deb.pod +++ b/man/de/deb.pod @@ -63,7 +63,7 @@ L, L, L, L, L, 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/deb822.pod b/man/de/deb822.pod index f622485..00f5d48 100644 --- a/man/de/deb822.pod +++ b/man/de/deb822.pod @@ -83,7 +83,7 @@ B, B. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/dpkg-architecture.pod b/man/de/dpkg-architecture.pod index 05a739f..4d849e3 100644 --- a/man/de/dpkg-architecture.pod +++ b/man/de/dpkg-architecture.pod @@ -455,7 +455,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/dpkg-build-api.pod b/man/de/dpkg-build-api.pod index 05f2b60..179a956 100644 --- a/man/de/dpkg-build-api.pod +++ b/man/de/dpkg-build-api.pod @@ -80,7 +80,7 @@ L. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/dpkg-buildapi.pod b/man/de/dpkg-buildapi.pod index f4fdf45..7d8a50f 100644 --- a/man/de/dpkg-buildapi.pod +++ b/man/de/dpkg-buildapi.pod @@ -58,6 +58,14 @@ Gibt die Haupt-B-Datei an, aus der Informationen gelesen werden sollen. Die zu verwendende Bau-API-Stufe. Dies ist zur internen Verwendung von Werkzeugen, die F ausführt, gedacht, um das mehrfache Auswerten von F zu vermeiden und die globale Bau-API-Stufe nicht aus F zu setzen. Andernfalls können Bau-Treiber (wie L) nicht darauf zugreifen. +=item B + +Setzt den Farbmodus. Die derzeit unterstützten Werte sind: B (Vorgabe), B und B. + +=item B + +Falls dies gesetzt ist, wird es zur Entscheidung, ob Native Language Support, auch als Unterstützung für Internationalisierung (oder i18n) bekannt, aktiviert wird. Die akzeptierten Werte sind: B<0> und B<1> (Vorgabe). + =back =head1 DATEIEN @@ -75,7 +83,7 @@ Makefile-Schnippsel, das die Bau-API-Stufe auswerten wird. =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/dpkg-buildflags.pod b/man/de/dpkg-buildflags.pod index f27d1d0..2aef380 100644 --- a/man/de/dpkg-buildflags.pod +++ b/man/de/dpkg-buildflags.pod @@ -329,7 +329,7 @@ Wenn diese Funktionalität aktiviert ist, wird sie den Wert aus der gleichen Fun =item B -This setting (since dpkg 1.22.0; enabled by default except for i386, hurd-i386 and kfreebsd-i386 since dpkg 1.22.5) enables 64-bit time_t support on 32-bit architectures where their ABI does not include it by default, by adding B<-D_TIME_BITS=64> to B. This setting automatically enables the B feature from the B feature area. +Diese Einstellung (seit Dpkg 1.22.0; seit Dpkg 1.22.5 standardmäßig aktiviert außer für i386, hurd-i386 und kfreebsd-i386) aktiviert die Unterstützung von 64-bit time_t auf 32-bit-Architekturen bei denen das ABI dies nicht standardmäßig enthält, indem B<-D_TIME_BITS=64> zu B hinzugefügt wird. Diese Einstellung aktiviert automatisch die Funktionalität B von dem Funktionsbereich B. Falls diese Einstellung explizit aktiviert ist, dann wird sie auf allen Architekturen einschließlich i386 aktiviert, aber nicht auf hurd-i386 oder kfreebsd-i386 (wo der Kernel nicht über die Schnittstelle time64 verfügt) und die standardmäßige binäre Rückwärtskompatibilität wird ignoriert. @@ -357,7 +357,7 @@ Mehrere Optionen zur Kompilierung (Details weiter unten) können verwandt werden =item B -This setting (since dpkg 1.22.3; enabled by default since dpkg 1.22.6) adds B<-Werror=implicit-function-declaration> to B. +Diese Einstellung (seit Dpkg 1.22.3; seit Dpkg 1.22.6 standardmäßig aktiviert) fügt B<-Werror=implicit-function-declaration> zu B hinzu. =item B @@ -555,6 +555,10 @@ Diese Einstellung definiert den aktuellen Lieferanten. Falls nicht gesetzt, wird Diese Variable setzt den Baupfad (seit Dpkg 1.18.8), der in Funktionalitäten wie B verwandt wird, so dass sie durch den Aufrufenden gesteuert werden können. Diese Variable ist derzeit spezifisch für Debian und Derivative. +=item B + +Setzt die Host-Architektur. Dies betrifft die ausgegebenen Bausschalter, die typischerweise für das Cross-Bauen relevant sind, bei dem sich B von B unterscheidet. + =item B Setzt den Farbmodus (seit Dpkg 1.18.5). Die derzeit unterstützten Werte sind: B (Vorgabe), B und B. @@ -661,7 +665,7 @@ Und natürlich können Sie die Schalter manuell an Befehle weitergeben: =head1 ÜBERSETZUNG -Die deutsche Übersetzung wurde 2004, 2006-2023 von Helge Kreutzmann +Die deutsche Übersetzung wurde 2004, 2006-2024 von Helge Kreutzmann , 2007 von Florian Rehnisch und 2008 von Sven Joachim angefertigt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die diff --git a/man/de/dpkg-buildpackage.pod b/man/de/dpkg-buildpackage.pod index 4ba26b6..76b13f2 100644 --- a/man/de/dpkg-buildpackage.pod +++ b/man/de/dpkg-buildpackage.pod @@ -18,17 +18,21 @@ dpkg-buildpackage - Binär- oder Quellpakete aus Quellen bauen =head1 ÜBERSICHT -B [I