Accepting request 55228 from Base:System

Accepted submit request 55228 from user coolo

OBS-URL: https://build.opensuse.org/request/show/55228
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=113
This commit is contained in:
Marcus Rückert 2010-12-08 16:30:12 +00:00 committed by Git OBS Bridge
parent 31d208b713
commit 5efc08dde5
4 changed files with 100 additions and 7 deletions

View File

@ -1,5 +1,7 @@
--- ./scripts/brp-compress.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./scripts/brp-compress 2010-03-25 15:11:29.000000000 +0000
Index: scripts/brp-compress
===================================================================
--- scripts/brp-compress.orig
+++ scripts/brp-compress
@@ -1,16 +1,43 @@
-#!/bin/sh
+#!/bin/bash
@ -45,16 +47,51 @@
for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \
./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \
@@ -23,9 +50,9 @@ do
@@ -23,34 +50,34 @@ do
[ "`basename $f`" = "dir" ] && continue
case "$f" in
- *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
- *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.gz|*.Z) gunzip $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
*) b=$f;;
- *) b=$f;;
+ *.gz|*.Z) gunzip "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.\(gz\|Z\)$//'`";;
+ *.bz2) bunzip2 "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.bz2$//'`";;
+ *.xz|*.lzma) unxz "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`";;
+ *) b="$f";;
esac
- $COMPRESS $b </dev/null 2>/dev/null || {
+ $COMPRESS "$b" </dev/null 2>/dev/null || {
inode=`ls -i $b | awk '{ print $1 }'`
others=`find $d -type f -inum $inode`
if [ -n "$others" ]; then
for afile in $others ; do
- [ "$afile" != "$b" ] && rm -f $afile
+ [ "$afile" != "$b" ] && rm -f "$afile"
done
- $COMPRESS -f $b
+ $COMPRESS -f "$b"
for afile in $others ; do
- [ "$afile" != "$b" ] && ln $b$COMPRESS_EXT $afile$COMPRESS_EXT
+ [ "$afile" != "$b" ] && ln "$b$COMPRESS_EXT" "$afile$COMPRESS_EXT"
done
else
- $COMPRESS -f $b
+ $COMPRESS -f "$b"
fi
}
done
for f in `find $d -type l`
do
- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`
- rm -f $f
- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`
- ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT
+ l="`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`"
+ rm -f "$f"
+ b="`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`"
+ ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT"
done
done

44
initscriptsprov.diff Normal file
View File

@ -0,0 +1,44 @@
Index: rpm-4.8.0/autodeps/linux.prov
===================================================================
--- rpm-4.8.0.orig/autodeps/linux.prov 2010-12-08 15:16:12.984842683 +0100
+++ rpm-4.8.0/autodeps/linux.prov 2010-12-08 15:16:52.530842661 +0100
@@ -107,4 +107,9 @@ fi
[ -x /usr/lib/rpm/gstreamer-provides ] &&
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u
+#
+# --- Provides of sysvinit scripts
+[ -x /usr/lib/rpm/sysvinitdeps.sh ] &&
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/sysvinitdeps.sh -P | sort -u
+
exit 0
Index: rpm-4.8.0/scripts/sysvinitdeps.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ rpm-4.8.0/scripts/sysvinitdeps.sh 2010-12-08 15:17:11.183843303 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# -P blindly assumed
+while read file; do
+ case $file in
+ */etc/init.d/*)
+ provs=`grep '^# *Provides:' $file | sed 's,^.*:,,'`
+ for p in $provs; do
+ echo "sysvinit($p)"
+ done
+ ;;
+ esac
+done
Index: rpm-4.8.0/scripts/Makefile.am
===================================================================
--- rpm-4.8.0.orig/scripts/Makefile.am 2010-12-08 15:16:12.985844013 +0100
+++ rpm-4.8.0/scripts/Makefile.am 2010-12-08 15:16:52.531842720 +0100
@@ -40,6 +40,7 @@ rpmconfig_SCRIPTS = \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
fontconfig.prov desktop-file.prov \
+ sysvinitdeps.sh \
rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg
rpmconfig_DATA = \

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Dec 8 13:05:06 UTC 2010 - meissner@novell.com
- handle spaces in manpage filenames (like e.g. in boost).
-------------------------------------------------------------------
Tue Dec 7 14:33:33 UTC 2010 - coolo@novell.com
- add script to provide sysvinit(<PROV>) from /etc/init.d/*
-------------------------------------------------------------------
Fri Nov 19 16:09:20 UTC 2010 - chris@computersalat.de

View File

@ -118,6 +118,7 @@ Patch80: fixsbits.diff
Patch81: pkgconfig-0.24.diff
Patch82: rpm-gst-provides.patch
Patch83: langnoc.diff
Patch84: initscriptsprov.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -180,6 +181,7 @@ rm -f rpmdb/db.h
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
%patch -P 80 -P 81 -P 82 -P 83
%patch84 -p1
#chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov