From f23ca86fe037f13f744c588b07e4c9140a534894 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 12 Aug 2016 01:36:55 +0200 Subject: debian: Install etc/apt if present (e.g., on Ubuntu) On Ubuntu, cmake installs are vendor-specific apt.conf.d snippet, causing the build to fail. --- debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index b6dfc96ea..1ea0e872b 100755 --- a/debian/rules +++ b/debian/rules @@ -19,7 +19,8 @@ override_dh_install-indep: override_dh_install-arch: dh_movefiles - dh_install --fail-missing + if [ -e debian/tmp/etc/apt ]; then dh_install -papt etc/apt/* etc/apt; fi + dh_install --list-missing install -m 644 debian/apt.conf.autoremove debian/apt/etc/apt/apt.conf.d/01autoremove install -m 755 debian/apt.auto-removal.sh debian/apt/etc/kernel/postinst.d/apt-auto-removal -- cgit v1.2.3 From ade5888b4107f3181abd2a7dd15d8b2b4a997f82 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 15:52:14 +0200 Subject: CMake: Translations: Don't rebuild .mo for line number changes If only the line numbers changed in a file without any of the translatable strings changing, the .po and .mo files were rebuilt, making building simple code changes somewhat annoying. We can work around this by passing --add-location=file to msgcomm when we are creating the temporary .pot file used for building the .mo files. --- CMake/Translations.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index 509e4e378..d7e992b3e 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -67,13 +67,16 @@ function(apt_add_translation_domain) # build a ${domain.pot}-tmp as a byproduct. The msgfmt command than depend # on the byproduct while their target depends on the output, so that msgfmt # does not have to be rerun if nothing in the template changed. + # + # Make sure the .pot-tmp has no line numbers, to avoid useless rebuilding + # of .mo files. add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp COMMAND msgcomm --more-than=0 --sort-by-file ${sh_pot} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot - COMMAND msgcomm --more-than=0 --omit-header --sort-by-file + COMMAND msgcomm --more-than=0 --omit-header --sort-by-file --add-location=file ${sh_pot} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0 -- cgit v1.2.3 From 0eaa491c63d0583812a795f872be71ea54e7f01d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 16:31:55 +0200 Subject: CMake: Translations: Pass --previous to msgmerge When updating our .po files, pass --previous to msgmerge to make it easier for translators to translate fuzzy strings. Thanks: Guillem Jover for the suggestion. --- CMake/Translations.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index d7e992b3e..c2d3901fd 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -149,7 +149,7 @@ function(apt_add_update_po) continue() endif() add_custom_target(update-po-${langcode} - COMMAND msgmerge -q --update --backup=none ${translation} ${output} + COMMAND msgmerge -q --previous --update --backup=none ${translation} ${output} DEPENDS nls-${master_name} ) add_dependencies(update-po update-po-${langcode}) -- cgit v1.2.3 From a6ae3d3df490e7a5a1c8324ba9dc2e63972b1529 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 13:00:33 +0200 Subject: Ignore SIGINT and SIGQUIT for Pre-Install hooks Instead of erroring out when receiving a SIGINT, let the child deal with it - we'll error out anyway if the child exits with an error or due to the signal. Also ignore SIGQUIT, as system() ignores it. This basically fixes Bug #832593, but: we are running the hooks via sh -c. Some shells exit with a signal error even if the command they are executing catches the signal and exits successfully. So far, this has been noticed on dash, which unfortunately, is our default shell. Example: $ cat trap.sh trap 'echo int' INT; sleep 10; exit 0 $ if dash -c ./trap.sh; then echo OK: $?; else echo FAIL: $?; fi ^Cint FAIL: 130 $ if mksh -c ./trap.sh; then echo OK: $?; else echo FAIL: $?; fi ^Cint OK: 0 $ if bash -c ./trap.sh; then echo OK: $?; else echo FAIL: $?; fi ^Cint OK: 0 --- apt-pkg/deb/dpkgpm.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 54a8dffd7..5759e6ba5 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -417,7 +417,6 @@ bool pkgDPkgPM::SendPkgsInfo(FILE * const F, unsigned int const &Version) bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) { bool result = true; - static bool interrupted = false; Configuration::Item const *Opts = _config->Tree(Cnf); if (Opts == 0 || Opts->Child == 0) @@ -425,9 +424,8 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) Opts = Opts->Child; sighandler_t old_sigpipe = signal(SIGPIPE, SIG_IGN); - sighandler_t old_sigint = signal(SIGINT, [](int signum){ - interrupted = true; - }); + sighandler_t old_sigint = signal(SIGINT, SIG_IGN); + sighandler_t old_sigquit = signal(SIGQUIT, SIG_IGN); unsigned int Count = 1; for (; Opts != 0; Opts = Opts->Next, Count++) @@ -528,9 +526,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) } signal(SIGINT, old_sigint); signal(SIGPIPE, old_sigpipe); - - if (interrupted) - result = _error->Error("Interrupted"); + signal(SIGQUIT, old_sigquit); return result; } -- cgit v1.2.3 From ecb8e9d77faf1940c0defb78f0078f66562373b7 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 18 Aug 2016 14:56:36 +0200 Subject: prepare-release: Use equivs and gdebi-core for travis deps Our previous hack did not really support or groups and other more advanced dependency types. This hack basically removes build profiles, and the @-type depends for tests, and otherwise converts the deps to a package which is then installed via gdebi. --- .travis.yml | 2 +- prepare-release | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 424172e04..7931bb39a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ before_install: sudo sh -c '/bin/echo -e "Package: *\nPin: release n=xenial\nPin-Priority: 1" > /etc/apt/preferences.d/xenial' - sudo apt-get update -qq install: - - sudo ./prepare-release travis-ci - sudo apt-get -qq -y -t wily install gettext liblz4-dev python3-apt - sudo apt-get -qq -y -t xenial install cmake + - sudo ./prepare-release travis-ci before_script: - ( mkdir build && cd build && cmake .. ) - make -C build -j4 diff --git a/prepare-release b/prepare-release index 1e434a305..f740f2152 100755 --- a/prepare-release +++ b/prepare-release @@ -26,6 +26,26 @@ librarysymbolsfromfile() { done | sort -u } +test_deb_control() { + echo "Package: apt-test-depends" + echo "Version: 1.0" + echo "Architecture: all" + printf "Depends:" + ( + for i in Build-Depends Build-Depends-Indep Build-Depends-Arch; do + grep-dctrl -ns $i -S apt ./debian/control && echo , + done + grep-dctrl -ns Depends -F Tests run-tests ./debian/tests/control + ) | tr '\n' ' '\ + | sed -r -e 's#<[^,<>()@]*>##g' \ + -e 's#@[^,<>()@]*@##g' \ + -e 's#dpkg-dev \([^)]*\)#dpkg-dev#g' \ + -e 's#debhelper \([^)]*\)#debhelper#g' \ + -e 's#@##g' \ + -e 's#,(\s+,)+#, #g' \ + -e 's#\s+# #g' +} + if [ "$1" = 'pre-export' ]; then libraryversioncheck() { local LIBRARY="$1" @@ -158,9 +178,11 @@ elif [ "$1" = 'buildlog' ]; then shift done elif [ "$1" = 'travis-ci' ]; then - apt-get install -qy --no-install-recommends dctrl-tools - apt-get install -qy --no-install-recommends $(grep-dctrl -S -s Build-Depends,Build-Depends-Indep,Build-Depends-Arch apt ./debian/control | sed -e 's#([^)]*)##g' -e 's#^Build-Depends\(-Indep\|-Arch\)\?: ##' -e 's#<.*>##g' | tr -s '\n,' ' ') - apt-get install -qy --no-install-recommends $(grep-dctrl -F Tests -s Depends run-tests ./debian/tests/control | tr -s '\n,' ' ' | cut -d'@' -f 4- | sed -e 's#gnupg1#gnupg2#' -e 's#gpgv1#gpgv2#') + apt-get install -qy --no-install-recommends dctrl-tools equivs gdebi-core + + test_deb_control > test-control + equivs-build test-control + gdebi -n apt-test-depends_1.0_all.deb elif [ "$1" = 'coverage' ]; then DIR="${2:-./coverage}" git clean -dfX # remove ignored build artefacts for a clean start -- cgit v1.2.3 From 6fbe5739701f4c63bcd5c68d9ecc19e9e28288de Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 18 Aug 2016 14:21:16 +0200 Subject: tests/control: Handle the gpg1/gpg2 mess a bit better Hardcoding gpgv1 and gnupg1 breaks Ubuntu, because on Ubuntu, these packages do not exist yet. Instead allow gnupg (<< 2) for gnupg1 and gnupg2 for gnupg (>= 2), so we cover all potential combinations. --- debian/tests/control | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/tests/control b/debian/tests/control index b7555dc2e..a282584fa 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,5 +1,8 @@ Tests: run-tests Restrictions: allow-stderr Depends: @, @builddeps@, fakeroot, wget, stunnel4, lsof, db-util, - gnupg, gnupg1, gpgv, gpgv1, + gnupg (>= 2) | gnupg2, + gnupg1 | gnupg (<< 2), + gpgv (>= 2) | gpgv2, + gpgv1 | gpgv (<< 2), libfile-fcntllock-perl, python3-apt -- cgit v1.2.3 From 35d74be55fccad485b105e97110bb1b153e0de74 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 18:21:04 +0200 Subject: CMake: Install config and logging directories These directories are essential for apt to work, so we should install them in the upstream build system and not just in the debian packaging... --- CMake/Misc.cmake | 13 +++++++++++++ CMakeLists.txt | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CMake/Misc.cmake b/CMake/Misc.cmake index 68ab22758..82cb4da37 100644 --- a/CMake/Misc.cmake +++ b/CMake/Misc.cmake @@ -86,3 +86,16 @@ function(path_join out path1 path2) set(${out} "${path1}/${path2}" PARENT_SCOPE) endif() endfunction() + +# install_empty_directories(path ...) +# +# Creates empty directories in the install destination dir. Paths may be +# absolute or relative; in the latter case, the value of CMAKE_INSTALL_PREFIX +# is prepended. +function(install_empty_directories) + foreach(path ${ARGN}) + path_join(full_path "${CMAKE_INSTALL_PREFIX}" "${path}") + INSTALL(CODE "MESSAGE(STATUS \"Creating directory: \$ENV{DESTDIR}${full_path}\")" + CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${full_path})") + endforeach() +endfunction() diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ed87b34b..ced68285d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,3 +143,16 @@ add_subdirectory(test) # Link update-po4a into the update-po target add_dependencies(update-po update-po4a) + +# Create our directories. +install_empty_directories( + ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/apt.conf.d + ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/preferences.d + ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/sources.list.d + ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/trusted.gpg.d + ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/cache/apt/archives/partial + ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt/lists/partial + ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt/mirrors/partial + ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt/periodic + ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/apt +) -- cgit v1.2.3 From 23ecbf33dbcea0025c9a72b8c33f5ffb3e5ae146 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 17:49:29 +0200 Subject: debian: Make better use of the tree installed by CMake This gets rid of the special casing of etc/apt, various example file installations handled by the upstream build system, and of course the directory creation for all dirs created by the upstream build system. --- debian/apt-doc.docs | 2 -- debian/apt-transport-https.dirs | 1 - debian/apt-utils.dirs | 3 --- debian/apt-utils.examples | 1 - debian/apt.dirs | 19 ------------------- debian/apt.examples | 1 - debian/apt.install | 2 ++ debian/libapt-pkg-doc.docs | 1 - debian/rules | 1 - 9 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 debian/apt-transport-https.dirs delete mode 100644 debian/apt-utils.dirs delete mode 100644 debian/apt-utils.examples delete mode 100644 debian/apt.examples diff --git a/debian/apt-doc.docs b/debian/apt-doc.docs index 2058000c1..3f26b3a2e 100644 --- a/debian/apt-doc.docs +++ b/debian/apt-doc.docs @@ -1,5 +1,3 @@ -build/docs/guide* -build/docs/offline* README.progress-reporting doc/external-dependency-solver-protocol.txt doc/external-installation-planner-protocol.txt diff --git a/debian/apt-transport-https.dirs b/debian/apt-transport-https.dirs deleted file mode 100644 index 3abb3fee8..000000000 --- a/debian/apt-transport-https.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib/apt/methods diff --git a/debian/apt-utils.dirs b/debian/apt-utils.dirs deleted file mode 100644 index de7fa756e..000000000 --- a/debian/apt-utils.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/apt/solvers -usr/lib/apt/planners -usr/bin diff --git a/debian/apt-utils.examples b/debian/apt-utils.examples deleted file mode 100644 index 25aadf996..000000000 --- a/debian/apt-utils.examples +++ /dev/null @@ -1 +0,0 @@ -doc/examples/apt-ftparchive.conf \ No newline at end of file diff --git a/debian/apt.dirs b/debian/apt.dirs index 7d46801df..bdc5adddb 100644 --- a/debian/apt.dirs +++ b/debian/apt.dirs @@ -1,20 +1 @@ -usr/bin -usr/lib/apt/methods -usr/lib/apt/solvers -usr/lib/apt/planners -usr/lib/dpkg/methods/apt -etc/apt -etc/apt/apt.conf.d -etc/apt/preferences.d -etc/apt/sources.list.d -etc/apt/trusted.gpg.d etc/kernel/postinst.d -etc/logrotate.d -var/cache/apt/archives/partial -var/lib/apt/lists/partial -var/lib/apt/mirrors/partial -var/lib/apt/periodic -var/log/apt -usr/share/bug/apt -usr/share/bash-completion/completions/ -lib/systemd/system/ diff --git a/debian/apt.examples b/debian/apt.examples deleted file mode 100644 index 622ef80b1..000000000 --- a/debian/apt.examples +++ /dev/null @@ -1 +0,0 @@ -build/docs/examples/* diff --git a/debian/apt.install b/debian/apt.install index a8a56c925..42b6df691 100644 --- a/debian/apt.install +++ b/debian/apt.install @@ -1,3 +1,4 @@ +etc/apt/ usr/bin/apt usr/bin/apt-get usr/bin/apt-cache @@ -37,3 +38,4 @@ usr/lib/apt/apt-helper usr/share/doc/apt debian/apt.systemd.daily usr/lib/apt +var/ diff --git a/debian/libapt-pkg-doc.docs b/debian/libapt-pkg-doc.docs index dcacac18b..b57607e31 100644 --- a/debian/libapt-pkg-doc.docs +++ b/debian/libapt-pkg-doc.docs @@ -1,3 +1,2 @@ doc/libapt-pkg2_to_3.txt doc/style.txt -#build/doc/doxygen/html diff --git a/debian/rules b/debian/rules index 1ea0e872b..ab101c2e1 100755 --- a/debian/rules +++ b/debian/rules @@ -19,7 +19,6 @@ override_dh_install-indep: override_dh_install-arch: dh_movefiles - if [ -e debian/tmp/etc/apt ]; then dh_install -papt etc/apt/* etc/apt; fi dh_install --list-missing install -m 644 debian/apt.conf.autoremove debian/apt/etc/apt/apt.conf.d/01autoremove install -m 755 debian/apt.auto-removal.sh debian/apt/etc/kernel/postinst.d/apt-auto-removal -- cgit v1.2.3 From 113eaa29214124652e0605730efe028806624151 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 19:26:55 +0200 Subject: debian: Switch to debhelper 10 debhelper 10 is much nicer with the installation part from a dirty tree, so you can just fix some stuff breaking the install step and then continue building with debuild -b -nc until you have fixed all your stuff. It also has some other advantages, of course, like some bug fixes in shell escaping for maintscript, or systemd helper changes. --- debian/compat | 2 +- debian/control | 2 +- debian/rules | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/compat b/debian/compat index ec635144f..f599e28b8 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/debian/control b/debian/control index c383e2fc1..fea066dcb 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Uploaders: Michael Vogt , Julian Andres Klode , David Kalnischkies Standards-Version: 3.9.8 -Build-Depends: dpkg-dev (>= 1.17.14), debhelper (>= 9.20141010), libdb-dev, +Build-Depends: dpkg-dev (>= 1.17.14), debhelper (>= 9.20160709~), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.4~), zlib1g-dev, libbz2-dev, liblzma-dev, liblz4-dev (>= 0.0~r126), xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), diff --git a/debian/rules b/debian/rules index ab101c2e1..cc2e36fba 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL=0 export CTEST_OUTPUT_ON_FAILURE=1 %: - dh $@ --with systemd --parallel --buildsystem=cmake + dh $@ override_dh_install-indep: dh_movefiles -- cgit v1.2.3 From 9956b3e188901244f40e29d6d4a40a093fa26177 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 19:42:45 +0200 Subject: debian: Add more lintian overrides --- debian/apt.lintian-overrides | 3 +++ debian/libapt-pkg-doc.lintian-overrides | 1 + 2 files changed, 4 insertions(+) diff --git a/debian/apt.lintian-overrides b/debian/apt.lintian-overrides index e51d1119f..7d1e892a3 100644 --- a/debian/apt.lintian-overrides +++ b/debian/apt.lintian-overrides @@ -1,2 +1,5 @@ # the private library is for internal sharing only apt: package-name-doesnt-match-sonames +apt: systemd-service-file-missing-install-key lib/systemd/system/apt-daily.service +apt: shlib-calls-exit usr/lib*/libapt-private.so.0.0.0 +apt: no-symbols-control-file usr/lib*/libapt-private.so.0.0.0 diff --git a/debian/libapt-pkg-doc.lintian-overrides b/debian/libapt-pkg-doc.lintian-overrides index d583d9a87..d7cbc437e 100644 --- a/debian/libapt-pkg-doc.lintian-overrides +++ b/debian/libapt-pkg-doc.lintian-overrides @@ -1,2 +1,3 @@ # embedded by doxygen, see /usr/share/doc/doxygen/README.jquery libapt-pkg-doc: embedded-javascript-library +libapt-pkg-doc: duplicate-files usr/share/doc/libapt-pkg-doc/html/* -- cgit v1.2.3 From 20d2f4a4f164cd9026dad698e471c95d7c28973b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 19:49:54 +0200 Subject: debian: Drop outdated stuff The README.source is not usable anymore, and the Build-Conflicts andd Breaks/Replaces are not needed anymore. --- debian/README.source | 6 ------ debian/control | 3 --- 2 files changed, 9 deletions(-) delete mode 100644 debian/README.source diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 9da152556..000000000 --- a/debian/README.source +++ /dev/null @@ -1,6 +0,0 @@ -Build this package with: -$ debian/rules arch-build -or -$ DEB_BUILD_PROG_OPTS="-S" debian/rules arch-build - -make sure you have the pre-build-depds in README.arch installed diff --git a/debian/control b/debian/control index fea066dcb..cb07b8629 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,6 @@ Build-Depends: dpkg-dev (>= 1.17.14), debhelper (>= 9.20160709~), libdb-dev, xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), cmake (>= 3.4), pkg-config, libgtest-dev , dh-systemd Build-Depends-Indep: doxygen, w3m, graphviz -Build-Conflicts: autoconf2.13, automake1.4 Vcs-Git: https://anonscm.debian.org/git/apt/apt.git Vcs-Browser: https://anonscm.debian.org/git/apt/apt.git Testsuite: autopkgtest @@ -20,8 +19,6 @@ Testsuite: autopkgtest Package: apt Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${apt:keyring}, gpgv | gpgv2 | gpgv1, adduser -Replaces: manpages-pl (<< 20060617-3~), manpages-it (<< 2.80-4~), sun-java6-jdk (>> 0), sun-java5-jdk (>> 0), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~), bash-completion (<< 1:2.1-4.2+fakesync1), apt-utils (<< 1.3~exp2~) -Breaks: manpages-pl (<< 20060617-3~), manpages-it (<< 2.80-4~), sun-java6-jdk (>> 0), sun-java5-jdk (>> 0), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~), apt-utils (<< 1.3~exp2~) Recommends: gnupg | gnupg2 | gnupg1 Suggests: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt, powermgmt-base Description: commandline package manager -- cgit v1.2.3 From 29742f9563256f2e9dea409f5a923154a93a9359 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Aug 2016 20:03:36 +0200 Subject: debian: Run wrap-and-sort Manually clean up the apt.maintscript, it moved stuff from before the comment to after the comment... --- COPYING | 1 - debian/apt-doc.docs | 2 +- debian/apt-utils.install | 23 +++++++----------- debian/apt.install | 44 +++++++++++++++++----------------- debian/apt.maintscript | 1 - debian/control | 55 ++++++++++++++++++++++++++++++------------- debian/libapt-pkg-dev.install | 4 ++-- 7 files changed, 71 insertions(+), 59 deletions(-) diff --git a/COPYING b/COPYING index c0e89b51a..2f9ab10e8 100644 --- a/COPYING +++ b/COPYING @@ -20,4 +20,3 @@ License: GPLv2+ See /usr/share/common-licenses/GPL-2, or for the terms of the latest version of the GNU General Public License. - diff --git a/debian/apt-doc.docs b/debian/apt-doc.docs index 3f26b3a2e..bd494002c 100644 --- a/debian/apt-doc.docs +++ b/debian/apt-doc.docs @@ -1,4 +1,4 @@ README.progress-reporting +doc/acquire-additional-files.txt doc/external-dependency-solver-protocol.txt doc/external-installation-planner-protocol.txt -doc/acquire-additional-files.txt diff --git a/debian/apt-utils.install b/debian/apt-utils.install index 178b528b7..a27f1e1e4 100644 --- a/debian/apt-utils.install +++ b/debian/apt-utils.install @@ -1,20 +1,13 @@ -usr/share/locale/*/*/apt-utils.mo - +usr/bin/apt-extracttemplates usr/bin/apt-ftparchive usr/bin/apt-sortpkgs -usr/bin/apt-extracttemplates - -usr/share/man/*/apt-ftparchive.* +usr/lib/apt/planners/ +usr/lib/apt/solvers/ +usr/share/doc/apt-utils +usr/share/locale/*/*/apt-utils.mo +usr/share/man/*/*/apt-extracttemplates.* usr/share/man/*/*/apt-ftparchive.* - -usr/share/man/*/apt-sortpkgs.* usr/share/man/*/*/apt-sortpkgs.* - usr/share/man/*/apt-extracttemplates.* -usr/share/man/*/*/apt-extracttemplates.* - - -usr/lib/apt/solvers/ -usr/lib/apt/planners/ - -usr/share/doc/apt-utils +usr/share/man/*/apt-ftparchive.* +usr/share/man/*/apt-sortpkgs.* diff --git a/debian/apt.install b/debian/apt.install index 42b6df691..82f2f0806 100644 --- a/debian/apt.install +++ b/debian/apt.install @@ -1,41 +1,39 @@ +debian/*.service /lib/systemd/system/ +debian/*.timer /lib/systemd/system/ +debian/apt.systemd.daily usr/lib/apt etc/apt/ usr/bin/apt -usr/bin/apt-get usr/bin/apt-cache usr/bin/apt-cdrom usr/bin/apt-config +usr/bin/apt-get usr/bin/apt-key usr/bin/apt-mark +usr/lib/*/libapt-private.so* +usr/lib/apt/apt-helper usr/lib/apt/methods/ usr/lib/dpkg/methods/apt/ +usr/share/bash-completion/completions/ +usr/share/doc/apt usr/share/locale/*/*/apt.mo -usr/lib/*/libapt-private.so* -usr/share/man/*/apt.* -usr/share/man/*/apt-get.* -usr/share/man/*/apt-cache.* -usr/share/man/*/apt-cdrom.* -usr/share/man/*/apt-config.* -usr/share/man/*/apt-key.* -usr/share/man/*/apt-mark.* -usr/share/man/*/apt-secure.* -usr/share/man/*/sources.list.* -usr/share/man/*/apt_preferences.* -usr/share/man/*/*/apt.* -usr/share/man/*/*/apt-get.* usr/share/man/*/*/apt-cache.* usr/share/man/*/*/apt-cdrom.* usr/share/man/*/*/apt-config.* +usr/share/man/*/*/apt-get.* usr/share/man/*/*/apt-key.* usr/share/man/*/*/apt-mark.* usr/share/man/*/*/apt-secure.* -usr/share/man/*/*/sources.list.* +usr/share/man/*/*/apt.* usr/share/man/*/*/apt_preferences.* -usr/share/bash-completion/completions/ -debian/*.service /lib/systemd/system/ -debian/*.timer /lib/systemd/system/ -usr/lib/apt/apt-helper - -usr/share/doc/apt - -debian/apt.systemd.daily usr/lib/apt +usr/share/man/*/*/sources.list.* +usr/share/man/*/apt-cache.* +usr/share/man/*/apt-cdrom.* +usr/share/man/*/apt-config.* +usr/share/man/*/apt-get.* +usr/share/man/*/apt-key.* +usr/share/man/*/apt-mark.* +usr/share/man/*/apt-secure.* +usr/share/man/*/apt.* +usr/share/man/*/apt_preferences.* +usr/share/man/*/sources.list.* var/ diff --git a/debian/apt.maintscript b/debian/apt.maintscript index f461e673a..296f83bd5 100644 --- a/debian/apt.maintscript +++ b/debian/apt.maintscript @@ -1,4 +1,3 @@ rm_conffile /etc/apt/apt.conf.d/20changelog 1.2.4~ # we use a systemd timer unit now rm_conffile /etc/cron.daily/apt 1.2.10~ - diff --git a/debian/control b/debian/control index cb07b8629..d4dc4e323 100644 --- a/debian/control +++ b/debian/control @@ -3,24 +3,44 @@ Section: admin Priority: important Maintainer: APT Development Team Uploaders: Michael Vogt , - Julian Andres Klode , - David Kalnischkies + Julian Andres Klode , + David Kalnischkies Standards-Version: 3.9.8 -Build-Depends: dpkg-dev (>= 1.17.14), debhelper (>= 9.20160709~), libdb-dev, - gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.4~), - zlib1g-dev, libbz2-dev, liblzma-dev, liblz4-dev (>= 0.0~r126), - xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), - cmake (>= 3.4), pkg-config, libgtest-dev , dh-systemd -Build-Depends-Indep: doxygen, w3m, graphviz +Build-Depends: cmake (>= 3.4), + debhelper (>= 9.20160709~), + dh-systemd, + docbook-xml, + docbook-xsl, + dpkg-dev (>= 1.17.14), + gettext (>= 0.12), + libbz2-dev, + libcurl4-gnutls-dev (>= 7.19.4~), + libdb-dev, + libgtest-dev , + liblz4-dev (>= 0.0~r126), + liblzma-dev, + pkg-config, + po4a (>= 0.34-2), + xsltproc, + zlib1g-dev +Build-Depends-Indep: doxygen, graphviz, w3m Vcs-Git: https://anonscm.debian.org/git/apt/apt.git Vcs-Browser: https://anonscm.debian.org/git/apt/apt.git Testsuite: autopkgtest Package: apt Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${apt:keyring}, gpgv | gpgv2 | gpgv1, adduser +Depends: adduser, + gpgv | gpgv2 | gpgv1, + ${apt:keyring}, + ${misc:Depends}, + ${shlibs:Depends} Recommends: gnupg | gnupg2 | gnupg1 -Suggests: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt, powermgmt-base +Suggests: apt-doc, + aptitude | synaptic | wajig, + dpkg-dev (>= 1.17.2), + powermgmt-base, + python-apt Description: commandline package manager This package provides commandline tools for searching and managing as well as querying information about packages @@ -40,8 +60,8 @@ Package: libapt-pkg5.0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, ${misc:Depends} -Breaks: apt (<< 1.1~exp14), libapt-inst1.5 (<< 0.9.9~), appstream (<< 0.9.0-3~) +Depends: ${misc:Depends}, ${shlibs:Depends} +Breaks: appstream (<< 0.9.0-3~), apt (<< 1.1~exp14), libapt-inst1.5 (<< 0.9.9~) Recommends: apt (>= ${binary:Version}) Section: libs Provides: libapt-pkg (= ${binary:Version}) @@ -65,7 +85,7 @@ Package: libapt-inst2.0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Section: libs Provides: libapt-inst (= ${binary:Version}) Description: deb package format runtime library @@ -87,7 +107,10 @@ Architecture: any Multi-Arch: same Priority: optional Pre-Depends: ${misc:Pre-Depends} -Depends: libapt-pkg (= ${binary:Version}), libapt-inst (= ${binary:Version}), ${misc:Depends}, zlib1g-dev +Depends: libapt-inst (= ${binary:Version}), + libapt-pkg (= ${binary:Version}), + zlib1g-dev, + ${misc:Depends} Section: libdevel Description: development files for APT's libapt-pkg and libapt-inst This package contains the header files and libraries for @@ -108,7 +131,7 @@ Description: documentation for APT development Package: apt-utils Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, apt (= ${binary:Version}) +Depends: apt (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Description: package management related utility programs This package contains some less used commandline utilities related to package management with APT. @@ -121,7 +144,7 @@ Description: package management related utility programs Package: apt-transport-https Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: ca-certificates Priority: optional Description: https download transport for APT diff --git a/debian/libapt-pkg-dev.install b/debian/libapt-pkg-dev.install index e85dc9934..42e7c34d5 100644 --- a/debian/libapt-pkg-dev.install +++ b/debian/libapt-pkg-dev.install @@ -1,3 +1,3 @@ -usr/lib/*/libapt-pkg*.so -usr/lib/*/libapt-inst*.so usr/include/apt-pkg/ +usr/lib/*/libapt-inst*.so +usr/lib/*/libapt-pkg*.so -- cgit v1.2.3 From 99fd3fd5943883d947f2f6cd6a7fd9faf0dcc0bf Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 20 Aug 2016 00:25:34 +0200 Subject: debian: Get rid of dh_movefiles again This workaround is a bit more ugly, but does not use a (somewhat) deprecated debhelper command. Gbp-Dch: ignore --- debian/apt-transport-https.files | 1 - debian/apt-transport-https.install | 1 + debian/apt.files | 2 -- debian/apt.install | 2 ++ debian/rules | 6 +++--- 5 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 debian/apt-transport-https.files create mode 100644 debian/apt-transport-https.install delete mode 100644 debian/apt.files diff --git a/debian/apt-transport-https.files b/debian/apt-transport-https.files deleted file mode 100644 index 7b14886df..000000000 --- a/debian/apt-transport-https.files +++ /dev/null @@ -1 +0,0 @@ -usr/lib/apt/methods/https diff --git a/debian/apt-transport-https.install b/debian/apt-transport-https.install new file mode 100644 index 000000000..7b14886df --- /dev/null +++ b/debian/apt-transport-https.install @@ -0,0 +1 @@ +usr/lib/apt/methods/https diff --git a/debian/apt.files b/debian/apt.files deleted file mode 100644 index 572475192..000000000 --- a/debian/apt.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/apt/solvers/dump -usr/lib/apt/planners/dump diff --git a/debian/apt.install b/debian/apt.install index 82f2f0806..2c2187849 100644 --- a/debian/apt.install +++ b/debian/apt.install @@ -12,6 +12,8 @@ usr/bin/apt-mark usr/lib/*/libapt-private.so* usr/lib/apt/apt-helper usr/lib/apt/methods/ +usr/lib/apt/planners/dump +usr/lib/apt/solvers/dump usr/lib/dpkg/methods/apt/ usr/share/bash-completion/completions/ usr/share/doc/apt diff --git a/debian/rules b/debian/rules index cc2e36fba..24608a6b8 100755 --- a/debian/rules +++ b/debian/rules @@ -14,12 +14,12 @@ export CTEST_OUTPUT_ON_FAILURE=1 dh $@ override_dh_install-indep: - dh_movefiles dh_install --list-missing override_dh_install-arch: - dh_movefiles - dh_install --list-missing + dh_install -papt-utils -X/dump + dh_install -papt -Xmethods/https + dh_install --remaining --list-missing install -m 644 debian/apt.conf.autoremove debian/apt/etc/apt/apt.conf.d/01autoremove install -m 755 debian/apt.auto-removal.sh debian/apt/etc/kernel/postinst.d/apt-auto-removal -- cgit v1.2.3 From c43a7ed46ce5fb88235c954dc210dd02a5e6e377 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 20 Aug 2016 01:15:27 +0200 Subject: CMake: Translations: Build byproduct before output This can lead to an inconsistent state otherwise, with the output being updated and the byproduct not; for example, when the build was manually interrupted. --- CMake/Translations.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index c2d3901fd..3562172bd 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -72,14 +72,14 @@ function(apt_add_translation_domain) # of .mo files. add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp - COMMAND msgcomm --more-than=0 --sort-by-file - ${sh_pot} - ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot - --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot COMMAND msgcomm --more-than=0 --omit-header --sort-by-file --add-location=file ${sh_pot} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0 + COMMAND msgcomm --more-than=0 --sort-by-file + ${sh_pot} + ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot + --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0 ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp -- cgit v1.2.3 From ee60e00ccc68104cae56a854ffd2fb65a959ce57 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 20 Aug 2016 14:41:33 +0200 Subject: CMake: Fix uninitialized variables This fixes some actual bugs for PROJECT and BZIP2_INCLUDE_DIR. Gbp-Dch: ignore --- CMake/Documentation.cmake | 4 +++- CMake/Translations.cmake | 1 + apt-pkg/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMake/Documentation.cmake b/CMake/Documentation.cmake index 9e7135ea4..f679b82e1 100644 --- a/CMake/Documentation.cmake +++ b/CMake/Documentation.cmake @@ -75,7 +75,7 @@ function(po4a_one stamp_out out full_document language deps) OUTPUT ${stamp} COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${language} COMMAND po4a --previous --no-backups - --package-name='${PROJECT}-doc' + --package-name='${PROJECT_NAME}-doc' --package-version='${PACKAGE_VERSION}' --msgid-bugs-address='${PACKAGE_MAIL}' --translate-only ${dest}.${ext} @@ -124,6 +124,7 @@ function(xsltproc_one) set(manpage_output "${CMAKE_CURRENT_BINARY_DIR}/${document}.${section}") endif() set(manpage_stylesheet "${CMAKE_CURRENT_SOURCE_DIR}/manpage-style.xsl") + set(manpage_params) install(FILES ${manpage_output} DESTINATION ${CMAKE_INSTALL_MANDIR}/${language}/man${section} @@ -221,6 +222,7 @@ endfunction() function(add_docbook target) set(generated "") set(options HTML TEXT MANPAGE ALL) + set(oneValueArgs) set(multiValueArgs INSTALL DOCUMENTS LINGUAS DEPENDS) cmake_parse_arguments(DOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index 3562172bd..79f2633a7 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -11,6 +11,7 @@ function(apt_add_translation_domain) set(abs_files "") set(scripts "") set(abs_scripts "") + set(mofiles) set(targets ${NLS_TARGETS}) set(domain ${NLS_DOMAIN}) set(xgettext_params diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index ec78f49c4..a90bb1d8c 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -26,7 +26,7 @@ add_dependencies(apt-pkg apt-pkg-versionscript) # Link the library and set the SONAME target_include_directories(apt-pkg PRIVATE ${ZLIB_INCLUDE_DIRS} - ${BZIP2_INCLUDE_DIRS} + ${BZIP2_INCLUDE_DIR} ${LZMA_INCLUDE_DIRS} ${LZ4_INCLUDE_DIRS}) target_link_libraries(apt-pkg -- cgit v1.2.3 From ab59037f9e62bf7ab7eb859c26cd19882d17ee04 Mon Sep 17 00:00:00 2001 From: Zhou Mo Date: Sat, 20 Aug 2016 13:32:17 +0000 Subject: zh_CN.po: update simplified Chinese translation --- po/zh_CN.po | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index 03acbe108..3371e8fc9 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: apt 1.2.x\n" "Report-Msgid-Bugs-To: APT Development Team \n" "POT-Creation-Date: 2016-08-17 23:47+0200\n" -"PO-Revision-Date: 2016-06-27 08:00+0000\n" +"PO-Revision-Date: 2016-08-20 13:00+0000\n" "Last-Translator: Zhou Mo \n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" @@ -361,12 +361,12 @@ msgstr "%s=%s 的 Changelog 不可用" #: apt-pkg/acquire-worker.cc #, c-format msgid "The method '%s' is explicitly disabled via configuration." -msgstr "" +msgstr "方法‘%s’已经被显式设置为禁用。" #: apt-pkg/acquire-worker.cc methods/connect.cc #, c-format msgid "If you meant to use Tor remember to use %s instead of %s." -msgstr "" +msgstr "如果您需要使用Tor,请确认使用%s而不是%s。" #: apt-pkg/acquire-worker.cc #, c-format @@ -1223,43 +1223,39 @@ msgstr "无法写入临时状态文件 %s" #: apt-pkg/edsp.cc msgid "Send scenario to solver" -msgstr "向solver发送情景" +msgstr "向依赖解决器发送情景" #: apt-pkg/edsp.cc msgid "Send request to solver" -msgstr "向solver发送请求" +msgstr "向依赖解决器发送请求" #: apt-pkg/edsp.cc msgid "Prepare for receiving solution" -msgstr "准备接收解决方案" +msgstr "准备接收依赖解决方案" #: apt-pkg/edsp.cc msgid "External solver failed without a proper error message" -msgstr "外部solver出错,错误信息不恰当" +msgstr "外部依赖解决器出错,错误信息不恰当" #: apt-pkg/edsp.cc msgid "Execute external solver" -msgstr "执行外部solver" +msgstr "执行外部依赖解决器" #: apt-pkg/edsp.cc -#, fuzzy msgid "Execute external planner" -msgstr "执行外部solver" +msgstr "执行外部安装顺序规划器" #: apt-pkg/edsp.cc -#, fuzzy msgid "Send request to planner" -msgstr "向solver发送请求" +msgstr "向安装顺序规划器发送请求" #: apt-pkg/edsp.cc -#, fuzzy msgid "Send scenario to planner" -msgstr "向solver发送情景" +msgstr "向安装顺序规划器发送情景" #: apt-pkg/edsp.cc -#, fuzzy msgid "External planner failed without a proper error message" -msgstr "外部solver出错,错误信息不恰当" +msgstr "外部安装顺序规划器出错,错误信息不恰当" #: apt-pkg/indexcopy.cc #, c-format @@ -2804,7 +2800,6 @@ msgid "detect proxy using apt.conf" msgstr "用 apt.conf 检测代理设置" #: cmdline/apt-internal-planner.cc -#, fuzzy msgid "" "Usage: apt-internal-planner\n" "\n" @@ -2812,10 +2807,10 @@ msgid "" "installation planner for the APT family like an external one,\n" "for debugging or the like.\n" msgstr "" -"用法: apt-internal-solver\n" +"用法: apt-internal-planner\n" "\n" -"apt-internal-solver 可以像外部解析器那样使用当前的APT家族内部解析器,\n" -"以便调试等用途。\n" +"apt-internal-planner 是一个可以像外部规划器那样使用当前的APT家族内部\n" +"安装顺序规划器的接口,以便调试等用途。\n" #: cmdline/apt-internal-solver.cc msgid "" @@ -2827,8 +2822,8 @@ msgid "" msgstr "" "用法: apt-internal-solver\n" "\n" -"apt-internal-solver 可以像外部解析器那样使用当前的APT家族内部解析器,\n" -"以便调试等用途。\n" +"apt-internal-solver 是一个可以像外部解析器那样使用当前的APT家族内部\n" +"依赖解析器的接口,以便调试等用途。\n" #: cmdline/apt-mark.cc #, c-format @@ -3358,7 +3353,7 @@ msgstr "无法找到文件" #: methods/connect.cc #, c-format msgid "Direct connection to %s domains is blocked by default." -msgstr "" +msgstr "通向 %s 域名的直接连接被设为默认阻止。" #: methods/connect.cc methods/http.cc #, c-format -- cgit v1.2.3 From fb51ce3295929947555f4883054f210a53d9fbdf Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 22 Aug 2016 21:33:38 +0200 Subject: do dpkg --configure before --remove/--purge --pending Commit 7ec343309b7bc6001b465c870609b3c570026149 got us most of the way, but the last mile was botched by having the pending calls in the wrong order as this way we potentially 'force' dpkg to remove/purge a package it doesn't want to as another package still depends on it and the replacement isn't fully installed yet. So what we do now is a configure before remove and purge (all with --no-triggers) and finishing off with another configure pending call to take care of the triggers. Note that in the bugreport example our current planner is forcing dpkg to remove the package earlier via --force-depends which we could do for the pending calls as well and could be used as a workaround, but we want to do less forcing eventually. Closes: 835094 --- apt-pkg/deb/dpkgpm.cc | 10 +++-- .../test-bug-835094-configure-before-purge | 44 ++++++++++++++++++++++ .../test-no-fds-leaked-to-maintainer-scripts | 1 + 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100755 test/integration/test-bug-835094-configure-before-purge diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 5759e6ba5..b0700bcc6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1535,9 +1535,13 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) if (I.Op == Item::Remove || I.Op == Item::Purge) toBeRemoved[I.Pkg->ID] = false; - if (std::find(toBeRemoved.begin(), toBeRemoved.end(), true) != toBeRemoved.end()) + bool const RemovePending = std::find(toBeRemoved.begin(), toBeRemoved.end(), true) != toBeRemoved.end(); + bool const PurgePending = approvedStates.Purge().empty() == false; + if (RemovePending != false || PurgePending != false) + List.emplace_back(Item::ConfigurePending, pkgCache::PkgIterator()); + if (RemovePending) List.emplace_back(Item::RemovePending, pkgCache::PkgIterator()); - if (approvedStates.Purge().empty() == false) + if (PurgePending) List.emplace_back(Item::PurgePending, pkgCache::PkgIterator()); // support subpressing of triggers processing for special @@ -1606,7 +1610,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) unsigned long const Op = I->Op; if (NoTriggers == true && I->Op != Item::TriggersPending && - I->Op != Item::ConfigurePending) + (I->Op != Item::ConfigurePending || std::next(I) != List.end())) { ADDARGC("--no-triggers"); } diff --git a/test/integration/test-bug-835094-configure-before-purge b/test/integration/test-bug-835094-configure-before-purge new file mode 100755 index 000000000..16a196ccd --- /dev/null +++ b/test/integration/test-bug-835094-configure-before-purge @@ -0,0 +1,44 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +buildsimplenativepackage 'kernel' 'amd64' '1' 'unstable' 'Depends: initramfs-tools | linux-initramfs-tool' + +#buildsimplenativepackage 'initramfs-tools' 'amd64' '1.0.16' 'unstable' 'Provides: linux-initramfs-tool' +setupsimplenativepackage 'initramfs-tools' 'amd64' '1' 'unstable' 'Provides: linux-initramfs-tool' +BUILDDIR='incoming/initramfs-tools-1' +mkdir -p "${BUILDDIR}/debian/initramfs-tools/etc" +echo 'foo2=bar2;' > "${BUILDDIR}/init.conf" +echo 'init.conf /etc/init.conf' >> "${BUILDDIR}/debian/install" +buildpackage "$BUILDDIR" 'unstable' 'main' 'native' +rm -rf "$BUILDDIR" + +buildsimplenativepackage 'dracut' 'amd64' '1' 'unstable' 'Provides: linux-initramfs-tool +Conflicts: initramfs-tools' + +setupaptarchive + +testdpkgnotinstalled 'kernel' 'initramfs-tools' 'dracut' +testsuccess apt install kernel -y +testdpkginstalled 'kernel' 'initramfs-tools' +testsuccess test -s rootdir/etc/init.conf +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + initramfs-tools* +The following NEW packages will be installed: + dracut +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Purg initramfs-tools [1] [kernel:amd64 ] +Inst dracut (1 unstable [amd64]) +Conf dracut (1 unstable [amd64])' apt install --purge dracut -s +testsuccess apt install --purge dracut -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 +testsuccess apt install --purge dracut -y +testdpkginstalled 'kernel' 'dracut' +testdpkgnotinstalled 'initramfs-tools' +testsuccess test ! -s rootdir/etc/init.conf diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts index 21b394055..baf85e311 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -79,6 +79,7 @@ status half-configured $PKGNAME 1.0 status half-installed $PKGNAME 1.0 status config-files $PKGNAME 1.0 status config-files $PKGNAME 1.0 +startup packages configure startup packages purge remove $PKGNAME 1.0 purge $PKGNAME 1.0 -- cgit v1.2.3 From 0919f1df552ddf022ce4508cbf40e04eae5ef896 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 23 Aug 2016 15:11:20 +0200 Subject: prevent C++ locale number formatting in text APIs (try 3) This time it is the formatting of floating numbers in progress reporting with a radix charater potentially not being dot. Followup of 7303e11ff28f920a6277c159aa46f80c007350bb. Regression of b58e2c7c56b1416a343e81f9f80cb1f02c128e25 in so far as it exchanging very effected with slightly less effected code. LP: 1611010 --- apt-pkg/acquire.cc | 7 +++-- apt-pkg/install-progress.cc | 73 ++++++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 29362fb40..1efb772b4 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1258,8 +1258,11 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) snprintf(msg,sizeof(msg), _("Retrieving file %li of %li"), i, TotalItems); // build the status str - std::string dlstatus; - strprintf(dlstatus, "dlstatus:%ld:%.4f:%s\n", i, Percent, msg); + std::ostringstream str; + str.imbue(std::locale("C.UTF-8")); + str.precision(4); + str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n'; + auto const dlstatus = str.str(); FileFd::Write(fd, dlstatus.data(), dlstatus.size()); } diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index be5b8b5c7..256495420 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -78,6 +78,18 @@ void PackageManagerProgressFd::WriteToStatusFd(std::string s) FileFd::Write(OutStatusFd, s.c_str(), s.size()); } +static std::string GetProgressFdString(char const * const status, + char const * const pkg, unsigned long long Done, + unsigned long long Total, char const * const msg) +{ + float const progress{Done / static_cast(Total) * 100}; + std::ostringstream str; + str.imbue(std::locale("C.UTF-8")); + str.precision(4); + str << status << ':' << pkg << ':' << std::fixed << progress << ':' << msg << '\n'; + return str.str(); +} + void PackageManagerProgressFd::StartDpkg() { if(OutStatusFd <= 0) @@ -88,10 +100,7 @@ void PackageManagerProgressFd::StartDpkg() fcntl(OutStatusFd,F_SETFD,FD_CLOEXEC); // send status information that we are about to fork dpkg - std::string status; - strprintf(status, "pmstatus:dpkg-exec:%.4f:%s\n", - (StepsDone/float(StepsTotal)*100.0), _("Running dpkg")); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressFdString("pmstatus", "dpkg-exec", StepsDone, StepsTotal, _("Running dpkg"))); } APT_CONST void PackageManagerProgressFd::Stop() @@ -103,10 +112,8 @@ void PackageManagerProgressFd::Error(std::string PackageName, unsigned int TotalSteps, std::string ErrorMessage) { - std::string status; - strprintf(status, "pmerror:%s:%.4f:%s\n", PackageName.c_str(), - (StepsDone/float(TotalSteps)*100.0), ErrorMessage.c_str()); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressFdString("pmerror", PackageName.c_str(), + StepsDone, TotalSteps, ErrorMessage.c_str())); } void PackageManagerProgressFd::ConffilePrompt(std::string PackageName, @@ -114,10 +121,8 @@ void PackageManagerProgressFd::ConffilePrompt(std::string PackageName, unsigned int TotalSteps, std::string ConfMessage) { - std::string status; - strprintf(status, "pmconffile:%s:%.4f:%s\n", PackageName.c_str(), - (StepsDone/float(TotalSteps)*100.0), ConfMessage.c_str()); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressFdString("pmconffile", PackageName.c_str(), + StepsDone, TotalSteps, ConfMessage.c_str())); } @@ -129,11 +134,8 @@ bool PackageManagerProgressFd::StatusChanged(std::string PackageName, StepsDone = xStepsDone; StepsTotal = xTotalSteps; - // build the status str - std::string status; - strprintf(status, "pmstatus:%s:%.4f:%s\n", StringSplit(PackageName, ":")[0].c_str(), - (StepsDone/float(StepsTotal)*100.0), pkg_action.c_str()); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressFdString("pmstatus", StringSplit(PackageName, ":")[0].c_str(), + StepsDone, StepsTotal, pkg_action.c_str())); if(_config->FindB("Debug::APT::Progress::PackageManagerFd", false) == true) std::cerr << "progress: " << PackageName << " " << xStepsDone @@ -157,17 +159,29 @@ void PackageManagerProgressDeb822Fd::WriteToStatusFd(std::string s) FileFd::Write(OutStatusFd, s.c_str(), s.size()); } +static std::string GetProgressDeb822String(char const * const status, + char const * const pkg, unsigned long long Done, + unsigned long long Total, char const * const msg) +{ + float const progress{Done / static_cast(Total) * 100}; + std::ostringstream str; + str.imbue(std::locale("C.UTF-8")); + str.precision(4); + str << "Status: " << status << '\n'; + if (pkg != nullptr) + str << "Package: " << pkg << '\n'; + str << "Percent: " << std::fixed << progress << '\n' + << "Message: " << msg << "\n\n"; + return str.str(); +} + void PackageManagerProgressDeb822Fd::StartDpkg() { // FIXME: use SetCloseExec here once it taught about throwing // exceptions instead of doing _exit(100) on failure fcntl(OutStatusFd,F_SETFD,FD_CLOEXEC); - // send status information that we are about to fork dpkg - std::string status; - strprintf(status, "Status: %s\nPercent: %.4f\nMessage: %s\n\n", "progress", - (StepsDone/float(StepsTotal)*100.0), _("Running dpkg")); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressDeb822String("progress", nullptr, StepsDone, StepsTotal, _("Running dpkg"))); } APT_CONST void PackageManagerProgressDeb822Fd::Stop() @@ -179,10 +193,7 @@ void PackageManagerProgressDeb822Fd::Error(std::string PackageName, unsigned int TotalSteps, std::string ErrorMessage) { - std::string status; - strprintf(status, "Status: %s\nPackage: %s\nPercent: %.4f\nMessage: %s\n\n", "Error", - PackageName.c_str(), (StepsDone/float(TotalSteps)*100.0), ErrorMessage.c_str()); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressDeb822String("Error", PackageName.c_str(), StepsDone, TotalSteps, ErrorMessage.c_str())); } void PackageManagerProgressDeb822Fd::ConffilePrompt(std::string PackageName, @@ -190,10 +201,7 @@ void PackageManagerProgressDeb822Fd::ConffilePrompt(std::string PackageName, unsigned int TotalSteps, std::string ConfMessage) { - std::string status; - strprintf(status, "Status: %s\nPackage: %s\nPercent: %.4f\nMessage: %s\n\n", "ConfFile", - PackageName.c_str(), (StepsDone/float(TotalSteps)*100.0), ConfMessage.c_str()); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressDeb822String("ConfFile", PackageName.c_str(), StepsDone, TotalSteps, ConfMessage.c_str())); } @@ -205,10 +213,7 @@ bool PackageManagerProgressDeb822Fd::StatusChanged(std::string PackageName, StepsDone = xStepsDone; StepsTotal = xTotalSteps; - std::string status; - strprintf(status, "Status: %s\nPackage: %s\nPercent: %.4f\nMessage: %s\n\n", "progress", - PackageName.c_str(), (StepsDone/float(StepsTotal)*100.0), message.c_str()); - WriteToStatusFd(std::move(status)); + WriteToStatusFd(GetProgressDeb822String("progress", PackageName.c_str(), StepsDone, StepsTotal, message.c_str())); return true; } -- cgit v1.2.3 From 3fbd67460e1c4c38a79d00f09bf3113a39abbeca Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 20 Aug 2016 03:22:24 +0200 Subject: CMake: Add Large File Support This module should cover all sorts of large file supports, as long as they either support the getconf LFS_CFLAGS command; or the _FILE_OFFSET_BITS=64 or _LARGE_FILES macros. Closes: #834767 --- CMake/FindLFS.cmake | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 6 +++ 2 files changed, 154 insertions(+) create mode 100644 CMake/FindLFS.cmake diff --git a/CMake/FindLFS.cmake b/CMake/FindLFS.cmake new file mode 100644 index 000000000..e1fcf964c --- /dev/null +++ b/CMake/FindLFS.cmake @@ -0,0 +1,148 @@ +# CMake support for large files +# +# Copyright (C) 2016 Julian Andres Klode . +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# This defines the following variables +# +# LFS_DEFINITIONS - List of definitions to pass to add_definitions() +# LFS_COMPILE_OPTIONS - List of definitions to pass to add_compile_options() +# LFS_LIBRARIES - List of libraries and linker flags +# LFS_FOUND - If there is Large files support +# + +include(CheckCXXSourceCompiles) +include(FindPackageHandleStandardArgs) + +# Test program to check for LFS. Requires that off_t has at least 8 byte large +set(_lfs_test_source + " + #include + typedef char my_static_assert[sizeof(off_t) >= 8 ? 1 : -1]; + int main(void) { return 0; } + " +) + +# Check if the given options are needed +# +# This appends to the variables _lfs_cppflags, _lfs_cflags, and _lfs_ldflags, +# it also sets LFS_FOUND to 1 if it works. +function(_lfs_check_compiler_option var options definitions libraries) + set(CMAKE_REQUIRED_QUIET 1) + set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} ${options}) + set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${definitions}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_DEFINITIONS} ${libraries}) + + message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries}") + check_cxx_source_compiles("${_lfs_test_source}" ${var}) + + if(${var}) + message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries} - found") + set(_lfs_cppflags ${_lfs_cppflags} ${definitions} PARENT_SCOPE) + set(_lfs_cflags ${_lfs_cflags} ${options} PARENT_SCOPE) + set(_lfs_ldflags ${_lfs_ldflags} ${libraries} PARENT_SCOPE) + set(LFS_FOUND TRUE PARENT_SCOPE) + else() + message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries} - not found") + endif() +endfunction() + +# Check for the availability of LFS. +# The cases handled are: +# +# * Native LFS +# * Output of getconf LFS_CFLAGS; getconf LFS_LIBS; getconf LFS_LDFLAGS +# * Preprocessor flag -D_FILE_OFFSET_BITS=64 +# * Preprocessor flag -D_LARGE_FILES +# +function(_lfs_check) + set(_lfs_cflags) + set(_lfs_cppflags) + set(_lfs_ldflags) + set(_lfs_libs) + set(CMAKE_REQUIRED_QUIET 1) + message(STATUS "Looking for native LFS support") + check_cxx_source_compiles("${_lfs_test_source}" lfs_native) + if (lfs_native) + message(STATUS "Looking for native LFS support - found") + set(LFS_FOUND TRUE) + else() + message(STATUS "Looking for native LFS support - not found") + endif() + + if (NOT LFS_FOUND) + # Check using getconf. If getconf fails, don't worry, the check in + # _lfs_check_compiler_option will fail as well. + execute_process(COMMAND getconf LFS_CFLAGS + OUTPUT_VARIABLE _lfs_cflags_raw + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) + execute_process(COMMAND getconf LFS_LIBS + OUTPUT_VARIABLE _lfs_libs_tmp + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) + execute_process(COMMAND getconf LFS_LDFLAGS + OUTPUT_VARIABLE _lfs_ldflags_tmp + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) + + separate_arguments(_lfs_cflags_raw) + separate_arguments(_lfs_ldflags_tmp) + separate_arguments(_lfs_libs_tmp) + + # Move -D flags to the place they are supposed to be + foreach(flag ${_lfs_cflags_raw}) + if (flag MATCHES "-D.*") + list(APPEND _lfs_cppflags_tmp ${flag}) + else() + list(APPEND _lfs_cflags_tmp ${flag}) + endif() + endforeach() + + # Check if the flags we received (if any) produce working LFS support + _lfs_check_compiler_option(lfs_getconf_works + "${_lfs_cflags_tmp}" + "${_lfs_cppflags_tmp}" + "${_lfs_libs_tmp};${_lfs_ldflags_tmp}") + endif() + + if(NOT LFS_FOUND) # IRIX stuff + _lfs_check_compiler_option(lfs_need_n32 "-n32" "" "") + endif() + if(NOT LFS_FOUND) # Linux and friends + _lfs_check_compiler_option(lfs_need_file_offset_bits "" "-D_FILE_OFFSET_BITS=64" "") + endif() + if(NOT LFS_FOUND) # AIX + _lfs_check_compiler_option(lfs_need_large_files "" "-D_LARGE_FILES=1" "") + endif() + + set(LFS_DEFINITIONS ${_lfs_cppflags} CACHE STRING "Extra definitions for large file support") + set(LFS_COMPILE_OPTIONS ${_lfs_cflags} CACHE STRING "Extra definitions for large file support") + set(LFS_LIBRARIES ${_lfs_libs} ${_lfs_ldflags} CACHE STRING "Extra definitions for large file support") + set(LFS_FOUND ${LFS_FOUND} CACHE INTERNAL "Found LFS") +endfunction() + +if (NOT LFS_FOUND) + _lfs_check() +endif() + +find_package_handle_standard_args(LFS "Could not find LFS. Set LFS_DEFINITIONS, LFS_COMPILE_OPTIONS, LFS_LIBRARIES." LFS_FOUND) diff --git a/CMakeLists.txt b/CMakeLists.txt index ced68285d..b63cfe0e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,12 @@ include(GNUInstallDirs) include(TestBigEndian) find_package(Threads) find_package(PkgConfig) +find_package(LFS REQUIRED) + +# Add large file support +add_compile_options(${LFS_COMPILE_OPTIONS}) +add_definitions(${LFS_DEFINITIONS}) +link_libraries(${LFS_LIBRARIES}) # Set compiler flags set(CMAKE_CXX_STANDARD 11) -- cgit v1.2.3 From d651c4cd71a43c385c3d3bcd3a9f25bf0a67f8f2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:24:54 +0200 Subject: install-progress: Call the real ::fork() in our fork() method We basically called ourselves before, creating an endless loop. Reported-By: clang --- apt-pkg/install-progress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h index 23ddbbec6..b5c133676 100644 --- a/apt-pkg/install-progress.h +++ b/apt-pkg/install-progress.h @@ -38,7 +38,7 @@ namespace Progress { */ virtual void StartDpkg() {}; - virtual pid_t fork() {return fork(); }; + virtual pid_t fork() {return ::fork(); }; virtual void Pulse() {}; virtual long GetPulseInterval() { -- cgit v1.2.3 From 9fb81c6e54a2fe05c0ad0b877fd32f30358e3877 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 21 Aug 2016 20:37:14 +0200 Subject: CMake: Discover docbook stylesheet in other locations Distributions seem to install this stuff all over the place, so let's add a common list of paths we know about. --- CMake/Documentation.cmake | 34 ++++++++++++++++-- doc/docbook-html-style.xsl | 40 --------------------- doc/docbook-html-style.xsl.cmake.in | 40 +++++++++++++++++++++ doc/docbook-text-style.xsl | 70 ------------------------------------- doc/docbook-text-style.xsl.cmake.in | 70 +++++++++++++++++++++++++++++++++++++ doc/manpage-style.xsl | 18 ---------- doc/manpage-style.xsl.cmake.in | 18 ++++++++++ 7 files changed, 159 insertions(+), 131 deletions(-) delete mode 100644 doc/docbook-html-style.xsl create mode 100644 doc/docbook-html-style.xsl.cmake.in delete mode 100644 doc/docbook-text-style.xsl create mode 100644 doc/docbook-text-style.xsl.cmake.in delete mode 100644 doc/manpage-style.xsl create mode 100644 doc/manpage-style.xsl.cmake.in diff --git a/CMake/Documentation.cmake b/CMake/Documentation.cmake index f679b82e1..f3bbfdc6b 100644 --- a/CMake/Documentation.cmake +++ b/CMake/Documentation.cmake @@ -24,6 +24,34 @@ # SOFTWARE. +find_path(DOCBOOK_XSL manpages/docbook.xsl + # Debian + /usr/share/xml/docbook/stylesheet/docbook-xsl + /usr/share/xml/docbook/stylesheet/nwalsh + # OpenSUSE + /usr/share/xml/docbook/stylesheet/nwalsh/current + # Arch + /usr/share/xml/docbook/xsl-stylesheets + # Fedora + /usr/share/sgml/docbook/xsl-stylesheets + # Fink + ${CMAKE_INSTALL_PREFIX}/share/xml/xsl/docbook-xsl + # FreeBSD + ${CMAKE_INSTALL_PREFIX}/share/xsl/docbook/ + NO_DEFAULT_PATH) + +if(NOT DOCBOOK_XSL) + message(FATAL_ERROR "Could not find docbook xsl") +endif() + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docbook-text-style.xsl.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/docbook-text-style.xsl) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docbook-html-style.xsl.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/docbook-html-style.xsl) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/manpage-style.xsl.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/manpage-style.xsl) + + # Split up a string of the form DOCUMENT[.DOCUMENT][.LANGUAGE][.SECTION].EXTENSION # # There might be up to two parts in the document name. The language must be @@ -123,7 +151,7 @@ function(xsltproc_one) else() set(manpage_output "${CMAKE_CURRENT_BINARY_DIR}/${document}.${section}") endif() - set(manpage_stylesheet "${CMAKE_CURRENT_SOURCE_DIR}/manpage-style.xsl") + set(manpage_stylesheet "${CMAKE_CURRENT_BINARY_DIR}/manpage-style.xsl") set(manpage_params) install(FILES ${manpage_output} @@ -137,7 +165,7 @@ function(xsltproc_one) set(html_output "${CMAKE_CURRENT_BINARY_DIR}/${document}.html") endif() set(html_params --stringparam base.dir ${html_output}) - set(html_stylesheet "${CMAKE_CURRENT_SOURCE_DIR}/docbook-html-style.xsl") + set(html_stylesheet "${CMAKE_CURRENT_BINARY_DIR}/docbook-html-style.xsl") install(DIRECTORY ${html_output} DESTINATION ${DOC_INSTALL} OPTIONAL) @@ -150,7 +178,7 @@ function(xsltproc_one) set(text_output "${CMAKE_CURRENT_BINARY_DIR}/${document}.text") endif() set(text_params --stringparam base.dir ${text_output}) - set(text_stylesheet "${CMAKE_CURRENT_SOURCE_DIR}/docbook-text-style.xsl") + set(text_stylesheet "${CMAKE_CURRENT_BINARY_DIR}/docbook-text-style.xsl") file(RELATIVE_PATH text_output_relative ${CMAKE_CURRENT_BINARY_DIR} ${text_output}) diff --git a/doc/docbook-html-style.xsl b/doc/docbook-html-style.xsl deleted file mode 100644 index e4af9f557..000000000 --- a/doc/docbook-html-style.xsl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - -
-
- - index - - - - - - - - - - - - - - - - - - -
diff --git a/doc/docbook-html-style.xsl.cmake.in b/doc/docbook-html-style.xsl.cmake.in new file mode 100644 index 000000000..9216d8e6e --- /dev/null +++ b/doc/docbook-html-style.xsl.cmake.in @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + +
+
+ + index + + + + + + + + + + + + + + + + + + +
diff --git a/doc/docbook-text-style.xsl b/doc/docbook-text-style.xsl deleted file mode 100644 index 376dded52..000000000 --- a/doc/docbook-text-style.xsl +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - -
-
- -
-
-
-
- -
- -
-
- - -
- -
-
-
- - - -
    - -
