This commit is contained in:
parent
090779a064
commit
8e55a85d14
3
RPM-Changes.html.tar.bz2
Normal file
3
RPM-Changes.html.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1b1d6954ea1c3fd4681d1419dbbae6907fac09ac9e8ea8cd33b08e930873e4c2
|
||||
size 9527
|
16
aloffbyone.diff
Normal file
16
aloffbyone.diff
Normal file
@ -0,0 +1,16 @@
|
||||
Fixes an off-by-one error in rpmalAllFileSatisfiesDepend() which
|
||||
could lead to a segfault.
|
||||
|
||||
Already included in rpm-4.4.7
|
||||
|
||||
--- ./lib/rpmal.c.orig 2005-12-14 20:53:12.000000000 +0000
|
||||
+++ ./lib/rpmal.c 2005-12-14 20:54:28.000000000 +0000
|
||||
@@ -744,7 +744,7 @@ rpmalAllFileSatisfiesDepend(const rpmal
|
||||
|
||||
/*@-branchstate@*/ /* FIX: ret is a problem */
|
||||
for (found = 0, ret = NULL;
|
||||
- die <= al->dirs + al->numDirs && dieCompare(die, dieNeedle) == 0;
|
||||
+ die < al->dirs + al->numDirs && dieCompare(die, dieNeedle) == 0;
|
||||
die++)
|
||||
{
|
||||
|
@ -1,27 +0,0 @@
|
||||
--- tools/elfdeps.c.orig 2011-06-03 13:12:32.000000000 +0000
|
||||
+++ tools/elfdeps.c 2011-06-03 13:17:45.000000000 +0000
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
int filter_private = 0;
|
||||
int soname_only = 0;
|
||||
+int assume_exec = 0;
|
||||
|
||||
typedef struct elfInfo_s {
|
||||
Elf *elf;
|
||||
@@ -226,7 +227,7 @@ static int processFile(const char *fn, i
|
||||
ei->isElf64 = 0;
|
||||
#endif
|
||||
ei->isDSO = (ehdr->e_type == ET_DYN);
|
||||
- ei->isExec = (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH));
|
||||
+ ei->isExec = assume_exec || (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH));
|
||||
|
||||
processSections(ei);
|
||||
}
|
||||
@@ -279,6 +280,7 @@ int main(int argc, char *argv[])
|
||||
{ "requires", 'R', POPT_ARG_VAL, &requires, -1, NULL, NULL },
|
||||
{ "filter-private", 0, POPT_ARG_VAL, &filter_private, -1, NULL, NULL },
|
||||
{ "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL },
|
||||
+ { "assume-exec", 0, POPT_ARG_VAL, &assume_exec, -1, NULL, NULL },
|
||||
POPT_AUTOHELP
|
||||
POPT_TABLEEND
|
||||
};
|
@ -1,6 +1,8 @@
|
||||
--- ./autodeps/linux.prov.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./autodeps/linux.prov 2011-05-11 14:27:40.000000000 +0000
|
||||
@@ -2,60 +2,72 @@
|
||||
Some (probably SUSE specific) changes to linux.prov and linux.req
|
||||
|
||||
--- ./autodeps/linux.prov.orig 2002-04-08 19:13:35.000000000 +0000
|
||||
+++ ./autodeps/linux.prov 2005-12-17 01:49:17.000000000 +0000
|
||||
@@ -2,60 +2,71 @@
|
||||
|
||||
# This script reads filenames from STDIN and outputs any relevant provides
|
||||
# information that needs to be included in the package.
|
||||
@ -91,9 +93,8 @@
|
||||
+#
|
||||
+# --- Mono exes/dlls
|
||||
+: ${MONO_PREFIX=/usr}
|
||||
+if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then
|
||||
+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides || echo "WARNING: MONO RPM PROVIDES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2
|
||||
+fi
|
||||
+[ -x $MONO_PREFIX/bin/mono -a -f $MONO_PREFIX/bin/mono-find-provides -a -n "$monolist" ] &&
|
||||
+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides
|
||||
+
|
||||
+#
|
||||
+# --- Kernel module exported symbols
|
||||
@ -101,20 +102,26 @@
|
||||
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@"
|
||||
|
||||
exit 0
|
||||
--- ./autodeps/linux.req.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./autodeps/linux.req 2011-05-11 14:28:45.000000000 +0000
|
||||
@@ -19,18 +19,21 @@ fi
|
||||
--- ./autodeps/linux.req.orig 2002-11-14 12:53:11.000000000 +0000
|
||||
+++ ./autodeps/linux.req 2005-12-17 01:50:07.000000000 +0000
|
||||
@@ -19,18 +19,22 @@ fi
|
||||
#
|
||||
# --- Grab the file manifest and classify files.
|
||||
#filelist=`sed "s/['\"]/\\\&/g"`
|
||||
-filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
|
||||
-exelist=`echo $filelist | xargs -r file | grep -Ev ":.* (commands|script) " | \
|
||||
-exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \
|
||||
- grep ":.*executable" | cut -d: -f1`
|
||||
-scriptlist=`echo $filelist | xargs -r file | \
|
||||
- grep -E ":.* (commands|script) " | cut -d: -f1`
|
||||
- egrep ":.* (commands|script) " | cut -d: -f1`
|
||||
-liblist=`echo $filelist | xargs -r file | \
|
||||
- grep ":.*shared object" | cut -d : -f1`
|
||||
-
|
||||
-interplist=
|
||||
-perllist=
|
||||
-pythonlist=
|
||||
-tcllist=
|
||||
+#filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
|
||||
+IFS=$'\n'
|
||||
+filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/'))
|
||||
+exelist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \
|
||||
+ egrep -v ":.* (commands|script) " | \
|
||||
@ -123,20 +130,16 @@
|
||||
+ egrep ":.* (commands|script) " | cut -d: -f1))
|
||||
+liblist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \
|
||||
+ grep ":.*shared object" | cut -d : -f1))
|
||||
|
||||
-interplist=
|
||||
-perllist=
|
||||
-pythonlist=
|
||||
-tcllist=
|
||||
+
|
||||
+interplist=()
|
||||
+perllist=()
|
||||
+pythonlist=()
|
||||
+tcllist=()
|
||||
+monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$"))
|
||||
+monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
|
||||
|
||||
#
|
||||
# --- Alpha does not mark 64bit dependencies
|
||||
@@ -42,12 +45,12 @@ esac
|
||||
@@ -42,12 +46,12 @@ esac
|
||||
if [ "$needed" -eq 0 ]; then
|
||||
#
|
||||
# --- Executable dependency sonames.
|
||||
@ -154,7 +157,7 @@
|
||||
gsub(/'\''"/,"\\&",$1);
|
||||
printf "%s'$lib64'\n", $1
|
||||
}
|
||||
@@ -56,12 +59,12 @@ if [ "$needed" -eq 0 ]; then
|
||||
@@ -56,12 +60,12 @@ if [ "$needed" -eq 0 ]; then
|
||||
|
||||
#
|
||||
# --- Library dependency sonames.
|
||||
@ -172,7 +175,7 @@
|
||||
gsub(/'\''"/,"\\&",$1);
|
||||
printf "%s'$lib64'\n", $1
|
||||
}
|
||||
@@ -71,30 +74,30 @@ fi
|
||||
@@ -71,30 +75,30 @@ fi
|
||||
|
||||
#
|
||||
# --- Script interpreters.
|
||||
@ -215,7 +218,7 @@
|
||||
/^$/ { START=0; }
|
||||
/^Dynamic Section:$/ { START=1; }
|
||||
(START==1) && /NEEDED/ {
|
||||
@@ -111,7 +114,7 @@ for f in $liblist $exelist ; do
|
||||
@@ -110,7 +114,7 @@ for f in $liblist $exelist ; do
|
||||
sub(/:/, "", $3);
|
||||
LIBNAME=$3;
|
||||
}
|
||||
@ -224,7 +227,7 @@
|
||||
print LIBNAME "(" $4 ")'$lib64'";
|
||||
}
|
||||
'
|
||||
@@ -119,17 +122,29 @@ done | sort -u
|
||||
@@ -118,17 +122,28 @@ done | sort -u
|
||||
|
||||
#
|
||||
# --- Perl modules.
|
||||
@ -248,9 +251,8 @@
|
||||
+#
|
||||
+# --- Mono exes/dlls
|
||||
+: ${MONO_PREFIX=/usr}
|
||||
+if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then
|
||||
+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires || echo "WARNING: MONO RPM REQUIRES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2
|
||||
+fi
|
||||
+[ -x $MONO_PREFIX/bin/mono -a -f $MONO_PREFIX/bin/mono-find-requires -a -n "$monolist" ] &&
|
||||
+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires
|
||||
+
|
||||
+#
|
||||
+# --- Kernel module imported symbols
|
||||
|
17
badforsyntax.diff
Normal file
17
badforsyntax.diff
Normal file
@ -0,0 +1,17 @@
|
||||
This fixes a typo that caused a compiler warning [#178055].
|
||||
|
||||
Already included in rpm-4.4.7.
|
||||
|
||||
Index: ./rpmdb/header_internal.c
|
||||
===================================================================
|
||||
--- ./rpmdb/header_internal.c
|
||||
+++ ./rpmdb/header_internal.c
|
||||
@@ -22,7 +22,7 @@ char ** headerGetLangs(Header h)
|
||||
if ((table = (char **)xcalloc((count+1), sizeof(char *))) == NULL)
|
||||
return NULL;
|
||||
|
||||
- for (i = 0, e = *s; i < count > 0; i++, e += strlen(e)+1)
|
||||
+ for (i = 0, e = *s; i < count; i++, e += strlen(e)+1)
|
||||
table[i] = e;
|
||||
table[count] = NULL;
|
||||
|
@ -1,3 +0,0 @@
|
||||
rpm
|
||||
arch ppc package rpm-devel
|
||||
arch sparcv9 package rpm-devel
|
60
brp.diff
60
brp.diff
@ -1,27 +1,9 @@
|
||||
SUSE specific brp script patches
|
||||
|
||||
--- ./scripts/Makefile.am.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/Makefile.am 2011-05-11 14:31:45.000000000 +0000
|
||||
@@ -6,6 +6,7 @@ CLEANFILES =
|
||||
|
||||
EXTRA_DIST = \
|
||||
brp-compress brp-python-bytecompile brp-java-gcjcompile \
|
||||
+ brp-lib64-linux brp-symlink \
|
||||
brp-strip brp-strip-comment-note brp-python-hardlink \
|
||||
brp-strip-shared brp-strip-static-archive \
|
||||
check-files check-prereqs \
|
||||
@@ -24,6 +25,7 @@ EXTRA_DIST = \
|
||||
|
||||
rpmconfig_SCRIPTS = \
|
||||
brp-compress brp-python-bytecompile brp-java-gcjcompile \
|
||||
+ brp-lib64-linux brp-symlink \
|
||||
brp-strip brp-strip-comment-note brp-python-hardlink \
|
||||
brp-strip-shared brp-strip-static-archive \
|
||||
check-files check-prereqs \
|
||||
--- ./scripts/brp-lib64-linux.orig 2011-05-11 14:30:08.000000000 +0000
|
||||
+++ ./scripts/brp-lib64-linux 2011-05-11 14:30:08.000000000 +0000
|
||||
--- ./scripts/brp-lib64-linux.orig 2005-12-15 14:04:13.000000000 +0000
|
||||
+++ ./scripts/brp-lib64-linux 2006-01-27 19:44:16.000000000 +0000
|
||||
@@ -0,0 +1,42 @@
|
||||
+#!/bin/bash
|
||||
+#!/bin/bash
|
||||
+# script checks wether package is 64-bit clean
|
||||
+# and also for a linker bug. (linker allows 64bit libs to link 32bit libs)
|
||||
+echo "sf@suse.de: if you find problems with this script, drop me a note"
|
||||
@ -63,9 +45,19 @@ SUSE specific brp script patches
|
||||
+ fi
|
||||
+done
|
||||
+exit 0
|
||||
--- ./scripts/brp-strip-comment-note.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/brp-strip-comment-note 2011-05-11 14:30:08.000000000 +0000
|
||||
@@ -16,6 +16,8 @@ esac
|
||||
--- ./scripts/brp-sparc64-linux.orig 2000-06-01 00:54:36.000000000 +0000
|
||||
+++ ./scripts/brp-sparc64-linux 2005-12-15 14:05:06.000000000 +0000
|
||||
@@ -6,6 +6,7 @@ fi
|
||||
files=
|
||||
LC_ALL=
|
||||
LANG=
|
||||
+LC_TIME=POSIX
|
||||
|
||||
# Move 64bit ELF objects from /lib, /usr/lib, /usr/X11R6/lib to */lib64
|
||||
# directories
|
||||
--- ./scripts/brp-strip-comment-note.orig 2005-05-30 06:41:52.000000000 +0000
|
||||
+++ ./scripts/brp-strip-comment-note 2005-12-15 14:06:07.000000000 +0000
|
||||
@@ -13,6 +13,8 @@ esac
|
||||
# for already stripped elf files in the build root
|
||||
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
|
||||
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
|
||||
@ -73,20 +65,20 @@ SUSE specific brp script patches
|
||||
+ grep -v '/lib/modules/' | \
|
||||
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do
|
||||
note="-R .note"
|
||||
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
|
||||
--- ./scripts/brp-strip.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/brp-strip 2011-05-11 14:30:08.000000000 +0000
|
||||
@@ -15,6 +15,7 @@ esac
|
||||
if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
|
||||
--- ./scripts/brp-strip.orig 2005-05-30 06:40:24.000000000 +0000
|
||||
+++ ./scripts/brp-strip 2005-12-15 14:06:37.000000000 +0000
|
||||
@@ -13,6 +13,7 @@ esac
|
||||
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
|
||||
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
|
||||
grep -v ' shared object,' | \
|
||||
+ grep -v '/lib/modules/' | \
|
||||
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
|
||||
$STRIP -g "$f" || :
|
||||
strip -g "$f" || :
|
||||
done
|
||||
--- ./scripts/brp-symlink.orig 2011-05-11 14:30:08.000000000 +0000
|
||||
+++ ./scripts/brp-symlink 2011-05-11 14:30:08.000000000 +0000
|
||||
@@ -0,0 +1,184 @@
|
||||
--- ./scripts/brp-symlink.orig 2005-12-15 14:06:58.000000000 +0000
|
||||
+++ ./scripts/brp-symlink 2006-01-27 19:41:58.000000000 +0000
|
||||
@@ -0,0 +1,182 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+# Task: go through the files in $RPM_BUILD_ROOT and
|
||||
@ -182,9 +174,7 @@ SUSE specific brp script patches
|
||||
+ echo " skip the files from packaging)"
|
||||
+ exit 1
|
||||
+ ;;
|
||||
+ *,/opt/kde3/share/doc*/HTML/*/common) # white listed for not existant
|
||||
+ ;;
|
||||
+ *,/usr/share/doc/kde/HTML/*/common) # white listed for not existant
|
||||
+ *,/opt/kde3/share/doc/HTML/*/common) # white listed for not existant
|
||||
+ ;;
|
||||
+ *,/proc/*) # links pointing into /proc file system
|
||||
+ ;;
|
||||
|
56
brpcombress.diff
Normal file
56
brpcombress.diff
Normal file
@ -0,0 +1,56 @@
|
||||
make brp-compress deal correctly with hardlinked man pages
|
||||
|
||||
--- ./scripts/brp-compress.orig 2004-10-17 18:49:52.000000000 +0000
|
||||
+++ ./scripts/brp-compress 2005-12-15 14:03:58.000000000 +0000
|
||||
@@ -5,12 +5,38 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
+LC_ALL=
|
||||
+LANG=
|
||||
+LC_TIME=POSIX
|
||||
+
|
||||
cd $RPM_BUILD_ROOT
|
||||
|
||||
# Compress man pages
|
||||
COMPRESS="gzip -9 -n"
|
||||
COMPRESS_EXT=.gz
|
||||
|
||||
+function check_for_hard_link
|
||||
+{
|
||||
+ dir=$1
|
||||
+ b=$2
|
||||
+ type=$3
|
||||
+
|
||||
+ inode=`ls -i $b | awk '{ print $1 }'`
|
||||
+ others=`find $dir -type f -inum $inode`
|
||||
+ for afile in $others ; do
|
||||
+ [ "$afile" != "$b" ] && rm -f $afile
|
||||
+ done
|
||||
+
|
||||
+ case $type in
|
||||
+ Z|gz) gunzip $b ;;
|
||||
+ bz2) bunzip2 $b ;;
|
||||
+ esac
|
||||
+
|
||||
+ for afile in $others ; do
|
||||
+ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type}
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
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 +49,9 @@ do
|
||||
[ "`basename $f`" = "dir" ] && continue
|
||||
|
||||
case "$f" in
|
||||
- *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;;
|
||||
- *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;;
|
||||
- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
|
||||
+ *.Z) gunzip $f || check_for_hard_link $d $f Z; b=`echo $f | sed -e 's/\.Z$//'`;;
|
||||
+ *.gz) gunzip $f || check_for_hard_link $d $f gz; b=`echo $f | sed -e 's/\.gz$//'`;;
|
||||
+ *.bz2) bunzip2 $f || check_for_hard_link $d $f bz2; b=`echo $f | sed -e 's/\.bz2$//'`;;
|
||||
*) b=$f;;
|
||||
esac
|
||||
|
@ -1,96 +0,0 @@
|
||||
--- ./scripts/brp-compress.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/brp-compress 2011-05-11 14:44:21.000000000 +0000
|
||||
@@ -5,51 +5,78 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
+LC_ALL=
|
||||
+LANG=
|
||||
+LC_TIME=POSIX
|
||||
+
|
||||
cd $RPM_BUILD_ROOT
|
||||
|
||||
# Compress man pages
|
||||
COMPRESS="gzip -9 -n"
|
||||
COMPRESS_EXT=.gz
|
||||
|
||||
+function check_for_hard_link
|
||||
+{
|
||||
+ dir=$1
|
||||
+ b=$2
|
||||
+
|
||||
+ inode=`ls -i $b | awk '{ print $1 }'`
|
||||
+ others=`find $dir -type f -inum $inode`
|
||||
+ for afile in $others ; do
|
||||
+ [ "$afile" != "$b" ] && rm -f "$afile"
|
||||
+ done
|
||||
+
|
||||
+ case $b in
|
||||
+ *.Z|*.gz) gunzip $b ;;
|
||||
+ *.bz2) bunzip2 $b ;;
|
||||
+ *.xz|*.lzma) unxz $b ;;
|
||||
+ esac
|
||||
+
|
||||
+ type=${b##*.}
|
||||
+ for afile in $others ; do
|
||||
+ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type}
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
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* \
|
||||
./usr/share/doc/*/man/man* ./usr/lib/*/man/man*
|
||||
do
|
||||
[ -d $d ] || continue
|
||||
- for f in `find $d -type f ! -name dir`
|
||||
+ find $d -type f ! -name dir | while read f
|
||||
do
|
||||
[ -f "$f" ] || continue
|
||||
|
||||
case "$f" in
|
||||
- *.gz|*.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
|
||||
- *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
|
||||
- *.xz|*.lzma) unxz -f $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
|
||||
- *) 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`
|
||||
+ find $d -type l | while read f
|
||||
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
|
580
build.diff
580
build.diff
@ -1,64 +1,378 @@
|
||||
Many changes to Makefiles/autogen and the like to make it build
|
||||
on SUSE systems.
|
||||
|
||||
--- ./configure.ac.orig 2011-05-11 14:27:32.000000000 +0000
|
||||
+++ ./configure.ac 2011-05-11 15:18:44.000000000 +0000
|
||||
@@ -850,6 +850,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm
|
||||
Index: Makefile.am
|
||||
===================================================================
|
||||
--- Makefile.am.orig
|
||||
+++ Makefile.am
|
||||
@@ -15,7 +15,7 @@ EXTRA_DIST = CHANGES CREDITS Doxyheader
|
||||
po/*.in po/*.po po/rpm.pot \
|
||||
rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
|
||||
|
||||
-SUBDIRS = intl po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
|
||||
+SUBDIRS = intl po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ beecrypt @WITH_NEON_SUBDIR@ @WITH_LUA_SUBDIR@ rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/build \
|
||||
Index: autogen.sh
|
||||
===================================================================
|
||||
--- autogen.sh.orig
|
||||
+++ autogen.sh
|
||||
@@ -26,12 +26,12 @@ case $libtoolize in
|
||||
esac
|
||||
esac
|
||||
|
||||
-[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1
|
||||
-[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1
|
||||
-[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1
|
||||
+#[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1
|
||||
+#[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1
|
||||
+#[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1
|
||||
|
||||
myopts=
|
||||
-if [ X"$@" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then
|
||||
+if [ X"$*" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then
|
||||
export myopts="--prefix=/usr --disable-nls"
|
||||
export CPPFLAGS="-I${myprefix}/include"
|
||||
fi
|
||||
@@ -43,7 +43,8 @@ if [ -d zlib ]; then
|
||||
(echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@")
|
||||
fi
|
||||
if [ -d beecrypt ]; then
|
||||
- (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@")
|
||||
+ #(echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@")
|
||||
+ (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --without-cplusplus --without-java --without-python "$@")
|
||||
fi
|
||||
if [ -d elfutils ]; then
|
||||
(echo "--- elfutils"; cd elfutils; ./autogen.sh --noconfigure "$@")
|
||||
@@ -54,6 +55,7 @@ fi
|
||||
if [ -d neon ]; then
|
||||
(echo "--- neon"; cd neon; ./autogen.sh "$@")
|
||||
fi
|
||||
+(echo "--- db"; cd db/dist; libtoolize --copy --force ; cp /usr/share/aclocal/libtool.m4 aclocal/libtool.ac ; ./s_config )
|
||||
|
||||
echo "--- rpm"
|
||||
$libtoolize --copy --force
|
||||
@@ -66,7 +68,7 @@ if [ "$1" = "--noconfigure" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
-if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
|
||||
+if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then
|
||||
if [ -d /usr/share/man ]; then
|
||||
mandir=/usr/share/man
|
||||
infodir=/usr/share/info
|
||||
Index: build/Makefile.am
|
||||
===================================================================
|
||||
--- build/Makefile.am.orig
|
||||
+++ build/Makefile.am
|
||||
@@ -22,7 +22,7 @@ pkgincdir = $(pkgincludedir)
|
||||
pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h
|
||||
noinst_HEADERS = buildio.h
|
||||
|
||||
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
|
||||
+LDFLAGS =
|
||||
|
||||
usrlibdir = $(libdir)@MARK64@
|
||||
usrlib_LTLIBRARIES = librpmbuild.la
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -1,30 +1,3 @@
|
||||
-
|
||||
-echo "
|
||||
-****************************************************************************
|
||||
-* *
|
||||
-* *** WARNING WARNING WARNING *** *
|
||||
-* *
|
||||
-* This is source code from the development branch of rpm-4.4.2. *
|
||||
-* *
|
||||
-* If you want the "production" rpm-4.3.3 code, then you should use a *
|
||||
-* rpm-4.3.3 src.rpm. Alternatively, if using a CVS checkout, do *
|
||||
-* the following: *
|
||||
-* *
|
||||
-* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel login *
|
||||
-* (no password, just carriage return) *
|
||||
-* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel get rpm *
|
||||
-* cd rpm *
|
||||
-* *
|
||||
-* Here's the rpm-4_3 branch, latest is rpm-4.3.3: *
|
||||
-* cvs up -r rpm-4_3 *
|
||||
-* *
|
||||
-* Here's the rpm-4_2 branch, latest is rpm-4.2.3: *
|
||||
-* cvs up -r rpm-4_2 *
|
||||
-* *
|
||||
-****************************************************************************
|
||||
-"
|
||||
-sleep 10
|
||||
-
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(rpm, 4.4.2, rpm-devel@lists.dulug.duke.edu)
|
||||
AC_CANONICAL_TARGET
|
||||
@@ -34,10 +7,9 @@ AM_CONFIG_HEADER([config.h])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
dnl Set of available languages.
|
||||
-ALL_LINGUAS="cs da de fi fr gl is ja ko no pl pt pt_BR ro ru sk sl sr sv tr"
|
||||
+ALL_LINGUAS="cs da de fi fr gl is ja ko nb pl pt pt_BR ro ru sk sl sr sv tr"
|
||||
|
||||
dnl Checks for programs.
|
||||
-AC_PROG_CXX
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
@@ -310,7 +282,7 @@ WITH_ZLIB_INCLUDE=
|
||||
WITH_ZLIB_LIB=
|
||||
if test -d zlib ; then
|
||||
WITH_ZLIB_SUBDIR=zlib
|
||||
- addlib \${top_builddir}/zlib
|
||||
+ # addlib \${top_builddir}/zlib
|
||||
WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
|
||||
INCPATH="$INCPATH -I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
|
||||
WITH_ZLIB_LIB="\${top_builddir}/${WITH_ZLIB_SUBDIR}/libz.la"
|
||||
@@ -350,9 +322,9 @@ AC_SUBST(WITH_BZIP2)
|
||||
localdone=
|
||||
|
||||
dirs=$prefix
|
||||
-if test "$cross_compiling" != "yes"; then
|
||||
- dirs="$dirs /usr/local"
|
||||
-fi
|
||||
+#if test "$cross_compiling" != "yes"; then
|
||||
+# dirs="$dirs /usr/local"
|
||||
+#fi
|
||||
for dir in $dirs
|
||||
do
|
||||
case $dir in
|
||||
@@ -463,7 +435,7 @@ AC_CHECK_HEADER([gelf.h], [
|
||||
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
|
||||
WITH_ELFUTILS_SUBDIR=elfutils
|
||||
WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf"
|
||||
- WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a"
|
||||
+ WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf_pic.a"
|
||||
fi
|
||||
])
|
||||
AC_SUBST(WITH_ELFUTILS_SUBDIR)
|
||||
@@ -504,7 +476,8 @@ AC_CHECK_HEADER([beecrypt/beecrypt.h], [
|
||||
AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the 'beecrypt' library (-lbeecrypt).])
|
||||
WITH_BEECRYPT_SUBDIR=beecrypt
|
||||
WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}"
|
||||
- WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
|
||||
+ dnl WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
|
||||
+ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(WITH_BEECRYPT_SUBDIR)
|
||||
@@ -648,6 +621,9 @@ dnl AmigaOS and IXEmul have a fork() dum
|
||||
esac
|
||||
|
||||
AM_GNU_GETTEXT
|
||||
+AM_GNU_GETTEXT_VERSION(0.11.2)
|
||||
+MKINSTALLDIRS="\$(top_builddir)/./mkinstalldirs"
|
||||
+AC_SUBST(MKINSTALLDIRS)
|
||||
dnl TVM:
|
||||
dnl horrible *temporary* hack to make sure that if we found gettext() in
|
||||
dnl -lintl that we add -lintl *back* to $LIBS.
|
||||
@@ -943,54 +919,74 @@ withval=auto
|
||||
AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
|
||||
|
||||
WITH_PYTHON_VERSION=$withval
|
||||
-if test $withval = auto ; then
|
||||
|
||||
+if test "$WITH_PYTHON_VERSION" = auto ; then
|
||||
+AC_MSG_CHECKING(for python 2.5)
|
||||
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
+#include <python2.5/Python.h>
|
||||
+main() {
|
||||
+ exit(strncmp("2.5", PY_VERSION, 3));
|
||||
+} ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
+AC_MSG_RESULT($withval)
|
||||
+if test $withval = yes ; then
|
||||
+ WITH_PYTHON_VERSION="2.5"
|
||||
+fi
|
||||
+fi
|
||||
+
|
||||
+if test "$WITH_PYTHON_VERSION" = auto ; then
|
||||
AC_MSG_CHECKING(for python 2.4)
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <python2.4/Python.h>
|
||||
main() {
|
||||
exit(strncmp("2.4", PY_VERSION, 3));
|
||||
} ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
- AC_MSG_RESULT($withval)
|
||||
- if test $withval = yes ; then
|
||||
- WITH_PYTHON_VERSION="2.4"
|
||||
- else
|
||||
-
|
||||
- AC_MSG_CHECKING(for python 2.3)
|
||||
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
- #include <python2.3/Python.h>
|
||||
- main() {
|
||||
- exit(strncmp("2.3", PY_VERSION, 3));
|
||||
- } ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
- AC_MSG_RESULT($withval)
|
||||
- if test $withval = yes ; then
|
||||
- WITH_PYTHON_VERSION="2.3"
|
||||
- else
|
||||
-
|
||||
- AC_MSG_CHECKING(for python 2.2)
|
||||
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
- #include <python2.2/Python.h>
|
||||
- main() {
|
||||
- exit(strncmp("2.2", PY_VERSION, 3));
|
||||
- } ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
- AC_MSG_RESULT($withval)
|
||||
- if test $withval = yes ; then
|
||||
- WITH_PYTHON_VERSION="2.2"
|
||||
- else
|
||||
-
|
||||
- AC_MSG_CHECKING(for python 1.5.2)
|
||||
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
- #include <python1.5/Python.h>
|
||||
- main() {
|
||||
- exit(strcmp("1.5.2", PY_VERSION));
|
||||
- } ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
- AC_MSG_RESULT($withval)
|
||||
- if test $withval = yes ; then
|
||||
- WITH_PYTHON_VERSION="1.5"
|
||||
- fi
|
||||
- fi
|
||||
- fi
|
||||
- fi
|
||||
+AC_MSG_RESULT($withval)
|
||||
+if test $withval = yes ; then
|
||||
+ WITH_PYTHON_VERSION="2.4"
|
||||
+fi
|
||||
+fi
|
||||
+
|
||||
+if test "$WITH_PYTHON_VERSION" = auto ; then
|
||||
+AC_MSG_CHECKING(for python 2.3)
|
||||
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
+#include <python2.3/Python.h>
|
||||
+main() {
|
||||
+ exit(strncmp("2.3", PY_VERSION, 3));
|
||||
+} ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
+AC_MSG_RESULT($withval)
|
||||
+if test $withval = yes ; then
|
||||
+ WITH_PYTHON_VERSION="2.3"
|
||||
+fi
|
||||
+fi
|
||||
+
|
||||
+if test "$WITH_PYTHON_VERSION" = auto ; then
|
||||
+AC_MSG_CHECKING(for python 2.2)
|
||||
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
+#include <python2.2/Python.h>
|
||||
+main() {
|
||||
+ exit(strncmp("2.2", PY_VERSION, 3));
|
||||
+} ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
+AC_MSG_RESULT($withval)
|
||||
+if test $withval = yes ; then
|
||||
+ WITH_PYTHON_VERSION="2.2"
|
||||
+fi
|
||||
+fi
|
||||
+
|
||||
+if test "$WITH_PYTHON_VERSION" = auto ; then
|
||||
+AC_MSG_CHECKING(for python 1.5.2)
|
||||
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
+#include <python1.5/Python.h>
|
||||
+main() {
|
||||
+ exit(strcmp("1.5.2", PY_VERSION));
|
||||
+} ]])],[withval=yes],[withval=no],[withval=yes])
|
||||
+AC_MSG_RESULT($withval)
|
||||
+if test $withval = yes ; then
|
||||
+ WITH_PYTHON_VERSION="1.5"
|
||||
+fi
|
||||
+fi
|
||||
+
|
||||
+if test "$WITH_PYTHON_VERSION" = auto ; then
|
||||
+ WITH_PYTHON_VERSION=no
|
||||
fi
|
||||
|
||||
if test "$WITH_PYTHON_VERSION" != no ; then
|
||||
@@ -1283,6 +1279,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH="${
|
||||
mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
|
||||
mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
|
||||
m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
|
||||
+parisc*|hppa*) RPMCANONCOLOR=0; RPMCANONARCH=hppa ;;
|
||||
sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;;
|
||||
sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;;
|
||||
*) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
|
||||
@@ -860,6 +861,7 @@ esac
|
||||
esac
|
||||
case "${build_os_noversion}" in
|
||||
@@ -1290,7 +1287,7 @@ mint) RPMCANONARCH=m68kmint ;;
|
||||
esac
|
||||
RPMCANONVENDOR="$build_vendor"
|
||||
case "${build_vendor}" in
|
||||
unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse)
|
||||
+ RPMCANONVENDOR=suse
|
||||
-unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos)
|
||||
+unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse)
|
||||
test -f /etc/redhat-release && RPMCANONVENDOR=redhat
|
||||
test -f /etc/SuSE-release && RPMCANONVENDOR=suse
|
||||
test -f /etc/pld-release && RPMCANONVENDOR=pld
|
||||
@@ -872,6 +874,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec
|
||||
test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake
|
||||
@@ -1298,6 +1295,7 @@ unknown|pc|ibm|redhat|pld|mandrake|conec
|
||||
test -f /etc/lvr-release && RPMCANONVENDOR=lvr
|
||||
test -f /etc/yellowdog-release && RPMCANONVENDOR=yellowdog
|
||||
test -f /etc/caos-release && RPMCANONVENDOR=caos
|
||||
+ test -f /etc/SuSE-release -o -f /.buildenv && RPMCANONVENDOR=suse
|
||||
;;
|
||||
esac
|
||||
RPMCANONOS="$host_os_noversion"
|
||||
RPMCANONGNU="$host_os_gnu"
|
||||
+if test "$RPMCANONVENDOR" = suse ; then
|
||||
+ RPMCANONCOLOR=0
|
||||
+fi
|
||||
AC_SUBST(RPMCANONCOLOR)
|
||||
AC_SUBST(RPMCANONARCH)
|
||||
AC_SUBST(RPMCANONVENDOR)
|
||||
--- ./db3/configure.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./db3/configure 2011-05-11 15:18:44.000000000 +0000
|
||||
RPMCANONOS="$build_os_noversion"
|
||||
@@ -1372,7 +1370,7 @@ dnl XXX this causes popt to depend on zl
|
||||
dnl # XXX Propagate -lucb to popt ...
|
||||
dnl export LIBS INCPATH CONFIG_SITE
|
||||
|
||||
-AC_CONFIG_SUBDIRS(popt zlib file sqlite db3)
|
||||
+AC_CONFIG_SUBDIRS(popt zlib file sqlite db3 elfutils)
|
||||
|
||||
AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
|
||||
rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
|
||||
Index: db3/configure
|
||||
===================================================================
|
||||
--- db3/configure.orig
|
||||
+++ db3/configure
|
||||
@@ -10,9 +10,9 @@ rm -f config.cache
|
||||
# XXX edit CFLAGS= ... out of invocation args ???
|
||||
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
|
||||
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`"
|
||||
|
||||
-CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
|
||||
+CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \
|
||||
--enable-shared --enable-static \
|
||||
- --enable-shared --enable-static --enable-rpc \
|
||||
- --with-uniquename=_rpmdb --srcdir=$db_dist
|
||||
+CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \
|
||||
+ --enable-shared --enable-static \
|
||||
+ --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS
|
||||
|
||||
mv Makefile Makefile.orig
|
||||
cat Makefile.orig | sed -e '/^install[:-]/c\
|
||||
--- ./installplatform.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./installplatform 2011-05-11 15:18:44.000000000 +0000
|
||||
@@ -47,9 +47,9 @@ for SUBST in $SUBSTS ; do
|
||||
ARCH_INSTALL_POST='%{nil}'
|
||||
case "${ARCH}-${OS}" in
|
||||
sparc64*-linux) LIB=lib64 ;;
|
||||
- s390x-linux) LIB=lib64 ;;
|
||||
- ppc64-linux|powerpc64-linux) LIB=lib64 ;;
|
||||
- x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64 ;;
|
||||
+ s390x-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;;
|
||||
+ ppc64-linux|powerpc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;;
|
||||
+ x86_64-linux|amd64-linux|ia32e-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;;
|
||||
*) LIB=lib;;
|
||||
Index: file/src/Makefile.am
|
||||
===================================================================
|
||||
--- file/src/Makefile.am.orig
|
||||
+++ file/src/Makefile.am
|
||||
@@ -26,7 +26,7 @@ libmagic_la_LDFLAGS = -version-info 1:0:
|
||||
|
||||
noinst_PROGRAMS = file
|
||||
file_SOURCES = file.c
|
||||
-file_LDFLAGS = -L../../zlib # -all-static
|
||||
+file_LDFLAGS = # -L../../zlib # -all-static
|
||||
file_LDADD = libmagic.la
|
||||
|
||||
listobjs:
|
||||
Index: installplatform
|
||||
===================================================================
|
||||
--- installplatform.orig
|
||||
+++ installplatform
|
||||
@@ -62,11 +62,11 @@ for SUBST in $SUBSTS ; do
|
||||
sparcv9-linux) MULTILIBNO=1 ;;
|
||||
sparc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-sparc64-linux; LIB=lib64; MULTILIBNO=2 ;;
|
||||
s390-linux) MULTILIBNO=1 ;;
|
||||
- s390x-linux) LIB=lib64; MULTILIBNO=2 ;;
|
||||
+ s390x-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux; LIB=lib64; MULTILIBNO=2 ;;
|
||||
ppc-linux) MULTILIBNO=1 ;;
|
||||
- ppc64-linux) LIB=lib64; MULTILIBNO=2 ;;
|
||||
+ ppc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux; LIB=lib64; MULTILIBNO=2 ;;
|
||||
i?86-linux|pentium?-linux|athlon-linux) MULTILIBNO=1 ;;
|
||||
- x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64; MULTILIBNO=2 ;;
|
||||
+ x86_64-linux|amd64-linux|ia32e-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux; LIB=lib64; MULTILIBNO=2 ;;
|
||||
esac
|
||||
|
||||
@@ -129,6 +129,9 @@ for SUBST in $SUBSTS ; do
|
||||
if [ -n "$MULTILIBNO" ]; then
|
||||
@@ -96,6 +96,9 @@ for SUBST in $SUBSTS ; do
|
||||
apple)
|
||||
VENDORSED='-e s,^@apple@,,'
|
||||
;;
|
||||
@ -67,4 +381,194 @@ on SUSE systems.
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
CANONARCH="`echo $ARCH|sed -e "$canonarch_sed"`"
|
||||
cat $PLATFORM \
|
||||
Index: lib/Makefile.am
|
||||
===================================================================
|
||||
--- lib/Makefile.am.orig
|
||||
+++ lib/Makefile.am
|
||||
@@ -29,7 +29,7 @@ noinst_HEADERS = \
|
||||
mylibs = librpm.la
|
||||
LIBS =
|
||||
|
||||
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
|
||||
+LDFLAGS =
|
||||
|
||||
usrlibdir = $(libdir)@MARK64@
|
||||
usrlib_LTLIBRARIES = librpm.la
|
||||
Index: po/Makefile.in
|
||||
===================================================================
|
||||
--- po/Makefile.in.orig
|
||||
+++ po/Makefile.in
|
||||
@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
MKINSTALLDIRS = $(top_builddir)/./mkinstalldirs
|
||||
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac`
|
||||
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
CC = gcc
|
||||
GMSGFMT = /usr/bin/msgfmt
|
||||
Index: po/Makefile.in.in
|
||||
===================================================================
|
||||
--- po/Makefile.in.in.orig
|
||||
+++ po/Makefile.in.in
|
||||
@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac`
|
||||
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
CC = @CC@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
Index: popt/autogen.sh
|
||||
===================================================================
|
||||
--- popt/autogen.sh.orig
|
||||
+++ popt/autogen.sh
|
||||
@@ -28,7 +28,7 @@ fi
|
||||
|
||||
cd "$THEDIR"
|
||||
|
||||
-if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
|
||||
+if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then
|
||||
$srcdir/configure --prefix=/usr "$@"
|
||||
else
|
||||
$srcdir/configure "$@"
|
||||
Index: popt/configure.ac
|
||||
===================================================================
|
||||
--- popt/configure.ac.orig
|
||||
+++ popt/configure.ac
|
||||
@@ -1,11 +1,12 @@
|
||||
AC_INIT(popt.h)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_PREREQ(2.12)
|
||||
-AC_CONFIG_HEADERS
|
||||
AM_INIT_AUTOMAKE(popt, 1.10.2)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
-ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN zh_TW"
|
||||
+ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko nb pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN zh_TW"
|
||||
+MKINSTALLDIRS="\$(top_builddir)/./mkinstalldirs"
|
||||
+AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
AC_ISC_POSIX
|
||||
|
||||
Index: popt/po/Makefile.in
|
||||
===================================================================
|
||||
--- popt/po/Makefile.in.orig
|
||||
+++ popt/po/Makefile.in
|
||||
@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
MKINSTALLDIRS = $(top_builddir)/./../mkinstalldirs
|
||||
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac`
|
||||
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
CC = gcc
|
||||
GMSGFMT = /usr/bin/msgfmt
|
||||
Index: popt/po/Makefile.in.in
|
||||
===================================================================
|
||||
--- popt/po/Makefile.in.in.orig
|
||||
+++ popt/po/Makefile.in.in
|
||||
@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac`
|
||||
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
CC = @CC@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
Index: rpmdb/Makefile.am
|
||||
===================================================================
|
||||
--- rpmdb/Makefile.am.orig
|
||||
+++ rpmdb/Makefile.am
|
||||
@@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna
|
||||
pkgbindir = @RPMCONFIGDIR@
|
||||
pkgbin_PROGRAMS = \
|
||||
rpmdb_archive rpmdb_checkpoint rpmdb_deadlock rpmdb_dump rpmdb_load \
|
||||
- rpmdb_printlog rpmdb_recover rpmdb_svc rpmdb_stat rpmdb_upgrade \
|
||||
+ rpmdb_printlog rpmdb_recover rpmdb_stat rpmdb_upgrade \
|
||||
rpmdb_verify
|
||||
|
||||
mylibs = librpmdb.la
|
||||
@@ -42,7 +42,7 @@ LIBS =
|
||||
libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la
|
||||
|
||||
# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
|
||||
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
|
||||
+LDFLAGS =
|
||||
|
||||
usrlibdir = $(libdir)@MARK64@
|
||||
usrlib_LTLIBRARIES = librpmdb.la
|
||||
Index: rpmio/Makefile.am
|
||||
===================================================================
|
||||
--- rpmio/Makefile.am.orig
|
||||
+++ rpmio/Makefile.am
|
||||
@@ -24,9 +24,9 @@ pkginc_HEADERS = \
|
||||
rpmsq.h rpmsw.h ugid.h
|
||||
noinst_HEADERS = rpmio_internal.h rpmlua.h rpmhook.h
|
||||
|
||||
-BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs)
|
||||
+BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/listobjs)
|
||||
|
||||
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
|
||||
+LDFLAGS =
|
||||
|
||||
usrlibdir = $(libdir)@MARK64@
|
||||
usrlib_LTLIBRARIES = librpmio.la
|
||||
@@ -41,14 +41,14 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDF
|
||||
@WITH_MAGIC_LIB@ \
|
||||
@WITH_ZLIB_LIB@ \
|
||||
-lpthread
|
||||
-librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
|
||||
-librpmio_la_DEPENDENCIES = # .created
|
||||
+librpmio_la_LIBADD = $(BEECRYPTLOBJS)
|
||||
+librpmio_la_DEPENDENCIES = .created
|
||||
|
||||
.created:
|
||||
if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \
|
||||
${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \
|
||||
for lo in $(BEECRYPTLOBJS); do \
|
||||
- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
|
||||
+ [ -f $$lo ] || sed -e "s!'!'$(top_builddir)/beecrypt/!" < $(top_builddir)/beecrypt/$$lo > $$lo ; \
|
||||
done \
|
||||
fi
|
||||
touch $@
|
||||
Index: scripts/Makefile.am
|
||||
===================================================================
|
||||
--- scripts/Makefile.am.orig
|
||||
+++ scripts/Makefile.am
|
||||
@@ -6,6 +6,7 @@ EXTRA_DIST = \
|
||||
brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \
|
||||
brp-strip brp-strip-comment-note \
|
||||
brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
|
||||
+ brp-lib64-linux brp-symlink \
|
||||
check-files check-prereqs convertrpmrc.sh cross-build \
|
||||
find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl \
|
||||
@@ -17,7 +18,8 @@ EXTRA_DIST = \
|
||||
sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
|
||||
vpkg-provides.sh vpkg-provides2.sh \
|
||||
macros.perl* macros.python* \
|
||||
- macros.php* find-*.php find-php-*
|
||||
+ macros.php* find-*.php find-php-* \
|
||||
+ find-provides.ksyms find-requires.ksyms
|
||||
|
||||
installprefix = $(DESTDIR)
|
||||
|
||||
@@ -28,6 +30,7 @@ config_SCRIPTS = \
|
||||
brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \
|
||||
brp-strip brp-strip-comment-note \
|
||||
brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
|
||||
+ brp-lib64-linux brp-symlink \
|
||||
check-files check-prereqs convertrpmrc.sh cross-build \
|
||||
find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl \
|
||||
@@ -36,4 +39,5 @@ config_SCRIPTS = \
|
||||
rpmdb_loadcvt rpmdiff rpmdiff.cgi \
|
||||
rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
|
||||
sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
|
||||
- vpkg-provides.sh vpkg-provides2.sh
|
||||
+ vpkg-provides.sh vpkg-provides2.sh \
|
||||
+ find-provides.ksyms find-requires.ksyms
|
||||
|
@ -1,62 +0,0 @@
|
||||
From: Jan Blunck <jblunck@suse.de>
|
||||
Subject: Let debuginfo packages provide the build-id
|
||||
|
||||
This patch lets debuginfo packages provide build-id like follows:
|
||||
|
||||
debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517
|
||||
|
||||
Users can therefore ask zypper to install the correct debuginfo package with:
|
||||
|
||||
zypper install -C "debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517"
|
||||
|
||||
--- ./autodeps/linux.prov.orig 2011-05-11 15:58:28.000000000 +0000
|
||||
+++ ./autodeps/linux.prov 2011-05-11 15:59:31.000000000 +0000
|
||||
@@ -5,6 +5,9 @@
|
||||
IFS=$'\n'
|
||||
filelist=($(cat))
|
||||
|
||||
+debuginfolist=($(printf "%s\n" "${filelist[@]}" | grep "/usr/lib/debug/"))
|
||||
+filelist=($(printf "%s\n" "${filelist[@]}" | grep -v "/usr/lib/debug/"))
|
||||
+
|
||||
solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \
|
||||
tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \
|
||||
cut -d: -f1))
|
||||
@@ -71,6 +74,11 @@ done | sort -u
|
||||
printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u
|
||||
|
||||
#
|
||||
+# --- debuginfo files
|
||||
+[ -x /usr/lib/rpm/debuginfo.prov -a -n "$debuginfolist" ] &&
|
||||
+ printf "%s\n" "${debuginfolist[@]}" | /usr/lib/rpm/debuginfo.prov | sort -u
|
||||
+
|
||||
+#
|
||||
# --- Mono exes/dlls
|
||||
: ${MONO_PREFIX=/usr}
|
||||
if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then
|
||||
--- ./macros.in.orig 2011-05-11 15:59:08.000000000 +0000
|
||||
+++ ./macros.in 2011-05-11 15:59:31.000000000 +0000
|
||||
@@ -182,7 +182,8 @@
|
||||
%package debuginfo\
|
||||
Summary: Debug information for package %{name}\
|
||||
Group: Development/Debug\
|
||||
-AutoReqProv: 0\
|
||||
+AutoReq: 0\
|
||||
+AutoProv: 1\
|
||||
#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\
|
||||
%description debuginfo\
|
||||
This package provides debug information for package %{name}.\
|
||||
--- ./scripts/debuginfo.prov.orig 2011-05-11 15:59:31.000000000 +0000
|
||||
+++ ./scripts/debuginfo.prov 2011-05-11 15:59:31.000000000 +0000
|
||||
@@ -0,0 +1,12 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+while read instfile ; do
|
||||
+ case $instfile in
|
||||
+ */usr/lib/debug/.build-id/*.debug)
|
||||
+ if [ -f "$instfile" ] ; then
|
||||
+ BUILDID=$(echo $instfile | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]*\)/\([0-9a-f]*\)\.debug|\1\2|p')
|
||||
+ echo "debuginfo(build-id) = $BUILDID"
|
||||
+ fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
@ -1,29 +0,0 @@
|
||||
--- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000
|
||||
+++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000
|
||||
@@ -165,12 +165,14 @@ static int sigpipe_init(void)
|
||||
fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC));
|
||||
/* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */
|
||||
signal(SIGCHLD, sigpipe_handler);
|
||||
+ signal(SIGPIPE, SIG_IGN);
|
||||
return _sigpipe[0];
|
||||
}
|
||||
|
||||
static void sigpipe_finish(void)
|
||||
{
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
+ signal(SIGPIPE, SIG_DFL);
|
||||
close(_sigpipe[0]);
|
||||
close(_sigpipe[1]);
|
||||
_sigpipe[0] = -1;
|
||||
@@ -298,10 +300,9 @@ static StringBuf getOutputFrom(ARGV_t ar
|
||||
appendStringBuf(readBuff, buf);
|
||||
}
|
||||
|
||||
- /* Child exited, we're done */
|
||||
+ /* Child exited, we're maybe done */
|
||||
if (FD_ISSET(sigpipe, &ibits)) {
|
||||
while (read(sigpipe, buf, sizeof(buf)) > 0) {};
|
||||
- break;
|
||||
}
|
||||
}
|
||||
|
24
buildsubdir.diff
Normal file
24
buildsubdir.diff
Normal file
@ -0,0 +1,24 @@
|
||||
Fix a typo: the macro is currently called %{buildsubdir}
|
||||
|
||||
--- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000
|
||||
+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000
|
||||
@@ -1942,7 +1954,7 @@ static int processPackageFiles(Spec spec
|
||||
if (*pkg->fileFile == '/') {
|
||||
ffn = rpmGetPath(pkg->fileFile, NULL);
|
||||
} else {
|
||||
- /* XXX FIXME: add %{_buildsubdir} */
|
||||
+ /* XXX FIXME: add %{buildsubdir} */
|
||||
ffn = rpmGetPath("%{_builddir}/",
|
||||
(spec->buildSubdir ? spec->buildSubdir : "") ,
|
||||
"/", pkg->fileFile, NULL);
|
||||
--- ./build/pack.c.orig 2005-07-15 15:06:57.000000000 +0000
|
||||
+++ ./build/pack.c 2005-12-18 15:14:56.000000000 +0000
|
||||
@@ -138,7 +138,7 @@ static /*@only@*/ /*@null@*/ StringBuf a
|
||||
FILE * f;
|
||||
FD_t fd;
|
||||
|
||||
- fn = rpmGetPath("%{_builddir}/%{?_buildsubdir:%{_buildsubdir}/}", file, NULL);
|
||||
+ fn = rpmGetPath("%{_builddir}/%{?buildsubdir:%{buildsubdir}/}", file, NULL);
|
||||
|
||||
fd = Fopen(fn, "r.ufdio");
|
||||
if (fn != buf) fn = _free(fn);
|
@ -1,17 +1,15 @@
|
||||
Exclude /usr/share/info/dir from check-files. Probably only
|
||||
interesting for SUSE.
|
||||
|
||||
Index: scripts/check-files
|
||||
===================================================================
|
||||
--- scripts/check-files.orig
|
||||
+++ scripts/check-files
|
||||
@@ -22,7 +22,9 @@ LC_ALL=C sort > $FILES_RPM
|
||||
--- ./scripts/check-files.orig 2005-12-15 14:07:15.000000000 +0000
|
||||
+++ ./scripts/check-files 2005-12-15 14:09:34.000000000 +0000
|
||||
@@ -21,7 +21,9 @@ find $RPM_BUILD_ROOT -type f -o -type l
|
||||
LC_ALL=C sort > $FILES_RPM
|
||||
|
||||
diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3- |
|
||||
while read f; do
|
||||
for f in `diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3-`; do
|
||||
- echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g"
|
||||
+ if test "$RPM_BUILD_ROOT/usr/share/info/dir" != "$f" ; then
|
||||
+ echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g"
|
||||
+ echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g"
|
||||
+ fi
|
||||
done
|
||||
|
||||
|
@ -1,50 +1,26 @@
|
||||
Do not abort if chown/chmod fails but the file is already correct
|
||||
Warn the user if chown/fchown fails.
|
||||
|
||||
--- ./lib/fsm.c.orig 2011-03-02 06:46:13.000000000 +0000
|
||||
+++ ./lib/fsm.c 2011-05-10 16:30:55.000000000 +0000
|
||||
@@ -1449,6 +1449,11 @@ static int fsmRename(FSM_t fsm)
|
||||
static int fsmChown(FSM_t fsm)
|
||||
{
|
||||
int rc = chown(fsm->path, fsm->sb.st_uid, fsm->sb.st_gid);
|
||||
+ if (rc < 0) {
|
||||
+ struct stat st;
|
||||
+ if (lstat(fsm->path, &st) == 0 && st.st_uid == fsm->sb.st_uid && st.st_gid == fsm->sb.st_gid)
|
||||
--- ./lib/fsm.c.orig 2005-12-14 20:08:04.000000000 +0000
|
||||
+++ ./lib/fsm.c 2005-12-16 18:19:37.000000000 +0000
|
||||
@@ -2186,6 +2191,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS
|
||||
break;
|
||||
case FSM_CHOWN:
|
||||
rc = chown(fsm->path, st->st_uid, st->st_gid);
|
||||
+ if (rc < 0 && errno == EPERM) {
|
||||
+ rpmMessage(RPMMESS_WARNING, "can't chown %s (%s)\n", fsm->path, strerror(errno));
|
||||
+ rc = 0;
|
||||
+ }
|
||||
if (_fsm_debug && (FSM_CHOWN & FSM_SYSCALL))
|
||||
rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", fileStageString(FSM_CHOWN),
|
||||
fsm->path, (int)fsm->sb.st_uid, (int)fsm->sb.st_gid,
|
||||
@@ -1461,6 +1466,11 @@ static int fsmLChown(FSM_t fsm)
|
||||
{
|
||||
int rc = 0;
|
||||
rc = lchown(fsm->path, fsm->sb.st_uid, fsm->sb.st_gid);
|
||||
+ if (rc < 0) {
|
||||
+ struct stat st;
|
||||
+ if (lstat(fsm->path, &st) == 0 && st.st_uid == fsm->sb.st_uid && st.st_gid == fsm->sb.st_gid)
|
||||
+ }
|
||||
if (_fsm_debug && (stage & FSM_SYSCALL))
|
||||
rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
|
||||
fsm->path, (int)st->st_uid, (int)st->st_gid,
|
||||
@@ -2195,6 +2204,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS
|
||||
case FSM_LCHOWN:
|
||||
#if ! CHOWN_FOLLOWS_SYMLINK
|
||||
rc = lchown(fsm->path, st->st_uid, st->st_gid);
|
||||
+ if (rc < 0 && errno == EPERM) {
|
||||
+ rpmMessage(RPMMESS_WARNING, "can't lchown %s (%s)\n", fsm->path, strerror(errno));
|
||||
+ rc = 0;
|
||||
+ }
|
||||
if (_fsm_debug && (FSM_LCHOWN & FSM_SYSCALL))
|
||||
rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", fileStageString(FSM_LCHOWN),
|
||||
fsm->path, (int)fsm->sb.st_uid, (int)fsm->sb.st_gid,
|
||||
@@ -1472,6 +1482,11 @@ static int fsmLChown(FSM_t fsm)
|
||||
static int fsmChmod(FSM_t fsm)
|
||||
{
|
||||
int rc = chmod(fsm->path, (fsm->sb.st_mode & 07777));
|
||||
+ if (rc < 0) {
|
||||
+ struct stat st;
|
||||
+ if (lstat(fsm->path, &st) == 0 && (st.st_mode & 07777) == (fsm->sb.st_mode & 07777))
|
||||
+ rc = 0;
|
||||
+ }
|
||||
if (_fsm_debug && (FSM_CHMOD & FSM_SYSCALL))
|
||||
rpmlog(RPMLOG_DEBUG, " %8s (%s, 0%04o) %s\n", fileStageString(FSM_CHMOD),
|
||||
fsm->path, (unsigned)(fsm->sb.st_mode & 07777),
|
||||
@@ -2033,6 +2048,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS
|
||||
st->st_mtime = rpmfiFMtimeIndex(fi, fsm->ix);
|
||||
rc = fsmUtime(fsm);
|
||||
st->st_mtime = mtime;
|
||||
+ /* utime error is not critical for directories */
|
||||
+ if (rc && S_ISDIR(st->st_mode))
|
||||
+ rc = 0;
|
||||
}
|
||||
#if WITH_CAP
|
||||
if (!rc && !S_ISDIR(st->st_mode) && !getuid()) {
|
||||
+ }
|
||||
if (_fsm_debug && (stage & FSM_SYSCALL))
|
||||
rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
|
||||
fsm->path, (int)st->st_uid, (int)st->st_gid,
|
||||
|
31
compress.diff
Normal file
31
compress.diff
Normal file
@ -0,0 +1,31 @@
|
||||
Fix uncompress waitpid logic to shut up the compiler [#160434]
|
||||
|
||||
--- ./file/src/compress.c.orig 2006-03-24 15:37:23.000000000 +0000
|
||||
+++ ./file/src/compress.c 2006-03-24 15:42:52.000000000 +0000
|
||||
@@ -341,6 +341,7 @@ uncompressbuf(struct magic_set *ms, int
|
||||
file_error(ms, errno, "cannot create pipe");
|
||||
return 0;
|
||||
}
|
||||
+ pid2 = (pid_t)-1;
|
||||
switch ((pid1=fork())) {
|
||||
case 0: /* child */
|
||||
(void) close(0);
|
||||
@@ -382,7 +383,7 @@ uncompressbuf(struct magic_set *ms, int
|
||||
* fork again, to avoid blocking because both
|
||||
* pipes filled
|
||||
*/
|
||||
- switch (fork()) {
|
||||
+ switch ((pid2 = fork())) {
|
||||
case 0: /* child */
|
||||
(void)close(fdout[0]);
|
||||
if (swrite(fdin[1], old, n) != n) {
|
||||
@@ -439,7 +440,8 @@ err:
|
||||
(void) close(fdin[1]);
|
||||
(void) close(fdout[0]);
|
||||
waitpid(pid1, NULL, 0);
|
||||
- waitpid(pid2, NULL, 0);
|
||||
+ if (pid2 != (pid_t)-1)
|
||||
+ waitpid(pid2, NULL, 0);
|
||||
return n;
|
||||
}
|
||||
/*@notreached@*/
|
@ -1,369 +1,35 @@
|
||||
Build convertdb1, too.
|
||||
Build convertdb1 as static binary so that it always works.
|
||||
|
||||
--- ./Makefile.am.orig 2011-05-11 15:15:27.000000000 +0000
|
||||
+++ ./Makefile.am 2011-05-11 15:18:21.000000000 +0000
|
||||
@@ -174,6 +174,10 @@ bin_PROGRAMS += rpmqpack
|
||||
rpmqpack_SOURCES = rpmqpack.c
|
||||
rpmqpack_LDADD = lib/librpm.la
|
||||
diff -ur ./tools/Makefile.am ../rpm-4.4.2.orig/tools/Makefile.am
|
||||
--- ./tools/Makefile.am 2006-09-21 19:35:56.000000000 +0200
|
||||
+++ ../rpm-4.4.2.orig/tools/Makefile.am 2006-09-21 20:59:01.000000000 +0200
|
||||
@@ -18,22 +18,26 @@
|
||||
|
||||
+bin_PROGRAMS += convertdb1
|
||||
+convertdb1_SOURCES = tools/convertdb1.c
|
||||
+convertdb1_LDADD = lib/librpm.la
|
||||
+
|
||||
rpmconfig_DATA = rpmrc
|
||||
rpmrc: $(top_srcdir)/rpmrc.in
|
||||
@$(SED) \
|
||||
--- tools/convertdb1.c.orig 2011-05-12 13:31:37.000000000 +0000
|
||||
+++ tools/convertdb1.c 2011-05-12 13:31:28.000000000 +0000
|
||||
@@ -0,0 +1,351 @@
|
||||
+#if defined(HAVE_CONFIG_H)
|
||||
+#include "system.h"
|
||||
+const char *__progname;
|
||||
+#else
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <string.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <rpmlib.h>
|
||||
+#include <rpmts.h>
|
||||
+#include <rpmdb.h>
|
||||
+#include <rpmio.h>
|
||||
+#include <rpmmacro.h>
|
||||
+
|
||||
+#define FA_MAGIC 0x02050920
|
||||
+
|
||||
+struct faFileHeader{
|
||||
+ unsigned int magic;
|
||||
+ unsigned int firstFree;
|
||||
+};
|
||||
+
|
||||
+struct faHeader {
|
||||
+ unsigned int size;
|
||||
+ unsigned int freeNext; /* offset of the next free block, 0 if none */
|
||||
+ unsigned int freePrev;
|
||||
+ unsigned int isFree;
|
||||
+
|
||||
+ /* note that the u16's appear last for alignment/space reasons */
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static int fadFileSize;
|
||||
+
|
||||
+static ssize_t Pread(FD_t fd, void * buf, size_t count, off_t offset) {
|
||||
+ if (Fseek(fd, offset, SEEK_SET) < 0)
|
||||
+ return -1;
|
||||
+ return Fread(buf, sizeof(char), count, fd);
|
||||
+}
|
||||
+
|
||||
+static FD_t fadOpen(const char * path)
|
||||
+{
|
||||
+ struct faFileHeader newHdr;
|
||||
+ FD_t fd;
|
||||
+ struct stat stb;
|
||||
+
|
||||
+ fd = Fopen(path, "r.fdio");
|
||||
+ if (!fd || Ferror(fd))
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (fstat(Fileno(fd), &stb)) {
|
||||
+ Fclose(fd);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ fadFileSize = stb.st_size;
|
||||
+
|
||||
+ /* is this file brand new? */
|
||||
+ if (fadFileSize == 0) {
|
||||
+ Fclose(fd);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ if (Pread(fd, &newHdr, sizeof(newHdr), 0) != sizeof(newHdr)) {
|
||||
+ Fclose(fd);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ if (newHdr.magic != FA_MAGIC) {
|
||||
+ Fclose(fd);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /*@-refcounttrans@*/ return fd /*@=refcounttrans@*/ ;
|
||||
+}
|
||||
+
|
||||
+static int fadNextOffset(FD_t fd, unsigned int lastOffset)
|
||||
+{
|
||||
+ struct faHeader header;
|
||||
+ int offset;
|
||||
+
|
||||
+ offset = (lastOffset)
|
||||
+ ? (lastOffset - sizeof(header))
|
||||
+ : sizeof(struct faFileHeader);
|
||||
+
|
||||
+ if (offset >= fadFileSize)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (Pread(fd, &header, sizeof(header), offset) != sizeof(header))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (!lastOffset && !header.isFree)
|
||||
+ return (offset + sizeof(header));
|
||||
+
|
||||
+ do {
|
||||
+ offset += header.size;
|
||||
+
|
||||
+ if (Pread(fd, &header, sizeof(header), offset) != sizeof(header))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (!header.isFree) break;
|
||||
+ } while (offset < fadFileSize && header.isFree);
|
||||
+
|
||||
+ if (offset < fadFileSize) {
|
||||
+ /* Sanity check this to make sure we're not going in loops */
|
||||
+ offset += sizeof(header);
|
||||
+
|
||||
+ if (offset <= lastOffset) return -1;
|
||||
+
|
||||
+ return offset;
|
||||
+ } else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int fadFirstOffset(FD_t fd)
|
||||
+{
|
||||
+ return fadNextOffset(fd, 0);
|
||||
+}
|
||||
+
|
||||
+/*@-boundsread@*/
|
||||
+static int dncmp(const void * a, const void * b)
|
||||
+ /*@*/
|
||||
+{
|
||||
+ const char *const * first = a;
|
||||
+ const char *const * second = b;
|
||||
+ return strcmp(*first, *second);
|
||||
+}
|
||||
+/*@=boundsread@*/
|
||||
+
|
||||
+static void compressFilelist(Header h)
|
||||
+{
|
||||
+ struct rpmtd_s fileNames;
|
||||
+ char ** dirNames;
|
||||
+ const char ** baseNames;
|
||||
+ uint32_t * dirIndexes;
|
||||
+ rpm_count_t count;
|
||||
+ int xx, i;
|
||||
+ int dirIndex = -1;
|
||||
+
|
||||
+ /*
|
||||
+ * This assumes the file list is already sorted, and begins with a
|
||||
+ * single '/'. That assumption isn't critical, but it makes things go
|
||||
+ * a bit faster.
|
||||
+ */
|
||||
+
|
||||
+ if (headerIsEntry(h, RPMTAG_DIRNAMES)) {
|
||||
+ xx = headerDel(h, RPMTAG_OLDFILENAMES);
|
||||
+ return; /* Already converted. */
|
||||
+ }
|
||||
+
|
||||
+ if (!headerGet(h, RPMTAG_OLDFILENAMES, &fileNames, HEADERGET_MINMEM))
|
||||
+ return;
|
||||
+ count = rpmtdCount(&fileNames);
|
||||
+ if (count < 1)
|
||||
+ return;
|
||||
+
|
||||
+ dirNames = xmalloc(sizeof(*dirNames) * count); /* worst case */
|
||||
+ baseNames = xmalloc(sizeof(*dirNames) * count);
|
||||
+ dirIndexes = xmalloc(sizeof(*dirIndexes) * count);
|
||||
+
|
||||
+ /* HACK. Source RPM, so just do things differently */
|
||||
+ { const char *fn = rpmtdGetString(&fileNames);
|
||||
+ if (fn && *fn != '/') {
|
||||
+ dirIndex = 0;
|
||||
+ dirNames[dirIndex] = xstrdup("");
|
||||
+ while ((i = rpmtdNext(&fileNames)) >= 0) {
|
||||
+ dirIndexes[i] = dirIndex;
|
||||
+ baseNames[i] = rpmtdGetString(&fileNames);
|
||||
+ }
|
||||
+ goto exit;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ while ((i = rpmtdNext(&fileNames)) >= 0) {
|
||||
+ char ** needle;
|
||||
+ char savechar;
|
||||
+ char * baseName;
|
||||
+ size_t len;
|
||||
+ const char *filename = rpmtdGetString(&fileNames);
|
||||
+
|
||||
+ if (filename == NULL) /* XXX can't happen */
|
||||
+ continue;
|
||||
+ baseName = strrchr(filename, '/') + 1;
|
||||
+ len = baseName - filename;
|
||||
+ needle = dirNames;
|
||||
+ savechar = *baseName;
|
||||
+ *baseName = '\0';
|
||||
+ if (dirIndex < 0 ||
|
||||
+ (needle = bsearch(&filename, dirNames, dirIndex + 1, sizeof(dirNames[0]), dncmp)) == NULL) {
|
||||
+ char *s = xmalloc(len + 1);
|
||||
+ rstrlcpy(s, filename, len + 1);
|
||||
+ dirIndexes[i] = ++dirIndex;
|
||||
+ dirNames[dirIndex] = s;
|
||||
+ } else
|
||||
+ dirIndexes[i] = needle - dirNames;
|
||||
+
|
||||
+ *baseName = savechar;
|
||||
+ baseNames[i] = baseName;
|
||||
+ }
|
||||
+
|
||||
+exit:
|
||||
+ if (count > 0) {
|
||||
+ headerPutUint32(h, RPMTAG_DIRINDEXES, dirIndexes, count);
|
||||
+ headerPutStringArray(h, RPMTAG_BASENAMES, baseNames, count);
|
||||
+ headerPutStringArray(h, RPMTAG_DIRNAMES,
|
||||
+ (const char **) dirNames, dirIndex + 1);
|
||||
+ }
|
||||
+
|
||||
+ rpmtdFreeData(&fileNames);
|
||||
+ for (i = 0; i <= dirIndex; i++) {
|
||||
+ free(dirNames[i]);
|
||||
+ }
|
||||
+ free(dirNames);
|
||||
+ free(baseNames);
|
||||
+ free(dirIndexes);
|
||||
+
|
||||
+ xx = headerDel(h, RPMTAG_OLDFILENAMES);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Up to rpm 3.0.4, packages implicitly provided their own name-version-release.
|
||||
+ * Retrofit an explicit "Provides: name = epoch:version-release.
|
||||
+ */
|
||||
+static void providePackageNVR(Header h)
|
||||
+{
|
||||
+ const char *name;
|
||||
+ char *pEVR;
|
||||
+ rpmsenseFlags pFlags = RPMSENSE_EQUAL;
|
||||
+ int bingo = 1;
|
||||
+ struct rpmtd_s pnames;
|
||||
+ rpmds hds, nvrds;
|
||||
+
|
||||
+ /* Generate provides for this package name-version-release. */
|
||||
+ pEVR = headerGetEVR(h, &name);
|
||||
+ if (!(name && pEVR))
|
||||
+ return;
|
||||
+
|
||||
+ /*
|
||||
+ * Rpm prior to 3.0.3 does not have versioned provides.
|
||||
+ * If no provides at all are available, we can just add.
|
||||
+ */
|
||||
+ if (!headerGet(h, RPMTAG_PROVIDENAME, &pnames, HEADERGET_MINMEM)) {
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Otherwise, fill in entries on legacy packages.
|
||||
+ */
|
||||
+ if (!headerIsEntry(h, RPMTAG_PROVIDEVERSION)) {
|
||||
+ while (rpmtdNext(&pnames) >= 0) {
|
||||
+ rpmsenseFlags fdummy = RPMSENSE_ANY;
|
||||
+
|
||||
+ headerPutString(h, RPMTAG_PROVIDEVERSION, "");
|
||||
+ headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &fdummy, 1);
|
||||
+ }
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ /* see if we already have this provide */
|
||||
+ hds = rpmdsNew(h, RPMTAG_PROVIDENAME, 0);
|
||||
+ nvrds = rpmdsSingle(RPMTAG_PROVIDENAME, name, pEVR, pFlags);
|
||||
+ if (rpmdsFind(hds, nvrds) >= 0) {
|
||||
+ bingo = 0;
|
||||
+ }
|
||||
+ rpmdsFree(hds);
|
||||
+ rpmdsFree(nvrds);
|
||||
+
|
||||
+exit:
|
||||
+ if (bingo) {
|
||||
+ const char *evr = pEVR;
|
||||
+ headerPutString(h, RPMTAG_PROVIDENAME, name);
|
||||
+ headerPutString(h, RPMTAG_PROVIDEVERSION, evr);
|
||||
+ headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &pFlags, 1);
|
||||
+ }
|
||||
+ rpmtdFreeData(&pnames);
|
||||
+ free(pEVR);
|
||||
+}
|
||||
+/*@=bounds@*/
|
||||
+
|
||||
+static rpmdb db;
|
||||
+
|
||||
+int
|
||||
+main(int argc, char ** argv)
|
||||
+{
|
||||
+ FD_t fd;
|
||||
+ int offset;
|
||||
+ Header h;
|
||||
+ const char *name;
|
||||
+ const char *version;
|
||||
+ const char *release;
|
||||
+ rpmts ts;
|
||||
+
|
||||
+ if (argc != 2)
|
||||
+ {
|
||||
+ fprintf(stderr, "usage: %s <packages.rpm>\n", argv[0]);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ if ((fd = fadOpen(argv[1])) == 0)
|
||||
+ {
|
||||
+ fprintf(stderr, "could not open %s\n", argv[1]);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ rpmInitMacros(NULL, "/usr/lib/rpm/macros");
|
||||
+
|
||||
+ /* speed things up */
|
||||
+ (void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1);
|
||||
+
|
||||
+ ts = rpmtsCreate();
|
||||
+
|
||||
+ if (rpmtsOpenDB(ts, O_RDWR)) {
|
||||
+ fprintf(stderr, "could not open rpm database\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ for (offset = fadFirstOffset(fd); offset; offset = fadNextOffset(fd, offset))
|
||||
+ {
|
||||
+ rpmdbMatchIterator mi;
|
||||
+
|
||||
+ /* have to use lseek instead of Fseek because headerRead
|
||||
+ * uses low level IO
|
||||
+ */
|
||||
+ if (lseek(Fileno(fd), (off_t)offset, SEEK_SET) == -1)
|
||||
+ {
|
||||
+ perror("lseek");
|
||||
+ continue;
|
||||
+ }
|
||||
+ h = headerRead(fd, HEADER_MAGIC_NO);
|
||||
+ if (!h)
|
||||
+ continue;
|
||||
+ compressFilelist(h);
|
||||
+ providePackageNVR(h);
|
||||
+ headerNVR(h, &name, &version, &release);
|
||||
+ mi = rpmdbInitIterator(db, RPMTAG_NAME, name, 0);
|
||||
+ rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_DEFAULT, version);
|
||||
+ rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_DEFAULT, release);
|
||||
+ if (rpmdbNextIterator(mi))
|
||||
+ {
|
||||
+ printf("%s-%s-%s is already in database\n", name, version, release);
|
||||
+ rpmdbFreeIterator(mi);
|
||||
+ headerFree(h);
|
||||
+ continue;
|
||||
+ }
|
||||
+ rpmdbFreeIterator(mi);
|
||||
+ if (rpmtsHeaderAddDB(ts, h))
|
||||
+ {
|
||||
+ fprintf(stderr, "could not add %s-%s-%s!\n", name, version, release);
|
||||
+ }
|
||||
+ headerFree(h);
|
||||
+ }
|
||||
+ Fclose(fd);
|
||||
+ rpmtsCloseDB(ts);
|
||||
+ rpmtsFree(ts);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h
|
||||
|
||||
-EXTRA_PROGRAMS = debugedit convertdb1 rpminject rpmsort rpmtool rpmxml
|
||||
+EXTRA_PROGRAMS = rpminject rpmsort rpmtool rpmxml
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/lib/librpm.la
|
||||
|
||||
-staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@
|
||||
+staticLDFLAGS = @LDFLAGS_STATIC@ # @LDFLAGS_NPTL@
|
||||
|
||||
noinst_PROGRAMS = dumpdb
|
||||
|
||||
pkgbindir = @RPMCONFIGDIR@
|
||||
-pkgbin_PROGRAMS = @WITH_LIBDWARF_DEBUGEDIT@ javadeps rpmcache rpmdeps rpmfile
|
||||
+pkgbin_PROGRAMS = debugedit javadeps rpmcache rpmdeps rpmfile convertdb1
|
||||
MAGIC = $(pkgbindir)/magic
|
||||
|
||||
bin_PROGRAMS = rpmgraph
|
||||
|
||||
convertdb1_SOURCES = convertdb1.c
|
||||
+convertdb1_LDFLAGS = $(staticLDFLAGS)
|
||||
+convertdb1_LDADD = \
|
||||
+ $(top_builddir)/lib/librpm.la \
|
||||
+ @WITH_LIBELF_LIB@
|
||||
|
||||
debugedit_SOURCES = debugedit.c hashtab.c
|
||||
debugedit_LDADD = @LDFLAGS_STATIC@ \
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ba998b7451758928011878514c78b8a6f0fbfd49ebf5cc9f4269f4666414ab4
|
||||
size 19969243
|
151
db.diff
151
db.diff
@ -1,82 +1,111 @@
|
||||
--- db/db/db.c.orig 2010-04-12 20:25:22.000000000 +0000
|
||||
+++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000
|
||||
@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags)
|
||||
MAKE_INMEM(dbp);
|
||||
--- db/db/db.c.orig 2004-11-11 15:58:46.000000000 +0000
|
||||
+++ db/db/db.c 2005-12-15 16:17:45.000000000 +0000
|
||||
@@ -591,6 +591,8 @@ __db_dbenv_mpool(dbp, fname, flags)
|
||||
(F_ISSET(dbp, DB_AM_NOT_DURABLE) ? DB_TXN_NOT_DURABLE : 0),
|
||||
0, dbp->pgsize)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
+ if (LF_ISSET(DB_NOFSYNC) && mpf->mfp)
|
||||
+ F_SET(mpf->mfp, MP_NOFSYNC);
|
||||
|
||||
/*
|
||||
* Set the open flag. We use it to mean that the dbp has gone
|
||||
--- db/db/db_iface.c.orig 2010-04-12 20:25:22.000000000 +0000
|
||||
+++ db/db/db_iface.c 2011-05-12 11:21:32.000000000 +0000
|
||||
@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
|
||||
return (0);
|
||||
}
|
||||
--- db/db/db_iface.c.orig 2004-10-16 01:31:54.000000000 +0000
|
||||
+++ db/db/db_iface.c 2005-12-15 16:17:45.000000000 +0000
|
||||
@@ -1068,7 +1068,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
|
||||
#define OKFLAGS \
|
||||
(DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING | \
|
||||
DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY | \
|
||||
+ DB_NOFSYNC | \
|
||||
DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE)
|
||||
if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0)
|
||||
(DB_AUTO_COMMIT | DB_CREATE | DB_DIRTY_READ | DB_EXCL | \
|
||||
DB_FCNTL_LOCKING | DB_NO_AUTO_COMMIT | DB_NOMMAP | DB_RDONLY | \
|
||||
- DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN)
|
||||
+ DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN | DB_NOFSYNC)
|
||||
if ((ret = __db_fchk(dbenv, "DB->open", flags, OKFLAGS)) != 0)
|
||||
return (ret);
|
||||
--- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000
|
||||
+++ db/dbinc/mp.h 2011-05-12 12:01:32.000000000 +0000
|
||||
@@ -467,6 +467,7 @@ struct __mpoolfile {
|
||||
if (LF_ISSET(DB_EXCL) && !LF_ISSET(DB_CREATE))
|
||||
--- db/dbinc/db.in.orig 2004-10-16 01:31:54.000000000 +0000
|
||||
+++ db/dbinc/db.in 2005-12-15 16:17:45.000000000 +0000
|
||||
@@ -260,6 +260,7 @@ struct __db_dbt {
|
||||
#define DB_FCNTL_LOCKING 0x0002000 /* UNDOC: fcntl(2) locking. */
|
||||
#define DB_RDWRMASTER 0x0004000 /* UNDOC: allow subdb master open R/W */
|
||||
#define DB_WRITEOPEN 0x0008000 /* UNDOC: open with write lock. */
|
||||
+#define DB_NOFSYNC 0x0010000 /* UNDOC: don't fsync */
|
||||
|
||||
/*
|
||||
* Flags private to DB_ENV->txn_begin.
|
||||
--- db/dbinc/mp.h.orig 2004-10-16 01:31:54.000000000 +0000
|
||||
+++ db/dbinc/mp.h 2005-12-15 16:25:56.000000000 +0000
|
||||
@@ -309,6 +309,7 @@ struct __mpoolfile {
|
||||
#define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */
|
||||
#define MP_NOT_DURABLE 0x100 /* File is not durable. */
|
||||
#define MP_TEMP 0x200 /* Backing file is a temporary. */
|
||||
+#define MP_NOFSYNC 0x400 /* Don't fsync */
|
||||
+#define MP_NOFSYNC 0x400 /* Don't fsync */
|
||||
u_int32_t flags;
|
||||
};
|
||||
|
||||
--- db/dbinc_auto/api_flags.in.orig 2011-05-12 11:40:57.000000000 +0000
|
||||
+++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000
|
||||
@@ -83,6 +83,7 @@
|
||||
#define DB_NOORDERCHK 0x00000002
|
||||
#define DB_NOPANIC 0x00000800
|
||||
#define DB_NO_AUTO_COMMIT 0x00001000
|
||||
+#define DB_NOFSYNC 0x00040000
|
||||
#define DB_ODDFILESIZE 0x00000080
|
||||
#define DB_ORDERCHKONLY 0x00000004
|
||||
#define DB_OVERWRITE 0x00001000
|
||||
--- db/dist/s_config.orig 2010-04-12 20:25:23.000000000 +0000
|
||||
+++ db/dist/s_config 2011-05-12 12:00:34.000000000 +0000
|
||||
@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3
|
||||
. ./RELEASE
|
||||
|
||||
echo "autoconf: building aclocal.m4..."
|
||||
-cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4
|
||||
+cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4
|
||||
+aclocal
|
||||
|
||||
echo "autoconf: running autoheader to build config.hin..."
|
||||
rm -f config.hin
|
||||
--- db/mp/mp_sync.c.orig 2010-04-12 20:25:34.000000000 +0000
|
||||
+++ db/mp/mp_sync.c 2011-05-12 11:36:58.000000000 +0000
|
||||
@@ -578,7 +578,7 @@ done: /*
|
||||
if (ret == 0 && required_write) {
|
||||
--- db/mp/mp_sync.c.orig 2004-11-11 15:58:48.000000000 +0000
|
||||
+++ db/mp/mp_sync.c 2005-12-15 16:23:57.000000000 +0000
|
||||
@@ -553,7 +553,7 @@ done: /*
|
||||
if (ret == 0 && (op == DB_SYNC_CACHE || op == DB_SYNC_FILE)) {
|
||||
if (dbmfp == NULL)
|
||||
ret = __memp_sync_files(env);
|
||||
ret = __memp_sync_files(dbenv, dbmp);
|
||||
- else
|
||||
+ else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
|
||||
ret = __os_fsync(env, dbmfp->fhp);
|
||||
+ else if (!dbmfp->mfp || !F_ISSET(dbmfp->mfp, MP_NOFSYNC))
|
||||
ret = __os_fsync(dbenv, dbmfp->fhp);
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp,
|
||||
"%s: unable to flush", (char *)
|
||||
R_ADDR(dbmp->reginfo, mfp->path_off));
|
||||
}
|
||||
- } else
|
||||
+ } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
|
||||
ret = __os_fsync(env, dbmfp->fhp);
|
||||
@@ -600,7 +600,7 @@ int __memp_sync_files(dbenv, dbmp)
|
||||
MUTEX_THREAD_LOCK(dbenv, dbmp->mutexp);
|
||||
for (dbmfp = TAILQ_FIRST(&dbmp->dbmfq);
|
||||
dbmfp != NULL; dbmfp = TAILQ_NEXT(dbmfp, q)) {
|
||||
- if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY))
|
||||
+ if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY | MP_NOFSYNC))
|
||||
continue;
|
||||
ret = __os_fsync(dbenv, dbmfp->fhp);
|
||||
break;
|
||||
@@ -662,6 +662,9 @@ __memp_mf_sync(dbmp, mfp)
|
||||
|
||||
/*
|
||||
@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked)
|
||||
COMPQUIET(hp, NULL);
|
||||
env = dbmp->env;
|
||||
dbenv = dbmp->dbenv;
|
||||
|
||||
+ if (F_ISSET(mfp, MP_NOFSYNC))
|
||||
+ return 0;
|
||||
+
|
||||
/*
|
||||
* We need to be holding the hash lock: we're using the path name
|
||||
* and __memp_nameop might try and rename the file.
|
||||
* Expects caller to be holding the region lock: we're using the path
|
||||
* name and __memp_nameop might try and rename the file.
|
||||
--- db/dist/s_config.orig 2003-12-15 21:42:41.000000000 +0000
|
||||
+++ db/dist/s_config 2005-02-11 14:44:09.018907747 +0000
|
||||
@@ -20,14 +20,15 @@
|
||||
autoconf
|
||||
|
||||
# Edit version information we couldn't pre-compute.
|
||||
-(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" &&
|
||||
- echo "w" &&
|
||||
- echo "q") | ed configure
|
||||
+mv configure configure.old
|
||||
+sed -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
|
||||
+< configure.old > configure
|
||||
+rm -f configure.old
|
||||
|
||||
rm -rf autom4te.cache
|
||||
chmod 555 configure
|
||||
--- db/dist/aclocal/options.ac.orig 2005-12-15 16:43:14.000000000 +0000
|
||||
+++ db/dist/aclocal/options.ac 2005-12-15 16:43:40.000000000 +0000
|
||||
@@ -277,10 +277,6 @@ fi
|
||||
|
||||
# Uniquename excludes C++, Java, RPC.
|
||||
if test "$db_cv_uniquename" = "yes"; then
|
||||
- if test "$db_cv_rpc" = "yes"; then
|
||||
- AC_MSG_ERROR(
|
||||
- [--with-uniquename is not compatible with --enable-rpc])
|
||||
- fi
|
||||
if test "$db_cv_cxx" = "yes"; then
|
||||
AC_MSG_ERROR(
|
||||
[--with-uniquename is not compatible with --enable-cxx])
|
||||
|
58
dbfsync.diff
58
dbfsync.diff
@ -1,24 +1,54 @@
|
||||
Support a database-local fsync setting. Needs berkeley db patch.
|
||||
|
||||
--- ./lib/backend/dbconfig.c.orig 2011-01-03 13:57:41.000000000 +0000
|
||||
+++ ./lib/backend/dbconfig.c 2011-05-10 17:00:29.000000000 +0000
|
||||
@@ -58,8 +58,10 @@ static const struct poptOption rdbOption
|
||||
{ "mp_size", 0,POPT_ARG_INT, &staticcfg.db_cachesize, 0,
|
||||
NULL, NULL },
|
||||
--- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000
|
||||
+++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000
|
||||
@@ -211,11 +211,13 @@ static int db_fini(dbiIndex dbi, const c
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
{ "nofsync", 0,POPT_ARG_NONE, &staticcfg.db_no_fsync, 0,
|
||||
NULL, NULL },
|
||||
static int db3_fsync_disable(/*@unused@*/ int fd)
|
||||
/*@*/
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Per-dbi options */
|
||||
{ "nommap", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOMMAP,
|
||||
@@ -69,6 +71,8 @@ static const struct poptOption rdbOption
|
||||
#if 0
|
||||
#if HAVE_LIBPTHREAD
|
||||
@@ -414,6 +416,7 @@ static int db_init(dbiIndex dbi, const c
|
||||
/* dbenv->set_rep_transport(???) */
|
||||
/* dbenv->set_rep_limit(???) */
|
||||
|
||||
+#if 0
|
||||
if (dbi->dbi_no_fsync) {
|
||||
#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4)
|
||||
xx = db_env_set_func_fsync(db3_fsync_disable);
|
||||
@@ -422,6 +425,7 @@ static int db_init(dbiIndex dbi, const c
|
||||
#endif
|
||||
xx = cvtdberr(dbi, "db_env_set_func_fsync", xx, _debug);
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (dbi->dbi_shmkey) {
|
||||
xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey);
|
||||
--- ./rpmdb/dbconfig.c.orig 2004-10-16 12:50:52.000000000 +0000
|
||||
+++ ./rpmdb/dbconfig.c 2005-12-15 13:12:32.000000000 +0000
|
||||
@@ -99,6 +99,8 @@ struct poptOption rdbOptions[] = {
|
||||
NULL, NULL },
|
||||
{ "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0,
|
||||
{ "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING,
|
||||
NULL, NULL },
|
||||
+ { "nofsync", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOFSYNC,
|
||||
+ { "nofsync", 0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_NOFSYNC,
|
||||
+ NULL, NULL },
|
||||
|
||||
POPT_TABLEEND
|
||||
};
|
||||
{ "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE,
|
||||
NULL, NULL },
|
||||
@@ -145,8 +147,6 @@ struct poptOption rdbOptions[] = {
|
||||
NULL, NULL },
|
||||
{ "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0,
|
||||
NULL, NULL },
|
||||
- { "nofsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_fsync, 0,
|
||||
- NULL, NULL },
|
||||
{ "nodbsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_dbsync, 0,
|
||||
NULL, NULL },
|
||||
{ "lockdbfd", 0,POPT_ARG_NONE, &db3dbi.dbi_lockdbfd, 0,
|
||||
|
@ -1,14 +1,14 @@
|
||||
Always use DB_PRIVATE. Unfortunately no longer configurable
|
||||
in the macros file.
|
||||
Always use DB_PRIVATE. Should probably be configured instead.
|
||||
|
||||
--- lib/backend/db3.c.orig 2011-05-12 15:38:18.000000000 +0000
|
||||
+++ lib/backend/db3.c 2011-05-12 15:38:41.000000000 +0000
|
||||
@@ -119,7 +119,7 @@ static int db_init(rpmdb rdb, const char
|
||||
int retry_open = 2;
|
||||
struct _dbConfig * cfg = &rdb->cfg;
|
||||
/* This is our setup, thou shall not have other setups before us */
|
||||
- uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB);
|
||||
+ uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB|DB_PRIVATE);
|
||||
--- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000
|
||||
+++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000
|
||||
@@ -1034,6 +1050,9 @@ static int db3open(rpmdb rpmdb, rpmTag r
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (rdb->db_dbenv != NULL) {
|
||||
rdb->db_opens++;
|
||||
+ /* always use fcntl lock */
|
||||
+ dbi->dbi_eflags |= DB_PRIVATE;
|
||||
+
|
||||
if (access(dbhome, W_OK) == -1) {
|
||||
|
||||
/* dbhome is unwritable, don't attempt DB_CREATE on DB->open ... */
|
||||
|
@ -1,11 +1,11 @@
|
||||
Do not block signals if the database is opened read-only, it just
|
||||
Do not block signals if the database is opened read-only, it jst
|
||||
annoys the users. [#48026]
|
||||
|
||||
--- ./lib/rpmdb.c.orig 2011-02-28 09:57:27.000000000 +0000
|
||||
+++ ./lib/rpmdb.c 2011-05-10 16:58:21.000000000 +0000
|
||||
@@ -623,10 +623,12 @@ int rpmdbClose(rpmdb db)
|
||||
{
|
||||
--- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000
|
||||
+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000
|
||||
@@ -846,10 +873,12 @@ int rpmdbClose(rpmdb db)
|
||||
rpmdb * prev, next;
|
||||
int dbix;
|
||||
int rc = 0;
|
||||
+ int dbmode;
|
||||
|
||||
@ -13,18 +13,13 @@ annoys the users. [#48026]
|
||||
goto exit;
|
||||
|
||||
+ dbmode = db->db_mode;
|
||||
(void) rpmdbUnlink(db);
|
||||
(void) rpmdbUnlink(db, "rpmdbClose");
|
||||
|
||||
if (db->nrefs > 0)
|
||||
@@ -655,11 +657,13 @@ int rpmdbClose(rpmdb db)
|
||||
db = _free(db);
|
||||
/*@-usereleased@*/
|
||||
@@ -886,12 +915,14 @@ int rpmdbClose(rpmdb db)
|
||||
/*@-refcounttrans@*/ db = _free(db); /*@=refcounttrans@*/
|
||||
/*@=usereleased@*/
|
||||
|
||||
exit:
|
||||
- (void) rpmsqEnable(-SIGHUP, NULL);
|
||||
- (void) rpmsqEnable(-SIGINT, NULL);
|
||||
- (void) rpmsqEnable(-SIGTERM,NULL);
|
||||
- (void) rpmsqEnable(-SIGQUIT,NULL);
|
||||
- (void) rpmsqEnable(-SIGPIPE,NULL);
|
||||
+ if ((dbmode & (O_RDWR|O_WRONLY)) != 0) {
|
||||
+ (void) rpmsqEnable(-SIGHUP, NULL);
|
||||
+ (void) rpmsqEnable(-SIGINT, NULL);
|
||||
@ -32,25 +27,31 @@ annoys the users. [#48026]
|
||||
+ (void) rpmsqEnable(-SIGQUIT,NULL);
|
||||
+ (void) rpmsqEnable(-SIGPIPE,NULL);
|
||||
+ }
|
||||
exit:
|
||||
- (void) rpmsqEnable(-SIGHUP, NULL);
|
||||
- (void) rpmsqEnable(-SIGINT, NULL);
|
||||
- (void) rpmsqEnable(-SIGTERM,NULL);
|
||||
- (void) rpmsqEnable(-SIGQUIT,NULL);
|
||||
- (void) rpmsqEnable(-SIGPIPE,NULL);
|
||||
return rc;
|
||||
}
|
||||
/*@=incondefs@*/
|
||||
@@ -1021,11 +1070,13 @@ static int openDatabase(/*@null@*/ const
|
||||
if (db == NULL)
|
||||
return 1;
|
||||
|
||||
@@ -721,11 +725,13 @@ static int openDatabase(const char * pre
|
||||
/* Try to ensure db home exists, error out if we cant even create */
|
||||
rc = rpmioMkpath(rpmdbHome(db), 0755, getuid(), getgid());
|
||||
if (rc == 0) {
|
||||
- (void) rpmsqEnable(SIGHUP, NULL);
|
||||
- (void) rpmsqEnable(SIGINT, NULL);
|
||||
- (void) rpmsqEnable(SIGTERM,NULL);
|
||||
- (void) rpmsqEnable(SIGQUIT,NULL);
|
||||
- (void) rpmsqEnable(SIGPIPE,NULL);
|
||||
+ if ((db->db_mode & (O_RDWR|O_WRONLY)) != 0) {
|
||||
+ (void) rpmsqEnable(SIGHUP, NULL);
|
||||
+ (void) rpmsqEnable(SIGINT, NULL);
|
||||
+ (void) rpmsqEnable(SIGTERM,NULL);
|
||||
+ (void) rpmsqEnable(SIGQUIT,NULL);
|
||||
+ (void) rpmsqEnable(SIGPIPE,NULL);
|
||||
+ }
|
||||
- (void) rpmsqEnable(SIGHUP, NULL);
|
||||
- (void) rpmsqEnable(SIGINT, NULL);
|
||||
- (void) rpmsqEnable(SIGTERM,NULL);
|
||||
- (void) rpmsqEnable(SIGQUIT,NULL);
|
||||
- (void) rpmsqEnable(SIGPIPE,NULL);
|
||||
+ if ((db->db_mode & (O_RDWR|O_WRONLY)) != 0) {
|
||||
+ (void) rpmsqEnable(SIGHUP, NULL);
|
||||
+ (void) rpmsqEnable(SIGINT, NULL);
|
||||
+ (void) rpmsqEnable(SIGTERM,NULL);
|
||||
+ (void) rpmsqEnable(SIGQUIT,NULL);
|
||||
+ (void) rpmsqEnable(SIGPIPE,NULL);
|
||||
+ }
|
||||
|
||||
db->db_api = _dbapi;
|
||||
|
||||
/* Just the primary Packages database opened here */
|
||||
rc = (rpmdbOpenIndex(db, RPMDBI_PACKAGES, db->db_flags) != NULL) ? 0 : -2;
|
||||
|
@ -1,119 +0,0 @@
|
||||
--- ./tools/debugedit.c.orig 2011-05-20 11:26:04.000000000 +0000
|
||||
+++ ./tools/debugedit.c 2011-05-20 11:27:56.000000000 +0000
|
||||
@@ -158,7 +158,7 @@ strptr (DSO *dso, int sec, off_t offset)
|
||||
{
|
||||
if (data->d_buf
|
||||
&& offset >= data->d_off
|
||||
- && offset < data->d_off + data->d_size)
|
||||
+ && offset < data->d_off + (off_t)data->d_size)
|
||||
return (const char *) data->d_buf + (offset - data->d_off);
|
||||
}
|
||||
}
|
||||
@@ -496,9 +496,10 @@ static int
|
||||
edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase)
|
||||
{
|
||||
unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir;
|
||||
- unsigned char **dirt;
|
||||
+ char **dirt;
|
||||
unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size;
|
||||
unsigned char *endcu, *endprol;
|
||||
+ char line_base;
|
||||
unsigned char opcode_base;
|
||||
uint32_t value, dirt_cnt;
|
||||
size_t comp_dir_len = strlen (comp_dir);
|
||||
@@ -542,6 +543,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ line_base = (char) (ptr[2] & 0xff);
|
||||
opcode_base = ptr[4];
|
||||
ptr = dir = ptr + 4 + opcode_base;
|
||||
|
||||
@@ -553,13 +555,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
++value;
|
||||
}
|
||||
|
||||
- dirt = (unsigned char **) alloca (value * sizeof (unsigned char *));
|
||||
+ dirt = (char **) alloca (value * sizeof (unsigned char *));
|
||||
dirt[0] = (unsigned char *) ".";
|
||||
dirt_cnt = 1;
|
||||
ptr = dir;
|
||||
while (*ptr != 0)
|
||||
{
|
||||
- dirt[dirt_cnt++] = ptr;
|
||||
+ dirt[dirt_cnt++] = (char *)ptr;
|
||||
ptr = (unsigned char *) strchr ((char *)ptr, 0) + 1;
|
||||
}
|
||||
ptr++;
|
||||
@@ -672,7 +674,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
|
||||
if (dest_dir)
|
||||
{
|
||||
- unsigned char *srcptr, *buf = NULL;
|
||||
+ char *srcptr, *buf = NULL;
|
||||
size_t base_len = strlen (base_dir);
|
||||
size_t dest_len = strlen (dest_dir);
|
||||
size_t shrank = 0;
|
||||
@@ -686,11 +688,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
ptr = dir;
|
||||
}
|
||||
else
|
||||
- ptr = srcptr = dir;
|
||||
+ {
|
||||
+ ptr = dir;
|
||||
+ srcptr = (char *)dir;
|
||||
+ }
|
||||
while (*srcptr != 0)
|
||||
{
|
||||
size_t len = strlen ((char *)srcptr) + 1;
|
||||
- const unsigned char *readptr = srcptr;
|
||||
+ const char *readptr = srcptr;
|
||||
|
||||
char *orig = strdup ((const char *) srcptr);
|
||||
|
||||
@@ -717,10 +722,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
|
||||
if (shrank > 0)
|
||||
{
|
||||
- if (--shrank == 0)
|
||||
+ --shrank;
|
||||
+#if 0
|
||||
+ if (shrank == 0)
|
||||
error (EXIT_FAILURE, 0,
|
||||
"canonicalization unexpectedly shrank by one character");
|
||||
else
|
||||
+#endif
|
||||
{
|
||||
memset (ptr, 'X', shrank);
|
||||
ptr += shrank;
|
||||
@@ -756,21 +764,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
}
|
||||
dirty_section (DEBUG_STR);
|
||||
}
|
||||
- else if (ptr != srcptr)
|
||||
+ else if ((char *)ptr != srcptr)
|
||||
memmove (ptr, srcptr, len);
|
||||
srcptr += len;
|
||||
ptr += len;
|
||||
- dir = srcptr;
|
||||
+ dir = (unsigned char *)srcptr;
|
||||
read_uleb128 (srcptr);
|
||||
read_uleb128 (srcptr);
|
||||
read_uleb128 (srcptr);
|
||||
if (ptr != dir)
|
||||
- memmove (ptr, dir, srcptr - dir);
|
||||
- ptr += srcptr - dir;
|
||||
+ memmove (ptr, dir, (unsigned char *)srcptr - dir);
|
||||
+ ptr += (unsigned char *)srcptr - dir;
|
||||
}
|
||||
*ptr = '\0';
|
||||
free (buf);
|
||||
}
|
||||
+
|
||||
+ ptr++;
|
||||
+ /* fill the rest until the line number program starts with NOP opcode */
|
||||
+ memset(ptr, opcode_base - line_base, endprol - ptr);
|
||||
+ /* don't touch the line number program */
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
Include compilation directory in source file list if used.
|
||||
|
||||
--- ./tools/debugedit.c.orig 2011-05-11 14:27:32.000000000 +0000
|
||||
+++ ./tools/debugedit.c 2011-05-11 15:31:31.000000000 +0000
|
||||
@@ -503,6 +503,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
uint32_t value, dirt_cnt;
|
||||
size_t comp_dir_len = strlen (comp_dir);
|
||||
size_t abs_file_cnt = 0, abs_dir_cnt = 0;
|
||||
+ int comp_dir_used = 0;
|
||||
|
||||
if (phase != 0)
|
||||
return 0;
|
||||
@@ -611,6 +612,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
memcpy (p, dirt[value], dir_len);
|
||||
p[dir_len] = '/';
|
||||
memcpy (p + dir_len + 1, file, file_len + 1);
|
||||
+ comp_dir_used = 1;
|
||||
}
|
||||
canonicalize_path (s, s);
|
||||
if (list_file_fd != -1)
|
||||
@@ -644,6 +646,30 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||
}
|
||||
++ptr;
|
||||
|
||||
+ if (comp_dir_used && list_file_fd != -1
|
||||
+ && (base_dir == NULL || has_prefix (comp_dir, base_dir)))
|
||||
+ {
|
||||
+ char *p;
|
||||
+ size_t size;
|
||||
+ ssize_t ret;
|
||||
+
|
||||
+ size = comp_dir_len + 1;
|
||||
+ p = comp_dir;
|
||||
+ if (base_dir)
|
||||
+ {
|
||||
+ p += strlen (base_dir);
|
||||
+ size -= strlen (base_dir);
|
||||
+ }
|
||||
+ while (size > 0)
|
||||
+ {
|
||||
+ ret = write (list_file_fd, p, size);
|
||||
+ if (ret == -1)
|
||||
+ break;
|
||||
+ size -= ret;
|
||||
+ p += ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (dest_dir)
|
||||
{
|
||||
unsigned char *srcptr, *buf = NULL;
|
@ -1,26 +1,8 @@
|
||||
Make debugedit build without dwarf.h
|
||||
Make debugedit build without dwarf.h. Also fixes a logic bug for ppc.
|
||||
|
||||
--- ./Makefile.am.orig 2010-12-22 11:17:20.000000000 +0000
|
||||
+++ ./Makefile.am 2011-05-10 16:03:49.000000000 +0000
|
||||
@@ -143,7 +143,6 @@ rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_P
|
||||
|
||||
|
||||
if LIBELF
|
||||
-if LIBDWARF
|
||||
rpmconfig_SCRIPTS += scripts/find-debuginfo.sh
|
||||
|
||||
rpmlibexec_PROGRAMS += debugedit
|
||||
@@ -156,7 +155,6 @@ elfdeps_SOURCES = tools/elfdeps.c
|
||||
elfdeps_LDADD = rpmio/librpmio.la
|
||||
elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
|
||||
endif
|
||||
-endif
|
||||
|
||||
rpmlibexec_PROGRAMS += javadeps
|
||||
javadeps_SOURCES = tools/javadeps.c
|
||||
--- ./tools/debugedit.c.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./tools/debugedit.c 2011-05-10 16:03:49.000000000 +0000
|
||||
@@ -37,7 +37,37 @@
|
||||
--- ./tools/debugedit.c.orig 2005-12-15 14:28:49.000000000 +0000
|
||||
+++ ./tools/debugedit.c 2006-03-17 13:01:53.000000000 +0000
|
||||
@@ -34,7 +34,37 @@
|
||||
#include <popt.h>
|
||||
|
||||
#include <gelf.h>
|
||||
@ -57,5 +39,14 @@ Make debugedit build without dwarf.h
|
||||
+#define DW_FORM_ref_udata 0x15
|
||||
+#define DW_FORM_indirect 0x16
|
||||
|
||||
#include <rpm/rpmio.h>
|
||||
#include <rpm/rpmpgp.h>
|
||||
#include "hashtab.h"
|
||||
|
||||
@@ -1039,7 +1069,7 @@ edit_dwarf2 (DSO *dso)
|
||||
break;
|
||||
case EM_PPC:
|
||||
case EM_PPC64:
|
||||
- if (rtype != R_PPC_ADDR32 || rtype != R_PPC_UADDR32)
|
||||
+ if (rtype != R_PPC_ADDR32 && rtype != R_PPC_UADDR32)
|
||||
goto fail;
|
||||
break;
|
||||
case EM_S390:
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- ./scripts/find-debuginfo.sh.orig 2011-05-11 16:10:22.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:48.000000000 +0000
|
||||
@@ -211,6 +211,17 @@ while read nlinks inum f; do
|
||||
;;
|
||||
*) continue ;;
|
||||
esac
|
||||
+ # double check that we really have an ELF file,
|
||||
+ # to handle monodevelop-debugger-gdb and monodevelop-debugger-mdb
|
||||
+ ftype=`/usr/bin/file $f | cut -d: -f2-`
|
||||
+ case $ftype in
|
||||
+ *ELF*) ;;
|
||||
+ *)
|
||||
+ echo "$f is not an ELF file, skipping"
|
||||
+ continue
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
get_debugfn "$f"
|
||||
[ -f "${debugfn}" ] && continue
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:59:44.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:22.000000000 +0000
|
||||
@@ -186,7 +186,8 @@ make_id_link()
|
||||
get_debugfn()
|
||||
{
|
||||
dn=$(dirname "${1#$RPM_BUILD_ROOT}")
|
||||
- bn=$(basename "$1" .debug).debug
|
||||
+# Do not strip existing .debug suffixes
|
||||
+ bn=$(basename "$1").debug
|
||||
|
||||
debugdn=${debugdir}${dn}
|
||||
debugfn=${debugdn}/${bn}
|
@ -1,57 +0,0 @@
|
||||
Subject: Split sources for debugging into separate -debugsource package
|
||||
|
||||
At the moment the -debuginfo package also include the sources where used to
|
||||
build the binary. The patches moves them into a separate package -debugsource.
|
||||
|
||||
--- ./macros.in.orig 2011-05-11 15:01:39.000000000 +0000
|
||||
+++ ./macros.in 2011-05-11 15:36:05.000000000 +0000
|
||||
@@ -190,6 +190,18 @@ Debug information is useful when develop
|
||||
package or when debugging this package.\
|
||||
%files debuginfo -f debugfiles.list\
|
||||
%defattr(-,root,root)\
|
||||
+\
|
||||
+%package debugsource\
|
||||
+Summary: Debug sources for package %{name}\
|
||||
+Group: Development/Debug\
|
||||
+AutoReqProv: 0\
|
||||
+Requires: %{name}-debuginfo = %{version}-%{release}\
|
||||
+%description debugsource\
|
||||
+This package provides debug sources for package %{name}.\
|
||||
+Debug sources are useful when developing applications that use this\
|
||||
+package or when debugging this package.\
|
||||
+%files debugsource -f debugsources.list\
|
||||
+%defattr(-,root,root)\
|
||||
%{nil}
|
||||
|
||||
%_defaultdocdir %{_datadir}/doc/packages
|
||||
--- ./scripts/find-debuginfo.sh.orig 2011-05-11 14:46:18.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2011-05-11 15:36:05.000000000 +0000
|
||||
@@ -187,8 +187,8 @@ set -o pipefail
|
||||
strict_error=ERROR
|
||||
$strict || strict_error=WARNING
|
||||
|
||||
-# Strip ELF binaries
|
||||
-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z |
|
||||
+# Strip ELF binaries (and no static libraries)
|
||||
+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | sort -z |
|
||||
xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' |
|
||||
while read nlinks inum f; do
|
||||
case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||
@@ -300,10 +300,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -
|
||||
|
||||
(cd "${RPM_BUILD_ROOT}/usr"
|
||||
test ! -d lib/debug || find lib/debug ! -type d
|
||||
- test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1
|
||||
) | sed 's,^,/usr/,' >> "$LISTFILE"
|
||||
fi
|
||||
|
||||
+: > "$SOURCEFILE"
|
||||
+if [ -d "${RPM_BUILD_ROOT}/usr/src" ]; then
|
||||
+ (cd "${RPM_BUILD_ROOT}/usr"
|
||||
+ test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1
|
||||
+ ) | sed 's,^,/usr/,' >> "$SOURCEFILE"
|
||||
+fi
|
||||
+
|
||||
# Append to $1 only the lines from stdin not already in the file.
|
||||
append_uniq()
|
||||
{
|
322
debugsubpkg.diff
322
debugsubpkg.diff
@ -1,322 +0,0 @@
|
||||
Create a debuginfo package for each subpackage.
|
||||
|
||||
--- ./build/files.c.orig 2011-05-13 15:34:01.000000000 +0000
|
||||
+++ ./build/files.c 2011-05-13 15:35:42.000000000 +0000
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <rpm/rpmfileutil.h> /* rpmDoDigest() */
|
||||
#include <rpm/rpmlog.h>
|
||||
|
||||
+#if HAVE_GELF_H
|
||||
+#include <gelf.h>
|
||||
+#endif
|
||||
+
|
||||
#include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */
|
||||
#include "rpmio/base64.h"
|
||||
#include "misc/fts.h"
|
||||
@@ -2105,13 +2109,237 @@ exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if HAVE_GELF_H && HAVE_LIBELF
|
||||
+/* Query the build-id from the ELF file NAME and store it in the newly
|
||||
+ allocated *build_id array of size *build_id_size. Returns -1 on
|
||||
+ error. */
|
||||
+
|
||||
+int
|
||||
+getELFBuildId (const char *name,
|
||||
+ unsigned char **id, size_t *id_size)
|
||||
+{
|
||||
+ int fd, i;
|
||||
+ Elf *elf;
|
||||
+ GElf_Ehdr ehdr;
|
||||
+ Elf_Data *build_id = NULL;
|
||||
+ size_t build_id_offset = 0, build_id_size = 0;
|
||||
+
|
||||
+ /* Now query the build-id of the file and add the
|
||||
+ corresponding links in the .build-id tree.
|
||||
+ The following code is based on tools/debugedit.c. */
|
||||
+ fd = open (name, O_RDONLY);
|
||||
+ if (fd < 0)
|
||||
+ return -1;
|
||||
+ elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
|
||||
+ if (elf == NULL)
|
||||
+ {
|
||||
+ fprintf (stderr, "cannot open ELF file: %s",
|
||||
+ elf_errmsg (-1));
|
||||
+ close (fd);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (elf_kind (elf) != ELF_K_ELF
|
||||
+ || gelf_getehdr (elf, &ehdr) == NULL
|
||||
+ || (ehdr.e_type != ET_DYN
|
||||
+ && ehdr.e_type != ET_EXEC
|
||||
+ && ehdr.e_type != ET_REL))
|
||||
+ {
|
||||
+ elf_end (elf);
|
||||
+ close (fd);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ for (i = 0; i < ehdr.e_shnum; ++i)
|
||||
+ {
|
||||
+ Elf_Scn *s = elf_getscn (elf, i);
|
||||
+ GElf_Shdr shdr;
|
||||
+ Elf_Data *data;
|
||||
+ Elf32_Nhdr nh;
|
||||
+ Elf_Data dst =
|
||||
+ {
|
||||
+ .d_version = EV_CURRENT, .d_type = ELF_T_NHDR,
|
||||
+ .d_buf = &nh, .d_size = sizeof nh
|
||||
+ };
|
||||
+ Elf_Data src = dst;
|
||||
+
|
||||
+ gelf_getshdr (s, &shdr);
|
||||
+ if (shdr.sh_type != SHT_NOTE
|
||||
+ || !(shdr.sh_flags & SHF_ALLOC))
|
||||
+ continue;
|
||||
+
|
||||
+ /* Look for a build-ID note here. */
|
||||
+ data = elf_rawdata (s, NULL);
|
||||
+ src.d_buf = data->d_buf;
|
||||
+ assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr));
|
||||
+ while (data->d_buf + data->d_size - src.d_buf > (int) sizeof nh
|
||||
+ && elf32_xlatetom (&dst, &src, ehdr.e_ident[EI_DATA]))
|
||||
+ {
|
||||
+ Elf32_Word len = sizeof nh + nh.n_namesz;
|
||||
+ len = (len + 3) & ~3;
|
||||
+
|
||||
+ if (nh.n_namesz == sizeof "GNU" && nh.n_type == 3
|
||||
+ && !memcmp (src.d_buf + sizeof nh, "GNU", sizeof "GNU"))
|
||||
+ {
|
||||
+ build_id = data;
|
||||
+ build_id_offset = src.d_buf + len - data->d_buf;
|
||||
+ build_id_size = nh.n_descsz;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ len += nh.n_descsz;
|
||||
+ len = (len + 3) & ~3;
|
||||
+ src.d_buf += len;
|
||||
+ }
|
||||
+
|
||||
+ if (build_id != NULL)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (build_id == NULL)
|
||||
+ return -1;
|
||||
+
|
||||
+ *id = malloc (build_id_size);
|
||||
+ *id_size = build_id_size;
|
||||
+ memcpy (*id, build_id->d_buf + build_id_offset, build_id_size);
|
||||
+
|
||||
+ elf_end (elf);
|
||||
+ close (fd);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static rpmTag copyTagsForDebug[] = {
|
||||
+ RPMTAG_EPOCH,
|
||||
+ RPMTAG_VERSION,
|
||||
+ RPMTAG_RELEASE,
|
||||
+ RPMTAG_LICENSE,
|
||||
+ RPMTAG_PACKAGER,
|
||||
+ RPMTAG_DISTRIBUTION,
|
||||
+ RPMTAG_DISTURL,
|
||||
+ RPMTAG_VENDOR,
|
||||
+ RPMTAG_ICON,
|
||||
+ RPMTAG_URL,
|
||||
+ RPMTAG_CHANGELOGTIME,
|
||||
+ RPMTAG_CHANGELOGNAME,
|
||||
+ RPMTAG_CHANGELOGTEXT,
|
||||
+ RPMTAG_PREFIXES,
|
||||
+ RPMTAG_RHNPLATFORM,
|
||||
+ RPMTAG_OS,
|
||||
+ RPMTAG_DISTTAG,
|
||||
+ RPMTAG_CVSID,
|
||||
+ RPMTAG_ARCH,
|
||||
+ 0
|
||||
+};
|
||||
+
|
||||
+static void addDebuginfoPackage(rpmSpec spec, Package pkg, char *buildroot)
|
||||
+{
|
||||
+ const char *a;
|
||||
+
|
||||
+ elf_version(EV_CURRENT);
|
||||
+ a = headerGetString(pkg->header, RPMTAG_ARCH);
|
||||
+ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0)
|
||||
+ {
|
||||
+ Package dbg;
|
||||
+ rpmfi fi = pkg->cpioList;
|
||||
+ char tmp[1024];
|
||||
+ const char *name;
|
||||
+ ARGV_t files = NULL;
|
||||
+ int seen_build_id = 0;
|
||||
+
|
||||
+ /* Check if the current package has files with debug info
|
||||
+ and record them. */
|
||||
+ fi = rpmfiInit (fi, 0);
|
||||
+ while (rpmfiNext (fi) >= 0)
|
||||
+ {
|
||||
+ const char *base;
|
||||
+ int i;
|
||||
+ unsigned char *build_id;
|
||||
+ size_t build_id_size = 0;
|
||||
+ struct stat sbuf;
|
||||
+
|
||||
+ name = rpmfiFN (fi);
|
||||
+ /* Skip leading buildroot. */
|
||||
+ base = name + strlen (buildroot);
|
||||
+ /* Pre-pend %buildroot/usr/lib/debug and append .debug. */
|
||||
+ snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug",
|
||||
+ buildroot, base);
|
||||
+ /* If that file exists we have debug information for it. */
|
||||
+ if (access (tmp, F_OK) != 0)
|
||||
+ continue;
|
||||
+
|
||||
+ /* Append the file list preamble. */
|
||||
+ if (!files)
|
||||
+ {
|
||||
+ argvAdd(&files, "%defattr(-,root,root)");
|
||||
+ argvAdd(&files, "%dir /usr/lib/debug");
|
||||
+ }
|
||||
+ /* Add the files main debug-info file. */
|
||||
+ snprintf (tmp, 1024, "/usr/lib/debug/%s.debug", base);
|
||||
+ argvAdd(&files, tmp);
|
||||
+
|
||||
+ /* Do not bother to check build-ids for symbolic links.
|
||||
+ We'll handle them for the link target. */
|
||||
+ if (lstat (name, &sbuf) == -1
|
||||
+ || S_ISLNK (sbuf.st_mode))
|
||||
+ continue;
|
||||
+
|
||||
+ /* Try to gather the build-id from the binary. */
|
||||
+ if (getELFBuildId (name, &build_id, &build_id_size) == -1)
|
||||
+ continue;
|
||||
+
|
||||
+ /* If we see build-id links for the first time add the
|
||||
+ directory. */
|
||||
+ if (!seen_build_id)
|
||||
+ argvAdd(&files, "%dir /usr/lib/debug/.build-id");
|
||||
+
|
||||
+ /* From the build-id construct the two links pointing back
|
||||
+ to the debug information file and the binary. */
|
||||
+ snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/",
|
||||
+ build_id[0]);
|
||||
+ for (i = 1; i < build_id_size; ++i)
|
||||
+ sprintf (tmp + strlen (tmp), "%02x", build_id[i]);
|
||||
+ argvAdd(&files, tmp);
|
||||
+ sprintf (tmp + strlen (tmp), ".debug");
|
||||
+ argvAdd(&files, tmp);
|
||||
+
|
||||
+ free (build_id);
|
||||
+ }
|
||||
+
|
||||
+ /* If there are debuginfo files for this package add a
|
||||
+ new debuginfo package. */
|
||||
+ if (files)
|
||||
+ {
|
||||
+ dbg = newPackage (spec);
|
||||
+ headerNVR (pkg->header, &name, NULL, NULL);
|
||||
+ /* Set name, summary and group. */
|
||||
+ snprintf (tmp, 1024, "%s-debuginfo", name);
|
||||
+ headerPutString(dbg->header, RPMTAG_NAME, tmp);
|
||||
+ snprintf (tmp, 1024, "Debug information for package %s", name);
|
||||
+ headerPutString(dbg->header, RPMTAG_SUMMARY, tmp);
|
||||
+ snprintf (tmp, 1024, "This package provides debug information for package %s.\n"
|
||||
+ "Debug information is useful when developing applications that use this\n"
|
||||
+ "package or when debugging this package.", name);
|
||||
+ headerPutString(dbg->header, RPMTAG_DESCRIPTION, tmp);
|
||||
+ headerPutString(dbg->header, RPMTAG_GROUP, "Development/Debug");
|
||||
+ /* Inherit other tags from parent. */
|
||||
+ headerCopyTags (pkg->header, dbg->header, copyTagsForDebug);
|
||||
+
|
||||
+ /* Build up the files list. */
|
||||
+ dbg->fileList = files;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
rpmRC processBinaryFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
|
||||
int installSpecialDoc, int test)
|
||||
{
|
||||
Package pkg;
|
||||
rpmRC rc = RPMRC_OK;
|
||||
+ char *buildroot;
|
||||
|
||||
check_fileList = newStringBuf();
|
||||
+ buildroot = rpmGenPath(spec->rootDir, spec->buildRoot, NULL);
|
||||
genSourceRpmName(spec);
|
||||
|
||||
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
|
||||
@@ -2127,8 +2355,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r
|
||||
rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr);
|
||||
free(nvr);
|
||||
|
||||
- if ((rc = processPackageFiles(spec, pkgFlags, pkg, installSpecialDoc, test)) != RPMRC_OK ||
|
||||
- (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
|
||||
+ if ((rc = processPackageFiles(spec, pkgFlags, pkg, installSpecialDoc, test)) != RPMRC_OK)
|
||||
+ goto exit;
|
||||
+#if HAVE_GELF_H && HAVE_LIBELF
|
||||
+ addDebuginfoPackage(spec, pkg, buildroot);
|
||||
+#endif
|
||||
+ if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
|
||||
goto exit;
|
||||
|
||||
a = headerGetString(pkg->header, RPMTAG_ARCH);
|
||||
--- ./macros.in.orig 2011-05-13 15:34:01.000000000 +0000
|
||||
+++ ./macros.in 2011-05-13 15:34:10.000000000 +0000
|
||||
@@ -179,24 +179,10 @@
|
||||
# Template for debug information sub-package.
|
||||
%debug_package \
|
||||
%global __debug_package 1\
|
||||
-%package debuginfo\
|
||||
-Summary: Debug information for package %{name}\
|
||||
-Group: Development/Debug\
|
||||
-AutoReq: 0\
|
||||
-AutoProv: 1\
|
||||
-#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\
|
||||
-%description debuginfo\
|
||||
-This package provides debug information for package %{name}.\
|
||||
-Debug information is useful when developing applications that use this\
|
||||
-package or when debugging this package.\
|
||||
-%files debuginfo -f debugfiles.list\
|
||||
-%defattr(-,root,root)\
|
||||
-\
|
||||
%package debugsource\
|
||||
Summary: Debug sources for package %{name}\
|
||||
Group: Development/Debug\
|
||||
AutoReqProv: 0\
|
||||
-Requires: %{name}-debuginfo = %{version}-%{release}\
|
||||
%description debugsource\
|
||||
This package provides debug sources for package %{name}.\
|
||||
Debug sources are useful when developing applications that use this\
|
||||
--- ./scripts/find-debuginfo.sh.orig 2011-05-13 15:34:01.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2011-05-13 15:34:10.000000000 +0000
|
||||
@@ -277,19 +277,11 @@ while read nlinks inum f; do
|
||||
fi
|
||||
done || exit
|
||||
|
||||
-# For each symlink whose target has a .debug file,
|
||||
-# make a .debug symlink to that file.
|
||||
-find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print |
|
||||
-while read f
|
||||
-do
|
||||
- t=$(readlink -m "$f").debug
|
||||
- f=${f#$RPM_BUILD_ROOT}
|
||||
- t=${t#$RPM_BUILD_ROOT}
|
||||
- if [ -f "$debugdir$t" ]; then
|
||||
- echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
|
||||
- debug_link "/usr/lib/debug$t" "${f}.debug"
|
||||
- fi
|
||||
-done
|
||||
+# We used to make a .debug symlink for each symlink whose target
|
||||
+# has a .debug file to that file. This is not necessary because
|
||||
+# the debuglink section contains only the destination of those links.
|
||||
+# Creating those links anyway results in debuginfo packages for
|
||||
+# devel packages just because of the .so symlinks in them.
|
||||
|
||||
if [ -s "$SOURCEFILE" ]; then
|
||||
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug"
|
23
diskspace.diff
Normal file
23
diskspace.diff
Normal file
@ -0,0 +1,23 @@
|
||||
Make the numbers reported for diskspace problems more user
|
||||
friendly. Probably a bad idea, as it changes the semantics. Instead,
|
||||
the messages should be changed.
|
||||
|
||||
--- ./lib/rpmts.c.orig 2005-02-13 03:12:03.000000000 +0000
|
||||
+++ ./lib/rpmts.c 2005-12-15 15:12:10.000000000 +0000
|
||||
@@ -1358,14 +1363,14 @@ void rpmtsCheckDSIProblems(const rpmts t
|
||||
rpmpsAppend(ps, RPMPROB_DISKSPACE,
|
||||
rpmteNEVR(te), rpmteKey(te),
|
||||
ts->filesystems[i], NULL, NULL,
|
||||
- (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize);
|
||||
+ (adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
|
||||
}
|
||||
|
||||
if (dsi->iavail > 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
|
||||
rpmpsAppend(ps, RPMPROB_DISKNODES,
|
||||
rpmteNEVR(te), rpmteKey(te),
|
||||
ts->filesystems[i], NULL, NULL,
|
||||
- (adj_fs_blocks(dsi->ineeded) - dsi->iavail));
|
||||
+ (adj_fs_blocks(dsi->ineeded)));
|
||||
}
|
||||
}
|
||||
ps = rpmpsFree(ps);
|
@ -1,31 +0,0 @@
|
||||
Hmm, SUSE doesn't use it, so what's the purpose of this patch?
|
||||
|
||||
--- ./build/parsePreamble.c.orig 2011-05-11 14:27:32.000000000 +0000
|
||||
+++ ./build/parsePreamble.c 2011-05-11 15:59:08.000000000 +0000
|
||||
@@ -485,6 +485,7 @@ static struct optionalTag {
|
||||
{ RPMTAG_PACKAGER, "%{packager}" },
|
||||
{ RPMTAG_DISTRIBUTION, "%{distribution}" },
|
||||
{ RPMTAG_DISTURL, "%{disturl}" },
|
||||
+ { RPMTAG_DISTTAG, "%{disttag}" },
|
||||
{ RPMTAG_BUGURL, "%{bugurl}" },
|
||||
{ -1, NULL }
|
||||
};
|
||||
--- ./macros.in.orig 2011-05-11 15:38:44.000000000 +0000
|
||||
+++ ./macros.in 2011-05-11 15:59:08.000000000 +0000
|
||||
@@ -279,6 +279,16 @@ package or when debugging this package.\
|
||||
#
|
||||
#%bugurl
|
||||
|
||||
+# Configurable distribution tag, same as Disttag: tag in a specfile.
|
||||
+# The tag will be used to supply reliable information to tools like
|
||||
+# rpmfind.
|
||||
+#
|
||||
+# Note: You should not configure with disturl (or build packages with
|
||||
+# the Disttag: tag) unless you are willing to supply content in a
|
||||
+# yet-to-be-determined format at the tag specified.
|
||||
+#
|
||||
+#%disttag
|
||||
+
|
||||
# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
|
||||
# marked as %doc should be installed.
|
||||
#%_excludedocs
|
36
docdir_fmt.diff
Normal file
36
docdir_fmt.diff
Normal file
@ -0,0 +1,36 @@
|
||||
Add support for a new macro, %{_docdir}. It can be used to specify
|
||||
the name of the directory for %doc files.
|
||||
Default is "%{NAME}-%{VERSION}", SUSE uses just "%{NAME}".
|
||||
rh#125514
|
||||
|
||||
--- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000
|
||||
+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000
|
||||
@@ -1006,11 +1006,23 @@ static int parseForSimple(/*@unused@*/Sp
|
||||
res = 1;
|
||||
} else {
|
||||
/* XXX WATCHOUT: buf is an arg */
|
||||
- { const char *ddir, *n, *v;
|
||||
-
|
||||
- (void) headerNVR(pkg->header, &n, &v, NULL);
|
||||
-
|
||||
- ddir = rpmGetPath("%{_docdir}/", n, "-", v, NULL);
|
||||
+ {
|
||||
+ static char *_docdir_fmt= 0;
|
||||
+ static int oneshot = 0;
|
||||
+ const char *ddir, *fmt, *errstr;
|
||||
+ if (!oneshot) {
|
||||
+ _docdir_fmt = rpmExpand("%{?_docdir_fmt}", NULL);
|
||||
+ if (!_docdir_fmt || !*_docdir_fmt)
|
||||
+ _docdir_fmt = "%{NAME}-%{VERSION}";
|
||||
+ oneshot = 1;
|
||||
+ }
|
||||
+ fmt = headerSprintf(pkg->header, _docdir_fmt, rpmTagTable, rpmHeaderFormats, &errstr);
|
||||
+ if (!fmt) {
|
||||
+ rpmError(RPMERR_BADSPEC, _("illegal _docdir_fmt: %s\n"), errstr);
|
||||
+ fl->processingFailed = 1;
|
||||
+ res = 1;
|
||||
+ }
|
||||
+ ddir = rpmGetPath("%{_docdir}/", fmt, NULL);
|
||||
strcpy(buf, ddir);
|
||||
ddir = _free(ddir);
|
||||
}
|
151
elfutils-0.97.diff
Normal file
151
elfutils-0.97.diff
Normal file
@ -0,0 +1,151 @@
|
||||
--- elfutils-0.97/Makefile.am.orig 2004-01-18 23:24:16.000000000 +0000
|
||||
+++ elfutils-0.97/Makefile.am 2005-02-10 18:01:28.029920520 +0000
|
||||
@@ -18,9 +18,8 @@
|
||||
##
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
-mini_SUBDIRS = config m4 lib libelf libelf-po
|
||||
-all_SUBDIRS = doc libebl libdw libcpu libasm src po tests
|
||||
-SUBDIRS = $(mini_SUBDIRS) $(all_SUBDIRS)
|
||||
+mini_SUBDIRS = config m4 libelf libelf-po
|
||||
+SUBDIRS = $(mini_SUBDIRS)
|
||||
|
||||
EXTRA_DIST = splint.rc elfutils.spec GPG-KEY NOTES COPYING.GPL
|
||||
|
||||
--- elfutils-0.97/configure.ac.orig 2004-09-25 19:41:03.000000000 +0000
|
||||
+++ elfutils-0.97/configure.ac 2005-02-10 18:01:28.030920377 +0000
|
||||
@@ -130,34 +130,9 @@
|
||||
|
||||
dnl The directories with content.
|
||||
|
||||
-dnl Documentation.
|
||||
-AC_CONFIG_FILES([doc/Makefile])
|
||||
-
|
||||
-dnl Support library.
|
||||
-AC_CONFIG_FILES([lib/Makefile])
|
||||
-
|
||||
dnl ELF library.
|
||||
AC_CONFIG_FILES([libelf/Makefile libelf-po/Makefile.in])
|
||||
|
||||
-dnl Higher-level ELF support library.
|
||||
-AC_CONFIG_FILES([libebl/Makefile])
|
||||
-
|
||||
-dnl DWARF library.
|
||||
-AC_CONFIG_FILES([libdw/Makefile])
|
||||
-
|
||||
-dnl CPU handling library.
|
||||
-AC_CONFIG_FILES([libcpu/Makefile])
|
||||
-
|
||||
-dnl Assembler library.
|
||||
-AC_CONFIG_FILES([libasm/Makefile])
|
||||
-
|
||||
-dnl Tools.
|
||||
-AC_CONFIG_FILES([src/Makefile po/Makefile.in])
|
||||
-
|
||||
-dnl Test suite.
|
||||
-AC_CONFIG_FILES([tests/Makefile])
|
||||
-
|
||||
-
|
||||
dnl Test of the config.h file. We hide all kinds of configuration magic
|
||||
dnl in there.
|
||||
AH_BOTTOM([
|
||||
--- elfutils-0.97/libelf-po/Makefile.in.in.orig 2004-01-18 23:51:37.000000000 +0000
|
||||
+++ elfutils-0.97/libelf-po/Makefile.in.in 2005-02-10 18:01:28.030920377 +0000
|
||||
@@ -28,7 +28,7 @@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||
+mkinstalldirs = @MKINSTALLDIRS@
|
||||
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
--- elfutils-0.97/libelf/Makefile.am.orig 2004-01-23 10:38:49.000000000 +0000
|
||||
+++ elfutils-0.97/libelf/Makefile.am 2005-02-10 18:03:15.337610448 +0000
|
||||
@@ -31,15 +31,15 @@
|
||||
|
||||
LINT = splint
|
||||
|
||||
-lib_LIBRARIES = libelf.a
|
||||
+#lib_LIBRARIES = libelf.a
|
||||
if !MUDFLAP
|
||||
-noinst_LIBRARIES = libelf_pic.a
|
||||
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
|
||||
+noinst_LIBRARIES = libelf.a libelf_pic.a
|
||||
+noinst_PROGRAMS = libelf.so
|
||||
endif
|
||||
-include_HEADERS = libelf.h gelf.h nlist.h
|
||||
+#include_HEADERS = libelf.h gelf.h nlist.h
|
||||
|
||||
-euincludedir = $(includedir)/elfutils
|
||||
-euinclude_HEADERS = elf-knowledge.h
|
||||
+#euincludedir = $(includedir)/elfutils
|
||||
+#euinclude_HEADERS = elf-knowledge.h
|
||||
|
||||
libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
|
||||
elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
|
||||
@@ -96,7 +96,7 @@
|
||||
ln -fs $@ $@.$(VERSION)
|
||||
|
||||
%.os: %.c %.o
|
||||
- if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
|
||||
+ if $(COMPILE) -c -o $@ -fPIC -DPIC -DSHARED -MT $@ -MD -MP \
|
||||
-MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
|
||||
rm -f "$(DEPDIR)/$*.Tpo"; \
|
||||
@@ -104,15 +104,15 @@
|
||||
fi
|
||||
|
||||
install: install-am libelf.so
|
||||
- $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
- $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
|
||||
- ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
|
||||
- ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
|
||||
+# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
+# $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
|
||||
+# ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
|
||||
+# ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
|
||||
|
||||
uninstall: uninstall-am
|
||||
- rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
|
||||
- rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
|
||||
- rm -f $(DESTDIR)$(libdir)/libelf.so
|
||||
+# rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
|
||||
+# rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
|
||||
+# rm -f $(DESTDIR)$(libdir)/libelf.so
|
||||
endif
|
||||
|
||||
.PSEUDO: lint
|
||||
--- elfutils-0.97/libelf/Makefile.in.orig 2004-09-25 19:41:08.000000000 +0000
|
||||
+++ elfutils-0.97/libelf/Makefile.in 2005-02-10 18:01:28.028920662 +0000
|
||||
@@ -731,7 +731,7 @@
|
||||
@MUDFLAP_FALSE@ ln -fs $@ $@.$(VERSION)
|
||||
|
||||
@MUDFLAP_FALSE@%.os: %.c %.o
|
||||
-@MUDFLAP_FALSE@ if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
|
||||
+@MUDFLAP_FALSE@ if $(COMPILE) -c -o $@ -fPIC -DPIC -DSHARED -MT $@ -MD -MP \
|
||||
@MUDFLAP_FALSE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@MUDFLAP_FALSE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
|
||||
@MUDFLAP_FALSE@ rm -f "$(DEPDIR)/$*.Tpo"; \
|
||||
--- elfutils-0.97/libelf/libelfP.h.orig 2003-12-25 18:43:31.000000000 +0000
|
||||
+++ elfutils-0.97/libelf/libelfP.h 2005-02-10 18:01:28.029920520 +0000
|
||||
@@ -387,7 +387,7 @@
|
||||
extern int __libelf_fill_byte attribute_hidden;
|
||||
|
||||
/* Nonzero if the version was set. */
|
||||
-extern int __libelf_version_initialized attribute_hidden;
|
||||
+extern int __libelf_version_initialized /* attribute_hidden */;
|
||||
|
||||
|
||||
/* The libelf API does not have such a function but it is still useful.
|
||||
--- elfutils-0.97/configure.ac 2006/08/14 23:04:23 1.1
|
||||
+++ elfutils-0.97/configure.ac 2006/08/14 23:06:50
|
||||
@@ -53,6 +53,8 @@
|
||||
AC_PROG_CPP
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AM_GNU_GETTEXT([external])
|
||||
+MKINSTALLDIRS="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs"
|
||||
+AC_SUBST(MKINSTALLDIRS)
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_YACC
|
||||
AM_PROG_LEX
|
3
elfutils-0.97.tar.bz2
Normal file
3
elfutils-0.97.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:105115416927f1498abecd7741af0d178a31a2bc780b3ab935b78bac48bac342
|
||||
size 216798
|
@ -1,11 +0,0 @@
|
||||
--- ./build/parseChangelog.c.orig 2011-05-23 14:19:48.000000000 +0000
|
||||
+++ ./build/parseChangelog.c 2011-05-23 14:20:36.000000000 +0000
|
||||
@@ -238,7 +238,7 @@ int parseChangelog(rpmSpec spec)
|
||||
}
|
||||
}
|
||||
|
||||
- if (addChangelog(spec->packages->header, sb)) {
|
||||
+ if (sb && addChangelog(spec->packages->header, sb)) {
|
||||
goto exit;
|
||||
}
|
||||
res = nextPart;
|
16
emptyfilelist.diff
Normal file
16
emptyfilelist.diff
Normal file
@ -0,0 +1,16 @@
|
||||
Fix segfault when rpmbuild stumbles over an empty file list.
|
||||
The "+ 1" is a remedy for xmalloc(0), which would return NULL.
|
||||
|
||||
Index: ./build/files.c
|
||||
===================================================================
|
||||
--- ./build/files.c
|
||||
+++ ./build/files.c
|
||||
@@ -1380,7 +1380,7 @@ static void genCpioListAndHeader(/*@part
|
||||
: (int *)(fi->bnl + fi->fc);
|
||||
/*@=dependenttrans@*/
|
||||
|
||||
- fi->apath = xmalloc(fi->fc * sizeof(*fi->apath) + apathlen);
|
||||
+ fi->apath = xmalloc(fi->fc * sizeof(*fi->apath) + apathlen + 1);
|
||||
a = (char *)(fi->apath + fi->fc);
|
||||
*a = '\0';
|
||||
|
@ -1,13 +0,0 @@
|
||||
Do not segfault if the prep section is empty
|
||||
|
||||
--- build/parsePrep.c.orig 2011-05-13 16:22:59.000000000 +0000
|
||||
+++ build/parsePrep.c 2011-05-13 16:23:41.000000000 +0000
|
||||
@@ -518,7 +518,7 @@ int parsePrep(rpmSpec spec)
|
||||
}
|
||||
}
|
||||
|
||||
- for (ARGV_const_t lines = saveLines; *lines; lines++) {
|
||||
+ for (ARGV_const_t lines = saveLines; lines && *lines; lines++) {
|
||||
res = 0;
|
||||
if (rstreqn(*lines, "%setup", sizeof("%setup")-1)) {
|
||||
res = doSetupMacro(spec, *lines);
|
16
erasebadreturn.diff
Normal file
16
erasebadreturn.diff
Normal file
@ -0,0 +1,16 @@
|
||||
Do not call rpmtsRun with an empty transaction list, it returns -1
|
||||
which messes up the numFailed counter. [#43267]
|
||||
|
||||
Index: lib/rpminstall.c
|
||||
===================================================================
|
||||
--- lib/rpminstall.c.orig
|
||||
+++ lib/rpminstall.c
|
||||
@@ -844,7 +844,7 @@ int rpmErase(rpmts ts, struct rpmInstall
|
||||
}
|
||||
#endif
|
||||
|
||||
- if (!stopUninstall) {
|
||||
+ if (numPackages && !stopUninstall) {
|
||||
(void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_REVERSE));
|
||||
|
||||
/* Drop added/available package indices and dependency sets. */
|
28
eraseignoresize.diff
Normal file
28
eraseignoresize.diff
Normal file
@ -0,0 +1,28 @@
|
||||
Allow "--ignoresize" for erase operations.
|
||||
|
||||
Index: lib/rpminstall.c
|
||||
===================================================================
|
||||
--- lib/rpminstall.c.orig
|
||||
+++ lib/rpminstall.c
|
||||
@@ -850,7 +850,7 @@ int rpmErase(rpmts ts, struct rpmInstall
|
||||
/* Drop added/available package indices and dependency sets. */
|
||||
rpmtsClean(ts);
|
||||
|
||||
- numPackages = rpmtsRun(ts, NULL, 0);
|
||||
+ numPackages = rpmtsRun(ts, NULL, ia->probFilter & (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES));
|
||||
ps = rpmtsProblems(ts);
|
||||
if (rpmpsNumProblems(ps) > 0)
|
||||
rpmpsPrint(NULL, ps);
|
||||
Index: rpmqv.c
|
||||
===================================================================
|
||||
--- rpmqv.c.orig
|
||||
+++ rpmqv.c
|
||||
@@ -468,7 +468,7 @@ int main(int argc, const char ** argv)
|
||||
argerror(_("--ignoreos may only be specified during package "
|
||||
"installation"));
|
||||
|
||||
- if (bigMode != MODE_INSTALL &&
|
||||
+ if (bigMode != MODE_INSTALL && bigMode != MODE_ERASE &&
|
||||
(ia->probFilter & (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES)))
|
||||
argerror(_("--ignoresize may only be specified during package "
|
||||
"installation"));
|
21
eraseordered.diff
Normal file
21
eraseordered.diff
Normal file
@ -0,0 +1,21 @@
|
||||
Order packages when erasing. Not tested very well.
|
||||
|
||||
Index: lib/rpminstall.c
|
||||
===================================================================
|
||||
--- lib/rpminstall.c.orig
|
||||
+++ lib/rpminstall.c
|
||||
@@ -835,14 +835,12 @@ int rpmErase(rpmts ts, struct rpmInstall
|
||||
ps = rpmpsFree(ps);
|
||||
}
|
||||
|
||||
-#ifdef NOTYET
|
||||
if (!stopUninstall && !(ia->installInterfaceFlags & INSTALL_NOORDER)) {
|
||||
if (rpmtsOrder(ts)) {
|
||||
numFailed += numPackages;
|
||||
stopUninstall = 1;
|
||||
}
|
||||
}
|
||||
-#endif
|
||||
|
||||
if (!stopUninstall) {
|
||||
(void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_REVERSE));
|
15
exitstatus.diff
Normal file
15
exitstatus.diff
Normal file
@ -0,0 +1,15 @@
|
||||
Deal with a return value of "-2" when database locking failed.
|
||||
|
||||
--- ./lib/rpminstall.c.orig 2005-12-14 21:01:09.000000000 +0000
|
||||
+++ ./lib/rpminstall.c 2005-12-15 14:47:35.000000000 +0000
|
||||
@@ -599,6 +611,10 @@ if (fileURL[0] == '=') {
|
||||
eiu->numFailed++;
|
||||
goto exit;
|
||||
/*@notreached@*/ /*@switchbreak@*/ break;
|
||||
+ default:
|
||||
+ eiu->numFailed++;
|
||||
+ goto exit;
|
||||
+ /*@notreached@*/ /*@switchbreak@*/ break;
|
||||
}
|
||||
|
||||
eiu->numRPMS++;
|
45
extcond.diff
45
extcond.diff
@ -4,9 +4,9 @@ assumed to be true.
|
||||
This mechanism is used by the weakdeps patch to filter the
|
||||
"RPMSENSE_STRONG" flag.
|
||||
|
||||
--- ./lib/headerfmt.c.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./lib/headerfmt.c 2011-05-10 17:06:49.000000000 +0000
|
||||
@@ -568,8 +568,12 @@ static int parseExpression(headerSprintf
|
||||
--- ./rpmdb/header.c.orig 2005-06-06 23:33:54.000000000 +0000
|
||||
+++ ./rpmdb/header.c 2006-03-17 18:08:02.000000000 +0000
|
||||
@@ -2980,8 +2980,12 @@ static int parseExpression(headerSprintf
|
||||
|
||||
*endPtr = chptr;
|
||||
|
||||
@ -19,16 +19,16 @@ This mechanism is used by the weakdeps patch to filter the
|
||||
(void) findTag(hsa, token, str);
|
||||
|
||||
return 0;
|
||||
@@ -657,6 +661,7 @@ static char * singleSprintf(headerSprint
|
||||
int i, j, found;
|
||||
rpm_count_t count, numElements;
|
||||
@@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint
|
||||
int_32 type;
|
||||
int_32 count;
|
||||
sprintfToken spft;
|
||||
+ sprintfTag stag;
|
||||
int condNumFormats;
|
||||
size_t need;
|
||||
|
||||
@@ -687,6 +692,18 @@ static char * singleSprintf(headerSprint
|
||||
headerIsEntry(hsa->h, token->u.cond.tag.tag)) {
|
||||
@@ -3270,6 +3275,18 @@ static char * singleSprintf(headerSprint
|
||||
if (token->u.cond.tag.ext || headerIsEntry(hsa->h, token->u.cond.tag.tag)) {
|
||||
spft = token->u.cond.ifFormat;
|
||||
condNumFormats = token->u.cond.numIfTokens;
|
||||
+ if (token->u.cond.tag.fmt) {
|
||||
@ -46,20 +46,33 @@ This mechanism is used by the weakdeps patch to filter the
|
||||
} else {
|
||||
spft = token->u.cond.elseFormat;
|
||||
condNumFormats = token->u.cond.numElseTokens;
|
||||
@@ -710,10 +727,13 @@ static char * singleSprintf(headerSprint
|
||||
@@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint
|
||||
spft = token->u.array.format;
|
||||
for (i = 0; i < token->u.array.numTokens; i++, spft++)
|
||||
{
|
||||
rpmtd td = NULL;
|
||||
- if (spft->type != PTOK_TAG ||
|
||||
- spft->u.tag.arrayCount ||
|
||||
- spft->u.tag.justOne) continue;
|
||||
+ if (spft->type != PTOK_TAG && spft->type != PTOK_COND)
|
||||
+ continue;
|
||||
+
|
||||
+ stag = (spft->type == PTOK_COND ? &spft->u.cond.tag : &spft->u.tag);
|
||||
+ if (stag->justOne)
|
||||
+ if (stag->arrayCount || stag->justOne)
|
||||
+ continue;
|
||||
|
||||
- if (!(td = getData(hsa, spft->u.tag.tag))) {
|
||||
+ if (!(td = getData(hsa, stag->tag))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
- if (spft->u.tag.ext) {
|
||||
+ if (stag->ext) {
|
||||
/*@-boundswrite@*/
|
||||
- if (getExtension(hsa, spft->u.tag.ext, &type, NULL, &count,
|
||||
- hsa->ec + spft->u.tag.extNum))
|
||||
+ if (getExtension(hsa, stag->ext, &type, NULL, &count,
|
||||
+ hsa->ec + stag->extNum))
|
||||
continue;
|
||||
/*@=boundswrite@*/
|
||||
} else {
|
||||
/*@-boundswrite@*/
|
||||
- if (!headerGetEntry(hsa->h, spft->u.tag.tag, &type, NULL, &count))
|
||||
+ if (!headerGetEntry(hsa->h, stag->tag, &type, NULL, &count))
|
||||
continue;
|
||||
/*@=boundswrite@*/
|
||||
}
|
||||
|
@ -1,85 +0,0 @@
|
||||
Index: fileattrs/debuginfo.attr
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ fileattrs/debuginfo.attr 2011-06-06 16:16:00.853820498 +0200
|
||||
@@ -0,0 +1,2 @@
|
||||
+%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov
|
||||
+%__debuginfo_path ^/usr/lib/debug/
|
||||
Index: fileattrs/elf.attr
|
||||
===================================================================
|
||||
--- fileattrs/elf.attr.orig 2011-06-06 16:15:01.591403879 +0200
|
||||
+++ fileattrs/elf.attr 2011-06-06 16:16:00.853820498 +0200
|
||||
@@ -1,4 +1,5 @@
|
||||
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||
-%__elf_magic ^ELF (32|64)-bit.*$
|
||||
+%__elf_magic ^ELF (32|64)-bit.*executable
|
||||
%__elf_flags exeonly
|
||||
+%__elf_exclude_path ^/usr/lib/debug/
|
||||
Index: fileattrs/elflib.attr
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ fileattrs/elflib.attr 2011-06-06 16:16:00.854820404 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||
+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||
+%__elflib_magic ^ELF (32|64)-bit.*shared object
|
||||
+%__elflib_exclude_path ^/usr/lib/debug/
|
||||
Index: fileattrs/firmware.attr
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ fileattrs/firmware.attr 2011-06-06 16:16:00.854820404 +0200
|
||||
@@ -0,0 +1,2 @@
|
||||
+%__firmware_provides %{_rpmconfigdir}/firmware.prov
|
||||
+%__firmware_path /lib/firmware/
|
||||
Index: fileattrs/ksyms.attr
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ fileattrs/ksyms.attr 2011-06-06 16:16:00.854820404 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name
|
||||
+%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name
|
||||
+%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name
|
||||
+%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$
|
||||
Index: fileattrs/Makefile.am
|
||||
===================================================================
|
||||
--- fileattrs/Makefile.am.orig 2011-06-06 16:15:01.590403974 +0200
|
||||
+++ fileattrs/Makefile.am 2011-06-06 16:16:08.852066946 +0200
|
||||
@@ -5,7 +5,8 @@ include $(top_srcdir)/rpm.am
|
||||
fattrsdir = $(rpmconfigdir)/fileattrs
|
||||
|
||||
fattrs_DATA = \
|
||||
- desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \
|
||||
- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr
|
||||
+ elf.attr font.attr libtool.attr perl.attr perllib.attr \
|
||||
+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \
|
||||
+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr
|
||||
|
||||
EXTRA_DIST = $(fattrs_DATA)
|
||||
Index: fileattrs/perl.attr
|
||||
===================================================================
|
||||
--- fileattrs/perl.attr.orig 2011-06-06 16:15:01.591403879 +0200
|
||||
+++ fileattrs/perl.attr 2011-06-06 16:16:00.855820310 +0200
|
||||
@@ -1,3 +1,4 @@
|
||||
-%__perl_requires %{_rpmconfigdir}/perl.req
|
||||
+# disabled for now
|
||||
+#%__perl_requires %{_rpmconfigdir}/perl.req
|
||||
%__perl_magic ^.*perl .*$
|
||||
%__perl_flags exeonly
|
||||
Index: fileattrs/perllib.attr
|
||||
===================================================================
|
||||
--- fileattrs/perllib.attr.orig 2011-06-06 16:15:01.591403879 +0200
|
||||
+++ fileattrs/perllib.attr 2011-06-06 16:16:00.855820310 +0200
|
||||
@@ -1,3 +1,4 @@
|
||||
%__perllib_provides %{_rpmconfigdir}/perl.prov
|
||||
-%__perllib_requires %{_rpmconfigdir}/perl.req
|
||||
+#disabled for now
|
||||
+#%__perllib_requires %{_rpmconfigdir}/perl.req
|
||||
%__perllib_magic ^Perl[[:digit:]] module source.*
|
||||
Index: fileattrs/sysvinit.attr
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ fileattrs/sysvinit.attr 2011-06-06 16:16:00.856820216 +0200
|
||||
@@ -0,0 +1,2 @@
|
||||
+%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides
|
||||
+%__sysvinit_path ^/etc/init\.d/
|
12
filenonull.diff
Normal file
12
filenonull.diff
Normal file
@ -0,0 +1,12 @@
|
||||
Return an error if Fileno is called with NULL instead of segfaulting.
|
||||
|
||||
--- ./rpmio/rpmio.c.orig 2005-01-26 03:39:58.000000000 +0000
|
||||
+++ ./rpmio/rpmio.c 2005-12-16 17:51:19.000000000 +0000
|
||||
@@ -3094,6 +3164,7 @@ int Fileno(FD_t fd)
|
||||
{
|
||||
int i, rc = -1;
|
||||
|
||||
+ if (fd == NULL) return -1;
|
||||
if (fd->req != NULL)
|
||||
rc = 123456789; /* HACK: https has no steenkin fileno. */
|
||||
else
|
14
filequery.diff
Normal file
14
filequery.diff
Normal file
@ -0,0 +1,14 @@
|
||||
Do not check package provides if there is no slash in the file path.
|
||||
bugzilla [#32467], rh#125516.
|
||||
|
||||
--- ./lib/query.c.orig 2004-10-26 23:29:28.000000000 +0000
|
||||
+++ ./lib/query.c 2005-12-16 18:22:19.000000000 +0000
|
||||
@@ -614,7 +637,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts,
|
||||
if (qva->qva_mi == NULL) {
|
||||
if (access(fn, F_OK) != 0)
|
||||
myerrno = errno;
|
||||
- else if (!provides_checked)
|
||||
+ else if (!provides_checked && strchr(fn, '/'))
|
||||
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, fn, 0);
|
||||
}
|
||||
|
17
files.diff
17
files.diff
@ -1,17 +0,0 @@
|
||||
Print "unpackaged files" section even if there was an error
|
||||
in the filelist.
|
||||
|
||||
--- ./build/files.c.orig 2011-05-11 15:27:11.000000000 +0000
|
||||
+++ ./build/files.c 2011-05-11 15:29:12.000000000 +0000
|
||||
@@ -2149,10 +2149,10 @@ rpmRC processBinaryFiles(rpmSpec spec, r
|
||||
*/
|
||||
|
||||
|
||||
+exit:
|
||||
if (checkFiles(spec->buildRoot, check_fileList) > 0) {
|
||||
rc = RPMRC_FAIL;
|
||||
}
|
||||
-exit:
|
||||
check_fileList = freeStringBuf(check_fileList);
|
||||
|
||||
return rc;
|
@ -1,41 +0,0 @@
|
||||
From: Jan Blunck <jblunck@suse.de>
|
||||
Subject: Do the symbolic links right in the first place
|
||||
|
||||
Since brp-symlink relinks symbolic links to enforce a certain policy we should
|
||||
do it right in the first place. So this patch changes find-debuginfo.sh scripts
|
||||
behavior to reflect that policy.
|
||||
|
||||
Signed-off-by: Jan Blunck <jblunck@suse.de>
|
||||
|
||||
--- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:36:05.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2011-05-11 15:58:17.000000000 +0000
|
||||
@@ -124,7 +124,17 @@ debug_link()
|
||||
local l="/usr/lib/debug$2"
|
||||
local t="$1"
|
||||
echo >> "$LINKSFILE" "$l $t"
|
||||
- link_relative "$t" "$l" "$RPM_BUILD_ROOT"
|
||||
+
|
||||
+ # this should correspond to what brp-symlink is doing
|
||||
+ case $t in
|
||||
+ /usr*)
|
||||
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
|
||||
+ ln -snf "$t" "$RPM_BUILD_ROOT$l"
|
||||
+ ;;
|
||||
+ esac
|
||||
}
|
||||
|
||||
# Compare two binaries but ignore the .note.gnu.build-id section
|
||||
@@ -158,8 +168,8 @@ make_id_link()
|
||||
|
||||
local other=$(readlink -m "$root_idfile")
|
||||
other=${other#$RPM_BUILD_ROOT}
|
||||
- if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" ||
|
||||
- elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then
|
||||
+ if cmp -s "$RPM_BUILD_ROOT$other" "$RPM_BUILD_ROOT$file" ||
|
||||
+ elfcmp "$RPM_BUILD_ROOT$other" "$RPM_BUILD_ROOT$file" ; then
|
||||
# Two copies. Maybe one has to be setuid or something.
|
||||
echo >&2 "*** WARNING: identical binaries are copied, not linked:"
|
||||
echo >&2 " $file"
|
@ -1,119 +1,102 @@
|
||||
--- ./scripts/find-debuginfo.sh.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2011-05-11 14:46:18.000000000 +0000
|
||||
@@ -127,6 +127,20 @@ debug_link()
|
||||
link_relative "$t" "$l" "$RPM_BUILD_ROOT"
|
||||
}
|
||||
|
||||
+# Compare two binaries but ignore the .note.gnu.build-id section
|
||||
+elfcmp()
|
||||
+{
|
||||
+ local tmp1=$(mktemp -t ${1##*/}.XXXXXX)
|
||||
+ local tmp2=$(mktemp -t ${2##*/}.XXXXXX)
|
||||
+
|
||||
+ objcopy -R .note.gnu.build-id -R .gnu_debuglink $1 $tmp1
|
||||
+ objcopy -R .note.gnu.build-id -R .gnu_debuglink $2 $tmp2
|
||||
+ cmp -s $tmp1 $tmp2
|
||||
+ local res=$?
|
||||
+ rm -f $tmp1 $tmp2
|
||||
+ return $res
|
||||
+}
|
||||
+
|
||||
# Make a build-id symlink for id $1 with suffix $3 to file $2.
|
||||
make_id_link()
|
||||
{
|
||||
@@ -145,7 +159,7 @@ make_id_link()
|
||||
local other=$(readlink -m "$root_idfile")
|
||||
other=${other#$RPM_BUILD_ROOT}
|
||||
if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" ||
|
||||
- eu-elfcmp -q "$root_idfile" "$RPM_BUILD_ROOT$file" 2> /dev/null; then
|
||||
+ elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then
|
||||
# Two copies. Maybe one has to be setuid or something.
|
||||
echo >&2 "*** WARNING: identical binaries are copied, not linked:"
|
||||
echo >&2 " $file"
|
||||
@@ -174,12 +188,18 @@ strict_error=ERROR
|
||||
$strict || strict_error=WARNING
|
||||
SUSE specific find-debuginfo changes.
|
||||
|
||||
--- ./scripts/find-debuginfo.sh.orig 2005-07-14 15:52:31.000000000 +0000
|
||||
+++ ./scripts/find-debuginfo.sh 2006-03-17 13:13:03.000000000 +0000
|
||||
@@ -14,9 +14,18 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debu
|
||||
echo -n > $SOURCEFILE
|
||||
|
||||
# Strip ELF binaries
|
||||
-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
|
||||
- \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
|
||||
- -print |
|
||||
-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' |
|
||||
-xargs --no-run-if-empty stat -c '%h %D_%i %n' |
|
||||
+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z |
|
||||
+xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' |
|
||||
while read nlinks inum f; do
|
||||
+ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||
+ *debuglink*) continue ;;
|
||||
+ *debug*) ;;
|
||||
+ *gnu.version*)
|
||||
+ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
|
||||
+ continue
|
||||
+ ;;
|
||||
+ *) continue ;;
|
||||
+ esac
|
||||
get_debugfn "$f"
|
||||
[ -f "${debugfn}" ] && continue
|
||||
-for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
|
||||
- sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'`
|
||||
+for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) `
|
||||
do
|
||||
+ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||
+ *debuglink*) continue ;;
|
||||
+ *debug*) ;;
|
||||
+ *gnu.version*)
|
||||
+ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
|
||||
+ continue
|
||||
+ ;;
|
||||
+ *) continue ;;
|
||||
+ esac
|
||||
+
|
||||
dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
|
||||
bn=$(basename $f .debug).debug
|
||||
|
||||
@@ -200,8 +220,11 @@ while read nlinks inum f; do
|
||||
fi
|
||||
@@ -25,6 +34,8 @@ do
|
||||
[ -f "${debugfn}" ] && continue
|
||||
|
||||
echo "extracting debug info from $f"
|
||||
- id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
|
||||
- -i -l "$SOURCEFILE" "$f") || exit
|
||||
+ mode=$(stat -c %a "$f")
|
||||
+ chmod +w "$f"
|
||||
+ id=$($(DEBUGEDIT=$(which debugedit 2>/dev/null); \
|
||||
+ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \
|
||||
+ -d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit
|
||||
if [ -z "$id" ]; then
|
||||
echo >&2 "*** ${strict_error}: No build ID note found in $f"
|
||||
$strict && exit 2
|
||||
@@ -218,13 +241,25 @@ while read nlinks inum f; do
|
||||
esac
|
||||
echo extracting debug info from $f
|
||||
+ mode=$(stat -c %a $f)
|
||||
+ chmod +w $f
|
||||
/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
|
||||
|
||||
mkdir -p "${debugdn}"
|
||||
- if test -w "$f"; then
|
||||
- strip_to_debug "${debugfn}" "$f"
|
||||
- else
|
||||
- chmod u+w "$f"
|
||||
- strip_to_debug "${debugfn}" "$f"
|
||||
- chmod u-w "$f"
|
||||
- fi
|
||||
+ objcopy --only-keep-debug $f $debugfn || :
|
||||
+ (
|
||||
+ shopt -s extglob
|
||||
+ strip_option="--strip-all"
|
||||
+ case "$f" in
|
||||
+ *.ko)
|
||||
+ strip_option="--strip-debug" ;;
|
||||
+ *$STRIP_KEEP_SYMTAB*)
|
||||
+ if test -n "$STRIP_KEEP_SYMTAB"; then
|
||||
+ strip_option="--strip-debug"
|
||||
+ fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then
|
||||
+ strip_option=
|
||||
+ fi
|
||||
+ objcopy --add-gnu-debuglink=$debugfn -R .comment -R .GCC.command.line $strip_option $f
|
||||
+ chmod $mode $f
|
||||
+ ) || :
|
||||
# A binary already copied into /usr/lib/debug doesn't get stripped,
|
||||
@@ -34,19 +45,56 @@ do
|
||||
esac
|
||||
|
||||
if [ -n "$id" ]; then
|
||||
make_id_link "$id" "$dn/$(basename $f)"
|
||||
@@ -253,12 +288,14 @@ if [ -s "$SOURCEFILE" ]; then
|
||||
# stupid cpio creates new directories in mode 0700, fixup
|
||||
find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 |
|
||||
xargs --no-run-if-empty -0 chmod a+rx
|
||||
+ find "${RPM_BUILD_ROOT}/usr/src/debug" -type f -print0 |
|
||||
+ xargs --no-run-if-empty -0 chmod a+r
|
||||
fi
|
||||
mkdir -p "${debugdn}"
|
||||
- if test -w "$f"; then
|
||||
- eu-strip -f "${debugfn}" "$f" || :
|
||||
- else
|
||||
- chmod u+w "$f"
|
||||
- eu-strip -f "${debugfn}" "$f" || :
|
||||
- chmod u-w "$f"
|
||||
+ objcopy --only-keep-debug $f $debugfn || :
|
||||
+ strip_option="--strip-all"
|
||||
+ case "$f" in
|
||||
+ *.ko|*.a) strip_option="--strip-debug" ;;
|
||||
+ esac
|
||||
+ if test -n "$STRIP_KEEP_SYMTAB" ; then
|
||||
+ strip_option="--strip-debug"
|
||||
fi
|
||||
+ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then
|
||||
+ strip_option=
|
||||
+ fi
|
||||
+ objcopy --add-gnu-debuglink=$debugfn $strip_option $f || :
|
||||
+ chmod $mode $f
|
||||
done
|
||||
|
||||
if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
|
||||
((nout > 0)) ||
|
||||
test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
|
||||
- (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
|
||||
+ (cd "${RPM_BUILD_ROOT}/usr/lib"; test ! -d debug || find debug -type d) |
|
||||
sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
|
||||
+for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -name "*.exe.mdb" -or -name "*.dll.mdb" \) `
|
||||
+do
|
||||
+ dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
|
||||
+ case "$dn" in
|
||||
+ /usr/lib/debug/*) continue ;;
|
||||
+ esac
|
||||
+ debugdn="${debugdir}${dn}"
|
||||
+ mkdir -p "${debugdn}"
|
||||
+ mv "$f" "${debugdn}"
|
||||
+done
|
||||
+
|
||||
+
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug
|
||||
-cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug)
|
||||
-# stupid cpio creates new directories in mode 0700, fixup
|
||||
-find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx
|
||||
+(cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) < $SOURCEFILE
|
||||
|
||||
(cd "${RPM_BUILD_ROOT}/usr"
|
||||
-find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE
|
||||
-find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE
|
||||
+# trying to replace dangling and/or absolute symlink
|
||||
+DBASE=${RPM_BUILD_ROOT}/usr/src/debug
|
||||
+for link in `find $DBASE -type l -printf "%P\n"` ; do
|
||||
+ link_file=`readlink $RPM_BUILD_DIR/$link`
|
||||
+ case $link_file in
|
||||
+ /*) is_abs=true ;;
|
||||
+ *) is_abs= ;;
|
||||
+ esac
|
||||
+ if test ! -e "$DBASE/$link" -o -n "$is_abs" ; then # dangling
|
||||
+ rm -f "$DBASE/$link"
|
||||
+ cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link"
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+{
|
||||
+ test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug
|
||||
+ echo /usr/src/debug
|
||||
+} > $LISTFILE
|
||||
+
|
||||
+for p in $(<$LISTFILE); do
|
||||
+ find $RPM_BUILD_ROOT/$p -type f -print0 | xargs -0 -r chmod 0644
|
||||
+ find $RPM_BUILD_ROOT/$p -type d -print0 | xargs -0 -r chmod 0755
|
||||
+done
|
||||
|
114
findfplistexclude.diff
Normal file
114
findfplistexclude.diff
Normal file
@ -0,0 +1,114 @@
|
||||
Allow an "exclude" parameter for rpmdbFindFp, specifying a header
|
||||
that is to be excluded in the match. Used to speed up package erase
|
||||
operations.
|
||||
Also fixes the skipDir problem that made rpm incorrectly delete
|
||||
files even if another package still references them.
|
||||
rh#140055
|
||||
|
||||
Index: lib/transaction.c
|
||||
===================================================================
|
||||
--- lib/transaction.c.orig
|
||||
+++ lib/transaction.c
|
||||
@@ -1745,7 +1745,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing f
|
||||
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);
|
||||
/* Extract file info for all files in this package from the database. */
|
||||
matches = xcalloc(fc, sizeof(*matches));
|
||||
- if (rpmdbFindFpList(rpmtsGetRdb(ts), fi->fps, matches, fc)) {
|
||||
+ if (rpmdbFindFpListExclude(rpmtsGetRdb(ts), fi->fps, matches, fc, rpmteType(p) == TR_REMOVED ? fi->record : 0)) {
|
||||
ps = rpmpsFree(ps);
|
||||
rpmtsFreeLock(lock);
|
||||
return 1; /* XXX WTFO? */
|
||||
Index: rpmdb/fprint.h
|
||||
===================================================================
|
||||
--- rpmdb/fprint.h.orig
|
||||
+++ rpmdb/fprint.h
|
||||
@@ -79,6 +79,12 @@ int rpmdbFindFpList(/*@null@*/ rpmdb db,
|
||||
/*@modifies db, *matchList, rpmGlobalMacroContext,
|
||||
fileSystem, internalState @*/;
|
||||
|
||||
+int rpmdbFindFpListExclude(/*@null@*/ rpmdb db, fingerPrint * fpList,
|
||||
+ /*@out@*/ dbiIndexSet * matchList, int numItems, unsigned int exclude)
|
||||
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
|
||||
+ /*@modifies db, *matchList, rpmGlobalMacroContext,
|
||||
+ fileSystem, internalState @*/;
|
||||
+
|
||||
/* Be carefull with the memory... assert(*fullName == '/' || !scareMemory) */
|
||||
|
||||
/**
|
||||
Index: rpmdb/rpmdb.c
|
||||
===================================================================
|
||||
--- rpmdb/rpmdb.c.orig
|
||||
+++ rpmdb/rpmdb.c
|
||||
@@ -2358,7 +2358,7 @@ static void rpmdbSortIterator(/*@null@*/
|
||||
}
|
||||
|
||||
/*@-bounds@*/ /* LCL: segfault */
|
||||
-static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum)
|
||||
+static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude)
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
|
||||
/*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/
|
||||
{
|
||||
@@ -2369,7 +2369,7 @@ static int rpmdbGrowIterator(/*@null@*/
|
||||
dbiIndexSet set;
|
||||
int rc;
|
||||
int xx;
|
||||
- int i;
|
||||
+ int i, j;
|
||||
|
||||
if (mi == NULL)
|
||||
return 1;
|
||||
@@ -2405,6 +2405,25 @@ static int rpmdbGrowIterator(/*@null@*/
|
||||
|
||||
set = NULL;
|
||||
(void) dbt2set(dbi, data, &set);
|
||||
+
|
||||
+ /* prune the set against exclude */
|
||||
+ for (i = j = 0; i < set->count; i++) {
|
||||
+ if (exclude && set->recs[i].hdrNum == exclude)
|
||||
+ continue;
|
||||
+ if (i != j)
|
||||
+ set->recs[j] = set->recs[i];
|
||||
+ j++;
|
||||
+ }
|
||||
+ if (j == 0) {
|
||||
+#ifdef SQLITE_HACK
|
||||
+ xx = dbiCclose(dbi, dbcursor, 0);
|
||||
+ dbcursor = NULL;
|
||||
+#endif
|
||||
+ set = dbiFreeIndexSet(set);
|
||||
+ return DB_NOTFOUND;
|
||||
+ }
|
||||
+ set->count = j;
|
||||
+
|
||||
for (i = 0; i < set->count; i++)
|
||||
set->recs[i].fpNum = fpNum;
|
||||
|
||||
@@ -3393,6 +3412,12 @@ static int skipDir(const char * dn)
|
||||
int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList,
|
||||
int numItems)
|
||||
{
|
||||
+ return rpmdbFindFpListExclude(db, fpList, matchList, numItems, 0);
|
||||
+}
|
||||
+
|
||||
+int rpmdbFindFpListExclude(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList,
|
||||
+ int numItems, unsigned int exclude)
|
||||
+{
|
||||
DBT * key;
|
||||
DBT * data;
|
||||
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
|
||||
@@ -3424,10 +3449,13 @@ key->data = (void *) fpList[i].baseName;
|
||||
key->size = strlen((char *)key->data);
|
||||
if (key->size == 0) key->size++; /* XXX "/" fixup. */
|
||||
|
||||
- if (skipDir(fpList[i].entry->dirName))
|
||||
+ /* HACK HACK HACK: don't skip dirs while removing
|
||||
+ * packages as we will loose files on conflicts.
|
||||
+ * exclude is not zero when removing */
|
||||
+ if (!exclude && skipDir(fpList[i].entry->dirName))
|
||||
continue;
|
||||
|
||||
- xx = rpmdbGrowIterator(mi, i);
|
||||
+ xx = rpmdbGrowIterator(mi, i, exclude);
|
||||
|
||||
}
|
||||
|
@ -1,26 +1,10 @@
|
||||
SUSE specific kernel provides/requires scripts
|
||||
|
||||
--- ./scripts/Makefile.am.orig 2011-05-11 14:31:45.000000000 +0000
|
||||
+++ ./scripts/Makefile.am 2011-05-11 14:46:38.000000000 +0000
|
||||
@@ -16,6 +16,7 @@ EXTRA_DIST = \
|
||||
rpmdb_loadcvt rpm.daily rpm.log rpm2cpio.sh \
|
||||
tcl.req tgpg vpkg-provides.sh \
|
||||
find-requires.php find-provides.php \
|
||||
+ find-requires.ksyms find-provides.ksyms \
|
||||
find-php-provides find-php-requires \
|
||||
mono-find-requires mono-find-provides \
|
||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
||||
@@ -32,6 +33,7 @@ rpmconfig_SCRIPTS = \
|
||||
check-buildroot check-rpaths check-rpaths-worker \
|
||||
find-lang.sh \
|
||||
perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \
|
||||
+ find-requires.ksyms find-provides.ksyms \
|
||||
mono-find-requires mono-find-provides \
|
||||
pkgconfigdeps.sh libtooldeps.sh \
|
||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
||||
--- ./scripts/find-provides.ksyms.orig 2011-05-11 14:46:38.000000000 +0000
|
||||
+++ ./scripts/find-provides.ksyms 2011-05-11 14:46:38.000000000 +0000
|
||||
@@ -0,0 +1,41 @@
|
||||
Index: scripts/find-provides.ksyms
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ scripts/find-provides.ksyms
|
||||
@@ -0,0 +1,20 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
+IFS=$'\n'
|
||||
@ -28,43 +12,24 @@ SUSE specific kernel provides/requires scripts
|
||||
+case "$1" in
|
||||
+kernel-module-*) ;; # Fedora kernel module package names start with
|
||||
+ # kernel-module.
|
||||
+kernel*) kernel_flavor=${1#kernel-} ;;
|
||||
+kernel*) is_kernel_package=1 ;;
|
||||
+esac
|
||||
+
|
||||
+trap 'rm -f "$tmp"' EXIT
|
||||
+tmp=$(mktemp)
|
||||
+while read f; do
|
||||
+ test -e "$f" || continue
|
||||
+ case "$f" in
|
||||
+ *.debug)
|
||||
+ continue
|
||||
+ ;;
|
||||
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ continue
|
||||
+ esac
|
||||
+ unzip=false
|
||||
+ case "$f" in
|
||||
+ *.gz | */boot/vmlinuz*)
|
||||
+ unzip=true
|
||||
+ esac
|
||||
+ if $unzip && gzip -cd "$f" >"$tmp"; then
|
||||
+ f=$tmp
|
||||
+ fi
|
||||
+ flavor=$(/sbin/modinfo -F vermagic "$f")
|
||||
+ flavor=${flavor%% *}
|
||||
+ flavor=${flavor##*-}
|
||||
+ if test -z "$flavor"; then
|
||||
+ flavor=$kernel_flavor
|
||||
+ fi
|
||||
+ nm "$f" \
|
||||
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
|
||||
+if ! [ -z "$is_kernel_package" ]; then
|
||||
+ cat > /dev/null
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
+for module in $(grep -E '/lib/modules/.+\.ko$'); do
|
||||
+ nm "$module" \
|
||||
+ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):ksym(\2) = \1:p'
|
||||
+done \
|
||||
+| sort -u
|
||||
--- ./scripts/find-requires.ksyms.orig 2011-05-11 14:46:38.000000000 +0000
|
||||
+++ ./scripts/find-requires.ksyms 2011-05-11 14:46:38.000000000 +0000
|
||||
@@ -0,0 +1,57 @@
|
||||
Index: scripts/find-requires.ksyms
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ scripts/find-requires.ksyms
|
||||
@@ -0,0 +1,58 @@
|
||||
+#! /bin/bash
|
||||
+
|
||||
+IFS=$'\n'
|
||||
@ -80,16 +45,18 @@ SUSE specific kernel provides/requires scripts
|
||||
+ nm "$module"
|
||||
+ done \
|
||||
+ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \
|
||||
+ | sort -t $'\t' -k2 -u
|
||||
+ | sort -k2 -u
|
||||
+}
|
||||
+
|
||||
+all_requires() {
|
||||
+ for module in "$@"; do
|
||||
+ set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q)
|
||||
+ /sbin/modprobe --dump-modversions "$module" \
|
||||
+ if [ -e "/boot/symsets-$1.tar.gz" ]; then
|
||||
+ /sbin/modprobe --dump-modversions "$module" \
|
||||
+ | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':'
|
||||
+ fi
|
||||
+ done \
|
||||
+ | sort -t $'\t' -k2 -u
|
||||
+ | sort -k2 -u
|
||||
+}
|
||||
+
|
||||
+if ! [ -z "$is_kernel_package" -a -e /sbin/modinfo -a -e /sbin/modprobe ]; then
|
||||
@ -100,7 +67,7 @@ SUSE specific kernel provides/requires scripts
|
||||
+modules=($(grep -E '/lib/modules/.+\.ko$'))
|
||||
+if [ ${#modules[@]} -gt 0 ]; then
|
||||
+ symset_table=$(mktemp -t ${0##*/}.XXXXX)
|
||||
+ /usr/lib/rpm/symset-table | sort -t $'\t' -k 1,1 > $symset_table
|
||||
+ /usr/lib/rpm/symset-table | sort > $symset_table
|
||||
+
|
||||
+ join -t $'\t' -j 1 -a 2 $symset_table <(
|
||||
+ # Filter out requirements that we fulfill ourself.
|
||||
@ -111,14 +78,13 @@ SUSE specific kernel provides/requires scripts
|
||||
+ BEGIN { FS = "\t" ; OFS = "\t" }
|
||||
+ { print $3 "/" $2 "/" $1 }
|
||||
+ ' \
|
||||
+ | sort -t $'\t' -k 1,1 -u) \
|
||||
+ | sort -u) \
|
||||
+ | sort -u \
|
||||
+ | awk '
|
||||
+ { FS = "\t" ; OFS = "\t" }
|
||||
+ { split($1, arr, "/")
|
||||
+ flavor = gensub(/.*-/, "", "", arr[1]) }
|
||||
+ NF == 3 { print "kernel(" flavor ":" $2 ") = " $3
|
||||
+ NF == 3 { print "kernel(" $2 ") = " $3
|
||||
+ next }
|
||||
+ { print "ksym(" flavor ":" arr[3] ") = " arr[2] }
|
||||
+ { split($1, arr, "/")
|
||||
+ print "ksym(" arr[3] ") = " arr[2] }
|
||||
+ '
|
||||
+fi
|
||||
|
147
findlang.diff
147
findlang.diff
@ -1,20 +1,22 @@
|
||||
--- ./scripts/find-lang.sh.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/find-lang.sh 2011-05-11 14:53:34.000000000 +0000
|
||||
SUSE patches for find-lang.
|
||||
|
||||
--- ./scripts/find-lang.sh.orig 2004-06-20 18:55:19.000000000 +0000
|
||||
+++ ./scripts/find-lang.sh 2005-12-19 15:22:52.000000000 +0000
|
||||
@@ -28,10 +28,10 @@ the top of the tree containing the files
|
||||
PACKAGE_NAME is the %{name} of the package. This should also be
|
||||
the basename of the .mo files. the output is written to
|
||||
PACKAGE_NAME.lang unless \$3 is given in which case output is written
|
||||
-to \$3.
|
||||
+to \$3 (note that \$3 is appended to if given).
|
||||
+to \$3 (note, that \$3 is appended to if given).
|
||||
Additional options:
|
||||
- --with-gnome find GNOME help files
|
||||
- --with-kde find KDE help files
|
||||
+ --without-gnome do not find GNOME help files
|
||||
+ --without-kde do not find KDE help files
|
||||
--with-qt find Qt translation files
|
||||
--with-man find localized man pages
|
||||
+ --without-gnome find GNOME help files
|
||||
+ --without-kde find KDE help files
|
||||
--all-name match all package/domain names
|
||||
@@ -54,8 +54,8 @@ else NAME=$1
|
||||
--without-mo not find locales files
|
||||
EOF
|
||||
@@ -52,8 +52,8 @@ else NAME=$1
|
||||
fi
|
||||
shift
|
||||
|
||||
@ -22,54 +24,64 @@
|
||||
-KDE=#
|
||||
+GNOME=
|
||||
+KDE=
|
||||
QT=#
|
||||
MAN=#
|
||||
MO=
|
||||
@@ -73,6 +73,14 @@ while test $# -gt 0 ; do
|
||||
KDE=
|
||||
shift
|
||||
;;
|
||||
MO_NAME=$NAME.lang
|
||||
ALL_NAME=#
|
||||
@@ -61,12 +61,12 @@ NO_ALL_NAME=
|
||||
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
- --with-gnome )
|
||||
- GNOME=
|
||||
+ --without-gnome )
|
||||
+ GNOME=#
|
||||
+ shift
|
||||
+ ;;
|
||||
shift
|
||||
;;
|
||||
- --with-kde )
|
||||
- KDE=
|
||||
+ --without-kde )
|
||||
+ KDE=#
|
||||
+ shift
|
||||
+ ;;
|
||||
--with-qt )
|
||||
QT=
|
||||
shift
|
||||
@@ -97,33 +105,40 @@ while test $# -gt 0 ; do
|
||||
;;
|
||||
--without-mo )
|
||||
@@ -85,26 +85,43 @@ while test $# -gt 0 ; do
|
||||
esac
|
||||
done
|
||||
|
||||
-find $TOP_DIR -type f|sed '
|
||||
+
|
||||
+if ! test -s $MO_NAME ; then
|
||||
+ echo "%defattr (644, root, root, 755)" > $MO_NAME
|
||||
+ echo "%defattr (644, root, root, 755)" > $MO_NAME
|
||||
+fi
|
||||
+
|
||||
+MO_NAME_NEW=$MO_NAME.tmp.$$
|
||||
+rm -f $MO_NAME_NEW
|
||||
+
|
||||
find $TOP_DIR -type f -o -type l|sed '
|
||||
+find $TOP_DIR -type f -o -type l|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
-'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
|
||||
-'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
|
||||
+'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3:
|
||||
+'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) %doc \1\2\3:
|
||||
'"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
|
||||
'"$NO_ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' > $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
+/^ *$/d' >> $MO_NAME_NEW
|
||||
+
|
||||
+find $TOP_DIR -type f -o -type l|sed '
|
||||
+s:'"$TOP_DIR"'::
|
||||
+/\/share\/locale\//d
|
||||
+'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\([^/]*\)\(.*\)/LC_MESSAGES/.*\.mo$:%lang(\2) %doc \1\2\3\4:
|
||||
+'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\([^/]*\)\(.*\)/LC_MESSAGES/'"$NAME"'\.mo$:%lang(\2) %doc \1\2\3\4:
|
||||
+s:^\([^%].*\)::
|
||||
+s:%lang(C) ::
|
||||
+/^ *$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
-'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1:
|
||||
+'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1:
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\)::
|
||||
-'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2:
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2:
|
||||
-'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1:
|
||||
+'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2:
|
||||
+'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir %doc \1:
|
||||
'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\)::
|
||||
-'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2:
|
||||
@ -78,77 +90,30 @@
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
+/^ *$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1:
|
||||
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1:
|
||||
s:^\([^%].*\)::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type f|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
@@ -131,7 +146,7 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
|
||||
s:^[^%].*::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null`
|
||||
if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then
|
||||
@@ -143,7 +158,7 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
|
||||
@@ -112,12 +129,20 @@ s:'"$TOP_DIR"'::
|
||||
'"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3:
|
||||
'"$ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
|
||||
+'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\)::
|
||||
+'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3:
|
||||
+'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
|
||||
+'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
fi
|
||||
|
||||
KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null`
|
||||
@@ -156,7 +171,7 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
fi
|
||||
|
||||
find $TOP_DIR -type f -o -type l|sed '
|
||||
@@ -168,7 +183,7 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
|
||||
s:^[^%].*::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
@@ -176,17 +191,22 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type f -o -type l|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
-/^$/d' >> $MO_NAME
|
||||
+/^$/d' >> $MO_NAME_NEW
|
||||
+/^ *$/d' >> $MO_NAME_NEW
|
||||
|
||||
-if ! grep -q / $MO_NAME; then
|
||||
+if ! grep -q / $MO_NAME_NEW; then
|
||||
+if ! grep -q / $MO_NAME_NEW ; then
|
||||
echo "No translations found for ${NAME} in ${TOP_DIR}"
|
||||
+ rm -f $MO_NAME_NEW
|
||||
exit 1
|
||||
+else
|
||||
+ sort -u $MO_NAME_NEW >> $MO_NAME
|
||||
+ rm -f $MO_NAME_NEW
|
||||
fi
|
||||
+
|
||||
+sort -u $MO_NAME_NEW >> $MO_NAME
|
||||
+rm -f $MO_NAME_NEW
|
||||
+
|
||||
exit 0
|
||||
|
@ -1,75 +0,0 @@
|
||||
Add support for supplements to the internal dependency
|
||||
generator.
|
||||
|
||||
--- build/rpmfc.c.orig 2011-05-13 16:54:26.000000000 +0000
|
||||
+++ build/rpmfc.c 2011-05-13 17:11:20.000000000 +0000
|
||||
@@ -54,6 +54,7 @@ struct rpmfc_s {
|
||||
|
||||
rpmds provides; /*!< (no. provides) package provides */
|
||||
rpmds requires; /*!< (no. requires) package requires */
|
||||
+ rpmds supplements; /*!< (no. supplements) package supplements */
|
||||
};
|
||||
|
||||
struct rpmfcTokens_s {
|
||||
@@ -481,6 +482,14 @@ static int rpmfcHelper(rpmfc fc, unsigne
|
||||
dsContext = RPMSENSE_FIND_REQUIRES;
|
||||
tagN = RPMTAG_REQUIRENAME;
|
||||
break;
|
||||
+ case 'S':
|
||||
+ if (fc->skipProv)
|
||||
+ return 0;
|
||||
+ depname = "supplements";
|
||||
+ depsp = &fc->supplements;
|
||||
+ dsContext = RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK;
|
||||
+ tagN = RPMTAG_ENHANCESNAME;
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* If the entire path is filtered out, there's nothing more to do */
|
||||
@@ -752,6 +761,7 @@ rpmfc rpmfcFree(rpmfc fc)
|
||||
|
||||
fc->provides = rpmdsFree(fc->provides);
|
||||
fc->requires = rpmdsFree(fc->requires);
|
||||
+ fc->supplements = rpmdsFree(fc->supplements);
|
||||
}
|
||||
fc = _free(fc);
|
||||
return NULL;
|
||||
@@ -804,6 +814,7 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
for (ARGV_t fattr = fc->fattrs[fc->ix]; fattr && *fattr; fattr++) {
|
||||
xx += rpmfcHelper(fc, 'P', *fattr);
|
||||
xx += rpmfcHelper(fc, 'R', *fattr);
|
||||
+ xx += rpmfcHelper(fc, 'S', *fattr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -846,6 +857,11 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
dix = rpmdsFind(fc->requires, ds);
|
||||
ds = rpmdsFree(ds);
|
||||
break;
|
||||
+ case 'S':
|
||||
+ ds = rpmdsSingle(RPMTAG_ENHANCESNAME, N, EVR, Flags);
|
||||
+ dix = rpmdsFind(fc->supplements, ds);
|
||||
+ ds = rpmdsFree(ds);
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* XXX assertion incorrect while generating -debuginfo deps. */
|
||||
@@ -1357,6 +1373,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Add Supplements: */
|
||||
+ if (fc->supplements != NULL && rpmdsCount(fc->supplements) > 0 && !fc->skipReq) {
|
||||
+ rpmds pi = rpmdsInit(fc->supplements);
|
||||
+ while (rpmdsNext(pi) >= 0) {
|
||||
+ rpmsenseFlags flags = rpmdsFlags(pi);
|
||||
+
|
||||
+ headerPutString(pkg->header, RPMTAG_ENHANCESNAME, rpmdsN(pi));
|
||||
+ headerPutString(pkg->header, RPMTAG_ENHANCESVERSION, rpmdsEVR(pi));
|
||||
+ headerPutUint32(pkg->header, RPMTAG_ENHANCESFLAGS, &flags, 1);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Add dependency dictionary(#dependencies) */
|
||||
if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) {
|
||||
assert(rpmtdType(&td) == RPM_INT32_TYPE);
|
@ -1,37 +0,0 @@
|
||||
Index: autodeps/linux.prov
|
||||
===================================================================
|
||||
--- autodeps/linux.prov.orig 2011-06-08 13:28:10.000000000 +0200
|
||||
+++ autodeps/linux.prov 2011-06-08 13:28:51.755445342 +0200
|
||||
@@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}"
|
||||
pythonlist=
|
||||
tcllist=
|
||||
monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
|
||||
+firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/"))
|
||||
|
||||
#
|
||||
# --- Alpha does not mark 64bit dependencies
|
||||
@@ -59,6 +60,11 @@ done | sort -u
|
||||
printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u
|
||||
|
||||
#
|
||||
+# --- firmware files
|
||||
+[ -x /usr/lib/rpm/firmware.prov -a -n "$firmwarelist" ] &&
|
||||
+ printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u
|
||||
+
|
||||
+#
|
||||
# --- Mono exes/dlls
|
||||
: ${MONO_PREFIX=/usr}
|
||||
if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then
|
||||
Index: scripts/firmware.prov
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ scripts/firmware.prov 2011-06-08 13:28:33.117204009 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+#!/bin/sh
|
||||
+# Add firmware files in /lib/firmware into RPM provides
|
||||
+
|
||||
+while read instfile ; do
|
||||
+ case $instfile in
|
||||
+ */lib/firmware/*) test -f "$instfile" && echo "firmware(${instfile##*/lib/firmware/})" ;;
|
||||
+ esac
|
||||
+done
|
@ -1,54 +0,0 @@
|
||||
Index: autodeps/linux.prov
|
||||
===================================================================
|
||||
--- autodeps/linux.prov.orig 2011-06-08 13:37:46.951974468 +0200
|
||||
+++ autodeps/linux.prov 2011-06-08 13:37:46.967972960 +0200
|
||||
@@ -15,6 +15,8 @@ pythonlist=($(printf "%s\n" "${filelist[
|
||||
tcllist=
|
||||
monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
|
||||
firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/"))
|
||||
+pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$'))
|
||||
+fontlist=($(printf "%s\n" "${filelist[@]}" | egrep -i "/usr/share/fonts/.*\.(ttf|otf|pfa)$"))
|
||||
|
||||
#
|
||||
# --- Alpha does not mark 64bit dependencies
|
||||
@@ -80,6 +82,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo
|
||||
fi
|
||||
|
||||
#
|
||||
+# --- pkgconfig provides
|
||||
+[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] &&
|
||||
+ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -P | sort -u
|
||||
+
|
||||
+#
|
||||
+# --- font provides
|
||||
+[ -x /usr/lib/rpm/fontconfig.prov -a -n "$fontlist" ] &&
|
||||
+ printf "%s\n" "${fontlist[@]}" | /usr/lib/rpm/fontconfig.prov | sort -u
|
||||
+
|
||||
+#
|
||||
# --- Kernel module exported symbols
|
||||
[ -x /usr/lib/rpm/find-provides.ksyms ] &&
|
||||
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@"
|
||||
Index: autodeps/linux.req
|
||||
===================================================================
|
||||
--- autodeps/linux.req.orig 2011-06-08 13:37:46.951974468 +0200
|
||||
+++ autodeps/linux.req 2011-06-08 13:37:46.968972865 +0200
|
||||
@@ -34,6 +34,7 @@ perllist=()
|
||||
pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..'))
|
||||
tcllist=()
|
||||
monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$"))
|
||||
+pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$'))
|
||||
|
||||
#
|
||||
# --- Alpha does not mark 64bit dependencies
|
||||
@@ -143,6 +144,11 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo
|
||||
fi
|
||||
|
||||
#
|
||||
+# --- pkgconfig requires
|
||||
+[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] &&
|
||||
+ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -R | sort -u
|
||||
+
|
||||
+#
|
||||
# --- Kernel module imported symbols
|
||||
[ -x ${0%/*}/find-requires.ksyms ] &&
|
||||
printf "%s\n" "${filelist[@]}" | ${0%/*}/find-requires.ksyms "$@"
|
40
forkfailed.diff
Normal file
40
forkfailed.diff
Normal file
@ -0,0 +1,40 @@
|
||||
Print error message if scriptlet fork fails instead if silently
|
||||
dying. [#152779]
|
||||
|
||||
Index: lib/psm.c
|
||||
===================================================================
|
||||
--- lib/psm.c.orig
|
||||
+++ lib/psm.c
|
||||
@@ -910,6 +910,12 @@ static rpmRC runScript(rpmpsm psm, Heade
|
||||
}
|
||||
/*@=branchstate@*/
|
||||
|
||||
+ if (psm->sq.child == (pid_t)-1) {
|
||||
+ rpmError(RPMERR_FORK, _("Couldn't fork %s: %s\n"), sln, strerror(errno));
|
||||
+ rc = RPMRC_FAIL;
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
(void) psmWait(psm);
|
||||
|
||||
/* XXX filter order dependent multilib "other" arch helper error. */
|
||||
@@ -934,6 +940,7 @@ static rpmRC runScript(rpmpsm psm, Heade
|
||||
}
|
||||
}
|
||||
|
||||
+exit:
|
||||
if (freePrefixes) prefixes = hfd(prefixes, ipt);
|
||||
|
||||
xx = Fclose(out); /* XXX dup'd STDOUT_FILENO */
|
||||
Index: rpmio/rpmsq.c
|
||||
===================================================================
|
||||
--- rpmio/rpmsq.c.orig
|
||||
+++ rpmio/rpmsq.c
|
||||
@@ -407,6 +407,7 @@ fprintf(stderr, " Enable(%p): %p\n",
|
||||
|
||||
pid = fork();
|
||||
if (pid < (pid_t) 0) { /* fork failed. */
|
||||
+ sq->child = (pid_t)-1;
|
||||
/*@-bounds@*/
|
||||
xx = close(sq->pipes[0]);
|
||||
xx = close(sq->pipes[1]);
|
30
getcwdresult.diff
Normal file
30
getcwdresult.diff
Normal file
@ -0,0 +1,30 @@
|
||||
Check getcwd return value, abort if rpm cannot determine current
|
||||
directory.
|
||||
|
||||
--- ./build.c.orig 2004-10-17 19:00:10.000000000 +0000
|
||||
+++ ./build.c 2005-12-19 17:52:25.000000000 +0000
|
||||
@@ -206,7 +211,10 @@ static int buildForTarget(rpmts ts, cons
|
||||
directory for this run */
|
||||
|
||||
if (*arg != '/') {
|
||||
- (void)getcwd(buf, BUFSIZ);
|
||||
+ if (!getcwd(buf, BUFSIZ)) {
|
||||
+ rpmError(RPMERR_STAT, "getcwd failed: %m\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
strcat(buf, "/");
|
||||
strcat(buf, arg);
|
||||
} else
|
||||
@@ -225,7 +233,11 @@ static int buildForTarget(rpmts ts, cons
|
||||
specut = urlPath(specURL, &specFile);
|
||||
if (*specFile != '/') {
|
||||
char *s = alloca(BUFSIZ);
|
||||
- (void)getcwd(s, BUFSIZ);
|
||||
+ if (!getcwd(s, BUFSIZ)) {
|
||||
+ rpmError(RPMERR_STAT, "getcwd failed: %m\n");
|
||||
+ rc = 1;
|
||||
+ goto exit;
|
||||
+ }
|
||||
strcat(s, "/");
|
||||
strcat(s, arg);
|
||||
specURL = s;
|
17
ghost.diff
Normal file
17
ghost.diff
Normal file
@ -0,0 +1,17 @@
|
||||
Fix --noghost query option. rh#103207
|
||||
|
||||
Already in rpm-4.4.7
|
||||
|
||||
Index: lib/query.c
|
||||
===================================================================
|
||||
--- lib/query.c.orig
|
||||
+++ lib/query.c
|
||||
@@ -222,7 +222,7 @@ int showQueryPackage(QVA_t qva, rpmts ts
|
||||
continue;
|
||||
|
||||
/* If not querying %ghost, skip ghost files. */
|
||||
- if (!(qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST))
|
||||
+ if ((qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST))
|
||||
continue;
|
||||
|
||||
/*@-boundswrite@*/
|
18
globlstat.diff
Normal file
18
globlstat.diff
Normal file
@ -0,0 +1,18 @@
|
||||
Always use lstat in glob call to work around a change in glibc's
|
||||
glob code. [#129434], rh#126460
|
||||
|
||||
rpm-4.4.7 comes with its own glob implementation, so it doesn't
|
||||
need this patch (but it also doesn't hurt).
|
||||
|
||||
--- ./rpmio/rpmrpc.c.orig 2005-12-16 15:01:26.000000000 +0000
|
||||
+++ ./rpmio/rpmrpc.c 2006-02-13 18:55:39.000000000 +0000
|
||||
@@ -1450,7 +1462,8 @@ fprintf(stderr, "*** Glob(%s,0x%x,%p,%p)
|
||||
pglob->gl_readdir = Readdir;
|
||||
pglob->gl_opendir = Opendir;
|
||||
pglob->gl_lstat = Lstat;
|
||||
- pglob->gl_stat = Stat;
|
||||
+ /* always use lstat to glob symlinks */
|
||||
+ pglob->gl_stat = Lstat;
|
||||
/*@=type@*/
|
||||
flags |= GLOB_ALTDIRFUNC;
|
||||
flags &= ~GLOB_TILDE;
|
13
globoffbyone.diff
Normal file
13
globoffbyone.diff
Normal file
@ -0,0 +1,13 @@
|
||||
Fix off-by-one error in glob call.
|
||||
|
||||
--- ./rpmio/rpmrpc.c.orig 2005-12-16 15:01:26.000000000 +0000
|
||||
+++ ./rpmio/rpmrpc.c 2006-02-13 18:55:39.000000000 +0000
|
||||
@@ -1403,7 +1415,7 @@ int Glob_pattern_p (const char * pattern
|
||||
case '*':
|
||||
return (1);
|
||||
case '\\':
|
||||
- if (quote && p[1] != '\0')
|
||||
+ if (quote && *p != '\0')
|
||||
p++;
|
||||
continue;
|
||||
|
@ -1,55 +0,0 @@
|
||||
Add rpmtsHeaderAddDB and rpmtsHeaderRemoveDB so that
|
||||
convertdb1 will build again.
|
||||
|
||||
--- lib/rpmts.c.orig 2011-05-12 13:21:03.000000000 +0000
|
||||
+++ lib/rpmts.c 2011-05-12 13:26:25.000000000 +0000
|
||||
@@ -159,6 +159,24 @@ int rpmtsVerifyDB(rpmts ts)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+int rpmtsHeaderAddDB(rpmts ts, Header h)
|
||||
+{
|
||||
+ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT)))
|
||||
+ return RPMRC_FAIL;
|
||||
+ if (rpmdbAdd(rpmtsGetRdb(ts), h) != 0)
|
||||
+ return RPMRC_FAIL;
|
||||
+ return RPMRC_OK;
|
||||
+}
|
||||
+
|
||||
+int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum)
|
||||
+{
|
||||
+ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT)))
|
||||
+ return RPMRC_FAIL;
|
||||
+ if (rpmdbRemove(rpmtsGetRdb(ts), hdrNum) != 0)
|
||||
+ return RPMRC_FAIL;
|
||||
+ return RPMRC_OK;
|
||||
+}
|
||||
+
|
||||
/* keyp might no be defined. */
|
||||
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
|
||||
const void * keyp, size_t keylen)
|
||||
--- lib/rpmts.h.orig 2011-05-12 13:21:11.000000000 +0000
|
||||
+++ lib/rpmts.h 2011-05-12 13:28:32.000000000 +0000
|
||||
@@ -264,6 +264,22 @@ int rpmtsRebuildDB(rpmts ts);
|
||||
int rpmtsVerifyDB(rpmts ts);
|
||||
|
||||
/** \ingroup rpmts
|
||||
+ * Add a header to the database used by the transaction.
|
||||
+ * @param ts transaction set
|
||||
+ * @param h header to add
|
||||
+ * @return 0 on success
|
||||
+ */
|
||||
+int rpmtsHeaderAddDB(rpmts ts, Header h);
|
||||
+
|
||||
+/** \ingroup rpmts
|
||||
+ * Remove a header from the database used by the transaction.
|
||||
+ * @param ts transaction set
|
||||
+ * @param hdrNum index of header to remove
|
||||
+ * @return 0 on success
|
||||
+ */
|
||||
+int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum);
|
||||
+
|
||||
+/** \ingroup rpmts
|
||||
* Return transaction database iterator.
|
||||
* @param ts transaction set
|
||||
* @param rpmtag database index tag
|
25
initdbret.diff
Normal file
25
initdbret.diff
Normal file
@ -0,0 +1,25 @@
|
||||
Check rpmtsInitDB return value. Also patches rpm.c, which
|
||||
actually is not used anymore.
|
||||
|
||||
--- ./rpm.c.orig 2005-12-15 11:59:33.000000000 +0000
|
||||
+++ ./rpm.c 2005-12-15 11:59:53.000000000 +0000
|
||||
@@ -1119,7 +1119,7 @@ int main(int argc, const char ** argv)
|
||||
break;
|
||||
|
||||
case MODE_INITDB:
|
||||
- rpmdbInit(rootdir, 0644);
|
||||
+ ec = rpmdbInit(rootdir, 0644);
|
||||
break;
|
||||
|
||||
case MODE_CHECKSIG:
|
||||
--- ./rpmqv.c.orig 2005-12-15 13:46:45.000000000 +0000
|
||||
+++ ./rpmqv.c 2005-12-15 13:47:37.000000000 +0000
|
||||
@@ -624,7 +624,7 @@ int main(int argc, const char ** argv)
|
||||
switch (bigMode) {
|
||||
#ifdef IAM_RPMDB
|
||||
case MODE_INITDB:
|
||||
- (void) rpmtsInitDB(ts, 0644);
|
||||
+ ec = rpmtsInitDB(ts, 0644);
|
||||
break;
|
||||
|
||||
case MODE_REBUILDDB:
|
@ -1,50 +0,0 @@
|
||||
--- ./autodeps/linux.prov.orig 2011-05-11 16:45:13.000000000 +0000
|
||||
+++ ./autodeps/linux.prov 2011-05-11 16:51:10.000000000 +0000
|
||||
@@ -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
|
||||
--- ./scripts/Makefile.am.orig 2011-05-11 14:46:38.000000000 +0000
|
||||
+++ ./scripts/Makefile.am 2011-05-11 16:52:10.000000000 +0000
|
||||
@@ -22,6 +22,7 @@ EXTRA_DIST = \
|
||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
||||
pkgconfigdeps.sh libtooldeps.sh \
|
||||
fontconfig.prov desktop-file.prov script.req \
|
||||
+ sysvinitdeps.sh \
|
||||
macros.perl macros.php macros.python
|
||||
|
||||
rpmconfig_SCRIPTS = \
|
||||
@@ -38,6 +39,7 @@ rpmconfig_SCRIPTS = \
|
||||
pkgconfigdeps.sh libtooldeps.sh \
|
||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
||||
fontconfig.prov desktop-file.prov script.req \
|
||||
+ sysvinitdeps.sh \
|
||||
rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg
|
||||
|
||||
rpmconfig_DATA = \
|
||||
--- ./scripts/sysvinitdeps.sh.orig 2011-05-11 16:51:10.000000000 +0000
|
||||
+++ ./scripts/sysvinitdeps.sh 2011-05-11 16:54:33.000000000 +0000
|
||||
@@ -0,0 +1,17 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+[ "$1" = '-P' -o "$1" = '--provides' ] || {
|
||||
+ cat > /dev/null
|
||||
+ exit 0
|
||||
+}
|
||||
+
|
||||
+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
|
127
langnoc.diff
127
langnoc.diff
@ -1,127 +0,0 @@
|
||||
--- ./macros.in.orig 2011-05-11 15:59:44.000000000 +0000
|
||||
+++ ./macros.in 2011-05-11 16:45:30.000000000 +0000
|
||||
@@ -1247,6 +1247,7 @@ EOF
|
||||
# %files -f %{name}.lang
|
||||
#
|
||||
%find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
|
||||
+%no_lang_C --without-C
|
||||
|
||||
# Commands + opts to use for retrieving remote files
|
||||
# Proxy opts can be set through --httpproxy/--httpport popt aliases,
|
||||
--- ./scripts/find-lang.sh.orig 2011-05-11 14:53:34.000000000 +0000
|
||||
+++ ./scripts/find-lang.sh 2011-05-11 16:45:30.000000000 +0000
|
||||
@@ -62,6 +62,8 @@ MO=
|
||||
MO_NAME=$NAME.lang
|
||||
ALL_NAME=#
|
||||
NO_ALL_NAME=
|
||||
+ONLY_C=#
|
||||
+NO_C=#
|
||||
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
@@ -98,6 +100,14 @@ while test $# -gt 0 ; do
|
||||
NO_ALL_NAME=#
|
||||
shift
|
||||
;;
|
||||
+ --with-only-C )
|
||||
+ ONLY_C=
|
||||
+ shift
|
||||
+ ;;
|
||||
+ --without-C )
|
||||
+ NO_C=
|
||||
+ shift
|
||||
+ ;;
|
||||
* )
|
||||
MO_NAME=${1}
|
||||
shift
|
||||
@@ -117,27 +127,32 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3:
|
||||
'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) %doc \1\2\3:
|
||||
s:^\([^%].*\)::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
-'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1:
|
||||
+'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%lang(C) %dir %doc \1:
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\)::
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2:
|
||||
-'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir %doc \1:
|
||||
+'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir %doc \1:
|
||||
'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\)::
|
||||
'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) %doc \1\2:
|
||||
s:%lang(.*) .*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*::
|
||||
s:^\([^%].*\)::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
-'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1:
|
||||
-'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1:
|
||||
+'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%lang(C) %dir \1:
|
||||
+'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir \1:
|
||||
s:^\([^%].*\)::
|
||||
+s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
find $TOP_DIR -type f|sed '
|
||||
@@ -145,6 +160,8 @@ s:'"$TOP_DIR"'::
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1:
|
||||
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
|
||||
s:^[^%].*::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
@@ -157,6 +174,8 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
|
||||
s:^\([^%].*\)::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
fi
|
||||
@@ -170,6 +189,8 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
|
||||
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
|
||||
s:^\([^%].*\)::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
fi
|
||||
@@ -182,6 +203,8 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}_[a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
|
||||
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
|
||||
s:^[^%].*::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
@@ -190,6 +213,8 @@ s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\)::
|
||||
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
|
||||
s:^\([^%].*\)::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
||||
@@ -197,6 +222,8 @@ find $TOP_DIR -type f -o -type l|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*:
|
||||
s:^\([^%].*\)::
|
||||
+'"$ONLY_C"'/%lang(C)/!d
|
||||
+'"$NO_C"'/%lang(C)/d
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME_NEW
|
||||
|
@ -1,50 +0,0 @@
|
||||
Prefer sys/vfs.h, as statvfs stats all filesystems again
|
||||
--- ./configure.ac.orig 2011-05-12 12:36:32.000000000 +0000
|
||||
+++ ./configure.ac 2011-05-12 12:36:42.000000000 +0000
|
||||
@@ -402,25 +402,25 @@ dnl
|
||||
found_struct_statfs=no
|
||||
|
||||
if test X$found_struct_statfs = Xno ; then
|
||||
-dnl Solaris 2.6+ wants to use statvfs
|
||||
+dnl first try including sys/vfs.h
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
-#include <sys/statvfs.h> ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h)
|
||||
- AC_DEFINE(STATFS_IN_SYS_STATVFS, 1,
|
||||
- [statfs in <sys/statvfs.h> (for solaris 2.6+ systems)])
|
||||
+#include <sys/vfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h)
|
||||
+ AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for linux systems)])
|
||||
found_struct_statfs=yes],[])
|
||||
fi
|
||||
|
||||
if test X$found_struct_statfs = Xno ; then
|
||||
-dnl first try including sys/vfs.h
|
||||
+dnl Solaris 2.6+ wants to use statvfs
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
-#include <sys/vfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h)
|
||||
- AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for linux systems)])
|
||||
+#include <sys/statvfs.h> ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h)
|
||||
+ AC_DEFINE(STATFS_IN_SYS_STATVFS, 1,
|
||||
+ [statfs in <sys/statvfs.h> (for solaris 2.6+ systems)])
|
||||
found_struct_statfs=yes],[])
|
||||
fi
|
||||
|
||||
--- ./lib/transaction.c.orig 2011-05-12 12:36:55.000000000 +0000
|
||||
+++ ./lib/transaction.c 2011-05-12 12:38:03.000000000 +0000
|
||||
@@ -114,7 +114,11 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(c
|
||||
dsi->bneeded = 0;
|
||||
dsi->ineeded = 0;
|
||||
#ifdef STATFS_HAS_F_BAVAIL
|
||||
+# ifdef ST_RDONLY
|
||||
dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail;
|
||||
+# else
|
||||
+ dsi->bavail = sfb.f_bavail;
|
||||
+# endif
|
||||
#else
|
||||
/* FIXME: the statfs struct doesn't have a member to tell how many blocks are
|
||||
* available for non-superusers. f_blocks - f_bfree is probably too big, but
|
16
legacyprereq.diff
Normal file
16
legacyprereq.diff
Normal file
@ -0,0 +1,16 @@
|
||||
Keep RPMSENSE_PREREQ definition to be compatible with older
|
||||
versions. Maybe not needed.
|
||||
|
||||
diff -ur ./lib/rpmlib.h ../rpm-4.4.2.orig/lib/rpmlib.h
|
||||
--- ./lib/rpmlib.h 2006-09-21 21:07:18.000000000 +0200
|
||||
+++ ../rpm-4.4.2.orig/lib/rpmlib.h 2006-09-21 20:59:00.000000000 +0200
|
||||
@@ -517,8 +517,7 @@
|
||||
RPMSENSE_EQUAL = (1 << 3),
|
||||
RPMSENSE_PROVIDES = (1 << 4), /* only used internally by builds */
|
||||
RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */
|
||||
- /* bit 6 used to be RPMSENSE_PREREQ */
|
||||
-#define RPMSENSE_PREREQ RPMSENSE_ANY
|
||||
+ RPMSENSE_PREREQ = (1 << 6), /*!< @todo Legacy. */
|
||||
RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */
|
||||
RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */
|
||||
RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), /*!< %pre dependency. */
|
143
localetag.diff
143
localetag.diff
@ -1,21 +1,23 @@
|
||||
Convert output to the current locale. Assumes utf8 input if the
|
||||
decoding works, otherwise iso-8859-1.
|
||||
Convert changelog and i18n header elements to current locale.
|
||||
[#43347], rh#140050
|
||||
|
||||
--- ./lib/tagexts.c.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./lib/tagexts.c 2011-05-10 16:05:30.000000000 +0000
|
||||
Already in rpm-4.4.7
|
||||
|
||||
--- ./lib/formats.c.orig 2005-01-26 04:46:54.000000000 +0000
|
||||
+++ ./lib/formats.c 2006-03-17 15:27:06.000000000 +0000
|
||||
@@ -2,6 +2,7 @@
|
||||
* \file lib/formats.c
|
||||
*/
|
||||
|
||||
+#include <wchar.h>
|
||||
#include "system.h"
|
||||
#include "rpmio_internal.h"
|
||||
#include <rpmlib.h>
|
||||
@@ -18,6 +19,114 @@
|
||||
/*@access pgpDig @*/
|
||||
/*@access pgpDigParams @*/
|
||||
|
||||
#include <rpm/rpmtypes.h>
|
||||
@@ -150,6 +151,114 @@ exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
+static char * strtolocale(char *str)
|
||||
+static const char * strtolocale(const char *str)
|
||||
+{
|
||||
+ wchar_t *wstr, *wp;
|
||||
+ const unsigned char *cp;
|
||||
@ -97,7 +99,7 @@ decoding works, otherwise iso-8859-1.
|
||||
+ wstr = _free(wstr);
|
||||
+ return str;
|
||||
+ }
|
||||
+ str = _free((char *)str);
|
||||
+ str = _free(str);
|
||||
+ memset(&ps, 0, sizeof(ps));
|
||||
+ ccl = cca = 0;
|
||||
+ for (wp = wstr; ; wp++) {
|
||||
@ -120,77 +122,104 @@ decoding works, otherwise iso-8859-1.
|
||||
+ }
|
||||
+ }
|
||||
+ wstr = _free(wstr);
|
||||
+ return (char *)cc;
|
||||
+ return (const char *)cc;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Retrieve trigger info.
|
||||
* @param h header
|
||||
@@ -435,10 +544,41 @@ static int i18nTag(Header h, rpmTag tag,
|
||||
#endif
|
||||
* Identify type of trigger.
|
||||
* @param type tag type
|
||||
@@ -1077,6 +1220,7 @@ static int i18nTag(Header h, int_32 tag,
|
||||
|
||||
rc = headerGet(h, tag, td, HEADERGET_ALLOC);
|
||||
+ if (rc && td->data) {
|
||||
+ td->data = strtolocale(td->data);
|
||||
+ }
|
||||
return rc;
|
||||
if (rc && (*data) != NULL) {
|
||||
*data = xstrdup(*data);
|
||||
+ *data = strtolocale(*data);
|
||||
*freeData = 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -1088,6 +1232,56 @@ static int i18nTag(Header h, int_32 tag,
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Retrieve text and convert to locale.
|
||||
+ */
|
||||
+static int localeTag(Header h, rpmTag tag, rpmtd td)
|
||||
+static int localeTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type,
|
||||
+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
|
||||
+ /*@out@*/ int * freeData)
|
||||
+{
|
||||
+ int rc;
|
||||
+ rc = headerGet(h, tag, td, HEADERGET_ALLOC);
|
||||
+ if (!rc)
|
||||
+ return 0;
|
||||
+ if (td->type == RPM_STRING_TYPE) {
|
||||
+ td->data = strtolocale(td->data);
|
||||
+ td->count = 1;
|
||||
+ } else if (td->type == RPM_STRING_ARRAY_TYPE) {
|
||||
+ char **arr;
|
||||
+ int i;
|
||||
+ arr = xmalloc(td->count * sizeof(*arr));
|
||||
+ for (i = 0; i < td->count; i++) {
|
||||
+ arr[i] = xstrdup(((char **)td->data)[i]);
|
||||
+ arr[i] = strtolocale(arr[i]);
|
||||
+ }
|
||||
+ _free(td->data);
|
||||
+ td->data = arr;
|
||||
+ td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED;
|
||||
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
|
||||
+ rpmTagType t;
|
||||
+ char **d, **d2, *dp;
|
||||
+ int rc, i, l;
|
||||
+
|
||||
+ rc = hge(h, tag, &t, (void **)&d, count);
|
||||
+ if (!rc || d == NULL || *count == 0) {
|
||||
+ *freeData = 0;
|
||||
+ *data = NULL;
|
||||
+ *count = 0;
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return rc;
|
||||
+ if (type)
|
||||
+ *type = t;
|
||||
+ if (t == RPM_STRING_TYPE) {
|
||||
+ d = (char **)xstrdup((char *)d);
|
||||
+ d = (char **)strtolocale((char *)d);
|
||||
+ *freeData = 1;
|
||||
+ } else if (t == RPM_STRING_ARRAY_TYPE) {
|
||||
+ l = 0;
|
||||
+ for (i = 0; i < *count; i++) {
|
||||
+ d[i] = xstrdup(d[i]);
|
||||
+ d[i] = (char *)strtolocale(d[i]);
|
||||
+ l += strlen(d[i]) + 1;
|
||||
+ }
|
||||
+ d2 = xmalloc(*count * sizeof(char *) + l);
|
||||
+ dp = (char *)(d2 + *count);
|
||||
+ for (i = 0; i < *count; i++) {
|
||||
+ d2[i] = dp;
|
||||
+ strcpy(dp, d[i]);
|
||||
+ dp += strlen(dp) + 1;
|
||||
+ d[i] = _free(d[i]);
|
||||
+ }
|
||||
+ d = _free(d);
|
||||
+ d = d2;
|
||||
+ *freeData = 1;
|
||||
+ } else
|
||||
+ *freeData = 0;
|
||||
+ *data = (void **)d;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
* Retrieve summary text.
|
||||
* @param h header
|
||||
* @retval td tag data container
|
||||
@@ -460,6 +600,16 @@ static int descriptionTag(Header h, rpmt
|
||||
return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags);
|
||||
* @retval *type tag type
|
||||
@@ -1127,6 +1321,20 @@ static int descriptionTag(Header h, /*@o
|
||||
return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData);
|
||||
}
|
||||
|
||||
+static int changelognameTag(Header h, rpmtd td)
|
||||
+static int changelognameTag(Header h, /*@out@*/ rpmTagType * type,
|
||||
+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
|
||||
+ /*@out@*/ int * freeData)
|
||||
+{
|
||||
+ return localeTag(h, RPMTAG_CHANGELOGNAME, td);
|
||||
+ return localeTag(h, RPMTAG_CHANGELOGNAME, type, data, count, freeData);
|
||||
+}
|
||||
+
|
||||
+static int changelogtextTag(Header h, rpmtd td)
|
||||
+static int changelogtextTag(Header h, /*@out@*/ rpmTagType * type,
|
||||
+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
|
||||
+ /*@out@*/ int * freeData)
|
||||
+{
|
||||
+ return localeTag(h, RPMTAG_CHANGELOGTEXT, td);
|
||||
+ return localeTag(h, RPMTAG_CHANGELOGTEXT, type, data, count, freeData);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Retrieve group text.
|
||||
* @param h header
|
||||
@@ -677,6 +827,8 @@ static const struct headerTagFunc_s rpmH
|
||||
{ RPMTAG_LONGARCHIVESIZE, longarchivesizeTag },
|
||||
{ RPMTAG_LONGSIZE, longsizeTag },
|
||||
{ RPMTAG_LONGSIGSIZE, longsigsizeTag },
|
||||
+ { RPMTAG_CHANGELOGNAME, changelognameTag },
|
||||
+ { RPMTAG_CHANGELOGTEXT, changelogtextTag },
|
||||
{ RPMTAG_DBINSTANCE, dbinstanceTag },
|
||||
{ RPMTAG_EVR, evrTag },
|
||||
{ RPMTAG_NVR, nvrTag },
|
||||
@@ -1152,6 +1360,8 @@ const struct headerSprintfExtension_s rp
|
||||
{ HEADER_EXT_TAG, "RPMTAG_GROUP", { groupTag } },
|
||||
{ HEADER_EXT_TAG, "RPMTAG_DESCRIPTION", { descriptionTag } },
|
||||
{ HEADER_EXT_TAG, "RPMTAG_SUMMARY", { summaryTag } },
|
||||
+ { HEADER_EXT_TAG, "RPMTAG_CHANGELOGNAME", { changelognameTag } },
|
||||
+ { HEADER_EXT_TAG, "RPMTAG_CHANGELOGTEXT", { changelogtextTag } },
|
||||
{ HEADER_EXT_TAG, "RPMTAG_FILECLASS", { fileclassTag } },
|
||||
{ HEADER_EXT_TAG, "RPMTAG_FILECONTEXTS", { filecontextsTag } },
|
||||
{ HEADER_EXT_TAG, "RPMTAG_FILENAMES", { filenamesTag } },
|
||||
|
32
luanoreadline.diff
Normal file
32
luanoreadline.diff
Normal file
@ -0,0 +1,32 @@
|
||||
Build lua without readling support.
|
||||
|
||||
--- ./lua/Makefile.am.orig 2006-01-28 00:27:50.000000000 +0000
|
||||
+++ ./lua/Makefile.am 2006-01-28 00:28:25.000000000 +0000
|
||||
@@ -16,7 +16,7 @@ INCLUDES = -I$(srcdir)/include -I$(srcdi
|
||||
|
||||
lua_lua_SOURCES = lua/lua.c
|
||||
lua_lua_CFLAGS = -DLUA_USERCONFIG='"$(srcdir)/local/userconfig.c"'
|
||||
-lua_lua_LDADD = $(LDADD) -L/usr/lib -lreadline -lhistory -lncurses
|
||||
+lua_lua_LDADD = $(LDADD) -lncurses
|
||||
luac_luac_SOURCES = luac/luac.c luac/print.c lopcodes.c
|
||||
luac_luac_CFLAGS = -DLUA_OPNAMES
|
||||
|
||||
--- ./lua/local/userconfig.c.orig 2004-03-16 21:58:30.000000000 +0000
|
||||
+++ ./lua/local/userconfig.c 2006-01-28 00:34:39.000000000 +0000
|
||||
@@ -9,6 +9,8 @@
|
||||
{"rex", luaopen_rex}, \
|
||||
{"luapath", luapath},
|
||||
|
||||
+#if 0
|
||||
+
|
||||
#define lua_readline myreadline
|
||||
#define lua_saveline mysaveline
|
||||
|
||||
@@ -45,6 +47,7 @@ static void mysaveline (lua_State *L, co
|
||||
}
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int luapath(lua_State *L)
|
||||
{
|
75
luaroot.diff
Normal file
75
luaroot.diff
Normal file
@ -0,0 +1,75 @@
|
||||
Index: lib/psm.c
|
||||
===================================================================
|
||||
--- lib/psm.c.orig
|
||||
+++ lib/psm.c
|
||||
@@ -502,6 +502,8 @@ static rpmRC runLuaScript(rpmpsm psm, He
|
||||
{
|
||||
const rpmts ts = psm->ts;
|
||||
int rootFd = -1;
|
||||
+ int chroot_done;
|
||||
+ const char *rootDir;
|
||||
const char *n, *v, *r;
|
||||
rpmRC rc = RPMRC_OK;
|
||||
int i;
|
||||
@@ -511,20 +513,27 @@ static rpmRC runLuaScript(rpmpsm psm, He
|
||||
|
||||
xx = headerNVR(h, &n, &v, &r);
|
||||
|
||||
- if (!rpmtsChrootDone(ts)) {
|
||||
- const char *rootDir = rpmtsRootDir(ts);
|
||||
- xx = chdir("/");
|
||||
+ chroot_done = rpmtsChrootDone(ts);
|
||||
+ rootDir = rpmtsRootDir(ts);
|
||||
+ if (!chroot_done) {
|
||||
+ if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') {
|
||||
+ xx = chdir("/");
|
||||
/*@-nullpass@*/
|
||||
- rootFd = open(".", O_RDONLY, 0);
|
||||
+ rootFd = open(".", O_RDONLY, 0);
|
||||
/*@=nullpass@*/
|
||||
- if (rootFd >= 0) {
|
||||
- /*@-superuser -noeffect @*/
|
||||
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
|
||||
+ if (rootFd >= 0) {
|
||||
+ /*@-superuser -noeffect @*/
|
||||
xx = chroot(rootDir);
|
||||
- /*@=superuser =noeffect @*/
|
||||
- xx = rpmtsSetChrootDone(ts, 1);
|
||||
+ /*@=superuser =noeffect @*/
|
||||
+ xx = rpmtsSetChrootDone(ts, 1);
|
||||
+ }
|
||||
}
|
||||
+ } else {
|
||||
+/*@-nullpass@*/
|
||||
+ rootFd = open(".", O_RDONLY, 0);
|
||||
+/*@=nullpass@*/
|
||||
}
|
||||
+ xx = chdir("/");
|
||||
|
||||
/* Create arg variable */
|
||||
rpmluaPushTable(lua, "arg");
|
||||
@@ -561,14 +570,19 @@ static rpmRC runLuaScript(rpmpsm psm, He
|
||||
rpmluaDelVar(lua, "arg");
|
||||
|
||||
if (rootFd >= 0) {
|
||||
- const char *rootDir = rpmtsRootDir(ts);
|
||||
xx = fchdir(rootFd);
|
||||
xx = close(rootFd);
|
||||
- /*@-superuser -noeffect @*/
|
||||
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
|
||||
+ if (!chroot_done) {
|
||||
+ /*@-superuser -noeffect @*/
|
||||
xx = chroot(".");
|
||||
- /*@=superuser =noeffect @*/
|
||||
- xx = rpmtsSetChrootDone(ts, 0);
|
||||
+ /*@=superuser =noeffect @*/
|
||||
+ xx = rpmtsSetChrootDone(ts, 0);
|
||||
+ }
|
||||
+ }
|
||||
+ if (!chroot_done) {
|
||||
+ const char *currDir = rpmtsCurrDir(ts);
|
||||
+ if (currDir != NULL)
|
||||
+ xx = chdir(currDir);
|
||||
}
|
||||
|
||||
return rc;
|
235
macrosin.diff
235
macrosin.diff
@ -1,6 +1,10 @@
|
||||
--- ./macros.in.orig 2011-01-03 13:57:41.000000000 +0000
|
||||
+++ ./macros.in 2011-05-12 14:32:18.000000000 +0000
|
||||
@@ -178,22 +178,22 @@
|
||||
SUSE specific macro changes.
|
||||
|
||||
Index: macros.in
|
||||
===================================================================
|
||||
--- macros.in.orig
|
||||
+++ macros.in
|
||||
@@ -166,22 +166,22 @@
|
||||
|
||||
# Template for debug information sub-package.
|
||||
%debug_package \
|
||||
@ -12,7 +16,7 @@
|
||||
Group: Development/Debug\
|
||||
AutoReqProv: 0\
|
||||
-%description debug\
|
||||
+#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\
|
||||
+Requires: %{name} = %{version}-%{release}\
|
||||
+%description debuginfo\
|
||||
This package provides debug information for package %{name}.\
|
||||
Debug information is useful when developing applications that use this\
|
||||
@ -23,81 +27,184 @@
|
||||
-%endif\
|
||||
%{nil}
|
||||
|
||||
-%_defaultdocdir %{_datadir}/doc
|
||||
+%_defaultdocdir %{_datadir}/doc/packages
|
||||
+%_docdir_fmt %%{NAME}
|
||||
-%_defaultdocdir %{_usr}/doc
|
||||
+%_defaultdocdir %{_usr}/doc/packages
|
||||
+%_docdir_fmt %%{NAME}
|
||||
|
||||
# The path to the gzip executable (legacy, use %{__gzip} instead).
|
||||
%_gzipbin %{__gzip}
|
||||
@@ -230,7 +230,7 @@ package or when debugging this package.\
|
||||
@@ -218,7 +218,7 @@ package or when debugging this package.\
|
||||
%_tmppath %{_var}/tmp
|
||||
|
||||
# Path to top of build area.
|
||||
-%_topdir %{getenv:HOME}/rpmbuild
|
||||
-%_topdir %{_usrsrc}/redhat
|
||||
+%_topdir %{_usrsrc}/packages
|
||||
|
||||
# The path to the unzip executable (legacy, use %{__unzip} instead).
|
||||
%_unzipbin %{__unzip}
|
||||
@@ -333,7 +333,7 @@ package or when debugging this package.\
|
||||
# "w7.lzdio" lzma-alone level 7, lzma's default
|
||||
@@ -323,7 +323,7 @@ package or when debugging this package.\
|
||||
# "w9.bzdio" bzip2 level 9.
|
||||
#
|
||||
#%_source_payload w9.gzdio
|
||||
-#%_binary_payload w9.gzdio
|
||||
+%_binary_payload w5.lzdio
|
||||
+%_binary_payload w9.bzdio
|
||||
|
||||
# Algorithm to use for generating file checksum digests on build.
|
||||
# If not specified or 0, MD5 is used.
|
||||
@@ -417,7 +417,7 @@ package or when debugging this package.\
|
||||
# The signature to use and the location of configuration files for
|
||||
# signing packages with PGP.
|
||||
@@ -371,7 +371,7 @@ package or when debugging this package.\
|
||||
|
||||
#
|
||||
# Use internal dependency generator rather than external helpers?
|
||||
-%_use_internal_dependency_generator 1
|
||||
+%_use_internal_dependency_generator 1
|
||||
+%_use_internal_dependency_generator 0
|
||||
|
||||
#
|
||||
# Filter GLIBC_PRIVATE Provides: and Requires:
|
||||
@@ -463,16 +463,22 @@ print (t)\
|
||||
# Undefined, missing or %{nil} will use package content (if available).
|
||||
%_verify_file_context_path %{__file_context_path}
|
||||
|
||||
+# maxnum,cuttime,minnum
|
||||
+# 2009/03/01 (SLES11 GA)
|
||||
+%_binarychangelogtrim 0,1235862000,10
|
||||
+
|
||||
#
|
||||
# Path to scripts to autogenerate package dependencies,
|
||||
#
|
||||
@@ -420,20 +420,22 @@ print (t)\
|
||||
# Note: Used iff _use_internal_dependency_generator is zero.
|
||||
#%__find_provides %{_rpmconfigdir}/rpmdeps --provides
|
||||
#%__find_requires %{_rpmconfigdir}/rpmdeps --requires
|
||||
-%__find_provides %{_rpmconfigdir}/find-provides
|
||||
-%__find_requires %{_rpmconfigdir}/find-requires
|
||||
+%__find_provides %{_rpmconfigdir}/find-provides %name
|
||||
+%__find_requires %{_rpmconfigdir}/find-requires %name
|
||||
#%__find_provides @RPMCONFIGDIR@/rpmdeps --provides
|
||||
#%__find_requires @RPMCONFIGDIR@/rpmdeps --requires
|
||||
-%__find_provides @RPMCONFIGDIR@/find-provides
|
||||
-%__find_requires @RPMCONFIGDIR@/find-requires
|
||||
+%__find_provides @RPMCONFIGDIR@/find-provides %name
|
||||
+%__find_requires @RPMCONFIGDIR@/find-requires %name
|
||||
#%__find_conflicts ???
|
||||
#%__find_obsoletes ???
|
||||
+#%__find_supplements ???
|
||||
+#%__find_enhances ???
|
||||
|
||||
#
|
||||
# Path to file attribute classifications for automatic dependency
|
||||
@@ -533,12 +539,12 @@ print (t)\
|
||||
#
|
||||
# Path to scripts to autogenerate per-interpreter package dependencies,
|
||||
#
|
||||
# Note: Used iff _use_internal_dependency_generator is non-zero. The
|
||||
# helpers are also used by @RPMCONFIGDIR@/rpmdeps {--provides|--requires}.
|
||||
-%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides
|
||||
-%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires
|
||||
-#%__perl_provides @RPMCONFIGDIR@/perl.prov
|
||||
-#%__perl_requires @RPMCONFIGDIR@/perl.req
|
||||
+#%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides
|
||||
+#%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires
|
||||
+%__perl_provides @RPMCONFIGDIR@/perl.prov
|
||||
+%__perl_requires @RPMCONFIGDIR@/perl.req
|
||||
|
||||
# Misc BDB tuning options
|
||||
-%__dbi_other mp_mmapsize=128Mb mp_size=64Mb
|
||||
+%__dbi_other mp_mmapsize=128Mb mp_size=64Mb
|
||||
%__python_provides @RPMCONFIGDIR@/pythondeps.sh --provides
|
||||
%__python_requires @RPMCONFIGDIR@/pythondeps.sh --requires
|
||||
@@ -591,15 +593,15 @@ print (t)\
|
||||
%_dbi_config_Packages %{_dbi_htconfig} lockdbfd
|
||||
|
||||
-%_dbi_config %{?__dbi_other}
|
||||
+%_dbi_config %{?__dbi_other} nofsync
|
||||
# "Depends" is a per-transaction cache of known dependency resolutions.
|
||||
-%_dbi_config_Depends %{_dbi_htconfig} temporary private
|
||||
+%_dbi_config_Depends %{_dbi_htconfig} temporary private nofsync
|
||||
|
||||
# "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd".
|
||||
-%_dbi_config_Packages %{?_dbi_config} lockdbfd
|
||||
+%_dbi_config_Packages %{?__dbi_other} lockdbfd
|
||||
-%_dbi_config_Dirnames %{_dbi_btconfig}
|
||||
-%_dbi_config_Requireversion %{_dbi_btconfig}
|
||||
-%_dbi_config_Provideversion %{_dbi_btconfig}
|
||||
-%_dbi_config_Installtid %{_dbi_btconfig}
|
||||
-%_dbi_config_Removetid %{_dbi_btconfig}
|
||||
+%_dbi_config_Dirnames %{_dbi_btconfig} nofsync
|
||||
+%_dbi_config_Requireversion %{_dbi_btconfig} nofsync
|
||||
+%_dbi_config_Provideversion %{_dbi_btconfig} nofsync
|
||||
+%_dbi_config_Installtid %{_dbi_btconfig} nofsync
|
||||
+%_dbi_config_Removetid %{_dbi_btconfig} nofsync
|
||||
|
||||
-%_dbi_config %{_dbi_htconfig}
|
||||
+%_dbi_config %{_dbi_htconfig} nofsync
|
||||
|
||||
# XXX legacy configuration.
|
||||
# Choose db interface:
|
||||
@@ -658,8 +660,8 @@ print (t)\
|
||||
|
||||
# Horowitz Key Protocol server configuration
|
||||
#
|
||||
-%_hkp_keyserver hkp://pgp.mit.edu
|
||||
-%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x
|
||||
+#%_hkp_keyserver hkp://pgp.mit.edu
|
||||
+#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x
|
||||
|
||||
#==============================================================================
|
||||
# ---- GPG/PGP/PGP5 signature macros.
|
||||
@@ -857,7 +863,7 @@ print (t)\
|
||||
# ---- Transaction macros.
|
||||
@@ -767,80 +769,6 @@ print (t)\
|
||||
#
|
||||
# XXX Note: that there cannot be any whitespace within the string "p>q",
|
||||
# and that both p and q are package names (i.e. no version/release).
|
||||
-#
|
||||
-#%_dependency_whiteout_5_2 \
|
||||
-# pam>pamconfig
|
||||
-#%_dependency_whiteout_6_1 \
|
||||
-# pilot-link-devel>pilot-link
|
||||
-#%_dependency_whiteout_6_2 \
|
||||
-# egcs-c++>libstdc++
|
||||
-%_dependency_whiteout_7_0 \
|
||||
- pango-gtkbeta-devel>pango-gtkbeta\
|
||||
- XFree86>Mesa \
|
||||
- compat-glibc>db2 \
|
||||
- compat-glibc>db1 \
|
||||
- pam>initscripts \
|
||||
- initscripts>sysklogd
|
||||
-%_dependency_whiteout_7_1 \
|
||||
- arts>kdelibs-sound
|
||||
-%_dependency_whiteout_7_2 \
|
||||
- libgnomeprint15>gnome-print \
|
||||
- nautilus>nautilus-mozilla \
|
||||
- tcl>postgresql-tcl
|
||||
-#%_dependency_whiteout_8_0 \
|
||||
-# perl>perl-Parse-RecDescent \
|
||||
-# XFree86-libs>XFree86-Mesa-libGL \
|
||||
-# perl>perl-Filter \
|
||||
-# perl>mrtg \
|
||||
-# perl>mod_perl \
|
||||
-# mysql>perl-DBD-MySQL \
|
||||
-# ghostscript>gimp-print \
|
||||
-# arts>kde2-compat \
|
||||
-# perl-Date-Calc>perl-Bit-Vector \
|
||||
-# glibc-debug>glibc-devel
|
||||
-
|
||||
-%_dependency_whiteout_8_0 \
|
||||
- mysql>perl-DBD-MySQL \
|
||||
- perl>perl-Filter \
|
||||
- perl>mrtg \
|
||||
- perl>mod_perl \
|
||||
- perl-Date-Calc>perl-Bit-Vector \
|
||||
-
|
||||
-%_dependency_whiteout_fc3 \
|
||||
- coreutils>pam \
|
||||
- nautilus>nautilus-cd-burner \
|
||||
- aspell>aspell-en \
|
||||
- kernel>initscripts \
|
||||
- kernel-smp>initscripts \
|
||||
- xorg-x11-libs>xorg-x11-Mesa-libGL \
|
||||
- openldap>cyrus-sasl-md5 \
|
||||
- openldap>cyrus-sasl \
|
||||
- openjade>docbook-dtds \
|
||||
- gtk+>gdk-pixbuf \
|
||||
- xorg-x11>xinitrc \
|
||||
- gnome-python2>gnome-python2-bonobo \
|
||||
- httpd-suexec>httpd \
|
||||
- xemacs-sumo>apel-xemacs \
|
||||
- php>php-pear \
|
||||
- openoffice.org-libs>openoffice.org
|
||||
-
|
||||
-%_dependency_whiteout \
|
||||
- libtermcap>bash \
|
||||
- modutils>vixie-cron \
|
||||
- ypbind>yp-tools \
|
||||
- ghostscript-fonts>ghostscript \
|
||||
- %{?_dependency_whiteout_fc3} \
|
||||
- %{?_dependency_whiteout_fc2} \
|
||||
- %{?_dependency_whiteout_fc1} \
|
||||
- %{?_dependency_whiteout_9} \
|
||||
- %{?_dependency_whiteout_8_0} \
|
||||
- %{?_dependency_whiteout_7_2} \
|
||||
- %{?_dependency_whiteout_7_1} \
|
||||
- %{?_dependency_whiteout_7_0} \
|
||||
- %{?_dependency_whiteout_6_2} \
|
||||
- %{?_dependency_whiteout_6_1} \
|
||||
- %{?_dependency_whiteout_5_2} \
|
||||
- %{nil}
|
||||
|
||||
#
|
||||
# Default headerSprintf() output format string for rpm -qa
|
||||
@@ -1093,7 +1021,7 @@ print (t)\
|
||||
%_build_vendor %{_host_vendor}
|
||||
%_build_os %{_host_os}
|
||||
%_host @host@
|
||||
@ -106,10 +213,10 @@
|
||||
%_host_cpu @host_cpu@
|
||||
%_host_vendor @host_vendor@
|
||||
%_host_os @host_os@
|
||||
@@ -1020,6 +1026,181 @@ done \
|
||||
%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
|
||||
%python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")
|
||||
@@ -1250,12 +1178,191 @@ done \
|
||||
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
+# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
|
||||
+#
|
||||
+%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!")
|
||||
@ -285,21 +392,20 @@
|
||||
+run "\\$@"\
|
||||
+EOF
|
||||
+
|
||||
#------------------------------------------------------------------------------
|
||||
+#------------------------------------------------------------------------------
|
||||
# arch macro for all Intel i?86 compatibile processors
|
||||
# (Note: This macro (and it's analogues) will probably be obsoleted when
|
||||
@@ -1030,7 +1211,9 @@ done \
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# arch macro for all supported ARM processors
|
||||
-%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l
|
||||
+%arm armv3l armv4b armv4l armv4tl armv5b armv5l armv5teb armv5tel armv5tejl armv6l armv7l
|
||||
+%arml armv3l armv4l armv5l armv5tel armv6l armv7l
|
||||
# rpm can use regular expressions against target platforms in macro
|
||||
# conditionals.
|
||||
#
|
||||
%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
|
||||
+%arm armv4l armv4b armv5l armv5b armv5tel armv5teb
|
||||
+%arml armv4l armv5l armv5tel
|
||||
+%armb armv4b armv5b armv5teb
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# arch macro for all supported Sparc processors
|
||||
@@ -1070,3 +1253,26 @@ done \
|
||||
#------------------------------------------------------------------------
|
||||
# Use in %install to generate locale specific file lists. For example,
|
||||
@@ -1270,3 +1377,17 @@ done \
|
||||
|
||||
# \endverbatim
|
||||
#*/
|
||||
@ -317,12 +423,3 @@
|
||||
+%info_del() test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
|
||||
+%{nil}
|
||||
+
|
||||
+%service_add() %{fillup_and_insserv %{1}}
|
||||
+%service_del_preun() %{stop_on_removal %{1}}
|
||||
+%service_del_postun() %{restart_on_update %{1}}
|
||||
+
|
||||
+%user_group_add() \
|
||||
+/usr/sbin/groupadd -o -r %{1} 2>/dev/null || :\
|
||||
+/usr/sbin/useradd -o -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} 2>/dev/null || :\
|
||||
+%{nil}
|
||||
+
|
||||
|
@ -1,23 +0,0 @@
|
||||
Allow "magic_and_path" flag to configure that files must
|
||||
match both regexpes to be sent to the dependency generator.
|
||||
|
||||
--- build/rpmfc.c.orig 2011-05-16 10:46:20.000000000 +0000
|
||||
+++ build/rpmfc.c 2011-05-16 11:02:56.000000000 +0000
|
||||
@@ -630,10 +631,13 @@ static void rpmfcAttributes(rpmfc fc, co
|
||||
continue;
|
||||
|
||||
/* Add attributes on libmagic type & path pattern matches */
|
||||
- if (regMatch((*attr)->magic, ftype))
|
||||
- argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name);
|
||||
- if (regMatch((*attr)->path, path))
|
||||
- argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name);
|
||||
+ if ((*attr)->magic && (*attr)->path && hasAttr((*attr)->flags, "magic_and_path")) {
|
||||
+ if (regMatch((*attr)->magic, ftype) && regMatch((*attr)->path, path))
|
||||
+ argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name);
|
||||
+ } else {
|
||||
+ if (regMatch((*attr)->magic, ftype) || regMatch((*attr)->path, path))
|
||||
+ argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
support missingok dependency bit
|
||||
Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
|
||||
|
||||
--- ./lib/depends.c.orig 2011-02-15 13:10:59.000000000 +0000
|
||||
+++ ./lib/depends.c 2011-05-10 16:06:39.000000000 +0000
|
||||
@@ -448,8 +448,13 @@ retry:
|
||||
}
|
||||
--- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000
|
||||
+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000
|
||||
@@ -581,8 +632,13 @@ retry:
|
||||
/*@=boundsread@*/
|
||||
|
||||
unsatisfied:
|
||||
- rc = 1; /* dependency is unsatisfied */
|
||||
@ -17,14 +17,23 @@ support missingok dependency bit
|
||||
+ }
|
||||
|
||||
exit:
|
||||
return rc;
|
||||
--- ./lib/rpmds.h.orig 2011-05-10 16:09:22.000000000 +0000
|
||||
+++ ./lib/rpmds.h 2011-05-10 16:08:04.000000000 +0000
|
||||
@@ -68,6 +68,7 @@ typedef rpmFlags rpmsenseFlags;
|
||||
/*
|
||||
@@ -975,6 +1082,8 @@ static inline /*@observer@*/ const char
|
||||
return "Requires(postun):";
|
||||
if (f & RPMSENSE_SCRIPT_VERIFY)
|
||||
return "Requires(verify):";
|
||||
+ if (f & RPMSENSE_MISSINGOK)
|
||||
+ return "Requires(hint):";
|
||||
if (f & RPMSENSE_FIND_REQUIRES)
|
||||
return "Requires(auto):";
|
||||
return "Requires:";
|
||||
--- ./lib/rpmlib.h.orig 2005-12-15 14:50:30.000000000 +0000
|
||||
+++ ./lib/rpmlib.h 2006-02-03 13:22:27.000000000 +0000
|
||||
@@ -547,6 +561,7 @@ typedef enum rpmsenseFlags_e {
|
||||
RPMSENSE_SCRIPT_POSTUN | \
|
||||
RPMSENSE_SCRIPT_VERIFY | \
|
||||
RPMSENSE_FIND_REQUIRES | \
|
||||
+ RPMSENSE_MISSINGOK | \
|
||||
RPMSENSE_RPMLIB | \
|
||||
RPMSENSE_KEYRING | \
|
||||
RPMSENSE_PRETRANS | \
|
||||
RPMSENSE_SCRIPT_PREP | \
|
||||
RPMSENSE_SCRIPT_BUILD | \
|
||||
RPMSENSE_SCRIPT_INSTALL | \
|
||||
|
@ -1,40 +0,0 @@
|
||||
Module aliases (modinfo -F alias <module>) may contain special characters
|
||||
that rpm does not allow in dependencies, such as commas. Encode those as
|
||||
%XX to avoid generating broken dependencies.
|
||||
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: rpm-4.4.2.3/scripts/find-supplements.ksyms
|
||||
===================================================================
|
||||
--- scripts/find-supplements.ksyms
|
||||
+++ scripts/find-supplements.ksyms
|
||||
@@ -48,6 +48,21 @@ combine_modaliases() {
|
||||
print_modaliases "$class" "$variants" "$pos"
|
||||
}
|
||||
|
||||
+# Encode all characters other than [*:a-zA-Z0-9] in stdin as %XX.
|
||||
+# (This includes the % character itself, which becomes %25.)
|
||||
+hexenc() {
|
||||
+ local line hex
|
||||
+
|
||||
+ while read line; do
|
||||
+ set -- "" "$line"
|
||||
+ while [[ "$2" =~ ([*:a-zA-Z0-9]*)([^*:a-zA-Z0-9])(.*) ]]; do
|
||||
+ hex=$(echo -n "${BASH_REMATCH[2]}" | hexdump -e '"%X"')
|
||||
+ set -- "$1${BASH_REMATCH[1]}%$hex" "${BASH_REMATCH[3]}"
|
||||
+ done
|
||||
+ echo "$1$2"
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
aliases_of_filelist() {
|
||||
modlist=$(mktemp)
|
||||
have_module=1
|
||||
@@ -60,6 +75,7 @@ aliases_of_filelist() {
|
||||
fi
|
||||
have_module=0
|
||||
/sbin/modinfo -F alias "$module" \
|
||||
+ | hexenc \
|
||||
| sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist
|
||||
done
|
||||
if ! test -s "$modlist" && test $have_module = 0; then
|
@ -1,17 +1,15 @@
|
||||
Index: scripts/find-supplements.ksyms
|
||||
===================================================================
|
||||
--- scripts/find-supplements.ksyms.orig
|
||||
--- scripts/find-supplements.ksyms
|
||||
+++ scripts/find-supplements.ksyms
|
||||
@@ -1,6 +1,8 @@
|
||||
@@ -1,5 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
+SPECFILE=${RPMBUILD_SPECFILE:-/usr/src/packages/SOURCES/$1.spec}
|
||||
+RPM_SOURCE_DIR=/usr/src/packages/SOURCES
|
||||
IFS=$'\n'
|
||||
+PACKAGE=$1
|
||||
|
||||
case "$1" in
|
||||
kernel-module-*) ;; # Fedora kernel module package names start with
|
||||
@@ -46,11 +48,54 @@ combine_modaliases() {
|
||||
@@ -46,11 +47,43 @@ combine_modaliases() {
|
||||
print_modaliases "$class" "$variants" "$pos"
|
||||
}
|
||||
|
||||
@ -22,23 +20,12 @@ Index: scripts/find-supplements.ksyms
|
||||
- | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p"
|
||||
-done \
|
||||
+aliases_of_filelist() {
|
||||
+ modlist=$(mktemp)
|
||||
+ have_module=1
|
||||
+ for module in $(grep -E '/lib/modules/.+\.ko$'); do
|
||||
+ vermagic=$(/sbin/modinfo -F vermagic "$module")
|
||||
+ krel=${vermagic%% *}
|
||||
+ if ! test -x /sbin/modinfo; then
|
||||
+ echo "ERROR: add module-init-tools to BuildRequires" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ have_module=0
|
||||
+ /sbin/modinfo -F alias "$module" \
|
||||
+ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist
|
||||
+ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p"
|
||||
+ done
|
||||
+ if ! test -s "$modlist" && test $have_module = 0; then
|
||||
+ echo "packageand(kernel-${krel##*-}:$PACKAGE)"
|
||||
+ fi
|
||||
+ rm -f $modlist
|
||||
+}
|
||||
+
|
||||
+aliases_of_specfile_macro() {
|
||||
@ -47,7 +34,7 @@ Index: scripts/find-supplements.ksyms
|
||||
+ regex=$(
|
||||
+ set -o noglob
|
||||
+ set -- $(sed -ne 's:^%supplements_kernel_module[ \t]::p' \
|
||||
+ $SPECFILE)
|
||||
+ $RPM_SOURCE_DIR/$1.spec)
|
||||
+ while [ $# -ge 1 ]; do
|
||||
+ regex=$(echo "$1" \
|
||||
+ | sed -e 's:[.]:\\.:g' \
|
||||
|
@ -1,29 +1,28 @@
|
||||
--- ./macros.in.orig 2011-05-11 14:57:08.000000000 +0000
|
||||
+++ ./macros.in 2011-05-11 15:01:39.000000000 +0000
|
||||
@@ -470,14 +470,18 @@ print (t)\
|
||||
#
|
||||
# Path to scripts to autogenerate package dependencies,
|
||||
#
|
||||
+%__set_helper_env %{lua:
|
||||
+posix.setenv("RPMBUILD_SPECFILE",rpm.expand("%?_specfile"));
|
||||
+posix.setenv("RPMBUILD_SOURCEDIR",rpm.expand("%?_sourcedir"));
|
||||
+}
|
||||
# Note: Used iff _use_internal_dependency_generator is zero.
|
||||
#%__find_provides %{_rpmconfigdir}/rpmdeps --provides
|
||||
#%__find_requires %{_rpmconfigdir}/rpmdeps --requires
|
||||
-%__find_provides %{_rpmconfigdir}/find-provides %name
|
||||
-%__find_requires %{_rpmconfigdir}/find-requires %name
|
||||
+%__find_provides %{__set_helper_env}%{_rpmconfigdir}/find-provides %name
|
||||
+%__find_requires %{__set_helper_env}%{_rpmconfigdir}/find-requires %name
|
||||
#%__find_conflicts ???
|
||||
#%__find_obsoletes ???
|
||||
-#%__find_supplements ???
|
||||
+%__find_supplements %{__set_helper_env}%{_rpmconfigdir}/find-supplements %name
|
||||
#%__find_enhances ???
|
||||
|
||||
#
|
||||
--- ./scripts/find-supplements.ksyms.orig 2011-05-11 15:01:39.000000000 +0000
|
||||
+++ ./scripts/find-supplements.ksyms 2011-05-11 15:01:39.000000000 +0000
|
||||
SUSE specific find-supplements, used for kernel builds
|
||||
|
||||
Index: ./scripts/find-supplements
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ ./scripts/find-supplements
|
||||
@@ -0,0 +1,14 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+# This script reads filenames from STDIN and outputs any relevant provides
|
||||
+# information that needs to be included in the package.
|
||||
+IFS=$'\n'
|
||||
+filelist=($(cat))
|
||||
+
|
||||
+#
|
||||
+# --- Kernel module hardware identifiers
|
||||
+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*)
|
||||
+[ -x /usr/lib/rpm/find-supplements.ksyms ] &&
|
||||
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@"
|
||||
+
|
||||
+exit 0
|
||||
Index: ./scripts/find-supplements.ksyms
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ ./scripts/find-supplements.ksyms
|
||||
@@ -0,0 +1,56 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
@ -81,20 +80,16 @@
|
||||
+done \
|
||||
+| sort -u \
|
||||
+| combine_modaliases
|
||||
--- ./scripts/find-supplements.orig 2011-05-11 15:01:39.000000000 +0000
|
||||
+++ ./scripts/find-supplements 2011-05-11 15:01:39.000000000 +0000
|
||||
@@ -0,0 +1,14 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+# This script reads filenames from STDIN and outputs any relevant provides
|
||||
+# information that needs to be included in the package.
|
||||
+IFS=$'\n'
|
||||
+filelist=($(cat))
|
||||
+
|
||||
+#
|
||||
+# --- Kernel module hardware identifiers
|
||||
+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*)
|
||||
+[ -x /usr/lib/rpm/find-supplements.ksyms ] &&
|
||||
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@"
|
||||
+
|
||||
+exit 0
|
||||
Index: ./macros.in
|
||||
===================================================================
|
||||
--- ./macros.in
|
||||
+++ ./macros.in
|
||||
@@ -424,7 +424,7 @@ print (t)\
|
||||
%__find_requires @RPMCONFIGDIR@/find-requires %name
|
||||
#%__find_conflicts ???
|
||||
#%__find_obsoletes ???
|
||||
-#%__find_supplements ???
|
||||
+%__find_supplements @RPMCONFIGDIR@/find-supplements %name
|
||||
#%__find_enhances ???
|
||||
|
||||
#
|
||||
|
@ -1,10 +1,10 @@
|
||||
Also compare the name and not only the version when checking if
|
||||
two packages are the same. rh#104066
|
||||
|
||||
--- ./lib/depends.c.orig 2011-05-12 12:20:01.000000000 +0000
|
||||
+++ ./lib/depends.c 2011-05-12 12:26:25.000000000 +0000
|
||||
@@ -95,6 +95,24 @@ static rpmdbMatchIterator rpmtsPrunedIte
|
||||
return mi;
|
||||
--- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000
|
||||
+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000
|
||||
@@ -124,6 +124,24 @@ static int removePackage(rpmts ts, Heade
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int rpmNameVersionCompare(Header first, Header second)
|
||||
@ -12,23 +12,23 @@ two packages are the same. rh#104066
|
||||
+ const char * one, * two;
|
||||
+ int rc;
|
||||
+
|
||||
+ one = headerGetString(first, RPMTAG_NAME);
|
||||
+ two = headerGetString(second, RPMTAG_NAME);
|
||||
+ rc = headerGetEntry(first, RPMTAG_NAME, NULL, (void **) &one, NULL);
|
||||
+ rc = headerGetEntry(second, RPMTAG_NAME, NULL, (void **) &two, NULL);
|
||||
+ rc = strcmp(one, two);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+ one = headerGetString(first, RPMTAG_ARCH);
|
||||
+ two = headerGetString(second, RPMTAG_ARCH);
|
||||
+ rc = headerGetEntry(first, RPMTAG_ARCH, NULL, (void **) &one, NULL);
|
||||
+ rc = headerGetEntry(second, RPMTAG_ARCH, NULL, (void **) &two, NULL);
|
||||
+ rc = strcmp(one, two);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+ return rpmVersionCompare(first, second);
|
||||
+}
|
||||
+
|
||||
#define skipColor(_tscolor, _color, _ocolor) \
|
||||
((_tscolor) && (_color) && (_ocolor) && !((_color) & (_ocolor)))
|
||||
|
||||
@@ -111,7 +129,7 @@ static void addUpgradeErasures(rpmts ts,
|
||||
int rpmtsAddInstallElement(rpmts ts, Header h,
|
||||
fnpyKey key, int upgrade, rpmRelocation * relocs)
|
||||
{
|
||||
@@ -303,7 +322,7 @@ addheader:
|
||||
continue;
|
||||
|
||||
/* Skip packages that contain identical NEVR. */
|
||||
@ -36,13 +36,18 @@ two packages are the same. rh#104066
|
||||
+ if (rpmNameVersionCompare(h, oh) == 0)
|
||||
continue;
|
||||
|
||||
removePackage(ts, oh, p);
|
||||
@@ -150,7 +168,7 @@ static void addObsoleteErasures(rpmts ts
|
||||
xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey);
|
||||
@@ -354,11 +373,9 @@ addheader:
|
||||
* If no obsoletes version info is available, match all names.
|
||||
*/
|
||||
if (rpmdsEVR(obsoletes) == NULL
|
||||
- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
||||
+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
||||
char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA);
|
||||
rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n",
|
||||
rpmdsDNEVR(obsoletes)+2, ohNEVRA);
|
||||
- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
||||
+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
||||
const char * ohNEVRA = hGetNEVRA(oh, NULL);
|
||||
-#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */
|
||||
- if (rpmVersionCompare(h, oh))
|
||||
-#endif
|
||||
+ if (rpmNameVersionCompare(h, oh))
|
||||
xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey);
|
||||
/*@-nullptrarith@*/
|
||||
rpmMessage(RPMMESS_DEBUG, _(" Obsoletes: %s\t\terases %s\n"),
|
||||
|
@ -1,12 +0,0 @@
|
||||
It seems to be gone...
|
||||
|
||||
--- lib/Makefile.am.orig 2011-05-12 12:59:42.000000000 +0000
|
||||
+++ lib/Makefile.am 2011-05-12 12:59:59.000000000 +0000
|
||||
@@ -126,7 +126,6 @@ rpmdb_printlog_LDADD = \
|
||||
$(top_builddir)/db3/fileops_autop.o \
|
||||
$(top_builddir)/db3/hash_autop.o \
|
||||
$(top_builddir)/db3/qam_autop.o \
|
||||
- $(top_builddir)/db3/rep_autop.o \
|
||||
$(top_builddir)/db3/txn_autop.o \
|
||||
$(top_builddir)/db3/util_sig.o \
|
||||
librpm.la
|
@ -1,13 +0,0 @@
|
||||
Disable file coloring for SUSE systems
|
||||
|
||||
--- build/rpmfc.c.orig 2011-05-13 12:35:29.000000000 +0000
|
||||
+++ build/rpmfc.c 2011-05-13 13:49:37.000000000 +0000
|
||||
@@ -1312,7 +1312,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
|
||||
goto exit;
|
||||
|
||||
/* Add per-file colors(#files) */
|
||||
- if (rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) {
|
||||
+ if (rpmExpandNumeric("%{?_transaction_color}") != 0 && rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) {
|
||||
rpm_color_t *fcolor;
|
||||
assert(rpmtdType(&td) == RPM_INT32_TYPE);
|
||||
/* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */
|
15
nodefattr.diff
Normal file
15
nodefattr.diff
Normal file
@ -0,0 +1,15 @@
|
||||
Revert upstream patch that always uses %defattr(-,root,root).
|
||||
Upstream should probably use a macro instead.
|
||||
|
||||
--- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000
|
||||
+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000
|
||||
@@ -2000,7 +2012,9 @@ static int processPackageFiles(Spec spec
|
||||
|
||||
nullAttrRec(&fl.cur_ar);
|
||||
nullAttrRec(&fl.def_ar);
|
||||
+#if 0
|
||||
dupAttrRec(&root_ar, &fl.def_ar); /* XXX assume %defattr(-,root,root) */
|
||||
+#endif
|
||||
|
||||
fl.defVerifyFlags = RPMVERIFY_ALL;
|
||||
fl.nLangs = 0;
|
83
nolua.diff
Normal file
83
nolua.diff
Normal file
@ -0,0 +1,83 @@
|
||||
Allow build without lua support.
|
||||
|
||||
--- ./build/parseScript.c.orig 2005-12-16 18:34:36.000000000 +0000
|
||||
+++ ./build/parseScript.c 2005-12-16 18:36:08.000000000 +0000
|
||||
@@ -283,6 +283,7 @@ int parseScript(Spec spec, int parsePart
|
||||
stripTrailingBlanksStringBuf(sb);
|
||||
p = getStringBuf(sb);
|
||||
|
||||
+#ifdef WITH_LUA
|
||||
if (!strcmp(progArgv[0], "<lua>")) {
|
||||
rpmlua lua = NULL; /* Global state. */
|
||||
if (rpmluaCheckScript(lua, p, partname) != RPMRC_OK) {
|
||||
@@ -291,7 +292,9 @@ int parseScript(Spec spec, int parsePart
|
||||
}
|
||||
(void) rpmlibNeedsFeature(pkg->header,
|
||||
"BuiltinLuaScripts", "4.2.2-1");
|
||||
- } else if (progArgv[0][0] == '<') {
|
||||
+ } else
|
||||
+#endif
|
||||
+ if (progArgv[0][0] == '<') {
|
||||
rpmError(RPMERR_BADSPEC,
|
||||
_("line %d: unsupported internal script: %s\n"),
|
||||
spec->lineNum, progArgv[0]);
|
||||
--- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000
|
||||
+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000
|
||||
@@ -490,6 +490,7 @@ static pid_t psmWait(rpmpsm psm)
|
||||
return psm->sq.reaped;
|
||||
}
|
||||
|
||||
+#ifdef WITH_LUA
|
||||
/**
|
||||
* Run internal Lua script.
|
||||
*/
|
||||
@@ -572,6 +573,7 @@ static rpmRC runLuaScript(rpmpsm psm, He
|
||||
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**
|
||||
*/
|
||||
@@ -637,11 +639,15 @@ static rpmRC runScript(rpmpsm psm, Heade
|
||||
xx = hge(h, RPMTAG_ARCH, NULL, (void **) &a, NULL);
|
||||
|
||||
if (progArgv && strcmp(progArgv[0], "<lua>") == 0) {
|
||||
+#ifdef WITH_LUA
|
||||
rpmMessage(RPMMESS_DEBUG,
|
||||
_("%s: %s(%s-%s-%s.%s) running <lua> scriptlet.\n"),
|
||||
psm->stepName, tag2sln(psm->scriptTag), n, v, r, a);
|
||||
return runLuaScript(psm, h, sln, progArgc, progArgv,
|
||||
script, arg1, arg2);
|
||||
+#else
|
||||
+ return RPMRC_FAIL;
|
||||
+#endif
|
||||
}
|
||||
|
||||
psm->sq.reaper = 1;
|
||||
--- ./lib/rpmlibprov.c.orig 2004-03-16 21:58:29.000000000 +0000
|
||||
+++ ./lib/rpmlibprov.c 2006-06-14 13:52:46.000000000 +0000
|
||||
@@ -51,9 +54,11 @@ static struct rpmlibProvides_s rpmlibPro
|
||||
{ "rpmlib(ConcurrentAccess)", "4.1-1",
|
||||
( RPMSENSE_EQUAL),
|
||||
N_("package scriptlets may access the rpm database while installing.") },
|
||||
+#ifdef WITH_LUA
|
||||
{ "rpmlib(BuiltinLuaScripts)", "4.2.2-1",
|
||||
( RPMSENSE_EQUAL),
|
||||
N_("internal support for lua scripts.") },
|
||||
+#endif
|
||||
{ NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
--- ./lib/rpmrc.c.orig 2005-01-17 18:46:23.000000000 +0000
|
||||
+++ ./lib/rpmrc.c 2005-12-16 18:30:29.000000000 +0000
|
||||
@@ -1883,7 +1873,9 @@ int rpmReadConfigFiles(const char * file
|
||||
}
|
||||
|
||||
/* Force Lua state initialization */
|
||||
+#ifdef WITH_LUA
|
||||
(void)rpmluaGetPrintBuffer(NULL);
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
Don't let rpm complain about a missing /etc/magic.mgc file
|
||||
|
||||
--- build/rpmfc.c.orig 2011-05-13 16:33:20.000000000 +0000
|
||||
+++ build/rpmfc.c 2011-05-13 16:33:55.000000000 +0000
|
||||
@@ -896,7 +896,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg
|
||||
{
|
||||
ARGV_t fcav = NULL;
|
||||
int xx;
|
||||
- int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
|
||||
+ int msflags = MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
|
||||
magic_t ms = NULL;
|
||||
rpmRC rc = RPMRC_FAIL;
|
||||
|
292
noneon.diff
Normal file
292
noneon.diff
Normal file
@ -0,0 +1,292 @@
|
||||
Allow build without the neon library. Resurrects old httpOpen
|
||||
code from rpm-4.1.1.
|
||||
Building without neon means no webdav file uploads, though.
|
||||
|
||||
--- ./rpmio/rpmdav.c.orig 2005-12-16 18:04:29.000000000 +0000
|
||||
+++ ./rpmio/rpmdav.c 2005-12-16 18:17:53.000000000 +0000
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
+#ifdef WITH_NEON
|
||||
+
|
||||
#include "ne_alloc.h"
|
||||
#include "ne_auth.h"
|
||||
#include "ne_basic.h"
|
||||
@@ -27,6 +29,8 @@
|
||||
#include "ne_string.h"
|
||||
#include "ne_utils.h"
|
||||
|
||||
+#endif /* WITH_NEON */
|
||||
+
|
||||
#include <rpmio_internal.h>
|
||||
|
||||
#define _RPMDAV_INTERNAL
|
||||
@@ -61,6 +65,8 @@ _free(/*@only@*/ /*@null@*/ /*@out@*/ co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+#ifdef WITH_NEON
|
||||
+
|
||||
/* =============================================================== */
|
||||
static int davFree(urlinfo u)
|
||||
/*@globals internalState @*/
|
||||
@@ -1370,6 +1376,8 @@ fprintf(stderr, "*** davReadlink(%s) rc
|
||||
}
|
||||
#endif /* NOTYET */
|
||||
|
||||
+#endif /* WITH_NEON */
|
||||
+
|
||||
/* =============================================================== */
|
||||
/*@unchecked@*/
|
||||
int avmagicdir = 0x3607113;
|
||||
@@ -1494,6 +1502,8 @@ fprintf(stderr, "*** avOpendir(%s)\n", p
|
||||
}
|
||||
/*@=boundswrite@*/
|
||||
|
||||
+#ifdef WITH_NEON
|
||||
+
|
||||
/* =============================================================== */
|
||||
/*@unchecked@*/
|
||||
int davmagicdir = 0x8440291;
|
||||
@@ -1661,4 +1671,6 @@ fprintf(stderr, "*** davOpendir(%s)\n",
|
||||
return (DIR *) avdir;
|
||||
/*@=kepttrans@*/
|
||||
}
|
||||
+
|
||||
+#endif /* WITH_NEON */
|
||||
/*@=modfilesys@*/
|
||||
--- ./rpmio/rpmio.c.orig 2005-01-26 03:39:58.000000000 +0000
|
||||
+++ ./rpmio/rpmio.c 2005-12-16 17:51:19.000000000 +0000
|
||||
@@ -371,7 +371,11 @@ static ssize_t fdRead(void * cookie, /*@
|
||||
/*@-boundswrite@*/
|
||||
/* HACK: flimsy wiring for davRead */
|
||||
if (fd->req != NULL) {
|
||||
+#ifdef WITH_NEON
|
||||
rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
|
||||
+#else
|
||||
+ rc = -1;
|
||||
+#endif
|
||||
/* XXX Chunked davRead EOF. */
|
||||
if (rc == 0)
|
||||
fd->bytesRemain = 0;
|
||||
@@ -404,9 +408,13 @@ static ssize_t fdWrite(void * cookie, co
|
||||
fdstat_enter(fd, FDSTAT_WRITE);
|
||||
/*@-boundsread@*/
|
||||
/* HACK: flimsy wiring for davWrite */
|
||||
- if (fd->req != NULL)
|
||||
+ if (fd->req != NULL) {
|
||||
+#ifdef WITH_NEON
|
||||
rc = davWrite(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
|
||||
- else
|
||||
+#else
|
||||
+ return -1;
|
||||
+#endif
|
||||
+ } else
|
||||
rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
|
||||
/*@=boundsread@*/
|
||||
fdstat_exit(fd, FDSTAT_WRITE, rc);
|
||||
@@ -455,9 +463,13 @@ static int fdClose( /*@only@*/ void * co
|
||||
fdstat_enter(fd, FDSTAT_CLOSE);
|
||||
/* HACK: flimsy wiring for davClose */
|
||||
/*@-branchstate@*/
|
||||
- if (fd->req != NULL)
|
||||
+ if (fd->req != NULL) {
|
||||
+#ifdef WITH_NEON
|
||||
rc = davClose(fd);
|
||||
- else
|
||||
+#else
|
||||
+ return -1;
|
||||
+#endif
|
||||
+ } else
|
||||
rc = ((fdno >= 0) ? close(fdno) : -2);
|
||||
/*@=branchstate@*/
|
||||
fdstat_exit(fd, FDSTAT_CLOSE, rc);
|
||||
@@ -2029,6 +2041,56 @@ exit:
|
||||
}
|
||||
/*@=nullstate@*/
|
||||
|
||||
+#ifndef WITH_NEON
|
||||
+/*@-nullstate@*/ /* FIX: u->{ctrl,data}->url undef after XurlLink. */
|
||||
+static /*@null@*/ FD_t httpOpen(const char * url, /*@unused@*/ int flags,
|
||||
+ /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
|
||||
+ /*@globals internalState @*/
|
||||
+ /*@modifies *uret, internalState @*/
|
||||
+{
|
||||
+ urlinfo u = NULL;
|
||||
+ FD_t fd = NULL;
|
||||
+
|
||||
+#if 0 /* XXX makeTempFile() heartburn */
|
||||
+ assert(!(flags & O_RDWR));
|
||||
+#endif
|
||||
+ if (urlSplit(url, &u))
|
||||
+ goto exit;
|
||||
+
|
||||
+ if (u->ctrl == NULL)
|
||||
+ u->ctrl = fdNew("persist ctrl (httpOpen)");
|
||||
+ if (u->ctrl->nrefs > 2 && u->data == NULL)
|
||||
+ u->data = fdNew("persist data (httpOpen)");
|
||||
+
|
||||
+ if (u->ctrl->url == NULL)
|
||||
+ fd = fdLink(u->ctrl, "grab ctrl (httpOpen persist ctrl)");
|
||||
+ else if (u->data->url == NULL)
|
||||
+ fd = fdLink(u->data, "grab ctrl (httpOpen persist data)");
|
||||
+ else
|
||||
+ fd = fdNew("grab ctrl (httpOpen)");
|
||||
+
|
||||
+ if (fd) {
|
||||
+ fdSetIo(fd, ufdio);
|
||||
+ fd->ftpFileDoneNeeded = 0;
|
||||
+ fd->rd_timeoutsecs = httpTimeoutSecs;
|
||||
+ fd->contentLength = fd->bytesRemain = -1;
|
||||
+ fd->url = urlLink(u, "url (httpOpen)");
|
||||
+ fd = fdLink(fd, "grab data (httpOpen)");
|
||||
+ fd->urlType = URL_IS_HTTP;
|
||||
+ }
|
||||
+
|
||||
+exit:
|
||||
+/*@-boundswrite@*/
|
||||
+ if (uret)
|
||||
+ *uret = u;
|
||||
+/*@=boundswrite@*/
|
||||
+ /*@-refcounttrans@*/
|
||||
+ return fd;
|
||||
+ /*@=refcounttrans@*/
|
||||
+}
|
||||
+/*@=nullstate@*/
|
||||
+#endif
|
||||
+
|
||||
static /*@null@*/ FD_t ufdOpen(const char * url, int flags, mode_t mode)
|
||||
/*@globals h_errno, fileSystem, internalState @*/
|
||||
/*@modifies fileSystem, internalState @*/
|
||||
@@ -2067,7 +2129,11 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
case URL_IS_HKP:
|
||||
+#ifdef WITH_NEON
|
||||
fd = davOpen(url, flags, mode, &u);
|
||||
+#else
|
||||
+ fd = httpOpen(url, flags, mode, &u);
|
||||
+#endif
|
||||
if (fd == NULL || u == NULL)
|
||||
break;
|
||||
|
||||
@@ -2075,7 +2141,11 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o
|
||||
? ((flags & O_APPEND) ? "PUT" :
|
||||
((flags & O_CREAT) ? "PUT" : "PUT"))
|
||||
: "GET");
|
||||
+#ifdef WITH_NEON
|
||||
u->openError = davReq(fd, cmd, path);
|
||||
+#else
|
||||
+ u->openError = httpReq(fd, cmd, path);
|
||||
+#endif
|
||||
if (u->openError < 0) {
|
||||
/* XXX make sure that we can exit through ufdClose */
|
||||
fd = fdLink(fd, "error ctrl (ufdOpen HTTP)");
|
||||
--- ./rpmio/rpmrpc.c.orig 2005-12-16 15:01:26.000000000 +0000
|
||||
+++ ./rpmio/rpmrpc.c 2006-02-13 18:55:39.000000000 +0000
|
||||
@@ -93,7 +93,9 @@ int Mkdir (const char * path, mode_t mod
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davMkdir(path, mode);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_PATH:
|
||||
path = lpath;
|
||||
@@ -151,7 +153,9 @@ int Rmdir (const char * path)
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davRmdir(path);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_PATH:
|
||||
path = lpath;
|
||||
@@ -182,7 +186,9 @@ int Rename (const char * oldpath, const
|
||||
switch (oldut) {
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davRename(oldpath, newpath);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_FTP: /* XXX WRONG WRONG WRONG */
|
||||
case URL_IS_PATH:
|
||||
@@ -280,7 +286,9 @@ int Unlink(const char * path) {
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davUnlink(path);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_PATH:
|
||||
path = lpath;
|
||||
@@ -1282,7 +1290,9 @@ fprintf(stderr, "*** Stat(%s,%p)\n", pat
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davStat(path, st);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_PATH:
|
||||
path = lpath;
|
||||
@@ -1311,7 +1321,9 @@ fprintf(stderr, "*** Lstat(%s,%p)\n", pa
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davLstat(path, st);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_PATH:
|
||||
path = lpath;
|
||||
@@ -1489,7 +1502,9 @@ fprintf(stderr, "*** Opendir(%s)\n", pat
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_HTTPS:
|
||||
case URL_IS_HTTP:
|
||||
+#ifdef WITH_NEON
|
||||
return davOpendir(path);
|
||||
+#endif
|
||||
/*@notreached@*/ break;
|
||||
case URL_IS_PATH:
|
||||
path = lpath;
|
||||
@@ -1515,8 +1530,10 @@ fprintf(stderr, "*** Readdir(%p)\n", (vo
|
||||
return NULL;
|
||||
if (ISAVMAGIC(dir))
|
||||
return avReaddir(dir);
|
||||
+#ifdef WITH_NEON
|
||||
if (ISDAVMAGIC(dir))
|
||||
return davReaddir(dir);
|
||||
+#endif
|
||||
return readdir(dir);
|
||||
}
|
||||
|
||||
@@ -1528,8 +1545,10 @@ fprintf(stderr, "*** Closedir(%p)\n", (v
|
||||
return 0;
|
||||
if (ISAVMAGIC(dir))
|
||||
return avClosedir(dir);
|
||||
+#ifdef WITH_NEON
|
||||
if (ISDAVMAGIC(dir))
|
||||
return davClosedir(dir);
|
||||
+#endif
|
||||
return closedir(dir);
|
||||
}
|
||||
|
||||
--- ./rpmio/url.c.orig 2005-12-16 15:24:25.000000000 +0000
|
||||
+++ ./rpmio/url.c 2005-12-16 17:08:21.000000000 +0000
|
||||
@@ -147,8 +147,10 @@ URLDBGREFS(0, (stderr, "--> url %p -- %d
|
||||
/*@=usereleased@*/
|
||||
}
|
||||
if (u->sess != NULL) {
|
||||
+#ifdef WITH_NEON
|
||||
/* HACK: neon include has prototype. */
|
||||
ne_session_destroy(u->sess);
|
||||
+#endif
|
||||
u->sess = NULL;
|
||||
}
|
||||
u->buf = _free(u->buf);
|
@ -1,22 +0,0 @@
|
||||
Not deprecated for SUSE builds.
|
||||
|
||||
--- ./build/parsePreamble.c.orig 2011-05-11 15:59:08.000000000 +0000
|
||||
+++ ./build/parsePreamble.c 2011-05-11 16:35:47.000000000 +0000
|
||||
@@ -891,7 +891,7 @@ static struct PreambleRec_s const preamb
|
||||
{RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
|
||||
{RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
|
||||
{RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")},
|
||||
- {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")},
|
||||
+ {RPMTAG_PREREQ, 2, 0, LEN_AND_STR("prereq")},
|
||||
{RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
|
||||
{RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
|
||||
{RPMTAG_PREFIXES, 0, 0, LEN_AND_STR("prefixes")},
|
||||
@@ -900,7 +900,7 @@ static struct PreambleRec_s const preamb
|
||||
{RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarchitectures")},
|
||||
{RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarch")},
|
||||
{RPMTAG_BUILDCONFLICTS, 0, 0, LEN_AND_STR("buildconflicts")},
|
||||
- {RPMTAG_BUILDPREREQ, 0, 1, LEN_AND_STR("buildprereq")},
|
||||
+ {RPMTAG_BUILDPREREQ, 0, 0, LEN_AND_STR("buildprereq")},
|
||||
{RPMTAG_BUILDREQUIRES, 0, 0, LEN_AND_STR("buildrequires")},
|
||||
{RPMTAG_AUTOREQPROV, 0, 0, LEN_AND_STR("autoreqprov")},
|
||||
{RPMTAG_AUTOREQ, 0, 0, LEN_AND_STR("autoreq")},
|
13
nostdoutclose.diff
Normal file
13
nostdoutclose.diff
Normal file
@ -0,0 +1,13 @@
|
||||
Do not close stdout for scriptlets.
|
||||
|
||||
--- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000
|
||||
+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000
|
||||
@@ -829,7 +837,7 @@ static rpmRC runScript(rpmpsm psm, Heade
|
||||
xx = Fclose (out);
|
||||
if (sfdno > STDERR_FILENO)
|
||||
xx = Fclose (scriptFd);
|
||||
- else {
|
||||
+ else if (Fileno(out) > STDERR_FILENO) {
|
||||
/*@-usereleased@*/
|
||||
xx = Fclose(out);
|
||||
/*@=usereleased@*/
|
14
obeynodbsync.diff
Normal file
14
obeynodbsync.diff
Normal file
@ -0,0 +1,14 @@
|
||||
Make rpmdbSync obey the no_dbsync flag
|
||||
|
||||
--- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000
|
||||
+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000
|
||||
/*@=incondefs@*/
|
||||
@@ -906,6 +937,8 @@ int rpmdbSync(rpmdb db)
|
||||
int xx;
|
||||
if (db->_dbi[dbix] == NULL)
|
||||
continue;
|
||||
+ if (db->_dbi[dbix]->dbi_no_dbsync)
|
||||
+ continue;
|
||||
xx = dbiSync(db->_dbi[dbix], 0);
|
||||
if (xx && rc == 0) rc = xx;
|
||||
}
|
55
openallbuttemp.diff
Normal file
55
openallbuttemp.diff
Normal file
@ -0,0 +1,55 @@
|
||||
Open all rpm databases before doing chroot. [#43266], [#44584]
|
||||
rh#103852
|
||||
|
||||
Already in rpm-4.4.7, configurable with a macro (for whatever reason).
|
||||
|
||||
--- ./lib/transaction.c.orig 2005-12-14 21:15:40.000000000 +0000
|
||||
+++ ./lib/transaction.c 2006-01-27 20:05:40.000000000 +0000
|
||||
@@ -1677,8 +1859,10 @@ rpmMessage(RPMMESS_DEBUG, _("computing %
|
||||
const char * rootDir = rpmtsRootDir(ts);
|
||||
xx = chdir("/");
|
||||
/*@-superuser -noeffect @*/
|
||||
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
|
||||
+ if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') {
|
||||
+ rpmdbOpenAllButTemporary(ts->rdb);
|
||||
xx = chroot(rootDir);
|
||||
+ }
|
||||
/*@=superuser =noeffect @*/
|
||||
(void) rpmtsSetChrootDone(ts, 1);
|
||||
}
|
||||
--- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000
|
||||
+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000
|
||||
@@ -811,6 +811,33 @@ int rpmdbOpenAll(rpmdb db)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+int rpmdbOpenAllButTemporary(rpmdb db)
|
||||
+{
|
||||
+ int dbix;
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ if (db == NULL) return -2;
|
||||
+
|
||||
+ if (dbiTags != NULL)
|
||||
+ for (dbix = 0; dbix < dbiTagsMax; dbix++) {
|
||||
+ if (db->_dbi[dbix] != NULL)
|
||||
+ continue;
|
||||
+ /* Filter out temporary databases */
|
||||
+ switch ((dbiTags[dbix])) {
|
||||
+ case RPMDBI_AVAILABLE:
|
||||
+ case RPMDBI_ADDED:
|
||||
+ case RPMDBI_REMOVED:
|
||||
+ case RPMDBI_DEPENDS:
|
||||
+ continue;
|
||||
+ /*@notreached@*/ /*@switchbreak@*/ break;
|
||||
+ default:
|
||||
+ /*@switchbreak@*/ break;
|
||||
+ }
|
||||
+ (void) dbiOpen(db, dbiTags[dbix], db->db_flags);
|
||||
+ }
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
int rpmdbCloseDBI(rpmdb db, int rpmtag)
|
||||
{
|
||||
int dbix;
|
743
patchrpms.diff
Normal file
743
patchrpms.diff
Normal file
@ -0,0 +1,743 @@
|
||||
Add support for patch rpms. Maybe not needed that much any more,
|
||||
as delta rpms are more efficient and do not need so much evil
|
||||
rpm patchery.
|
||||
rh#103205
|
||||
|
||||
Index: lib/depends.c
|
||||
===================================================================
|
||||
--- lib/depends.c.orig
|
||||
+++ lib/depends.c
|
||||
@@ -159,6 +159,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea
|
||||
const char * os;
|
||||
rpmds oldChk, newChk;
|
||||
rpmds obsoletes;
|
||||
+ rpmds patches;
|
||||
alKey pkgKey; /* addedPackages key */
|
||||
int xx;
|
||||
int ec = 0;
|
||||
@@ -387,6 +388,40 @@ addheader:
|
||||
}
|
||||
obsoletes = rpmdsFree(obsoletes);
|
||||
|
||||
+ patches = rpmdsLink(rpmteDS(p, RPMTAG_PATCHESNAME), "Patches");
|
||||
+ patches = rpmdsInit(patches);
|
||||
+ if (patches != NULL)
|
||||
+ while (rpmdsNext(patches) >= 0) {
|
||||
+ const char * Name;
|
||||
+
|
||||
+ if ((Name = rpmdsN(patches)) == NULL)
|
||||
+ continue; /* XXX can't happen */
|
||||
+
|
||||
+ /* Ignore colored patches not in our rainbow. */
|
||||
+ dscolor = rpmdsColor(patches);
|
||||
+ if (tscolor && dscolor && !(tscolor & dscolor))
|
||||
+ continue;
|
||||
+
|
||||
+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0);
|
||||
+
|
||||
+ xx = rpmdbPruneIterator(mi,
|
||||
+ ts->removedPackages, ts->numRemovedPackages, 1);
|
||||
+
|
||||
+ while((oh = rpmdbNextIterator(mi)) != NULL) {
|
||||
+ /* Ignore colored packages not in our rainbow. */
|
||||
+ ohcolor = hGetColor(oh);
|
||||
+ if (tscolor && hcolor && ohcolor && !(hcolor & ohcolor))
|
||||
+ /*@innercontinue@*/ continue;
|
||||
+ if (rpmdsEVR(patches) == NULL
|
||||
+ || rpmdsNVRMatchesDep(oh, patches, _rpmds_nopromote)) {
|
||||
+ if (rpmVersionCompare(h, oh))
|
||||
+ xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey);
|
||||
+ }
|
||||
+ }
|
||||
+ mi = rpmdbFreeIterator(mi);
|
||||
+ }
|
||||
+ patches = rpmdsFree(patches);
|
||||
+
|
||||
ec = 0;
|
||||
|
||||
exit:
|
||||
@@ -644,6 +679,57 @@ exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
+static int checkPatchDeps(rpmts ts, rpmte p, int reportprobs)
|
||||
+{
|
||||
+ const char * Name;
|
||||
+ Header h;
|
||||
+ rpmds patches;
|
||||
+ rpmds this;
|
||||
+ rpmdbMatchIterator mi;
|
||||
+
|
||||
+ patches = rpmdsInit(rpmteDS(p, RPMTAG_PATCHESNAME));
|
||||
+ if (!patches)
|
||||
+ return 0;
|
||||
+ this = rpmteDS(p, RPMTAG_NAME);
|
||||
+
|
||||
+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmdsN(this), 0);
|
||||
+ while ((h = rpmdbNextIterator(mi)) != NULL) {
|
||||
+ if (rpmdsNVRMatchesDep(h, this, _rpmds_nopromote)) {
|
||||
+ rpmdsNotify(this, _("(patch refresh)"), 0);
|
||||
+ p->hPatched = headerLink(h);
|
||||
+ p->isPatchRefresh = 1;
|
||||
+ mi = rpmdbFreeIterator(mi);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ mi = rpmdbFreeIterator(mi);
|
||||
+
|
||||
+ while (rpmdsNext(patches) >= 0) {
|
||||
+ if ((Name = rpmdsN(patches)) == NULL)
|
||||
+ return 1; /* XXX can't happen */
|
||||
+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0);
|
||||
+ while ((h = rpmdbNextIterator(mi)) != NULL) {
|
||||
+ if (rpmdsNVRMatchesDep(h, patches, _rpmds_nopromote)) {
|
||||
+ rpmdsNotify(patches, _("(db package)"), 0);
|
||||
+ p->hPatched = headerLink(h);
|
||||
+ p->isPatchRefresh = 0;
|
||||
+ mi = rpmdbFreeIterator(mi);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ mi = rpmdbFreeIterator(mi);
|
||||
+ }
|
||||
+
|
||||
+ rpmdsNotify(patches, NULL, 1);
|
||||
+ if (reportprobs) {
|
||||
+ patches = rpmdsInit(patches);
|
||||
+ rpmdsNext(patches);
|
||||
+ rpmdsProblem(ts->probs, rpmteNEVR(p), patches, NULL, 1);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Check added requires/conflicts against against installed+added packages.
|
||||
* @param ts transaction set
|
||||
@@ -1727,6 +1813,7 @@ int rpmtsCheck(rpmts ts)
|
||||
rpmteDS(p, RPMTAG_CONFLICTNAME),
|
||||
NULL,
|
||||
tscolor, 1);
|
||||
+ rc |= checkPatchDeps(ts, p, 1);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
@@ -1824,3 +1911,22 @@ exit:
|
||||
/*@=branchstate@*/
|
||||
return rc;
|
||||
}
|
||||
+
|
||||
+void rpmtsPatchCheck(rpmts ts)
|
||||
+{
|
||||
+ int closeatexit = 0;
|
||||
+ rpmtsi pi = NULL; rpmte p;
|
||||
+
|
||||
+ if (rpmtsGetRdb(ts) == NULL && ts->dbmode != -1) {
|
||||
+ if ((rpmtsOpenDB(ts, ts->dbmode)) != 0)
|
||||
+ return;
|
||||
+ closeatexit = 1;
|
||||
+ }
|
||||
+ pi = rpmtsiInit(ts);
|
||||
+ while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL)
|
||||
+ if (p->key) /* key is filename for install, zero for verify */
|
||||
+ (void)checkPatchDeps(ts, p, 0);
|
||||
+ pi = rpmtsiFree(pi);
|
||||
+ if (closeatexit)
|
||||
+ (void)rpmtsCloseDB(ts);
|
||||
+}
|
||||
Index: lib/formats.c
|
||||
===================================================================
|
||||
--- lib/formats.c.orig
|
||||
+++ lib/formats.c
|
||||
@@ -232,6 +232,8 @@ static /*@only@*/ char * fflagsFormat(in
|
||||
strcat(buf, "l");
|
||||
if (anint & RPMFILE_README)
|
||||
strcat(buf, "r");
|
||||
+ if (anint & RPMFILE_UNPATCHED)
|
||||
+ strcat(buf, "u");
|
||||
/*@=boundswrite@*/
|
||||
|
||||
val = xmalloc(5 + padding);
|
||||
Index: lib/fsm.c
|
||||
===================================================================
|
||||
--- lib/fsm.c.orig
|
||||
+++ lib/fsm.c
|
||||
@@ -707,7 +707,7 @@ assert(rpmteType(fi->te) == TR_ADDED);
|
||||
break;
|
||||
|
||||
case FA_BACKUP:
|
||||
- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */
|
||||
+ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */
|
||||
switch (rpmteType(fi->te)) {
|
||||
case TR_ADDED:
|
||||
fsm->osuffix = SUFFIX_RPMORIG;
|
||||
@@ -720,13 +720,13 @@ assert(rpmteType(fi->te) == TR_ADDED);
|
||||
|
||||
case FA_ALTNAME:
|
||||
assert(rpmteType(fi->te) == TR_ADDED);
|
||||
- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */
|
||||
+ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */
|
||||
fsm->nsuffix = SUFFIX_RPMNEW;
|
||||
break;
|
||||
|
||||
case FA_SAVE:
|
||||
assert(rpmteType(fi->te) == TR_ADDED);
|
||||
- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */
|
||||
+ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */
|
||||
fsm->osuffix = SUFFIX_RPMSAVE;
|
||||
break;
|
||||
case FA_ERASE:
|
||||
@@ -1740,7 +1740,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
|
||||
}
|
||||
|
||||
if (fsm->goal == FSM_PKGBUILD) {
|
||||
- if (fsm->fflags & RPMFILE_GHOST) /* XXX Don't if %ghost file. */
|
||||
+ if (fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED)) /* XXX Don't if %ghost file. */
|
||||
break;
|
||||
if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) {
|
||||
struct hardLink_s * li, * prev;
|
||||
Index: lib/poptQV.c
|
||||
===================================================================
|
||||
--- lib/poptQV.c.orig
|
||||
+++ lib/poptQV.c
|
||||
@@ -171,6 +171,7 @@ static void queryArgCallback(poptContext
|
||||
case 'l': qva->qva_flags |= QUERY_FOR_LIST; break;
|
||||
case 's': qva->qva_flags |= QUERY_FOR_STATE | QUERY_FOR_LIST;
|
||||
break;
|
||||
+ case 'P': qva->qva_flags |= QUERY_FOR_PATCHES; break;
|
||||
case POPT_DUMP: qva->qva_flags |= QUERY_FOR_DUMPFILES | QUERY_FOR_LIST;
|
||||
break;
|
||||
|
||||
@@ -278,6 +279,8 @@ struct poptOption rpmQueryPoptTable[] =
|
||||
N_("skip %%readme files"), NULL },
|
||||
#endif
|
||||
|
||||
+ { "patches", 'P', 0, 0, 'P',
|
||||
+ N_("list patches or patched files "), NULL },
|
||||
{ "qf", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, 0,
|
||||
POPT_QUERYFORMAT, NULL, NULL },
|
||||
{ "queryformat", '\0', POPT_ARG_STRING, 0, POPT_QUERYFORMAT,
|
||||
Index: lib/query.c
|
||||
===================================================================
|
||||
--- lib/query.c.orig
|
||||
+++ lib/query.c
|
||||
@@ -225,6 +225,10 @@ int showQueryPackage(QVA_t qva, rpmts ts
|
||||
if ((qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST))
|
||||
continue;
|
||||
|
||||
+ /* If querying patches, skip unpatched files. */
|
||||
+ if ((qva->qva_flags & QUERY_FOR_PATCHES) && (fflags & RPMFILE_UNPATCHED))
|
||||
+ continue;
|
||||
+
|
||||
/*@-boundswrite@*/
|
||||
if (!rpmIsVerbose() && prefix)
|
||||
te = stpcpy(te, prefix);
|
||||
@@ -362,6 +366,21 @@ void rpmDisplayQueryTags(FILE * fp)
|
||||
}
|
||||
}
|
||||
|
||||
+static int isPatch(Header h)
|
||||
+{
|
||||
+ int i, requiresCount = 0;
|
||||
+ const char ** requires;
|
||||
+
|
||||
+ if (!headerGetEntry(h, RPMTAG_REQUIRENAME, NULL, (void **) &requires, &requiresCount))
|
||||
+ return 0;
|
||||
+ for (i = 0; i < requiresCount; i++)
|
||||
+ if (!strcmp("rpmlib(PatchRPMs)", requires[i]))
|
||||
+ break;
|
||||
+ if (requiresCount)
|
||||
+ free(requires);
|
||||
+ return i < requiresCount;
|
||||
+}
|
||||
+
|
||||
static int rpmgiShowMatches(QVA_t qva, rpmts ts)
|
||||
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
|
||||
/*@modifies qva, rpmGlobalMacroContext, h_errno, internalState @*/
|
||||
@@ -376,6 +395,8 @@ static int rpmgiShowMatches(QVA_t qva, r
|
||||
h = rpmgiHeader(gi);
|
||||
if (h == NULL) /* XXX perhaps stricter break instead? */
|
||||
continue;
|
||||
+ if ((qva->qva_flags & QUERY_FOR_PATCHES) != 0 && !isPatch(h))
|
||||
+ continue;
|
||||
if ((rc = qva->qva_showPackage(qva, ts, h)) != 0)
|
||||
ec = rc;
|
||||
if (qva->qva_source == RPMQV_DBOFFSET)
|
||||
@@ -391,6 +412,8 @@ int rpmcliShowMatches(QVA_t qva, rpmts t
|
||||
|
||||
while ((h = rpmdbNextIterator(qva->qva_mi)) != NULL) {
|
||||
int rc;
|
||||
+ if ((qva->qva_flags & QUERY_FOR_PATCHES) != 0 && !isPatch(h))
|
||||
+ continue;
|
||||
if ((rc = qva->qva_showPackage(qva, ts, h)) != 0)
|
||||
ec = rc;
|
||||
if (qva->qva_source == RPMQV_DBOFFSET)
|
||||
@@ -685,7 +708,15 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A
|
||||
|
||||
switch (qva->qva_source) {
|
||||
case RPMQV_ALL:
|
||||
- qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0);
|
||||
+ if ((!argv || !*argv) && (qva->qva_flags & QUERY_FOR_PATCHES) != 0) {
|
||||
+ qva->qva_gi = rpmgiNew(ts, RPMTAG_REQUIRENAME, "rpmlib(PatchRPMs)", 0);
|
||||
+ if (qva->qva_gi->mi == NULL) {
|
||||
+ rpmError(RPMERR_QUERYINFO, _("no patch-rpm installed\n"));
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0);
|
||||
+ }
|
||||
qva->qva_rc = rpmgiSetArgs(qva->qva_gi, argv, ftsOpts, RPMGI_NONE);
|
||||
|
||||
if (qva->qva_gi != NULL && (qva->qva_gi->flags & RPMGI_TSADD)) /* Load the ts with headers. */
|
||||
Index: lib/rpmcli.h
|
||||
===================================================================
|
||||
--- lib/rpmcli.h.orig
|
||||
+++ lib/rpmcli.h
|
||||
@@ -165,7 +165,7 @@ typedef enum rpmQueryFlags_e {
|
||||
QUERY_SCRIPT = (1 << 18), /*!< verify: from --noscripts */
|
||||
QUERY_DIGEST = (1 << 19), /*!< verify: from --nodigest */
|
||||
QUERY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */
|
||||
- QUERY_PATCHES = (1 << 21), /*!< verify: from --nopatches */
|
||||
+ QUERY_FOR_PATCHES = (1 << 21), /*!< verify: from --patches */
|
||||
QUERY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */
|
||||
/*@=enummemuse@*/
|
||||
QUERY_FOR_LIST = (1 << 23), /*!< query: from --list */
|
||||
Index: lib/rpmds.c
|
||||
===================================================================
|
||||
--- lib/rpmds.c.orig
|
||||
+++ lib/rpmds.c
|
||||
@@ -87,6 +87,10 @@ fprintf(stderr, "*** ds %p\t%s[%d]\n", d
|
||||
tagEVR = RPMTAG_TRIGGERVERSION;
|
||||
tagF = RPMTAG_TRIGGERFLAGS;
|
||||
} else
|
||||
+ if (ds->tagN == RPMTAG_PATCHESNAME) {
|
||||
+ tagEVR = RPMTAG_PATCHESVERSION;
|
||||
+ tagF = RPMTAG_PATCHESFLAGS;
|
||||
+ } else
|
||||
return NULL;
|
||||
|
||||
/*@-branchstate@*/
|
||||
@@ -325,6 +329,11 @@ rpmds rpmdsNew(Header h, rpmTag tagN, in
|
||||
tagEVR = RPMTAG_ENHANCESVERSION;
|
||||
tagF = RPMTAG_ENHANCESFLAGS;
|
||||
} else
|
||||
+ if (tagN == RPMTAG_PATCHESNAME) {
|
||||
+ Type = "patches";
|
||||
+ tagEVR = RPMTAG_PATCHESVERSION;
|
||||
+ tagF = RPMTAG_PATCHESFLAGS;
|
||||
+ } else
|
||||
goto exit;
|
||||
|
||||
/*@-branchstate@*/
|
||||
@@ -1127,14 +1136,28 @@ void rpmdsProblem(rpmps ps, const char *
|
||||
if (DNEVR == NULL) DNEVR = "? ?N? ?OP? ?EVR?";
|
||||
/*@=branchstate@*/
|
||||
|
||||
- rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"),
|
||||
- pkgNEVR, ds->Type, DNEVR+2);
|
||||
-
|
||||
switch ((unsigned)DNEVR[0]) {
|
||||
case 'C': type = RPMPROB_CONFLICT; break;
|
||||
default:
|
||||
case 'R': type = RPMPROB_REQUIRES; break;
|
||||
}
|
||||
+ if (DNEVR[0] == 'p') {
|
||||
+ const char *d;
|
||||
+ char *dn;
|
||||
+ rpmds pds = rpmdsInit(ds);
|
||||
+ dn = xstrdup("p ");
|
||||
+ while (rpmdsNext(pds) >= 0) {
|
||||
+ d = rpmdsDNEVR(ds) + 2;
|
||||
+ dn = xrealloc(dn, strlen(dn) + strlen(d) + 4);
|
||||
+ if (dn[2])
|
||||
+ strcat(dn, " | ");
|
||||
+ strcat(dn, d);
|
||||
+ }
|
||||
+ DNEVR = (const char *)dn;
|
||||
+ }
|
||||
+
|
||||
+ rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"),
|
||||
+ pkgNEVR, ds->Type, DNEVR+2);
|
||||
|
||||
key = (suggestedKeys ? suggestedKeys[0] : NULL);
|
||||
rpmpsAppend(ps, type, pkgNEVR, key, NULL, NULL, DNEVR, adding);
|
||||
Index: lib/rpminstall.c
|
||||
===================================================================
|
||||
--- lib/rpminstall.c.orig
|
||||
+++ lib/rpminstall.c
|
||||
@@ -692,6 +692,11 @@ maybe_manifest:
|
||||
/*@=branchstate@*/
|
||||
}
|
||||
ps = rpmpsFree(ps);
|
||||
+ } else if (eiu->numRPMS) {
|
||||
+ /* needed in rpmtsOrder */
|
||||
+ rpmalMakeIndex(ts->addedPackages);
|
||||
+ /* need patch references */
|
||||
+ rpmtsPatchCheck(ts);
|
||||
}
|
||||
|
||||
if (eiu->numRPMS && !(ia->installInterfaceFlags & INSTALL_NOORDER)) {
|
||||
@@ -797,7 +802,7 @@ int rpmErase(rpmts ts, struct rpmInstall
|
||||
{ int notifyFlags;
|
||||
notifyFlags = ia->eraseInterfaceFlags | (rpmIsVerbose() ? INSTALL_LABEL : 0 );
|
||||
xx = rpmtsSetNotifyCallback(ts,
|
||||
- rpmShowProgress, (void *) ((long)notifyFlags)
|
||||
+ rpmShowProgress, (void *) ((long)notifyFlags))
|
||||
}
|
||||
#endif
|
||||
|
||||
Index: lib/rpmlibprov.c
|
||||
===================================================================
|
||||
--- lib/rpmlibprov.c.orig
|
||||
+++ lib/rpmlibprov.c
|
||||
@@ -33,6 +33,9 @@ static struct rpmlibProvides_s rpmlibPro
|
||||
{ "rpmlib(PayloadIsBzip2)", "3.0.5-1",
|
||||
(RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
|
||||
N_("package payload can be compressed using bzip2.") },
|
||||
+ { "rpmlib(PatchRPMs)", "3.0.6-1",
|
||||
+ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
|
||||
+ N_("understand rpms that replace a subset of files.") },
|
||||
{ "rpmlib(PayloadFilesHavePrefix)", "4.0-1",
|
||||
(RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
|
||||
N_("package payload file(s) have \"./\" prefix.") },
|
||||
Index: lib/rpmte.c
|
||||
===================================================================
|
||||
--- lib/rpmte.c.orig
|
||||
+++ lib/rpmte.c
|
||||
@@ -64,6 +64,7 @@ static void delTE(rpmte p)
|
||||
p->NEVRA = _free(p->NEVRA);
|
||||
|
||||
p->h = headerFree(p->h);
|
||||
+ p->hPatched = headerFree(p->hPatched);
|
||||
|
||||
/*@-boundswrite@*/
|
||||
memset(p, 0, sizeof(*p)); /* XXX trash and burn */
|
||||
@@ -183,6 +184,9 @@ static void addTE(rpmts ts, rpmte p, Hea
|
||||
p->requires = rpmdsNew(h, RPMTAG_REQUIRENAME, scareMem);
|
||||
p->conflicts = rpmdsNew(h, RPMTAG_CONFLICTNAME, scareMem);
|
||||
p->obsoletes = rpmdsNew(h, RPMTAG_OBSOLETENAME, scareMem);
|
||||
+ p->patches = rpmdsNew(h, RPMTAG_PATCHESNAME, scareMem | 2);
|
||||
+ p->hPatched = NULL;
|
||||
+ p->isPatchRefresh = 0;
|
||||
|
||||
savep = rpmtsSetRelocateElement(ts, p);
|
||||
p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
|
||||
@@ -520,6 +524,9 @@ rpmds rpmteDS(rpmte te, rpmTag tag)
|
||||
if (tag == RPMTAG_OBSOLETENAME)
|
||||
return te->obsoletes;
|
||||
else
|
||||
+ if (tag == RPMTAG_PATCHESNAME)
|
||||
+ return te->patches;
|
||||
+ else
|
||||
return NULL;
|
||||
/*@=compdef =refcounttrans =retalias =retexpose =usereleased @*/
|
||||
}
|
||||
Index: lib/rpmte.h
|
||||
===================================================================
|
||||
--- lib/rpmte.h.orig
|
||||
+++ lib/rpmte.h
|
||||
@@ -115,6 +115,9 @@ struct rpmte_s {
|
||||
int autorelocatex; /*!< (TR_ADDED) Auto relocation entry index. */
|
||||
/*@refcounted@*/ /*@null@*/
|
||||
FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */
|
||||
+ rpmds patches; /*!< Patches: dependencies. */
|
||||
+ Header hPatched; /*!< (TR_ADDED) Header of package we patch */
|
||||
+ int isPatchRefresh; /*!< (TR_ADDED) is a patch refresh */
|
||||
|
||||
/*@-fielduse@*/ /* LCL: confused by union? */
|
||||
union {
|
||||
Index: lib/transaction.c
|
||||
===================================================================
|
||||
--- lib/transaction.c.orig
|
||||
+++ lib/transaction.c
|
||||
@@ -198,6 +198,11 @@ static int handleInstInstalledFiles(cons
|
||||
int rConflicts;
|
||||
|
||||
rConflicts = reportConflicts;
|
||||
+ if (rConflicts && p->hPatched && p->isPatchRefresh) {
|
||||
+ /* If same package (patch refresh) turn off conflicts */
|
||||
+ /* Handling of unpatched files not worth the trouble */
|
||||
+ rConflicts = 0;
|
||||
+ }
|
||||
/* Resolve file conflicts to prefer Elf64 (if not forced). */
|
||||
if (tscolor != 0 && FColor != 0 && FColor != oFColor)
|
||||
{
|
||||
@@ -972,6 +977,176 @@ rpmfi rpmtsiFi(const rpmtsi tsi)
|
||||
/*@=compdef =refcounttrans =usereleased @*/
|
||||
}
|
||||
|
||||
+static int_32 *dupint32(int_32 *old, int cnt)
|
||||
+{
|
||||
+ int i;
|
||||
+ int_32 *new = xmalloc(cnt * sizeof(int_32));
|
||||
+ for (i = 0; i < cnt; i++)
|
||||
+ new[i] = old[i];
|
||||
+ return new;
|
||||
+}
|
||||
+
|
||||
+static void patchUnpatchedFiles(Header oldh, Header h, int isRefresh)
|
||||
+{
|
||||
+ int fileCount, oldfileCount, i, j, oldidx, oldidxj;
|
||||
+ const char ** baseNames, ** dirNames;
|
||||
+ int_32 * dirIndexes;
|
||||
+ int_32 * fileMtimes;
|
||||
+ int_32 * fileSizes;
|
||||
+ int_32 * fileFlags;
|
||||
+ char ** fileMd5s;
|
||||
+ const char ** oldbaseNames, ** olddirNames;
|
||||
+ int_32 * olddirIndexes;
|
||||
+ int_32 * oldfileMtimes;
|
||||
+ int_32 * oldfileSizes;
|
||||
+ int_32 * oldfileFlags;
|
||||
+ char ** oldfileMd5s;
|
||||
+ const char * name, * version, * release;
|
||||
+ char * evr;
|
||||
+ int_32 sense;
|
||||
+ int_32 *epochp;
|
||||
+ int save = 0;
|
||||
+ char epoch[20];
|
||||
+ const char ** oldpatches, **oldpatchesEVR = NULL;
|
||||
+ int_32 * oldpatchesFlags;
|
||||
+ int oldpatchesCount;
|
||||
+
|
||||
+ if (!oldh) {
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESNAME);
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS);
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESVERSION);
|
||||
+#if 1
|
||||
+ name = "(none)";
|
||||
+ sense = 0;
|
||||
+ evr = "";
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, &name, 1);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, &sense, 1);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, &evr, 1);
|
||||
+#endif
|
||||
+ return;
|
||||
+ }
|
||||
+ if (!headerGetEntry(h, RPMTAG_BASENAMES, NULL,
|
||||
+ (void **) &baseNames, &fileCount))
|
||||
+ return;
|
||||
+ headerGetEntry(h, RPMTAG_DIRNAMES, NULL,
|
||||
+ (void **) &dirNames, NULL);
|
||||
+ headerGetEntry(h, RPMTAG_DIRINDEXES, NULL,
|
||||
+ (void **) &dirIndexes, NULL);
|
||||
+ headerGetEntry(h, RPMTAG_FILESIZES, NULL,
|
||||
+ (void **) &fileSizes, NULL);
|
||||
+ headerGetEntry(h, RPMTAG_FILEMD5S, NULL,
|
||||
+ (void **) &fileMd5s, NULL);
|
||||
+ headerGetEntry(h, RPMTAG_FILEMTIMES, NULL,
|
||||
+ (void **) &fileMtimes, NULL);
|
||||
+ headerGetEntry(h, RPMTAG_FILEFLAGS, NULL,
|
||||
+ (void **) &fileFlags, NULL);
|
||||
+
|
||||
+ if (!headerGetEntry(oldh, RPMTAG_BASENAMES, NULL,
|
||||
+ (void **) &oldbaseNames, &oldfileCount))
|
||||
+ return;
|
||||
+ headerGetEntry(oldh, RPMTAG_DIRNAMES, NULL,
|
||||
+ (void **) &olddirNames, NULL);
|
||||
+ headerGetEntry(oldh, RPMTAG_DIRINDEXES, NULL,
|
||||
+ (void **) &olddirIndexes, NULL);
|
||||
+ headerGetEntry(oldh, RPMTAG_FILESIZES, NULL,
|
||||
+ (void **) &oldfileSizes, NULL);
|
||||
+ headerGetEntry(oldh, RPMTAG_FILEMD5S, NULL,
|
||||
+ (void **) &oldfileMd5s, NULL);
|
||||
+ headerGetEntry(oldh, RPMTAG_FILEMTIMES, NULL,
|
||||
+ (void **) &oldfileMtimes, NULL);
|
||||
+ headerGetEntry(oldh, RPMTAG_FILEFLAGS, NULL,
|
||||
+ (void **) &oldfileFlags, NULL);
|
||||
+
|
||||
+ oldidx = -1;
|
||||
+ oldidxj = 0;
|
||||
+ for (i = 0; i < fileCount; i++) {
|
||||
+ if (!(fileFlags[i] & RPMFILE_UNPATCHED))
|
||||
+ continue;
|
||||
+ if (dirIndexes[i] != oldidx) {
|
||||
+ for (j = 0; j < oldfileCount; j++)
|
||||
+ if (strcmp(dirNames[dirIndexes[i]], olddirNames[olddirIndexes[j]]) == 0)
|
||||
+ break;
|
||||
+ if (j == oldfileCount) {
|
||||
+ while (i + 1 < fileCount && dirIndexes[i] == dirIndexes[i + 1])
|
||||
+ i++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ oldidx = olddirIndexes[j];
|
||||
+ oldidxj = j;
|
||||
+ }
|
||||
+ for (j = oldidxj; j < oldfileCount; j++)
|
||||
+ if (olddirIndexes[j] == oldidx && !strcmp(baseNames[i], oldbaseNames[j])) {
|
||||
+ if (!save) {
|
||||
+ /* duplicate fileSizes, fileMtimes, fileFlags
|
||||
+ * so we can modify them */
|
||||
+ fileSizes = dupint32(fileSizes, fileCount);
|
||||
+ fileMtimes = dupint32(fileMtimes, fileCount);
|
||||
+ fileFlags = dupint32(fileFlags, fileCount);
|
||||
+ }
|
||||
+ fileSizes[i] = oldfileSizes[j];
|
||||
+ fileMtimes[i] = oldfileMtimes[j];
|
||||
+ fileMd5s[i] = oldfileMd5s[j];
|
||||
+ fileFlags[i] = oldfileFlags[j] | RPMFILE_UNPATCHED;
|
||||
+ save = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (save) {
|
||||
+ headerModifyEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
|
||||
+ (void *) fileSizes, fileCount);
|
||||
+ headerModifyEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE,
|
||||
+ (void *) fileMd5s, fileCount);
|
||||
+ headerModifyEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE,
|
||||
+ (void *) fileMtimes, fileCount);
|
||||
+ headerModifyEntry(h, RPMTAG_FILEFLAGS, RPM_INT32_TYPE,
|
||||
+ (void *) fileFlags, fileCount);
|
||||
+ free(fileSizes);
|
||||
+ free(fileMtimes);
|
||||
+ free(fileFlags);
|
||||
+ }
|
||||
+ free(baseNames);
|
||||
+ free(dirNames);
|
||||
+ free(fileMd5s);
|
||||
+ free(oldbaseNames);
|
||||
+ free(olddirNames);
|
||||
+ free(oldfileMd5s);
|
||||
+
|
||||
+ if (isRefresh) {
|
||||
+ /* same patch installed, this is just a refresh operation */
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESNAME);
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS);
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESVERSION);
|
||||
+ if (headerGetEntry(oldh, RPMTAG_PATCHESNAME, NULL, (void **) &oldpatches, &oldpatchesCount) && oldpatchesCount) {
|
||||
+ headerGetEntry(oldh, RPMTAG_PATCHESFLAGS, NULL, (void **) &oldpatchesFlags, &oldpatchesCount);
|
||||
+ headerGetEntry(oldh, RPMTAG_PATCHESVERSION, NULL, (void **) &oldpatchesEVR, &oldpatchesCount);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, oldpatches, oldpatchesCount);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, oldpatchesFlags, oldpatchesCount);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, oldpatchesEVR, oldpatchesCount);
|
||||
+ free(oldpatches);
|
||||
+ free(oldpatchesEVR);
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ headerNVR(oldh, &name, &version, &release);
|
||||
+ *epoch = 0;
|
||||
+ if (headerGetEntry(h, RPMTAG_EPOCH, NULL, (void **) &epochp, NULL))
|
||||
+ sprintf(epoch, "%d:", *epochp);
|
||||
+ evr = xmalloc(strlen(epoch) + strlen(version) + strlen(release) + 2);
|
||||
+ strcpy(evr, epoch);
|
||||
+ strcat(evr, version);
|
||||
+ strcat(evr, "-");
|
||||
+ strcat(evr, release);
|
||||
+ sense = RPMSENSE_EQUAL;
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESNAME);
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS);
|
||||
+ headerRemoveEntry(h, RPMTAG_PATCHESVERSION);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, &name, 1);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, &sense, 1);
|
||||
+ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, &evr, 1);
|
||||
+ free(evr);
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**
|
||||
* This is not a generalized function to be called from outside
|
||||
* librpm. It is called internally by rpmtsRun() to rollback
|
||||
@@ -2137,6 +2312,8 @@ assert(psm != NULL);
|
||||
}
|
||||
psm->fi = rpmfiLink(p->fi, NULL);
|
||||
|
||||
+ if (p->hPatched || rpmteDS(p, RPMTAG_PATCHESNAME))
|
||||
+ patchUnpatchedFiles(p->hPatched, p->fi->h, p->isPatchRefresh);
|
||||
/*@-nullstate@*/ /* FIX: psm->fi may be NULL */
|
||||
if (rpmpsmStage(psm, PSM_PKGINSTALL)) {
|
||||
ourrc++;
|
||||
Index: doc/rpm.8
|
||||
===================================================================
|
||||
--- doc/rpm.8.orig
|
||||
+++ doc/rpm.8
|
||||
@@ -68,7 +68,8 @@ rpm \- RPM Package Manager
|
||||
|
||||
|
||||
[\fB\fIPACKAGE_NAME\fB\fR] [\fB-a,--all\fR] [\fB-f,--file \fIFILE\fB\fR]
|
||||
- [\fB-g,--group \fIGROUP\fB\fR] {\fB-p,--package \fIPACKAGE_FILE\fB\fR]
|
||||
+ [\fB-g,--group \fIGROUP\fB\fR] [\fB-p,--package \fIPACKAGE_FILE\fB\fR]
|
||||
+ [\fB-P,--patches\fR]
|
||||
[\fB--fileid \fIMD5\fB\fR] [\fB--hdrid \fISHA1\fB\fR] [\fB--pkgid \fIMD5\fB\fR] [\fB--tid \fITID\fB\fR]
|
||||
[\fB--querybynumber \fIHDRNUM\fB\fR] [\fB--triggeredby \fIPACKAGE_NAME\fB\fR]
|
||||
[\fB--whatprovides \fICAPABILITY\fB\fR] [\fB--whatrequires \fICAPABILITY\fB\fR]
|
||||
@@ -77,7 +78,8 @@ rpm \- RPM Package Manager
|
||||
.PP
|
||||
|
||||
|
||||
- [\fB--changelog\fR] [\fB-c,--configfiles\fR] [\fB-d,--docfiles\fR] [\fB--dump\fR]
|
||||
+ [\fB--basedon\fR] [\fB--changelog\fR] [\fB-c,--configfiles\fR]
|
||||
+ [\fB-d,--docfiles\fR] [\fB--dump\fR]
|
||||
[\fB--filesbypkg\fR] [\fB-i,--info\fR] [\fB--last\fR] [\fB-l,--list\fR]
|
||||
[\fB--provides\fR] [\fB--qf,--queryformat \fIQUERYFMT\fB\fR]
|
||||
[\fB-R,--requires\fR] [\fB--scripts\fR] [\fB-s,--state\fR]
|
||||
@@ -547,6 +549,10 @@ that will be expanded to paths that are
|
||||
the package manifest as additional \fIPACKAGE_FILE\fR
|
||||
arguments to the query.
|
||||
.TP
|
||||
+\fB-P, --patches\fP
|
||||
+Limit the selected packages to patch-rpms. As a side effect, limit
|
||||
+the file list to patched files.
|
||||
+.TP
|
||||
\fB--pkgid \fIMD5\fB\fR
|
||||
Query package that contains a given package identifier, i.e. the
|
||||
\fIMD5\fR digest of the combined header and
|
||||
@@ -581,6 +587,10 @@ Query all packages that requires \fICAPA
|
||||
.SS "PACKAGE QUERY OPTIONS:"
|
||||
.PP
|
||||
.TP
|
||||
+\fB--basedon\fR
|
||||
+Show what packages a patch-rpm is based on. A patch-rpm can only be
|
||||
+installed if one of the packages it is based on is installed.
|
||||
+.TP
|
||||
\fB--changelog\fR
|
||||
Display change information for the package.
|
||||
.TP
|
||||
@@ -618,7 +628,8 @@ Orders the package listing by install ti
|
||||
packages are at the top.
|
||||
.TP
|
||||
\fB-l, --list\fR
|
||||
-List files in package.
|
||||
+List files in package. If the \fB\-P\fP option is also given, only
|
||||
+patched files are shown.
|
||||
.TP
|
||||
\fB--provides\fR
|
||||
List capabilities this package provides.
|
||||
Index: rpmpopt.in
|
||||
===================================================================
|
||||
--- rpmpopt.in.orig
|
||||
+++ rpmpopt.in
|
||||
@@ -76,6 +76,10 @@ rpm alias --supplements --qf \
|
||||
"[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
|
||||
--POPTdesc=$"list capabilities this package supplements"
|
||||
|
||||
+rpm alias --basedon --qf \
|
||||
+ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \
|
||||
+ --POPTdesc=$"list packages this patch-rpm is based on"
|
||||
+
|
||||
rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
|
||||
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
|
||||
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
|
||||
@@ -373,6 +377,10 @@ rpmq alias --supplements --qf \
|
||||
"[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
|
||||
--POPTdesc=$"list capabilities this package supplements"
|
||||
|
||||
+rpmq alias --basedon --qf \
|
||||
+ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \
|
||||
+ --POPTdesc=$"list packages this patch-rpm is based on"
|
||||
+
|
||||
rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
|
||||
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
|
||||
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
|
||||
@@ -488,6 +496,10 @@ rpmquery alias --supplements --qf \
|
||||
"[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
|
||||
--POPTdesc=$"list capabilities this package supplements"
|
||||
|
||||
+rpmquery alias --basedon --qf \
|
||||
+ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \
|
||||
+ --POPTdesc=$"list packages this patch-rpm is based on"
|
||||
+
|
||||
rpmquery alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
|
||||
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
|
||||
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
|
40
payloadformat.diff
Normal file
40
payloadformat.diff
Normal file
@ -0,0 +1,40 @@
|
||||
Check if the payloadformat really is "cpio", fail with an error
|
||||
message if it is not. Use a different message for the "drpm"
|
||||
delta-rpm format. rh#140052
|
||||
|
||||
Upstream proposes a different approach, patching the "Requires"
|
||||
list, which the current deltarpm implementation can't do, because
|
||||
it uses a verbatim copy of the original header. Sigh.
|
||||
|
||||
I still believe that rpm should check for known formats, i.e.
|
||||
now that rpm understands ustar it should insist that the format
|
||||
is either "cpio" or "ustar".
|
||||
|
||||
--- ./lib/rpminstall.c.orig 2005-12-14 21:01:09.000000000 +0000
|
||||
+++ ./lib/rpminstall.c 2005-12-15 14:47:35.000000000 +0000
|
||||
@@ -470,6 +470,7 @@ if (fileURL[0] == '=') {
|
||||
eiu->fnp++, eiu->prevx++)
|
||||
{
|
||||
const char * fileName;
|
||||
+ const char * payloadformat;
|
||||
|
||||
rpmMessage(RPMMESS_DEBUG, "============== %s\n", *eiu->fnp);
|
||||
(void) urlPath(*eiu->fnp, &fileName);
|
||||
@@ -510,6 +511,17 @@ if (fileURL[0] == '=') {
|
||||
/*@switchbreak@*/ break;
|
||||
}
|
||||
|
||||
+ payloadformat = 0;
|
||||
+ if (!headerGetEntry(eiu->h, RPMTAG_PAYLOADFORMAT, NULL, (void **)&payloadformat, NULL))
|
||||
+ payloadformat = 0;
|
||||
+ if (payloadformat && strcmp(payloadformat, "cpio") != 0) {
|
||||
+ if (!strcmp(payloadformat, "drpm"))
|
||||
+ rpmMessage(RPMMESS_ERROR, _("%s is a deltarpm, create a real rpm from it first!\n"), *eiu->fnp);
|
||||
+ else
|
||||
+ rpmMessage(RPMMESS_ERROR, _("%s contains no cpio payload\n"), *eiu->fnp);
|
||||
+ eiu->numFailed++; *eiu->fnp = NULL;
|
||||
+ continue;
|
||||
+ }
|
||||
eiu->isSource = headerIsEntry(eiu->h, RPMTAG_SOURCEPACKAGE);
|
||||
|
||||
if (eiu->isSource) {
|
@ -1,13 +0,0 @@
|
||||
Support a "first version wins" semantics.
|
||||
|
||||
--- ./scripts/perl.prov.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./scripts/perl.prov 2011-05-11 15:32:39.000000000 +0000
|
||||
@@ -170,7 +170,7 @@ sub process_file {
|
||||
|
||||
$version = $1;
|
||||
}
|
||||
- $require{$package} = $version;
|
||||
+ $require{$package} ||= $version;
|
||||
}
|
||||
|
||||
# Allow someone to have a variable that defines virtual packages
|
18
pgpdecodeearly.diff
Normal file
18
pgpdecodeearly.diff
Normal file
@ -0,0 +1,18 @@
|
||||
Also decode early for PGP sigtags, which are actually header+payload
|
||||
RSA signatures. Without this patch, verification of a package
|
||||
that has just a header+payload RSA signature but no header-only RSA
|
||||
signature fails.
|
||||
|
||||
Already in rpm-4.4.7.
|
||||
|
||||
--- ./lib/rpmchecksig.c.orig 2005-12-14 20:54:39.000000000 +0000
|
||||
+++ ./lib/rpmchecksig.c 2006-03-21 18:00:22.000000000 +0000
|
||||
@@ -801,7 +805,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts
|
||||
sigp = rpmtsSignature(ts);
|
||||
|
||||
/* XXX RSA needs the hash_algo, so decode early. */
|
||||
- if (sigtag == RPMSIGTAG_RSA) {
|
||||
+ if (sigtag == RPMSIGTAG_RSA || sigtag == RPMSIGTAG_PGP) {
|
||||
xx = headerGetEntry(sigh, sigtag, &sigtype, &sig, &siglen);
|
||||
xx = pgpPrtPkts(sig, siglen, dig, 0);
|
||||
sig = headerFreeData(sig, sigtype);
|
@ -1,26 +1,31 @@
|
||||
SUSE specific platform changes.
|
||||
SUSE specific platform changes. The libexecdir definition is probably
|
||||
wrong, LSB seems to demand "%{_exec_prefix}/lib".
|
||||
|
||||
--- ./platform.in.orig 2010-12-03 12:11:57.000000000 +0000
|
||||
+++ ./platform.in 2011-05-11 15:02:03.000000000 +0000
|
||||
@@ -21,7 +21,7 @@
|
||||
--- ./platform.in.orig 2005-01-26 03:39:54.000000000 +0000
|
||||
+++ ./platform.in 2006-02-17 14:18:30.000000000 +0000
|
||||
@@ -17,18 +17,18 @@
|
||||
%_exec_prefix @exec_prefix@
|
||||
%_bindir @bindir@
|
||||
%_sbindir @sbindir@
|
||||
-%_libexecdir @libexecdir@
|
||||
+%_libexecdir %{_exec_prefix}/lib
|
||||
%_datarootdir @datarootdir@
|
||||
+%_libexecdir %{_libdir}
|
||||
%_datadir @datadir@
|
||||
%_sysconfdir @sysconfdir@
|
||||
@@ -33,7 +33,7 @@
|
||||
%_sharedstatedir @sharedstatedir@
|
||||
%_localstatedir @localstatedir@
|
||||
%_lib @LIB@
|
||||
-%_libdir @LIBDIR@
|
||||
+%_libdir %{_exec_prefix}/%{_lib}
|
||||
%_includedir @includedir@
|
||||
%_oldincludedir @oldincludedir@
|
||||
%_infodir @infodir@
|
||||
%_mandir @mandir@
|
||||
-%_initddir %{_sysconfdir}/rc.d/init.d
|
||||
+%_initddir %{_sysconfdir}/init.d
|
||||
# Deprecated misspelling, present for backwards compatibility.
|
||||
%_initrddir %{_initddir}
|
||||
-%_initrddir %{_sysconfdir}/rc.d/init.d
|
||||
+%_initrddir %{_sysconfdir}/init.d
|
||||
|
||||
@@ -143,3 +143,21 @@
|
||||
%_defaultdocdir @DEFAULTDOCDIR@
|
||||
|
||||
@@ -148,3 +148,21 @@
|
||||
@mandrake@%_gamesdir games
|
||||
@mandrake@%_gamesbindir %{_prefix}/%{_gamesdir}
|
||||
@mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir}
|
||||
@ -31,7 +36,7 @@ SUSE specific platform changes.
|
||||
+@SuSE@%__chown_Rhf @__CHOWN_RHF@
|
||||
+@SuSE@%__chgrp_Rhf @__CHGRP_RHF@
|
||||
+@SuSE@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
|
||||
+@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
|
||||
+@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
|
||||
+@SuSE@%_fixperms %{__chmod} -Rf @FIXPERMS@
|
||||
+@SuSE@
|
||||
+@SuSE@#---------------------------------------------------------------------
|
||||
|
21
prereqorder.diff
Normal file
21
prereqorder.diff
Normal file
@ -0,0 +1,21 @@
|
||||
Backported fix. Seems to do no harm.
|
||||
|
||||
--- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000
|
||||
+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000
|
||||
@@ -1294,14 +1403,12 @@ int rpmtsOrder(rpmts ts)
|
||||
switch (rpmteType(p)) {
|
||||
case TR_REMOVED:
|
||||
/* Skip if not %preun/%postun requires or legacy prereq. */
|
||||
- if (isInstallPreReq(Flags)
|
||||
- || !( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) )
|
||||
+ if (!( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) )
|
||||
/*@innercontinue@*/ continue;
|
||||
/*@switchbreak@*/ break;
|
||||
case TR_ADDED:
|
||||
/* Skip if not %pre/%post requires or legacy prereq. */
|
||||
- if (isErasePreReq(Flags)
|
||||
- || !( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) )
|
||||
+ if (!( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) )
|
||||
/*@innercontinue@*/ continue;
|
||||
/*@switchbreak@*/ break;
|
||||
}
|
14
probfilter.diff
Normal file
14
probfilter.diff
Normal file
@ -0,0 +1,14 @@
|
||||
Revert rpm-4.4.2 probFilter change.
|
||||
|
||||
--- ./lib/poptI.c.orig 2005-12-15 14:34:45.000000000 +0000
|
||||
+++ ./lib/poptI.c 2005-12-15 14:35:16.000000000 +0000
|
||||
@@ -16,8 +16,7 @@ extern time_t get_date(const char * p, v
|
||||
/*@unchecked@*/
|
||||
struct rpmInstallArguments_s rpmIArgs = {
|
||||
0, /* transFlags */
|
||||
- /* probFilter */
|
||||
- (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
|
||||
+ 0, /* probFilter */
|
||||
0, /* installInterfaceFlags */
|
||||
0, /* eraseInterfaceFlags */
|
||||
0, /* qva_flags */
|
@ -1,48 +0,0 @@
|
||||
Index: autodeps/linux.prov
|
||||
===================================================================
|
||||
--- autodeps/linux.prov.orig 2011-06-08 13:31:39.000000000 +0200
|
||||
+++ autodeps/linux.prov 2011-06-08 13:31:39.191646314 +0200
|
||||
@@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@]
|
||||
solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \
|
||||
tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \
|
||||
cut -d: -f1))
|
||||
-pythonlist=
|
||||
+pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/bin/python.\..$'))
|
||||
tcllist=
|
||||
monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
|
||||
firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/"))
|
||||
@@ -54,8 +54,8 @@ done | sort -u
|
||||
|
||||
#
|
||||
# --- Python modules.
|
||||
-[ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] &&
|
||||
- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.prov | sort -u
|
||||
+[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] &&
|
||||
+ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -P | sort -u
|
||||
|
||||
#
|
||||
# --- Tcl modules.
|
||||
Index: autodeps/linux.req
|
||||
===================================================================
|
||||
--- autodeps/linux.req.orig 2011-06-08 13:31:38.000000000 +0200
|
||||
+++ autodeps/linux.req 2011-06-08 13:31:39.191646314 +0200
|
||||
@@ -31,7 +31,7 @@ liblist=($(printf "%s\0" "${filelist[@]}
|
||||
|
||||
interplist=()
|
||||
perllist=()
|
||||
-pythonlist=()
|
||||
+pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..'))
|
||||
tcllist=()
|
||||
monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$"))
|
||||
|
||||
@@ -127,8 +127,8 @@ done | sort -u
|
||||
|
||||
#
|
||||
# --- Python modules.
|
||||
-[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \
|
||||
- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.req | sort -u
|
||||
+[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && \
|
||||
+ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -R | sort -u
|
||||
|
||||
#
|
||||
# --- Tcl modules.
|
43
querybuffer.diff
Normal file
43
querybuffer.diff
Normal file
@ -0,0 +1,43 @@
|
||||
fix a buffer overflow in the query function [#218983]
|
||||
rh#212833
|
||||
|
||||
--- lib/query.c.orig 2006-11-24 13:24:30.000000000 +0000
|
||||
+++ lib/query.c 2006-11-24 13:43:47.000000000 +0000
|
||||
@@ -133,8 +133,10 @@ int showQueryPackage(QVA_t qva, rpmts ts
|
||||
int rc = 0; /* XXX FIXME: need real return code */
|
||||
int nonewline = 0;
|
||||
int i;
|
||||
+ size_t tsize;
|
||||
|
||||
- te = t = xmalloc(BUFSIZ);
|
||||
+ tsize = BUFSIZ * 2;
|
||||
+ te = t = xmalloc(tsize);
|
||||
/*@-boundswrite@*/
|
||||
*te = '\0';
|
||||
/*@=boundswrite@*/
|
||||
@@ -147,8 +149,9 @@ int showQueryPackage(QVA_t qva, rpmts ts
|
||||
size_t tb = (te - t);
|
||||
size_t sb = strlen(str);
|
||||
|
||||
- if (sb >= (BUFSIZ - tb)) {
|
||||
- t = xrealloc(t, BUFSIZ+sb);
|
||||
+ if (sb > 0) {
|
||||
+ tsize += sb;
|
||||
+ t = xrealloc(t, tsize);
|
||||
te = t + tb;
|
||||
}
|
||||
/*@-boundswrite@*/
|
||||
@@ -261,6 +264,13 @@ int showQueryPackage(QVA_t qva, rpmts ts
|
||||
}
|
||||
/*@=boundswrite@*/
|
||||
|
||||
+ if (strlen(fn) + BUFSIZ > tsize) {
|
||||
+ size_t tb = (te - t);
|
||||
+ tsize = strlen(fn) + BUFSIZ * 2;
|
||||
+ t = xrealloc(t, tsize);
|
||||
+ te = t + tb;
|
||||
+ }
|
||||
+
|
||||
if (qva->qva_flags & QUERY_FOR_DUMPFILES) {
|
||||
sprintf(te, "%s %d %d %s 0%o ", fn, (int)fsize, fmtime, fmd5, fmode);
|
||||
te += strlen(te);
|
22
rebuilddbroot.diff
Normal file
22
rebuilddbroot.diff
Normal file
@ -0,0 +1,22 @@
|
||||
Make rebuilddb work with the --root option. [#65993]
|
||||
|
||||
--- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000
|
||||
+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000
|
||||
@@ -3771,7 +3887,7 @@ int rpmdbRebuild(const char * prefix, rp
|
||||
}
|
||||
dbpath = rootdbpath = rpmGetPath(prefix, tfn, NULL);
|
||||
if (!(prefix[0] == '/' && prefix[1] == '\0'))
|
||||
- dbpath += strlen(prefix);
|
||||
+ dbpath += strlen(prefix) - 1;
|
||||
tfn = _free(tfn);
|
||||
|
||||
/*@-nullpass@*/
|
||||
@@ -3794,7 +3910,7 @@ int rpmdbRebuild(const char * prefix, rp
|
||||
}
|
||||
newdbpath = newrootdbpath = rpmGetPath(prefix, tfn, NULL);
|
||||
if (!(prefix[0] == '/' && prefix[1] == '\0'))
|
||||
- newdbpath += strlen(prefix);
|
||||
+ newdbpath += strlen(prefix) - 1;
|
||||
tfn = _free(tfn);
|
||||
|
||||
rpmMessage(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"),
|
@ -1,25 +1,24 @@
|
||||
Also test architecture in "refresh" test when not colored. This allows
|
||||
updates to different architectures.
|
||||
updates to different architecture possible again.
|
||||
|
||||
--- ./lib/psm.c.orig 2010-12-21 09:50:23.000000000 +0000
|
||||
+++ ./lib/psm.c 2011-05-11 12:47:13.000000000 +0000
|
||||
@@ -723,6 +723,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
|
||||
|
||||
psm->scriptArg = psm->npkgs_installed + 1;
|
||||
--- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000
|
||||
+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000
|
||||
@@ -1425,15 +1441,16 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
|
||||
|
||||
assert(psm->mi == NULL);
|
||||
psm->mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te), 0);
|
||||
+ /* this must match rpmNameVersionCompare in depends.c */
|
||||
mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(psm->te), 0);
|
||||
xx = rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP,
|
||||
xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_EPOCH, RPMMIRE_STRCMP,
|
||||
rpmteE(psm->te));
|
||||
@@ -730,9 +731,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
|
||||
xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_VERSION, RPMMIRE_STRCMP,
|
||||
rpmteV(psm->te));
|
||||
xx = rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP,
|
||||
xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_RELEASE, RPMMIRE_STRCMP,
|
||||
rpmteR(psm->te));
|
||||
+ xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP,
|
||||
+ rpmteA(psm->te));
|
||||
if (tscolor) {
|
||||
- xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP,
|
||||
- rpmteA(psm->te));
|
||||
xx = rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP,
|
||||
- if (tscolor) {
|
||||
- xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_ARCH, RPMMIRE_STRCMP,
|
||||
+ xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_ARCH, RPMMIRE_STRCMP,
|
||||
rpmteA(psm->te));
|
||||
+ if (tscolor) {
|
||||
xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_OS, RPMMIRE_STRCMP,
|
||||
rpmteO(psm->te));
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
Subject: remove references to removed brp scripts
|
||||
|
||||
Some brp-scripts are not used in openSUSE, remove references
|
||||
to it
|
||||
|
||||
--- ./platform.in.orig 2011-05-11 15:02:03.000000000 +0000
|
||||
+++ ./platform.in 2011-05-11 15:38:05.000000000 +0000
|
||||
@@ -55,8 +55,6 @@
|
||||
%__os_install_post \
|
||||
%{_rpmconfigdir}/brp-compress \
|
||||
%{_rpmconfigdir}/brp-strip %{__strip} \
|
||||
- %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
|
||||
- %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
|
||||
%{nil}
|
||||
|
||||
%__spec_install_post\
|
@ -1,20 +0,0 @@
|
||||
--- ./scripts/find-lang.sh.orig 2011-05-11 16:45:30.000000000 +0000
|
||||
+++ ./scripts/find-lang.sh 2011-05-11 16:55:14.000000000 +0000
|
||||
@@ -122,6 +122,17 @@ fi
|
||||
MO_NAME_NEW=$MO_NAME.tmp.$$
|
||||
rm -f $MO_NAME_NEW
|
||||
|
||||
+# remove languages we do not yet support - but give out statistics
|
||||
+find $TOP_DIR/usr/share/locale/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/locale/'::; /^$/d' | while read dir; do
|
||||
+ if ! rpm -ql filesystem | egrep -q "/usr/share/locale/$dir"$; then
|
||||
+ find $TOP_DIR/usr/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do
|
||||
+ echo -n "removing translation $file: "
|
||||
+ msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null -
|
||||
+ done
|
||||
+ rm -rf $TOP_DIR/usr/share/locale/$dir
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
find $TOP_DIR -type f -o -type l|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3:
|
@ -1,31 +0,0 @@
|
||||
Don't complain about a bad md5 sum for repackaged rpms.
|
||||
|
||||
--- ./lib/psm.c.orig 2011-05-11 14:27:32.000000000 +0000
|
||||
+++ ./lib/psm.c 2011-05-11 16:32:11.000000000 +0000
|
||||
@@ -811,6 +811,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
|
||||
case PSM_PROCESS:
|
||||
if (psm->goal == PKG_INSTALL) {
|
||||
FD_t payload = NULL;
|
||||
+ rpmtransFlags oldtsflags;
|
||||
|
||||
if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) break;
|
||||
|
||||
@@ -828,6 +829,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
|
||||
break;
|
||||
}
|
||||
|
||||
+ oldtsflags = rpmtsFlags(ts);
|
||||
+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID))
|
||||
+ (void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5);
|
||||
rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi,
|
||||
payload, NULL, &psm->failedFile);
|
||||
(void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS),
|
||||
@@ -835,6 +839,8 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
|
||||
(void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST),
|
||||
fdOp(payload, FDSTAT_DIGEST));
|
||||
xx = fsmTeardown(rpmfiFSM(fi));
|
||||
+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID))
|
||||
+ (void) rpmtsSetFlags(ts, oldtsflags);
|
||||
|
||||
saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
|
||||
xx = Fclose(payload);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user