diff options
author | hongxu <hongxu.jia@windriver.com> | 2021-01-15 17:45:35 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-16 22:39:36 +0000 |
commit | 92a68c5ea46d879d78dfd7e2b70a3ce90b66d0df (patch) | |
tree | 366435b410d5b0c5f661c5bb0557ff7ecb58d33d /meta | |
parent | fef6ec93b50551b3610a3087cdd6a90564cc51a4 (diff) | |
download | poky-92a68c5ea46d879d78dfd7e2b70a3ce90b66d0df.tar.gz |
apt: add nativesdk support
1. Add nativesdk support
- Apply the same patches of native
- Generate the same apt.conf.sample of native
2. Create user '_apt' to fix apt runtime warning
[snip]
$ apt update
...
W: No sandbox user '_apt' on the system, can not drop privileges
[snip]
RP: Add comment about need to user
RP: Add user to selftest static-passwd
(From OE-Core rev: be36b825ada573b2a7df9884eaab78664928594a)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/apt/apt_1.8.2.1.bb | 25 |
1 files changed, 22 insertions, 3 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 index de0e150a2e..9fc6e54a29 100644 --- a/meta/recipes-devtools/apt/apt_1.8.2.1.bb +++ b/meta/recipes-devtools/apt/apt_1.8.2.1.bb | |||
@@ -17,6 +17,12 @@ SRC_URI_append_class-native = " \ | |||
17 | file://0001-Do-not-configure-packages-on-installation.patch \ | 17 | file://0001-Do-not-configure-packages-on-installation.patch \ |
18 | " | 18 | " |
19 | 19 | ||
20 | SRC_URI_append_class-nativesdk = " \ | ||
21 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ | ||
22 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | ||
23 | file://0001-Do-not-configure-packages-on-installation.patch \ | ||
24 | " | ||
25 | |||
20 | SRC_URI[sha256sum] = "6d447f2e9437ec24e78350b63bb0592bee1f050811d51990b0c783183b0983f8" | 26 | SRC_URI[sha256sum] = "6d447f2e9437ec24e78350b63bb0592bee1f050811d51990b0c783183b0983f8" |
21 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 27 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
22 | 28 | ||
@@ -24,9 +30,13 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
24 | # so we check the latest upstream from a directory that does get updated | 30 | # so we check the latest upstream from a directory that does get updated |
25 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" | 31 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" |
26 | 32 | ||
27 | inherit cmake perlnative bash-completion upstream-version-is-even | 33 | inherit cmake perlnative bash-completion upstream-version-is-even useradd |
34 | |||
35 | # User is added to allow apt to drop privs, will runtime warn without | ||
36 | USERADD_PACKAGES = "${PN}" | ||
37 | USERADD_PARAM_${PN} = "--system --home /nonexistent --no-create-home _apt" | ||
28 | 38 | ||
29 | BBCLASSEXTEND = "native" | 39 | BBCLASSEXTEND = "native nativesdk" |
30 | 40 | ||
31 | DEPENDS += "virtual/libiconv virtual/libintl db gnutls lz4 zlib bzip2 xz" | 41 | DEPENDS += "virtual/libiconv virtual/libintl db gnutls lz4 zlib bzip2 xz" |
32 | 42 | ||
@@ -41,7 +51,7 @@ do_configure_prepend () { | |||
41 | FILES_${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" | 51 | FILES_${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" |
42 | RDEPENDS_${PN} += "bash perl dpkg" | 52 | RDEPENDS_${PN} += "bash perl dpkg" |
43 | 53 | ||
44 | do_install_append_class-native() { | 54 | customize_apt_conf_sample() { |
45 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF | 55 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF |
46 | Dir "${STAGING_DIR_NATIVE}/" | 56 | Dir "${STAGING_DIR_NATIVE}/" |
47 | { | 57 | { |
@@ -94,6 +104,15 @@ DPkg::Path ""; | |||
94 | EOF | 104 | EOF |
95 | } | 105 | } |
96 | 106 | ||
107 | do_install_append_class-native() { | ||
108 | customize_apt_conf_sample | ||
109 | } | ||
110 | |||
111 | do_install_append_class-nativesdk() { | ||
112 | customize_apt_conf_sample | ||
113 | } | ||
114 | |||
115 | |||
97 | do_install_append_class-target() { | 116 | do_install_append_class-target() { |
98 | #Write the correct apt-architecture to apt.conf | 117 | #Write the correct apt-architecture to apt.conf |
99 | APT_CONF=${D}/etc/apt/apt.conf | 118 | APT_CONF=${D}/etc/apt/apt.conf |