[arch-commits] Commit in rpmextract/repos (4 files)

Felix Yan felixonmars at archlinux.org
Sat May 16 10:36:10 UTC 2020


    Date: Saturday, May 16, 2020 @ 10:36:09
  Author: felixonmars
Revision: 384162

archrelease: copy trunk to staging-any

Added:
  rpmextract/repos/staging-any/
  rpmextract/repos/staging-any/PKGBUILD
    (from rev 384161, rpmextract/trunk/PKGBUILD)
  rpmextract/repos/staging-any/rpm2cpio
    (from rev 384161, rpmextract/trunk/rpm2cpio)
  rpmextract/repos/staging-any/rpmextract.sh
    (from rev 384161, rpmextract/trunk/rpmextract.sh)

---------------+
 PKGBUILD      |   19 +++++++++++++++++++
 rpm2cpio      |   26 ++++++++++++++++++++++++++
 rpmextract.sh |    6 ++++++
 3 files changed, 51 insertions(+)

Copied: rpmextract/repos/staging-any/PKGBUILD (from rev 384161, rpmextract/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2020-05-16 10:36:09 UTC (rev 384162)
@@ -0,0 +1,19 @@
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=rpmextract
+pkgver=1.0
+pkgrel=9
+pkgdesc="Script to convert or extract RPM archives (contains rpm2cpio)"
+url="http://www.archlinux.org"
+arch=('any')
+license=('GPL')
+depends=('bash' 'libarchive' 'coreutils')
+source=('rpmextract.sh' 'rpm2cpio')
+sha512sums=('2769f9d7b7831ed766bf06262eccc84c938390ff84443e704ba765f9d5ddaa46836d5d3b839d4853175d613d7b1f266e5ac8a18fa6f527ed0a445cb644b592dc'
+            'b086abd4bd861c0cc2cc7c103152d7254e60a917add17ccf5c4e352ab12690930982c7bdee44b89f12f082531da2fae152a48bc5b80959c187d0a29de29bac97')
+
+package() {
+  install -d "${pkgdir}"/usr/bin
+  install -m755 "${srcdir}"/rpmextract.sh "${pkgdir}"/usr/bin/
+  install -m755 "${srcdir}"/rpm2cpio "${pkgdir}"/usr/bin/
+}

Copied: rpmextract/repos/staging-any/rpm2cpio (from rev 384161, rpmextract/trunk/rpm2cpio)
===================================================================
--- staging-any/rpm2cpio	                        (rev 0)
+++ staging-any/rpm2cpio	2020-05-16 10:36:09 UTC (rev 384162)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+pkg=$1
+if [ "$pkg" = "" -o ! -e "$pkg" ]; then
+  echo "no package supplied" 1>&2
+  exit 1
+fi
+
+leadsize=96
+o=`expr $leadsize + 8`
+set `od -j $o -N 8 -t u1 $pkg`
+il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
+dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
+# echo "sig il: $il dl: $dl"
+
+sigsize=`expr 8 + 16 \* $il + $dl`
+o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
+set `od -j $o -N 8 -t u1 $pkg`
+il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
+dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
+# echo "hdr il: $il dl: $dl"
+
+hdrsize=`expr 8 + 16 \* $il + $dl`
+o=`expr $o + $hdrsize`
+
+dd if=$pkg ibs=$o skip=1 2>/dev/null

Copied: rpmextract/repos/staging-any/rpmextract.sh (from rev 384161, rpmextract/trunk/rpmextract.sh)
===================================================================
--- staging-any/rpmextract.sh	                        (rev 0)
+++ staging-any/rpmextract.sh	2020-05-16 10:36:09 UTC (rev 384162)
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ "$1" = "" -o ! -e "$1" ]; then
+    echo "no package supplied" 1>&2
+   exit 1
+fi
+rpm2cpio "$1" | bsdtar -xf -


More information about the arch-commits mailing list