Skip to contentSkip to conversation

expat: merge bb and inc

PATCH New Ross Burton 1 participant 4 messages Feb 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 expat: merge bb and inc

---
 meta/recipes-core/expat/expat.inc      | 25 -------------------------
 meta/recipes-core/expat/expat_2.2.5.bb | 28 +++++++++++++++++++++++++++-
 2 files changed, 27 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-core/expat/expat.inc
meta/recipes-core/expat/expat.inc deleted +0 -25
deleted file mode 100644
index 0ee6c276d99..00000000000
@@ -1,25 +0,0 @@
-SUMMARY = "A stream-oriented XML parser library"
-DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
-HOMEPAGE = "http://expat.sourceforge.net/"
-SECTION = "libs"
-LICENSE = "MIT"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
-           file://autotools.patch \
-           file://libtool-tag.patch \
-	  "
-
-SRC_URI_append_class-native = " file://no_getrandom.patch"
-
-inherit autotools lib_package
-
-# This package uses an archive format known to have issue with some
-# versions of gzip
-DEPENDS += "pigz-native"
-do_unpack[depends] += "pigz-native:do_populate_sysroot"
-
-do_configure_prepend () {
-	rm -f ${S}/conftools/libtool.m4
-}
-
-BBCLASSEXTEND = "native nativesdk"
meta/recipes-core/expat/expat_2.2.5.bb +27 -1
index 337287b93bc..f7a5b36ac74 100644
@@ -1,4 +1,30 @@
-require expat.inc
+SUMMARY = "A stream-oriented XML parser library"
+DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
+HOMEPAGE = "http://expat.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "MIT"
+
 LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
+           file://autotools.patch \
+           file://libtool-tag.patch \
+	  "
+
+SRC_URI_append_class-native = " file://no_getrandom.patch"
+
 SRC_URI[md5sum] = "789e297f547980fc9ecc036f9a070d49"
 SRC_URI[sha256sum] = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6"
+
+inherit autotools lib_package
+
+# This package uses an archive format known to have issue with some
+# versions of gzip
+DEPENDS += "pigz-native"
+do_unpack[depends] += "pigz-native:do_populate_sysroot"
+
+do_configure_prepend () {
+	rm -f ${S}/conftools/libtool.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/4 expat: remove old workaround for expat tarball

Back in 2010 the expat 2.0.1 tarball wouldn't unpack correctly with old gzip releases (prior to 1.4). The fix was to explicitly depend on gzip-native to use our binary instead of the host[1].

We don't ship expat 2.0.1 anymore, and even Centos 7 ships gzip 1.5, so this workaround can be removed.

[1] oe-core 0ff62b0462f3f64672bd4704de9a192eb1a730d1

---
 meta/recipes-core/expat/expat_2.2.5.bb | 5 -----
 1 file changed, 5 deletions(-)
meta/recipes-core/expat/expat_2.2.5.bb +0 -5
index f7a5b36ac74..bce59298e5b 100644
@@ -18,11 +18,6 @@ SRC_URI[sha256sum] = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d47335
 
 inherit autotools lib_package
 
-# This package uses an archive format known to have issue with some
-# versions of gzip
-DEPENDS += "pigz-native"
-do_unpack[depends] += "pigz-native:do_populate_sysroot"
-
 do_configure_prepend () {
 	rm -f ${S}/conftools/libtool.m4
 }
Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/4 pigz: pigz is not gzip

In reply to Ross Burton

Whilst pigz is effectively a parallel gzip, the command line arguments are not the same so pigz isn't a drop-in replacement for gzip.

[ YOCTO #12139 ]
[ YOCTO #12410 ]

---
 meta/conf/distro/include/default-providers.inc |  1 -
 meta/recipes-extended/pigz/pigz_2.4.bb         | 21 +--------------------
 2 files changed, 1 insertion(+), 21 deletions(-)
meta/conf/distro/include/default-providers.inc +0 -1
index c1cc97fccc7..e65c1ed323d 100644
@@ -42,7 +42,6 @@ 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
meta/recipes-extended/pigz/pigz_2.4.bb +1 -20
index cb41154dafe..20e4154434f 100644
@@ -8,8 +8,6 @@ SECTION = "console/utils"
 LICENSE = "Zlib & Apache-2.0"
 LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
 
-PROVIDES_class-native += "gzip-native"
-
 SRC_URI = "https://github.com/madler/pigz/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
 SRC_URI[md5sum] = "3c8a601db141d3013ef9fe5f2daaf73f"
 SRC_URI[sha256sum] = "e228e7d18b34c4ece8d596eb6eee97bde533c6beedbb728d07d3abe90b4b1b52"
@@ -21,9 +19,7 @@ DEPENDS = "zlib"
 
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
-inherit update-alternatives
-
-do_install_class-target() {
+do_install() {
 	# Install files into /bin (FHS), which is typical place for gzip
 	install -d ${D}${base_bindir}
 	install ${B}/pigz ${D}${base_bindir}/pigz
@@ -31,19 +27,4 @@ do_install_class-target() {
 	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"
Signature · 1 line
2.11.0
#3 lore raw

PATCH 4/4 pigz: use maintainer-built tarballs

In reply to Ross Burton
---
 meta/recipes-extended/pigz/pigz_2.4.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/recipes-extended/pigz/pigz_2.4.bb +4 -4
index 20e4154434f..6e6da9c3c56 100644
@@ -8,10 +8,10 @@ SECTION = "console/utils"
 LICENSE = "Zlib & Apache-2.0"
 LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
 
-SRC_URI = "https://github.com/madler/pigz/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
-SRC_URI[md5sum] = "3c8a601db141d3013ef9fe5f2daaf73f"
-SRC_URI[sha256sum] = "e228e7d18b34c4ece8d596eb6eee97bde533c6beedbb728d07d3abe90b4b1b52"
-
+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
 UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
 UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
 
Signature · 1 line
2.11.0