* [PATCH 8/8] linux-yocto/4.x: CVE-2016-8655
From: Bruce Ashfield @ 2016-12-08 17:58 UTC (permalink / raw)
To: richard.purdie; +Cc: openembedded-core
In-Reply-To: <cover.1481216659.git.bruce.ashfield@windriver.com>
Backporting upstream commit 84ac726023 [packet: fix race condition in
packet_set_ring] to address CVE-2016-8655
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb | 2 +-
meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb | 2 +-
meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb | 2 +-
meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb | 2 +-
meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb | 2 +-
meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb | 2 +-
meta/recipes-kernel/linux/linux-yocto_4.1.bb | 16 ++++++++--------
meta/recipes-kernel/linux/linux-yocto_4.4.bb | 16 ++++++++--------
meta/recipes-kernel/linux/linux-yocto_4.8.bb | 16 ++++++++--------
9 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
index 529fa205f199..de3582a7aa05 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
@@ -11,7 +11,7 @@ python () {
raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "47e987ba389beac0c7983dd37f215807eee86881"
+SRCREV_machine ?= "f3ffbf4880a5103504a4e11c9427b0bdbf222939"
SRCREV_meta ?= "44719fa8f73fd7c444044ad3c04f5fc66f57b993"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
index 45c59b94afd5..d6e9626c00eb 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
@@ -11,7 +11,7 @@ python () {
raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "2abc21f69ad9c72b296a85cd738254b5483da229"
+SRCREV_machine ?= "61d7bf47fe27b7dfd9a73b0a6de2d78a29af8b74"
SRCREV_meta ?= "b846fc6436aa5d4c747d620e83dfda969854d10c"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
index c939bbabd112..8ed9d8f3743f 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
@@ -11,7 +11,7 @@ python () {
raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "aa9ab71e9d9539c7f81282a47e87dea79c2e0f4e"
+SRCREV_machine ?= "b2d665b3453891cd066c8a172af0b7785c365f57"
SRCREV_meta ?= "b22e47739683444916dc64548df1dbf6856500a5"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
index 28ddfa993635..80be144e4ee4 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
@@ -9,7 +9,7 @@ LINUX_VERSION ?= "4.1.36"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "f75d58721859cd2ce5382bcdcae35479a6ce9f21"
+SRCREV_machine ?= "fec49247816d7045aa8abe0047bcd4737af9a853"
SRCREV_meta ?= "44719fa8f73fd7c444044ad3c04f5fc66f57b993"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
index 28c3dfad8cc7..dfd947cf75ce 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
@@ -9,7 +9,7 @@ LINUX_VERSION ?= "4.4.36"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "9cc72ea6194abae764a2db8f6a32cde60e739d7c"
+SRCREV_machine ?= "35482df5d5ba0807eb8a7c40b554bd657e3f9987"
SRCREV_meta ?= "b846fc6436aa5d4c747d620e83dfda969854d10c"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
index e1de91461f43..43dc34bd25a4 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
@@ -9,7 +9,7 @@ LINUX_VERSION ?= "4.8.12"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "c12f4b364b6638843f5b9049c7fd467503bf30a8"
+SRCREV_machine ?= "e274a507b23c23bf0dd6502d0c38fae731c11511"
SRCREV_meta ?= "b22e47739683444916dc64548df1dbf6856500a5"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.1.bb b/meta/recipes-kernel/linux/linux-yocto_4.1.bb
index 70ff99de1dd0..b55487782776 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.1.bb
@@ -11,14 +11,14 @@ KBRANCH_qemux86 ?= "standard/base"
KBRANCH_qemux86-64 ?= "standard/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "6f0ca13105ff444e5adcea39d68c5f7707b1d23b"
-SRCREV_machine_qemuarm64 ?= "f75d58721859cd2ce5382bcdcae35479a6ce9f21"
-SRCREV_machine_qemumips ?= "d5bd5d3069bfccfb76c420f27e1e6fd94aaa3dcc"
-SRCREV_machine_qemuppc ?= "1006b2e79cf808a2e8a74a1b0325dec9b4d0873e"
-SRCREV_machine_qemux86 ?= "f75d58721859cd2ce5382bcdcae35479a6ce9f21"
-SRCREV_machine_qemux86-64 ?= "f75d58721859cd2ce5382bcdcae35479a6ce9f21"
-SRCREV_machine_qemumips64 ?= "985d7f27f0ad497a0072320fbbf05626e27c741a"
-SRCREV_machine ?= "f75d58721859cd2ce5382bcdcae35479a6ce9f21"
+SRCREV_machine_qemuarm ?= "c8ab8bf2bdff3b355710065725f4e272bf0a5a5d"
+SRCREV_machine_qemuarm64 ?= "fec49247816d7045aa8abe0047bcd4737af9a853"
+SRCREV_machine_qemumips ?= "475a0182d9e940351a3fecaecb31e55effad45ad"
+SRCREV_machine_qemuppc ?= "88a3e5a3a8f693d25b09b64cd2be5df783933f74"
+SRCREV_machine_qemux86 ?= "fec49247816d7045aa8abe0047bcd4737af9a853"
+SRCREV_machine_qemux86-64 ?= "fec49247816d7045aa8abe0047bcd4737af9a853"
+SRCREV_machine_qemumips64 ?= "9ffd7155a07e7cfed2229b3a78d2278f3b56f13d"
+SRCREV_machine ?= "fec49247816d7045aa8abe0047bcd4737af9a853"
SRCREV_meta ?= "44719fa8f73fd7c444044ad3c04f5fc66f57b993"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;name=machine;branch=${KBRANCH}; \
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/meta/recipes-kernel/linux/linux-yocto_4.4.bb
index 2246555a3ff8..7d734ac423dc 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.4.bb
@@ -11,14 +11,14 @@ KBRANCH_qemux86 ?= "standard/base"
KBRANCH_qemux86-64 ?= "standard/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "0166111980b931967bf3449d3d040aac6ff523a8"
-SRCREV_machine_qemuarm64 ?= "9cc72ea6194abae764a2db8f6a32cde60e739d7c"
-SRCREV_machine_qemumips ?= "90bf4bfeee3d0ca1cf0077dc1e0045cd9237e392"
-SRCREV_machine_qemuppc ?= "9cc72ea6194abae764a2db8f6a32cde60e739d7c"
-SRCREV_machine_qemux86 ?= "9cc72ea6194abae764a2db8f6a32cde60e739d7c"
-SRCREV_machine_qemux86-64 ?= "9cc72ea6194abae764a2db8f6a32cde60e739d7c"
-SRCREV_machine_qemumips64 ?= "fd20390d53c24f1ef0293b2c26b8e883e87e91f3"
-SRCREV_machine ?= "9cc72ea6194abae764a2db8f6a32cde60e739d7c"
+SRCREV_machine_qemuarm ?= "2859bb3c9e1bb307d9e4e03032fd8a529137552f"
+SRCREV_machine_qemuarm64 ?= "35482df5d5ba0807eb8a7c40b554bd657e3f9987"
+SRCREV_machine_qemumips ?= "3c4c23020da8a0596a64c8784c6d3a2dfa1ea324"
+SRCREV_machine_qemuppc ?= "35482df5d5ba0807eb8a7c40b554bd657e3f9987"
+SRCREV_machine_qemux86 ?= "35482df5d5ba0807eb8a7c40b554bd657e3f9987"
+SRCREV_machine_qemux86-64 ?= "35482df5d5ba0807eb8a7c40b554bd657e3f9987"
+SRCREV_machine_qemumips64 ?= "5d05923ecc402c127b92543ee44b890de5c53a7e"
+SRCREV_machine ?= "35482df5d5ba0807eb8a7c40b554bd657e3f9987"
SRCREV_meta ?= "b846fc6436aa5d4c747d620e83dfda969854d10c"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.8.bb b/meta/recipes-kernel/linux/linux-yocto_4.8.bb
index 4be42679551a..090358873b46 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.8.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.8.bb
@@ -11,14 +11,14 @@ KBRANCH_qemux86 ?= "standard/base"
KBRANCH_qemux86-64 ?= "standard/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "9e3e856bc06ddaacc5f4075603630fcca76810f7"
-SRCREV_machine_qemuarm64 ?= "008b4cdf62307da4e07082fd8782d70ba07500cb"
-SRCREV_machine_qemumips ?= "c86ac5b3228b43304d8b2f1d49a0e4bd66207342"
-SRCREV_machine_qemuppc ?= "5a245217d5271d1961df408b9a723a4eb188e0bf"
-SRCREV_machine_qemux86 ?= "45f25516edd8636f1fec250f6e3020408cd30be9"
-SRCREV_machine_qemux86-64 ?= "45f25516edd8636f1fec250f6e3020408cd30be9"
-SRCREV_machine_qemumips64 ?= "7bfa2a19b1aa9f1389f8276d6a7669472517b18a"
-SRCREV_machine ?= "45f25516edd8636f1fec250f6e3020408cd30be9"
+SRCREV_machine_qemuarm ?= "2bb25d9e29ff91d3266e6abe12c6c1a6b6508e98"
+SRCREV_machine_qemuarm64 ?= "4b1b4bfb6cf27609b37eb44cd7fee700cd402123"
+SRCREV_machine_qemumips ?= "d116a8bdd1d90fe3dde092f119a2dde1674b02c4"
+SRCREV_machine_qemuppc ?= "ef0e5cfd16edcb52ec2e3d5abdcb97d8881b2c3d"
+SRCREV_machine_qemux86 ?= "021b4aef55b44597587a1ce5879be642b3dca155"
+SRCREV_machine_qemux86-64 ?= "021b4aef55b44597587a1ce5879be642b3dca155"
+SRCREV_machine_qemumips64 ?= "1b20066b88c3abdde1f6c449b6562a516b4cce6d"
+SRCREV_machine ?= "021b4aef55b44597587a1ce5879be642b3dca155"
SRCREV_meta ?= "b22e47739683444916dc64548df1dbf6856500a5"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;name=machine;branch=${KBRANCH}; \
--
2.5.0
^ permalink raw reply related
* [PATCH] glibc: Enable backtrace from abort on ARM
From: Mark Hatle @ 2016-12-08 19:03 UTC (permalink / raw)
To: openembedded-core
From: Yuanjie Huang <yuanjie.huang@windriver.com>
ARM stack frames for abort and raise were limited to the the actual
abort and raise call, such as:
Obtained 4 stack frames.
./test-app(print_trace+0x1c) [0x10a08]
./test-app() [0x10b3c]
/lib/libc.so.6(__default_sa_restorer+0) [0x4adae1e0]
/lib/libc.so.6(gsignal+0xa0) [0x4adacf74]
This is not terribly useful when trying to figure out what function
may have called called the abort, especially when using pthreads.
After the change the trace would now look like:
Obtained 8 stack frames.
./test-app(print_trace+0x1c) [0x10a08]
./test-app() [0x10b3c]
/lib/libc.so.6(__default_sa_restorer+0) [0x4befe1e0]
/lib/libc.so.6(gsignal+0xa0) [0x4befcf74]
/lib/libc.so.6(abort+0x134) [0x4befe358]
./test-app(dummy_function+0x50) [0x10adc]
./test-app(main+0xd4) [0x10c24]
/lib/libc.so.6(__libc_start_main+0x114) [0x4bee7a58]
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/recipes-core/glibc/glibc.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index e85c7044a0..358e69be67 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -78,3 +78,9 @@ do_configure_prepend() {
}
GLIBC_ADDONS ?= "nptl,libidn"
+
+# Enable backtrace from abort()
+do_configure_append_arm () {
+ echo "CFLAGS-abort.c = -funwind-tables" >> ${B}/configparms
+ echo "CFLAGS-raise.c = -funwind-tables" >> ${B}/configparms
+}
--
2.11.0.rc1
^ permalink raw reply related
* Re: [morty] [PATCH] glibc: Enable backtrace from abort on ARM
From: Mark Hatle @ 2016-12-08 19:12 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <20161208190327.221469-1-mark.hatle@windriver.com>
Forgot to mention, also applicable to Morty.
--Mark
On 12/8/16 1:03 PM, Mark Hatle wrote:
> From: Yuanjie Huang <yuanjie.huang@windriver.com>
>
> ARM stack frames for abort and raise were limited to the the actual
> abort and raise call, such as:
>
> Obtained 4 stack frames.
> ./test-app(print_trace+0x1c) [0x10a08]
> ./test-app() [0x10b3c]
> /lib/libc.so.6(__default_sa_restorer+0) [0x4adae1e0]
> /lib/libc.so.6(gsignal+0xa0) [0x4adacf74]
>
> This is not terribly useful when trying to figure out what function
> may have called called the abort, especially when using pthreads.
>
> After the change the trace would now look like:
>
> Obtained 8 stack frames.
> ./test-app(print_trace+0x1c) [0x10a08]
> ./test-app() [0x10b3c]
> /lib/libc.so.6(__default_sa_restorer+0) [0x4befe1e0]
> /lib/libc.so.6(gsignal+0xa0) [0x4befcf74]
> /lib/libc.so.6(abort+0x134) [0x4befe358]
> ./test-app(dummy_function+0x50) [0x10adc]
> ./test-app(main+0xd4) [0x10c24]
> /lib/libc.so.6(__libc_start_main+0x114) [0x4bee7a58]
>
> Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
> meta/recipes-core/glibc/glibc.inc | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
> index e85c7044a0..358e69be67 100644
> --- a/meta/recipes-core/glibc/glibc.inc
> +++ b/meta/recipes-core/glibc/glibc.inc
> @@ -78,3 +78,9 @@ do_configure_prepend() {
> }
>
> GLIBC_ADDONS ?= "nptl,libidn"
> +
> +# Enable backtrace from abort()
> +do_configure_append_arm () {
> + echo "CFLAGS-abort.c = -funwind-tables" >> ${B}/configparms
> + echo "CFLAGS-raise.c = -funwind-tables" >> ${B}/configparms
> +}
>
^ permalink raw reply
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong
From: Andre McCurdy @ 2016-12-08 19:16 UTC (permalink / raw)
To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <584991B7.9050603@linux.intel.com>
>>> On 12/01/2016 04:39 PM, Khem Raj wrote:
>>>> On Thu, Dec 1, 2016 at 8:34 AM, Aníbal Limón
>>>> <anibal.limon@linux.intel.com> wrote:
>>>>> Some distributions (like opensuse421) supported by the project
>>>>> comes with older gcc releases, -fstack-protector=strong is supported
>>>>> by GCC>=4.9.
>>>>>
>>>>> This causes a build failure when install perl-native from a sstate that
>>>>> comes from a machine supporting -fstack-protector=strong [1].
>>>>>
>>>>> So disable usage of this flag in perl-native builds, this patch could
>>>>> be removed when all supported distros comes with GCC>=4.9.
>>>>
>>>> Instead of disabling it. Can it be made detectable during configure.
>>>
>>> The issue here is that comes from SSTATE mirror so the configure step
>>> isn't executed again when a other machine without
>>> -fstack-protector=strong download the sstate artifact was generate in
>>> other machine with -fstack-protector=strong support. This is only for
>>> native builds for target builds in enabled.
>>>
>>> We have similar patches for example in rpm,
>>>
>>> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
>>
>> yeah I see, thanks, I guess we need to bring it down to lowest common
>> denominator I guess.
>> maybe we should start thinking about gcc-native
>>
Is it correct that native sstate from a host with gcc < 4.9 should be
reused by a host with gcc >= 4.9 ?
Doesn't the change in NATIVELSBSTRING prevent that from happening?
^ permalink raw reply
* Re: [PATCH 02/33] dpkg: update-alternatives-dpkg should conflict with other providers
From: Andreas Oberritter @ 2016-12-08 19:22 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LbxmC2BBj0V2BXWo1UqJmgALSdSK=GmCh4dZeMyxFp3gg@mail.gmail.com>
On 08.12.2016 17:16, Burton, Ross wrote:
> With PACKAGE_CLASSES="package_rpm package_deb" this happens:
>
> ERROR: dpkg-native-1.18.7-r0 do_populate_sysroot: The recipe dpkg-native
> is trying to install files into a shared area when those files already
> exist. Those files and their manifest location are:
>
> /data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/bin/update-alternatives
> Matched in b'manifest-x86_64-opkg-utils-native.populate_sysroot'
>
> Whilst I agree that building multiple package types at the same time is
> a bit weird, it's always worked in the past.
Yes, I used this feature myself some time ago and don't want to be the
one breaking it. ;-)
Does this happen with the branch I pushed yesterday? Since commit
472899be2a97bf6c5741f6b414433e13cfea1c7b it shouldn't happen unless you
either explicitly enable update-alternatives in dpkg's PACKAGECONFIG, or
set PREFERRED_PROVIDER_virtual/update-alternatives-native to dpkg-native.
Regards,
Andreas
^ permalink raw reply
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong
From: Burton, Ross @ 2016-12-08 20:35 UTC (permalink / raw)
To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAJ86T=We5bfDF6EpGs_sPph16O=Niz+ei5vADWbMTXzsTq-C8g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
On 8 December 2016 at 19:16, Andre McCurdy <armccurdy@gmail.com> wrote:
> Is it correct that native sstate from a host with gcc < 4.9 should be
> reused by a host with gcc >= 4.9 ?
>
> Doesn't the change in NATIVELSBSTRING prevent that from happening?
>
Yes, we recently landed a change so that uninative is versioned by host
GCC. Presumably that solves this problem in a different way?
Ross
[-- Attachment #2: Type: text/html, Size: 811 bytes --]
^ permalink raw reply
* [PATCH] archiver: don't change directory when generating tarball
From: Ross Burton @ 2016-12-08 21:32 UTC (permalink / raw)
To: openembedded-core
There's no need to chdir() as tarfile.add() can be told what name to use in the
archive.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/archiver.bbclass | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 9239983..3543ca9 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -125,7 +125,7 @@ python () {
# (e.g. git repositories) is "unpacked" and then put into a tarball.
python do_ar_original() {
- import shutil, tarfile, tempfile
+ import shutil, tempfile
if d.getVarFlag('ARCHIVER_MODE', 'src', True) != "original":
return
@@ -261,13 +261,9 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
filename = '%s.tar.gz' % d.getVar('PF', True)
tarname = os.path.join(ar_outdir, filename)
- srcdir = srcdir.rstrip('/')
- dirname = os.path.dirname(srcdir)
- basename = os.path.basename(srcdir)
- os.chdir(dirname)
bb.note('Creating %s' % tarname)
tar = tarfile.open(tarname, 'w:gz')
- tar.add(basename)
+ tar.add(srcdir, arcname=os.path.basename(srcdir))
tar.close()
# creating .diff.gz between source.orig and source
--
2.8.1
^ permalink raw reply related
* [PATCH v2 02/33] dpkg: update-alternatives-dpkg should conflict with other providers
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/dpkg/dpkg.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 5695a35..2285f23 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -69,6 +69,7 @@ do_install_append () {
PACKAGES =+ "update-alternatives-dpkg"
FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
RPROVIDES_update-alternatives-dpkg = "update-alternatives"
+RCONFLICTS_update-alternatives-dpkg = "update-alternatives"
PACKAGES += "${PN}-perl"
FILES_${PN}-perl = "${libdir}/perl"
--
2.7.4
^ permalink raw reply related
* [PATCH v2 05/33] package_manager/deb: pass option --force-script-chrootless to dpkg
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Fixes removal of packages with new dpkg version.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/lib/oe/package_manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 7ba2e4d..4ef4f6d 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -2090,7 +2090,7 @@ class DpkgPM(OpkgDpkgPM):
cmd = "%s purge %s" % (self.apt_get_cmd, ' '.join(pkgs))
else:
cmd = "%s --admindir=%s/var/lib/dpkg --instdir=%s" \
- " -P --force-depends %s" % \
+ " -P --force-depends --force-script-chrootless %s" % \
(bb.utils.which(os.getenv('PATH'), "dpkg"),
self.target_rootfs, self.target_rootfs, ' '.join(pkgs))
--
2.7.4
^ permalink raw reply related
* [PATCH v2 03/33] dpkg-native: hardcode SYSCONFDIR to sysconfdir_native in update-alternatives
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
It needs to be relative to DPKG_INSTDIR when installing.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
v2: Use ${sysconfdir_native} instead of /etc.
meta/recipes-devtools/dpkg/dpkg.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 2285f23..4fd0f2a 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -42,6 +42,10 @@ EXTRA_OECONF = "\
EXTRA_OECONF += "TAR=tar"
EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
+do_configure_prepend_class-native() {
+ sed -i -e 's|SYSCONFDIR|"${sysconfdir_native}"|' ${S}/utils/update-alternatives.c
+}
+
do_configure () {
echo >> ${S}/m4/compiler.m4
sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
--
2.7.4
^ permalink raw reply related
* [PATCH v2 00/33] Accumulated patches for deb packaging
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
These are most of my patches which accumulated since our distro
switched from opkg to dpkg and apt two years ago. They were tested
thoroughly on dora and krogoth and just a little bit on master.
Most importantly, this adds support for Debian's update-alternatives
on rootfs creation time. For this to work, the recently added option
'--force-script-chrootless' must be passed to dpkg.
There's also a patch adding BAD_RECOMMENDATIONS for deb packages.
One patch renames dpkg-start-stop to start-stop-daemon. There's also
a recipe in meta-oe with the same name, which should be removed later.
v2: Patches 1, 3, 20, 21, 23 and 28 were modified and annotated.
Andreas Oberritter (33):
dpkg: implement offline mode for update-alternatives
dpkg: update-alternatives-dpkg should conflict with other providers
dpkg-native: hardcode SYSCONFDIR to sysconfdir_native in
update-alternatives
apt-native: Use option --force-script-chrootless for rootfs
package_manager/deb: pass option --force-script-chrootless to dpkg
debianutils: Allow native builds
apt-native: merge apt-native.inc into .bb
apt: merge apt-package.inc into .bb
apt-native: use sed to prepare apt.conf.sample
apt: use default packaging rules for manpages
apt: use default packaging rules for base package, prepend apt-utils
apt: use default packaging rules for -dev package
apt: rewrite do_install
apt-native: drop obsolete patches
apt: merge with apt-native
apt: merge apt.inc into .bb
apt: group variables (license, configuration, packaging)
apt: more fine-grained packaging
apt: recommend gnupg
package_manager/deb: let apt-get handle postinst scripts
package_manager/deb: create Packages.xz
package_manager/deb: implement BAD_RECOMMENDATIONS
dpkg: use PACKAGECONFIG
dpkg: set license field to more common "GPLv2+"
dpkg: clean-up packaging of start-stop-daemon
dpkg: remove unneeded do_configure override
dpkg: simplify replacing perl interpreter in scripts
dpkg: update packages and files to match Debian more closely
dpkg: always install dpkg-configure.service
dpkg: use correct path for perl libraries
package_deb.bbclass: compress control.tar with the same algorithm as
data.tar
apt: fix rpath error during configure
apt: dselect depends on perl
meta/classes/package_deb.bbclass | 3 +-
meta/classes/rootfs_deb.bbclass | 10 +-
meta/lib/oe/package_manager.py | 117 ++----
meta/lib/oe/rootfs.py | 8 +-
meta/recipes-devtools/apt/apt-native.inc | 70 ----
meta/recipes-devtools/apt/apt-native_1.2.12.bb | 4 -
meta/recipes-devtools/apt/apt-package.inc | 78 ----
meta/recipes-devtools/apt/apt.inc | 35 --
...ys-run-dpkg-configure-a-at-the-end-of-our.patch | 126 -------
.../apt/{files/apt.conf => apt/apt.conf.in} | 8 +-
meta/recipes-devtools/apt/apt/noconfigure.patch | 37 --
meta/recipes-devtools/apt/apt_1.2.12.bb | 125 ++++++-
.../apt/files/db_linking_hack.patch | 29 --
meta/recipes-devtools/apt/files/environment.patch | 15 -
meta/recipes-devtools/apt/files/no-curl.patch | 54 ---
meta/recipes-devtools/dpkg/dpkg.inc | 156 ++++----
...tinsts-expect-D-to-be-set-when-running-in.patch | 70 ----
...pdate-alternatives-Implement-offline-mode.patch | 401 +++++++++++++++++++++
meta/recipes-devtools/dpkg/dpkg_1.18.7.bb | 2 +-
.../recipes-support/debianutils/debianutils_4.8.bb | 4 +-
20 files changed, 662 insertions(+), 690 deletions(-)
delete mode 100644 meta/recipes-devtools/apt/apt-native.inc
delete mode 100644 meta/recipes-devtools/apt/apt-native_1.2.12.bb
delete mode 100644 meta/recipes-devtools/apt/apt-package.inc
delete mode 100644 meta/recipes-devtools/apt/apt.inc
delete mode 100644 meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
rename meta/recipes-devtools/apt/{files/apt.conf => apt/apt.conf.in} (80%)
delete mode 100644 meta/recipes-devtools/apt/apt/noconfigure.patch
delete mode 100644 meta/recipes-devtools/apt/files/db_linking_hack.patch
delete mode 100644 meta/recipes-devtools/apt/files/environment.patch
delete mode 100644 meta/recipes-devtools/apt/files/no-curl.patch
delete mode 100644 meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
create mode 100644 meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-Implement-offline-mode.patch
--
2.7.4
^ permalink raw reply
* [PATCH v2 04/33] apt-native: Use option --force-script-chrootless for rootfs
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/files/apt.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/files/apt.conf
index 0335135..9ad61cc 100644
--- a/meta/recipes-devtools/apt/files/apt.conf
+++ b/meta/recipes-devtools/apt/files/apt.conf
@@ -39,4 +39,4 @@ APT
};
};
-DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"};
+DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig";"--force-script-chrootless"};
--
2.7.4
^ permalink raw reply related
* [PATCH v2 06/33] debianutils: Allow native builds
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Apt has a runtime dependency on it.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-support/debianutils/debianutils_4.8.bb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-support/debianutils/debianutils_4.8.bb b/meta/recipes-support/debianutils/debianutils_4.8.bb
index d969fd3..cf4f382 100644
--- a/meta/recipes-support/debianutils/debianutils_4.8.bb
+++ b/meta/recipes-support/debianutils/debianutils_4.8.bb
@@ -32,7 +32,7 @@ do_install_append() {
PACKAGES =+ "${PN}-run-parts"
FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
-RDEPENDS_${PN} += "${PN}-run-parts"
+RDEPENDS_${PN}_class-target = "${PN}-run-parts"
ALTERNATIVE_PRIORITY="30"
@@ -46,3 +46,5 @@ ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
+
+BBCLASSEXTEND = "native"
--
2.7.4
^ permalink raw reply related
* [PATCH v2 08/33] apt: merge apt-package.inc into .bb
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt-package.inc | 78 ------------------------------
meta/recipes-devtools/apt/apt_1.2.12.bb | 79 ++++++++++++++++++++++++++++++-
2 files changed, 78 insertions(+), 79 deletions(-)
delete mode 100644 meta/recipes-devtools/apt/apt-package.inc
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
deleted file mode 100644
index a553aa2..0000000
--- a/meta/recipes-devtools/apt/apt-package.inc
+++ /dev/null
@@ -1,78 +0,0 @@
-apt-manpages="doc/apt-cache.8 \
- doc/apt-cdrom.8 \
- doc/apt-config.8 \
- doc/apt-get.8 \
- doc/apt.8 \
- doc/apt.conf.5 \
- doc/apt_preferences.5 \
- doc/sources.list.5"
-apt-utils-manpages="doc/apt-extracttemplates.1 \
- doc/apt-sortpkgs.1"
-
-def get_files_apt_doc(d, bb, manpages):
- import re
- manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
- manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
- return manpages
-
-def get_commands_apt_doc(d, bb, manpages):
- s = list()
- __dir_cache__ = list()
- for m in manpages.split():
- dest = get_files_apt_doc(d, bb, m)
- dir = os.path.dirname(dest)
- if not dir in __dir_cache__:
- s.append("install -d ${D}/%s" % dir)
- __dir_cache__.append(dir)
- s.append("install -m 0644 %s ${D}/%s" % (m, dest))
- return "\n".join(s)
-
-PACKAGES += "${PN}-utils ${PN}-utils-doc"
-FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
- ${bindir}/apt-config ${bindir}/apt-cache \
- ${libdir}/apt ${libdir}/libapt*.so.* \
- ${localstatedir} ${sysconfdir} \
- ${libdir}/dpkg"
-FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
-FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \
- ${docdir}/apt"
-FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
-FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
-
-do_install () {
- set -x
- install -d ${D}${bindir}
- install -m 0755 bin/apt-key ${D}${bindir}/
- install -m 0755 bin/apt-cdrom ${D}${bindir}/
- install -m 0755 bin/apt-get ${D}${bindir}/
- install -m 0755 bin/apt-config ${D}${bindir}/
- install -m 0755 bin/apt-cache ${D}${bindir}/
-
- install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
- install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
-
- oe_libinstall -so -C bin libapt-pkg ${D}${libdir}
- oe_libinstall -so -C bin libapt-inst ${D}${libdir}
-
- install -d ${D}${libdir}/apt/methods
- install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
-
- install -d ${D}${libdir}/dpkg/methods/apt
- install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
- install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
-
- install -d ${D}${sysconfdir}/apt
- install -d ${D}${sysconfdir}/apt/apt.conf.d
- install -d ${D}${sysconfdir}/apt/sources.list.d
- install -d ${D}${sysconfdir}/apt/preferences.d
- install -d ${D}${localstatedir}/lib/apt/lists/partial
- install -d ${D}${localstatedir}/cache/apt/archives/partial
- install -d ${D}${docdir}/apt/examples
- install -m 0644 ${S}/doc/examples/* ${D}${docdir}/apt/examples/
-
- install -d ${D}${includedir}/apt-pkg/
- install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
-}
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index ae0bce9..3efa14e 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -2,7 +2,84 @@ DEPENDS = "curl db zlib"
RDEPENDS_${PN} = "dpkg bash debianutils"
require apt.inc
-require apt-package.inc
+apt-manpages="doc/apt-cache.8 \
+ doc/apt-cdrom.8 \
+ doc/apt-config.8 \
+ doc/apt-get.8 \
+ doc/apt.8 \
+ doc/apt.conf.5 \
+ doc/apt_preferences.5 \
+ doc/sources.list.5"
+apt-utils-manpages="doc/apt-extracttemplates.1 \
+ doc/apt-sortpkgs.1"
+
+def get_files_apt_doc(d, bb, manpages):
+ import re
+ manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
+ manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
+ return manpages
+
+def get_commands_apt_doc(d, bb, manpages):
+ s = list()
+ __dir_cache__ = list()
+ for m in manpages.split():
+ dest = get_files_apt_doc(d, bb, m)
+ dir = os.path.dirname(dest)
+ if not dir in __dir_cache__:
+ s.append("install -d ${D}/%s" % dir)
+ __dir_cache__.append(dir)
+ s.append("install -m 0644 %s ${D}/%s" % (m, dest))
+ return "\n".join(s)
+
+PACKAGES += "${PN}-utils ${PN}-utils-doc"
+FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
+ ${bindir}/apt-config ${bindir}/apt-cache \
+ ${libdir}/apt ${libdir}/libapt*.so.* \
+ ${localstatedir} ${sysconfdir} \
+ ${libdir}/dpkg"
+FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
+FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \
+ ${docdir}/apt"
+FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
+FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
+
+do_install () {
+ set -x
+ install -d ${D}${bindir}
+ install -m 0755 bin/apt-key ${D}${bindir}/
+ install -m 0755 bin/apt-cdrom ${D}${bindir}/
+ install -m 0755 bin/apt-get ${D}${bindir}/
+ install -m 0755 bin/apt-config ${D}${bindir}/
+ install -m 0755 bin/apt-cache ${D}${bindir}/
+
+ install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
+ install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
+
+ oe_libinstall -so -C bin libapt-pkg ${D}${libdir}
+ oe_libinstall -so -C bin libapt-inst ${D}${libdir}
+
+ install -d ${D}${libdir}/apt/methods
+ install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
+
+ install -d ${D}${libdir}/dpkg/methods/apt
+ install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
+ install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
+
+ install -d ${D}${sysconfdir}/apt
+ install -d ${D}${sysconfdir}/apt/apt.conf.d
+ install -d ${D}${sysconfdir}/apt/sources.list.d
+ install -d ${D}${sysconfdir}/apt/preferences.d
+ install -d ${D}${localstatedir}/lib/apt/lists/partial
+ install -d ${D}${localstatedir}/cache/apt/archives/partial
+ install -d ${D}${docdir}/apt/examples
+ install -m 0644 ${S}/doc/examples/* ${D}${docdir}/apt/examples/
+
+ install -d ${D}${includedir}/apt-pkg/
+ install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
+}
PACKAGECONFIG ??= "lzma"
PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
--
2.7.4
^ permalink raw reply related
* [PATCH v2 01/33] dpkg: implement offline mode for update-alternatives
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
v2: Make update-alternatives optional. Enable it by default for class-target or if
PREFERRED_PROVIDER_virtual/update-alternatives-native is set to dpkg-native.
This should match the behaviour of opkg-utils.
Added patch header (submitted).
meta/recipes-devtools/dpkg/dpkg.inc | 18 +-
...tinsts-expect-D-to-be-set-when-running-in.patch | 70 ----
...pdate-alternatives-Implement-offline-mode.patch | 401 +++++++++++++++++++++
meta/recipes-devtools/dpkg/dpkg_1.18.7.bb | 2 +-
4 files changed, 411 insertions(+), 80 deletions(-)
delete mode 100644 meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
create mode 100644 meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-Implement-offline-mode.patch
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index e8d8a9b..5695a35 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -1,9 +1,10 @@
SUMMARY = "Package maintenance system from Debian"
LICENSE = "GPLv2.0+"
SECTION = "base"
+PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
DEPENDS = "zlib bzip2 perl ncurses"
-DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
+DEPENDS_class-native = "bzip2-replacement-native zlib-native gettext-native perl-native"
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
RDEPENDS_${PN}_class-native = "xz-native"
@@ -23,6 +24,12 @@ PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
export PERL_LIBDIR = "${libdir}/perl"
PERL_LIBDIR_class-native = "${libdir}/perl-native/perl"
+UA = "update-alternatives"
+UA_native = "${@['', 'update-alternatives'][d.getVar('PREFERRED_PROVIDER_virtual/update-alternatives-native', True) == 'dpkg-native']}"
+
+PACKAGECONFIG ??= "${UA}"
+PACKAGECONFIG[update-alternatives] = "--enable-update-alternatives,--disable-update-alternatives"
+
EXTRA_OECONF = "\
--disable-dselect \
--enable-start-stop-daemon \
@@ -43,8 +50,6 @@ do_configure () {
do_install_append () {
if [ "${PN}" = "dpkg-native" ]; then
- # update-alternatives doesn't have an offline mode
- rm ${D}${bindir}/update-alternatives
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
else
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
@@ -61,14 +66,9 @@ do_install_append () {
fi
}
-PROV = "virtual/update-alternatives"
-PROV_class-native = ""
-
-PROVIDES += "${PROV}"
-
PACKAGES =+ "update-alternatives-dpkg"
FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
-RPROVIDES_update-alternatives-dpkg += "update-alternatives"
+RPROVIDES_update-alternatives-dpkg = "update-alternatives"
PACKAGES += "${PN}-perl"
FILES_${PN}-perl = "${libdir}/perl"
diff --git a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
deleted file mode 100644
index 80504ce..0000000
--- a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 24229971492515b64c81e8c6392e5dfbdc22b44c Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 26 Aug 2015 16:25:45 +0300
-Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
- sysroot and don't expect a chroot. This matches up our system expectations
- with what dpkg does.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-RP 2011/12/07
-ALIMON 2016/05/26
-
----
- src/script.c | 39 +++------------------------------------
- 1 file changed, 3 insertions(+), 36 deletions(-)
-
-diff --git a/src/script.c b/src/script.c
-index 3c88be8..ce66a86 100644
---- a/src/script.c
-+++ b/src/script.c
-@@ -97,43 +97,10 @@ setexecute(const char *path, struct stat *stab)
- static const char *
- maintscript_pre_exec(struct command *cmd)
- {
-- const char *admindir = dpkg_db_get_dir();
-- const char *changedir = fc_script_chrootless ? instdir : "/";
-- size_t instdirl = strlen(instdir);
--
-- if (*instdir && !fc_script_chrootless) {
-- if (strncmp(admindir, instdir, instdirl) != 0)
-- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
-- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
-- ohshite(_("unable to setenv for subprocesses"));
-- if (setenv("DPKG_ROOT", "", 1) < 0)
-- ohshite(_("unable to setenv for subprocesses"));
--
-- if (chroot(instdir))
-- ohshite(_("failed to chroot to '%.250s'"), instdir);
-+ if (*instdir) {
-+ setenv("D", instdir, 1);
- }
-- /* Switch to a known good directory to give the maintainer script
-- * a saner environment, also needed after the chroot(). */
-- if (chdir(changedir))
-- ohshite(_("failed to chdir to '%.255s'"), changedir);
-- if (debug_has_flag(dbg_scripts)) {
-- struct varbuf args = VARBUF_INIT;
-- const char **argv = cmd->argv;
--
-- while (*++argv) {
-- varbuf_add_char(&args, ' ');
-- varbuf_add_str(&args, *argv);
-- }
-- varbuf_end_str(&args);
-- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename,
-- args.buf);
-- varbuf_destroy(&args);
-- }
-- if (!instdirl || fc_script_chrootless)
-- return cmd->filename;
--
-- assert(strlen(cmd->filename) >= instdirl);
-- return cmd->filename + instdirl;
-+ return cmd->filename;
- }
-
- /**
---
-2.1.4
-
diff --git a/meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-Implement-offline-mode.patch b/meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-Implement-offline-mode.patch
new file mode 100644
index 0000000..ef14c18
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-Implement-offline-mode.patch
@@ -0,0 +1,401 @@
+Upstream-Status: Submitted [debian-dpkg@lists.debian.org (Wed, 7 Dec 2016 01:09:19 +0100)]
+
+From b4f0f6ced469095a2b21ddddb01b59c7aded057e Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Thu, 28 Aug 2014 05:20:21 +0200
+Subject: [PATCH] update-alternatives: Implement offline mode
+
+Lets update-alternatives manage symlinks inside a cross-arch root
+filesystem in a directory specified by DPKG_ROOT.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+---
+ utils/Makefile.am | 1 +
+ utils/update-alternatives.c | 175 ++++++++++++++++++++++++++++----------------
+ 2 files changed, 114 insertions(+), 62 deletions(-)
+
+diff --git a/utils/Makefile.am b/utils/Makefile.am
+index 83378ad..1f821c5 100644
+--- a/utils/Makefile.am
++++ b/utils/Makefile.am
+@@ -27,6 +27,7 @@ update_alternatives_SOURCES = \
+ update_alternatives_CPPFLAGS = \
+ -DALT_TMP_EXT=\".dpkg-tmp\" \
+ -DADMINDIR_ENVVAR=\"DPKG_ADMINDIR\" \
++ -DINSTDIR_ENVVAR=\"DPKG_ROOT\" \
+ $(AM_CPPFLAGS)
+
+ update_alternatives_LDADD = \
+diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
+index 5dc3213..2b49819 100644
+--- a/utils/update-alternatives.c
++++ b/utils/update-alternatives.c
+@@ -51,6 +51,7 @@
+ #define PROGNAME "update-alternatives"
+
+ static const char *altdir = SYSCONFDIR "/alternatives";
++static const char *instdir;
+ static const char *admdir;
+
+ static const char *prog_path = "update-alternatives";
+@@ -64,6 +65,27 @@ static int opt_verbose = 0;
+ static int opt_force = 0;
+
+ /*
++ * Types.
++ */
++
++enum alternative_path_status {
++ ALT_PATH_SYMLINK,
++ ALT_PATH_MISSING,
++ ALT_PATH_OTHER,
++};
++
++
++/*
++ * Predeclarations.
++ */
++
++static char * DPKG_ATTR_PRINTF(1)
++xasprintf(const char *fmt, ...);
++
++static enum alternative_path_status
++alternative_path_classify(const char *linkname);
++
++/*
+ * Functions.
+ */
+
+@@ -270,7 +292,7 @@ xstrdup(const char *str)
+ }
+
+ static char *
+-areadlink(const char *linkname)
++_areadlink(const char *linkname)
+ {
+ struct stat st;
+ char *buf;
+@@ -303,6 +325,19 @@ areadlink(const char *linkname)
+ }
+
+ static char *
++areadlink(const char *linkname)
++{
++ char *instdir_linkname;
++ char *ret;
++
++ instdir_linkname = xasprintf("%s%s", instdir, linkname);
++ ret = _areadlink(instdir_linkname);
++ free(instdir_linkname);
++
++ return ret;
++}
++
++static char *
+ xreadlink(const char *linkname)
+ {
+ char *buf;
+@@ -348,9 +383,22 @@ set_action(const char *new_action)
+ }
+
+ static const char *
++instdir_init(void)
++{
++ const char *dpkg_instdir;
++
++ dpkg_instdir = getenv(INSTDIR_ENVVAR);
++ if (dpkg_instdir)
++ return dpkg_instdir;
++
++ return "";
++}
++
++static const char *
+ admindir_init(void)
+ {
+ const char *basedir, *basedir_env;
++ size_t length;
+
+ /* Try to get the admindir from an environment variable, usually set
+ * by the system package manager. */
+@@ -360,6 +408,12 @@ admindir_init(void)
+ else
+ basedir = ADMINDIR;
+
++ /* If instdir is set and admindir is below instdir, treat admindir
++ * as relative. */
++ length = strlen(instdir);
++ if (strncmp(basedir, instdir, length) == 0)
++ basedir += length;
++
+ return xasprintf("%s/%s", basedir, "alternatives");
+ }
+
+@@ -432,25 +486,43 @@ rename_mv(const char *src, const char *dst)
+ static void
+ checked_symlink(const char *filename, const char *linkname)
+ {
+- if (symlink(filename, linkname))
++ char *instdir_linkname;
++
++ instdir_linkname = xasprintf("%s%s", instdir, linkname);
++
++ if (symlink(filename, instdir_linkname))
+ syserr(_("error creating symbolic link '%.255s'"), linkname);
++
++ free(instdir_linkname);
+ }
+
+ static void
+ checked_mv(const char *src, const char *dst)
+ {
+- if (!rename_mv(src, dst))
++ char *instdir_src;
++ char *instdir_dst;
++
++ instdir_src = xasprintf("%s%s", instdir, src);
++ instdir_dst = xasprintf("%s%s", instdir, dst);
++
++ if (!rename_mv(instdir_src, instdir_dst))
+ syserr(_("unable to install '%.250s' as '%.250s'"), src, dst);
++
++ free(instdir_src);
++ free(instdir_dst);
+ }
+
+ static void
+ checked_rm(const char *f)
+ {
+- if (!unlink(f))
+- return;
++ char *instdir_f;
+
+- if (errno != ENOENT)
++ instdir_f = xasprintf("%s%s", instdir, f);
++
++ if (unlink(instdir_f) && errno != ENOENT)
+ syserr(_("unable to remove '%s'"), f);
++
++ free(instdir_f);
+ }
+
+ static void DPKG_ATTR_PRINTF(1)
+@@ -567,16 +639,11 @@ fileset_has_slave(struct fileset *fs, const char *name)
+ static bool
+ fileset_can_install_slave(struct fileset *fs, const char *slave_name)
+ {
+- struct stat st;
+-
+ /* Decide whether the slave alternative must be setup */
+ if (fileset_has_slave(fs, slave_name)) {
+ const char *slave = fileset_get_slave(fs, slave_name);
+
+- errno = 0;
+- if (stat(slave, &st) == -1 && errno != ENOENT)
+- syserr(_("cannot stat file '%s'"), slave);
+- if (errno == 0)
++ if (alternative_path_classify(slave) != ALT_PATH_MISSING)
+ return true;
+ }
+
+@@ -1039,10 +1106,15 @@ static int
+ altdb_get_namelist(struct dirent ***table)
+ {
+ int count;
++ char *instdir_admdir;
+
+- count = scandir(admdir, table, altdb_filter_namelist, alphasort);
++ instdir_admdir = xasprintf("%s%s", instdir, admdir);
++
++ count = scandir(instdir_admdir, table, altdb_filter_namelist, alphasort);
+ if (count < 0)
+- syserr(_("cannot scan directory '%.255s'"), admdir);
++ syserr(_("cannot scan directory '%.255s'"), instdir_admdir);
++
++ free(instdir_admdir);
+
+ return count;
+ }
+@@ -1167,7 +1239,6 @@ alternative_parse_fileset(struct alternative *a, struct altdb_context *ctx)
+ {
+ struct fileset *fs;
+ struct slave_link *sl;
+- struct stat st;
+ char *master_file;
+
+ master_file = altdb_get_line(ctx, _("master file"));
+@@ -1180,12 +1251,9 @@ alternative_parse_fileset(struct alternative *a, struct altdb_context *ctx)
+ if (fs)
+ ctx->bad_format(ctx, _("duplicate path %s"), master_file);
+
+- if (stat(master_file, &st)) {
++ if (alternative_path_classify(master_file) == ALT_PATH_MISSING) {
+ char *junk;
+
+- if (errno != ENOENT)
+- syserr(_("cannot stat file '%s'"), master_file);
+-
+ /* File not found - remove. */
+ if (ctx->flags & ALTDB_WARN_PARSER)
+ warning(_("alternative %s (part of link group %s) "
+@@ -1248,7 +1316,7 @@ alternative_load(struct alternative *a, enum altdb_flags flags)
+ ctx.bad_format = altdb_parse_stop;
+ else
+ ctx.bad_format = altdb_parse_error;
+- ctx.filename = xasprintf("%s/%s", admdir, a->master_name);
++ ctx.filename = xasprintf("%s%s/%s", instdir, admdir, a->master_name);
+
+ /* Open the alternative file. */
+ ctx.fh = fopen(ctx.filename, "r");
+@@ -1340,7 +1408,7 @@ alternative_save(struct alternative *a)
+ file = xasprintf("%s/%s", admdir, a->master_name);
+ filenew = xasprintf("%s" ALT_TMP_EXT, file);
+
+- ctx.filename = filenew;
++ ctx.filename = xasprintf("%s%s", instdir, filenew);
+ ctx.fh = fopen(ctx.filename, "w");
+ if (ctx.fh == NULL)
+ syserr(_("unable to create file '%s'"), ctx.filename);
+@@ -1379,6 +1447,7 @@ alternative_save(struct alternative *a)
+ syserr(_("unable to sync file '%s'"), ctx.filename);
+ if (fclose(ctx.fh))
+ syserr(_("unable to close file '%s'"), ctx.filename);
++ free(ctx.filename);
+
+ /* Put in place atomically. */
+ checked_mv(filenew, file);
+@@ -1399,7 +1468,6 @@ alternative_set_current(struct alternative *a, char *new_choice)
+ static const char *
+ alternative_get_current(struct alternative *a)
+ {
+- struct stat st;
+ char *curlink;
+ char *file;
+
+@@ -1407,12 +1475,9 @@ alternative_get_current(struct alternative *a)
+ return a->current;
+
+ curlink = xasprintf("%s/%s", altdir, a->master_name);
+- if (lstat(curlink, &st)) {
+- if (errno == ENOENT) {
+- free(curlink);
+- return alternative_set_current(a, NULL);
+- }
+- syserr(_("cannot stat file '%s'"), curlink);
++ if (alternative_path_classify(curlink) == ALT_PATH_MISSING) {
++ free(curlink);
++ return alternative_set_current(a, NULL);
+ }
+
+ file = xreadlink(curlink);
+@@ -1674,14 +1739,8 @@ alternative_commit(struct alternative *a)
+ alternative_commit_operations_free(a);
+ }
+
+-enum alternative_path_status {
+- ALT_PATH_SYMLINK,
+- ALT_PATH_MISSING,
+- ALT_PATH_OTHER,
+-};
+-
+ static enum alternative_path_status
+-alternative_path_classify(const char *linkname)
++_alternative_path_classify(const char *linkname)
+ {
+ struct stat st;
+
+@@ -1697,6 +1756,19 @@ alternative_path_classify(const char *linkname)
+ }
+ }
+
++static enum alternative_path_status
++alternative_path_classify(const char *linkname)
++{
++ enum alternative_path_status ret;
++ char *instdir_linkname;
++
++ instdir_linkname = xasprintf("%s%s", instdir, linkname);
++ ret = _alternative_path_classify(instdir_linkname);
++ free(instdir_linkname);
++
++ return ret;
++}
++
+ static bool
+ alternative_path_can_remove(const char *linkname)
+ {
+@@ -2120,13 +2192,7 @@ alternative_select_mode(struct alternative *a, const char *current_choice)
+ if (current_choice) {
+ /* Detect manually modified alternative, switch to manual. */
+ if (!alternative_has_choice(a, current_choice)) {
+- struct stat st;
+-
+- errno = 0;
+- if (stat(current_choice, &st) == -1 && errno != ENOENT)
+- syserr(_("cannot stat file '%s'"), current_choice);
+-
+- if (errno == ENOENT) {
++ if (alternative_path_classify(current_choice) == ALT_PATH_MISSING) {
+ warning(_("%s/%s is dangling; it will be updated "
+ "with best choice"), altdir, a->master_name);
+ alternative_set_status(a, ALT_ST_AUTO);
+@@ -2150,7 +2216,6 @@ alternative_evolve_slave(struct alternative *a, const char *cur_choice,
+ struct slave_link *sl, struct fileset *fs)
+ {
+ struct slave_link *sl_old;
+- struct stat st;
+ char *new_file = NULL;
+ const char *old, *new;
+
+@@ -2174,17 +2239,7 @@ alternative_evolve_slave(struct alternative *a, const char *cur_choice,
+ }
+ if (strcmp(old, new) != 0 &&
+ alternative_path_classify(old) == ALT_PATH_SYMLINK) {
+- bool rename_link = false;
+-
+- if (new_file) {
+- errno = 0;
+- if (stat(new_file, &st) == -1 && errno != ENOENT)
+- syserr(_("cannot stat file '%s'"),
+- new_file);
+- rename_link = (errno == 0);
+- }
+-
+- if (rename_link) {
++ if (new_file && alternative_path_classify(new_file) != ALT_PATH_MISSING) {
+ info(_("renaming %s slave link from %s to %s"),
+ sl->name, old, new);
+ checked_mv(old, new);
+@@ -2474,7 +2529,6 @@ alternative_check_install_args(struct alternative *inst_alt,
+ struct alternative_map *alt_map_links, *alt_map_parent;
+ struct alternative *found;
+ struct slave_link *sl;
+- struct stat st;
+
+ alternative_check_name(inst_alt->master_name);
+ alternative_check_link(inst_alt->master_link);
+@@ -2499,13 +2553,9 @@ alternative_check_install_args(struct alternative *inst_alt,
+ inst_alt->master_link, found->master_name);
+ }
+
+- if (stat(fileset->master_file, &st) == -1) {
+- if (errno == ENOENT)
+- error(_("alternative path %s doesn't exist"),
+- fileset->master_file);
+- else
+- syserr(_("cannot stat file '%s'"), fileset->master_file);
+- }
++ if (alternative_path_classify(fileset->master_file) == ALT_PATH_MISSING)
++ error(_("alternative path %s doesn't exist"),
++ fileset->master_file);
+
+ for (sl = inst_alt->slaves; sl; sl = sl->next) {
+ const char *file = fileset_get_slave(fileset, sl->name);
+@@ -2580,6 +2630,7 @@ main(int argc, char **argv)
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
++ instdir = instdir_init();
+ admdir = admindir_init();
+
+ if (setvbuf(stdout, NULL, _IONBF, 0))
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
index 28fdc13..65a9bb6 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
@@ -8,7 +8,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160509T100042Z/pool/main/
file://dpkg-configure.service \
file://add_armeb_triplet_entry.patch \
file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
- file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
+ file://0003-update-alternatives-Implement-offline-mode.patch \
file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
file://0005-dpkg-compiler.m4-remove-Wvla.patch \
file://0006-add-musleabi-to-known-target-tripets.patch \
--
2.7.4
^ permalink raw reply related
* [PATCH v2 09/33] apt-native: use sed to prepare apt.conf.sample
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt-native_1.2.12.bb | 32 +++++-----------------
.../apt/{files/apt.conf => apt/apt.conf.in} | 6 ++--
2 files changed, 10 insertions(+), 28 deletions(-)
rename meta/recipes-devtools/apt/{files/apt.conf => apt/apt.conf.in} (87%)
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
index 0edceeb..695e21d 100644
--- a/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
@@ -11,33 +11,10 @@ SRC_URI += "file://db_linking_hack.patch \
file://0001-fix-the-gcc-version-check.patch \
file://noconfigure.patch \
file://no-curl.patch \
+ file://apt.conf.in \
"
-python do_install () {
- bb.build.exec_func('do_install_base', d)
- bb.build.exec_func('do_install_config', d)
-}
-
-python do_install_config () {
- indir = os.path.dirname(d.getVar('FILE', True))
- infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r')
- data = infile.read()
- infile.close()
-
- data = d.expand(data)
-
- outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
- if not os.path.exists(outdir):
- os.makedirs(outdir)
-
- outpath = oe.path.join(outdir, 'apt.conf.sample')
- if not os.path.exists(outpath):
- outfile = open(outpath, 'w')
- outfile.write(data)
- outfile.close()
-}
-
-do_install_base () {
+do_install() {
install -d ${D}${bindir}
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/
@@ -69,4 +46,9 @@ do_install_base () {
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${localstatedir}/log/apt/
+
+ sed -e "s,@STAGING_DIR_NATIVE@,${STAGING_DIR_NATIVE},g" \
+ -e "s,@STAGING_BINDIR_NATIVE@,${STAGING_BINDIR_NATIVE},g" \
+ -e "s,@STAGING_LIBDIR@,${STAGING_LIBDIR},g" \
+ < ${WORKDIR}/apt.conf.in > ${D}${sysconfdir}/apt/apt.conf.sample
}
diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/apt/apt.conf.in
similarity index 87%
rename from meta/recipes-devtools/apt/files/apt.conf
rename to meta/recipes-devtools/apt/apt/apt.conf.in
index 9ad61cc..6fc1326 100644
--- a/meta/recipes-devtools/apt/files/apt.conf
+++ b/meta/recipes-devtools/apt/apt/apt.conf.in
@@ -1,4 +1,4 @@
-Dir "${STAGING_DIR_NATIVE}/"
+Dir "@STAGING_DIR_NATIVE@/"
{
State "var/lib/apt/"
{
@@ -11,9 +11,9 @@ Dir "${STAGING_DIR_NATIVE}/"
pkgcache "";
srcpkgcache "";
};
- Bin "${STAGING_BINDIR_NATIVE}/"
+ Bin "@STAGING_BINDIR_NATIVE@/"
{
- methods "${STAGING_LIBDIR}/apt/methods/";
+ methods "@STAGING_LIBDIR@/apt/methods/";
gzip "/bin/gzip";
dpkg "dpkg";
dpkg-source "dpkg-source";
--
2.7.4
^ permalink raw reply related
* [PATCH v2 10/33] apt: use default packaging rules for manpages
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt_1.2.12.bb | 35 +--------------------------------
1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 3efa14e..ba49571 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -2,45 +2,13 @@ DEPENDS = "curl db zlib"
RDEPENDS_${PN} = "dpkg bash debianutils"
require apt.inc
-apt-manpages="doc/apt-cache.8 \
- doc/apt-cdrom.8 \
- doc/apt-config.8 \
- doc/apt-get.8 \
- doc/apt.8 \
- doc/apt.conf.5 \
- doc/apt_preferences.5 \
- doc/sources.list.5"
-apt-utils-manpages="doc/apt-extracttemplates.1 \
- doc/apt-sortpkgs.1"
-
-def get_files_apt_doc(d, bb, manpages):
- import re
- manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
- manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
- return manpages
-
-def get_commands_apt_doc(d, bb, manpages):
- s = list()
- __dir_cache__ = list()
- for m in manpages.split():
- dest = get_files_apt_doc(d, bb, m)
- dir = os.path.dirname(dest)
- if not dir in __dir_cache__:
- s.append("install -d ${D}/%s" % dir)
- __dir_cache__.append(dir)
- s.append("install -m 0644 %s ${D}/%s" % (m, dest))
- return "\n".join(s)
-
-PACKAGES += "${PN}-utils ${PN}-utils-doc"
+PACKAGES += "${PN}-utils"
FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
${bindir}/apt-config ${bindir}/apt-cache \
${libdir}/apt ${libdir}/libapt*.so.* \
${localstatedir} ${sysconfdir} \
${libdir}/dpkg"
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
-FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \
- ${docdir}/apt"
-FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
@@ -87,7 +55,6 @@ PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,b
PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
FILES_${PN} += "${bindir}/apt-key"
-apt-manpages += "doc/apt-key.8"
do_install_append() {
#Write the correct apt-architecture to apt.conf
--
2.7.4
^ permalink raw reply related
* [PATCH v2 12/33] apt: use default packaging rules for -dev package
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt_1.2.12.bb | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index ec93eb8..c531a49 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -5,7 +5,6 @@ require apt.inc
PACKAGES =+ "${PN}-utils"
FILES_${PN} += "${libdir}/dpkg"
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
-FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
set -x
--
2.7.4
^ permalink raw reply related
* [PATCH v2 07/33] apt-native: merge apt-native.inc into .bb
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt-native.inc | 70 ------------------------
meta/recipes-devtools/apt/apt-native_1.2.12.bb | 74 ++++++++++++++++++++++++--
2 files changed, 71 insertions(+), 73 deletions(-)
delete mode 100644 meta/recipes-devtools/apt/apt-native.inc
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
deleted file mode 100644
index 9fa206e..0000000
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ /dev/null
@@ -1,70 +0,0 @@
-require apt.inc
-inherit native
-
-DEPENDS += "dpkg-native gettext-native db-native curl-native xz-native"
-PACKAGES = ""
-USE_NLS = "yes"
-
-SRC_URI += "file://db_linking_hack.patch \
- file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \
- file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
- file://0001-fix-the-gcc-version-check.patch \
-"
-
-python do_install () {
- bb.build.exec_func('do_install_base', d)
- bb.build.exec_func('do_install_config', d)
-}
-
-python do_install_config () {
- indir = os.path.dirname(d.getVar('FILE', True))
- infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r')
- data = infile.read()
- infile.close()
-
- data = d.expand(data)
-
- outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
- if not os.path.exists(outdir):
- os.makedirs(outdir)
-
- outpath = oe.path.join(outdir, 'apt.conf.sample')
- if not os.path.exists(outpath):
- outfile = open(outpath, 'w')
- outfile.write(data)
- outfile.close()
-}
-
-do_install_base () {
- install -d ${D}${bindir}
- install -m 0755 bin/apt-cdrom ${D}${bindir}/
- install -m 0755 bin/apt-get ${D}${bindir}/
- install -m 0755 bin/apt-config ${D}${bindir}/
- install -m 0755 bin/apt-cache ${D}${bindir}/
- install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
- install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
- install -m 0755 bin/apt-ftparchive ${D}${bindir}/
-
- oe_libinstall -so -C bin libapt-private ${D}${libdir}/
-
- oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
- oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
-
- install -d ${D}${libdir}/apt/methods
- install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
-
- install -d ${D}${libdir}/dpkg/methods/apt
- install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
- install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
-
- install -d ${D}${sysconfdir}/apt
- install -d ${D}${sysconfdir}/apt/apt.conf.d
- install -d ${D}${sysconfdir}/apt/preferences.d
- install -d ${D}${localstatedir}/lib/apt/lists/partial
- install -d ${D}${localstatedir}/cache/apt/archives/partial
-
- install -d ${D}${localstatedir}/log/apt/
-}
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
index 1e660da..0edceeb 100644
--- a/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
@@ -1,4 +1,72 @@
-require apt-native.inc
+require apt.inc
+inherit native
-SRC_URI += "file://noconfigure.patch \
- file://no-curl.patch"
+DEPENDS += "dpkg-native gettext-native db-native curl-native xz-native"
+PACKAGES = ""
+USE_NLS = "yes"
+
+SRC_URI += "file://db_linking_hack.patch \
+ file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \
+ file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
+ file://0001-fix-the-gcc-version-check.patch \
+ file://noconfigure.patch \
+ file://no-curl.patch \
+"
+
+python do_install () {
+ bb.build.exec_func('do_install_base', d)
+ bb.build.exec_func('do_install_config', d)
+}
+
+python do_install_config () {
+ indir = os.path.dirname(d.getVar('FILE', True))
+ infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r')
+ data = infile.read()
+ infile.close()
+
+ data = d.expand(data)
+
+ outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
+ if not os.path.exists(outdir):
+ os.makedirs(outdir)
+
+ outpath = oe.path.join(outdir, 'apt.conf.sample')
+ if not os.path.exists(outpath):
+ outfile = open(outpath, 'w')
+ outfile.write(data)
+ outfile.close()
+}
+
+do_install_base () {
+ install -d ${D}${bindir}
+ install -m 0755 bin/apt-cdrom ${D}${bindir}/
+ install -m 0755 bin/apt-get ${D}${bindir}/
+ install -m 0755 bin/apt-config ${D}${bindir}/
+ install -m 0755 bin/apt-cache ${D}${bindir}/
+ install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
+ install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
+ install -m 0755 bin/apt-ftparchive ${D}${bindir}/
+
+ oe_libinstall -so -C bin libapt-private ${D}${libdir}/
+
+ oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
+ oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
+
+ install -d ${D}${libdir}/apt/methods
+ install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
+
+ install -d ${D}${libdir}/dpkg/methods/apt
+ install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
+ install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
+
+ install -d ${D}${sysconfdir}/apt
+ install -d ${D}${sysconfdir}/apt/apt.conf.d
+ install -d ${D}${sysconfdir}/apt/preferences.d
+ install -d ${D}${localstatedir}/lib/apt/lists/partial
+ install -d ${D}${localstatedir}/cache/apt/archives/partial
+
+ install -d ${D}${localstatedir}/log/apt/
+}
--
2.7.4
^ permalink raw reply related
* [PATCH v2 13/33] apt: rewrite do_install
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Install missing files and directories (apt, apt-ftparchive,
apt-helper, apt-mark, trusted.gpg.d).
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt_1.2.12.bb | 73 ++++++++++++++++++---------------
1 file changed, 41 insertions(+), 32 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index c531a49..20c7cb4 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -4,44 +4,55 @@ require apt.inc
PACKAGES =+ "${PN}-utils"
FILES_${PN} += "${libdir}/dpkg"
-FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
+FILES_${PN}-utils = "${bindir}/apt-extracttemplates \
+ ${bindir}/apt-ftparchive \
+ ${bindir}/apt-sortpkgs"
+
+PROGRAMS = " \
+ apt apt-cache apt-cdrom apt-config apt-extracttemplates \
+ apt-ftparchive apt-get apt-key apt-mark apt-sortpkgs \
+"
do_install () {
- set -x
install -d ${D}${bindir}
- install -m 0755 bin/apt-key ${D}${bindir}/
- install -m 0755 bin/apt-cdrom ${D}${bindir}/
- install -m 0755 bin/apt-get ${D}${bindir}/
- install -m 0755 bin/apt-config ${D}${bindir}/
- install -m 0755 bin/apt-cache ${D}${bindir}/
+ for f in ${PROGRAMS}; do
+ install -m 0755 bin/$f ${D}${bindir}
+ done
+
+ install -d ${D}${docdir}/apt/examples
+ install -m 0644 ${S}/doc/examples/* ${D}${docdir}/apt/examples
- install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
- install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
+ install -d ${D}${includedir}/apt-pkg
+ install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg
- oe_libinstall -so -C bin libapt-pkg ${D}${libdir}
- oe_libinstall -so -C bin libapt-inst ${D}${libdir}
+ install -d ${D}${libdir}
+ for f in inst pkg private; do
+ oe_libinstall -so -C bin libapt-$f ${D}${libdir}
+ done
+
+ install -d ${D}${libdir}/apt
+ install -m 0755 bin/apt-helper ${D}${libdir}/apt
install -d ${D}${libdir}/apt/methods
- install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
+ install -m 0755 bin/methods/* ${D}${libdir}/apt/methods
install -d ${D}${libdir}/dpkg/methods/apt
- install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
- install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
-
- install -d ${D}${sysconfdir}/apt
- install -d ${D}${sysconfdir}/apt/apt.conf.d
- install -d ${D}${sysconfdir}/apt/sources.list.d
- install -d ${D}${sysconfdir}/apt/preferences.d
- install -d ${D}${localstatedir}/lib/apt/lists/partial
- install -d ${D}${localstatedir}/cache/apt/archives/partial
- install -d ${D}${docdir}/apt/examples
- install -m 0644 ${S}/doc/examples/* ${D}${docdir}/apt/examples/
+ for f in desc.apt names; do
+ install -m 0644 ${S}/dselect/$f ${D}${libdir}/dpkg/methods/apt
+ done
+ for f in install setup update; do
+ install -m 0755 ${S}/dselect/$f ${D}${libdir}/dpkg/methods/apt
+ done
+
+ for d in apt.conf.d preferences.d sources.list.d trusted.gpg.d; do
+ install -d ${D}${sysconfdir}/apt/$d
+ done
- install -d ${D}${includedir}/apt-pkg/
- install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
+ install -d ${D}${localstatedir}/cache/apt/archives/partial
+ install -d ${D}${localstatedir}/lib/apt/lists/partial
+ install -d ${D}${localstatedir}/lib/apt/mirrors/partial
+ install -d ${D}${localstatedir}/lib/apt/periodic
+ install -d ${D}${localstatedir}/log/apt
}
PACKAGECONFIG ??= "lzma"
@@ -49,9 +60,7 @@ PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_
PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
-do_install_append() {
+do_install_append_class-target() {
#Write the correct apt-architecture to apt.conf
- APT_CONF=${D}/etc/apt/apt.conf
- echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF}
- oe_libinstall -so -C bin libapt-private ${D}${libdir}/
+ echo 'APT::Architecture "${DPKG_ARCH}";' > ${D}${sysconfdir}/apt/apt.conf
}
--
2.7.4
^ permalink raw reply related
* [PATCH v2 11/33] apt: use default packaging rules for base package, prepend apt-utils
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt_1.2.12.bb | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index ba49571..ec93eb8 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -2,12 +2,8 @@ DEPENDS = "curl db zlib"
RDEPENDS_${PN} = "dpkg bash debianutils"
require apt.inc
-PACKAGES += "${PN}-utils"
-FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
- ${bindir}/apt-config ${bindir}/apt-cache \
- ${libdir}/apt ${libdir}/libapt*.so.* \
- ${localstatedir} ${sysconfdir} \
- ${libdir}/dpkg"
+PACKAGES =+ "${PN}-utils"
+FILES_${PN} += "${libdir}/dpkg"
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
@@ -54,8 +50,6 @@ PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_
PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
-FILES_${PN} += "${bindir}/apt-key"
-
do_install_append() {
#Write the correct apt-architecture to apt.conf
APT_CONF=${D}/etc/apt/apt.conf
--
2.7.4
^ permalink raw reply related
* [PATCH v2 15/33] apt: merge with apt-native
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt-native_1.2.12.bb | 50 --------------------------
meta/recipes-devtools/apt/apt.inc | 3 ++
meta/recipes-devtools/apt/apt_1.2.12.bb | 11 ++++++
3 files changed, 14 insertions(+), 50 deletions(-)
delete mode 100644 meta/recipes-devtools/apt/apt-native_1.2.12.bb
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
deleted file mode 100644
index 8d32ef9..0000000
--- a/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-require apt.inc
-inherit native
-
-DEPENDS += "dpkg-native gettext-native db-native curl-native xz-native"
-PACKAGES = ""
-USE_NLS = "yes"
-
-SRC_URI += "file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
- file://0001-fix-the-gcc-version-check.patch \
- file://apt.conf.in \
-"
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 bin/apt-cdrom ${D}${bindir}/
- install -m 0755 bin/apt-get ${D}${bindir}/
- install -m 0755 bin/apt-config ${D}${bindir}/
- install -m 0755 bin/apt-cache ${D}${bindir}/
- install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
- install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
- install -m 0755 bin/apt-ftparchive ${D}${bindir}/
-
- oe_libinstall -so -C bin libapt-private ${D}${libdir}/
-
- oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
- oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
-
- install -d ${D}${libdir}/apt/methods
- install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
-
- install -d ${D}${libdir}/dpkg/methods/apt
- install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
- install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
- install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
-
- install -d ${D}${sysconfdir}/apt
- install -d ${D}${sysconfdir}/apt/apt.conf.d
- install -d ${D}${sysconfdir}/apt/preferences.d
- install -d ${D}${localstatedir}/lib/apt/lists/partial
- install -d ${D}${localstatedir}/cache/apt/archives/partial
-
- install -d ${D}${localstatedir}/log/apt/
-
- sed -e "s,@STAGING_DIR_NATIVE@,${STAGING_DIR_NATIVE},g" \
- -e "s,@STAGING_BINDIR_NATIVE@,${STAGING_BINDIR_NATIVE},g" \
- -e "s,@STAGING_LIBDIR@,${STAGING_LIBDIR},g" \
- < ${WORKDIR}/apt.conf.in > ${D}${sysconfdir}/apt/apt.conf.sample
-}
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index 3026370..1488664 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -13,6 +13,9 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/
file://disable-test.patch \
file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
file://0001-apt-1.2.12-Fix-musl-build.patch \
+ file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
+ file://0001-fix-the-gcc-version-check.patch \
+ file://apt.conf.in \
"
SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 20c7cb4..f09dfc8 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -2,6 +2,8 @@ DEPENDS = "curl db zlib"
RDEPENDS_${PN} = "dpkg bash debianutils"
require apt.inc
+USE_NLS_class-native = "yes"
+
PACKAGES =+ "${PN}-utils"
FILES_${PN} += "${libdir}/dpkg"
FILES_${PN}-utils = "${bindir}/apt-extracttemplates \
@@ -60,7 +62,16 @@ PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_
PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
+do_install_append_class-native() {
+ sed -e "s,@STAGING_DIR_NATIVE@,${STAGING_DIR_NATIVE},g" \
+ -e "s,@STAGING_BINDIR_NATIVE@,${STAGING_BINDIR_NATIVE},g" \
+ -e "s,@STAGING_LIBDIR@,${STAGING_LIBDIR},g" \
+ < ${WORKDIR}/apt.conf.in > ${D}${sysconfdir}/apt/apt.conf.sample
+}
+
do_install_append_class-target() {
#Write the correct apt-architecture to apt.conf
echo 'APT::Architecture "${DPKG_ARCH}";' > ${D}${sysconfdir}/apt/apt.conf
}
+
+BBCLASSEXTEND = "native"
--
2.7.4
^ permalink raw reply related
* [PATCH v2 17/33] apt: group variables (license, configuration, packaging)
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt_1.2.12.bb | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 3463a23..a350b36 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -1,8 +1,8 @@
SUMMARY = "Advanced front-end for dpkg"
SECTION = "base"
LICENSE = "GPLv2.0+"
+LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
DEPENDS = "curl db zlib"
-RDEPENDS_${PN} = "dpkg bash debianutils"
SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
file://use-host.patch \
@@ -21,7 +21,6 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/
"
SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
# 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
@@ -31,6 +30,13 @@ inherit autotools gettext useradd
EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
+PACKAGECONFIG ??= "lzma"
+PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
+PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
+PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
+
+USE_NLS_class-native = "yes"
+
do_configure_prepend() {
rm -rf ${S}/buildlib/config.sub
rm -rf ${S}/buildlib/config.guess
@@ -39,14 +45,6 @@ do_configure_prepend() {
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt"
-USE_NLS_class-native = "yes"
-
-PACKAGES =+ "${PN}-utils"
-FILES_${PN} += "${libdir}/dpkg"
-FILES_${PN}-utils = "${bindir}/apt-extracttemplates \
- ${bindir}/apt-ftparchive \
- ${bindir}/apt-sortpkgs"
-
PROGRAMS = " \
apt apt-cache apt-cdrom apt-config apt-extracttemplates \
apt-ftparchive apt-get apt-key apt-mark apt-sortpkgs \
@@ -94,11 +92,6 @@ do_install () {
install -d ${D}${localstatedir}/log/apt
}
-PACKAGECONFIG ??= "lzma"
-PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
-PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
-PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
-
do_install_append_class-native() {
sed -e "s,@STAGING_DIR_NATIVE@,${STAGING_DIR_NATIVE},g" \
-e "s,@STAGING_BINDIR_NATIVE@,${STAGING_BINDIR_NATIVE},g" \
@@ -111,4 +104,13 @@ do_install_append_class-target() {
echo 'APT::Architecture "${DPKG_ARCH}";' > ${D}${sysconfdir}/apt/apt.conf
}
+PACKAGES =+ "${PN}-utils"
+
+RDEPENDS_${PN} = "dpkg bash debianutils"
+
+FILES_${PN} += "${libdir}/dpkg"
+FILES_${PN}-utils = "${bindir}/apt-extracttemplates \
+ ${bindir}/apt-ftparchive \
+ ${bindir}/apt-sortpkgs"
+
BBCLASSEXTEND = "native"
--
2.7.4
^ permalink raw reply related
* [PATCH v2 16/33] apt: merge apt.inc into .bb
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-devtools/apt/apt.inc | 38 --------------------------------
meta/recipes-devtools/apt/apt_1.2.12.bb | 39 ++++++++++++++++++++++++++++++++-
2 files changed, 38 insertions(+), 39 deletions(-)
delete mode 100644 meta/recipes-devtools/apt/apt.inc
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
deleted file mode 100644
index 1488664..0000000
--- a/meta/recipes-devtools/apt/apt.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Advanced front-end for dpkg"
-LICENSE = "GPLv2.0+"
-SECTION = "base"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
- file://use-host.patch \
- file://makerace.patch \
- file://no-nls-dpkg.patch \
- file://fix-gcc-4.6-null-not-defined.patch \
- file://truncate-filename.patch \
- file://nodoc.patch \
- file://disable-configure-in-makefile.patch \
- file://disable-test.patch \
- file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
- file://0001-apt-1.2.12-Fix-musl-build.patch \
- file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
- file://0001-fix-the-gcc-version-check.patch \
- file://apt.conf.in \
- "
-SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
-SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-# 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/"
-
-inherit autotools gettext useradd
-
-EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
-
-do_configure_prepend() {
- rm -rf ${S}/buildlib/config.sub
- rm -rf ${S}/buildlib/config.guess
-}
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt"
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index f09dfc8..3463a23 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -1,6 +1,43 @@
+SUMMARY = "Advanced front-end for dpkg"
+SECTION = "base"
+LICENSE = "GPLv2.0+"
DEPENDS = "curl db zlib"
RDEPENDS_${PN} = "dpkg bash debianutils"
-require apt.inc
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
+ file://use-host.patch \
+ file://makerace.patch \
+ file://no-nls-dpkg.patch \
+ file://fix-gcc-4.6-null-not-defined.patch \
+ file://truncate-filename.patch \
+ file://nodoc.patch \
+ file://disable-configure-in-makefile.patch \
+ file://disable-test.patch \
+ file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
+ file://0001-apt-1.2.12-Fix-musl-build.patch \
+ file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
+ file://0001-fix-the-gcc-version-check.patch \
+ file://apt.conf.in \
+ "
+SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
+SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
+LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+# 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/"
+
+inherit autotools gettext useradd
+
+EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
+
+do_configure_prepend() {
+ rm -rf ${S}/buildlib/config.sub
+ rm -rf ${S}/buildlib/config.guess
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt"
USE_NLS_class-native = "yes"
--
2.7.4
^ permalink raw reply related
* [PATCH v2 21/33] package_manager/deb: create Packages.xz
From: Andreas Oberritter @ 2016-12-08 21:47 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <1481233677-27298-1-git-send-email-obi@opendreambox.org>
apt-get prefers it over Packages.gz.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
v2: Added dependencies on xz-native to callers of write_index().
meta/classes/package_deb.bbclass | 1 +
meta/classes/rootfs_deb.bbclass | 4 ++--
meta/lib/oe/package_manager.py | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index fb6034c..09bc5b9 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -356,5 +356,6 @@ addtask package_write_deb after do_packagedata do_package
PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "xz-native:do_populate_sysroot"
do_build[recrdeptask] += "do_package_write_deb"
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index f79fca6..332931e 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -5,8 +5,8 @@
ROOTFS_PKGMANAGE = "dpkg apt"
ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
-do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
-do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
+do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot xz-native:do_populate_sysroot"
+do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot xz-native:do_populate_sysroot"
do_rootfs[recrdeptask] += "do_package_write_deb"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 12dff20..b18148b 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -304,6 +304,7 @@ class DpkgIndexer(Indexer):
apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
gzip = bb.utils.which(os.getenv('PATH'), "gzip")
+ xz = bb.utils.which(os.getenv('PATH'), "xz")
index_cmds = []
deb_dirs_found = False
@@ -315,6 +316,7 @@ class DpkgIndexer(Indexer):
cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % (arch_dir, apt_ftparchive)
cmd += "%s -fc Packages > Packages.gz;" % gzip
+ cmd += "%s -fc Packages > Packages.xz;" % xz
with open(os.path.join(arch_dir, "Release"), "w+") as release:
release.write("Label: %s\n" % arch)
--
2.7.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox