Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [PATCH 3/5] libsdl2: add EXTRA_OECONF[vardepsexclude] = "MACHINE"
From: Khem Raj @ 2016-12-09  2:52 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CALbNGRTqROjBNZP=FsRMYUPn=sMbYYgAP6CAYmnjePKO3o4N=A@mail.gmail.com>

On Tue, Dec 6, 2016 at 12:00 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Tue, Dec 6, 2016 at 1:24 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> There probably is no need to use this additional variable. We can just use
>> PKG_CONFIG_SYSROOT
> Problem is not finding the wrong .pc files. Problem is that the output
> of pkg-config must be prefixed to find the protocols.
>

I think this patch as such is fine for now.

> Andreas


^ permalink raw reply

* Re: [PATCH] insane: Add SH4 musl mapping to the QA arch tests
From: Khem Raj @ 2016-12-09  2:49 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <1388d400-de9b-e414-ee96-898089425033@mleia.com>

On Thu, Dec 8, 2016 at 6:42 PM, Vladimir Zapolskiy <vz@mleia.com> wrote:
> Hello Khem,
>
> On 12/09/2016 03:29 AM, Khem Raj wrote:
>>
>>> On Dec 6, 2016, at 7:17 AM, Vladimir Zapolskiy <vz@mleia.com> wrote:
>>>
>>> This change allows to pass QA for packages built with sh4-oe-linux-musl
>>> toolchain, the problem is reproted while building core-image-minimal target:
>>>
>>>  ERROR: readline-7.0-r0 do_package_qa:
>>>  Error executing a python function in exec_python_func() autogenerated
>>>
>>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
>>> ---
>>> meta/classes/insane.bbclass | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>>> index 5ddb87b..01494e3 100644
>>> --- a/meta/classes/insane.bbclass
>>> +++ b/meta/classes/insane.bbclass
>>> @@ -138,6 +138,7 @@ def package_qa_get_machine_dict(d):
>>>                         "microblaze":  (189,     0,    0,          False,         32),
>>>                         "microblazeeb":(189,     0,    0,          False,         32),
>>>                         "microblazeel":(189,     0,    0,          True,          32),
>>> +                        "sh4":        (  42,     0,    0,          True,          32),
>>
>> Can you also add sh4eb as well while you are at it ?
>>
>
> I don't build or do runtime testing of sh4eb, and you may notice that
> there is no any other sh4eb target in the file at the moment. I'll try
> to find some time in the future and test sh4eb linux, linux-musl and
> linux-uclibc toolchains and add all of them together as a distinct
> change.
>
> Since missing sh4 linux-musl hits me immediately, I would like to ask
> you to apply the change as is.
>

OK, I think thats fine, I was hoping that you were testing that too

> Thank you.
>
> --
> With best wishes,
> Vladimir


^ permalink raw reply

* Re: [PATCH] insane: Add SH4 musl mapping to the QA arch tests
From: Vladimir Zapolskiy @ 2016-12-09  2:42 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core
In-Reply-To: <DC2BDF45-0E2A-40EC-885D-0EF1A61F8453@gmail.com>

Hello Khem,

On 12/09/2016 03:29 AM, Khem Raj wrote:
> 
>> On Dec 6, 2016, at 7:17 AM, Vladimir Zapolskiy <vz@mleia.com> wrote:
>>
>> This change allows to pass QA for packages built with sh4-oe-linux-musl
>> toolchain, the problem is reproted while building core-image-minimal target:
>>
>>  ERROR: readline-7.0-r0 do_package_qa:
>>  Error executing a python function in exec_python_func() autogenerated
>>
>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
>> ---
>> meta/classes/insane.bbclass | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>> index 5ddb87b..01494e3 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -138,6 +138,7 @@ def package_qa_get_machine_dict(d):
>>                         "microblaze":  (189,     0,    0,          False,         32),
>>                         "microblazeeb":(189,     0,    0,          False,         32),
>>                         "microblazeel":(189,     0,    0,          True,          32),
>> +                        "sh4":        (  42,     0,    0,          True,          32),
> 
> Can you also add sh4eb as well while you are at it ?
> 

I don't build or do runtime testing of sh4eb, and you may notice that
there is no any other sh4eb target in the file at the moment. I'll try
to find some time in the future and test sh4eb linux, linux-musl and
linux-uclibc toolchains and add all of them together as a distinct
change.

Since missing sh4 linux-musl hits me immediately, I would like to ask
you to apply the change as is.

Thank you.

--
With best wishes,
Vladimir


^ permalink raw reply

* Re: [PATCH] insane: Add SH4 musl mapping to the QA arch tests
From: Khem Raj @ 2016-12-09  1:29 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: openembedded-core
In-Reply-To: <20161206151718.18176-1-vz@mleia.com>


> On Dec 6, 2016, at 7:17 AM, Vladimir Zapolskiy <vz@mleia.com> wrote:
> 
> This change allows to pass QA for packages built with sh4-oe-linux-musl
> toolchain, the problem is reproted while building core-image-minimal target:
> 
>  ERROR: readline-7.0-r0 do_package_qa:
>  Error executing a python function in exec_python_func() autogenerated
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> ---
> meta/classes/insane.bbclass | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 5ddb87b..01494e3 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -138,6 +138,7 @@ def package_qa_get_machine_dict(d):
>                         "microblaze":  (189,     0,    0,          False,         32),
>                         "microblazeeb":(189,     0,    0,          False,         32),
>                         "microblazeel":(189,     0,    0,          True,          32),
> +                        "sh4":        (  42,     0,    0,          True,          32),

