diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-05-31 17:52:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-04 13:27:31 +0100 |
commit | cae9a6c9c8cc1991b8e68b0816fc2db22e3ae129 (patch) | |
tree | 64e897bae1d8e17be8a8cbc9cd369e6e813245d3 /meta/recipes-devtools/apt/apt_1.8.2.1.bb | |
parent | fbb498abd98128a196d059175e3fec99eecee7dc (diff) | |
download | poky-cae9a6c9c8cc1991b8e68b0816fc2db22e3ae129.tar.gz |
apt: update to 1.8.2.1
I took the opportunity to rewrite the recipe from scratch; there was just too much baggage in it.
(From OE-Core rev: f058272de9cba188d96940c8c921cf31727fe4d1)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt/apt_1.8.2.1.bb')
-rw-r--r-- | meta/recipes-devtools/apt/apt_1.8.2.1.bb | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt_1.8.2.1.bb b/meta/recipes-devtools/apt/apt_1.8.2.1.bb new file mode 100644 index 0000000000..bd1f4f39c3 --- /dev/null +++ b/meta/recipes-devtools/apt/apt_1.8.2.1.bb | |||
@@ -0,0 +1,106 @@ | |||
1 | SUMMARY = "Advanced front-end for dpkg" | ||
2 | LICENSE = "GPLv2.0+" | ||
3 | SECTION = "base" | ||
4 | |||
5 | # Triehash script taken from https://github.com/julian-klode/triehash | ||
6 | SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ | ||
7 | file://triehash \ | ||
8 | file://0001-Disable-documentation-directory-altogether.patch \ | ||
9 | file://0001-Fix-musl-build.patch \ | ||
10 | file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI_append_class-native = " \ | ||
14 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ | ||
15 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | ||
16 | file://0001-Do-not-configure-packages-on-installation.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[sha256sum] = "6d447f2e9437ec24e78350b63bb0592bee1f050811d51990b0c783183b0983f8" | ||
20 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
21 | |||
22 | # the package is taken from snapshots.debian.org; that source is static and goes stale | ||
23 | # so we check the latest upstream from a directory that does get updated | ||
24 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" | ||
25 | |||
26 | inherit cmake perlnative bash-completion upstream-version-is-even | ||
27 | |||
28 | BBCLASSEXTEND = "native" | ||
29 | |||
30 | DEPENDS += "virtual/libiconv virtual/libintl db gnutls lz4 zlib bzip2 xz" | ||
31 | |||
32 | EXTRA_OECMAKE_append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False -DUSE_NLS=False -DDPKG_DATADIR=${datadir}/dpkg -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash" | ||
33 | |||
34 | do_configure_prepend () { | ||
35 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake | ||
36 | |||
37 | } | ||
38 | |||
39 | # Unfortunately apt hardcodes this all over the place | ||
40 | FILES_${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" | ||
41 | RDEPENDS_${PN} += "bash perl dpkg" | ||
42 | |||
43 | do_install_append_class-native() { | ||
44 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF | ||
45 | Dir "${STAGING_DIR_NATIVE}/" | ||
46 | { | ||
47 | State "var/lib/apt/" | ||
48 | { | ||
49 | Lists "#APTCONF#/lists/"; | ||
50 | status "#ROOTFS#/var/lib/dpkg/status"; | ||
51 | }; | ||
52 | Cache "var/cache/apt/" | ||
53 | { | ||
54 | Archives "archives/"; | ||
55 | pkgcache ""; | ||
56 | srcpkgcache ""; | ||
57 | }; | ||
58 | Bin "${STAGING_BINDIR_NATIVE}/" | ||
59 | { | ||
60 | methods "${STAGING_LIBDIR}/apt/methods/"; | ||
61 | gzip "/bin/gzip"; | ||
62 | dpkg "dpkg"; | ||
63 | dpkg-source "dpkg-source"; | ||
64 | dpkg-buildpackage "dpkg-buildpackage"; | ||
65 | apt-get "apt-get"; | ||
66 | apt-cache "apt-cache"; | ||
67 | }; | ||
68 | Etc "#APTCONF#" | ||
69 | { | ||
70 | Preferences "preferences"; | ||
71 | }; | ||
72 | Log "var/log/apt"; | ||
73 | }; | ||
74 | |||
75 | APT | ||
76 | { | ||
77 | Install-Recommends "true"; | ||
78 | Immediate-Configure "false"; | ||
79 | Architecture "i586"; | ||
80 | Get | ||
81 | { | ||
82 | Assume-Yes "true"; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | Acquire | ||
87 | { | ||
88 | AllowInsecureRepositories "true"; | ||
89 | }; | ||
90 | |||
91 | DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"}; | ||
92 | DPkg::Path ""; | ||
93 | EOF | ||
94 | } | ||
95 | |||
96 | do_install_append_class-target() { | ||
97 | #Write the correct apt-architecture to apt.conf | ||
98 | APT_CONF=${D}/etc/apt/apt.conf | ||
99 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} | ||
100 | } | ||
101 | |||
102 | # Avoid non-reproducible -src package | ||
103 | do_install_append () { | ||
104 | sed -i -e "s,${B},,g" \ | ||
105 | ${B}/apt-pkg/tagfile-keys.cc | ||
106 | } | ||