* [PATCH 1/2] Revert "pigz: pigz is not gzip"
@ 2019-05-27 13:44 Anuj Mittal
2019-05-27 13:44 ` [PATCH 2/2] Revert "image_types: use pigz to create .gz files" Anuj Mittal
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Anuj Mittal @ 2019-05-27 13:44 UTC (permalink / raw)
To: openembedded-core
This reverts commit a54c59f2a24904daffe51582b6863eebd071db0d.
The compatibility issues have since been resolved [1][2] and pigz 2.4
annoucement also states that this can be considered as a drop-in
replacemment [3] now.
[1] https://github.com/madler/pigz/commit/33c140e5fdc5cd639d1e7cc3c5e52ec016aa8a65
[2] https://github.com/madler/pigz/commit/6fda8570f633ec582ba72ea00dad2bbac825bc17
[3] https://zlib.net/pipermail/pigz-announce_zlib.net/2017-December/000028.html
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
.../conf/distro/include/default-providers.inc | 1 +
meta/recipes-extended/pigz/pigz_2.4.bb | 21 ++++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 21419038f0..2be3378773 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -42,6 +42,7 @@ PREFERRED_PROVIDER_opkg ?= "opkg"
PREFERRED_PROVIDER_opkg-native ?= "opkg-native"
PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
PREFERRED_PROVIDER_console-tools ?= "kbd"
+PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
PREFERRED_RPROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
diff --git a/meta/recipes-extended/pigz/pigz_2.4.bb b/meta/recipes-extended/pigz/pigz_2.4.bb
index 6e6da9c3c5..89ad82ea91 100644
--- a/meta/recipes-extended/pigz/pigz_2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.4.bb
@@ -12,6 +12,8 @@ SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
# Point this at the homepage in case /fossils/ isn't updated
+PROVIDES_class-native += "gzip-native"
+
UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
@@ -19,7 +21,9 @@ DEPENDS = "zlib"
EXTRA_OEMAKE = "-e MAKEFLAGS="
-do_install() {
+inherit update-alternatives
+
+do_install_class-target() {
# Install files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
install ${B}/pigz ${D}${base_bindir}/pigz
@@ -27,4 +31,19 @@ do_install() {
ln -nsf pigz ${D}${base_bindir}/pigzcat
}
+do_install() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ ln -nsf gzip ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/zcat
+}
+
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN} = "gunzip gzip zcat"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
+ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
+ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+ALTERNATIVE_TARGET = "${base_bindir}/pigz"
+
BBCLASSEXTEND = "native nativesdk"
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Revert "image_types: use pigz to create .gz files"
2019-05-27 13:44 [PATCH 1/2] Revert "pigz: pigz is not gzip" Anuj Mittal
@ 2019-05-27 13:44 ` Anuj Mittal
2019-06-11 22:51 ` Martin Jansa
2019-05-27 17:34 ` [PATCH 1/2] Revert "pigz: pigz is not gzip" Adrian Bunk
2019-05-27 22:32 ` [PATCH v2] " Anuj Mittal
2 siblings, 1 reply; 5+ messages in thread
From: Anuj Mittal @ 2019-05-27 13:44 UTC (permalink / raw)
To: openembedded-core
This reverts commit a559ffab30b7b45849ace023808c1fb20811d43d.
This is not needed now that pigz has been marked as a drop-in
replacement.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/classes/image_types.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 1c44ec4a80..fd98a7d1bd 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -284,7 +284,7 @@ COMPRESSIONTYPES ?= ""
CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}"
CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_gz = "pigz -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_gz = "gzip -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Revert "pigz: pigz is not gzip"
2019-05-27 13:44 [PATCH 1/2] Revert "pigz: pigz is not gzip" Anuj Mittal
2019-05-27 13:44 ` [PATCH 2/2] Revert "image_types: use pigz to create .gz files" Anuj Mittal
@ 2019-05-27 17:34 ` Adrian Bunk
2019-05-27 22:32 ` [PATCH v2] " Anuj Mittal
2 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2019-05-27 17:34 UTC (permalink / raw)
To: Anuj Mittal; +Cc: openembedded-core
On Mon, May 27, 2019 at 09:44:18PM +0800, Anuj Mittal wrote:
> This reverts commit a54c59f2a24904daffe51582b6863eebd071db0d.
>...
> # Point this at the homepage in case /fossils/ isn't updated
> +PROVIDES_class-native += "gzip-native"
> +
> UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
> UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
>...
This moves the comment to the wrong place.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] Revert "pigz: pigz is not gzip"
2019-05-27 13:44 [PATCH 1/2] Revert "pigz: pigz is not gzip" Anuj Mittal
2019-05-27 13:44 ` [PATCH 2/2] Revert "image_types: use pigz to create .gz files" Anuj Mittal
2019-05-27 17:34 ` [PATCH 1/2] Revert "pigz: pigz is not gzip" Adrian Bunk
@ 2019-05-27 22:32 ` Anuj Mittal
2 siblings, 0 replies; 5+ messages in thread
From: Anuj Mittal @ 2019-05-27 22:32 UTC (permalink / raw)
To: openembedded-core
This reverts commit a54c59f2a24904daffe51582b6863eebd071db0d.
The compatibility issues have since been resolved [1][2] and pigz 2.4
annoucement also states that this can be considered as a drop-in
replacemment [3] now.
[1] https://github.com/madler/pigz/commit/33c140e5fdc5cd639d1e7cc3c5e52ec016aa8a65
[2] https://github.com/madler/pigz/commit/6fda8570f633ec582ba72ea00dad2bbac825bc17
[3] https://zlib.net/pipermail/pigz-announce_zlib.net/2017-December/000028.html
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
.../conf/distro/include/default-providers.inc | 1 +
meta/recipes-extended/pigz/pigz_2.4.bb | 21 ++++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 21419038f0..2be3378773 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -42,6 +42,7 @@ PREFERRED_PROVIDER_opkg ?= "opkg"
PREFERRED_PROVIDER_opkg-native ?= "opkg-native"
PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
PREFERRED_PROVIDER_console-tools ?= "kbd"
+PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
PREFERRED_RPROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
diff --git a/meta/recipes-extended/pigz/pigz_2.4.bb b/meta/recipes-extended/pigz/pigz_2.4.bb
index 6e6da9c3c5..974c035147 100644
--- a/meta/recipes-extended/pigz/pigz_2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.4.bb
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline
SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
+PROVIDES_class-native += "gzip-native"
+
# Point this at the homepage in case /fossils/ isn't updated
UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
@@ -19,7 +21,9 @@ DEPENDS = "zlib"
EXTRA_OEMAKE = "-e MAKEFLAGS="
-do_install() {
+inherit update-alternatives
+
+do_install_class-target() {
# Install files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
install ${B}/pigz ${D}${base_bindir}/pigz
@@ -27,4 +31,19 @@ do_install() {
ln -nsf pigz ${D}${base_bindir}/pigzcat
}
+do_install() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ ln -nsf gzip ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/zcat
+}
+
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN} = "gunzip gzip zcat"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
+ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
+ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+ALTERNATIVE_TARGET = "${base_bindir}/pigz"
+
BBCLASSEXTEND = "native nativesdk"
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Revert "image_types: use pigz to create .gz files"
2019-05-27 13:44 ` [PATCH 2/2] Revert "image_types: use pigz to create .gz files" Anuj Mittal
@ 2019-06-11 22:51 ` Martin Jansa
0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2019-06-11 22:51 UTC (permalink / raw)
To: Anuj Mittal; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 2569 bytes --]
This is just FYI:
This probably won't happen with most of OE use-cases, but even with pigz
being the drop in replacement, there are some differences, e.g. when I'm
using pigz-2.4 on my Gentoo host as gzip, xmltex-1.9.tar.gz fails to unpack
gzip: warning:
/tmp/tmpfs/portage/dev-tex/xmltex-1.9-r2/distdir/xmltex-1.9.tar.gz:
trailing junk was ignored
ERROR: dev-tex/xmltex-1.9-r2::gentoo failed (unpack phase):
unpack: failure unpacking xmltex-1.9.tar.gz
yes xmltex-1.9.tar.gz has something strange in the archive and emerge
should ignore the error from gzip (gzip itself shows it only as a warning),
but it doesn't and it's a bit confusing to find out that gzip is actually
pigz for someone who didn't see this commit :).
On Mon, May 27, 2019 at 3:44 PM Anuj Mittal <anuj.mittal@intel.com> wrote:
> This reverts commit a559ffab30b7b45849ace023808c1fb20811d43d.
>
> This is not needed now that pigz has been marked as a drop-in
> replacement.
>
> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> ---
> meta/classes/image_types.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/image_types.bbclass
> b/meta/classes/image_types.bbclass
> index 1c44ec4a80..fd98a7d1bd 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -284,7 +284,7 @@ COMPRESSIONTYPES ?= ""
>
> CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum
> sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64
> ${COMPRESSIONTYPES}"
> CONVERSION_CMD_lzma = "lzma -k -f -7
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
> -CONVERSION_CMD_gz = "pigz -f -9 -n -c
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} >
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
> +CONVERSION_CMD_gz = "gzip -f -9 -n -c
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} >
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
> CONVERSION_CMD_bz2 = "pbzip2 -f -k
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
> CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS}
> --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} >
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
> CONVERSION_CMD_lz4 = "lz4 -9 -z -l
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 3315 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-11 22:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 13:44 [PATCH 1/2] Revert "pigz: pigz is not gzip" Anuj Mittal
2019-05-27 13:44 ` [PATCH 2/2] Revert "image_types: use pigz to create .gz files" Anuj Mittal
2019-06-11 22:51 ` Martin Jansa
2019-05-27 17:34 ` [PATCH 1/2] Revert "pigz: pigz is not gzip" Adrian Bunk
2019-05-27 22:32 ` [PATCH v2] " Anuj Mittal
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.