Can you also add sh4eb as well while you are at it ?

>                       },
>             "uclinux-uclibc" : {
>                         "bfin":       ( 106,     0,    0,          True,         32),
> -- 
> 2.10.2
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



^ permalink raw reply

* Re: [PATCH 01/11] buildstats: add system state sampling
From: Andreas Oberritter @ 2016-12-09  0:29 UTC (permalink / raw)
  To: Patrick Ohly; +Cc: openembedded-core
In-Reply-To: <d96e4eb080323e3331ae743d1df3362a6c5a2309.1480346284.git.patrick.ohly@intel.com>

Hi Patrick,

On 28.11.2016 16:33, Patrick Ohly wrote:
> /proc/[diskstats|meminfo|stat] get sampled and written to the same
> proc_<filename>.log files as during normal bootchat logging. This will
> allow rendering the CPU, disk and memory usage charts.
> 
> Right now sampling happens once a second, triggered by the heartbeat
> event.That produces quite a bit of data for long builds, which will be
> addressed in a separate commit by storing the data in a more compact
> form.
> 
> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> ---
>  meta/classes/buildstats.bbclass | 16 +++++++++++++
>  meta/lib/buildstats.py          | 50 +++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 66 insertions(+)
>  create mode 100644 meta/lib/buildstats.py
> 
> diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
> index 57ecc8f..2abc1a7 100644
> --- a/meta/classes/buildstats.bbclass
> +++ b/meta/classes/buildstats.bbclass
> @@ -188,3 +188,19 @@ python run_buildstats () {
>  addhandler run_buildstats
>  run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed"
>  
> +python runqueue_stats () {
> +    import buildstats
> +    from bb import event, runqueue
> +    # We should not record any samples before the first task has started,
> +    # because that's the first activity shown in the process chart.
> +    # Besides, at that point we are sure that the build variables
> +    # are available that we need to find the output directory.
> +    init = isinstance(e, bb.runqueue.runQueueTaskStarted)
> +    system_stats = buildstats.get_system_stats(d, init=init)
> +    if system_stats:
> +        # Ensure that we sample at important events.
> +        system_stats.sample(force=isinstance(e, bb.event.BuildCompleted))
> +}
> +
> +addhandler runqueue_stats
> +runqueue_stats[eventmask] = "bb.runqueue.runQueueTaskStarted bb.event.HeartbeatEvent bb.event.BuildCompleted"
> diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
> new file mode 100644
> index 0000000..1664c52
> --- /dev/null
> +++ b/meta/lib/buildstats.py
> @@ -0,0 +1,50 @@
> +# Implements system state sampling. Called by buildstats.bbclass.
> +# Because it is a real Python module, it can hold persistent state,
> +# like open log files and the time of the last sampling.
> +
> +import time
> +
> +class SystemStats:
> +    def __init__(self, d):
> +        bn = d.getVar('BUILDNAME', True)
> +        bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
> +        bb.utils.mkdirhier(bsdir)
> +
> +        self.proc_files = []
> +        for filename in ('diskstats', 'meminfo', 'stat'):
> +            # In practice, this class gets instantiated only once in
> +            # the bitbake cooker process.  Therefore 'append' mode is
> +            # not strictly necessary, but using it makes the class
> +            # more robust should two processes ever write
> +            # concurrently.
> +            self.proc_files.append((filename,
> +                                    open(os.path.join(bsdir, 'proc_%s.log' % filename), 'ab')))
> +        # Last time that we sampled data.
> +        self.last = 0
> +        # Minimum number of seconds between recording a sample. This
> +        # becames relevant when we get called very often while many
> +        # short tasks get started. Sampling during quiet periods
> +        # depends on the heartbeat event, which fires less often.
> +        self.min_seconds = 1
> +
> +    def sample(self, force):
> +        now = time.time()
> +        if (now - self.last > self.min_seconds) or force:
> +            for filename, output in self.proc_files:
> +                with open(os.path.join('/proc', filename), 'rb') as input:
                        ^
this fails with a backtrace if /proc/diskstats is not available, which
may be the case in virtualized environments, e.g. Linux-VServer.

Regards,
Andreas


^ permalink raw reply

* [PATCH v2 31/33] package_deb.bbclass: compress control.tar with the same algorithm as data.tar
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>

Yields better compression with xz and fixes a problem invoking gzip.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/classes/package_deb.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 09bc5b9..8d08256 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -308,7 +308,7 @@ python do_package_deb () {
             conffiles.close()
 
         os.chdir(basedir)
-        ret = subprocess.call("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
+        ret = subprocess.call("PATH=\"%s\" dpkg-deb --uniform-compression -b %s %s" % (localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
         if ret != 0:
             bb.utils.unlockfile(lf)
             bb.fatal("dpkg-deb execution failed")
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 30/33] dpkg: use correct path for perl libraries
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 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 40cfc45..1d55837 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -1,21 +1,19 @@
 SUMMARY = "Package maintenance system from Debian"
 SECTION = "base"
 LICENSE = "GPLv2+"
-DEPENDS = "perl"
 DEPENDS_append_class-native = " bzip2-replacement-native"
 PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
 
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
 
-inherit autotools gettext perlnative pkgconfig systemd
+inherit autotools cpan-base gettext perlnative pkgconfig systemd
 
 SYSTEMD_SERVICE_${PN} = "dpkg-configure.service"
 
 export PERL = "${bindir}/perl"
 PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
 
-export PERL_LIBDIR = "${libdir}/perl"
-PERL_LIBDIR_class-native = "${libdir}/perl-native/perl"
+export PERL_LIBDIR = "${PERLLIBDIRS}/${PERLVERSION}"
 
 UA = "update-alternatives"
 UA_native = "${@['', 'update-alternatives'][d.getVar('PREFERRED_PROVIDER_virtual/update-alternatives-native', True) == 'dpkg-native']}"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 32/33] apt: fix rpath error during configure
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>

| checking for shared library run path origin... /bin/sh: ../apt-1.0.10.1/buildlib/config.rpath: No such file or directory

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-devtools/apt/apt_1.2.12.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 4d781a2..5dc50a4 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -28,7 +28,10 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/"
 
 inherit autotools gettext useradd
 
+AUTOTOOLS_AUXDIR = "${S}/buildlib"
+
 EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
+EXTRA_OECONF = "--disable-rpath"
 
 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 33/33] apt: dselect depends on perl
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 | 2 +-
 1 file changed, 1 insertion(+), 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 5dc50a4..0b640f9 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -110,7 +110,7 @@ do_install_append_class-target() {
 PACKAGES =+ "${PN}-dselect ${PN}-transport-https ${PN}-utils lib${PN}-inst lib${PN}-pkg"
 
 RDEPENDS_${PN} = "dpkg debianutils"
-RDEPENDS_${PN}-dselect = "bash"
+RDEPENDS_${PN}-dselect = "bash perl"
 
 RRECOMMENDS_${PN} = "gnupg"
 RRECOMMENDS_${PN}_class-native = ""
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 27/33] dpkg: simplify replacing perl interpreter in scripts
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>

Target scripts already contain the correct value.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 2575fbb..d2dc38e 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -44,13 +44,11 @@ do_configure_prepend_class-native() {
     sed -i -e 's|SYSCONFDIR|"${sysconfdir_native}"|' ${S}/utils/update-alternatives.c
 }
 
-do_install_append () {
-	if [ "${PN}" = "dpkg-native" ]; then
-		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-*
-	fi
+do_install_append_class-native() {
+    sed -i -e 's|^#!${PERL}|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
+}
 
+do_install_append () {
 	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
 		install -d ${D}${systemd_unitdir}/system
 		install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 26/33] dpkg: remove unneeded do_configure override
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>

Exporting PERL_LIBDIR is enough, compiler.m4 isn't needed.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index bb3c4df..2575fbb 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -44,12 +44,6 @@ 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
-    autotools_do_configure
-}
-
 do_install_append () {
 	if [ "${PN}" = "dpkg-native" ]; then
 		sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 29/33] dpkg: always install dpkg-configure.service
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>

systemd.bbclass handles everything based on DISTRO_FEATURES.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 09c962e..40cfc45 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -9,11 +9,7 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
 
 inherit autotools gettext perlnative pkgconfig systemd
 
-python () {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        pn = d.getVar('PN', True)
-        d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'dpkg-configure.service')
-}
+SYSTEMD_SERVICE_${PN} = "dpkg-configure.service"
 
 export PERL = "${bindir}/perl"
 PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
@@ -49,15 +45,13 @@ do_install_append_class-native() {
 }
 
 do_install_append () {
-	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
-		install -d ${D}${systemd_unitdir}/system
-		install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/
-		sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-			-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-			-e 's,@BINDIR@,${bindir},g' \
-			-e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
-			${D}${systemd_unitdir}/system/dpkg-configure.service
-	fi
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system
+    sed -e 's,@BASE_BINDIR@,${base_bindir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        -e 's,@BINDIR@,${bindir},g' \
+        -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
+        -i ${D}${systemd_unitdir}/system/dpkg-configure.service
 }
 
 PACKAGES =+ "dpkg-perl dselect libdpkg-perl start-stop-daemon update-alternatives-dpkg"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 28/33] dpkg: update packages and files to match Debian more closely
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: Drop gpgv from RRECOMMENDS and RSUGGESTS, gnupg implies it.

 meta/recipes-devtools/dpkg/dpkg.inc | 53 +++++++++++++++++++++++++++++++++----
 1 file changed, 48 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index d2dc38e..09c962e 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -60,20 +60,63 @@ do_install_append () {
 	fi
 }
 
-PACKAGES =+ "start-stop-daemon update-alternatives-dpkg"
+PACKAGES =+ "dpkg-perl dselect libdpkg-perl start-stop-daemon update-alternatives-dpkg"
 
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} run-postinsts perl"
 RDEPENDS_${PN}_class-native = ""
 RRECOMMENDS_${PN} = "start-stop-daemon"
 RRECOMMENDS_${PN}_class-native = ""