-
- - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
diff --git a/doc/docbook-text-style.xsl.cmake.in b/doc/docbook-text-style.xsl.cmake.in new file mode 100644 index 000000000..36af1bcb2 --- /dev/null +++ b/doc/docbook-text-style.xsl.cmake.in @@ -0,0 +1,70 @@ + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+ +
+
+ + +
+ +
+
+
+ + + +
    + +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
diff --git a/doc/manpage-style.xsl b/doc/manpage-style.xsl deleted file mode 100644 index a780bad13..000000000 --- a/doc/manpage-style.xsl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -<> - - - - - - - - - diff --git a/doc/manpage-style.xsl.cmake.in b/doc/manpage-style.xsl.cmake.in new file mode 100644 index 000000000..53d6780cb --- /dev/null +++ b/doc/manpage-style.xsl.cmake.in @@ -0,0 +1,18 @@ + + + + + + +<> + + + + + + + + + -- cgit v1.2.3 From ac103d45f63bd9a57ff867a52c7c95616f6daf51 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 18:42:52 +0200 Subject: CMake: Do not add po/ if USE_NLS is OFF Previously, we would have generated all the translations, but not turn them on in the code. Instead, move the Translation crap into po/ and disable po/ alltogether if USE_NLS if OFF. --- CMakeLists.txt | 6 ++++-- po/CMakeLists.txt | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b63cfe0e8..a43abfb78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,6 @@ endif() # Include stuff include(Misc) -include(Translations) include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckStructHasMember) @@ -144,11 +143,14 @@ add_subdirectory(doc) add_subdirectory(dselect) add_subdirectory(ftparchive) add_subdirectory(methods) -add_subdirectory(po) add_subdirectory(test) +if (USE_NLS) +add_subdirectory(po) + # Link update-po4a into the update-po target add_dependencies(update-po update-po4a) +endif() # Create our directories. install_empty_directories( diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 174cc5d41..258c9b050 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -1,3 +1,5 @@ +include(Translations) + set(languages_excluded he ## disabled by translator request #313283 ) -- cgit v1.2.3 From bb9fdfe45b1c06f87de857b6ed225b8509003976 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 12:53:10 +0200 Subject: CMake: Define _WITH_GETLINE for FreeBSD Gbp-Dch: ignore --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a43abfb78..fcb200571 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,9 @@ check_function_exists(ptsname_r HAVE_PTSNAME_R) check_function_exists(timegm HAVE_TIMEGM) test_big_endian(WORDS_BIGENDIAN) +# FreeBSD +add_definitions(-D_WITH_GETLINE=1) + if (CMAKE_USE_PTHREADS_INIT) set(HAVE_PTHREAD 1) endif() -- cgit v1.2.3 From 2e2865ae53a65c00dd55a892d5b48458f3110366 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 24 Aug 2016 09:47:48 +0200 Subject: do fail on weakhash/loop earlier in acquire The bugreport shows a segfault caused by the code not doing the correct magical dance to remove an item from inside a queue in all cases. We could try hard to fix this, but it is actually better and also easier to perform these checks (which cause instant failure) earlier so that they haven't entered queue(s) yet, which in return makes cleanup trivial. The result is that we actually end up failing "too early" as if we wouldn't be careful download errors would be logged before that process was even started. Not a problem for the acquire system, but likely to confuse users and programs alike if they see the download process producing errors before apt was technically allowed to do an acquire (it didn't, so no violation, but it looks like it to the untrained eye). Closes: 835195 --- apt-pkg/acquire-item.cc | 3 +- apt-pkg/acquire-worker.cc | 42 +-------------- apt-pkg/acquire.cc | 59 ++++++++++++++++++++-- test/integration/framework | 1 + test/integration/test-apt-redirect-loop | 3 -- .../test-bug-605394-versioned-or-groups | 4 ++ .../test-bug-722207-print-uris-even-if-very-quiet | 2 +- .../test-handle-redirect-as-used-mirror-change | 6 +++ 8 files changed, 70 insertions(+), 50 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7abb7b206..7fbbf08f8 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3279,9 +3279,8 @@ bool pkgAcqArchive::QueueNext() // Create the item Local = false; - QueueURI(Desc); - ++Vf; + QueueURI(Desc); return true; } return false; diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index a4fbc7651..5b6634db8 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -661,55 +661,15 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item) if (OutFd == -1) return false; - HashStringList const hsl = Item->GetExpectedHashes(); - if (isDoomedItem(Item->Owner)) return true; - if (hsl.usable() == false && Item->Owner->HashesRequired() && - _config->Exists("Acquire::ForceHash") == false) - { - std::string const Message = "400 URI Failure" - "\nURI: " + Item->URI + - "\nFilename: " + Item->Owner->DestFile + - "\nFailReason: WeakHashSums"; - - auto const ItmOwners = Item->Owners; - for (auto &O: ItmOwners) - { - O->Status = pkgAcquire::Item::StatAuthError; - O->Failed(Message, Config); - if (Log != nullptr) - Log->Fail(O->GetItemDesc()); - } - // "queued" successfully, the item just instantly failed - return true; - } - - if (Item->Owner->IsRedirectionLoop(Item->URI)) - { - std::string const Message = "400 URI Failure" - "\nURI: " + Item->URI + - "\nFilename: " + Item->Owner->DestFile + - "\nFailReason: RedirectionLoop"; - - auto const ItmOwners = Item->Owners; - for (auto &O: ItmOwners) - { - O->Status = pkgAcquire::Item::StatError; - O->Failed(Message, Config); - if (Log != nullptr) - Log->Fail(O->GetItemDesc()); - } - // "queued" successfully, the item just instantly failed - return true; - } - string Message = "600 URI Acquire\n"; Message.reserve(300); Message += "URI: " + Item->URI; Message += "\nFilename: " + Item->Owner->DestFile; + HashStringList const hsl = Item->GetExpectedHashes(); for (HashStringList::const_iterator hs = hsl.begin(); hs != hsl.end(); ++hs) Message += "\nExpected-" + hs->HashType() + ": " + hs->HashValue(); diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 1efb772b4..affc0c791 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -269,6 +269,42 @@ void pkgAcquire::Remove(Worker *Work) it is constructed which creates a queue (based on the current queue mode) and puts the item in that queue. If the system is running then the queue might be started. */ +static bool DoesAcquireResultInInstantFailure(pkgAcquire::Item * const Item, + pkgAcquire::MethodConfig const * const Config, pkgAcquireStatus * const Log) +{ + auto SavedDesc = Item->GetItemDesc(); + if (Item->IsRedirectionLoop(SavedDesc.URI)) + { + std::string const Message = "400 URI Failure" + "\nURI: " + SavedDesc.URI + + "\nFilename: " + Item->DestFile + + "\nFailReason: RedirectionLoop"; + + Item->Status = pkgAcquire::Item::StatError; + Item->Failed(Message, Config); + if (Log != nullptr) + Log->Fail(SavedDesc); + return true; + } + + HashStringList const hsl = Item->GetExpectedHashes(); + if (hsl.usable() == false && Item->HashesRequired() && + _config->Exists("Acquire::ForceHash") == false) + { + std::string const Message = "400 URI Failure" + "\nURI: " + SavedDesc.URI + + "\nFilename: " + Item->DestFile + + "\nFailReason: WeakHashSums"; + + auto SavedDesc = Item->GetItemDesc(); + Item->Status = pkgAcquire::Item::StatAuthError; + Item->Failed(Message, Config); + if (Log != nullptr) + Log->Fail(SavedDesc); + return true; + } + return false; +} void pkgAcquire::Enqueue(ItemDesc &Item) { // Determine which queue to put the item in @@ -277,6 +313,13 @@ void pkgAcquire::Enqueue(ItemDesc &Item) if (Name.empty() == true) return; + /* the check for running avoids that we produce errors + in logging before we actually have started, which would + be easier to implement but would confuse users/implementations + so we check the items skipped here in #Startup */ + if (Running && DoesAcquireResultInInstantFailure(Item.Owner, Config, Log)) + return; + // Find the queue structure Queue *I = Queues; for (; I != 0 && I->Name != Name; I = I->Next); @@ -912,10 +955,20 @@ bool pkgAcquire::Queue::Startup() if (Workers == 0) { URI U(Name); - pkgAcquire::MethodConfig *Cnf = Owner->GetConfig(U.Access); - if (Cnf == 0) + pkgAcquire::MethodConfig * const Cnf = Owner->GetConfig(U.Access); + if (unlikely(Cnf == nullptr)) return false; - + + // now-running twin of the pkgAcquire::Enqueue call + for (QItem *I = Items; I != 0; ) + { + bool pointless = false; + for (auto &&O: I->Owners) + if (DoesAcquireResultInInstantFailure(O, Cnf, Owner->Log)) + pointless = true; + I = pointless ? Items : I->Next; + } + Workers = new Worker(this,Cnf,Owner->Log); Owner->Add(Workers); if (Workers->Start() == false) diff --git a/test/integration/framework b/test/integration/framework index 1e356ffaf..d40c9f356 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -875,6 +875,7 @@ Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" echo "Description: $(printf '%s' "$DESCRIPTION" | head -n 1)" echo "Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)" + echo "SHA256: 0000000000000000000000000000000000000000000000000000000000000000" echo } >> "${PPATH}/Packages" done diff --git a/test/integration/test-apt-redirect-loop b/test/integration/test-apt-redirect-loop index b54f74276..e1a8aeea0 100755 --- a/test/integration/test-apt-redirect-loop +++ b/test/integration/test-apt-redirect-loop @@ -7,9 +7,6 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture "i386" -insertpackage 'stable' 'apt' 'all' '1' -setupaptarchive --no-update - echo 'alright' > aptarchive/working changetohttpswebserver webserverconfig 'aptwebserver::redirect::replace::/redirectme3/' '/redirectme/' diff --git a/test/integration/test-bug-605394-versioned-or-groups b/test/integration/test-bug-605394-versioned-or-groups index a362463d5..43f35f79b 100755 --- a/test/integration/test-bug-605394-versioned-or-groups +++ b/test/integration/test-bug-605394-versioned-or-groups @@ -24,3 +24,7 @@ if aptget dist-upgrade --trivial-only -o Debug::pkgProblemResolver=1 -o Debug::p else msgpass fi + +# the Packages file includes only MD5 +testfailure aptget dist-upgrade -y +testsuccess grep 'Insufficient information available to perform this download securely' rootdir/tmp/testfailure.output diff --git a/test/integration/test-bug-722207-print-uris-even-if-very-quiet b/test/integration/test-bug-722207-print-uris-even-if-very-quiet index d8d3c7218..82c1d715f 100755 --- a/test/integration/test-bug-722207-print-uris-even-if-very-quiet +++ b/test/integration/test-bug-722207-print-uris-even-if-very-quiet @@ -20,7 +20,7 @@ APTARCHIVE=$(readlink -f ./aptarchive) testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget upgrade -qq --print-uris testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget dist-upgrade -qq --print-uris testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget install apt -qq --print-uris -testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget download apt -qq --print-uris +testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 SHA256:0000000000000000000000000000000000000000000000000000000000000000" aptget download apt -qq --print-uris testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 9 SHA256:7776436a6d741497f1cd958014e1a05b352224231428152aae39da3c17fd2fd4 'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 12 SHA256:f57f565eabe3fde0ec6e6e0bcc8db1d86fe2b4d6344a380a23520ddbb7728e99" aptget source apt -qq --print-uris testsuccessequal "'http://metadata.ftp-master.debian.org/changelogs/main/a/apt/apt_2_changelog' apt.changelog" aptget changelog apt -qq --print-uris diff --git a/test/integration/test-handle-redirect-as-used-mirror-change b/test/integration/test-handle-redirect-as-used-mirror-change index 2e8fbeff6..2655f713c 100755 --- a/test/integration/test-handle-redirect-as-used-mirror-change +++ b/test/integration/test-handle-redirect-as-used-mirror-change @@ -78,3 +78,9 @@ testsuccessequal "Ign:1 http://0.0.0.0:${APTHTTPPORT}/storage unstable InRelease 404 Not Found Hit:2 http://0.0.0.0:${APTHTTPPORT} unstable Release Reading package lists..." aptget update + +rm -rf rootdir/var/lib/apt/lists +find aptarchive -name 'Release.gpg' -delete +find aptarchive -name 'Release' -delete +testwarning aptget update +testsuccess grep 'does not have a Release file' rootdir/tmp/testwarning.output -- cgit v1.2.3 From 1044354995513348f4836772fe77068585091d6b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 24 Aug 2016 21:49:34 +0200 Subject: improve code & doc for aquire weak/loop failing Improve-Upon: 2e2865ae53a65c00dd55a892d5b48458f3110366 Reported-By: Julian Andres Klode Gbp-Dch: Ignore --- apt-pkg/acquire.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index affc0c791..e588b0306 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -269,7 +269,7 @@ void pkgAcquire::Remove(Worker *Work) it is constructed which creates a queue (based on the current queue mode) and puts the item in that queue. If the system is running then the queue might be started. */ -static bool DoesAcquireResultInInstantFailure(pkgAcquire::Item * const Item, +static bool CheckForBadItemAndFailIt(pkgAcquire::Item * const Item, pkgAcquire::MethodConfig const * const Config, pkgAcquireStatus * const Log) { auto SavedDesc = Item->GetItemDesc(); @@ -317,7 +317,7 @@ void pkgAcquire::Enqueue(ItemDesc &Item) in logging before we actually have started, which would be easier to implement but would confuse users/implementations so we check the items skipped here in #Startup */ - if (Running && DoesAcquireResultInInstantFailure(Item.Owner, Config, Log)) + if (Running && CheckForBadItemAndFailIt(Item.Owner, Config, Log)) return; // Find the queue structure @@ -962,11 +962,11 @@ bool pkgAcquire::Queue::Startup() // now-running twin of the pkgAcquire::Enqueue call for (QItem *I = Items; I != 0; ) { - bool pointless = false; + auto const INext = I->Next; for (auto &&O: I->Owners) - if (DoesAcquireResultInInstantFailure(O, Cnf, Owner->Log)) - pointless = true; - I = pointless ? Items : I->Next; + CheckForBadItemAndFailIt(O, Cnf, Owner->Log); + // if an item failed, it will be auto-dequeued invalidation our I here + I = INext; } Workers = new Worker(this,Cnf,Owner->Log); -- cgit v1.2.3 From 70ff288b98a7aae2c2808112015d34f76f2d5114 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 24 Aug 2016 21:57:53 +0200 Subject: do not restore selections for already purged packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In most cases apt was already skipping the (re)setting of packages as to be removed/purged if dpkg had told us that it already did, but we haven't dealt with it in the most obvious of the cases: Selections set for packages we touched in this operation which either restores selections even dpkg would have overridden or e.g. tries to restore a purge selection for a package which was just purged – does not happen with apt itself as it isn't using selections in this way, but higher frontends like aptitude do. The result in the later case is a warning printed by dpkg that we try to set selections for an unknown package, which is harmless per se, but can be confusing for users and we really shouldn't cause warnings in dpkg if we can help it. Reported-By: Guillem Jover on IRC --- apt-pkg/deb/dpkgpm.cc | 21 +++++++++++++++------ test/integration/framework | 2 +- test/integration/test-apt-get-autoremove | 3 +++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b0700bcc6..a2c7770b3 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1339,10 +1339,16 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) std::distance(List.cbegin(), List.cend()); ExpandPendingCalls(List, Cache); - auto const StripAlreadyDoneFromPending = [&](APT::VersionVector & Pending) { + /* if dpkg told us that it has already done everything to the package we wanted it to do, + we shouldn't ask it for "more" later. That can e.g. happen if packages without conffiles + are purged as they will have pass through the purge states on remove already */ + auto const StripAlreadyDoneFrom = [&](APT::VersionVector & Pending) { Pending.erase(std::remove_if(Pending.begin(), Pending.end(), [&](pkgCache::VerIterator const &Ver) { auto const PN = Ver.ParentPkg().FullName(); - return PackageOps[PN].size() <= PackageOpsDone[PN]; + auto const POD = PackageOpsDone.find(PN); + if (POD == PackageOpsDone.end()) + return false; + return PackageOps[PN].size() <= POD->second; }), Pending.end()); }; @@ -1701,7 +1707,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) else if (I->Op == Item::RemovePending) { ++I; - StripAlreadyDoneFromPending(approvedStates.Remove()); + StripAlreadyDoneFrom(approvedStates.Remove()); if (approvedStates.Remove().empty()) continue; } @@ -1710,7 +1716,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) ++I; // explicit removes of packages without conffiles passthrough the purge states instantly, too. // Setting these non-installed packages up for purging generates 'unknown pkg' warnings from dpkg - StripAlreadyDoneFromPending(approvedStates.Purge()); + StripAlreadyDoneFrom(approvedStates.Purge()); if (approvedStates.Purge().empty()) continue; std::remove_reference::type approvedRemoves; @@ -1962,8 +1968,8 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) if (d->dpkg_error.empty() == false) { // no point in reseting packages we already completed removal for - StripAlreadyDoneFromPending(approvedStates.Remove()); - StripAlreadyDoneFromPending(approvedStates.Purge()); + StripAlreadyDoneFrom(approvedStates.Remove()); + StripAlreadyDoneFrom(approvedStates.Purge()); APT::StateChanges undo; auto && undoRem = approvedStates.Remove(); std::move(undoRem.begin(), undoRem.end(), std::back_inserter(undo.Install())); @@ -1973,6 +1979,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) if (undo.Save(false) == false) _error->Error("Couldn't revert dpkg selection for approved remove/purge after an error was encountered!"); } + + StripAlreadyDoneFrom(currentStates.Remove()); + StripAlreadyDoneFrom(currentStates.Purge()); if (currentStates.Save(false) == false) _error->Error("Couldn't restore dpkg selection states which were present before this interaction!"); diff --git a/test/integration/framework b/test/integration/framework index d40c9f356..0daf776f5 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1989,7 +1989,7 @@ testaptautotestnodpkgwarning() { if expr match "$2" '^-dy\?' >/dev/null 2>&1; then return; fi # download-only mode shift done - testfailure grep '^dpkg: warning:.*ignor.*' "${TMPWORKINGDIRECTORY}/rootdir/tmp-before/${TESTCALL}.output" + testfailure grep '^dpkg: warning:.*\(ignor\|unknown\).*' "${TMPWORKINGDIRECTORY}/rootdir/tmp-before/${TESTCALL}.output" } aptautotest_aptget_install() { testaptautotestnodpkgwarning "$@"; } diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove index cfee748af..8af864acb 100755 --- a/test/integration/test-apt-get-autoremove +++ b/test/integration/test-apt-get-autoremove @@ -152,3 +152,6 @@ Remv foo-multi2-1 [1] Remv foo-multi2-2 [1] Remv foo-plus-1 [1] Remv foo-plus-2 [1]' apt autoremove -s + +testdpkgstatus 'pi' '1' 'unrelated' +testsuccess apt purge unrelated -y -- cgit v1.2.3 From 105503b4b470c124bc0c271bd8a50e25ecbe9133 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 25 Aug 2016 12:42:36 +0200 Subject: apt-key: warn instead of fail on unreadable keyrings apt-key has inconsistent behaviour if it can't read a keyring file: Commands like 'list' skipped silently over such keyrings while 'verify' failed hard resulting in apt to report cconfusing gpg errors (#834973). As a first step we teach apt-key to be more consistent here skipping in all commands over unreadable keyrings, but issuing a warning in the process, which is as usual for apt commands displayed at the end of the run. --- cmdline/apt-key.in | 57 +++++++++++++++++++++++-------------------- test/integration/test-apt-key | 24 ++++++++++++++++++ 2 files changed, 55 insertions(+), 26 deletions(-) diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index 81314c7f5..d34f59497 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -232,6 +232,17 @@ remove_key_from_keyring() { done } +accessible_file_exists() { + if ! test -s "$1"; then + return 1 + fi + if test -r "$1"; then + return 0 + fi + warn "The key(s) in the keyring $1 are ignored as the file is not readable by user '$USER' executing apt-key." + return 1 +} + foreach_keyring_do() { local ACTION="$1" shift @@ -240,7 +251,7 @@ foreach_keyring_do() { $ACTION "$FORCED_KEYRING" "$@" else # otherwise all known keyrings are up for inspection - if [ -s "$TRUSTEDFILE" ]; then + if accessible_file_exists "$TRUSTEDFILE"; then $ACTION "$TRUSTEDFILE" "$@" fi local TRUSTEDPARTS="/etc/apt/trusted.gpg.d" @@ -249,7 +260,7 @@ foreach_keyring_do() { TRUSTEDPARTS="$(readlink -f "$TRUSTEDPARTS")" local TRUSTEDPARTSLIST="$(cd /; find "$TRUSTEDPARTS" -mindepth 1 -maxdepth 1 -name '*.gpg')" for trusted in $(echo "$TRUSTEDPARTSLIST" | sort); do - if [ -s "$trusted" ]; then + if accessible_file_exists "$trusted"; then $ACTION "$trusted" "$@" fi done @@ -302,35 +313,18 @@ import_keyring_into_keyring() { fi } +catfile() { + cat "$1" >> "$2" +} + merge_all_trusted_keyrings_into_pubring() { # does the same as: # foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg" # but without using gpg, just cat and find local PUBRING="$(readlink -f "${GPGHOMEDIR}/pubring.gpg")" - # if a --keyring was given, just use this one - if [ -n "$FORCED_KEYRING" ]; then - if [ -s "$FORCED_KEYRING" ]; then - cp --dereference "$FORCED_KEYRING" "$PUBRING" - fi - else - # otherwise all known keyrings are merged - local TRUSTEDPARTS="/etc/apt/trusted.gpg.d" - eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d) - if [ -d "$TRUSTEDPARTS" ]; then - rm -f "$PUBRING" - if [ -s "$TRUSTEDFILE" ]; then - cat "$TRUSTEDFILE" > "$PUBRING" - fi - TRUSTEDPARTS="$(readlink -f "$TRUSTEDPARTS")" - (cd /; find "$TRUSTEDPARTS" -mindepth 1 -maxdepth 1 -name '*.gpg' -exec cat {} + >> "$PUBRING";) - elif [ -s "$TRUSTEDFILE" ]; then - cp --dereference "$TRUSTEDFILE" "$PUBRING" - fi - fi - - if [ ! -s "$PUBRING" ]; then - touch "$PUBRING" - fi + rm -f "$PUBRING" + touch "$PUBRING" + foreach_keyring_do 'catfile' "$PUBRING" } import_keys_from_keyring() { @@ -480,8 +474,19 @@ if [ -z "$command" ]; then fi shift +warn() { + if [ -z "$GPGHOMEDIR" ]; then + echo >&2 'W:' "$@" + else + echo 'W:' "$@" > "${GPGHOMEDIR}/aptwarnings.log" + fi +} + cleanup_gpg_home() { if [ -z "$GPGHOMEDIR" ]; then return; fi + if [ -s "$GPGHOMEDIR/aptwarnings.log" ]; then + cat >&2 "$GPGHOMEDIR/aptwarnings.log" + fi if command_available 'gpgconf'; then GNUPGHOME="${GPGHOMEDIR}" gpgconf --kill gpg-agent >/dev/null 2>&1 || true fi diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key index 759ce1487..96cfe41fa 100755 --- a/test/integration/test-apt-key +++ b/test/integration/test-apt-key @@ -81,6 +81,20 @@ gpg: unchanged: 1' aptkey --fakeroot update testsuccess --nomsg aptkey --fakeroot del d141dbac8dae testempty aptkey list + if [ "$(id -u)" != '0' ]; then + msgtest 'Test key removal with' 'unreadable key' + cleanplate + cp -a "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg" + echo 'foobar' > "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + chmod 000 "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + testwarning --nomsg aptkey --fakeroot del d141dbac8dae + testwarning aptkey list + chmod 644 "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + rm -f "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + grep -v '^W: ' "${ROOTDIR}/tmp/testwarning.output" > "${ROOTDIR}/aptkeylist.output" || true + testempty cat "${ROOTDIR}/aptkeylist.output" + fi + msgtest 'Test key removal with' 'single key in real file' cleanplate cp -a "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg" @@ -202,6 +216,16 @@ gpg: unchanged: 1' aptkey --fakeroot update msgtest 'Test verify a file' 'with all keys' testsuccess --nomsg aptkey --quiet --readonly verify "${SIGNATURE}.gpg" "${SIGNATURE}" + if [ "$(id -u)" != '0' ]; then + msgtest 'Test verify a file' 'with unreadable key' + echo 'foobar' > "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + chmod 000 "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + testwarning --nomsg aptkey --quiet --readonly verify "${SIGNATURE}.gpg" "${SIGNATURE}" + testwarning aptkey list + chmod 644 "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + rm -f "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.gpg" + fi + msgtest 'Test verify a file' 'with good keyring' testsuccess --nomsg aptkey --quiet --readonly --keyring "${KEYDIR}/testcase-multikey.pub" verify "${SIGNATURE}.gpg" "${SIGNATURE}" -- cgit v1.2.3 From 29c590951f812d9e9c4f17706e34f2c3315fb1f6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 25 Aug 2016 15:22:28 +0200 Subject: show apt-key warnings in apt update In 105503b4b470c124bc0c271bd8a50e25ecbe9133 we got a warning implemented for unreadable files which greatly improves the behavior of apt update already as everything will work as long as we don't need the keys included in these files. The behavior if they are needed is still strange through as update will fail claiming missing keys and a manual test (which the user will likely perform as root) will be successful. Passing the new warning generated by apt-key through to apt is a bit strange from an interface point of view, but basically duplicating the warning code in multiple places doesn't feel right either. That means we have no translation for the message through as apt-key has no i18n yet. It also means that if the user has a bunch of sources each of them will generate a warning for each unreadable file which could result in quite a few duplicated warnings, but "too many" is better than none. Closes: 834973 --- cmdline/apt-key.in | 15 +++++++++++++++ methods/gpgv.cc | 3 +++ test/integration/test-releasefile-verification | 13 +++++++++++++ 3 files changed, 31 insertions(+) diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index d34f59497..199903d61 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -474,12 +474,27 @@ if [ -z "$command" ]; then fi shift +find_gpgv_status_fd() { + while [ -n "$1" ]; do + if [ "$1" = '--status-fd' ]; then + shift + echo "$1" + break + fi + shift + done +} +GPGSTATUSFD="$(find_gpgv_status_fd "$@")" + warn() { if [ -z "$GPGHOMEDIR" ]; then echo >&2 'W:' "$@" else echo 'W:' "$@" > "${GPGHOMEDIR}/aptwarnings.log" fi + if [ -n "$GPGSTATUSFD" ]; then + echo >&${GPGSTATUSFD} '[APTKEY:] WARNING' "$@" + fi } cleanup_gpg_home() { diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 2fed53a39..f2ef6b76e 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -39,6 +39,7 @@ using std::vector; #define GNUPGEXPSIG "[GNUPG:] EXPSIG" #define GNUPGREVKEYSIG "[GNUPG:] REVKEYSIG" #define GNUPGNODATA "[GNUPG:] NODATA" +#define APTKEYWARNING "[APTKEY:] WARNING" struct Digest { enum class State { @@ -238,6 +239,8 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, ValidSigners.push_back(sig); } + else if (strncmp(buffer, APTKEYWARNING, sizeof(APTKEYWARNING)-1) == 0) + Warning("%s", buffer + sizeof(APTKEYWARNING)); } fclose(pipein); free(buffer); diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification index 20ca613da..e043fa8b5 100755 --- a/test/integration/test-releasefile-verification +++ b/test/integration/test-releasefile-verification @@ -107,6 +107,19 @@ runtest() { " aptcache show apt installaptold + if [ "$(id -u)" != '0' ]; then + msgmsg 'Cold archive signed by' 'Joe Sixpack + unreadable key' + rm -rf rootdir/var/lib/apt/lists + echo 'foobar' > rootdir/etc/apt/trusted.gpg.d/unreadablekey.gpg + chmod 000 rootdir/etc/apt/trusted.gpg.d/unreadablekey.gpg + updatewithwarnings '^W: .* is not readable by user' + chmod 644 rootdir/etc/apt/trusted.gpg.d/unreadablekey.gpg + rm -f rootdir/etc/apt/trusted.gpg.d/unreadablekey.gpg + testsuccessequal "$(cat "${PKGFILE}") +" aptcache show apt + installaptold + fi + msgmsg 'Good warm archive signed by' 'Joe Sixpack' prepare "${PKGFILE}-new" signreleasefiles 'Joe Sixpack' -- cgit v1.2.3 From 4f242a2289cc5db7a53afdb875291c94de64fd90 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 25 Aug 2016 15:52:30 +0200 Subject: treat .ddeb files like .deb, especially for dpkg Ubuntu uses *.ddeb files for their debug packages, but the interface we are using since f495992428a396e0f98886c9a761a804aa161c68 to talk to dpkg isn't supporting *.ddeb files. This used to work previously as apt itself isn't caring about the filenames at all and if they are explicitly mentioned dpkg will accept all, too. It might or might not be a good idea to patch dpkg, too, but regardless of it happening, we don't want to couple us to closely to dpkg for this minor feature but testing for this at runtime as it would delay shipping the fix for the too long commandlines further. It is also questionable if it is really a good idea to allow any file extension to be used here (like .foobar in the testcase), but we used to and we tend to avoid breaking existing usecases if we can help it. As a bonus, this also allows the installation of ddeb files directly from the commandline as you can with deb files already. We continue to ignore udeb through as the user-mistake to useful ratio is too high. LP: #1616909 --- apt-pkg/deb/dpkgpm.cc | 4 +++- apt-pkg/sourcelist.cc | 3 ++- test/integration/test-apt-get-install-deb | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index a2c7770b3..9c871d477 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1681,7 +1681,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) { if (I->File[0] != '/') return _error->Error("Internal Error, Pathname to install is not absolute '%s'",I->File.c_str()); - auto const file = flNotDir(I->File); + auto file = flNotDir(I->File); + if (flExtension(file) != "deb") + file.append(".deb"); std::string linkpath; if (dpkg_recursive_install_numbered) strprintf(linkpath, "%s/%.*lu-%s", tmpdir_to_free, p, n, file.c_str()); diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index cfd824978..0da687895 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -568,7 +568,8 @@ bool pkgSourceList::AddVolatileFile(std::string const &File, std::vector rootdir/etc/apt/apt.conf.d/lowerminimum.conf +mv ./incoming/pkg-as-it-should-be_0_all.deb ./incoming/pkg-as-it-should-be_0_all.ddeb +testsuccess aptget install -y ./incoming/pkg-as-it-should-be_0_all.ddeb --reinstall +testfailure grep 'is already the newest version' rootdir/tmp/testsuccess.output +testsuccess apt purge -y pkg-as-it-should-be +testdpkgnotinstalled 'pkg-as-it-should-be' + +mv ./incoming/pkg-as-it-should-be_0_all.ddeb ./incoming/pkg-as-it-should-be_0_all.foobar +echo "Package: pkg-as-it-should-be +Architecture: all +Version: 0 +Installed-Size: 2903 +Filename: incoming/pkg-as-it-should-be_0_all.foobar +Size: $(stat -c %s incoming/pkg-as-it-should-be_0_all.foobar) +SHA256: $(sha256sum incoming/pkg-as-it-should-be_0_all.foobar | cut -d' ' -f 1) +" | gzip > Packages.gz +testsuccess apt install --with-source ./Packages.gz pkg-as-it-should-be -s +testsuccess apt install --with-source ./Packages.gz pkg-as-it-should-be --print-uris +testsuccess apt show --with-source ./Packages.gz pkg-as-it-should-be +testequal 'Package: pkg-as-it-should-be' head -n1 rootdir/tmp/testsuccess.output +testsuccess apt install -y --with-source ./Packages.gz pkg-as-it-should-be +testdpkginstalled 'pkg-as-it-should-be' -- cgit v1.2.3 From 24a59c62efafbdb8387b2d3c5616b04b9fd21306 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:15:15 +0200 Subject: Add missing includes and external definitions Several modules use std::array without including the array header. Bad modules. Some modules use STDOUT_FILENO and friends, or close() without including unistd.h, where they are defined. One module also uses WIFEXITED() without including sys/wait.h. Finally, environ is not specified to be defined in unistd.h. We are required to define it ourselves according to POSIX, so let's do that. --- apt-pkg/contrib/strutl.cc | 1 + apt-pkg/deb/debindexfile.cc | 1 + apt-pkg/deb/dpkgpm.cc | 2 ++ apt-pkg/edsp/edsplistparser.cc | 2 ++ apt-private/private-show.cc | 1 + cmdline/apt-helper.cc | 1 + cmdline/apt-sortpkgs.cc | 1 + test/interactive-helper/test_fileutl.cc | 1 + 8 files changed, 10 insertions(+) diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 6c72859d4..e7cc1a759 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 65bd3e6ee..c55847305 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -30,6 +30,7 @@ #include #include +#include /*}}}*/ // Sources Index /*{{{*/ diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b0700bcc6..0ac74d479 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -61,6 +61,8 @@ #include /*}}}*/ +extern char **environ; + using namespace std; APT_PURE static string AptHistoryRequestingUser() /*{{{*/ diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index dd8890f0e..c6fd528da 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -21,6 +21,8 @@ #include #include +#include + /*}}}*/ // ListParser::edspListParser - Constructor /*{{{*/ diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 03229476e..27338a08c 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index fd99fba8b..a6f88ad06 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index b80bbedd6..cf19b84ec 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/test/interactive-helper/test_fileutl.cc b/test/interactive-helper/test_fileutl.cc index e660c2981..7c4b95759 100644 --- a/test/interactive-helper/test_fileutl.cc +++ b/test/interactive-helper/test_fileutl.cc @@ -4,6 +4,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3 From 0fa5d862040a56fbad9a2bd563243f23359a881d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 22 Aug 2016 22:45:19 +0200 Subject: CMake: Handle BSD platforms with sig_t instead of sighandler_t Somewhat annoying, but OK. Might want to switch to something more clever to get rid of the typedef at all. Gbp-Dch: ignore --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcb200571..27d0dd5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,19 @@ if (CMAKE_USE_PTHREADS_INIT) set(HAVE_PTHREAD 1) endif() +include(CheckTypeSize) +set(CMAKE_EXTRA_INCLUDE_FILES "signal.h") +check_type_size("sig_t" SIG_T LANGUAGE "CXX") +check_type_size("sighandler_t" SIGHANDLER_T LANGUAGE "CXX") +set(CMAKE_EXTRA_INCLUDE_FILES) +if (NOT HAVE_SIGHANDLER_T) + if (HAVE_SIG_T) + add_definitions(-Dsighandler_t=sig_t) + else() + message(FATAL_ERROR "Platform defines neither sig_t nor sighandler_t") + endif() +endif() + # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team ") -- cgit v1.2.3 From b10ec8cc7b6b9d181cccacee6b4c1c4c5bdbd510 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 22 Aug 2016 22:54:07 +0200 Subject: CMake: Handle endian.h locations on other platforms Gbp-Dch: ignore --- CMake/config.h.in | 6 ++++++ CMake/endian.h.in | 9 +++++++++ CMakeLists.txt | 12 ++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 CMake/endian.h.in diff --git a/CMake/config.h.in b/CMake/config.h.in index e929646fa..f32f15b8a 100644 --- a/CMake/config.h.in +++ b/CMake/config.h.in @@ -25,6 +25,12 @@ /* Define if we have sys/mount.h */ #cmakedefine HAVE_MOUNT_H +/* Define if we have sys/endian.h */ +#cmakedefine HAVE_SYS_ENDIAN_H + +/* Define if we have machine/endian.h */ +#cmakedefine HAVE_MACHINE_ENDIAN_H + /* Define if we have enabled pthread support */ #cmakedefine HAVE_PTHREAD diff --git a/CMake/endian.h.in b/CMake/endian.h.in new file mode 100644 index 000000000..1d9198c24 --- /dev/null +++ b/CMake/endian.h.in @@ -0,0 +1,9 @@ +#include + +#ifdef HAVE_MACHINE_ENDIAN_H +#include +#endif +#ifdef HAVE_SYS_ENDIAN_H +#include +#include +#endif diff --git a/CMakeLists.txt b/CMakeLists.txt index 27d0dd5a3..08e431740 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,18 @@ if (CMAKE_USE_PTHREADS_INIT) set(HAVE_PTHREAD 1) endif() +CHECK_INCLUDE_FILES(machine/endian.h HAVE_MACHINE_ENDIAN_H) +CHECK_INCLUDE_FILES(sys/endian.h HAVE_SYS_ENDIAN_H) +CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H) +if (NOT HAVE_ENDIAN_H) + if (HAVE_MACHINE_ENDIAN_H OR HAVE_SYS_ENDIAN_H) + configure_file(CMake/endian.h.in ${PROJECT_BINARY_DIR}/include/endian.h) + else() + message(FATAL_ERROR "Cannot find endian.h") + endif() +endif() + + include(CheckTypeSize) set(CMAKE_EXTRA_INCLUDE_FILES "signal.h") check_type_size("sig_t" SIG_T LANGUAGE "CXX") -- cgit v1.2.3 From 374ab017c262108c0f12bcdc8d15ff242c7adc56 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:38:19 +0200 Subject: CMake: Do not hardcode -ldl Does not exist on FreeBSD Gbp-Dch: ignore --- apt-pkg/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index a90bb1d8c..9bbc6bd98 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories(apt-pkg ${LZMA_INCLUDE_DIRS} ${LZ4_INCLUDE_DIRS}) target_link_libraries(apt-pkg - PRIVATE -lutil -ldl -lresolv + PRIVATE -lutil ${CMAKE_DL_LIBS} -lresolv ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} -- cgit v1.2.3 From ad5282bb0c97fd0254b20fb71a59d0f755c3ed65 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:42:54 +0200 Subject: CMake: Do not use -lresolv if res_init exists in libc Gbp-Dch: ignore --- CMakeLists.txt | 8 ++++++++ apt-pkg/CMakeLists.txt | 2 +- methods/CMakeLists.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08e431740..8c41534ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,6 +143,14 @@ if (NOT HAVE_SIGHANDLER_T) endif() endif() +# Handle resolving +check_function_exists(res_init HAVE_LIBC_RESOLV) +if(HAVE_LIBC_RESOLV) + set(RESOLV_LIBRARIES) +else() + set(RESOLV_LIBRARIES -lresolv) +endif() + # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team ") diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index 9bbc6bd98..3f85bc143 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories(apt-pkg ${LZMA_INCLUDE_DIRS} ${LZ4_INCLUDE_DIRS}) target_link_libraries(apt-pkg - PRIVATE -lutil ${CMAKE_DL_LIBS} -lresolv + PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt index 2417c4dc1..82ae70e7d 100644 --- a/methods/CMakeLists.txt +++ b/methods/CMakeLists.txt @@ -21,7 +21,7 @@ target_link_libraries(store apt-pkg) target_link_libraries(gpgv apt-pkg) target_link_libraries(cdrom apt-pkg) target_link_libraries(http apt-pkg) -target_link_libraries(mirror apt-pkg -lresolv) +target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES}) target_link_libraries(https apt-pkg ${CURL_LIBRARIES}) target_link_libraries(ftp apt-pkg) target_link_libraries(rred apt-pkg) -- cgit v1.2.3 From c799c3efe43d7fde53ea4a3c5f976375607a2805 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 14:13:24 +0200 Subject: CMake: Add FindLZ4 and FindLZMA This makes things work with /usr/local on FreeBSD. Gbp-Dch: ignore --- CMake/FindLZ4.cmake | 25 +++++++++++++++++++++++++ CMake/FindLZMA.cmake | 25 +++++++++++++++++++++++++ CMakeLists.txt | 6 +++--- 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 CMake/FindLZ4.cmake create mode 100644 CMake/FindLZMA.cmake diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake new file mode 100644 index 000000000..597f520a8 --- /dev/null +++ b/CMake/FindLZ4.cmake @@ -0,0 +1,25 @@ +# - Try to find LZ4 +# Once done, this will define +# +# LZ4_FOUND - system has LZ4 +# LZ4_INCLUDE_DIRS - the LZ4 include directories +# LZ4_LIBRARIES - the LZ4 library +find_package(PkgConfig) + +pkg_check_modules(LZ4_PKGCONF liblz4) + +find_path(LZ4_INCLUDE_DIRS + NAMES lz4frame.h + PATHS ${LZ4_PKGCONF_INCLUDE_DIRS} +) + + +find_library(LZ4_LIBRARIES + NAMES lz4 + PATHS ${LZ4_PKGCONF_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LZ4 DEFAULT_MSG LZ4_INCLUDE_DIRS LZ4_LIBRARIES) + +mark_as_advanced(LZ4_INCLUDE_DIRS LZ4_LIBRARIES) diff --git a/CMake/FindLZMA.cmake b/CMake/FindLZMA.cmake new file mode 100644 index 000000000..6abc4fa77 --- /dev/null +++ b/CMake/FindLZMA.cmake @@ -0,0 +1,25 @@ +# - Try to find LZMA +# Once done, this will define +# +# LZMA_FOUND - system has LZMA +# LZMA_INCLUDE_DIRS - the LZMA include directories +# LZMA_LIBRARIES - the LZMA library +find_package(PkgConfig) + +pkg_check_modules(LZMA_PKGCONF liblzma) + +find_path(LZMA_INCLUDE_DIRS + NAMES lzma.h + PATHS ${LZMA_PKGCONF_INCLUDE_DIRS} +) + + +find_library(LZMA_LIBRARIES + NAMES lzma + PATHS ${LZMA_PKGCONF_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LZMA DEFAULT_MSG LZMA_INCLUDE_DIRS LZMA_LIBRARIES) + +mark_as_advanced(LZMA_INCLUDE_DIRS LZMA_LIBRARIES) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c41534ad..4f4c8b37e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ include(CheckStructHasMember) include(GNUInstallDirs) include(TestBigEndian) find_package(Threads) -find_package(PkgConfig) find_package(LFS REQUIRED) # Add large file support @@ -78,12 +77,13 @@ if (BZIP2_FOUND) set(HAVE_BZ2 1) endif() -pkg_check_modules(LZMA liblzma) +find_package(LZMA) if (LZMA_FOUND) set(HAVE_LZMA 1) endif() -pkg_check_modules(LZ4 liblz4) + +find_package(LZ4) if (LZ4_FOUND) set(HAVE_LZ4 1) endif() -- cgit v1.2.3 From 2c391d850fb405e03bca362caa5c90262c66fe33 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 14:40:46 +0200 Subject: CMake/private-download: Fix statfs includes on FreeBSD On FreeBSD, we have to include sys/params.h and sys/mount.h, not sys/vfs.h. Gbp-Dch: ignore --- CMakeLists.txt | 11 ++++++----- apt-private/private-download.cc | 7 +++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f4c8b37e..b2e5bfe9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,14 +89,15 @@ if (LZ4_FOUND) endif() # Mount()ing and stat()ing and friends +check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) +check_include_files(sys/params.h HAVE_PARAMS_H) +check_symbol_exists(statfs sys/mount.h HAVE_MOUNT_H) +if (NOT HAVE_VFS_H AND NOT HAVE_MOUNT_H) + message(FATAL_ERROR "Can find neither statvfs() nor statfs()") +endif() check_function_exists(statvfs HAVE_STATVFS) if (NOT HAVE_STATVFS) - check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) - check_symbol_exists(statfs sys/mount.h HAVE_MOUNT_H) - if (NOT HAVE_VFS_H AND NOT HAVE_MOUNT_H) - message(FATAL_ERROR "Can find neither statvfs() nor statfs()") - endif() configure_file(CMake/statvfs.h.in ${PROJECT_BINARY_DIR}/include/statvfs.h COPYONLY) endif() diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc index c85a49727..d0cbbcf50 100644 --- a/apt-private/private-download.cc +++ b/apt-private/private-download.cc @@ -25,7 +25,14 @@ #include #include #include +#ifdef HAVE_VFS_H #include +#else +#ifdef HAVE_PARAMS_H +#include +#endif +#include +#endif #include #include #include -- cgit v1.2.3 From 8265d6c8fdc2dd835d9cf2a47af13461fa421389 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 14:57:11 +0200 Subject: methods/connect.cc: Only use AI_IDN if defined Gbp-Dch: ignore --- methods/connect.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/methods/connect.cc b/methods/connect.cc index c819c1dfb..cb2f83588 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -180,8 +180,10 @@ static bool ConnectToHostname(std::string const &Host, int const Port, memset(&Hints,0,sizeof(Hints)); Hints.ai_socktype = SOCK_STREAM; Hints.ai_flags = 0; +#ifdef AI_IDN if (_config->FindB("Acquire::Connect::IDN", true) == true) Hints.ai_flags |= AI_IDN; +#endif // see getaddrinfo(3): only return address if system has such a address configured // useful if system is ipv4 only, to not get ipv6, but that fails if the system has // no address configured: e.g. offline and trying to connect to localhost. -- cgit v1.2.3 From 24ad9b325f2d277864e3a75931137b93dd75cd03 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 12:48:25 +0200 Subject: CMake: Handle Berkeley DB on FreeBSD The BSD systems still ship their own db.h with a historical BSD implementation, which is preferred by CMake, as it searches its default path first. We thus have to disable the DEFAULT_PATH for the search, unfortunately. We also need to pass the correct include directory to the target. Furthermore, on FreeBSD the library is called db-, so let's add db-5 to the list of allowed names. Gbp-Dch: ignore --- CMake/FindBerkeleyDB.cmake | 17 ++++++++++++++--- ftparchive/CMakeLists.txt | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CMake/FindBerkeleyDB.cmake b/CMake/FindBerkeleyDB.cmake index 44cfd3ddb..34bc3b0d1 100644 --- a/CMake/FindBerkeleyDB.cmake +++ b/CMake/FindBerkeleyDB.cmake @@ -33,14 +33,25 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# We need NO_DEFAULT_PATH here, otherwise CMake helpfully picks up the wrong +# db.h on BSD systems instead of the Berkeley DB one. find_path(BERKELEY_DB_INCLUDE_DIRS db.h - /usr/include/db5 + ${CMAKE_INSTALL_FULL_INCLUDEDIR}/db5 /usr/local/include/db5 - /usr/include/db4 + /usr/include/db5 + + ${CMAKE_INSTALL_FULL_INCLUDEDIR}/db4 /usr/local/include/db4 + /usr/include/db4 + + ${CMAKE_INSTALL_FULL_INCLUDEDIR} + /usr/local/include + /usr/include + + NO_DEFAULT_PATH ) -find_library(BERKELEY_DB_LIBRARIES NAMES db ) +find_library(BERKELEY_DB_LIBRARIES NAMES db db-5) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIRS BERKELEY_DB_LIBRARIES) diff --git a/ftparchive/CMakeLists.txt b/ftparchive/CMakeLists.txt index 1e1dc36ca..799fd7335 100644 --- a/ftparchive/CMakeLists.txt +++ b/ftparchive/CMakeLists.txt @@ -1,3 +1,4 @@ +include_directories(${BERKELEY_DB_INCLUDE_DIRS}) # Create the executable tasks file(GLOB_RECURSE source "*.cc") add_executable(apt-ftparchive ${source}) -- cgit v1.2.3 From 75d238ba66576c04f257e9d7c0a6995721f1441d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 26 Aug 2016 16:14:13 +0200 Subject: Accept --autoremove as alias for --auto-remove I probably missed that when I did the usability work. But better late than never. --- apt-private/private-cmndline.cc | 1 + doc/apt-get.8.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index a890aafab..d0cda08a6 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -189,6 +189,7 @@ static bool addArgumentsAPTGet(std::vector &Args, char const addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0); addArg(0, "purge", "APT::Get::Purge", 0); addArg('V',"verbose-versions","APT::Get::Show-Versions",0); + addArg(0, "autoremove", "APT::Get::AutomaticRemove", 0); addArg(0, "auto-remove", "APT::Get::AutomaticRemove", 0); addArg(0, "reinstall", "APT::Get::ReInstall", 0); addArg(0, "solver", "APT::Solver", CommandLine::HasArg); diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index 4c34b298b..56ce08165 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -522,7 +522,7 @@ Configuration Item: APT::Get::Remove. - + If the command is either install or remove, then this option acts like running the autoremove command, removing unused dependency packages. Configuration Item: APT::Get::AutomaticRemove. -- cgit v1.2.3 From cede4eda68220a002822194605d436b7ca044afa Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 18:48:43 +0200 Subject: CMake: Add support for libintl This basically just links everything to libintl if USE_NLS is on. It would be better to just link those targets that are actually translated, but doing so is a huge PITA. Also move the include_directories() for the build-tree include/ directory to the top of the CMakeLists.txt, otherwise it only gets passed after Intl_INCLUDE_DIRS, which means we will built against installed apt-pkg headers (if any) instead of our own. Gbp-Dch: ignore --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2e5bfe9c..189a8d570 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ # set minimum version project(apt) cmake_minimum_required(VERSION 3.4.0) +# Generic header locations +include_directories(${PROJECT_BINARY_DIR}/include) + enable_testing() @@ -27,6 +30,12 @@ include(TestBigEndian) find_package(Threads) find_package(LFS REQUIRED) +if(USE_NLS) + find_package(Intl REQUIRED) + link_libraries(${Intl_LIBRARIES}) + include_directories(${Intl_INCLUDE_DIRS}) +endif() + # Add large file support add_compile_options(${LFS_COMPILE_OPTIONS}) add_definitions(${LFS_DEFINITIONS}) @@ -166,9 +175,6 @@ endif() configure_file(CMake/config.h.in ${PROJECT_BINARY_DIR}/include/config.h) configure_file(CMake/apti18n.h.in ${PROJECT_BINARY_DIR}/include/apti18n.h) -# Generic header locations -include_directories(${PROJECT_BINARY_DIR}/include) - # Add our subdirectories add_subdirectory(vendor) add_subdirectory(apt-pkg) -- cgit v1.2.3 From 0fb16c3e678044d6d06ba8a6199b1e96487ee0d8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 20:19:11 +0200 Subject: Use C locale instead of C.UTF-8 for protocol strings The C.UTF-8 locale is not portable, so we need to use C, otherwise we crash on other systems. We can use std::locale::classic() for that, which might also be a bit cheaper than using locale("C"). --- apt-pkg/acquire-item.cc | 2 +- apt-pkg/acquire.cc | 2 +- apt-pkg/contrib/strutl.cc | 4 ++-- apt-pkg/install-progress.cc | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7abb7b206..d72e62725 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -2047,7 +2047,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ HashStringList ServerHashes; unsigned long long ServerSize = 0; - auto const &posix = std::locale("C.UTF-8"); + auto const &posix = std::locale::classic(); for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type) { std::string tagname = *type; diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 1efb772b4..33c98cf2e 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1259,7 +1259,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // build the status str std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n'; auto const dlstatus = str.str(); diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index e7cc1a759..66b0078dc 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -759,7 +759,7 @@ string TimeRFC1123(time_t Date, bool const NumericTimezone) if (gmtime_r(&Date, &Conv) == NULL) return ""; - auto const posix = std::locale("C.UTF-8"); + auto const posix = std::locale::classic(); std::ostringstream datestr; datestr.imbue(posix); APT::StringView const fmt("%a, %d %b %Y %H:%M:%S"); @@ -946,7 +946,7 @@ bool RFC1123StrToTime(const char* const str,time_t &time) signed int year = 0; // yes, Y23K problem – we gonna worry then… std::string weekday, month, datespec, timespec, zone; std::istringstream ss(str); - auto const &posix = std::locale("C.UTF-8"); + auto const &posix = std::locale::classic(); ss.imbue(posix); ss >> weekday; // we only superficially check weekday, mostly to avoid accepting localized diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index 256495420..6c3e51b2c 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -84,7 +84,7 @@ static std::string GetProgressFdString(char const * const status, { float const progress{Done / static_cast(Total) * 100}; std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << status << ':' << pkg << ':' << std::fixed << progress << ':' << msg << '\n'; return str.str(); @@ -165,7 +165,7 @@ static std::string GetProgressDeb822String(char const * const status, { float const progress{Done / static_cast(Total) * 100}; std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "Status: " << status << '\n'; if (pkg != nullptr) -- cgit v1.2.3 From dd7758b9245275a31fde70218db9a531c5859c26 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 21:01:06 +0200 Subject: apt-key: Only use readlink -f for existing components On FreeBSD, readlink -f requires the last component to exist. --- cmdline/apt-key.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index 81314c7f5..21df37ffd 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -306,7 +306,7 @@ merge_all_trusted_keyrings_into_pubring() { # does the same as: # foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg" # but without using gpg, just cat and find - local PUBRING="$(readlink -f "${GPGHOMEDIR}/pubring.gpg")" + local PUBRING="$(readlink -f "${GPGHOMEDIR}")/pubring.gpg" # if a --keyring was given, just use this one if [ -n "$FORCED_KEYRING" ]; then if [ -s "$FORCED_KEYRING" ]; then -- cgit v1.2.3 From 8757a0fdeee00ea6a7cc717188a0e129ad8a553c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 19:41:58 +0200 Subject: Make directory paths configurable This allows other vendors to use different paths, or to build your own APT in /opt for testing. Note that this uses + 1 in some places, as the paths we receive are absolute, but we need to strip of the initial /. --- CMake/config.h.in | 9 +++++++++ CMakeLists.txt | 27 ++++++++++++++++++--------- apt-pkg/acquire-item.cc | 2 +- apt-pkg/contrib/gpgv.cc | 2 +- apt-pkg/deb/debsystem.cc | 8 ++++---- apt-pkg/init.cc | 12 ++++++------ test/integration/framework | 5 +++++ test/integration/test-apt-config | 2 +- 8 files changed, 45 insertions(+), 22 deletions(-) diff --git a/CMake/config.h.in b/CMake/config.h.in index f32f15b8a..c23254929 100644 --- a/CMake/config.h.in +++ b/CMake/config.h.in @@ -55,6 +55,15 @@ /* The mail address to reach upstream */ #define PACKAGE_MAIL "${PACKAGE_MAIL}" +/* Various directories */ +#cmakedefine CMAKE_INSTALL_FULL_BINDIR "${CMAKE_INSTALL_FULL_BINDIR}" +#cmakedefine STATE_DIR "${STATE_DIR}" +#cmakedefine CACHE_DIR "${CACHE_DIR}" +#cmakedefine LOG_DIR "${LOG_DIR}" +#cmakedefine CONF_DIR "${CONF_DIR}" +#cmakedefine LIBEXEC_DIR "${LIBEXEC_DIR}" +#cmakedefine BIN_DIR "${BIN_DIR}" + #define APT_8_CLEANER_HEADERS #define APT_9_CLEANER_HEADERS #define APT_10_CLEANER_HEADERS diff --git a/CMakeLists.txt b/CMakeLists.txt index 189a8d570..916090866 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,6 +171,15 @@ if (NOT DEFINED COMMON_ARCH) OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) endif() +# Set various directories +set(STATE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt" CACHE PATH "Your /var/lib/apt") +set(CACHE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/cache/apt" CACHE PATH "Your /var/cache/apt") +set(LOG_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/apt" CACHE PATH "Your /var/log/apt") +set(CONF_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt" CACHE PATH "Your /etc/apt") +set(LIBEXEC_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/apt" CACHE PATH "Your /usr/libexec/apt") +set(BIN_DIR "${CMAKE_INSTALL_FULL_BINDIR}") + + # Configure our configuration headers (config.h and apti18n.h) configure_file(CMake/config.h.in ${PROJECT_BINARY_DIR}/include/config.h) configure_file(CMake/apti18n.h.in ${PROJECT_BINARY_DIR}/include/apti18n.h) @@ -197,13 +206,13 @@ endif() # Create our directories. install_empty_directories( - ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/apt.conf.d - ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/preferences.d - ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/sources.list.d - ${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt/trusted.gpg.d - ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/cache/apt/archives/partial - ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt/lists/partial - ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt/mirrors/partial - ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt/periodic - ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/apt + ${CONF_DIR}/apt.conf.d + ${CONF_DIR}/preferences.d + ${CONF_DIR}/sources.list.d + ${CONF_DIR}/trusted.gpg.d + ${CACHE_DIR}/archives/partial + ${STATE_DIR}/lists/partial + ${STATE_DIR}/mirrors/partial + ${STATE_DIR}/periodic + ${LOG_DIR} ) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index d72e62725..7238d692e 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -145,7 +145,7 @@ static void ReportMirrorFailureToCentral(pkgAcquire::Item const &I, std::string << FailCode << std::endl; #endif string const report = _config->Find("Methods::Mirror::ProblemReporting", - "/usr/lib/apt/apt-report-mirror-failure"); + LIBEXEC_DIR "/apt-report-mirror-failure"); if(!FileExists(report)) return; diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc index 8796195b8..941f901e8 100644 --- a/apt-pkg/contrib/gpgv.cc +++ b/apt-pkg/contrib/gpgv.cc @@ -48,7 +48,7 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG, int const &statusfd, int fd[2], std::string const &key) { #define EINTERNAL 111 - std::string const aptkey = _config->Find("Dir::Bin::apt-key", "/usr/bin/apt-key"); + std::string const aptkey = _config->Find("Dir::Bin::apt-key", CMAKE_INSTALL_FULL_BINDIR "/apt-key"); bool const Debug = _config->FindB("Debug::Acquire::gpgv", false); struct exiter { diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index f7968ec47..899f7328b 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -188,7 +188,7 @@ static std::string getDpkgStatusLocation(Configuration const &Cnf) { Configuration PathCnf; PathCnf.Set("Dir", Cnf.Find("Dir", "/")); PathCnf.Set("Dir::State::status", "status"); - auto const cnfstatedir = Cnf.Find("Dir::State", "var/lib/apt/"); + auto const cnfstatedir = Cnf.Find("Dir::State", STATE_DIR + 1); // if the state dir ends in apt, replace it with dpkg - // for the default this gives us the same as the fallback below. // This can't be a ../dpkg as that would play bad with symlinks @@ -211,7 +211,7 @@ bool debSystem::Initialize(Configuration &Cnf) Cnf.CndSet("Dir::State::extended_states", "extended_states"); if (Cnf.Exists("Dir::State::status") == false) Cnf.Set("Dir::State::status", getDpkgStatusLocation(Cnf)); - Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); + Cnf.CndSet("Dir::Bin::dpkg",BIN_DIR"/dpkg"); if (d->StatusFile) { delete d->StatusFile; @@ -239,9 +239,9 @@ APT_PURE bool debSystem::ArchiveSupported(const char *Type) signed debSystem::Score(Configuration const &Cnf) { signed Score = 0; - if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true) + if (FileExists(Cnf.FindFile("Dir::State::status",getDpkgStatusLocation(Cnf).c_str())) == true) Score += 10; - if (FileExists(Cnf.Find("Dir::Bin::dpkg","/usr/bin/dpkg")) == true) + if (FileExists(Cnf.Find("Dir::Bin::dpkg",BIN_DIR"/dpkg")) == true) Score += 10; if (FileExists("/etc/debian_version") == true) Score += 10; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index fa679e6c6..282c0daf0 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -47,19 +47,19 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir","/"); // State - Cnf.CndSet("Dir::State","var/lib/apt/"); + Cnf.CndSet("Dir::State", STATE_DIR + 1); Cnf.CndSet("Dir::State::lists","lists/"); Cnf.CndSet("Dir::State::cdroms","cdroms.list"); Cnf.CndSet("Dir::State::mirrors","mirrors/"); // Cache - Cnf.CndSet("Dir::Cache","var/cache/apt/"); + Cnf.CndSet("Dir::Cache", CACHE_DIR + 1); Cnf.CndSet("Dir::Cache::archives","archives/"); Cnf.CndSet("Dir::Cache::srcpkgcache","srcpkgcache.bin"); Cnf.CndSet("Dir::Cache::pkgcache","pkgcache.bin"); // Configuration - Cnf.CndSet("Dir::Etc","etc/apt/"); + Cnf.CndSet("Dir::Etc", CONF_DIR + 1); Cnf.CndSet("Dir::Etc::sourcelist","sources.list"); Cnf.CndSet("Dir::Etc::sourceparts","sources.list.d"); Cnf.CndSet("Dir::Etc::main","apt.conf"); @@ -69,12 +69,12 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Etc::preferencesparts","preferences.d"); Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg"); Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d"); - Cnf.CndSet("Dir::Bin::methods","/usr/lib/apt/methods"); - Cnf.CndSet("Dir::Bin::solvers::","/usr/lib/apt/solvers"); + Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods"); + Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/apt/solvers"); Cnf.CndSet("Dir::Media::MountPath","/media/apt"); // State - Cnf.CndSet("Dir::Log","var/log/apt"); + Cnf.CndSet("Dir::Log", LOG_DIR + 1); Cnf.CndSet("Dir::Log::Terminal","term.log"); Cnf.CndSet("Dir::Log::History","history.log"); Cnf.CndSet("Dir::Log::Planner","eipp.log.xz"); diff --git a/test/integration/framework b/test/integration/framework index 1e356ffaf..9589ca84c 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -352,6 +352,11 @@ setupenvironment() { ln -s "${TMPWORKINGDIRECTORY}/keys/joesixpack.pub" rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf + echo "Dir::Etc \"etc\";" >> aptconfig.conf + echo "Dir::State \"var/lib/apt\";" >> aptconfig.conf + echo "Dir::Cache \"var/cache/apt\";" >> aptconfig.conf + echo "Dir::Etc \"etc/apt\";" >> aptconfig.conf + echo "Dir::Log \"var/log/apt\";" >> aptconfig.conf echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf echo "Dir::Bin::Methods \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/methods\";" >> aptconfig.conf # either store apt-key were we can access it, even if we run it as a different user diff --git a/test/integration/test-apt-config b/test/integration/test-apt-config index abae83ee6..f2068b789 100755 --- a/test/integration/test-apt-config +++ b/test/integration/test-apt-config @@ -24,7 +24,7 @@ testsuccessequal "ARCH='amd64'" aptconfig shell ARCH APT::Architecture ROOTDIR="$(readlink -f rootdir)" testsuccessequal "CONFIG='apt.conf'" aptconfig shell CONFIG Dir::Etc::main testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/apt.conf'" aptconfig shell CONFIG Dir::Etc::main/f -testsuccessequal "CONFIG='etc/apt/'" aptconfig shell CONFIG Dir::Etc +testsuccessequal "CONFIG='etc/apt'" aptconfig shell CONFIG Dir::Etc testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/ # old style testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/d -- cgit v1.2.3 From 7c1177f6b82aaaf3b7d378ef516b7ccbd47ec07b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 21:53:39 +0200 Subject: test: Use C locale instead of C.UTF-8 Gbp-Dch: ignore --- test/integration/framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/framework b/test/integration/framework index 9589ca84c..ff0df3226 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -442,7 +442,7 @@ EOF # cleanup the environment a bit # prefer our apt binaries over the system apt binaries export PATH="${BUILDDIRECTORY}:${PATH}:/usr/local/sbin:/usr/sbin:/sbin" - export LC_ALL=C.UTF-8 + export LC_ALL=C unset LANGUAGE APT_CONFIG unset GREP_OPTIONS DEB_BUILD_PROFILES unset http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy -- cgit v1.2.3 From 14e57111df6f8894ed47841b7471837c9d87c264 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 21:47:54 +0200 Subject: test: Substitute GNU commands for other commands where available We are simply checking for gnuCMD and gCMD for each command we are interested in. Gbp-Dch: ignore --- test/integration/framework | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index ff0df3226..25cabc9f8 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -31,7 +31,6 @@ if [ "${MSGCOLOR:-YES}" = 'YES' ]; then fi fi - if [ "$MSGCOLOR" != 'NO' ]; then CERROR="\033[1;31m" # red CWARNING="\033[1;33m" # yellow @@ -276,8 +275,13 @@ find_project_binary_dir() { fi } setupenvironment() { + # Next check needs a gnu stat, let's figure that out early. + stat=stat + if command -v gnustat >/dev/null 2>&1; then + stat=gnustat + fi # privilege dropping and testing doesn't work if /tmp isn't world-writeable (as e.g. with libpam-tmpdir) - if [ -n "$TMPDIR" ] && [ "$(id -u)" = '0' ] && [ "$(stat --format '%a' "$TMPDIR")" != '1777' ]; then + if [ -n "$TMPDIR" ] && [ "$(id -u)" = '0' ] && [ "$($stat --format '%a' "$TMPDIR")" != '1777' ]; then unset TMPDIR fi TMPWORKINGDIRECTORY="$(mktemp -d)" @@ -290,6 +294,18 @@ setupenvironment() { fi msgninfo "Preparing environment for ${0##*/} in ${TMPWORKINGDIRECTORY}…" + # Setup coreutils on BSD systems + mkdir "${TMPWORKINGDIRECTORY}/bin" + for prefix in gnu g; do + for command in stat touch sed cp tr sha1sum sha256sum md5sum sha512sum grep date wc chmod head readlink tar expr base64; do + if command -v $prefix$command 2>/dev/null >/dev/null; then + [ -e "${TMPWORKINGDIRECTORY}/bin/$command" ] || ln -sf $(command -v $prefix$command) "${TMPWORKINGDIRECTORY}/bin/$command" + fi + done + done + export PATH="${TMPWORKINGDIRECTORY}/bin/:$PATH" + + mkdir -m 700 "${TMPWORKINGDIRECTORY}/downloaded" if [ "$(id -u)" = '0' ]; then # relax permissions so that running as root with user switching works -- cgit v1.2.3 From 144ce9208b39c1bf0d26e8ce071367ee668c0ae2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 23:01:18 +0200 Subject: test: Allow stunnel to be used instead of stunnel4 This is needed for Fedora and FreeBSD. Gbp-Dch: ignore --- test/integration/framework | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 25cabc9f8..ffcb8af04 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1296,7 +1296,12 @@ changetowebserver() { } changetohttpswebserver() { - if ! command -v stunnel4 >/dev/null 2>&1; then + local stunnel4 + if command -v stunnel4 >/dev/null 2>&1; then + stunnel4=stunnel4 + elif command -v stunnel >/dev/null 2>&1; then + stunnel4=stunnel + else msgdie 'You need to install stunnel4 for https testcases' fi if [ ! -e "${TMPWORKINGDIRECTORY}/aptarchive/aptwebserver.pid" ]; then @@ -1310,14 +1315,14 @@ output = /dev/null accept = 0 connect = $APTHTTPPORT " > "${TMPWORKINGDIRECTORY}/stunnel.conf" - stunnel4 "${TMPWORKINGDIRECTORY}/stunnel.conf" + $stunnel4 "${TMPWORKINGDIRECTORY}/stunnel.conf" waitforpidfile "${TMPWORKINGDIRECTORY}/aptarchive/stunnel.pid" local PID="$(cat "${TMPWORKINGDIRECTORY}/aptarchive/stunnel.pid")" if [ -z "$PID" ]; then - msgdie 'Could not fork stunnel4 successfully' + msgdie 'Could not fork $stunnel4 successfully' fi addtrap 'prefix' "kill ${PID};" - APTHTTPSPORT="$(lsof -i -n | awk "/^stunnel4 / && \$2 == \"${PID}\" {print \$9; exit; }" | cut -d':' -f 2)" + APTHTTPSPORT="$(lsof -i -n | awk "/^$stunnel4 / && \$2 == \"${PID}\" {print \$9; exit; }" | cut -d':' -f 2)" webserverconfig 'aptwebserver::port::https' "$APTHTTPSPORT" "https://localhost:${APTHTTPSPORT}" rewritesourceslist "https://localhost:${APTHTTPSPORT}/" } -- cgit v1.2.3 From 3c973af2ff85e7aae7fbdd84e7633e9d9308dde7 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 23:14:05 +0200 Subject: test: Allow moreutils-parallel instead of parallel That's what it's called on FreeBSD. Gbp-Dch: ignore --- test/integration/run-tests | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/run-tests b/test/integration/run-tests index 78f24fbaf..fad249994 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -89,7 +89,11 @@ if [ -n "$APT_TEST_JOBS" ]; then if [ "$MSGCOLOR" != 'NO' ]; then export MSGCOLOR='ALWAYS' fi - exec parallel -j "$APT_TEST_JOBS" "./$(basename "$0")" -- $(echo "$TESTLIST") + parallel=parallel + if command -v moreutils-parallel >/dev/null 2>&1; then + parallel=moreutils-parallel + fi + exec $parallel -j "$APT_TEST_JOBS" "./$(basename "$0")" -- $(echo "$TESTLIST") fi TOTAL="$(echo "$TESTLIST" | wc -l)" for testcase in $TESTLIST; do -- cgit v1.2.3 From 4b1fb7b1876bdb46cb7a0329158f12638baa2464 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 23:19:14 +0200 Subject: test: Get rid of debhelper rules.tiny example dep Gbp-Dch: ignore --- test/integration/framework | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/integration/framework b/test/integration/framework index ffcb8af04..39c9fcde2 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -701,13 +701,25 @@ Package: $NAME" echo '3.0 (native)' > "${BUILDDIR}/debian/source/format" } +make_tiny_rules() { + local OUT="$1" + if command -v gmake >/dev/null 2>&1; then + [ -e ${TMPWORKINGDIRECTORY}/bin/make ] || ln -s $(command -v gmake) ${TMPWORKINGDIRECTORY}/bin/make + echo "#!${TMPWORKINGDIRECTORY}/bin/make -f" > "$OUT" + else + echo '#!/usr/bin/make -f' > "$OUT" + fi + echo '%:' >> "$OUT" + echo ' dh $@' >> "$OUT" +} + setupsimplenativepackage() { _setupsimplenativepackage "$@" local NAME="$1" local VERSION="$3" local BUILDDIR="${TMPWORKINGDIRECTORY}/incoming/${NAME}-${VERSION}" test -e "${BUILDDIR}/debian/compat" || echo '7' > "${BUILDDIR}/debian/compat" - test -e "${BUILDDIR}/debian/rules" || cp /usr/share/doc/debhelper/examples/rules.tiny "${BUILDDIR}/debian/rules" + test -e "${BUILDDIR}/debian/rules" || make_tiny_rules "${BUILDDIR}/debian/rules" } buildsimplenativepackage() { -- cgit v1.2.3 From 1a7c66e40ffd2bdd404b2efdc6dc268ebfd508ec Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 23:37:36 +0200 Subject: test: Fix building of noopchroot Gbp-Dch: ignore --- test/integration/framework | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/framework b/test/integration/framework index 39c9fcde2..bf9cef4e8 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -589,7 +589,11 @@ int execvp(const char *file, char *const argv[]) { return func_execvp(newfile, argv); } EOF - testempty --nomsg gcc -Wall -Wextra -fPIC -shared -o noopchroot.so noopchroot.c -ldl + if cc -ldl 2>&1 | grep -q dl; then + testempty --nomsg cc -Wall -Wextra -fPIC -shared -o noopchroot.so noopchroot.c + else + testempty --nomsg cc -Wall -Wextra -fPIC -shared -o noopchroot.so noopchroot.c -ldl + fi } configcompression() { if [ "$1" = 'ALL' ]; then -- cgit v1.2.3 From f8e8a14f17cb41c588970fc57bb41fcf6058a703 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 00:08:39 +0200 Subject: test: Explicitly pass --admindir=var/lib/dpkg to dpkg Our test suite assumes that dpkg's admindir is var/lib/dpkg. This might not always be true; for example, on FreeBSD, it is located at /var/db/dpkg. Gbp-Dch: ignore --- test/integration/framework | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/framework b/test/integration/framework index bf9cef4e8..827226b7d 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -407,11 +407,13 @@ EOF cp "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg" cat >> "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" <> "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg" < Date: Wed, 24 Aug 2016 00:25:26 +0200 Subject: test: Avoid use of /proc/self/fd Use /dev/fd in test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch, skip test-no-fds-leaked-to-maintainer-scripts (it is not guaranteed that /dev/fd contains all file descriptors), and avoid the unneeded use of /proc/fd in another test case. Gbp-Dch: ignore --- .../test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch | 2 +- .../test-bug-769609-triggers-still-pending-after-run | 10 +++++----- test/integration/test-no-fds-leaked-to-maintainer-scripts | 5 +++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch index d9fd3d30d..bf93367c9 100755 --- a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch +++ b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch @@ -32,7 +32,7 @@ if [ -n \"${2}\" ]; then FD=\$APT_HOOK_INFO_FD if [ "\$FD" != \"${2}\" ]; then echo \"ERROR: Information is not on requested FD: \$FD != ${2}\" >> ${hook}-v${1}.list; fi fi -while read "${BUILDDIR}/debian/postinst" < "${BUILDDIR}/debian/triggers" @@ -49,26 +49,26 @@ runtests() { testsuccess aptget install trigdepends-$TYPE -y --reinstall cp rootdir/tmp/testsuccess.output terminal.output testsuccess grep '^REWRITE ' terminal.output - testsuccess grep ' root root ' terminal.output + testsuccess grep 'TRIGGER IS RUNNING' terminal.output testdpkginstalled triggerable-$TYPE trigdepends-$TYPE testsuccess aptget install trigstuff -y cp rootdir/tmp/testsuccess.output terminal.output testsuccess grep '^REWRITE ' terminal.output - testsuccess grep ' root root ' terminal.output + testsuccess grep 'TRIGGER IS RUNNING' terminal.output testdpkginstalled triggerable-$TYPE trigdepends-$TYPE trigstuff testsuccess aptget purge trigstuff -y cp rootdir/tmp/testsuccess.output terminal.output testsuccess grep '^REWRITE ' terminal.output - testsuccess grep ' root root ' terminal.output + testsuccess grep 'TRIGGER IS RUNNING' terminal.output testdpkginstalled triggerable-$TYPE trigdepends-$TYPE testdpkgnotinstalled trigstuff testsuccess aptget purge trigdepends-$TYPE -y cp rootdir/tmp/testsuccess.output terminal.output testfailure grep '^REWRITE ' terminal.output - testfailure grep ' root root ' terminal.output + testfailure grep 'TRIGGER IS RUNNING' terminal.output testdpkgnotinstalled triggerable-$TYPE trigdepends-$TYPE } #runtests 'interest' diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts index baf85e311..ca93f78b4 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -8,6 +8,11 @@ setupenvironment configarchitecture 'amd64' 'i386' configdpkgnoopchroot +if [ ! -e /proc/self/fd ]; then + msgskip "needs /proc/self/fd" + exit 0 +fi + setupsimplenativepackage "fdleaks" 'all' '1.0' 'unstable' BUILDDIR="incoming/fdleaks-1.0" for script in 'preinst' 'postinst' 'prerm' 'postrm'; do -- cgit v1.2.3 From c5306b16a34a6f82cb53668287267e4de3065ea1 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 00:48:22 +0200 Subject: test: Make sure we always find a dpkg in status file Especially on non-Debian platforms, dpkg might not list itself on the host system, and thus dpkg --assert-multi-arch fails. Gbp-Dch: ignore --- test/integration/framework | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 827226b7d..3bbb8bc25 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -523,6 +523,14 @@ configdpkg() { fi fi rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg + # if multi-arch make sure dpkg can detect itself as capable of it + if getarchitectures | grep -E -q '[^ ]+ [^ ]+'; then + if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then + # dpkg doesn't really check the version as long as it is fully installed, + # but just to be sure we choose one above the required version + insertinstalledpackage 'dpkg' "all" '1.16.2+fake' + fi + fi if command dpkg --assert-multi-arch >/dev/null 2>&1 ; then local ARCHS="$(getarchitectures)" local DPKGARCH="$(dpkg --print-architecture)" @@ -538,14 +546,6 @@ configdpkg() { fi fi done - # if multi-arch make sure dpkg can detect itself as capable of it - if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then - if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then - # dpkg doesn't really check the version as long as it is fully installed, - # but just to be sure we choose one above the required version - insertinstalledpackage 'dpkg' "all" '1.16.2+fake' - fi - fi fi } -- cgit v1.2.3 From 76325a660e09d3af503c292ae12c9de2830994e5 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 01:40:43 +0200 Subject: test: Use printf "%b\n" instead of echo for strings with '\' Use of echo with special characters is not portable. On a normal POSIX system, the behavior with backslash escaped strings is implementation-defined. On an XSI-conformant system, they must be interpreted. A way out is the printf command - printf "%b" specifies that the following argument is to be printed with backslash escapes interpreted. Gbp-Dch: ignore --- test/integration/framework | 14 +++++++------- test/integration/test-external-dependency-solver-protocol | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 3bbb8bc25..3ef8597a8 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -689,7 +689,7 @@ Standards-Version: 3.9.3" if [ "$SECTION" != '' ]; then echo "Section: $SECTION" fi - local BUILDDEPS="$(echo "$DEPENDENCIES" | grep '^Build-')" + local BUILDDEPS="$(printf "%b\n" "$DEPENDENCIES" | grep '^Build-')" test -z "$BUILDDEPS" || echo "$BUILDDEPS" echo " Package: $NAME" @@ -699,9 +699,9 @@ Package: $NAME" else echo "Architecture: any" fi - local DEPS="$(echo "$DEPENDENCIES" | grep -v '^Build-')" + local DEPS="$(printf "%b\n" "$DEPENDENCIES" | grep -v '^Build-')" test -z "$DEPS" || echo "$DEPS" - echo "Description: $DESCRIPTION" + printf "%b\n" "Description: $DESCRIPTION" } > "${BUILDDIR}/debian/control" echo '3.0 (native)' > "${BUILDDIR}/debian/source/format" @@ -911,7 +911,7 @@ Maintainer: Joe Sixpack " test "$arch" = 'none' || echo "Architecture: $arch" echo "Version: $VERSION Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" - test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" + test -z "$DEPENDENCIES" || printf "%b\n" "$DEPENDENCIES" echo "Description: $(printf '%s' "$DESCRIPTION" | head -n 1)" echo "Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)" echo @@ -946,7 +946,7 @@ Binary: $BINARY Version: $VERSION Maintainer: Joe Sixpack Architecture: $ARCH" >> $FILE - test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> "$FILE" + test -z "$DEPENDENCIES" || printf "%b\n" "$DEPENDENCIES" >> "$FILE" echo "Files: $(echo -n "$DSCFILE" | md5sum | cut -d' ' -f 1) $(echo -n "$DSCFILE" | wc -c) "$DSCFILE" $(echo -n "$TARFILE" | md5sum | cut -d' ' -f 1) $(echo -n "$TARFILE" | wc -c) "$TARFILE" @@ -980,8 +980,8 @@ Installed-Size: 42 Maintainer: Joe Sixpack Version: $VERSION" >> "$FILE" test "$arch" = 'none' || echo "Architecture: $arch" >> "$FILE" - test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> "$FILE" - echo "Description: $DESCRIPTION" >> "$FILE" + test -z "$DEPENDENCIES" || printf "%b\n" "$DEPENDENCIES" >> "$FILE" + printf "%b\n" "Description: $DESCRIPTION" >> "$FILE" echo >> "$FILE" if [ "$(dpkg-query -W --showformat='${Multi-Arch}')" = 'same' ]; then echo -n > "${INFO}/${NAME}:${arch}.list" diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index 10b07e896..c86038b1b 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -152,7 +152,7 @@ testsuccess grep 'ERR_UNSOLVABLE' rootdir/tmp/testfailure.output configarchitecture 'armel' testfailure aptget install --solver apt awesomecoolstuff:i386 -s msgtest 'An invalid EDSP file generates a' 'hard error' -if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver > solver.result 2>&1; then +if printf "%b\n" "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver > solver.result 2>&1; then cat solver.result msgfail else -- cgit v1.2.3 From 34f0d758a46961f3b49991960f58fea14cf7dc4a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 01:51:50 +0200 Subject: test: Fix invalid quoting in variable expansion This breaks the tests with FreeBSD's shell, and is not needed - it works fine without it. Gbp-Dch: ignore --- test/integration/framework | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 3ef8597a8..9dce3dc11 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -653,10 +653,10 @@ _setupsimplenativepackage() { local VERSION="$3" local RELEASE="${4:-unstable}" local DEPENDENCIES="$5" - local DESCRIPTION="${6:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} + local DESCRIPTION="${6:-an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and serve no other purpose…"}" + und used only by testcases and serve no other purpose…}" local SECTION="${7:-others}" local PRIORITY="${8:-optional}" @@ -883,10 +883,10 @@ insertpackage() { local VERSION="$4" local DEPENDENCIES="$5" local PRIORITY="${6:-optional}" - local DESCRIPTION="${7:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASES} + local DESCRIPTION="${7:-an autogenerated dummy ${NAME}=${VERSION}/${RELEASES} If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and serve no other purpose…"}" + und used only by testcases and serve no other purpose…}" local ARCHS="" for RELEASE in $(printf '%s' "$RELEASES" | tr ',' '\n'); do if [ "$RELEASE" = 'installed' ]; then @@ -964,10 +964,10 @@ insertinstalledpackage() { local DEPENDENCIES="$4" local PRIORITY="${5:-optional}" local STATUS="${6:-install ok installed}" - local DESCRIPTION="${7:-"an autogenerated dummy ${NAME}=${VERSION}/installed + local DESCRIPTION="${7:-an autogenerated dummy ${NAME}=${VERSION}/installed If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and serve no other purpose…"}" + und used only by testcases and serve no other purpose…}" local FILE='rootdir/var/lib/dpkg/status' local INFO='rootdir/var/lib/dpkg/info' -- cgit v1.2.3 From bd95e2b29d1048f4c8ada07def7b1a5da5eb7716 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 02:22:45 +0200 Subject: Always pass a directory to find before an option On BSD systems, we cannot simply use find -name or stuff, we always have to pass a directory name first. Gbp-Dch: ignore --- test/integration/test-external-dependency-solver-protocol | 2 +- vendor/getinfo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index c86038b1b..17a30cf2f 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -26,7 +26,7 @@ insertpackage 'experimental' 'coolstuff' 'i386,amd64' '3' 'Depends: cool, stuff' setupaptarchive testsuccess aptget install --solver apt coolstuff -s -testempty find -name 'edsp.last.*' +testempty find . -name 'edsp.last.*' echo 'Dir::Log::Solver "edsp.last.xz";' > rootdir/etc/apt/apt.conf.d/log-edsp.conf testfailure aptget install --solver dump coolstuff -s diff --git a/vendor/getinfo b/vendor/getinfo index 37e0c1480..37eb74cef 100755 --- a/vendor/getinfo +++ b/vendor/getinfo @@ -6,7 +6,7 @@ BASEDIR="$(readlink -f "$(dirname $0)")" getcurrent() { # search for an exact match to use the correct sources.list example cd $BASEDIR - DISTROS="$(find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2)" + DISTROS="$(find . -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2)" for DISTRO in $DISTROS; do if dpkg-vendor --is $DISTRO; then echo $DISTRO -- cgit v1.2.3 From 4aa8cc9127bdf5837b51b49d917c4ac229b2c540 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 13:36:26 +0200 Subject: test: Allow db_dump-5 instead of db_dump Gbp-Dch: ignore --- test/integration/test-apt-ftparchive-cachedb-lp1274466 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466 index c230e47dc..3a5527230 100755 --- a/test/integration/test-apt-ftparchive-cachedb-lp1274466 +++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466 @@ -11,14 +11,19 @@ setupenvironment configarchitecture "i386" confighashes 'MD5' 'SHA1' 'SHA256' 'SHA512' +db_dump=db_dump +if command -v db_dump-5 >/dev/null 2>&1; then + db_dump=db_dump-5 +fi + # gather the db and the deb, ensure mtime is not modfied as its saved in the DB cp -p "$TESTDIR/deb-lp1274466-cachedb.deb" foo_1_i386.deb cp -p "$TESTDIR/cachedb-lp1274466-old-format.db" old-format.db # verify that the format is different testsuccess aptftparchive --db new-format.db packages . -db_dump new-format.db > new-format.dump -db_dump old-format.db > old-format.dump +$db_dump new-format.db > new-format.dump +$db_dump old-format.db > old-format.dump testfailure diff -u old-format.dump new-format.dump # ensure the new format as the sha512 @@ -47,7 +52,7 @@ Description: an autogenerated dummy foo=1/test " aptftparchive --db old-format.db packages . # ensure that the db is updated and contains the new sha512 -db_dump old-format.db > old-format.dump +$db_dump old-format.db > old-format.dump testsuccess grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c old-format.dump -- cgit v1.2.3 From 8a362893a18eca569f8b93c572aaf966572b9546 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 15:10:08 +0200 Subject: apt-inst: debfile: Pass comp. Name to ExtractTar, not Binary In the old days, apt-inst used to use binaries, but now it uses the built-in support and matches using Name, and not a Binary. --- apt-inst/deb/debfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 4853a13c7..474fb1cbe 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -113,7 +113,7 @@ bool debDebFile::ExtractTarMember(pkgDirStream &Stream,const char *Name) Member = AR.FindMember(std::string(Name).append(c->Extension).c_str()); if (Member == NULL) continue; - Compressor = c->Binary; + Compressor = c->Name; break; } -- cgit v1.2.3 From 71e22da91ff888cf645e5083fbac7839846111d2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 16:05:37 +0200 Subject: test: Use a file to determine TEST_DEFAULT_GROUP This is more safe against sticky bits. For example, in FreeBSD all files created in /tmp have the group set to wheel. Gbp-Dch: ignore --- test/integration/framework | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 9dce3dc11..677c40711 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -451,11 +451,8 @@ EOF # create some files in /tmp and look at user/group to get what this means TEST_DEFAULT_USER="$(id -un)" - if [ "$(uname)" = 'GNU/kFreeBSD' ]; then - TEST_DEFAULT_GROUP='root' - else - TEST_DEFAULT_GROUP="$(id -gn)" - fi + touch "${TMPWORKINGDIRECTORY}/test-file" + TEST_DEFAULT_GROUP=$(stat --format '%G' "${TMPWORKINGDIRECTORY}/test-file") # cleanup the environment a bit # prefer our apt binaries over the system apt binaries -- cgit v1.2.3 From 03ae49aca57b499f8ef497c2777b3eaef2516d1a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 16:21:12 +0200 Subject: test: More portable check for dpkg versions This check should work regardless if dpkg was installed by dpkg or by a native package manager like RPM or pkg. Gbp-Dch: ignore --- test/integration/framework | 3 +++ test/integration/test-bug-661537-build-profiles-support | 2 +- test/integration/test-bug-769609-triggers-still-pending-after-run | 2 +- test/integration/test-no-fds-leaked-to-maintainer-scripts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 677c40711..ec57a23c3 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -195,6 +195,9 @@ aptinternalplanner() { runapt "${APTINTERNALPLANNER}" "$@"; } dpkg() { "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "$@" } +dpkg_version() { + command perl -MDpkg -E 'say $Dpkg::PROGVERSION' +} dpkgcheckbuilddeps() { command dpkg-checkbuilddeps --admindir="${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg" "$@" } diff --git a/test/integration/test-bug-661537-build-profiles-support b/test/integration/test-bug-661537-build-profiles-support index 91115ea18..d24484de9 100755 --- a/test/integration/test-bug-661537-build-profiles-support +++ b/test/integration/test-bug-661537-build-profiles-support @@ -76,7 +76,7 @@ Building dependency tree... } msgtest 'Check if version of installed dpkg is high enough for' 'build profiles support' -if dpkg --compare-versions "$(command dpkg-query --showformat='${Version}' --show dpkg)" 'ge' '1.17.14'; then +if dpkg --compare-versions "$(dpkg_version)" 'ge' '1.17.14'; then msgpass testwithdpkg() { msgtest "Test with" "dpkg-checkbuilddeps -d '$1' -P '$2'" diff --git a/test/integration/test-bug-769609-triggers-still-pending-after-run b/test/integration/test-bug-769609-triggers-still-pending-after-run index b44ebf74f..ce2c193dd 100755 --- a/test/integration/test-bug-769609-triggers-still-pending-after-run +++ b/test/integration/test-bug-769609-triggers-still-pending-after-run @@ -8,7 +8,7 @@ setupenvironment configarchitecture 'amd64' msgtest 'Check if installed dpkg supports' 'noawait trigger' -if dpkg-checkbuilddeps -d 'dpkg (>= 1.16.1)' /dev/null; then +if dpkg --compare-versions "$(dpkg_version)" 'ge' '1.16.1'; then msgpass else msgskip 'dpkg version too old' diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts index ca93f78b4..7b5d6727e 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -29,7 +29,7 @@ buildpackage "$BUILDDIR" 'unstable' 'main' 'native' rm -rf "$BUILDDIR" PKGNAME='fdleaks:all' -if ! dpkg-checkbuilddeps -d 'dpkg (>= 1.16.2)' /dev/null >/dev/null 2>&1; then +if dpkg --compare-versions "$(dpkg_version)" 'lt' '1.16.2'; then PKGNAME='fdleaks' fi -- cgit v1.2.3 From 15134a8e5458fc634482386f1fd2acbccc3ac892 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Aug 2016 16:28:47 +0200 Subject: Lower-case uname -r output in kernel autoremove helper This is needed on FreeBSD which has versions like 11.0-RC1, otherwise the tests would fail. --- debian/apt.auto-removal.sh | 2 +- test/integration/test-kernel-helper-autoremove | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/apt.auto-removal.sh b/debian/apt.auto-removal.sh index 608d950b5..df9048cd6 100644 --- a/debian/apt.auto-removal.sh +++ b/debian/apt.auto-removal.sh @@ -25,7 +25,7 @@ debverlist="$(echo "$list" | cut -d' ' -f 2 | sort --unique --reverse --version- if [ -n "$1" ]; then installed_version="$(echo "$list" | awk "\$1 == \"$1\" { print \$2;exit; }")" fi -unamer="$(uname -r)" +unamer="$(uname -r | tr '[A-Z]' '[a-z]')" if [ -n "$unamer" ]; then running_version="$(echo "$list" | awk "\$1 == \"$unamer\" { print \$2;exit; }")" fi diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove index 417dafd65..a70841d9d 100755 --- a/test/integration/test-kernel-helper-autoremove +++ b/test/integration/test-kernel-helper-autoremove @@ -6,7 +6,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture 'amd64' -CURRENTKERNEL="linux-image-$(uname -r)" +CURRENTKERNEL="linux-image-$(uname -r | tr '[A-Z]' '[a-z]')" insertinstalledpackage "$CURRENTKERNEL" 'amd64' '5-1' # debug packages do not need our protection insertinstalledpackage "${CURRENTKERNEL}-dbg" 'amd64' '5-1' @@ -49,7 +49,7 @@ testprotected() { testsuccess --nomsg grep '^\^linux-image-100\\\.0\\\.0-1-generic\$$' protected.list msgtest 'Check kernel autoremoval protection list includes' 'running kernel' - testsuccess --nomsg grep "^\\^linux-image-$(uname -r | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list + testsuccess --nomsg grep "^\\^linux-image-$(uname -r | tr '[A-Z]' '[a-z]' | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list msgtest 'Check kernel autoremoval protection list does not include' 'metapackages' testfailure --nomsg grep -e '^\^linux-image-amd64\$$' -e '^\^linux-image-686-pae\$$' -e ':i386' protected.list -- cgit v1.2.3 From 2ed62ba6abcad809d1898a40950f86217af73812 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Aug 2016 14:24:49 +0200 Subject: changelog: Respect Dir setting for local changelog getting This fixes issues with chroots, but the goal here was to get the test suite working on systems without dpkg. --- apt-pkg/acquire-item.cc | 3 ++- test/integration/test-apt-get-changelog | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7238d692e..f715e060e 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3488,7 +3488,8 @@ std::string pkgAcqChangelog::URI(pkgCache::VerIterator const &Ver) /*{{{*/ pkgCache::PkgIterator const Pkg = Ver.ParentPkg(); if (Pkg->CurrentVer != 0 && Pkg.CurrentVer() == Ver) { - std::string const basename = std::string("/usr/share/doc/") + Pkg.Name() + "/changelog"; + std::string const root = _config->FindDir("Dir"); + std::string const basename = root + std::string("usr/share/doc/") + Pkg.Name() + "/changelog"; std::string const debianname = basename + ".Debian"; if (FileExists(debianname)) return "copy://" + debianname; diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog index 0812db500..ee7b3ef97 100755 --- a/test/integration/test-apt-get-changelog +++ b/test/integration/test-apt-get-changelog @@ -122,13 +122,13 @@ testsuccess apt install dpkg -y # at this moment, we still have the Releasefile claim to be origin:ubuntu echo 'Acquire::Changelogs::AlwaysOnline::Origin::Ubuntu "false";' >> rootdir/etc/apt/apt.conf.d/nooriginchangelogs testsuccessequal "'http://localhost:${APTHTTPPORT}/pool/main/d/dpkg/dpkg_42/changelog' dpkg.changelog" apt changelog dpkg --print-uris -testsuccessequal "'gzip:///usr/share/doc/dpkg/changelog.Debian.gz' dpkg.changelog" apt changelog dpkg --print-uris -o Acquire::Changelogs::AlwaysOnline=false +testsuccessequal "'copy://${TMPWORKINGDIRECTORY}/rootdir/usr/share/doc/dpkg/changelog' dpkg.changelog" apt changelog dpkg --print-uris -o Acquire::Changelogs::AlwaysOnline=false testsuccessequal "'http://localhost:${APTHTTPPORT}/pool/main/d/dpkg/dpkg_42/changelog' dpkg.changelog" apt changelog dpkg --print-uris -o Acquire::Changelogs::AlwaysOnline=true testsuccessequal "'http://localhost:${APTHTTPPORT}/pool/main/d/dpkg/dpkg_42/changelog' dpkg.changelog" apt changelog dpkg --print-uris -o Acquire::Changelogs::AlwaysOnline=false -o Acquire::Changelogs::AlwaysOnline::Origin::Ubuntu=true -testsuccessequal "'gzip:///usr/share/doc/dpkg/changelog.Debian.gz' dpkg.changelog" apt changelog dpkg --print-uris -o Acquire::Changelogs::AlwaysOnline=false -o Acquire::Changelogs::AlwaysOnline::Origin::Debian=true +testsuccessequal "'copy://${TMPWORKINGDIRECTORY}/rootdir/usr/share/doc/dpkg/changelog' dpkg.changelog" apt changelog dpkg --print-uris -o Acquire::Changelogs::AlwaysOnline=false -o Acquire::Changelogs::AlwaysOnline::Origin::Debian=true testsuccess apt changelog dpkg -d testfilestats 'dpkg.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644" head -n 3 dpkg.changelog > dpkg.change -testfileequal 'dpkg.change' "$(apthelper cat-file '/usr/share/doc/dpkg/changelog.Debian.gz' | head -n 3)" +testfileequal 'dpkg.change' "$(apthelper cat-file 'rootdir/usr/share/doc/dpkg/changelog' | head -n 3)" rm -f dpkg.change dpkg.changelog -- cgit v1.2.3 From f878d3a862128bc1385616751ae1d78246b1bd01 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Aug 2016 15:02:13 +0200 Subject: test: Assert multi-arch in the chroot The host system might not have a dpkg installed, which makes dpkg fail with: dpkg not recorded as installed, cannot check for multi-arch support! That's entirely useless of course. We want to know if dpkg could support multi-arch in our chroot, so we pseudo-install dpkg into the chroot and pretend it's version is one version higher than the minimum dpkg version, so dpkg --assert-multi-arch works on recent dpkgs. Gbp-Dch: ignore --- test/integration/framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/framework b/test/integration/framework index ec57a23c3..546f070d7 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -531,7 +531,7 @@ configdpkg() { insertinstalledpackage 'dpkg' "all" '1.16.2+fake' fi fi - if command dpkg --assert-multi-arch >/dev/null 2>&1 ; then + if dpkg --assert-multi-arch >/dev/null 2>&1 ; then local ARCHS="$(getarchitectures)" local DPKGARCH="$(dpkg --print-architecture)" # this ensures that even if multi-arch isn't active in the view -- cgit v1.2.3 From 757ec4e1ef633f9867928559df82adf3d0ac7b78 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Aug 2016 15:35:32 +0200 Subject: test: Use :$(id -gn) instead of :root (when run as root) On BSD systems, the root group is wheel, not root, so let's just use the default group here. Gbp-Dch: ignore --- test/integration/framework | 6 +++--- test/integration/test-authentication-basic | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 546f070d7..c513ed12c 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -314,7 +314,7 @@ setupenvironment() { # relax permissions so that running as root with user switching works umask 022 chmod 711 "$TMPWORKINGDIRECTORY" - chown _apt:root "${TMPWORKINGDIRECTORY}/downloaded" + chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/downloaded" fi TESTDIRECTORY="$(readlink -f "$(dirname $0)")" @@ -442,7 +442,7 @@ EOF cp "${TESTDIRECTORY}/apt.pem" "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem" if [ "$(id -u)" = '0' ]; then - chown _apt:root "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem" + chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem" fi echo "Acquire::https::CaInfo \"${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem\";" > rootdir/etc/apt/apt.conf.d/99https echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary @@ -1960,7 +1960,7 @@ mkdir() { command mkdir -m 700 -p "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial" touch "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/lock" if [ "$(id -u)" = '0' ]; then - chown _apt:root "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial" + chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial" fi else command mkdir "$@" diff --git a/test/integration/test-authentication-basic b/test/integration/test-authentication-basic index 9a15c7604..3bfd076ce 100755 --- a/test/integration/test-authentication-basic +++ b/test/integration/test-authentication-basic @@ -30,7 +30,7 @@ testauthsuccess() { # lets see if got/retains acceptable permissions if [ -n "$AUTHCONF" ]; then if [ "$(id -u)" = '0' ]; then - testfilestats "$AUTHCONF" '%U:%G:%a' '=' "_apt:root:600" + testfilestats "$AUTHCONF" '%U:%G:%a' '=' "_apt:$(id -gn):600" else testfilestats "$AUTHCONF" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:600" fi -- cgit v1.2.3 From 6f1f3c9afdb6ade6a7be110b90c8fc9e603254cf Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Aug 2016 16:25:00 +0200 Subject: Make root group configurable via ROOT_GROUP This is needed on BSD where root's default group is wheel, not root. --- CMake/config.h.in | 3 +++ CMakeLists.txt | 6 ++++++ apt-pkg/acquire-item.cc | 2 +- apt-pkg/acquire-worker.cc | 4 ++-- apt-pkg/acquire.cc | 4 ++-- apt-pkg/indexcopy.cc | 6 +++--- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CMake/config.h.in b/CMake/config.h.in index c23254929..6f39e2f58 100644 --- a/CMake/config.h.in +++ b/CMake/config.h.in @@ -64,6 +64,9 @@ #cmakedefine LIBEXEC_DIR "${LIBEXEC_DIR}" #cmakedefine BIN_DIR "${BIN_DIR}" +/* Group of the root user */ +#cmakedefine ROOT_GROUP "${ROOT_GROUP}" + #define APT_8_CLEANER_HEADERS #define APT_9_CLEANER_HEADERS #define APT_10_CLEANER_HEADERS diff --git a/CMakeLists.txt b/CMakeLists.txt index 916090866..24c58a0f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,6 +170,12 @@ if (NOT DEFINED COMMON_ARCH) execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) endif() +if (NOT DEFINED ROOT_GROUP) + execute_process(COMMAND id -gn root + OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "Found root group: ${ROOT_GROUP}") +endif() +set(ROOT_GROUP "${ROOT_GROUP}" CACHE STRING "Group of root (e.g.: wheel or root)") # Set various directories set(STATE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt" CACHE PATH "Your /var/lib/apt") diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f715e060e..88b5a58b5 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3440,7 +3440,7 @@ void pkgAcqChangelog::Init(std::string const &DestDir, std::string const &DestFi TemporaryDirectory = tmpname; ChangeOwnerAndPermissionOfFile("Item::QueueURI", TemporaryDirectory.c_str(), - SandboxUser.c_str(), "root", 0700); + SandboxUser.c_str(), ROOT_GROUP, 0700); DestFile = flCombine(TemporaryDirectory, DestFileName); if (DestDir.empty() == false) diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index a4fbc7651..7afbec72a 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -732,7 +732,7 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item) { std::string const SandboxUser = _config->Find("APT::Sandbox::User"); ChangeOwnerAndPermissionOfFile("Item::QueueURI", Item->Owner->DestFile.c_str(), - SandboxUser.c_str(), "root", 0600); + SandboxUser.c_str(), ROOT_GROUP, 0600); } if (Debug == true) @@ -828,7 +828,7 @@ void pkgAcquire::Worker::PrepareFiles(char const * const caller, pkgAcquire::Que { if (RealFileExists(Itm->Owner->DestFile)) { - ChangeOwnerAndPermissionOfFile(caller, Itm->Owner->DestFile.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile(caller, Itm->Owner->DestFile.c_str(), "root", ROOT_GROUP, 0644); std::string const filename = Itm->Owner->DestFile; for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O) { diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 33c98cf2e..b5f88e1b3 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -80,7 +80,7 @@ void pkgAcquire::Initialize() if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it { struct passwd const * const pw = getpwnam(SandboxUser.c_str()); - struct group const * const gr = getgrnam("root"); + struct group const * const gr = getgrnam(ROOT_GROUP); if (pw != NULL && gr != NULL) { std::string const AuthConf = _config->FindFile("Dir::Etc::netrc"); @@ -106,7 +106,7 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it { struct passwd const * const pw = getpwnam(SandboxUser.c_str()); - struct group const * const gr = getgrnam("root"); + struct group const * const gr = getgrnam(ROOT_GROUP); if (pw != NULL && gr != NULL) { // chown the partial dir diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 4a35e3847..ca5c42cb7 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -207,7 +207,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, FinalF += URItoFileName(S); if (rename(TargetF.c_str(),FinalF.c_str()) != 0) return _error->Errno("rename","Failed to rename"); - ChangeOwnerAndPermissionOfFile("CopyPackages", FinalF.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile("CopyPackages", FinalF.c_str(), "root", ROOT_GROUP, 0644); } /* Mangle the source to be in the proper notation with @@ -531,7 +531,7 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ Rel.Open(prefix + file,FileFd::ReadOnly); if (CopyFile(Rel,Target) == false || Target.Close() == false) return _error->Error("Copying of '%s' for '%s' from '%s' failed", file.c_str(), CDName.c_str(), prefix.c_str()); - ChangeOwnerAndPermissionOfFile("CopyPackages", TargetF.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile("CopyPackages", TargetF.c_str(), "root", ROOT_GROUP, 0644); return true; } @@ -738,7 +738,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ FinalF += URItoFileName(S); if (rename(TargetF.c_str(),FinalF.c_str()) != 0) return _error->Errno("rename","Failed to rename"); - ChangeOwnerAndPermissionOfFile("CopyTranslations", FinalF.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile("CopyTranslations", FinalF.c_str(), "root", ROOT_GROUP, 0644); } CurrentSize += FileSize; -- cgit v1.2.3 From 01d207a5076b6fc37a064645b13f2c6550f58b94 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 26 Aug 2016 17:55:28 +0200 Subject: CMake: Add missing iconv dependency FreeBSD has two iconv systems: It ships an iconv.h itself, and symbols for that in the libc. But there's also the port of GNU libiconv, which unfortunately for us, Doxygen depends on. This changes things to prefer a separate libiconv library over the system one; that is, the port on FreeBSD. Gbp-Dch: ignore --- CMake/FindIconv.cmake | 20 ++++++++++++++++++++ CMakeLists.txt | 1 + apt-pkg/CMakeLists.txt | 9 +++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 CMake/FindIconv.cmake diff --git a/CMake/FindIconv.cmake b/CMake/FindIconv.cmake new file mode 100644 index 000000000..67046d95d --- /dev/null +++ b/CMake/FindIconv.cmake @@ -0,0 +1,20 @@ +find_path(ICONV_INCLUDE_DIR NAMES iconv.h) + +find_library(ICONV_LIBRARY NAMES iconv) +if (ICONV_LIBRARY) + set(ICONV_SYMBOL_FOUND "${ICONV_LIBRARY}") +else() + check_function_exists(iconv_open ICONV_SYMBOL_FOUND) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Iconv DEFAULT_MESSAGE ICONV_INCLUDE_DIR ICONV_SYMBOL_FOUND) + +if(ICONV_LIBRARY) + set(ICONV_LIBRARIES "${ICONV_LIBRARY}") +else() + set(ICONV_LIBRARIES) +endif() +set(ICONV_INCLUDE_DIRS "${ICONV_INCLUDE_DIR}") + +mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24c58a0f8..35c75b18a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ include(GNUInstallDirs) include(TestBigEndian) find_package(Threads) find_package(LFS REQUIRED) +find_package(Iconv REQUIRED) if(USE_NLS) find_package(Intl REQUIRED) diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index 3f85bc143..34930c8e9 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -28,14 +28,19 @@ target_include_directories(apt-pkg PRIVATE ${ZLIB_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${LZMA_INCLUDE_DIRS} - ${LZ4_INCLUDE_DIRS}) + ${LZ4_INCLUDE_DIRS} + ${ICONV_DIRECTORIES} +) + target_link_libraries(apt-pkg PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${LZMA_LIBRARIES} - ${LZ4_LIBRARIES}) + ${LZ4_LIBRARIES} + ${ICONV_LIBRARIES} +) set_target_properties(apt-pkg PROPERTIES VERSION ${MAJOR}.${MINOR}) set_target_properties(apt-pkg PROPERTIES SOVERSION ${MAJOR}) add_version_script(apt-pkg) -- cgit v1.2.3 From 4ff5e237d5685be187a75c563b86e80ea3e7cc01 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 Aug 2016 12:58:20 +0200 Subject: randomize acquire order for same type index files Without randomizing the order in which we download the index files we leak needlessly information to the mirrors of which architecture is native or foreign on this system. More importantly, we leak the order in which description translations will be used which in most cases will e.g. have the native tongue first. Note that the leak effect in practice is limited as apt detects if a file it wants to download is already available in the latest version from a previous download and does not query the server in such cases. Combined with the fact that Translation files are usually updated infrequently and not all at the same time, so a mirror can never be sure if it got asked about all files the user wants. --- apt-pkg/acquire-item.cc | 18 ++++++++++++++++++ test/integration/framework | 2 ++ test/integration/test-apt-update-simple | 24 +++++++++++++++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 91d7a3eae..0e1614330 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -46,6 +46,7 @@ #include #include #include +#include #include /*}}}*/ @@ -1340,6 +1341,23 @@ void pkgAcqMetaClearSig::QueueIndexes(bool const verify) /*{{{*/ if (hasReleaseFile && verify == false) hasHashes = std::any_of(IndexTargets.begin(), IndexTargets.end(), [&](IndexTarget const &Target) { return TransactionManager->MetaIndexParser->Exists(Target.MetaKey); }); + if (_config->FindB("Acquire::IndexTargets::Randomized", true) && likely(IndexTargets.empty() == false)) + { + /* For fallback handling and to have some reasonable progress information + we can't randomize everything, but at least the order in the same type + can be as we shouldn't be telling the mirrors (and everyone else watching) + which is native/foreign arch, specific order of preference of translations, … */ + auto range_start = IndexTargets.begin(); + std::random_device rd; + std::default_random_engine g(rd()); + do { + auto const type = range_start->Option(IndexTarget::CREATED_BY); + auto const range_end = std::find_if_not(range_start, IndexTargets.end(), + [&type](IndexTarget const &T) { return type == T.Option(IndexTarget::CREATED_BY); }); + std::shuffle(range_start, range_end, g); + range_start = range_end; + } while (range_start != IndexTargets.end()); + } for (auto&& Target: IndexTargets) { // if we have seen a target which is created-by a target this one here is declared a diff --git a/test/integration/framework b/test/integration/framework index 62720fedd..243996e14 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -436,6 +436,8 @@ EOF # in testcases, it can appear as if localhost has a rotation setup, # hide this as we can't really deal with it properly echo 'Acquire::Failure::ShowIP "false";' + # randomess and tests don't play well together + echo 'Acquire::IndexTargets::Randomized "false";' # fakeroot can't fake everything, so disabled in production but good for tests echo 'APT::Sandbox::Verify "true";' } >> aptconfig.conf diff --git a/test/integration/test-apt-update-simple b/test/integration/test-apt-update-simple index ca969e61b..ccf719790 100755 --- a/test/integration/test-apt-update-simple +++ b/test/integration/test-apt-update-simple @@ -6,10 +6,28 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture 'amd64' -insertpackage 'unstable' 'unrelated' 'all' '0.5~squeeze1' -insertsource 'unstable' 'unrelated' 'all' '0.5~squeeze1' +insertpackage 'unstable' 'foo' 'all' '1' +insertpackage 'unstable' 'bar' 'amd64' '1' +insertpackage 'unstable' 'bar' 'i386' '1' +insertsource 'unstable' 'foo' 'all' '1' + +sed -e 's#^Description-en:#Description-de:#' \ + aptarchive/dists/unstable/main/i18n/Translation-en > aptarchive/dists/unstable/main/i18n/Translation-de setupaptarchive --no-update changetowebserver -testsuccess aptget update -o Debug::Acquire::Auth=1 +# the framework modifies some configs to ensure testability, +# at the expense of creating an environment which doesn't always +# reflect apts "normal" behavior on a "normal" system +echo 'Acquire::IndexTargets::Randomized "true"; +Acquire::Languages { "environment"; "en"; "de"; }; +' > rootdir/etc/apt/apt.conf.d/restore-simplicity + +testempty aptget indextargets +testsuccess aptget update +testequal 'main/source/Sources +main/binary-amd64/Packages +main/binary-all/Packages +main/i18n/Translation-en +main/i18n/Translation-de' aptget indextargets --format '$(METAKEY)' -- cgit v1.2.3 From e950b7e2f89b5e48192cd469c963a44fff9f1450 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 Aug 2016 22:56:17 +0200 Subject: don't loop on pinning pkgs from absolute debs by regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An absolute filename for a *.deb file starts with a /. A package with the name of the file is inserted in the cache which is provided by the "real" package for internal reasons. The pinning code detects a regex based wildcard by having the regex start with /. That is no problem as a / can not be included in a package name… expect that our virtual filename package can and does. We fix this two ways actually: First, a regex is only being considered a regex if it also ends with / (we don't support flags). That stops our problem with the virtual filename packages already, but to be sure we also do not enter the loop if matcher and package name are equal. It has to be noted that the creation of pins for virtual packages like the here effected filename packages is pointless as only versions can be pinned, but checking that a package is really purely virtual is too costly compared to just creating an unused pin. Closes: 835818 --- apt-pkg/policy.cc | 9 ++++----- test/integration/test-apt-get-install-deb | 6 +++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index ff59fb0ac..3dd6ddac4 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -180,14 +180,13 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name, Name.erase(found); } - // Allow pinning by wildcards - // TODO: Maybe we should always prefer specific pins over non- - // specific ones. - if (Name[0] == '/' || Name.find_first_of("*[?") != string::npos) + // Allow pinning by wildcards - beware of package names looking like wildcards! + // TODO: Maybe we should always prefer specific pins over non-specific ones. + if ((Name[0] == '/' && Name[Name.length() - 1] == '/') || Name.find_first_of("*[?") != string::npos) { pkgVersionMatch match(Data, Type); for (pkgCache::GrpIterator G = Cache->GrpBegin(); G.end() != true; ++G) - if (match.ExpressionMatches(Name, G.Name())) + if (Name != G.Name() && match.ExpressionMatches(Name, G.Name())) { if (Arch.empty() == false) CreatePin(Type, string(G.Name()).append(":").append(Arch), Data, Priority); diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb index 7baaf0ee5..36e94a2dc 100755 --- a/test/integration/test-apt-get-install-deb +++ b/test/integration/test-apt-get-install-deb @@ -125,8 +125,12 @@ createpkg 'leading-newline' ' createpkg 'trailing-newline' '' ' ' +echo 'Package: /pkg-/ +Pin: release a=experimental +Pin-Priority: 501' > rootdir/etc/apt/preferences.d/pinit + testsuccess aptget install ./incoming/pkg-as-it-should-be_0_all.deb -testsuccess aptget install ./incoming/pkg-leading-newline_0_all.deb +testsuccess aptget install "$(readlink -f ./incoming/pkg-leading-newline_0_all.deb)" testsuccess aptget install ./incoming/pkg-trailing-newline_0_all.deb testempty apt clean -- cgit v1.2.3 From 865b46c18e38cab493141e9888eea74ed0d7da21 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Aug 2016 14:58:13 +0200 Subject: init: Fix path to external solvers This accidentally had two apt in it. This fixes a regression from commit 8757a0f. Gbp-Dch: ignore --- apt-pkg/init.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 282c0daf0..1d27e32e9 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -70,7 +70,7 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg"); Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d"); Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods"); - Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/apt/solvers"); + Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/solvers"); Cnf.CndSet("Dir::Media::MountPath","/media/apt"); // State -- cgit v1.2.3 From 06372c6a4f2bb8812f68c56788e96dc8fa69b3de Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Aug 2016 15:04:51 +0200 Subject: init: Add Dir::Bin::planners default entry Apparently we had no default defined for this. Reported-By: David Kalnischkies --- apt-pkg/init.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 1d27e32e9..292d75071 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -71,6 +71,7 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d"); Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods"); Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/solvers"); + Cnf.CndSet("Dir::Bin::planners::",LIBEXEC_DIR "/planners"); Cnf.CndSet("Dir::Media::MountPath","/media/apt"); // State -- cgit v1.2.3 From f06a44591db7f78898bd4e8818ceab74cd98e1ac Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Aug 2016 15:07:39 +0200 Subject: Add new symbols to symbols file There are some optional symbols missing now, but let's keep them in for now, maybe they reappear/still exist on other platforms. The newly added ones actually appeared in older versions already, but there's no huge gain in finding out when precisely we added them. --- debian/libapt-pkg5.0.symbols | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/libapt-pkg5.0.symbols b/debian/libapt-pkg5.0.symbols index e2db6bb12..0df11f9a5 100644 --- a/debian/libapt-pkg5.0.symbols +++ b/debian/libapt-pkg5.0.symbols @@ -1480,3 +1480,15 @@ libapt-pkg.so.5.0 libapt-pkg5.0 #MINVER# (c++|optional=std)"std::basic_istream >& std::operator>> >(std::basic_istream >&, std::_Get_time)@APTPKG_5.0" 1.3~exp2 (c++|optional=std)"std::basic_ostream >& std::operator<< >(std::basic_ostream >&, std::_Put_time)@APTPKG_5.0" 1.3~exp2 (c++|optional=std)"std::ctype::do_narrow(char, char) const@APTPKG_5.0" 1.3~exp2 + (c++)"EIPP::ApplyRequest(std::__cxx11::list, std::allocator >, EIPP::PKG_ACTION>, std::allocator, std::allocator >, EIPP::PKG_ACTION> > >&, pkgDepCache&)@APTPKG_5.0" 1.3~rc2 + (c++)"EIPP::ReadRequest(int, std::__cxx11::list, std::allocator >, EIPP::PKG_ACTION>, std::allocator, std::allocator >, EIPP::PKG_ACTION> > >&, unsigned int&)@APTPKG_5.0" 1.3~rc2 + (c++)"FileFd::Read(int, void*, unsigned long long, unsigned long long*)@APTPKG_5.0" 1.3~rc2 + (c++)"pkgSourceList::AddVolatileFiles(CommandLine&, std::vector, std::allocator >, std::allocator, std::allocator > > >*)@APTPKG_5.0" 1.3~rc2 + (c++)"pkgSourceList::AddVolatileFile(std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > >*)@APTPKG_5.0" 1.3~rc2 + (c++)"TimeRFC1123[abi:cxx11](long, bool)@APTPKG_5.0" 1.3~rc2 + (c++)"unsigned long std::uniform_int_distribution::operator() >(std::linear_congruential_engine&, std::uniform_int_distribution::param_type const&)@APTPKG_5.0" 1.3~rc2 + (c++)"void std::shuffle<__gnu_cxx::__normal_iterator > >, std::linear_congruential_engine&>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::linear_congruential_engine&)@APTPKG_5.0" 1.3~rc2 + (c++)"void std::vector >::emplace_back(pkgDPkgPM::Item::Ops&&, pkgCache::PkgIterator&&)@APTPKG_5.0" 1.3~rc2 + (c++)"void std::vector >::emplace_back(pkgDPkgPM::Item::Ops&&, pkgCache::PkgIterator&)@APTPKG_5.0" 1.3~rc2 + (c++)"void std::vector, std::allocator >, std::allocator, std::allocator > > >::emplace_back, std::allocator > const&>(std::__cxx11::basic_string, std::allocator > const&)@APTPKG_5.0" 1.3~rc2 + (c++)"void std::vector, std::allocator > >, std::allocator, std::allocator > > > >::emplace_back, std::allocator > >(pkgDPkgPM::Item*&&, std::__cxx11::basic_string, std::allocator >&&)@APTPKG_5.0" 1.3~rc2 -- cgit v1.2.3 From 30749ef1edb33a91401bd7e4da7a4474e7bc2f6a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Aug 2016 15:09:05 +0200 Subject: Switch documentation from httpredir.d.o to deb.d.o The CDN service deb.d.o is more reliable than the http redirector, so switch to it for our examples. --- doc/po/apt-doc.pot | 22 +++++++++++----------- doc/po/de.po | 22 +++++++++++----------- doc/po/es.po | 22 +++++++++++----------- doc/po/fr.po | 22 +++++++++++----------- doc/po/it.po | 44 +++++++++++++++++++++---------------------- doc/po/ja.po | 44 +++++++++++++++++++++---------------------- doc/po/nl.po | 44 +++++++++++++++++++++---------------------- doc/po/pl.po | 22 +++++++++++----------- doc/po/pt.po | 22 +++++++++++----------- doc/po/pt_BR.po | 22 +++++++++++----------- doc/sources.list.5.xml | 22 +++++++++++----------- vendor/debian/apt-vendor.ent | 4 ++-- vendor/debian/sources.list.in | 2 +- 13 files changed, 157 insertions(+), 157 deletions(-) diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index fa084c504..02a1c3895 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -5788,8 +5788,8 @@ msgstr "" #: sources.list.5.xml:1 #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian " +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian " "&debian-stable-codename; main" msgstr "" @@ -5798,12 +5798,12 @@ msgstr "" #, no-wrap msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -5919,12 +5919,12 @@ msgstr "" #: sources.list.5.xml:1 #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -5932,7 +5932,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/po/de.po b/doc/po/de.po index 3284f8199..94f795cad 100644 --- a/doc/po/de.po +++ b/doc/po/de.po @@ -8241,8 +8241,8 @@ msgstr "" #| "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" @@ -8255,12 +8255,12 @@ msgstr "" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8408,12 +8408,12 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -8421,7 +8421,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/po/es.po b/doc/po/es.po index 0c1b02e27..3f934437a 100644 --- a/doc/po/es.po +++ b/doc/po/es.po @@ -8243,8 +8243,8 @@ msgstr "" #| "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" @@ -8257,12 +8257,12 @@ msgstr "" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8408,12 +8408,12 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -8421,7 +8421,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/po/fr.po b/doc/po/fr.po index f53d1a73a..e4092bec3 100644 --- a/doc/po/fr.po +++ b/doc/po/fr.po @@ -8206,8 +8206,8 @@ msgstr "" #| "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" @@ -8220,12 +8220,12 @@ msgstr "" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8372,12 +8372,12 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -8385,7 +8385,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/po/it.po b/doc/po/it.po index 7cdca80a4..3f8d6467f 100644 --- a/doc/po/it.po +++ b/doc/po/it.po @@ -8358,34 +8358,34 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" #. type: Content of: #: sources.list.5.xml #, no-wrap msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" msgstr "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8528,31 +8528,31 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" #. type: Content of: #: sources.list.5.xml #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" diff --git a/doc/po/ja.po b/doc/po/ja.po index 0a8e54720..e1c1faf36 100644 --- a/doc/po/ja.po +++ b/doc/po/ja.po @@ -7995,34 +7995,34 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" #. type: Content of: #: sources.list.5.xml #, no-wrap msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" msgstr "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8169,31 +8169,31 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" #. type: Content of: #: sources.list.5.xml #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" diff --git a/doc/po/nl.po b/doc/po/nl.po index 23ee68f2b..5fa0bc924 100644 --- a/doc/po/nl.po +++ b/doc/po/nl.po @@ -8505,34 +8505,34 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" #. type: Content of: #: sources.list.5.xml #, no-wrap msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" msgstr "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8681,31 +8681,31 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" #. type: Content of: #: sources.list.5.xml #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" diff --git a/doc/po/pl.po b/doc/po/pl.po index a5f1c3f3b..1bc70dfc1 100644 --- a/doc/po/pl.po +++ b/doc/po/pl.po @@ -7607,8 +7607,8 @@ msgstr "" #| "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" @@ -7621,12 +7621,12 @@ msgstr "" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -7771,12 +7771,12 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -7784,7 +7784,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/po/pt.po b/doc/po/pt.po index 35a004286..05e9ae7d2 100644 --- a/doc/po/pt.po +++ b/doc/po/pt.po @@ -8175,8 +8175,8 @@ msgstr "" #| "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" "deb http://ftp.debian.org/debian &debian-stable-codename; main\n" "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" @@ -8189,12 +8189,12 @@ msgstr "" #| "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &debian-stable-codename; main" msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -8339,12 +8339,12 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -8352,7 +8352,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/po/pt_BR.po b/doc/po/pt_BR.po index 9d3ea426b..7d74de4b8 100644 --- a/doc/po/pt_BR.po +++ b/doc/po/pt_BR.po @@ -6144,8 +6144,8 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian &debian-stable-codename; main\n" -"deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main" +"deb http://deb.debian.org/debian &debian-stable-codename; main\n" +"deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main" msgstr "" #. type: Content of: @@ -6153,12 +6153,12 @@ msgstr "" #, no-wrap msgid "" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "\n" "Types: deb\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: &debian-stable-codename;\n" "Components: main\n" "Architectures: amd64 armel\n" @@ -6273,12 +6273,12 @@ msgstr "" #: sources.list.5.xml #, no-wrap msgid "" -"deb http://httpredir.debian.org/debian stable main contrib\n" -"deb-src http://httpredir.debian.org/debian stable main contrib\n" -"deb http://httpredir.debian.org/debian testing main contrib\n" -"deb-src http://httpredir.debian.org/debian testing main contrib\n" -"deb http://httpredir.debian.org/debian unstable main contrib\n" -"deb-src http://httpredir.debian.org/debian unstable main contrib" +"deb http://deb.debian.org/debian stable main contrib\n" +"deb-src http://deb.debian.org/debian stable main contrib\n" +"deb http://deb.debian.org/debian testing main contrib\n" +"deb-src http://deb.debian.org/debian testing main contrib\n" +"deb http://deb.debian.org/debian unstable main contrib\n" +"deb-src http://deb.debian.org/debian unstable main contrib" msgstr "" #. type: Content of: @@ -6286,7 +6286,7 @@ msgstr "" #, no-wrap msgid "" "Types: deb deb-src\n" -"URIs: http://httpredir.debian.org/debian\n" +"URIs: http://deb.debian.org/debian\n" "Suites: stable testing unstable\n" "Components: main contrib\n" msgstr "" diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml index 8fdc8eedb..9b52a8b9e 100644 --- a/doc/sources.list.5.xml +++ b/doc/sources.list.5.xml @@ -441,15 +441,15 @@ Components: main contrib non-free The first line gets package information for the architectures in APT::Architectures while the second always retrieves amd64 and armel. - deb http://httpredir.debian.org/debian &debian-stable-codename; main -deb [ arch=amd64,armel ] http://httpredir.debian.org/debian &debian-stable-codename; main + deb http://deb.debian.org/debian &debian-stable-codename; main +deb [ arch=amd64,armel ] http://deb.debian.org/debian &debian-stable-codename; main Types: deb -URIs: http://httpredir.debian.org/debian +URIs: http://deb.debian.org/debian Suites: &debian-stable-codename; Components: main Types: deb -URIs: http://httpredir.debian.org/debian +URIs: http://deb.debian.org/debian Suites: &debian-stable-codename; Components: main Architectures: amd64 armel @@ -496,14 +496,14 @@ Suites: unstable/binary-$(ARCH)/ Uses HTTP to get binary packages as well as sources from the stable, testing and unstable suites and the components main and contrib. - deb http://httpredir.debian.org/debian stable main contrib -deb-src http://httpredir.debian.org/debian stable main contrib -deb http://httpredir.debian.org/debian testing main contrib -deb-src http://httpredir.debian.org/debian testing main contrib -deb http://httpredir.debian.org/debian unstable main contrib -deb-src http://httpredir.debian.org/debian unstable main contrib + deb http://deb.debian.org/debian stable main contrib +deb-src http://deb.debian.org/debian stable main contrib +deb http://deb.debian.org/debian testing main contrib +deb-src http://deb.debian.org/debian testing main contrib +deb http://deb.debian.org/debian unstable main contrib +deb-src http://deb.debian.org/debian unstable main contrib Types: deb deb-src -URIs: http://httpredir.debian.org/debian +URIs: http://deb.debian.org/debian Suites: stable testing unstable Components: main contrib diff --git a/vendor/debian/apt-vendor.ent b/vendor/debian/apt-vendor.ent index 8d5416ced..41484c42e 100644 --- a/vendor/debian/apt-vendor.ent +++ b/vendor/debian/apt-vendor.ent @@ -6,10 +6,10 @@ - Date: Fri, 19 Aug 2016 20:37:28 +0200 Subject: test, travis: Quieter testing with a new -qq mode Introduce a new -qq mode for our integration test framework, and make travis use it. The new -qq mode sets MSGLEVEL to 1. In MSGLEVEL=1, no messages are generated for passed tests, and all testcase filenames are printed in the same line. Also install first in travis, do not ls the installed output and run the install with chronic, so we only get output if it failed. Gbp-Dch: ignore --- .travis.yml | 7 +++---- prepare-release | 2 +- test/integration/framework | 5 +++++ test/integration/run-tests | 34 +++++++++++++++++++++++++++++----- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7931bb39a..131bf4abd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,7 @@ before_script: - make -C build -j4 script: - CTEST_OUTPUT_ON_FAILURE=1 make -C build test - - ./test/integration/run-tests -q + - chronic make -C build install DESTDIR=$PWD/rootdir + - ./test/integration/run-tests -qq - sudo adduser --force-badname --system --home /nonexistent --no-create-home --quiet _apt || true - - sudo ./test/integration/run-tests -q - - make -C build install DESTDIR=$PWD/rootdir - - find rootdir -print0 | xargs -0 ls -ld + - sudo ./test/integration/run-tests -qq diff --git a/prepare-release b/prepare-release index f740f2152..0004de310 100755 --- a/prepare-release +++ b/prepare-release @@ -178,7 +178,7 @@ elif [ "$1" = 'buildlog' ]; then shift done elif [ "$1" = 'travis-ci' ]; then - apt-get install -qy --no-install-recommends dctrl-tools equivs gdebi-core + apt-get install -qy --no-install-recommends dctrl-tools equivs gdebi-core moreutils test_deb_control > test-control equivs-build test-control diff --git a/test/integration/framework b/test/integration/framework index 243996e14..9a908a9ec 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -5,6 +5,8 @@ EXIT_CODE=0 while [ -n "$1" ]; do if [ "$1" = "-q" ]; then export MSGLEVEL=2 + elif [ "$1" = "-qq" ]; then + export MSGLEVEL=1 elif [ "$1" = "-v" ]; then export MSGLEVEL=4 elif [ "$1" = '--color=no' ]; then @@ -142,6 +144,9 @@ if [ $MSGLEVEL -le 4 ]; then msgdebug() { true; } msgndebug() { true; } fi +if [ $MSGLEVEL -le 1 ]; then + msgpass() { true; } +fi msgdone() { if [ "$1" = "debug" -a $MSGLEVEL -le 4 ] || [ "$1" = "info" -a $MSGLEVEL -le 3 ] || diff --git a/test/integration/run-tests b/test/integration/run-tests index fad249994..7c0b74ce2 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -5,6 +5,8 @@ TESTTORUN='' while [ -n "$1" ]; do if [ "$1" = "-q" ]; then export MSGLEVEL=2 + elif [ "$1" = "-qq" ]; then + export MSGLEVEL=1 elif [ "$1" = "-v" ]; then export MSGLEVEL=4 elif [ "$1" = '--color=no' ]; then @@ -50,7 +52,9 @@ if [ -n "$TESTTORUN" ]; then CURRENTTRAP="rm -f \"$OUTPUT\"; $CURRENTTRAP" trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM { - if [ "$MSGLEVEL" -le 2 ]; then + if [ "$MSGLEVEL" -le 1 ]; then + printf "${TESTTORUN##*/}" + elif [ "$MSGLEVEL" -le 2 ]; then printf "${CTEST}Testcase ${CHIGH}${TESTTORUN##*/}${CRESET}: " else printf "${CTEST}Run Testcase ${CHIGH}${TESTTORUN##*/}${CRESET}\n" @@ -58,12 +62,20 @@ if [ -n "$TESTTORUN" ]; then if ! "$TESTTORUN"; then FAIL='yes' if [ "$MSGLEVEL" -le 2 ]; then + printf >&2 "\n${CHIGH}Running ${TESTTORUN##*/} -> FAILED${CRESET}\n" + elif [ "$MSGLEVEL" -le 2 ]; then printf >&2 "\n${CHIGH}Running ${TESTTORUN##*/} -> FAILED${CRESET}" else echo >&2 "${CHIGH}Running ${TESTTORUN##*/} -> FAILED${CRESET}" fi + else + if [ "$MSGLEVEL" -le 1 ]; then + printf " " + fi fi - if [ "$MSGLEVEL" -le 2 ]; then + if [ "$MSGLEVEL" -le 1 ]; then + : + elif [ "$MSGLEVEL" -le 2 ]; then echo fi } >"$OUTPUT" 2>&1 @@ -96,8 +108,13 @@ if [ -n "$APT_TEST_JOBS" ]; then exec $parallel -j "$APT_TEST_JOBS" "./$(basename "$0")" -- $(echo "$TESTLIST") fi TOTAL="$(echo "$TESTLIST" | wc -l)" +if [ "$MSGLEVEL" -le 1 ]; then + printf "${CTEST}Running testcases${CRESET}: " +fi for testcase in $TESTLIST; do - if [ "$MSGLEVEL" -le 2 ]; then + if [ "$MSGLEVEL" -le 1 ]; then + printf "${testcase##*/}" + elif [ "$MSGLEVEL" -le 2 ]; then printf "($(($ALL+1))/${TOTAL}) ${CTEST}Testcase ${CHIGH}${testcase##*/}${CRESET}: " else printf "${CTEST}Run Testcase ($(($ALL+1))/${TOTAL}) ${CHIGH}${testcase##*/}${CRESET}\n" @@ -105,16 +122,23 @@ for testcase in $TESTLIST; do if ! ${testcase}; then FAIL=$((FAIL+1)) FAILED_TESTS="$FAILED_TESTS ${testcase##*/}" - if [ "$MSGLEVEL" -le 2 ]; then + if [ "$MSGLEVEL" -le 1 ]; then + printf >&2 "\n${CHIGH}Running ${testcase##*/} -> FAILED${CRESET}\n" + elif [ "$MSGLEVEL" -le 2 ]; then printf >&2 "\n${CHIGH}Running ${testcase##*/} -> FAILED${CRESET}" else echo >&2 "${CHIGH}Running ${testcase##*/} -> FAILED${CRESET}" fi else PASS=$((PASS+1)) + if [ "$MSGLEVEL" -le 1 ]; then + printf " " + fi fi ALL=$((ALL+1)) - if [ "$MSGLEVEL" -le 2 ]; then + if [ "$MSGLEVEL" -le 1 ]; then + : + elif [ "$MSGLEVEL" -le 2 ]; then echo fi done -- cgit v1.2.3 From bb315d0513b93ef111ea69106d00188f0a4ec17a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Aug 2016 15:46:10 +0200 Subject: Add shippable.yml for CI on Shippable This uses the current Ubuntu 16.04 for testing, but it only runs one run, presumably as root. --- shippable.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 shippable.yml diff --git a/shippable.yml b/shippable.yml new file mode 100644 index 000000000..24b2545f7 --- /dev/null +++ b/shippable.yml @@ -0,0 +1,15 @@ +language: none + +build: + pre_ci_boot: + image_name: ubuntu + image_tag: xenial + pull: true + ci: + - apt-get install -qq build-essential + - ./prepare-release travis-ci + - mkdir build + - ( cd build && cmake .. ) + - make -C build -j 4 + - CTEST_OUTPUT_ON_FAILURE=1 make -C build test + - ./test/integration/run-tests -q -- cgit v1.2.3 From 9109c3c309e95a6d99a88f945f17c37e5c04c105 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 30 Aug 2016 17:37:59 +0200 Subject: test: Pass -d to dpkg-buildpackage This works around an issue on Fedora where dpkg complains about missing build-essential: dpkg-checkbuilddeps: Unmet build dependencies: build-essential:native Gbp-Dch: ignore --- test/integration/framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/framework b/test/integration/framework index 9a908a9ec..067cc6e8a 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -813,7 +813,7 @@ buildpackage() { if [ "$ARCH" = "all" ]; then ARCH="$(dpkg-architecture -qDEB_HOST_ARCH 2> /dev/null)" fi - testsuccess --nomsg dpkg-buildpackage -uc -us -a$ARCH + testsuccess --nomsg dpkg-buildpackage -uc -us -a$ARCH -d cp "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" "$BUILDLOG" local PKGS="$(grep '^dpkg-deb: building package' "$BUILDLOG" | cut -d'/' -f 2 | sed -e "s#'\.##")" local SRCS="$(grep '^dpkg-source: info: building' "$BUILDLOG" | grep -o '[a-z0-9._+~-]*$')" -- cgit v1.2.3 From 317bb39f3cd6626c74f25d7bdf2907f1b235f553 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 30 Aug 2016 22:20:55 +0200 Subject: Release 1.3~rc3 --- CMakeLists.txt | 2 +- debian/changelog | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/apt-cache.8.xml | 2 +- doc/apt-get.8.xml | 2 +- doc/apt-verbatim.ent | 2 +- doc/apt.conf.5.xml | 2 +- doc/po/apt-doc.pot | 4 ++-- doc/po/de.po | 2 +- doc/po/es.po | 2 +- doc/po/fr.po | 2 +- doc/po/it.po | 2 +- doc/po/ja.po | 2 +- doc/po/nl.po | 2 +- doc/po/pl.po | 2 +- doc/po/pt.po | 2 +- doc/po/pt_BR.po | 2 +- doc/sources.list.5.xml | 2 +- po/apt-all.pot | 5 +++-- po/ar.po | 3 ++- po/ast.po | 3 ++- po/bg.po | 3 ++- po/bs.po | 3 ++- po/ca.po | 3 ++- po/cs.po | 3 ++- po/cy.po | 3 ++- po/da.po | 3 ++- po/de.po | 3 ++- po/dz.po | 3 ++- po/el.po | 3 ++- po/es.po | 3 ++- po/eu.po | 3 ++- po/fi.po | 3 ++- po/fr.po | 3 ++- po/gl.po | 3 ++- po/hu.po | 3 ++- po/it.po | 3 ++- po/ja.po | 3 ++- po/km.po | 3 ++- po/ko.po | 3 ++- po/ku.po | 3 ++- po/lt.po | 3 ++- po/mr.po | 3 ++- po/nb.po | 3 ++- po/ne.po | 3 ++- po/nl.po | 3 ++- po/nn.po | 3 ++- po/pl.po | 3 ++- po/pt.po | 3 ++- po/pt_BR.po | 3 ++- po/ro.po | 3 ++- po/ru.po | 3 ++- po/sk.po | 3 ++- po/sl.po | 3 ++- po/sv.po | 3 ++- po/th.po | 3 ++- po/tl.po | 3 ++- po/tr.po | 3 ++- po/uk.po | 3 ++- po/vi.po | 3 ++- po/zh_CN.po | 3 ++- po/zh_TW.po | 3 ++- 61 files changed, 160 insertions(+), 62 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35c75b18a..ee1adf7a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,7 +165,7 @@ endif() # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team ") -set(PACKAGE_VERSION "1.3~rc2") +set(PACKAGE_VERSION "1.3~rc3") if (NOT DEFINED COMMON_ARCH) execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH diff --git a/debian/changelog b/debian/changelog index 128398d00..a9bd132fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,57 @@ +apt (1.3~rc3) unstable; urgency=medium + + [ Julian Andres Klode ] + * Ignore SIGINT and SIGQUIT for Pre-Install hooks + This basically fixes Bug #832593, as long as your /bin/sh + is not dash, as dash is evil. + * prepare-release: Use equivs and gdebi-core for travis deps + * install-progress: Call the real ::fork() in our fork() method + * Packaging cleanup: + - debian: Install etc/apt if present (e.g., on Ubuntu) + - tests/control: Handle the gpg1/gpg2 mess a bit better + - debian: Make better use of the tree installed by CMake + - debian: Switch to debhelper 10 + - debian: Add more lintian overrides + - debian: Drop outdated stuff + - debian: Run wrap-and-sort + - Add new symbols to symbols file + * Build system fixes, including: + - CMake: Translations: Don't rebuild .mo for line number changes + - CMake: Translations: Pass --previous to msgmerge. + Thanks to Guillem Jover for the suggestion. + - CMake: Do not add po/ if USE_NLS is OFF + - CMake: Install config and logging directories + - CMake: Translations: Build byproduct before output + - CMake: Add Large File Support (Closes: #834767) + * Several portability fixes (full test suite passes on FreeBSD), including: + - CMake: Discover docbook stylesheet in other locations + - Add missing includes and external definitions + - Use C locale instead of C.UTF-8 for protocol strings + - Make directory paths configurable + - Lower-case uname -r output in kernel autoremove helper + - Make root group configurable via ROOT_GROUP + * Accept --autoremove as alias for --auto-remove + * apt-inst: debfile: Pass comp. Name to ExtractTar, not Binary + * changelog: Respect Dir setting for local changelog getting + * init: Add Dir::Bin::planners default entry + * Switch documentation from httpredir.d.o to deb.d.o + + [ Zhou Mo ] + * zh_CN.po: update simplified Chinese translation + + [ David Kalnischkies ] + * do dpkg --configure before --remove/--purge --pending (Closes: 835094) + * prevent C++ locale number formatting in text APIs (try 3) (LP: 1611010) + * do fail on weakhash/loop earlier in acquire (Closes: 835195) + * do not restore selections for already purged packages + * apt-key: warn instead of fail on unreadable keyrings + * show apt-key warnings in apt update (Closes: 834973) + * treat .ddeb files like .deb, especially for dpkg (LP: #1616909) + * randomize acquire order for same type index files + * don't loop on pinning pkgs from absolute debs by regex (Closes: 835818) + + -- Julian Andres Klode Tue, 30 Aug 2016 22:20:28 +0200 + apt (1.3~rc2) unstable; urgency=medium [ Julian Andres Klode ] diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml index b8c6aa989..571779931 100644 --- a/doc/apt-cache.8.xml +++ b/doc/apt-cache.8.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; - 2016-08-16T00:00:00Z + 2016-08-17T00:00:00Z diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index 56ce08165..b4a3002f3 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; - 2016-08-16T00:00:00Z + 2016-08-26T00:00:00Z diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index 2ffb4f54d..1278ff283 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -239,7 +239,7 @@ "> - + diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 13e248c0f..380371230 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -19,7 +19,7 @@ &apt-email; &apt-product; - 2016-08-11T00:00:00Z + 2016-08-17T00:00:00Z diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index 02a1c3895..817adbbef 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt-doc 1.3~rc2\n" +"Project-Id-Version: apt-doc 1.3~rc3\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/doc/po/de.po b/doc/po/de.po index 94f795cad..5e4e9db10 100644 --- a/doc/po/de.po +++ b/doc/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-09-14 14:46+0200\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" diff --git a/doc/po/es.po b/doc/po/es.po index 3f934437a..1145c74cc 100644 --- a/doc/po/es.po +++ b/doc/po/es.po @@ -38,7 +38,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-07-04 01:31+0200\n" "Last-Translator: Omar Campagne \n" "Language-Team: Debian l10n Spanish \n" diff --git a/doc/po/fr.po b/doc/po/fr.po index e4092bec3..ef12e4783 100644 --- a/doc/po/fr.po +++ b/doc/po/fr.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-11-15 17:26+0100\n" "Last-Translator: Jean-Pierre Giraud \n" "Language-Team: French \n" diff --git a/doc/po/it.po b/doc/po/it.po index 3f8d6467f..4f770b078 100644 --- a/doc/po/it.po +++ b/doc/po/it.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2015-12-27 21:26+0200\n" "Last-Translator: Beatrice Torracca \n" "Language-Team: Italian \n" diff --git a/doc/po/ja.po b/doc/po/ja.po index e1c1faf36..b992b66fc 100644 --- a/doc/po/ja.po +++ b/doc/po/ja.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.6\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-03-23 09:39+0900\n" "Last-Translator: Takuma Yamada \n" "Language-Team: Japanese \n" diff --git a/doc/po/nl.po b/doc/po/nl.po index 5fa0bc924..c7cf7e267 100644 --- a/doc/po/nl.po +++ b/doc/po/nl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.1.10-nl\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-02-01 16:17+0100\n" "Last-Translator: Frans Spiesschaert \n" "Language-Team: Debian Dutch l10n Team \n" diff --git a/doc/po/pl.po b/doc/po/pl.po index 1bc70dfc1..9737f8182 100644 --- a/doc/po/pl.po +++ b/doc/po/pl.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-07-04 02:13+0200\n" "Last-Translator: Robert Luberda \n" "Language-Team: Polish \n" diff --git a/doc/po/pt.po b/doc/po/pt.po index 05e9ae7d2..9d3355c4c 100644 --- a/doc/po/pt.po +++ b/doc/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.7\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-08-29 00:34+0100\n" "Last-Translator: Américo Monteiro \n" "Language-Team: Portuguese \n" diff --git a/doc/po/pt_BR.po b/doc/po/pt_BR.po index 7d74de4b8..330a1a51f 100644 --- a/doc/po/pt_BR.po +++ b/doc/po/pt_BR.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2004-09-20 17:02+0000\n" "Last-Translator: André Luís Lopes \n" "Language-Team: \n" diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml index 9b52a8b9e..c0960958f 100644 --- a/doc/sources.list.5.xml +++ b/doc/sources.list.5.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; - 2016-08-06T00:00:00Z + 2016-08-29T00:00:00Z diff --git a/po/apt-all.pot b/po/apt-all.pot index 3246191cf..0a20ea792 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt 1.3~rc2\n" +"Project-Id-Version: apt 1.3~rc3\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1277,6 +1277,7 @@ msgstr "" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/ar.po b/po/ar.po index 3e22a25ba..9ab526738 100644 --- a/po/ar.po +++ b/po/ar.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2006-10-20 21:28+0300\n" "Last-Translator: Ossama M. Khayat \n" "Language-Team: Arabic \n" @@ -1289,6 +1289,7 @@ msgstr "" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/ast.po b/po/ast.po index 3b644c682..59078a52b 100644 --- a/po/ast.po +++ b/po/ast.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.7.18\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2010-10-02 23:35+0100\n" "Last-Translator: Iñigo Varela \n" "Language-Team: Asturian (ast)\n" @@ -1327,6 +1327,7 @@ msgstr "Nun pudo determinase una triba de sistema d'empaquetáu afayadiza" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Executando dpkt" diff --git a/po/bg.po b/po/bg.po index 8d3c5af80..53a26ee01 100644 --- a/po/bg.po +++ b/po/bg.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.7.21\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-06-25 17:23+0300\n" "Last-Translator: Damyan Ivanov \n" "Language-Team: Bulgarian \n" @@ -1354,6 +1354,7 @@ msgstr "Неуспех при определянето на подходяща msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Изпълняване на dpkg" diff --git a/po/bs.po b/po/bs.po index 4f5f59995..2a6b48c52 100644 --- a/po/bs.po +++ b/po/bs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.5.26\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2004-05-06 15:25+0100\n" "Last-Translator: Safir Šećerović \n" "Language-Team: Bosnian \n" @@ -1286,6 +1286,7 @@ msgstr "" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/ca.po b/po/ca.po index 792723c6b..9bd7d7786 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.9.7.6\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-10-19 13:30+0200\n" "Last-Translator: Jordi Mallach \n" "Language-Team: Catalan \n" @@ -1350,6 +1350,7 @@ msgstr "No es pot determinar un tipus de sistema d'empaquetament adequat." msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "S'està executant dpkg" diff --git a/po/cs.po b/po/cs.po index 845e42e55..dd4815af2 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2015-08-29 15:24+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -1329,6 +1329,7 @@ msgstr "Nebylo možno určit vhodný typ balíčkovacího systému" msgid "Progress: [%3i%%]" msgstr "Postup: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Spouští se dpkg" diff --git a/po/cy.po b/po/cy.po index cd519b8e9..d98107c89 100644 --- a/po/cy.po +++ b/po/cy.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2005-06-06 13:46+0100\n" "Last-Translator: Dafydd Harries \n" "Language-Team: Welsh \n" @@ -1318,6 +1318,7 @@ msgstr "Ni ellir canfod math system addas" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/da.po b/po/da.po index a8fe76975..8b211aaf7 100644 --- a/po/da.po +++ b/po/da.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-07-06 23:51+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" @@ -1325,6 +1325,7 @@ msgstr "Kunne ikke bestemme en passende pakkesystemtype" msgid "Progress: [%3i%%]" msgstr "Status: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Kører dpkg" diff --git a/po/de.po b/po/de.po index f4cb6de46..234d8d10e 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-09-19 13:04+0100\n" "Last-Translator: Holger Wansing \n" "Language-Team: Debian German \n" @@ -1366,6 +1366,7 @@ msgstr "Bestimmung eines passenden Paketierungssystemtyps nicht möglich" msgid "Progress: [%3i%%]" msgstr "Fortschritt: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Ausführen von dpkg" diff --git a/po/dz.po b/po/dz.po index 604b9b842..1685d032e 100644 --- a/po/dz.po +++ b/po/dz.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2006-09-19 09:49+0530\n" "Last-Translator: Kinley Tshering \n" "Language-Team: Dzongkha \n" @@ -1300,6 +1300,7 @@ msgstr "འོས་འབབ་དང་ལྡན་པའི་སྦུང་ msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/el.po b/po/el.po index 52393d61c..f7a89abd1 100644 --- a/po/el.po +++ b/po/el.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-08-26 18:25+0300\n" "Last-Translator: Θανάσης Νάτσης \n" "Language-Team: Greek \n" @@ -1315,6 +1315,7 @@ msgstr "Αδύνατος ο καθορισμός ενός κατάλληλου msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/es.po b/po/es.po index 9643ecded..0e6fb98d7 100644 --- a/po/es.po +++ b/po/es.po @@ -34,7 +34,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.8.10\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-01-26 01:51+0100\n" "Last-Translator: Manuel \"Venturi\" Porras Peralta \n" @@ -1444,6 +1444,7 @@ msgstr "No se pudo determinar un tipo de sistema de paquetes adecuado" msgid "Progress: [%3i%%]" msgstr "Progreso: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Ejecutando dpkg" diff --git a/po/eu.po b/po/eu.po index b98343774..a967934aa 100644 --- a/po/eu.po +++ b/po/eu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2009-05-17 00:41+0200\n" "Last-Translator: Piarres Beobide \n" "Language-Team: Euskara \n" @@ -1301,6 +1301,7 @@ msgstr "Ezin da pakete sistemaren mota egokirik zehaztu" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/fi.po b/po/fi.po index 87df7fe3f..ec61634a7 100644 --- a/po/fi.po +++ b/po/fi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.5.26\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-12-11 14:52+0200\n" "Last-Translator: Tapio Lehtonen \n" "Language-Team: Finnish \n" @@ -1296,6 +1296,7 @@ msgstr "Sopivaa paketointijärjestelmän tyyppiä ei saa selvitettyä" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/fr.po b/po/fr.po index 1734acf55..d3948ca9c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2013-12-15 16:45+0100\n" "Last-Translator: Julien Patriarca \n" "Language-Team: French \n" @@ -1368,6 +1368,7 @@ msgstr "Impossible de déterminer un type du système de paquets adéquat" msgid "Progress: [%3i%%]" msgstr "Progression : [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Exécution de dpkg" diff --git a/po/gl.po b/po/gl.po index 4bed4543c..747678c48 100644 --- a/po/gl.po +++ b/po/gl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2011-05-12 15:28+0100\n" "Last-Translator: Miguel Anxo Bouzada \n" "Language-Team: galician \n" @@ -1350,6 +1350,7 @@ msgstr "Non é posíbel determinar un tipo de sistema de empaquetado axeitado" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Executando dpkg" diff --git a/po/hu.po b/po/hu.po index c8e64820e..bfef5673d 100644 --- a/po/hu.po +++ b/po/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-04-10 19:46+0200\n" "Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" @@ -1372,6 +1372,7 @@ msgstr "A megfelelő csomagrendszertípus nem határozható meg" msgid "Progress: [%3i%%]" msgstr "Haladás: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "A dpkg futtatása" diff --git a/po/it.po b/po/it.po index 7592baa45..e396beb69 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2015-04-07 16:51+0100\n" "Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" @@ -1365,6 +1365,7 @@ msgstr "Impossibile determinare un tipo di sistema appropriato di pacchetti" msgid "Progress: [%3i%%]" msgstr "Avanzamento: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Esecuzione di dpkg" diff --git a/po/ja.po b/po/ja.po index 421ff137d..eec6163ba 100644 --- a/po/ja.po +++ b/po/ja.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.9.3\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-05-18 15:31+0900\n" "Last-Translator: Takuma Yamada \n" "Language-Team: Japanese \n" @@ -1372,6 +1372,7 @@ msgstr "適切なパッケージシステムタイプを特定できません" msgid "Progress: [%3i%%]" msgstr "進捗: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "dpkg を実行しています" diff --git a/po/km.po b/po/km.po index 7f705faaf..e13828526 100644 --- a/po/km.po +++ b/po/km.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2006-10-10 09:48+0700\n" "Last-Translator: Khoem Sokhem \n" "Language-Team: Khmer \n" @@ -1296,6 +1296,7 @@ msgstr "មិនអាច​កំណត់​ប្រភេទ​ប្រព msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/ko.po b/po/ko.po index 3056850d0..fd772cf3f 100644 --- a/po/ko.po +++ b/po/ko.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2010-08-30 02:31+0900\n" "Last-Translator: Changwoo Ryu \n" "Language-Team: Korean \n" @@ -1305,6 +1305,7 @@ msgstr "올바른 패키지 시스템 타입을 알아낼 수 없습니다" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "dpkg 실행하는 중입니다" diff --git a/po/ku.po b/po/ku.po index b2b54de28..afa163c9e 100644 --- a/po/ku.po +++ b/po/ku.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-05-08 12:48+0200\n" "Last-Translator: Erdal Ronahi \n" "Language-Team: ku \n" @@ -1288,6 +1288,7 @@ msgstr "" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/lt.po b/po/lt.po index 854ec5a4e..8850f01ac 100644 --- a/po/lt.po +++ b/po/lt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-08-02 01:47-0400\n" "Last-Translator: Gintautas Miliauskas \n" "Language-Team: Lithuanian \n" @@ -1290,6 +1290,7 @@ msgstr "" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/mr.po b/po/mr.po index 996f73792..39a1cf6f1 100644 --- a/po/mr.po +++ b/po/mr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-11-20 23:27+0530\n" "Last-Translator: Sampada \n" "Language-Team: Marathi, janabhaaratii, C-DAC, Mumbai, India " @@ -1293,6 +1293,7 @@ msgstr "योग्य असा पॅकेजिंग प्रणाली msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/nb.po b/po/nb.po index 40ec2bfa9..8a05533b4 100644 --- a/po/nb.po +++ b/po/nb.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-06-11 22:38+0200\n" "Last-Translator: Petter Reinholdtsen \n" "Language-Team: Norwegian Bokmål \n" @@ -1323,6 +1323,7 @@ msgstr "Klarer ikke bestemme en passende pakkesystemtype" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Kjører dpkg" diff --git a/po/ne.po b/po/ne.po index 430a157d5..2d762c5ee 100644 --- a/po/ne.po +++ b/po/ne.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2006-06-12 14:35+0545\n" "Last-Translator: Shiva Pokharel \n" "Language-Team: Nepali \n" @@ -1292,6 +1292,7 @@ msgstr "उपयुक्त प्याकिङ्ग प्रणाली msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/nl.po b/po/nl.po index 0187cdee8..c36e73f9a 100644 --- a/po/nl.po +++ b/po/nl.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.11\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-04-27 18:12+0200\n" "Last-Translator: Frans Spiesschaert \n" "Language-Team: Debian Dutch l10n Team \n" @@ -1387,6 +1387,7 @@ msgstr "Kan geen geschikt pakketbeheersysteemtype bepalen" msgid "Progress: [%3i%%]" msgstr "Voortgang: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "dpkg wordt uitgevoerd" diff --git a/po/nn.po b/po/nn.po index bbfcccd66..c6c24c07b 100644 --- a/po/nn.po +++ b/po/nn.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2005-02-14 23:30+0100\n" "Last-Translator: Havard Korsvoll \n" "Language-Team: Norwegian nynorsk \n" @@ -1300,6 +1300,7 @@ msgstr "Klarte ikkje avgjera ein eigna pakkesystemtype" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/pl.po b/po/pl.po index 4a104bb42..fffecb673 100644 --- a/po/pl.po +++ b/po/pl.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.9.7.3\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-07-28 21:53+0200\n" "Last-Translator: Michał Kułach \n" "Language-Team: Polish \n" @@ -1355,6 +1355,7 @@ msgstr "Nie udało się określić odpowiedniego typu systemu pakietów" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Uruchamianie dpkg" diff --git a/po/pt.po b/po/pt.po index b1a12fd4e..4e8a16ab0 100644 --- a/po/pt.po +++ b/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-06-29 15:45+0100\n" "Last-Translator: Miguel Figueiredo \n" "Language-Team: Portuguese \n" @@ -1358,6 +1358,7 @@ msgstr "" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "A correr o dpkg" diff --git a/po/pt_BR.po b/po/pt_BR.po index ff99e113d..b736797a7 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-11-17 02:33-0200\n" "Last-Translator: Felipe Augusto van de Wiel (faw) \n" "Language-Team: Brazilian Portuguese \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2008-11-15 02:21+0200\n" "Last-Translator: Eddy Petrișor \n" "Language-Team: Romanian \n" @@ -1307,6 +1307,7 @@ msgstr "Nu s-a putut determina un tip de sistem de împachetare potrivit" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/ru.po b/po/ru.po index 97163cbfc..64ba0902f 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.12\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-05-19 20:50+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" @@ -1374,6 +1374,7 @@ msgstr "Невозможно определить подходящий тип с msgid "Progress: [%3i%%]" msgstr "Ход выполнения: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Запускается dpkg" diff --git a/po/sk.po b/po/sk.po index 161a7c11b..4aae9435a 100644 --- a/po/sk.po +++ b/po/sk.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-06-28 20:49+0100\n" "Last-Translator: Ivan Masár \n" "Language-Team: Slovak \n" @@ -1328,6 +1328,7 @@ msgstr "Nedá sa určiť vhodný typ systému balíkov" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Spúšťa sa dpkg" diff --git a/po/sl.po b/po/sl.po index 03372cdbe..cabf864a5 100644 --- a/po/sl.po +++ b/po/sl.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.5.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-06-27 21:29+0000\n" "Last-Translator: Andrej Znidarsic \n" "Language-Team: Slovenian \n" @@ -1330,6 +1330,7 @@ msgstr "Ni mogoče določiti ustrezne vrste paketnega sistema" msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Poganjanje dpkg" diff --git a/po/sv.po b/po/sv.po index 55400f12a..c957a7dd4 100644 --- a/po/sv.po +++ b/po/sv.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2015-08-19 21:33+0200\n" "Last-Translator: Anders Jonsson \n" "Language-Team: Swedish \n" @@ -1342,6 +1342,7 @@ msgstr "Kunde inte fastställa en lämplig paketsystemstyp" msgid "Progress: [%3i%%]" msgstr "Förlopp: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Kör dpkg" diff --git a/po/th.po b/po/th.po index acaf8180a..301c6386b 100644 --- a/po/th.po +++ b/po/th.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-12-12 13:00+0700\n" "Last-Translator: Theppitak Karoonboonyanan \n" "Language-Team: Thai \n" @@ -1304,6 +1304,7 @@ msgstr "ไม่สามารถระบุชนิดของระบบ msgid "Progress: [%3i%%]" msgstr "ความคืบหน้า: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "กำลังเรียก dpkg" diff --git a/po/tl.po b/po/tl.po index 91f8740dd..9fd03412f 100644 --- a/po/tl.po +++ b/po/tl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2007-03-29 21:36+0800\n" "Last-Translator: Eric Pareja \n" "Language-Team: Tagalog \n" @@ -1314,6 +1314,7 @@ msgstr "Hindi matuklasan ang akmang uri ng sistema ng pakete " msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "" diff --git a/po/tr.po b/po/tr.po index 61874d4bd..111a58694 100644 --- a/po/tr.po +++ b/po/tr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-07-21 18:43+0300\n" "Last-Translator: Mert Dirik \n" "Language-Team: Debian l10n Turkish \n" @@ -1359,6 +1359,7 @@ msgstr "Uygun bir paketleme sistemi türü bulunamıyor" msgid "Progress: [%3i%%]" msgstr "Durum: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "dpkg çalıştırılıyor" diff --git a/po/uk.po b/po/uk.po index eabb2a74b..4d46be0ac 100644 --- a/po/uk.po +++ b/po/uk.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2012-09-25 20:19+0300\n" "Last-Translator: A. Bondarenko \n" "Language-Team: Українська \n" @@ -1360,6 +1360,7 @@ msgstr "Неможливо визначити тип необхідної сис msgid "Progress: [%3i%%]" msgstr "" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Виконується dpkg" diff --git a/po/vi.po b/po/vi.po index 1d4d42e93..80665d9a5 100644 --- a/po/vi.po +++ b/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2014-09-12 13:48+0700\n" "Last-Translator: Trần Ngọc Quân \n" "Language-Team: Vietnamese \n" @@ -1341,6 +1341,7 @@ msgstr "Không thể quyết định kiểu hệ thống đóng gói thích hợ msgid "Progress: [%3i%%]" msgstr "Diễn biến: [%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "Đang chạy dpkg" diff --git a/po/zh_CN.po b/po/zh_CN.po index 3371e8fc9..54cc25854 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.x\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2016-08-20 13:00+0000\n" "Last-Translator: Zhou Mo \n" "Language-Team: Chinese (simplified) \n" @@ -1301,6 +1301,7 @@ msgstr "无法确定适合的打包系统类型" msgid "Progress: [%3i%%]" msgstr "进度:[%3i%%]" +#. send status information that we are about to fork dpkg #: apt-pkg/install-progress.cc msgid "Running dpkg" msgstr "正在运行 dpkg" diff --git a/po/zh_TW.po b/po/zh_TW.po index eb85a1a42..63f09de2f 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.X\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2016-08-17 23:47+0200\n" +"POT-Creation-Date: 2016-08-30 22:20+0200\n" "PO-Revision-Date: 2009-01-28 10:41+0800\n" "Last-Translator: Tetralet \n" "Language-Team: Debian-user in Chinese [Big5]