From ad1db93d134db1ec4f6d6598c9741dc13e82e1f3 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 28 May 2019 06:32:10 +0800 Subject: Revert "pigz: pigz is not gzip" 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 Signed-off-by: Richard Purdie --- meta/conf/distro/include/default-providers.inc | 1 + meta/recipes-extended/pigz/pigz_2.4.bb | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'meta') 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.*)\.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" -- cgit 1.2.3-korg