+RSUGGESTS_${PN} = "apt"
 
-FILES_start-stop-daemon = "${base_sbindir}/start-stop-daemon"
+RDEPENDS_dpkg-perl = "binutils libdpkg-perl make xz"
+RRECOMMENDS_dpkg-perl = "gnupg"
+
+RDEPENDS_dselect = "dpkg"
+RSUGGESTS_dselect = "perl"
+
+RDEPENDS_libdpkg-perl = "dpkg libtimedate-perl perl"
+RRECOMMENDS_libdpkg-perl = "xz"
+RSUGGESTS_libdpkg-perl = "binutils gnupg"
 
-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"
+FILES_dpkg-perl = " \
+    ${bindir}/dpkg-architecture \
+    ${bindir}/dpkg-buildflags \
+    ${bindir}/dpkg-buildpackage \
+    ${bindir}/dpkg-checkbuilddeps \
+    ${bindir}/dpkg-distaddfile \
+    ${bindir}/dpkg-genchanges \
+    ${bindir}/dpkg-gencontrol \
+    ${bindir}/dpkg-gensymbols \
+    ${bindir}/dpkg-mergechangelogs \
+    ${bindir}/dpkg-name \
+    ${bindir}/dpkg-parsechangelog \
+    ${bindir}/dpkg-scanpackages \
+    ${bindir}/dpkg-scansources \
+    ${bindir}/dpkg-shlibdeps \
+    ${bindir}/dpkg-source \
+    ${bindir}/dpkg-vendor \
+    ${datadir}/dpkg/*.mk \
+"
+
+FILES_dselect = "${bindir}/dselect"
+
+FILES_libdpkg-perl = " \
+    ${libdir}/dpkg/parsechangelog \
+    ${libdir}/perl \
+"
+
+FILES_start-stop-daemon = "${base_sbindir}/start-stop-daemon"
+
+FILES_update-alternatives-dpkg = " \
+    ${sysconfdir}/alternatives \
+    ${bindir}/update-alternatives \
+    ${localstatedir}/lib/dpkg/alternatives \
+"
+
+PKG_dpkg-dev = "libdpkg-dev"
+PKG_dpkg-perl = "dpkg-dev"
 
 BBCLASSEXTEND = "native"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 22/33] package_manager/deb: implement BAD_RECOMMENDATIONS
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/classes/rootfs_deb.bbclass |  6 ------
 meta/lib/oe/package_manager.py  | 27 +++++++++++++++++++++++++++
 meta/lib/oe/rootfs.py           |  2 ++
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 332931e..bd8deaf 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -13,12 +13,6 @@ do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
 do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 
-python rootfs_deb_bad_recommendations() {
-    if d.getVar("BAD_RECOMMENDATIONS", True):
-        bb.warn("Debian package install does not support BAD_RECOMMENDATIONS")
-}
-do_rootfs[prefuncs] += "rootfs_deb_bad_recommendations"
-
 DEB_POSTPROCESS_COMMANDS = ""
 
 opkglibdir = "${localstatedir}/lib/opkg"
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index b18148b..6c5b7ef 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -2198,6 +2198,33 @@ class DpkgPM(OpkgDpkgPM):
 
         return tmp_dir
 
+    def handle_bad_recommendations(self):
+        bad_recommendations = (self.d.getVar("BAD_RECOMMENDATIONS", True) or "").strip()
+        if not bad_recommendations:
+            return
+
+        status_file = self.target_rootfs + "/var/lib/dpkg/status"
+
+        with open(status_file + ".tmp", "w") as status:
+            for pkg in bad_recommendations.split():
+                pkg_info = ('apt-cache', 'show', pkg)
+
+                try:
+                    output = subprocess.check_output(pkg_info, stderr=subprocess.STDOUT).decode("utf-8")
+                except subprocess.CalledProcessError as e:
+                    bb.fatal("Cannot get package info. Command '%s' "
+                             "returned %d:\n%s" % (' '.join(pkg_info), e.returncode, e.output))
+
+                for line in output.splitlines():
+                    if not line:
+                        status.write("Status: hold ok not-installed\n\n")
+                        break
+
+                    if line.startswith(' ') or line.split(': ', 1)[0] not in ('Filename', 'Size', 'MD5sum', 'MSDOS-Filename'):
+                        status.write(line + "\n")
+
+        os.rename(status_file + ".tmp", status_file)
+
 def generate_index_files(d):
     classes = d.getVar('PACKAGE_CLASSES', True).replace("package_", "").split()
 
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 4c82456..b2bb67b 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -663,6 +663,8 @@ class DpkgRootfs(DpkgOpkgRootfs):
 
         self.pm.update()
 
+        self.pm.handle_bad_recommendations()
+
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 20/33] package_manager/deb: let apt-get handle postinst scripts
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>

With all required environment variables and configuration options in
apt.conf in place, apt-get is able to install packages offline, i.e.
when creating the rootfs, including the execution of postinst scripts
and updating the package database. This is new behaviour.

At the time the deleted code would have executed, its work was already
done by apt-get.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 v2: Added patch description.

 meta/lib/oe/package_manager.py | 86 ++++--------------------------------------
 meta/lib/oe/rootfs.py          |  6 +--
 2 files changed, 9 insertions(+), 83 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 4ef4f6d..12dff20 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1959,84 +1959,6 @@ class DpkgPM(OpkgDpkgPM):
 
         self.indexer = DpkgIndexer(self.d, self.deploy_dir)
 
