diff options
| author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2023-05-30 23:13:01 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-01 08:05:11 +0100 |
| commit | 47bc65bf556e099c5130a5fe25b69834022cfd37 (patch) | |
| tree | 56b0ddcda2de2e6731489823fd7112606967eb3d /meta/recipes-devtools/apt/apt_2.6.1.bb | |
| parent | 66ed174ccdf7a89cb998f503cc6b631e2d1adcc0 (diff) | |
| download | poky-47bc65bf556e099c5130a5fe25b69834022cfd37.tar.gz | |
apt: Upgrade to v2.6.1
Changes:
Update sha256sum for new version
(From OE-Core rev: 5eb6c747f8b25cd16125307a51470463c02dffd3)
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt/apt_2.6.1.bb')
| -rw-r--r-- | meta/recipes-devtools/apt/apt_2.6.1.bb | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt_2.6.1.bb b/meta/recipes-devtools/apt/apt_2.6.1.bb new file mode 100644 index 0000000000..fb4ff899d2 --- /dev/null +++ b/meta/recipes-devtools/apt/apt_2.6.1.bb | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | SUMMARY = "Advanced front-end for dpkg" | ||
| 2 | DESCRIPTION = "APT is the Advanced Package Tool, an advanced interface to the Debian packaging system which provides the apt-get program." | ||
| 3 | HOMEPAGE = "https://packages.debian.org/sid/apt" | ||
| 4 | LICENSE = "GPL-2.0-or-later" | ||
| 5 | SECTION = "base" | ||
| 6 | |||
| 7 | # Triehash script taken from https://github.com/julian-klode/triehash | ||
| 8 | SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ | ||
| 9 | file://triehash \ | ||
| 10 | file://0001-Disable-documentation-directory-altogether.patch \ | ||
| 11 | file://0001-Fix-musl-build.patch \ | ||
| 12 | file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \ | ||
| 13 | file://0001-cmake-Do-not-build-po-files.patch \ | ||
| 14 | file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \ | ||
| 15 | file://0001-aptwebserver.cc-Include-array.patch \ | ||
| 16 | file://0001-Remove-using-std-binary_function.patch \ | ||
| 17 | " | ||
| 18 | |||
| 19 | SRC_URI:append:class-native = " \ | ||
| 20 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ | ||
| 21 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | ||
| 22 | " | ||
| 23 | |||
| 24 | SRC_URI:append:class-nativesdk = " \ | ||
| 25 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ | ||
| 26 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | ||
| 27 | " | ||
| 28 | |||
| 29 | SRC_URI[sha256sum] = "86b888c901fa2e78f1bf52a2aaa2f400ff82a472b94ff0ac6631939ee68fa6fd" | ||
| 30 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
| 31 | |||
| 32 | # the package is taken from snapshots.debian.org; that source is static and goes stale | ||
| 33 | # so we check the latest upstream from a directory that does get updated | ||
| 34 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" | ||
| 35 | # apt seems to follow a peculiar version policy, where every *other* even version | ||
| 36 | # is considered stable, e.g. 1.0, 1.4, 1.8, 2.2, 2.6, etc. As there is no way | ||
| 37 | # to express 'divisible by 4 plus 2' in regex (that I know of), let's hardcode a few. | ||
| 38 | UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>((2\.2)|(2\.6)|(3\.0)|(3\.4)|(3\.8)|(4\.2))(\.\d+)+)\.tar" | ||
| 39 | |||
| 40 | inherit cmake perlnative bash-completion useradd | ||
| 41 | |||
| 42 | # User is added to allow apt to drop privs, will runtime warn without | ||
| 43 | USERADD_PACKAGES = "${PN}" | ||
| 44 | USERADD_PARAM:${PN} = "--system --home /nonexistent --no-create-home _apt" | ||
| 45 | |||
| 46 | BBCLASSEXTEND = "native nativesdk" | ||
| 47 | |||
| 48 | DEPENDS += "db gnutls lz4 zlib bzip2 xz libgcrypt xxhash" | ||
| 49 | |||
| 50 | EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ | ||
| 51 | -DDPKG_DATADIR=${datadir}/dpkg \ | ||
| 52 | -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \ | ||
| 53 | -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=True \ | ||
| 54 | -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \ | ||
| 55 | -DWITH_TESTS=False \ | ||
| 56 | " | ||
| 57 | |||
| 58 | do_configure:prepend() { | ||
| 59 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake | ||
| 60 | } | ||
| 61 | |||
| 62 | # Unfortunately apt hardcodes this all over the place | ||
| 63 | FILES:${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" | ||
| 64 | RDEPENDS:${PN} += "bash perl dpkg" | ||
| 65 | |||
| 66 | customize_apt_conf_sample() { | ||
| 67 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF | ||
| 68 | Dir "${STAGING_DIR_NATIVE}/" | ||
| 69 | { | ||
| 70 | State "var/lib/apt/" | ||
| 71 | { | ||
| 72 | Lists "#APTCONF#/lists/"; | ||
| 73 | status "#ROOTFS#/var/lib/dpkg/status"; | ||
| 74 | }; | ||
| 75 | Cache "var/cache/apt/" | ||
| 76 | { | ||
| 77 | Archives "archives/"; | ||
| 78 | pkgcache ""; | ||
| 79 | srcpkgcache ""; | ||
| 80 | }; | ||
| 81 | Bin "${STAGING_BINDIR_NATIVE}/" | ||
| 82 | { | ||
| 83 | methods "${STAGING_LIBDIR}/apt/methods/"; | ||
| 84 | gzip "/bin/gzip"; | ||
| 85 | dpkg "dpkg"; | ||
| 86 | dpkg-source "dpkg-source"; | ||
| 87 | dpkg-buildpackage "dpkg-buildpackage"; | ||
| 88 | apt-get "apt-get"; | ||
| 89 | apt-cache "apt-cache"; | ||
| 90 | }; | ||
| 91 | Etc "#APTCONF#" | ||
| 92 | { | ||
| 93 | Preferences "preferences"; | ||
| 94 | }; | ||
| 95 | Log "var/log/apt"; | ||
| 96 | }; | ||
| 97 | |||
| 98 | APT | ||
| 99 | { | ||
| 100 | Install-Recommends "true"; | ||
| 101 | Immediate-Configure "false"; | ||
| 102 | Architecture "i586"; | ||
| 103 | Get | ||
| 104 | { | ||
| 105 | Assume-Yes "true"; | ||
| 106 | }; | ||
| 107 | }; | ||
| 108 | |||
| 109 | Acquire | ||
| 110 | { | ||
| 111 | AllowInsecureRepositories "true"; | ||
| 112 | }; | ||
| 113 | |||
| 114 | DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"}; | ||
| 115 | DPkg::Path ""; | ||
| 116 | EOF | ||
| 117 | } | ||
| 118 | |||
| 119 | do_install:append:class-native() { | ||
| 120 | customize_apt_conf_sample | ||
| 121 | } | ||
| 122 | |||
| 123 | do_install:append:class-nativesdk() { | ||
| 124 | customize_apt_conf_sample | ||
| 125 | rm -rf ${D}${localstatedir}/log | ||
| 126 | } | ||
| 127 | |||
| 128 | do_install:append:class-target() { | ||
| 129 | # Write the correct apt-architecture to apt.conf | ||
| 130 | APT_CONF=${D}${sysconfdir}/apt/apt.conf | ||
| 131 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} | ||
| 132 | |||
| 133 | # Remove /var/log/apt. /var/log is normally a link to /var/volatile/log | ||
| 134 | # and /var/volatile is a tmpfs mount. So anything created in /var/log | ||
| 135 | # will not be available when the tmpfs is mounted. | ||
| 136 | rm -rf ${D}${localstatedir}/log | ||
| 137 | } | ||
| 138 | |||
| 139 | do_install:append() { | ||
| 140 | # Avoid non-reproducible -src package | ||
| 141 | sed -i -e "s,${B}/include/,,g" ${B}/apt-pkg/tagfile-keys.cc | ||
| 142 | } | ||
