From 2e42fb105e474b5ab25f2d2ded55124838b39e8d Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Tue, 2 May 2023 15:00:55 +0100 Subject: apt: Upgrade to v2.6.0 Changes: Rebase patches for upstream changes Remove upstream applied patches Update homepage Update sha256sum for new version Signed-off-by: Sudip Mukherjee Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- ...isable-documentation-directory-altogether.patch | 6 +- .../0001-Remove-using-std-binary_function.patch | 8 +- .../0001-add-missing-cstdint-for-uint16_t.patch | 35 ----- .../apt/apt/0001-cmake-Do-not-build-po-files.patch | 9 +- ...st-time_t-and-suseconds_t-from-std-chrono.patch | 64 --------- ...teractive-helper-Undefine-_FORTIFY_SOURCE.patch | 27 ---- meta/recipes-devtools/apt/apt_2.4.5.bb | 145 --------------------- meta/recipes-devtools/apt/apt_2.6.0.bb | 142 ++++++++++++++++++++ 8 files changed, 153 insertions(+), 283 deletions(-) delete mode 100644 meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch delete mode 100644 meta/recipes-devtools/apt/apt/0001-typecast-time_t-and-suseconds_t-from-std-chrono.patch delete mode 100644 meta/recipes-devtools/apt/apt/0002-interactive-helper-Undefine-_FORTIFY_SOURCE.patch delete mode 100644 meta/recipes-devtools/apt/apt_2.4.5.bb create mode 100644 meta/recipes-devtools/apt/apt_2.6.0.bb (limited to 'meta/recipes-devtools/apt') diff --git a/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch b/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch index 8b28ede8a8..5443ff6caa 100644 --- a/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch +++ b/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch @@ -13,11 +13,11 @@ Signed-off-by: Alexander Kanavin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9745c13..7cfc9ee 100644 +index 668e2d762..62f441bfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -239,7 +239,7 @@ add_subdirectory(apt-pkg) - add_subdirectory(apt-private) +@@ -246,7 +246,7 @@ add_subdirectory(apt-private) + endif() add_subdirectory(cmdline) add_subdirectory(completions) -add_subdirectory(doc) diff --git a/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch b/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch index 3065210a04..15b036b90d 100644 --- a/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch +++ b/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc -index 87ce9153c..56fdc2246 100644 +index 0f6587281..0a253b12b 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -48,6 +48,11 @@ @@ -33,19 +33,19 @@ index 87ce9153c..56fdc2246 100644 bool SrcDone; time_t ContentsMTime; -- struct ContentsCompare : public binary_function +- struct ContentsCompare - { - inline bool operator() (const PackageMap &x,const PackageMap &y) - {return x.ContentsMTime < y.ContentsMTime;}; - }; - -- struct DBCompare : public binary_function +- struct DBCompare - { - inline bool operator() (const PackageMap &x,const PackageMap &y) - {return x.BinCacheDB < y.BinCacheDB;}; - }; - -- struct SrcDBCompare : public binary_function +- struct SrcDBCompare - { - inline bool operator() (const PackageMap &x,const PackageMap &y) - {return x.SrcCacheDB < y.SrcCacheDB;}; diff --git a/meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch b/meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch deleted file mode 100644 index 44aa8a5873..0000000000 --- a/meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 960d10e89cf60d39998dae6fdcd4f0866b753a79 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 23 Jan 2023 12:31:35 -0800 -Subject: [PATCH] add missing for uint16_t - -This fixes build problems with gcc 13 snapshot [1] - -Fixes -| include/apt-pkg/pkgcache.h:257:23: warning: cast from 'char*' to 'const uint16_t*' {aka 'const short unsigned int*'} increases required alignment of target type [-Wcast-align] -| 257 | uint16_t len = *reinterpret_cast(name - sizeof(uint16_t)); -| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html - -Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/276] -Signed-off-by: Khem Raj ---- - apt-pkg/contrib/mmap.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc -index 642e20473..0568e1cd0 100644 ---- a/apt-pkg/contrib/mmap.cc -+++ b/apt-pkg/contrib/mmap.cc -@@ -23,6 +23,7 @@ - #include - #include - -+#include - #include - #include - #include --- -2.39.1 - diff --git a/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch b/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch index 2837b7f1b3..036ce35963 100644 --- a/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch +++ b/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch @@ -15,16 +15,18 @@ Signed-off-by: Khem Raj 1 file changed, 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3c8ec3f..821a24f 100644 +index be157a55f..54163ae6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -245,13 +245,6 @@ add_subdirectory(ftparchive) +@@ -252,15 +252,6 @@ add_subdirectory(ftparchive) add_subdirectory(methods) add_subdirectory(test) -if (USE_NLS) -add_subdirectory(po) +-endif() - +-if(TARGET update-po AND TARGET update-po4a) -# Link update-po4a into the update-po target -add_dependencies(update-po update-po4a) -endif() @@ -32,6 +34,3 @@ index 3c8ec3f..821a24f 100644 # Create our directories. install_empty_directories( ${CONF_DIR}/apt.conf.d --- -2.31.0 - diff --git a/meta/recipes-devtools/apt/apt/0001-typecast-time_t-and-suseconds_t-from-std-chrono.patch b/meta/recipes-devtools/apt/apt/0001-typecast-time_t-and-suseconds_t-from-std-chrono.patch deleted file mode 100644 index fc3509d336..0000000000 --- a/meta/recipes-devtools/apt/apt/0001-typecast-time_t-and-suseconds_t-from-std-chrono.patch +++ /dev/null @@ -1,64 +0,0 @@ -From b7a1a4d3259557f2587f7d5d47502691d94c21c2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 16 Sep 2022 20:00:30 -0700 -Subject: [PATCH 1/2] typecast time_t and suseconds_t from std::chrono - -This fixes build on some architectures like mips -progress.cc:125:31: error: non-constant-expression cannot be narrowed from type 'std::chrono::duration::rep' (aka 'long long') to '__time_t' (aka 'long') in initializer list [-Wc++11-narrowing] - struct timeval NowTime = { Now_sec.count(), Now_usec.count() }; - -Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/259] -Signed-off-by: Khem Raj ---- - apt-pkg/acquire.cc | 4 ++-- - apt-pkg/contrib/progress.cc | 2 +- - ftparchive/apt-ftparchive.cc | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc -index 100ccde..dd0624a 100644 ---- a/apt-pkg/acquire.cc -+++ b/apt-pkg/acquire.cc -@@ -53,11 +53,11 @@ - using namespace std; - - // helper to convert time_point to a timeval --static struct timeval SteadyDurationToTimeVal(std::chrono::steady_clock::duration Time) -+constexpr struct timeval SteadyDurationToTimeVal(std::chrono::steady_clock::duration Time) - { - auto const Time_sec = std::chrono::duration_cast(Time); - auto const Time_usec = std::chrono::duration_cast(Time - Time_sec); -- return {Time_sec.count(), Time_usec.count()}; -+ return timeval{static_cast(Time_sec.count()), static_cast(Time_usec.count())}; - } - - std::string pkgAcquire::URIEncode(std::string const &part) /*{{{*/ -diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc -index 03f88d4..eb688b9 100644 ---- a/apt-pkg/contrib/progress.cc -+++ b/apt-pkg/contrib/progress.cc -@@ -122,7 +122,7 @@ bool OpProgress::CheckChange(float Interval) - auto const Now = std::chrono::steady_clock::now().time_since_epoch(); - auto const Now_sec = std::chrono::duration_cast(Now); - auto const Now_usec = std::chrono::duration_cast(Now - Now_sec); -- struct timeval NowTime = { Now_sec.count(), Now_usec.count() }; -+ struct timeval NowTime = { static_cast(Now_sec.count()), static_cast(Now_usec.count()) }; - - std::chrono::duration Delta = - std::chrono::seconds(NowTime.tv_sec - LastTime.tv_sec) + -diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc -index 56fdc22..0a253b1 100644 ---- a/ftparchive/apt-ftparchive.cc -+++ b/ftparchive/apt-ftparchive.cc -@@ -58,7 +58,7 @@ static struct timeval GetTimevalFromSteadyClock() /*{{{*/ - auto const Time = std::chrono::steady_clock::now().time_since_epoch(); - auto const Time_sec = std::chrono::duration_cast(Time); - auto const Time_usec = std::chrono::duration_cast(Time - Time_sec); -- return { Time_sec.count(), Time_usec.count() }; -+ return { static_cast(Time_sec.count()), static_cast(Time_usec.count()) }; - } - /*}}}*/ - static auto GetTimeDeltaSince(struct timeval StartTime) /*{{{*/ --- -2.37.3 - diff --git a/meta/recipes-devtools/apt/apt/0002-interactive-helper-Undefine-_FORTIFY_SOURCE.patch b/meta/recipes-devtools/apt/apt/0002-interactive-helper-Undefine-_FORTIFY_SOURCE.patch deleted file mode 100644 index 18c4641b22..0000000000 --- a/meta/recipes-devtools/apt/apt/0002-interactive-helper-Undefine-_FORTIFY_SOURCE.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 891076c2cf4298b5d587545497f4831f0d21caa1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 16 Sep 2022 20:04:43 -0700 -Subject: [PATCH 2/2] interactive-helper: Undefine _FORTIFY_SOURCE - -This ensures that it compiles when clang compiler is passing --DFORTIFY_SOURCES=2 - -Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/259] -Signed-off-by: Khem Raj ---- - test/interactive-helper/libnoprofile.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/test/interactive-helper/libnoprofile.c b/test/interactive-helper/libnoprofile.c -index f11b898..b26ec2a 100644 ---- a/test/interactive-helper/libnoprofile.c -+++ b/test/interactive-helper/libnoprofile.c -@@ -1,4 +1,5 @@ - #define _GNU_SOURCE -+#undef _FORTIFY_SOURCE - #include - #include - #include --- -2.37.3 - diff --git a/meta/recipes-devtools/apt/apt_2.4.5.bb b/meta/recipes-devtools/apt/apt_2.4.5.bb deleted file mode 100644 index 429cf6e659..0000000000 --- a/meta/recipes-devtools/apt/apt_2.4.5.bb +++ /dev/null @@ -1,145 +0,0 @@ -SUMMARY = "Advanced front-end for dpkg" -DESCRIPTION = "APT is the Advanced Package Tool, an advanced interface to the Debian packaging system which provides the apt-get program." -HOMEPAGE = "https://packages.debian.org/jessie/apt" -LICENSE = "GPL-2.0-or-later" -SECTION = "base" - -# Triehash script taken from https://github.com/julian-klode/triehash -SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ - file://triehash \ - file://0001-Disable-documentation-directory-altogether.patch \ - file://0001-Fix-musl-build.patch \ - file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \ - file://0001-cmake-Do-not-build-po-files.patch \ - file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \ - file://0001-aptwebserver.cc-Include-array.patch \ - file://0001-Remove-using-std-binary_function.patch \ - file://0001-typecast-time_t-and-suseconds_t-from-std-chrono.patch \ - file://0002-interactive-helper-Undefine-_FORTIFY_SOURCE.patch \ - file://0001-add-missing-cstdint-for-uint16_t.patch \ - " - -SRC_URI:append:class-native = " \ - file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ - file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ - " - -SRC_URI:append:class-nativesdk = " \ - file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ - file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ - " - -SRC_URI[sha256sum] = "5552f175c3a3924f5cda0c079b821b30f68a2521959f2c30ab164d2ec7993ecf" -LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -# the package is taken from snapshots.debian.org; that source is static and goes stale -# so we check the latest upstream from a directory that does get updated -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" -# apt seems to follow a peculiar version policy, where every *other* even version -# is considered stable, e.g. 1.0, 1.4, 1.8, 2.2, 2.6, etc. As there is no way -# to express 'divisible by 4 plus 2' in regex (that I know of), let's hardcode a few. -UPSTREAM_CHECK_REGEX = "[^\d\.](?P((2\.2)|(2\.6)|(3\.0)|(3\.4)|(3\.8)|(4\.2))(\.\d+)+)\.tar" - -inherit cmake perlnative bash-completion useradd - -# User is added to allow apt to drop privs, will runtime warn without -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --home /nonexistent --no-create-home _apt" - -BBCLASSEXTEND = "native nativesdk" - -DEPENDS += "db gnutls lz4 zlib bzip2 xz libgcrypt xxhash" - -EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ - -DDPKG_DATADIR=${datadir}/dpkg \ - -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \ - -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=True \ - -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \ - -DWITH_TESTS=False \ -" - -do_configure:prepend() { - echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake -} - -# Unfortunately apt hardcodes this all over the place -FILES:${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" -RDEPENDS:${PN} += "bash perl dpkg" - -customize_apt_conf_sample() { - cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF -Dir "${STAGING_DIR_NATIVE}/" -{ - State "var/lib/apt/" - { - Lists "#APTCONF#/lists/"; - status "#ROOTFS#/var/lib/dpkg/status"; - }; - Cache "var/cache/apt/" - { - Archives "archives/"; - pkgcache ""; - srcpkgcache ""; - }; - Bin "${STAGING_BINDIR_NATIVE}/" - { - methods "${STAGING_LIBDIR}/apt/methods/"; - gzip "/bin/gzip"; - dpkg "dpkg"; - dpkg-source "dpkg-source"; - dpkg-buildpackage "dpkg-buildpackage"; - apt-get "apt-get"; - apt-cache "apt-cache"; - }; - Etc "#APTCONF#" - { - Preferences "preferences"; - }; - Log "var/log/apt"; -}; - -APT -{ - Install-Recommends "true"; - Immediate-Configure "false"; - Architecture "i586"; - Get - { - Assume-Yes "true"; - }; -}; - -Acquire -{ - AllowInsecureRepositories "true"; -}; - -DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"}; -DPkg::Path ""; -EOF -} - -do_install:append:class-native() { - customize_apt_conf_sample -} - -do_install:append:class-nativesdk() { - customize_apt_conf_sample - rm -rf ${D}${localstatedir}/log -} - -do_install:append:class-target() { - # Write the correct apt-architecture to apt.conf - APT_CONF=${D}${sysconfdir}/apt/apt.conf - echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} - - # Remove /var/log/apt. /var/log is normally a link to /var/volatile/log - # and /var/volatile is a tmpfs mount. So anything created in /var/log - # will not be available when the tmpfs is mounted. - rm -rf ${D}${localstatedir}/log -} - -do_install:append() { - # Avoid non-reproducible -src package - sed -i -e "s,${B}/include/,,g" ${B}/apt-pkg/tagfile-keys.cc -} diff --git a/meta/recipes-devtools/apt/apt_2.6.0.bb b/meta/recipes-devtools/apt/apt_2.6.0.bb new file mode 100644 index 0000000000..b872be8371 --- /dev/null +++ b/meta/recipes-devtools/apt/apt_2.6.0.bb @@ -0,0 +1,142 @@ +SUMMARY = "Advanced front-end for dpkg" +DESCRIPTION = "APT is the Advanced Package Tool, an advanced interface to the Debian packaging system which provides the apt-get program." +HOMEPAGE = "https://packages.debian.org/sid/apt" +LICENSE = "GPL-2.0-or-later" +SECTION = "base" + +# Triehash script taken from https://github.com/julian-klode/triehash +SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ + file://triehash \ + file://0001-Disable-documentation-directory-altogether.patch \ + file://0001-Fix-musl-build.patch \ + file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \ + file://0001-cmake-Do-not-build-po-files.patch \ + file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \ + file://0001-aptwebserver.cc-Include-array.patch \ + file://0001-Remove-using-std-binary_function.patch \ + " + +SRC_URI:append:class-native = " \ + file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ + file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ + " + +SRC_URI:append:class-nativesdk = " \ + file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ + file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ + " + +SRC_URI[sha256sum] = "43467d1ca7de6c0955fd991925433e22fa66230870e5f66c4498675d01776c2a" +LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +# the package is taken from snapshots.debian.org; that source is static and goes stale +# so we check the latest upstream from a directory that does get updated +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" +# apt seems to follow a peculiar version policy, where every *other* even version +# is considered stable, e.g. 1.0, 1.4, 1.8, 2.2, 2.6, etc. As there is no way +# to express 'divisible by 4 plus 2' in regex (that I know of), let's hardcode a few. +UPSTREAM_CHECK_REGEX = "[^\d\.](?P((2\.2)|(2\.6)|(3\.0)|(3\.4)|(3\.8)|(4\.2))(\.\d+)+)\.tar" + +inherit cmake perlnative bash-completion useradd + +# User is added to allow apt to drop privs, will runtime warn without +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --home /nonexistent --no-create-home _apt" + +BBCLASSEXTEND = "native nativesdk" + +DEPENDS += "db gnutls lz4 zlib bzip2 xz libgcrypt xxhash" + +EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ + -DDPKG_DATADIR=${datadir}/dpkg \ + -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \ + -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=True \ + -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \ + -DWITH_TESTS=False \ +" + +do_configure:prepend() { + echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake +} + +# Unfortunately apt hardcodes this all over the place +FILES:${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" +RDEPENDS:${PN} += "bash perl dpkg" + +customize_apt_conf_sample() { + cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF +Dir "${STAGING_DIR_NATIVE}/" +{ + State "var/lib/apt/" + { + Lists "#APTCONF#/lists/"; + status "#ROOTFS#/var/lib/dpkg/status"; + }; + Cache "var/cache/apt/" + { + Archives "archives/"; + pkgcache ""; + srcpkgcache ""; + }; + Bin "${STAGING_BINDIR_NATIVE}/" + { + methods "${STAGING_LIBDIR}/apt/methods/"; + gzip "/bin/gzip"; + dpkg "dpkg"; + dpkg-source "dpkg-source"; + dpkg-buildpackage "dpkg-buildpackage"; + apt-get "apt-get"; + apt-cache "apt-cache"; + }; + Etc "#APTCONF#" + { + Preferences "preferences"; + }; + Log "var/log/apt"; +}; + +APT +{ + Install-Recommends "true"; + Immediate-Configure "false"; + Architecture "i586"; + Get + { + Assume-Yes "true"; + }; +}; + +Acquire +{ + AllowInsecureRepositories "true"; +}; + +DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"}; +DPkg::Path ""; +EOF +} + +do_install:append:class-native() { + customize_apt_conf_sample +} + +do_install:append:class-nativesdk() { + customize_apt_conf_sample + rm -rf ${D}${localstatedir}/log +} + +do_install:append:class-target() { + # Write the correct apt-architecture to apt.conf + APT_CONF=${D}${sysconfdir}/apt/apt.conf + echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} + + # Remove /var/log/apt. /var/log is normally a link to /var/volatile/log + # and /var/volatile is a tmpfs mount. So anything created in /var/log + # will not be available when the tmpfs is mounted. + rm -rf ${D}${localstatedir}/log +} + +do_install:append() { + # Avoid non-reproducible -src package + sed -i -e "s,${B}/include/,,g" ${B}/apt-pkg/tagfile-keys.cc +} -- cgit 1.2.3-korg