-    """
-    This function will change a package's status in /var/lib/dpkg/status file.
-    If 'packages' is None then the new_status will be applied to all
-    packages
-    """
-    def mark_packages(self, status_tag, packages=None):
-        status_file = self.target_rootfs + "/var/lib/dpkg/status"
-
-        with open(status_file, "r") as sf:
-            with open(status_file + ".tmp", "w+") as tmp_sf:
-                if packages is None:
-                    tmp_sf.write(re.sub(r"Package: (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
-                                        r"Package: \1\n\2Status: \3%s" % status_tag,
-                                        sf.read()))
-                else:
-                    if type(packages).__name__ != "list":
-                        raise TypeError("'packages' should be a list object")
-
-                    status = sf.read()
-                    for pkg in packages:
-                        status = re.sub(r"Package: %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
-                                        r"Package: %s\n\1Status: \2%s" % (pkg, status_tag),
-                                        status)
-
-                    tmp_sf.write(status)
-
-        os.rename(status_file + ".tmp", status_file)
-
-    """
-    Run the pre/post installs for package "package_name". If package_name is
-    None, then run all pre/post install scriptlets.
-    """
-    def run_pre_post_installs(self, package_name=None):
-        info_dir = self.target_rootfs + "/var/lib/dpkg/info"
-        ControlScript = collections.namedtuple("ControlScript", ["suffix", "name", "argument"])
-        control_scripts = [
-                ControlScript(".preinst", "Preinstall", "install"),
-                ControlScript(".postinst", "Postinstall", "configure")]
-        status_file = self.target_rootfs + "/var/lib/dpkg/status"
-        installed_pkgs = []
-
-        with open(status_file, "r") as status:
-            for line in status.read().split('\n'):
-                m = re.match("^Package: (.*)", line)
-                if m is not None:
-                    installed_pkgs.append(m.group(1))
-
-        if package_name is not None and not package_name in installed_pkgs:
-            return
-
-        os.environ['D'] = self.target_rootfs
-        os.environ['OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR', True),
-                                                   "intercept_scripts")
-        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE', True)
-
-        failed_pkgs = []
-        for pkg_name in installed_pkgs:
-            for control_script in control_scripts:
-                p_full = os.path.join(info_dir, pkg_name + control_script.suffix)
-                if os.path.exists(p_full):
-                    try:
-                        bb.note("Executing %s for package: %s ..." %
-                                 (control_script.name.lower(), pkg_name))
-                        subprocess.check_output([p_full, control_script.argument],
-                                stderr=subprocess.STDOUT)
-                    except subprocess.CalledProcessError as e:
-                        bb.note("%s for package %s failed with %d:\n%s" %
-                                (control_script.name, pkg_name, e.returncode,
-                                    e.output.decode("utf-8")))
-                        failed_pkgs.append(pkg_name)
-                        break
-
-        if len(failed_pkgs):
-            self.mark_packages("unpacked", failed_pkgs)
-
     def update(self):
         os.environ['APT_CONFIG'] = self.apt_conf_file
 
@@ -2058,6 +1980,14 @@ class DpkgPM(OpkgDpkgPM):
 
         os.environ['APT_CONFIG'] = self.apt_conf_file
 
+        os.environ['D'] = self.target_rootfs
+        os.environ['OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR', True),
+                                                   "intercept_scripts")
+        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE', True)
+
         cmd = "%s %s install --force-yes --allow-unauthenticated %s" % \
               (self.apt_get_cmd, self.apt_args, ' '.join(pkgs))
 
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index a348b97..4c82456 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -685,10 +685,6 @@ class DpkgRootfs(DpkgOpkgRootfs):
 
         self.pm.fix_broken_dependencies()
 
-        self.pm.mark_packages("installed")
-
-        self.pm.run_pre_post_installs()
-
         execute_pre_post_process(self.d, deb_post_process_cmds)
 
         if self.progress_reporter:
@@ -708,7 +704,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
         return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
 
     def _handle_intercept_failure(self, registered_pkgs):
-        self.pm.mark_packages("unpacked", registered_pkgs.split())
+        pass
 
     def _log_check(self):
         self._log_check_warn()
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 24/33] dpkg: set license field to more common "GPLv2+"
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 4e39fba..cf09b35 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -1,6 +1,6 @@
 SUMMARY = "Package maintenance system from Debian"
-LICENSE = "GPLv2.0+"
 SECTION = "base"
+LICENSE = "GPLv2+"
 DEPENDS = "perl"
 DEPENDS_append_class-native = " bzip2-replacement-native"
 PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 25/33] dpkg: clean-up packaging of start-stop-daemon
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>

Dpkg-start-stop is not an intuitive name. Just call the package
start-stop-daemon. Don't rdepend on it, because it might be empty.

Install start-stop-daemon to /sbin to match Debian and busybox.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index cf09b35..bb3c4df 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -35,7 +35,7 @@ PACKAGECONFIG[xz] = "--with-liblzma,--without-liblzma,xz"
 
 DPKG_DEB_COMPRESSOR ?= "${@bb.utils.contains('PACKAGECONFIG', 'xz', 'xz', 'gzip', d)}"
 
-EXTRA_OECONF += "--with-dpkg-deb-compressor=${DPKG_DEB_COMPRESSOR}"
+EXTRA_OECONF += "--sbindir=${base_sbindir} --with-dpkg-deb-compressor=${DPKG_DEB_COMPRESSOR}"
 
 EXTRA_OECONF += "TAR=tar"
 EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
@@ -68,10 +68,14 @@ do_install_append () {
 	fi
 }
 
-PACKAGES =+ "update-alternatives-dpkg"
+PACKAGES =+ "start-stop-daemon update-alternatives-dpkg"
 
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} run-postinsts perl"
 RDEPENDS_${PN}_class-native = ""
