[Lunar-commits] <moonbase> rpmunpack: Adding support for lzma compressed rpms

Stefan Wold ratler at lunar-linux.org
Sat Oct 31 22:57:40 CET 2009


commit 9bbee17353237d664ee001024359b0185cb41e7e
Author: Stefan Wold <ratler at lunar-linux.org>
Date:   Sat Oct 31 22:57:40 2009 +0100

    rpmunpack: Adding support for lzma compressed rpms
    
    Thanks to Peter de Ridder for supplying a patch.
---
 archive/rpmunpack/BUILD                      |    7 ++++---
 archive/rpmunpack/DEPENDS                    |    1 +
 archive/rpmunpack/DETAILS                    |    8 ++++++--
 archive/rpmunpack/plugin.d/unpack-rpm.plugin |    5 +++--
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/archive/rpmunpack/BUILD b/archive/rpmunpack/BUILD
index 9cb84b1..4d4fbfb 100644
--- a/archive/rpmunpack/BUILD
+++ b/archive/rpmunpack/BUILD
@@ -1,7 +1,8 @@
 (
-
+  cp ${SOURCE_CACHE}/$SOURCE2 rpm2cpio &&
+  patch_it $SOURCE3 1 &&
   make             &&
   prepare_install  &&
-  install  -s  rpmunpack  /usr/bin
-  install  ${SOURCE_CACHE}/rpm2cpio /usr/bin
+  install  -s  rpmunpack  /usr/bin &&
+  install  rpm2cpio /usr/bin
 ) > $C_FIFO 2>&1
diff --git a/archive/rpmunpack/DEPENDS b/archive/rpmunpack/DEPENDS
index 5abca13..6bb4087 100644
--- a/archive/rpmunpack/DEPENDS
+++ b/archive/rpmunpack/DEPENDS
@@ -1 +1,2 @@
 depends cpio
+depends xz
diff --git a/archive/rpmunpack/DETAILS b/archive/rpmunpack/DETAILS
index a9d7e1f..4b189c1 100644
--- a/archive/rpmunpack/DETAILS
+++ b/archive/rpmunpack/DETAILS
@@ -2,13 +2,17 @@
           VERSION=0
            SOURCE=$MODULE.tar.gz
           SOURCE2=rpm2cpio
+          SOURCE3=rpmunpack_lzma-1.patch
  SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE
-SOURCE2_DIRECTORY=$BUILD_DIRECTORY
        SOURCE_URL=http://www.ibiblio.org/pub/Linux/utils/package/
       SOURCE2_URL=http://www.iagora.com/~espel/
+      SOURCE3_URL=$PATCH_URL
+       SOURCE_VFY=sha1:2ac43b6727d149c64347faade0827ec0f7a839e2
+      SOURCE2_VFY=sha1:eb0175ecaf6f8b5386fed8b51f4edfc1441d7697
+      SOURCE3_VFY=sha1:e1a16dda3c48679549ac850aa834db491cfa113e
          WEB_SITE=unknown
           ENTERED=20011017
-          UPDATED=20040317
+          UPDATED=20091031
             SHORT="Program to extract an archive from a RPM file"
 cat << EOF
 This program converts rpm archives to cpio archives for cpio or afio.
diff --git a/archive/rpmunpack/plugin.d/unpack-rpm.plugin b/archive/rpmunpack/plugin.d/unpack-rpm.plugin
index 054c723..b02081f 100644
--- a/archive/rpmunpack/plugin.d/unpack-rpm.plugin
+++ b/archive/rpmunpack/plugin.d/unpack-rpm.plugin
@@ -6,6 +6,7 @@
 #############################################################
 #                                                           #
 # Copyright 2005 by Auke Kok under GPLv2                    #
+# Copyright 2009 by Stefan Wold under                   #
 #                                                           #
 #############################################################
 
@@ -13,12 +14,12 @@
 plugin_unpack_rpm() {
   case $1 in
     *.rpm)
-      if [ ! -x /usr/bin/rpmunpack ]; then
+      if [ ! -x /usr/bin/rpm2cpio ]; then
         message "${PROBLEM_COLOR}! Cannot unpack rpm files without ${MODULE_COLOR}rpmunpack${DEFAULT_COLOR}${PROBLEM_COLOR} installed${DEFAULT_COLOR}";
         exit 1
       fi
       debug_msg "Unpacking rpm file \"$1\""
-      rpmunpack < $1 | gzip -d | cpio -idm || return 1
+      rpm2cpio $1 | cpio -idm || return 1
       ;;
     *)
       # fallback: we don't know what to do!


More information about the Lunar-commits mailing list