aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gzip
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-10-07 10:45:37 -0700
committerChris Larson <chris_larson@mentor.com>2010-10-07 11:30:32 -0700
commit4a26ee3d7e77a6794ce27778c9b1eb98186faddc (patch)
treef462619ebd36781b1b3571540cae94bc227ec327 /recipes/gzip
parent74e1d02aab90d7ebac0f348fe88d3b63ab8ca17b (diff)
downloadopenembedded-4a26ee3d7e77a6794ce27778c9b1eb98186faddc.tar.gz
gzip: update to 1.4, add native
- CVE-2010-0001 affects gzip < 1.4, so updated to 1.4. Also removed prior version, as no distributions appeared to pin it. - Added BBCLASSEXTEND="native" - Added myself as the maintainer in MAINTAINERS - Move all binaries into /bin, not just the 3 we use with update-alternatives. - Simplify the recipe, run oe-stylize + tweaks Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'recipes/gzip')
-rw-r--r--recipes/gzip/gzip-1.3.13/configure.patch15
-rw-r--r--recipes/gzip/gzip_1.3.13.bb38
-rw-r--r--recipes/gzip/gzip_1.4.bb46
3 files changed, 46 insertions, 53 deletions
diff --git a/recipes/gzip/gzip-1.3.13/configure.patch b/recipes/gzip/gzip-1.3.13/configure.patch
deleted file mode 100644
index 55e8c77345..0000000000
--- a/recipes/gzip/gzip-1.3.13/configure.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: gzip-1.3.13/configure.ac
-===================================================================
---- gzip-1.3.13.orig/configure.ac 2010-03-15 13:15:37.457912205 +0800
-+++ gzip-1.3.13/configure.ac 2010-03-15 13:17:46.497912101 +0800
-@@ -27,8 +27,8 @@
- AC_CONFIG_SRCDIR(gzip.c)
- AC_CONFIG_AUX_DIR(build-aux)
- AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
--AM_INIT_AUTOMAKE([1.11 dist-xz])
--AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
-+AM_INIT_AUTOMAKE([1.10])
-+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
- AC_PROG_CC_STDC
- AM_PROG_CC_C_O
diff --git a/recipes/gzip/gzip_1.3.13.bb b/recipes/gzip/gzip_1.3.13.bb
deleted file mode 100644
index a4dadea5e2..0000000000
--- a/recipes/gzip/gzip_1.3.13.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-LICENSE = "GPL"
-SECTION = "console/utils"
-PRIORITY = "required"
-DESCRIPTION = "gzip (GNU zip) is a compression utility designed \
-to be a replacement for 'compress'. The GNU Project uses it as \
-the standard compression program for its system."
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz;name=src \
- file://configure.patch"
-SRC_URI[src.md5sum] = "c54a31b93e865f6a4410b2dc64662706"
-SRC_URI[src.sha256sum] = "1d06ff9f5c523651bed3dcde6e6aa8118eee48b22534a157a2588705fa517ca3"
-
-S = "${WORKDIR}/gzip-${PV}"
-
-inherit autotools
-
-do_install () {
- autotools_do_install
- # Rename and move files into /bin (FHS)
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip.${PN}
- mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip.${PN}
- mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat.${PN}
-}
-
-pkg_postinst_${PN} () {
- update-alternatives --install ${base_bindir}/gunzip gunzip gunzip.${PN} 100
- update-alternatives --install ${base_bindir}/gzip gzip gzip.${PN} 100
- update-alternatives --install ${base_bindir}/zcat zcat zcat.${PN} 100
-}
-
-pkg_prerm_${PN} () {
- update-alternatives --remove gunzip gunzip.${PN}
- update-alternatives --remove gzip gzip.${PN}
- update-alternatives --remove zcat zcat.${PN}
-}
-
diff --git a/recipes/gzip/gzip_1.4.bb b/recipes/gzip/gzip_1.4.bb
new file mode 100644
index 0000000000..2c9e571389
--- /dev/null
+++ b/recipes/gzip/gzip_1.4.bb
@@ -0,0 +1,46 @@
+DESCRIPTION = "gzip (GNU zip) is a compression utility designed \
+to be a replacement for 'compress'. The GNU Project uses it as \
+the standard compression program for its system."
+SECTION = "console/utils"
+PRIORITY = "required"
+LICENSE = "GPL"
+PR = "1"
+
+SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz"
+SRC_URI[md5sum] = "e381b8506210c794278f5527cba0e765"
+SRC_URI[sha256sum] = "d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"
+
+alternatives = "gunzip gzip zcat"
+
+do_install () {
+ autotools_do_install
+ # Move files into /bin (FHS)
+ install -d ${D}${base_bindir}
+ for file in ${D}${bindir}/*; do
+ mv $file ${D}${base_bindir}/
+ done
+}
+
+do_install_append_pn-gzip () {
+ for alternative in ${alternatives}; do
+ mv ${D}${base_bindir}/$alternative ${D}${base_bindir}/$alternative.${PN}
+ done
+}
+
+pkg_prerm_${PN} () {
+ for alternative in ${alternatives}; do
+ mv ${D}${base_bindir}/$alternative ${D}${base_bindir}/$alternative.${PN}
+ update-alternatives --remove $alternative $alternative.${PN}
+ done
+}
+
+pkg_postinst_${PN} () {
+ for alternative in ${alternatives}; do
+ mv ${D}${base_bindir}/$alternative ${D}${base_bindir}/$alternative.${PN}
+ update-alternatives --install ${base_bindir}/$alternative $alternative $alternative.${PN} 100
+ done
+}