+RRECOMMENDS_${PN} = "start-stop-daemon"
+RRECOMMENDS_${PN}_class-native = ""
+
+FILES_start-stop-daemon = "${base_sbindir}/start-stop-daemon"
 
 FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
 RPROVIDES_update-alternatives-dpkg = "update-alternatives"
@@ -80,14 +84,4 @@ RCONFLICTS_update-alternatives-dpkg = "update-alternatives"
 PACKAGES += "${PN}-perl"
 FILES_${PN}-perl = "${libdir}/perl"
 
-# Split out start-stop-daemon to its own package.  Note that it
-# is installed in a different directory than the one used for
-# the bitbake version.
-#
-PACKAGES =+ "${PN}-start-stop"
-FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon"
-
-RDEPENDS_${PN} += "${PN}-start-stop"
-
-
 BBCLASSEXTEND = "native"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 14/33] apt-native: drop obsolete patches
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>

0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch and
noconfigure.patch are obsolete due to dpkg's new --force-script-chrootless
option.

db_linking_hack.patch and environment.patch are marked as backports
from 2007.

no-curl.patch: curl-native is already a prerequisite.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-devtools/apt/apt-native_1.2.12.bb     |   6 +-
 ...ys-run-dpkg-configure-a-at-the-end-of-our.patch | 126 ---------------------
 meta/recipes-devtools/apt/apt/noconfigure.patch    |  37 ------
 .../apt/files/db_linking_hack.patch                |  29 -----
 meta/recipes-devtools/apt/files/environment.patch  |  15 ---
 meta/recipes-devtools/apt/files/no-curl.patch      |  54 ---------
 6 files changed, 1 insertion(+), 266 deletions(-)
 delete mode 100644 meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
 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

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 695e21d..8d32ef9 100644
--- a/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
@@ -5,12 +5,8 @@ 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 \
+SRC_URI += "file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
             file://0001-fix-the-gcc-version-check.patch \
-            file://noconfigure.patch \
-            file://no-curl.patch \
             file://apt.conf.in \
 "
 
