diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2011-04-25 13:37:00 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:45:18 +0200 |
commit | 75a4a592e5ccda30715f93563d741b83e0dcf39e (patch) | |
tree | 502f745607e77a2c4386ad38d818ddcafe81489c /source/a/rpm2tgz | |
parent | b76270bf9e6dd375e495fec92140a79a79415d27 (diff) | |
download | current-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.gz |
Slackware 13.37slackware-13.37
Mon Apr 25 13:37:00 UTC 2011
Slackware 13.37 x86_64 stable is released!
Thanks to everyone who pitched in on this release: the Slackware team,
the folks producing upstream code, and linuxquestions.org for providing
a great forum for collaboration and testing.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
As always, thanks to the Slackware community for testing, suggestions,
and feedback. :-)
Have fun!
Diffstat (limited to 'source/a/rpm2tgz')
4 files changed, 177 insertions, 2 deletions
diff --git a/source/a/rpm2tgz/patches/0007-Add-support-for-.txz-packages-and-rpm2txz-symlink.patch b/source/a/rpm2tgz/patches/0007-Add-support-for-.txz-packages-and-rpm2txz-symlink.patch new file mode 100644 index 00000000..2a8c0537 --- /dev/null +++ b/source/a/rpm2tgz/patches/0007-Add-support-for-.txz-packages-and-rpm2txz-symlink.patch @@ -0,0 +1,62 @@ +From 9399788e2b36fc5e345d679f650f8387376987af Mon Sep 17 00:00:00 2001 +From: Igor Murzov <igor@gplsoft.org> +Date: Thu, 5 Aug 2010 02:09:56 +0400 +Subject: [PATCH 07/09] Add support for .txz packages and rpm2txz symlink + +--- + rpm2targz | 20 +++++++++++++++----- + rpm2tgz.SlackBuild | 1 + + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/rpm2targz b/rpm2targz +index cc25407..45ac1d7 100644 +--- a/rpm2targz ++++ b/rpm2targz +@@ -23,6 +23,7 @@ + # + + CWD=$(pwd) ++NAME="$(basename $0)" + + # Breaking the help out into it's own deal + usage() { +@@ -31,9 +32,13 @@ usage() { + echo " with \"installpkg\", \"removepkg\", \"pkgtool\", or manually" + echo " with \"tar\")" + echo +- if [ "$(basename $0)" = "rpm2tgz" ]; then ++ if [ "$NAME" = "rpm2tgz" -o "$NAME" = "rpm2txz" ]; then + echo "Usage: $0 [OPTION] <file.rpm>" +- echo " (Outputs \"file.tgz\")" ++ if [ "$NAME" = "rpm2tgz" ]; then ++ echo " (Outputs \"file.tgz\")" ++ else ++ echo " (Outputs \"file.txz\")" ++ fi + echo + echo " -s extract the install scripts to /usr/doc/\$PRGNAM-\$VERSION/" + echo " for review." +@@ -210,15 +215,20 @@ for i in $* ; do + # If this program was called as "rpm2targz", then repack as a plain + # tar+gz archive. If it was called as "rpm2tgz", use Slackware's + # makepkg to produce the .tgz: +- if [ "$(basename $0)" = "rpm2tgz" ]; then ++ if [ "$NAME" = "rpm2tgz" -o "$NAME" = "rpm2txz" ]; then ++ if [ "$NAME" = "rpm2tgz" ]; then ++ EXT=tgz ++ else ++ EXT=txz ++ fi + ( + if [ "$META_NAME" = "true" ]; then + get_meta_data $i + cd $TMPDIR +- /sbin/makepkg -l y -c n $CWD/$PRGNAM-$VERSION-$ARCH-${BUILD}.tgz ++ /sbin/makepkg -l y -c n $CWD/$PRGNAM-$VERSION-$ARCH-${BUILD}.$EXT + else + cd $TMPDIR +- /sbin/makepkg -l y -c n $CWD/$(basename $i .rpm).tgz ++ /sbin/makepkg -l y -c n $CWD/$(basename $i .rpm).$EXT + fi + ) + else diff --git a/source/a/rpm2tgz/patches/0008-Avoid-none-values-in-slack-desc.patch b/source/a/rpm2tgz/patches/0008-Avoid-none-values-in-slack-desc.patch new file mode 100644 index 00000000..575f2bb5 --- /dev/null +++ b/source/a/rpm2tgz/patches/0008-Avoid-none-values-in-slack-desc.patch @@ -0,0 +1,36 @@ +From 31205a87c10659e5e4534825e8aece34c5b6dba8 Mon Sep 17 00:00:00 2001 +From: Igor Murzov <igor@gplsoft.org> +Date: Thu, 5 Aug 2010 11:22:31 +0400 +Subject: [PATCH 08/09] Avoid (none) values in slack-desc + +--- + rpm2targz | 13 ++++++++++++- + 1 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/rpm2targz b/rpm2targz +index 45ac1d7..d9d6a8b 100644 +--- a/rpm2targz ++++ b/rpm2targz +@@ -209,7 +209,18 @@ for i in $* ; do + if [ "$DESC" = "true" ]; then + get_meta_data $i + mkdir -p $TMPDIR/install +- rpm -qp --qf '%{NAME} (%{SUMMARY})\n\n%{DESCRIPTION}\n\n %{URL}\n' $i | head -n 11 | sed -r "s/^/$PRGNAM: /" > $TMPDIR/install/slack-desc ++ if [ "$(rpm -qp --qf %{SUMMARY} $i )" != '(none)' ] ; then ++ rpm -qp --qf "$PRGNAM (%{SUMMARY})\n\n" $i > $TMPDIR/install/slack-desc ++ else ++ echo -en "$PRGNAM\n\n" > $TMPDIR/install/slack-desc ++ fi ++ if [ "$(rpm -qp --qf %{DESCRIPTION} $i )" != '(none)' ] ; then ++ rpm -qp --qf "%{DESCRIPTION}\n\n" $i >> $TMPDIR/install/slack-desc ++ fi ++ if [ "$(rpm -qp --qf %{URL} $i )" != '(none)' ] ; then ++ rpm -qp --qf " %{URL}\n" $i >> $TMPDIR/install/slack-desc ++ fi ++ sed -ri "s/^/$PRGNAM: /;11q" $TMPDIR/install/slack-desc + fi + + # If this program was called as "rpm2targz", then repack as a plain +-- +1.7.1 + diff --git a/source/a/rpm2tgz/patches/0009-Add-c-option-just-as-makepkg-c-y.patch b/source/a/rpm2tgz/patches/0009-Add-c-option-just-as-makepkg-c-y.patch new file mode 100644 index 00000000..6768401a --- /dev/null +++ b/source/a/rpm2tgz/patches/0009-Add-c-option-just-as-makepkg-c-y.patch @@ -0,0 +1,70 @@ +From 7664b10014e4ca5b0f498d5c774653a44fdaf0e1 Mon Sep 17 00:00:00 2001 +From: Igor Murzov <igor@gplsoft.org> +Date: Fri, 6 Aug 2010 01:05:41 +0400 +Subject: [PATCH 09/09] Add -c option (just as makepkg -c y) + +--- + rpm2targz | 17 ++++++++++++++--- + 1 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/rpm2targz b/rpm2targz +index d9d6a8b..f3e51d6 100644 +--- a/rpm2targz ++++ b/rpm2targz +@@ -49,6 +49,7 @@ usage() { + echo " -r extract what the rpm's \"requires\" (dependencies)" + echo " as documention to /usr/doc/\$PRGNAM-\$VERSION/" + echo " -d attempt a wellformed slack-desc from the rpm meta data" ++ echo " -c reset all directory permissions to 755 and ownership to root:root." + echo + else + echo "Usage: $0 <file.rpm>" +@@ -98,7 +99,7 @@ if [ "$1" = "" ]; then + usage + fi + +-ARGS=$(getopt "hsSndr" $* ) ++ARGS=$(getopt "hsSndrc" $* ) + set -- ${ARGS} + for i; do + case "$1" in +@@ -122,6 +123,10 @@ for i; do + META_NAME="true" + shift + ;; ++ -c) ++ CHOWN="true" ++ shift ++ ;; + --) + shift + break +@@ -223,6 +228,12 @@ for i in $* ; do + sed -ri "s/^/$PRGNAM: /;11q" $TMPDIR/install/slack-desc + fi + ++ # Supply -c y to makepkg if asked ++ COPT="n" ++ if [ "$CHOWN" = "true" ]; then ++ COPT="y" ++ fi ++ + # If this program was called as "rpm2targz", then repack as a plain + # tar+gz archive. If it was called as "rpm2tgz", use Slackware's + # makepkg to produce the .tgz: +@@ -236,10 +247,10 @@ for i in $* ; do + if [ "$META_NAME" = "true" ]; then + get_meta_data $i + cd $TMPDIR +- /sbin/makepkg -l y -c n $CWD/$PRGNAM-$VERSION-$ARCH-${BUILD}.$EXT ++ /sbin/makepkg -l y -c $COPT $CWD/$PRGNAM-$VERSION-$ARCH-${BUILD}.$EXT + else + cd $TMPDIR +- /sbin/makepkg -l y -c n $CWD/$(basename $i .rpm).$EXT ++ /sbin/makepkg -l y -c $COPT $CWD/$(basename $i .rpm).$EXT + fi + ) + else +-- +1.7.1 + diff --git a/source/a/rpm2tgz/rpm2tgz.SlackBuild b/source/a/rpm2tgz/rpm2tgz.SlackBuild index c6d76609..c32e490c 100755 --- a/source/a/rpm2tgz/rpm2tgz.SlackBuild +++ b/source/a/rpm2tgz/rpm2tgz.SlackBuild @@ -20,7 +20,7 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=1.2.1 +VERSION=1.2.2 BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: @@ -61,11 +61,18 @@ cat $CWD/rpm2targz > $PKG/usr/bin/rpm2targz # Not applied. Rationale: .tgz works with all versions of Slackware. # Translated RPMs may be targeting systems with no .txz support. #zcat $CWD/patches/0006-should-we-use-.txz-format-in-slackware-current.patch.gz | patch -p1 || exit 1 - # mv the script back: + # OK, I will take this version of the patch, as it doesn't change the + # default behaviour of rpm2tgz. + # mv the script back (wow, this is rather random ;-) mv rpm2tgz rpm2targz + zcat $CWD/patches/0007-Add-support-for-.txz-packages-and-rpm2txz-symlink.patch.gz | patch -p1 || exit 1 + zcat $CWD/patches/0008-Avoid-none-values-in-slack-desc.patch.gz | patch -p1 || exit 1 + zcat $CWD/patches/0009-Add-c-option-just-as-makepkg-c-y.patch.gz | patch -p1 || exit 1 ) || exit 1 ( cd $PKG/usr/bin ; ln -sf rpm2targz rpm2tgz ) +( cd $PKG/usr/bin ; ln -sf rpm2targz rpm2txz ) + chmod 755 $PKG/usr/bin/{rpmoffset,rpm2targz} mkdir -p $PKG/usr/doc/rpm2targz cp -a $CWD/rpm2targz.README $PKG/usr/doc/rpm2targz/rpm2targz.README |