All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dpkg: Add PACKAGECONFIG for liblzma and enable it
@ 2017-03-31 14:09 Richard Purdie
  2017-03-31 19:42 ` Matt Madison
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2017-03-31 14:09 UTC (permalink / raw)
  To: openembedded-core

liblzma is part of xz and we already build it but configure it out. This makes
no sense. Enabling it means we gain multithreaded compression and it speeds
dpkg-deb up massively. It also removes the fork overhead of separate xz processes.

Turning the existing config into a PACKAGECONFIG and turning it on by default
therefore makes best use of what we have available.

The manual RDEPENDS are no longer needed since it uses liblzma which is picked
up by the shlibs code magically.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 6abe3ae..870117a 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -4,8 +4,8 @@ SECTION = "base"
 
 DEPENDS = "zlib bzip2 perl ncurses"
 DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz perl"
-RDEPENDS_${PN}_class-native = "xz-native"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
+RDEPENDS_${PN}_class-native = ""
 
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
 
@@ -28,10 +28,12 @@ EXTRA_OECONF = "\
 		--enable-start-stop-daemon \
 		--with-libz \
 		--with-libbz2 \
-		--without-liblzma \
 		--without-libselinux \
 		"
 
+PACKAGECONFIG = "liblzma"
+PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
+
 EXTRA_OECONF += "TAR=tar"
 EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dpkg: Add PACKAGECONFIG for liblzma and enable it
  2017-03-31 14:09 [PATCH] dpkg: Add PACKAGECONFIG for liblzma and enable it Richard Purdie
@ 2017-03-31 19:42 ` Matt Madison
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Madison @ 2017-03-31 19:42 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Fri, Mar 31, 2017 at 7:09 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> liblzma is part of xz and we already build it but configure it out. This makes
> no sense. Enabling it means we gain multithreaded compression and it speeds
> dpkg-deb up massively. It also removes the fork overhead of separate xz processes.
>
> Turning the existing config into a PACKAGECONFIG and turning it on by default
> therefore makes best use of what we have available.
>
> The manual RDEPENDS are no longer needed since it uses liblzma which is picked
> up by the shlibs code magically.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Yes, please.  I've been using dpkg configured this way for a month or
so on my deb-based distro, and was going to submit a patch for this
myself.  The performance improvement during packaging is significant,
and I haven't seen any downsides.

Thanks,
-Matt

> ---
>  meta/recipes-devtools/dpkg/dpkg.inc | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
> index 6abe3ae..870117a 100644
> --- a/meta/recipes-devtools/dpkg/dpkg.inc
> +++ b/meta/recipes-devtools/dpkg/dpkg.inc
> @@ -4,8 +4,8 @@ SECTION = "base"
>
>  DEPENDS = "zlib bzip2 perl ncurses"
>  DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
> -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz perl"
> -RDEPENDS_${PN}_class-native = "xz-native"
> +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
> +RDEPENDS_${PN}_class-native = ""
>
>  UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
>
> @@ -28,10 +28,12 @@ EXTRA_OECONF = "\
>                 --enable-start-stop-daemon \
>                 --with-libz \
>                 --with-libbz2 \
> -               --without-liblzma \
>                 --without-libselinux \
>                 "
>
> +PACKAGECONFIG = "liblzma"
> +PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
> +
>  EXTRA_OECONF += "TAR=tar"
>  EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-31 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 14:09 [PATCH] dpkg: Add PACKAGECONFIG for liblzma and enable it Richard Purdie
2017-03-31 19:42 ` Matt Madison

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.