diff --git a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
deleted file mode 100644
index b3a883b..0000000
--- a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From dfc1370d50322e2e9d225a7a63b44993fc01a727 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Fri, 22 May 2015 08:05:15 +0800
-Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our
- dpkg callings"
-
-Upstream-Status: Inappropriate [embedded specific]
-
-This reverts commit a2a75ff4516f7609f4c55b42270abb8d08943c60, which
-always run 'dpkg --configure -a' at the end of our dpkg callings,
-but it does not work for cross-compile, since the rootfs dir can not
-be passed into dpkg, and lead to the below similar error:
-   -------
-   |mkdir: cannot create directory '/usr/lib/opkg': Permission denied
-   -------
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- apt-pkg/deb/dpkgpm.cc                                     |  9 ++-------
- test/integration/test-apt-progress-fd-deb822              | 14 +++++++-------
- test/integration/test-no-fds-leaked-to-maintainer-scripts |  6 ++----
- 3 files changed, 11 insertions(+), 18 deletions(-)
-
-diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
-index 834cb0e..84ded3a 100644
---- a/apt-pkg/deb/dpkgpm.cc
-+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
- 	 PackagesTotal++;
-       }
-    }
--   /* one extra: We don't want the progress bar to reach 100%, especially not
--      if we call dpkg --configure --pending and process a bunch of triggers
--      while showing 100%. Also, spindown takes a while, so never reaching 100%
--      is way more correct than reaching 100% while still doing stuff even if
--      doing it this way is slightly bending the rules */
--   ++PackagesTotal;
- }
-                                                                         /*}}}*/
- bool pkgDPkgPM::Go(int StatusFd)
-@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
- 
-    // support subpressing of triggers processing for special
-    // cases like d-i that runs the triggers handling manually
-+   bool const SmartConf = (_config->Find("PackageManager::Configure", "all") != "all");
-    bool const TriggersPending = _config->FindB("DPkg::TriggersPending", false);
--   if (_config->FindB("DPkg::ConfigurePending", true) == true)
-+   if (_config->FindB("DPkg::ConfigurePending", SmartConf) == true)
-       List.push_back(Item(Item::ConfigurePending, PkgIterator()));
- 
-    // for the progress
-diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
-index 58fd732..3359762 100755
---- a/test/integration/test-apt-progress-fd-deb822
-+++ b/test/integration/test-apt-progress-fd-deb822
-@@ -27,36 +27,36 @@ Message: Installing testing (amd64)
- 
- Status: progress
- Package: testing:amd64
--Percent: 16.6667
-+Percent: 20
- Message: Preparing testing (amd64)
- 
- Status: progress
- Package: testing:amd64
--Percent: 33.3333
-+Percent: 40
- Message: Unpacking testing (amd64)
- 
- Status: progress
- Package: testing:amd64
--Percent: 50
-+Percent: 60
- Message: Preparing to configure testing (amd64)
- 
- Status: progress
--Percent: 50
-+Percent: 60
- Message: Running dpkg
- 
- Status: progress
- Package: testing:amd64
--Percent: 50
-+Percent: 60
- Message: Configuring testing (amd64)
- 
- Status: progress
- Package: testing:amd64
--Percent: 66.6667
-+Percent: 80
- Message: Configuring testing (amd64)
- 
- Status: progress
- Package: testing:amd64
--Percent: 83.3333
-+Percent: 100
- Message: Installed testing (amd64)
- 
- Status: progress
-diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
-index d86e638..ef6d23b 100755
---- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
-+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
-@@ -59,8 +59,7 @@ startup packages configure
- configure $PKGNAME 1.0 <none>
- status unpacked $PKGNAME 1.0
- status half-configured $PKGNAME 1.0
--status installed $PKGNAME 1.0
--startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
-+status installed $PKGNAME 1.0" cut -f 3- -d' ' rootdir/var/log/dpkg.log
- }
- checkinstall
- 
-@@ -85,8 +84,7 @@ status config-files $PKGNAME 1.0
- status config-files $PKGNAME 1.0
- status config-files $PKGNAME 1.0
- status config-files $PKGNAME 1.0
--status not-installed $PKGNAME <none>
--startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
-+status not-installed $PKGNAME <none>" cut -f 3- -d' ' rootdir/var/log/dpkg.log
- }
- checkpurge
- 
--- 
-2.1.4
-
diff --git a/meta/recipes-devtools/apt/apt/noconfigure.patch b/meta/recipes-devtools/apt/apt/noconfigure.patch
deleted file mode 100644
index ebc6720..0000000
--- a/meta/recipes-devtools/apt/apt/noconfigure.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-
-diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
-index 249542c..0a1911f 100644
---- a/apt-pkg/packagemanager.cc
-+++ b/apt-pkg/packagemanager.cc
-@@ -952,10 +952,12 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
-       return false;
- 
-    if (Immediate == true) {
-+#if 0
-       // Perform immedate configuration of the package. 
-          if (SmartConfigure(Pkg, Depth + 1) == false)
-             _error->Error(_("Could not perform immediate configuration on '%s'. "
-                "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.FullName().c_str(),2);
-+#endif
-    }
-    
-    return true;
-@@ -1038,6 +1040,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
-       }
-    }
- 
-+#if 0
-    // Final run through the configure phase
-    if (ConfigureAll() == false)
-       return Failed;
-@@ -1052,6 +1055,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
- 	 return Failed;
-       }
-    }
-+#endif
- 	 
-    return Completed;
- }
diff --git a/meta/recipes-devtools/apt/files/db_linking_hack.patch b/meta/recipes-devtools/apt/files/db_linking_hack.patch
deleted file mode 100644
index a61d4b0..0000000
--- a/meta/recipes-devtools/apt/files/db_linking_hack.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Upstream-Status: Backport
-
-Index: apt-0.7.3/configure.ac
-===================================================================
---- apt-0.7.3.orig/configure.ac	2007-07-01 10:38:45.000000000 +0000
-+++ apt-0.7.3/configure.ac	2007-08-21 13:39:26.000000000 +0000
-@@ -67,8 +67,20 @@
-       [AC_DEFINE(HAVE_BDB)
-        BDBLIB="-ldb"
-        AC_MSG_RESULT(yes)],
--      [BDBLIB=""
--       AC_MSG_RESULT(no)]
-+
-+       LIBS="$LIBS -lpthread"
-+       [AC_MSG_CHECKING(if we can link against BerkeleyDB with pthread)
-+        AC_LINK_IFELSE(
-+        [AC_LANG_PROGRAM(
-+         [#include <db.h>],
-+         [int r, s, t; db_version(&r, &s, &t);]
-+        )],
-+        [AC_DEFINE(HAVE_BDB)
-+         BDBLIB="-ldb -lpthread"
-+         AC_MSG_RESULT(yes)],
-+        [BDBLIB=""
-+         AC_MSG_RESULT(no)]
-+      )]       
-     )]
- )
- 
diff --git a/meta/recipes-devtools/apt/files/environment.patch b/meta/recipes-devtools/apt/files/environment.patch
deleted file mode 100644
index 9a03038..0000000
--- a/meta/recipes-devtools/apt/files/environment.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Backport
-
-Index: apt-0.6.46.2/buildlib/environment.mak.in
-===================================================================
---- apt-0.6.46.2.orig/buildlib/environment.mak.in	2007-03-29 11:38:58.000000000 +0100
-+++ apt-0.6.46.2/buildlib/environment.mak.in	2007-03-29 11:39:12.000000000 +0100
-@@ -62,7 +62,7 @@
- 
- # Shared library things
- HOST_OS = @host_os@
--ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0)
-+ifneq ($(words $(filter linux-gnu linux-gnueabi gnu% %gnu,$(HOST_OS))),0)
-    SONAME_MAGIC=-Wl,-soname -Wl,
-    LFLAGS_SO=
- else
diff --git a/meta/recipes-devtools/apt/files/no-curl.patch b/meta/recipes-devtools/apt/files/no-curl.patch
deleted file mode 100644
index 0838552..0000000
--- a/meta/recipes-devtools/apt/files/no-curl.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-From 5d61ac822fd9a3871cd5089389c210606232ecdc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
-Date: Thu, 26 May 2016 15:34:45 -0500
-Subject: [PATCH] Upstream-Status: Inappropriate [configuration]
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
----
- configure.ac     | 7 -------
- methods/makefile | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index e47f459..cd24264 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -83,13 +83,6 @@ AC_CHECK_HEADER(db.h,
- 
- LIBS="$saveLIBS"
- 
--AC_CHECK_LIB(curl, curl_easy_init,
--     [AC_CHECK_HEADER(curl/curl.h,
--        curl_ok=yes,
--        curl_ok=no)],
--     AC_MSG_ERROR([failed: I need CURL due https support]),
--)
--
- AC_SUBST(BDBLIB)
- 
- HAVE_ZLIB=no
-diff --git a/methods/makefile b/methods/makefile
-index 3274e92..255086b 100644
---- a/methods/makefile
-+++ b/methods/makefile
-@@ -51,13 +51,6 @@ LIB_MAKES = apt-pkg/makefile
- SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc server.cc
- include $(PROGRAM_H)
- 
--# The https method
--PROGRAM=https
--SLIBS = -lapt-pkg -lcurl $(INTLLIBS) -lresolv
--LIB_MAKES = apt-pkg/makefile
--SOURCE = https.cc server.cc
--include $(PROGRAM_H)
--
- # The ftp method
- PROGRAM=ftp
- SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv
--- 
-2.1.4
-
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 23/33] dpkg: use PACKAGECONFIG
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>

Keep default dependencies as before. Set default compressor to xz
if selected, gzip otherwise.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 v2: Rebased (conflicted with PATCH v2 01/33)

 meta/recipes-devtools/dpkg/dpkg.inc | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 4fd0f2a..4e39fba 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -1,13 +1,10 @@
 SUMMARY = "Package maintenance system from Debian"
 LICENSE = "GPLv2.0+"
 SECTION = "base"
+DEPENDS = "perl"
+DEPENDS_append_class-native = " bzip2-replacement-native"
 PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
 
-DEPENDS = "zlib bzip2 perl ncurses"
-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"
-
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
 
 inherit autotools gettext perlnative pkgconfig systemd
@@ -27,17 +24,18 @@ 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 ??= "bzip2 gzip start-stop-daemon ${UA}"
+PACKAGECONFIG[bzip2] = "--with-bz2,--without-bz2,bzip2"
+PACKAGECONFIG[dselect] = "--enable-dselect,--disable-dselect,ncurses"
+PACKAGECONFIG[gzip] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
+PACKAGECONFIG[start-stop-daemon] = "--enable-start-stop-daemon,--disable-start-stop-daemon"
 PACKAGECONFIG[update-alternatives] = "--enable-update-alternatives,--disable-update-alternatives"
+PACKAGECONFIG[xz] = "--with-liblzma,--without-liblzma,xz"
+
+DPKG_DEB_COMPRESSOR ?= "${@bb.utils.contains('PACKAGECONFIG', 'xz', 'xz', 'gzip', d)}"
 
-EXTRA_OECONF = "\
-		--disable-dselect \
-		--enable-start-stop-daemon \
-		--with-zlib \
-		--with-bz2 \
-		--without-liblzma \
-		--without-selinux \
-		"
+EXTRA_OECONF += "--with-dpkg-deb-compressor=${DPKG_DEB_COMPRESSOR}"
 
 EXTRA_OECONF += "TAR=tar"
 EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
@@ -71,6 +69,10 @@ do_install_append () {
 }
 
 PACKAGES =+ "update-alternatives-dpkg"
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} run-postinsts perl"
+RDEPENDS_${PN}_class-native = ""
+
 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"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 19/33] apt: recommend gnupg
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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 2c4f11d..4d781a2 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -109,6 +109,9 @@ PACKAGES =+ "${PN}-dselect ${PN}-transport-https ${PN}-utils lib${PN}-inst lib${
 RDEPENDS_${PN} = "dpkg debianutils"
 RDEPENDS_${PN}-dselect = "bash"
 
+RRECOMMENDS_${PN} = "gnupg"
+RRECOMMENDS_${PN}_class-native = ""
+
 FILES_${PN} += "${libdir}/dpkg"
 FILES_${PN}-dselect = "${libdir}/dpkg/methods/apt"
 FILES_${PN}-transport-https = "${libdir}/apt/methods/https"
-- 
2.7.4



^ permalink raw reply related

* [PATCH v2 18/33] apt: more fine-grained 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 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb
index a350b36..2c4f11d 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -104,13 +104,18 @@ do_install_append_class-target() {
     echo 'APT::Architecture "${DPKG_ARCH}";' > ${D}${sysconfdir}/apt/apt.conf
 }
 
-PACKAGES =+ "${PN}-utils"
+PACKAGES =+ "${PN}-dselect ${PN}-transport-https ${PN}-utils lib${PN}-inst lib${PN}-pkg"
 
-RDEPENDS_${PN} = "dpkg bash debianutils"
+RDEPENDS_${PN} = "dpkg debianutils"
+RDEPENDS_${PN}-dselect = "bash"
 
 FILES_${PN} += "${libdir}/dpkg"
+FILES_${PN}-dselect = "${libdir}/dpkg/methods/apt"
+FILES_${PN}-transport-https = "${libdir}/apt/methods/https"
 FILES_${PN}-utils = "${bindir}/apt-extracttemplates \
                      ${bindir}/apt-ftparchive \
                      ${bindir}/apt-sortpkgs"
+FILES_lib${PN}-inst = "${libdir}/libapt-inst${SOLIBS}"
+FILES_lib${PN}-pkg = "${libdir}/libapt-pkg${SOLIBS}"
 
 BBCLASSEXTEND = "native"
-- 
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

* [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 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 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


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox