--- /dev/null
+#!/bin/sh
+#
+# bug reports send to pzurowski@pld-linux.org or pld-devel-* lists
+#
+# 2004, GPL 2+
+#
+# >> PLACE STANDARD GPL DISCLAIMER H E R E . <<
+#
+CONFIG=/etc/sysconfig/banner
+
+####################################################### CONFIG ########
+
+# default paramaters
+##########################
+
+BANNERDIR="/var/lib/banner/"
+# egrep regexp
+EXCLUDEFILES="(rpmnew$|rpmsave$|~$)"
+STDOUT="1" # stdout by default
+#STDOUT="2" # stderr by default
+
+# config paramaeters
+##########################
+
+if [ -r $CONFIG ]; then
+ . $CONFIG
+fi
+
+
+# override parameters
+##########################
+
+ALL_BANNERS=0
+BANNERS=""
+NOBANNERS=""
+BANNER_LIST=""
+CHOOSE_NEWER="no"
+CHOOSE_OLDER="no"
+EXCLUDE_FLAG=0
+NEED_BANNER_LIST=0
+NEED_MTIME_CHECK=0
+NEW_APPEND=0
+NEW_BANNER=""
+NEW_SHOW=0
+
+case $STDOUT in
+ [1-9]) ;;
+ *) STDOUT="1" ;;
+esac
+
+#################################################### FUNCTIONS ########
+
+Usage()
+{
+ cat << EOF
+Usage: $(basename $0) [opitions] [banners]
+EOF
+}
+Help()
+{
+ Usage
+ cat << EOF
+-a
+--all - all banners
+--delete - delete wanted banners
+-e
+--exclude - exclude following banners (useful with -a)
+-h
+--help - show this help
+-i
+--include - cancel effect of -e (EXCLUDED banners will remain excluded)
+-m
+--make - make a brand-new banner named as following parameter [1] (from stdin)
+-M - same as above, but append if file exists
+-n
+--names - show names of the banners
+--newer - all choosen banners should be newer than following parameter in seconds
+--older - all choosen banners should be older than following parameter in seconds
+-s
+--show - show wanted banners
+--stderr - send banner to stderr instead of stdout (or other)
+--stdout - send banner to stdout instead of stderr (or other)
+-u
+--usage - show short help
+
+[1] - if there will be no slash ('/') in name then config dir will be used,
+ else -- specified.
+EOF
+}
+Unknown_para()
+{
+ cat << EOF
+Unknown parameter $1
+EOF
+ Help
+}
+
+check_banners_mtime()
+{
+ BANNERS="$1"
+ OLDER="$2"
+ NEWER="$3"
+ DATE=$(date +%s)
+ for BANNER in $BANNERS;do
+ STAT=$(stat -c %Y "$BANNERDIR/$BANNER")
+ if [ $OLDER != "no" -a $(( $DATE - $STAT )) -lt $OLDER ]; then
+ BANNER=""
+ fi
+ if [ $NEWER != "no" -a $(( $DATE - $STAT )) -gt $NEWER ]; then
+ BANNER=""
+ fi
+ echo $BANNER
+ done
+}
+delete_banners()
+{
+ BANNERS="$1"
+ rm -rf $(get_banner_location_list "$BANNER")
+}
+get_all_banner_list()
+{
+ ls "$BANNERDIR" | grep -E -v "$EXCLUDEFILES"
+}
+get_banner_list()
+{
+ BANNERS="$1"
+ NOBANNERS="$2"
+ for BANNER in $BANNERS; do
+ if [ -r "$BANNERDIR/$BANNER" ];then
+ echo $NOBANNERS | grep -q $BANNER || echo $BANNER
+ fi
+ done
+}
+get_banner_location_list()
+{
+ BANNERS="$1"
+ for BANNER in $BANNERS; do
+ echo "$BANNERDIR/$BANNER"
+ done
+}
+make_banner()
+{
+ BANNER="$1"
+ SHOW="$2"
+ if [ ! -d "${BANNER%/*}" ]; then
+ mkdir -p "${BANNER%/*}"
+ fi
+ data=$(cat)
+ if [ $NEW_APPEND -eq 0 ]; then
+ echo "$data" > $BANNER
+ else
+ echo "$data" >> $BANNER
+ fi
+ if [ $SHOW -eq 1 ];then
+ echo "$data"
+ fi
+}
+show_banner()
+{
+ cat $BANNERDIR/$1 >&$STDOUT
+}
+show_banners()
+{
+ for BANNER in $*; do
+ show_banner $BANNER
+ done
+}
+######################################################## MAIN ########
+while [ ! -z $1 ]; do
+ case $1 in
+ -a|--all)
+ ALL_BANNERS=1
+ ;;
+ --delete)
+ NEED_BANNER_LIST=1
+ ACTION="delete"
+ ;;
+ -e|--exclude)
+ EXCLUDE_FLAG=1
+ ;;
+ -h|--help)
+ Help
+ exit 0
+ ;;
+ -i|--include)
+ EXCLUDE_FLAG=0
+ ;;
+ -m|--make|-M)
+ NEED_BANNER_LIST=0
+ if [[ $2 != */* ]]; then
+ NEW_BANNER="$BANNERDIR/${2##*/}"
+ else
+ NEW_BANNER="$2"
+ fi
+ ACTION="make"
+ if [ "$1" == "-M" ];then
+ NEW_APPEND=1
+ else
+ NEW_APPEND=0
+ fi
+ if [ -z "$NEW_BANNER" ];then
+ Help
+ exit 2
+ fi
+ shift
+ ;;
+ -n|--names)
+ NEED_BANNER_LIST=1
+ ACTION="names"
+ ;;
+ --newer)
+ NEED_MTIME_CHECK=1
+ CHOOSE_NEWER="$2"
+ if [ -z "$CHOOSE_NEWER" ];then
+ Help
+ exit 2
+ fi
+ shift
+ ;;
+ --older)
+ NEED_MTIME_CHECK=1
+ CHOOSE_OLDER="$2"
+ if [ -z "$CHOOSE_OLDER" ];then
+ Help
+ exit 2
+ fi
+ shift
+ ;;
+ -s|--show)
+ NEED_BANNER_LIST=1
+ NEW_SHOW=1
+ ACTION="show"
+ ;;
+ --stdout)
+ STDOUT="1"
+ ;;
+ --stderr)
+ STDOUT="2"
+ ;;
+ -u|--usage)
+ Usage
+ exit 0
+ ;;
+ -*)
+ Unknown_para "$1"
+ exit 1
+ ;;
+ *)
+ if [ $EXCLUDE_FLAG -eq 0 ];then
+ BANNERS="$BANNERS ${1##*/}"
+ else
+ NOBANNERS="$NOBANNERS ${1##*/}"
+ fi
+ ;;
+ esac
+ shift
+done
+
+if [ $ALL_BANNERS -ne 0 ]; then
+ BANNERS=`get_all_banner_list`
+fi
+if [ $NEED_BANNER_LIST -ne 0 ];then
+ BANNER_LIST=`get_banner_list "$BANNERS" "$NOBANNERS"`
+fi
+if [ $NEED_MTIME_CHECK -ne 0 ];then
+ BANNER_LIST=`check_banners_mtime "$BANNER_LIST" "$CHOOSE_OLDER" "$CHOOSE_NEWER"`
+fi
+
+case $ACTION in
+ "delete")
+ delete_banners $BANNER_LIST;
+ ;;
+ "make")
+ make_banner $NEW_BANNER $NEW_SHOW;
+ ;;
+ "names")
+ echo $BANNER_LIST;
+ ;;
+ "show")
+ show_banners $BANNER_LIST;
+ ;;
+esac
+
+
+
--- /dev/null
+#!/usr/bin/perl
+use strict;
+
+# perl.prov - find information about perl modules for RPM
+# $Id: perl.prov,v 1.10 2004/05/05 17:13:54 radek Exp $
+
+# It's questionable if we should provide perl(Foo::Bar) for modules
+# from outside @INC (possibly shipped with some applications).
+# I think we should not, and provide them only for the perl.req script,
+# while it scans files in that particular application.
+
+
+# check if we are called directly
+if ($0 =~ m#(?:^|/)perl.prov$#) {
+ my $prov = new RPM::PerlReq;
+ # process @ARGV or STDIN
+ foreach ( @ARGV ? @ARGV : <> ) {
+ chomp;
+ next if -l || !-f _; # skip non-files and symlinks
+ next if m#/usr/(?:share/doc|src)/#; # lot of false alarms; warning: we omit ^ here
+ next if !m#\.p[ml]$#; # we only care about *.pm and *.pl files
+ $prov->process_file($_);
+ }
+ $prov->print_result;
+}
+
+
+package RPM::PerlReq;
+use Safe;
+
+sub new {
+ my $class = shift;
+ my $self = {
+ inc => [
+ sort { length $b cmp length $a } grep m#^/#,
+ map { y#/#/#s; s#/$##; $_ } @INC
+ ],
+ provide => {},
+ safe => Safe->new,
+ @_,
+ };
+ bless $self, $class;
+}
+
+# print out what we found
+sub print_result {
+ my $self = shift;
+ for (sort keys %{ $self->{provide} }) {
+ print "perl($_)"
+ . (length $self->{provide}->{$_} ? " = $self->{provide}->{$_}" : '')
+ . "\n";
+ }
+}
+
+sub process_file {
+ my $self = shift;
+ my $file = shift;
+ my ( $package, $version );
+
+ # if the file lives under @INC, we can
+ # obtain the package name from it's path
+ for (@{ $self->{inc} }) {
+ if ($file =~ m#\Q$_\E/(.+)$#) { # we can't use ^ here
+ $package = $1;
+
+ if ($package !~ s/\.pm$//) { # it's a *.pl
+ # $package =~ m#([^/]+)$#;
+ # $provide{$1} = '';
+ return 1;
+ }
+
+ $package =~ s#/#::#g;
+ last;
+ }
+ }
+
+ # it can be a *.pl oustide @INC
+ return if /\.pl$/;
+
+ local *FILE;
+ open FILE, $file or die "$0: cannot open file `$file': $!";
+
+ while (<FILE>) {
+
+ # skip the documentation
+ next
+ if m/^=(?:head1|head2|pod|item|begin|for|over)\b/
+ ... ( m/^=(?:cut|end)\b/ || $. == 1 );
+
+ # skip the data section
+ last if m/^__(?:DATA|END)__$/;
+
+ # search for the package name
+ if (
+ !defined $package
+ && ( my ($pack) = m/^\s*(?:\{\s*)?package\s+([_:a-zA-Z0-9]+?):*\s*;/ )
+ && $1 ne 'main'
+ && match_the_path( $file, $1 )
+ )
+ {
+ $package = $pack;
+ }
+
+ if ( !defined $version && /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ ) {
+ ( $version = $self->{safe}->reval($_) ) =~ s/^\s+|alpha|beta|\s+$//g;
+ if ( defined $version
+ && length $version
+ && $version =~ /[^\d\._abcdefgh]/ )
+ {
+ warn "$0: weird version number in $file: [$version]\n";
+ $version = '';
+ }
+ }
+ }
+
+ unless ( defined $package ) {
+ warn "$0: weird, cannot determine the package name for `$file'\n";
+ return 0;
+ }
+
+ $self->{provide}->{$package} = $version;
+
+ close FILE or die "$0: cannot close file `$file': $!";
+
+ 1;
+}
+
+
+# Returns C<true> if the package name matches the path,
+# so you can use() it. C<false> otherwise.
+sub match_the_path {
+ my ( $file, $pack ) = @_;
+ $pack =~ s#::#/#g;
+ $file =~ /\Q$pack\E(?:\.pm)?$/;
+}
+
+
+1;
+
+# vim: ts=4 sw=4 noet noai nosi cin
--- /dev/null
+--- rpm-4.5/scripts/pythondeps.sh 2007-05-25 20:36:39.000000000 +0300
++++ rpm-4.5/scripts/pythondeps.sh 2010-03-21 14:07:18.049336515 +0200
+@@ -5,7 +5,8 @@
+ exit 0
+ }
+
+-PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"`
++# $PYVER is exported by rpm macro
++PYVER=${PYVER:-$(python -c "import sys; print '%d.%d' % sys.version_info[:2]")}
+ case $1 in
+ -P|--provides)
+ shift
+--- rpm-4.5/macros.in~ 2010-03-21 14:03:42.559283734 +0200
++++ rpm-4.5/macros.in 2010-03-21 14:05:18.419287370 +0200
+@@ -1401,8 +1401,8 @@
+ #
+ # Note: Used iff _use_internal_dependency_generator is non-zero. The
+ # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+-%__python_provides %{_rpmhome}/pythondeps.sh --provides
+-%__python_requires %{_rpmhome}/pythondeps.sh --requires
++%__python_provides /usr/bin/env PYVER=%py_ver %{_rpmhome}/pythondeps.sh --provides
++%__python_requires /usr/bin/env PYVER=%py_ver %{_rpmhome}/pythondeps.sh --requires
+
+ # Useful macros for building *.rpm python packages (for python > 1.6).
+ #
--- /dev/null
+--- rpm/installplatform.org 2006-10-17 22:52:24.253936250 +0200
++++ rpm/installplatform 2006-10-17 22:52:29.542266750 +0200
+@@ -35,7 +35,7 @@
+ sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
+ powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
+ s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;;
+- x86_64|amd64|ia32e) SUBSTS='s,x86_64,ia32e, s,x86_64,amd64,' ;;
++ x86_64|amd64|ia32e) SUBSTS='s,x86_64,x86_64, s,x86_64,ia32e, s,x86_64,amd64,' ;;
+ *) SUBSTS=y___ ;;
+ esac
+
--- /dev/null
+diff -urN rpm.org/rpmrc.in rpm/rpmrc.in
+--- rpm.org/rpmrc.in 2004-06-14 11:41:06.654241680 +0200
++++ rpm/rpmrc.in 2004-06-14 11:42:26.617085480 +0200
+@@ -186,12 +186,12 @@
+ buildarchtranslate: osfmach3_i486: i386
+ buildarchtranslate: osfmach3_i386: i386
+
+-buildarchtranslate: athlon: i386
+-buildarchtranslate: pentium4: i386
+-buildarchtranslate: pentium3: i386
+-buildarchtranslate: i686: i386
+-buildarchtranslate: i586: i386
+-buildarchtranslate: i486: i386
++buildarchtranslate: athlon: athlon
++buildarchtranslate: pentium4: pentium4
++buildarchtranslate: pentium3: pentium3
++buildarchtranslate: i686: i686
++buildarchtranslate: i586: i586
++buildarchtranslate: i486: i486
+ buildarchtranslate: i386: i386
+
+ buildarchtranslate: alphaev5: alpha
+@@ -206,8 +206,9 @@
+ buildarchtranslate: sun4d: sparc
+ buildarchtranslate: sun4m: sparc
+ buildarchtranslate: sparcv8: sparc
+-buildarchtranslate: sparcv9: sparc
++buildarchtranslate: sparcv9: sparcv9
+ buildarchtranslate: sun4u: sparc64
++buildarchtranslate: sparc64: sparc64
+
+ buildarchtranslate: osfmach3_ppc: ppc
+ buildarchtranslate: powerpc: ppc
--- /dev/null
+diff -urN rpm-4.4.9.org/build/Makefile.am rpm-4.4.9/build/Makefile.am
+--- rpm-4.4.9.org/build/Makefile.am 2007-05-19 14:44:43.000000000 +0200
++++ rpm-4.4.9/build/Makefile.am 2007-11-15 01:51:35.501378544 +0100
+@@ -37,6 +37,7 @@
+ $(top_builddir)/lib/librpm.la \
+ $(top_builddir)/rpmdb/librpmdb.la \
+ $(top_builddir)/rpmio/librpmio.la \
++ @WITH_MAGIC_LIB@ \
+ @WITH_LIBELF_LIB@
+
+ if HAVE_LD_VERSION_SCRIPT
+diff -urN rpm-4.4.9.org/lib/Makefile.am rpm-4.4.9/lib/Makefile.am
+--- rpm-4.4.9.org/lib/Makefile.am 2007-05-19 13:54:06.000000000 +0200
++++ rpm-4.4.9/lib/Makefile.am 2007-11-15 01:52:19.806906700 +0100
+@@ -46,6 +46,7 @@
+ librpm_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS) \
+ $(top_builddir)/rpmdb/librpmdb.la \
+ $(top_builddir)/rpmio/librpmio.la \
++ @WITH_MAGIC_LIB@ \
+ @WITH_POPT_LIB@ \
+ @WITH_SELINUX_LIB@ \
+ @LTLIBINTL@
--- /dev/null
+--- rpm-4.5/scripts/find-debuginfo.sh~ 2010-01-27 19:25:48.000000000 +0200
++++ rpm-4.5/scripts/find-debuginfo.sh 2010-01-27 20:23:37.279516094 +0200
+@@ -24,6 +24,11 @@
+ # Barf on missing build IDs.
+ strict=false
+
++# canon RPM_BUILD_DIR, the DW_AT_comp_dir in ELF objects is real a real path
++# and debugedit will ignore them as they are out of build dir.
++RPM_BUILD_DIR=$(readlink -f "$RPM_BUILD_DIR")
++echo "RPM_BUILD_DIR=$RPM_BUILD_DIR"
++
+ BUILDDIR=.
+ out=debugfiles.list
+ nout=0
+@@ -201,6 +203,11 @@
+ $strict && exit 2
+ fi
+
++ if [ ! -s "$SOURCEFILE" ]; then
++ echo >&2 "*** ${strict_error}: no sources found for $f (stripped without sourcefile information?)"
++ $strict && exit 2
++ fi
++
+ # A binary already copied into /usr/lib/debug doesn't get stripped,
+ # just has its file names collected and adjusted.
+ case "$dn" in
--- /dev/null
+--- rpm-4.5/rpmio/rpmrpc.c~ 2009-10-16 01:18:18.566743349 +0300
++++ rpm-4.5/rpmio/rpmrpc.c 2009-10-16 01:18:21.863999841 +0300
+@@ -179,5 +179,6 @@
+ {
+ const char * lpath;
+ int ut = urlPath(path, &lpath);
++ int fdno;
+
+ if (_rpmio_debug)
+@@ -212,7 +213,17 @@
+ if (mode == 0)
+ mode = 0644;
+ #endif
+- return open(path, flags, mode);
++ fdno = open(path, flags, mode);
++ /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */
++ if (fdno < 0 && errno == ENOENT) {
++ const char *dbpath = rpmExpand("%{_dbpath}", "/", NULL);
++ const char *fn = strstr(path + 1, dbpath);
++ if (fn)
++ fdno = open(fn, flags, mode);
++ if (dbpath)
++ dbpath = _free(dbpath);
++ }
++ return fdno;
+ }
+
+ /* XXX rpmdb.c: analogue to rename(2). */
--- /dev/null
+--- rpm-4.4.9/build/parseBuildInstallClean.c 2008-01-30 23:16:55.347346942 +0200
++++ rpm-4.4.9/build/parseBuildInstallClean.c 2008-01-30 23:22:24.241459876 +0200
+@@ -51,7 +51,6 @@
+ if (s && *s)
+ appendStringBuf(*sbp, s);
+ s = _free(s);
+- sbp = NULL; /* XXX skip %clean from spec file. */
+ }
+
+ /* There are no options to %build, %install, %check, or %clean */
--- /dev/null
+--- rpm-4.4.2/rpmio/Makefile.am.orig 2005-10-07 13:52:53.000000000 +0200
++++ rpm-4.4.2/rpmio/Makefile.am 2005-11-08 15:56:58.000000000 +0100
+@@ -26,8 +26,6 @@
+
+ BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs)
+
+-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
+-
+ usrlibdir = $(libdir)@MARK64@
+ usrlib_LTLIBRARIES = librpmio.la
+ librpmio_la_SOURCES = \
+--- rpm-4.4.2/rpmdb/Makefile.am.orig 2005-10-07 13:52:53.000000000 +0200
++++ rpm-4.4.2/rpmdb/Makefile.am 2005-11-08 15:56:49.000000000 +0100
+@@ -37,9 +37,6 @@
+ # XXX watchout, ../db3/libdb.la created by this Makefile may surprise
+ libdb_la =
+
+-# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
+-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
+-
+ usrlibdir = $(libdir)@MARK64@
+ usrlib_LTLIBRARIES = librpmdb.la
+ librpmdb_la_SOURCES = \
+--- rpm-4.4.2/lib/Makefile.am.orig 2005-10-07 13:52:53.000000000 +0200
++++ rpm-4.4.2/lib/Makefile.am 2005-11-08 15:56:22.000000000 +0100
+@@ -29,8 +29,6 @@
+ mylibs = librpm.la
+ LIBS =
+
+-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
+-
+ usrlibdir = $(libdir)@MARK64@
+ usrlib_LTLIBRARIES = librpm.la
+ librpm_la_SOURCES = \
+--- rpm-4.4.2/build/Makefile.am.orig 2005-03-14 11:03:48.000000000 +0100
++++ rpm-4.4.2/build/Makefile.am 2005-11-08 15:56:12.000000000 +0100
+@@ -22,8 +22,6 @@
+ pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h
+ noinst_HEADERS = buildio.h
+
+-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
+-
+ usrlibdir = $(libdir)@MARK64@
+ usrlib_LTLIBRARIES = librpmbuild.la
+ librpmbuild_la_SOURCES = \
--- /dev/null
+#!/bin/sh
+#
+# Compress documentation files found in $DOCDIR. Omit some files we don't
+# want to get compressed.
+#
+# /etc/rpm/noautocompressdoc and --noautocompressdoc= option can contain
+# whitespace delimated list of patters to omit.
+#
+
+#set -x
+
+COMPRESS_CMD="gzip -9nf"
+EXCLUDE_SUFFIXES="htm html jpg jpeg png gif pdf css dia js abw HTM JPG PNG GIF PDF CSS JS"
+EXCLUDE_MASKS=
+RECOMPRESS_BZIP2=yes
+
+nocompressdoc=''
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --noautocompressdoc=*)
+ EXCLUDE_MASKS=`echo "${1#--noautocompressdoc=}" | sed -e 's/^ *//;s/ *$//;s/ \+/|/g'`
+ esac
+ shift
+done
+
+if [ -r /etc/rpm/noautocompressdoc ]; then
+ exclude=$(cat /etc/rpm/noautocompressdoc | grep -v '^#' | xargs echo | sed -e 's/^ *//;s/ *$//;s/ \+/|/g')
+ if [ -n "${exclude}" ]; then
+ if [ -n "${EXCLUDE_MASKS}" ]; then
+ EXCLUDE_MASKS="${EXCLUDE_MASKS}|${exclude}"
+ else
+ EXCLUDE_MASKS="${exclude}"
+ fi
+ fi
+fi
+
+if [ "$DOCDIR" = "" ] ; then
+ echo '$DOCDIR not set; exiting.'
+ exit 1
+fi
+
+cd $DOCDIR
+
+echo "Compressing documentation in $DOCDIR..."
+
+if test "$EXCLUDE_MASKS" ; then
+ echo "Excluding pattern '$EXCLUDE_MASKS'"
+fi
+
+FIND_CMD="find . -type f "
+for SUF in $EXCLUDE_SUFFIXES ; do
+ FIND_CMD="$FIND_CMD -a -not -name '*.$SUF'"
+done
+
+eval $FIND_CMD | while read FILENAME ; do
+ if test -n "$EXCLUDE_MASKS" ; then
+ if eval "case \$(basename \"$FILENAME\") in
+ $EXCLUDE_MASKS ) true ;;
+ * ) false ;;
+ esac" ; then
+ continue
+ fi
+ fi
+ case "$FILENAME" in
+ *.gz | *.Z)
+ gzip -d "$FILENAME"
+ FILENAME=$(echo "$FILENAME" | sed -e 's/\.gz$//; s/\.Z$//')
+ ;;
+ *.bz2)
+ if [ "$RECOMPRESS_BZIP2" = yes ] ; then
+ bzip2 -d "$FILENAME"
+ FILENAME=$(echo "$FILENAME" | sed -e 's/\.bz2$//')
+ else
+ continue
+ fi
+ ;;
+ esac
+
+ $COMPRESS_CMD "$FILENAME"
+
+ echo -n "$FILENAME "
+done
+
+echo
+echo "Documentation compressed."
--- /dev/null
+--- rpm-4.4.8/build/files.c.orig 2007-02-01 23:21:51.000000000 +0100
++++ rpm-4.4.8/build/files.c 2007-04-08 16:10:27.849202243 +0200
+@@ -1044,6 +1044,16 @@
+ appendStringBuf(pkg->specialDoc, "cp -pr ");
+ appendStringBuf(pkg->specialDoc, specialDocBuf);
+ appendLineStringBuf(pkg->specialDoc, " \"$DOCDIR\"");
++
++ {
++ char *compress_doc;
++
++ compress_doc = rpmExpand("%{__compress_doc}", NULL);
++ if (compress_doc && *compress_doc != '%')
++ appendLineStringBuf(pkg->specialDoc, compress_doc);
++ if (compress_doc)
++ free(compress_doc);
++ }
+ }
+ }
+
+--- rpm-4.5/platform.in~ 2008-04-13 02:54:35.000000000 +0300
++++ rpm-4.5/platform.in 2008-10-27 09:10:32.381772729 +0200
+@@ -67,7 +67,7 @@
+ %{nil}
+
+ # Executed after copying %doc to DOCDIR, with $DOCDIR set
+-#%__compress_doc @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
++%__compress_doc @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
+
+ @redhat@#---------------------------------------------------------------------
+ @redhat@# Expanded at end of %prep
--- /dev/null
+--- rpm-4.5/db/dist/Makefile.in~ 2008-06-11 10:42:04.000000000 +0300
++++ rpm-4.5/db/dist/Makefile.in 2008-09-04 16:44:51.112521915 +0300
+@@ -52,7 +52,7 @@
+ # C API.
+ ##################################################
+ CFLAGS= -c $(CPPFLAGS) @CFLAGS@
+-CC= @MAKEFILE_CC@
++COMPILE= @MAKEFILE_CC@
+ CCLINK= @MAKEFILE_CCLINK@ @CFLAGS@
+
+ LDFLAGS= @LDFLAGS@
+@@ -831,27 +831,27 @@
+ # Multi-threaded testers, benchmarks.
+ ##################################################
+ dbs@o@: $(srcdir)/test_server/dbs.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_am@o@: $(srcdir)/test_server/dbs_am.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_checkpoint@o@: $(srcdir)/test_server/dbs_checkpoint.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_debug@o@: $(srcdir)/test_server/dbs_debug.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_handles@o@: $(srcdir)/test_server/dbs_handles.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_log@o@: $(srcdir)/test_server/dbs_log.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_qam@o@: $(srcdir)/test_server/dbs_qam.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_spawn@o@: $(srcdir)/test_server/dbs_spawn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_trickle@o@: $(srcdir)/test_server/dbs_trickle.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_util@o@: $(srcdir)/test_server/dbs_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbs_yield@o@: $(srcdir)/test_server/dbs_yield.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ DBS_OBJS=\
+ dbs@o@ dbs_am@o@ dbs_checkpoint@o@ dbs_debug@o@ dbs_handles@o@ \
+ dbs_log@o@ dbs_qam@o@ dbs_spawn@o@ dbs_trickle@o@ dbs_util@o@ \
+@@ -862,47 +862,47 @@
+ $(POSTLINK) $@
+
+ db_perf@o@: $(srcdir)/test_perf/db_perf.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_checkpoint@o@: $(srcdir)/test_perf/perf_checkpoint.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_config@o@: $(srcdir)/test_perf/perf_config.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_dbs@o@: $(srcdir)/test_perf/perf_dbs.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_dead@o@: $(srcdir)/test_perf/perf_dead.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_debug@o@: $(srcdir)/test_perf/perf_debug.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_file@o@: $(srcdir)/test_perf/perf_file.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_key@o@: $(srcdir)/test_perf/perf_key.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_log@o@: $(srcdir)/test_perf/perf_log.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_misc@o@: $(srcdir)/test_perf/perf_misc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_op@o@: $(srcdir)/test_perf/perf_op.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_parse@o@: $(srcdir)/test_perf/perf_parse.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_rand@o@: $(srcdir)/test_perf/perf_rand.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_spawn@o@: $(srcdir)/test_perf/perf_spawn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_stat@o@: $(srcdir)/test_perf/perf_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_sync@o@: $(srcdir)/test_perf/perf_sync.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_thread@o@: $(srcdir)/test_perf/perf_thread.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_trickle@o@: $(srcdir)/test_perf/perf_trickle.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_txn@o@: $(srcdir)/test_perf/perf_txn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_util@o@: $(srcdir)/test_perf/perf_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ perf_vx@o@: $(srcdir)/test_perf/perf_vx.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ DBPERF_OBJS=\
+ db_perf@o@ perf_checkpoint@o@ perf_config@o@ perf_dbs@o@ \
+ perf_dead@o@ perf_debug@o@ perf_file@o@ perf_key@o@ perf_log@o@ \
+@@ -916,51 +916,51 @@
+ $(POSTLINK) $@
+
+ db_reptest@o@: $(srcdir)/test_rep/db_reptest.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_accept@o@: $(srcdir)/test_rep/reptest_accept.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_client@o@: $(srcdir)/test_rep/reptest_client.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_config@o@: $(srcdir)/test_rep/reptest_config.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_dbs@o@: $(srcdir)/test_rep/reptest_dbs.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_debug@o@: $(srcdir)/test_rep/reptest_debug.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_elect@o@: $(srcdir)/test_rep/reptest_elect.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_env@o@: $(srcdir)/test_rep/reptest_env.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_exec@o@: $(srcdir)/test_rep/reptest_exec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_file@o@: $(srcdir)/test_rep/reptest_file.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_key@o@: $(srcdir)/test_rep/reptest_key.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_master@o@: $(srcdir)/test_rep/reptest_master.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_misc@o@: $(srcdir)/test_rep/reptest_misc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_msg_thread@o@: $(srcdir)/test_rep/reptest_msg_thread.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_op@o@: $(srcdir)/test_rep/reptest_op.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_parse@o@: $(srcdir)/test_rep/reptest_parse.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_send@o@: $(srcdir)/test_rep/reptest_send.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_site@o@: $(srcdir)/test_rep/reptest_site.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_socket@o@: $(srcdir)/test_rep/reptest_socket.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_spawn@o@: $(srcdir)/test_rep/reptest_spawn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_thread@o@: $(srcdir)/test_rep/reptest_thread.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_txn@o@: $(srcdir)/test_rep/reptest_txn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ reptest_util@o@: $(srcdir)/test_rep/reptest_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ DBREPTEST_OBJS=\
+ db_reptest@o@ perf_rand@o@ reptest_accept@o@ reptest_client@o@ \
+ reptest_config@o@ reptest_dbs@o@ reptest_debug@o@ \
+@@ -977,7 +977,7 @@
+ $(POSTLINK) $@
+
+ tm@o@: $(srcdir)/mutex/tm.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ tm: tm@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) tm@o@ $(DEF_LIB) $(TEST_LIBS) $(LIBS)
+ $(POSTLINK) $@
+@@ -986,25 +986,25 @@
+ # Example programs for C.
+ ##################################################
+ bench_001@o@: $(srcdir)/examples_c/bench_001.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bench_001: bench_001@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) bench_001@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_access@o@: $(srcdir)/examples_c/ex_access.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_access: ex_access@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_access@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_apprec@o@: $(srcdir)/examples_c/ex_apprec/ex_apprec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_apprec_auto@o@: $(srcdir)/examples_c/ex_apprec/ex_apprec_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_apprec_autop@o@: $(srcdir)/examples_c/ex_apprec/ex_apprec_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_apprec_rec@o@: $(srcdir)/examples_c/ex_apprec/ex_apprec_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ EX_APPREC_OBJS=\
+ ex_apprec@o@ ex_apprec_auto@o@ ex_apprec_autop@o@ ex_apprec_rec@o@
+ ex_apprec: $(EX_APPREC_OBJS) $(DEF_LIB)
+@@ -1012,43 +1012,43 @@
+ $(LDFLAGS) $(EX_APPREC_OBJS) $(DEF_LIB) $(TEST_LIBS) $(LIBS)
+
+ ex_btrec@o@: $(srcdir)/examples_c/ex_btrec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_btrec: ex_btrec@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_btrec@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_dbclient@o@: $(srcdir)/examples_c/ex_dbclient.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_dbclient: ex_dbclient@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_dbclient@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_env@o@: $(srcdir)/examples_c/ex_env.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_env: ex_env@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_env@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_lock@o@: $(srcdir)/examples_c/ex_lock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_lock: ex_lock@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_lock@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_mpool@o@: $(srcdir)/examples_c/ex_mpool.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_mpool: ex_mpool@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_mpool@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ rep_base@o@: $(srcdir)/examples_c/ex_rep/base/rep_base.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_common@o@: $(srcdir)/examples_c/ex_rep/common/rep_common.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_msg@o@: $(srcdir)/examples_c/ex_rep/base/rep_msg.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_net@o@: $(srcdir)/examples_c/ex_rep/base/rep_net.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ EX_REP_BASE_OBJS=\
+ rep_base@o@ rep_common@o@ rep_msg@o@ rep_net@o@
+ ex_rep_base: $(EX_REP_BASE_OBJS) $(DEF_LIB)
+@@ -1057,7 +1057,7 @@
+ $(POSTLINK) $@
+
+ rep_mgr@o@: $(srcdir)/examples_c/ex_rep/mgr/rep_mgr.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ EX_REP_MGR_OBJS=\
+ rep_common@o@ rep_mgr@o@
+ ex_rep_mgr: $(EX_REP_MGR_OBJS) $(DEF_LIB)
+@@ -1066,33 +1066,33 @@
+ $(POSTLINK) $@
+
+ ex_sequence@o@: $(srcdir)/examples_c/ex_sequence.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_sequence: ex_sequence@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_sequence@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_thread@o@: $(srcdir)/examples_c/ex_thread.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_thread: ex_thread@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ \
+ $(LDFLAGS) ex_thread@o@ $(DEF_LIB) $(TEST_LIBS) $(LIBS)
+ $(POSTLINK) $@
+
+ ex_tpcb@o@: $(srcdir)/examples_c/ex_tpcb.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ex_tpcb: ex_tpcb@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_tpcb@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ gettingstarted_common@o@: \
+ $(srcdir)/examples_c/getting_started/gettingstarted_common.c
+- $(CC) -I $(srcdir)/examples_c/getting_started $(CFLAGS) $?
++ $(COMPILE) -I $(srcdir)/examples_c/getting_started $(CFLAGS) $?
+ example_database_load@o@: \
+ $(srcdir)/examples_c/getting_started/example_database_load.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ example_database_read@o@: \
+ $(srcdir)/examples_c/getting_started/example_database_read.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ example_database_load: example_database_load@o@ gettingstarted_common@o@ \
+ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+@@ -1105,13 +1105,13 @@
+ $(POSTLINK) $@
+
+ txn_guide_inmemory@o@: $(srcdir)/examples_c/txn_guide/txn_guide_inmemory.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_guide_inmemory: txn_guide_inmemory@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) txn_guide_inmemory@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+ txn_guide@o@: $(srcdir)/examples_c/txn_guide/txn_guide.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_guide: txn_guide@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) txn_guide@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+@@ -1205,479 +1205,479 @@
+ # C API build rules.
+ ##################################################
+ aes_method@o@: $(srcdir)/crypto/aes_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_compare@o@: $(srcdir)/btree/bt_compare.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_conv@o@: $(srcdir)/btree/bt_conv.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_curadj@o@: $(srcdir)/btree/bt_curadj.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_cursor@o@: $(srcdir)/btree/bt_cursor.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_delete@o@: $(srcdir)/btree/bt_delete.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_method@o@: $(srcdir)/btree/bt_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_open@o@: $(srcdir)/btree/bt_open.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_put@o@: $(srcdir)/btree/bt_put.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_rec@o@: $(srcdir)/btree/bt_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_reclaim@o@: $(srcdir)/btree/bt_reclaim.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_recno@o@: $(srcdir)/btree/bt_recno.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_rsearch@o@: $(srcdir)/btree/bt_rsearch.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_search@o@: $(srcdir)/btree/bt_search.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_split@o@: $(srcdir)/btree/bt_split.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_stat@o@: $(srcdir)/btree/bt_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_compact@o@: $(srcdir)/btree/bt_compact.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_upgrade@o@: $(srcdir)/btree/bt_upgrade.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ bt_verify@o@: $(srcdir)/btree/bt_verify.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ btree_auto@o@: $(srcdir)/btree/btree_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ btree_autop@o@: $(srcdir)/btree/btree_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ crdel_auto@o@: $(srcdir)/db/crdel_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ crdel_autop@o@: $(srcdir)/db/crdel_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ crdel_rec@o@: $(srcdir)/db/crdel_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ crypto@o@: $(srcdir)/crypto/crypto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ crypto_stub@o@: $(srcdir)/common/crypto_stub.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db185@o@: $(srcdir)/db185/db185.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db@o@: $(srcdir)/db/db.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_am@o@: $(srcdir)/db/db_am.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_auto@o@: $(srcdir)/db/db_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_autop@o@: $(srcdir)/db/db_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_byteorder@o@: $(srcdir)/common/db_byteorder.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_cam@o@: $(srcdir)/db/db_cam.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_cds@o@: $(srcdir)/db/db_cds.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_clock@o@: $(srcdir)/common/db_clock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_conv@o@: $(srcdir)/db/db_conv.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_dispatch@o@: $(srcdir)/db/db_dispatch.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_dup@o@: $(srcdir)/db/db_dup.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_err@o@: $(srcdir)/common/db_err.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_getlong@o@: $(srcdir)/common/db_getlong.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_idspace@o@: $(srcdir)/common/db_idspace.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_iface@o@: $(srcdir)/db/db_iface.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_join@o@: $(srcdir)/db/db_join.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_log2@o@: $(srcdir)/common/db_log2.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_meta@o@: $(srcdir)/db/db_meta.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_method@o@: $(srcdir)/db/db_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_open@o@: $(srcdir)/db/db_open.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_overflow@o@: $(srcdir)/db/db_overflow.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_ovfl_vrfy@o@: $(srcdir)/db/db_ovfl_vrfy.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_pr@o@: $(srcdir)/db/db_pr.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_rec@o@: $(srcdir)/db/db_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_reclaim@o@: $(srcdir)/db/db_reclaim.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_rename@o@: $(srcdir)/db/db_rename.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_remove@o@: $(srcdir)/db/db_remove.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_ret@o@: $(srcdir)/db/db_ret.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_setid@o@: $(srcdir)/db/db_setid.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_setlsn@o@: $(srcdir)/db/db_setlsn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_salloc@o@: $(srcdir)/env/db_salloc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_shash@o@: $(srcdir)/env/db_shash.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_stati@o@: $(srcdir)/db/db_stati.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_truncate@o@: $(srcdir)/db/db_truncate.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_upg@o@: $(srcdir)/db/db_upg.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_upg_opd@o@: $(srcdir)/db/db_upg_opd.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_vrfy@o@: $(srcdir)/db/db_vrfy.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_vrfyutil@o@: $(srcdir)/db/db_vrfyutil.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_vrfy_stub@o@: $(srcdir)/db/db_vrfy_stub.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbm@o@: $(srcdir)/dbm/dbm.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbreg@o@: $(srcdir)/dbreg/dbreg.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbreg_auto@o@: $(srcdir)/dbreg/dbreg_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbreg_autop@o@: $(srcdir)/dbreg/dbreg_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbreg_rec@o@: $(srcdir)/dbreg/dbreg_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbreg_stat@o@: $(srcdir)/dbreg/dbreg_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ dbreg_util@o@: $(srcdir)/dbreg/dbreg_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_config@o@: $(srcdir)/env/env_config.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_failchk@o@: $(srcdir)/env/env_failchk.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_file@o@: $(srcdir)/env/env_file.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_method@o@: $(srcdir)/env/env_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_open@o@: $(srcdir)/env/env_open.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_recover@o@: $(srcdir)/env/env_recover.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_region@o@: $(srcdir)/env/env_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_register@o@: $(srcdir)/env/env_register.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ env_stat@o@: $(srcdir)/env/env_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ fileops_auto@o@: $(srcdir)/fileops/fileops_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ fileops_autop@o@: $(srcdir)/fileops/fileops_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ fop_basic@o@: $(srcdir)/fileops/fop_basic.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ fop_rec@o@: $(srcdir)/fileops/fop_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ fop_util@o@: $(srcdir)/fileops/fop_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash@o@: $(srcdir)/hash/hash.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_auto@o@: $(srcdir)/hash/hash_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_autop@o@: $(srcdir)/hash/hash_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_conv@o@: $(srcdir)/hash/hash_conv.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_dup@o@: $(srcdir)/hash/hash_dup.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_func@o@: $(srcdir)/hash/hash_func.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_meta@o@: $(srcdir)/hash/hash_meta.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_method@o@: $(srcdir)/hash/hash_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_open@o@: $(srcdir)/hash/hash_open.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_page@o@: $(srcdir)/hash/hash_page.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_rec@o@: $(srcdir)/hash/hash_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_reclaim@o@: $(srcdir)/hash/hash_reclaim.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_stat@o@: $(srcdir)/hash/hash_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_stub@o@: $(srcdir)/hash/hash_stub.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_upgrade@o@: $(srcdir)/hash/hash_upgrade.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hash_verify@o@: $(srcdir)/hash/hash_verify.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hmac@o@: $(srcdir)/hmac/hmac.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ hsearch@o@: $(srcdir)/hsearch/hsearch.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock@o@: $(srcdir)/lock/lock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_deadlock@o@:$(srcdir)/lock/lock_deadlock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_failchk@o@:$(srcdir)/lock/lock_failchk.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_id@o@:$(srcdir)/lock/lock_id.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_list@o@:$(srcdir)/lock/lock_list.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_method@o@:$(srcdir)/lock/lock_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_region@o@:$(srcdir)/lock/lock_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_stat@o@:$(srcdir)/lock/lock_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_timer@o@:$(srcdir)/lock/lock_timer.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ lock_util@o@:$(srcdir)/lock/lock_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log@o@: $(srcdir)/log/log.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_archive@o@: $(srcdir)/log/log_archive.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_compare@o@: $(srcdir)/log/log_compare.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_debug@o@: $(srcdir)/log/log_debug.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_get@o@: $(srcdir)/log/log_get.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_method@o@: $(srcdir)/log/log_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_put@o@: $(srcdir)/log/log_put.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ log_stat@o@: $(srcdir)/log/log_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mkpath@o@: $(srcdir)/common/mkpath.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_alloc@o@: $(srcdir)/mp/mp_alloc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_bh@o@: $(srcdir)/mp/mp_bh.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_fget@o@: $(srcdir)/mp/mp_fget.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_fmethod@o@: $(srcdir)/mp/mp_fmethod.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_fopen@o@: $(srcdir)/mp/mp_fopen.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_fput@o@: $(srcdir)/mp/mp_fput.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_fset@o@: $(srcdir)/mp/mp_fset.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_method@o@: $(srcdir)/mp/mp_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_mvcc@o@: $(srcdir)/mp/mp_mvcc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_region@o@: $(srcdir)/mp/mp_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_register@o@: $(srcdir)/mp/mp_register.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_stat@o@: $(srcdir)/mp/mp_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_sync@o@: $(srcdir)/mp/mp_sync.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mp_trickle@o@: $(srcdir)/mp/mp_trickle.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mt19937db@o@: $(srcdir)/crypto/mersenne/mt19937db.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_alloc@o@: $(srcdir)/mutex/mut_alloc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_failchk@o@: $(srcdir)/mutex/mut_failchk.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_fcntl@o@: $(srcdir)/mutex/mut_fcntl.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_method@o@: $(srcdir)/mutex/mut_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_pthread@o@: $(srcdir)/mutex/mut_pthread.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_region@o@: $(srcdir)/mutex/mut_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_stat@o@: $(srcdir)/mutex/mut_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_tas@o@: $(srcdir)/mutex/mut_tas.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ mut_win32@o@: $(srcdir)/mutex/mut_win32.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_abs@o@: $(srcdir)/@OSDIR@/os_abs.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_alloc@o@: $(srcdir)/os/os_alloc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_clock@o@: $(srcdir)/@OSDIR@/os_clock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_config@o@: $(srcdir)/@OSDIR@/os_config.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_dir@o@: $(srcdir)/@OSDIR@/os_dir.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_errno@o@: $(srcdir)/@OSDIR@/os_errno.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_fid@o@: $(srcdir)/@OSDIR@/os_fid.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_flock@o@: $(srcdir)/@OSDIR@/os_flock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_fsync@o@: $(srcdir)/@OSDIR@/os_fsync.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_fzero@o@: $(srcdir)/os/os_fzero.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_getenv@o@: $(srcdir)/@OSDIR@/os_getenv.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_handle@o@: $(srcdir)/@OSDIR@/os_handle.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_map@o@: $(srcdir)/@OSDIR@/os_map.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_method@o@: $(srcdir)/os/os_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_mkdir@o@: $(srcdir)/os/os_mkdir.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_oflags@o@: $(srcdir)/os/os_oflags.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_open@o@: $(srcdir)/@OSDIR@/os_open.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_pid@o@: $(srcdir)/os/os_pid.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_region@o@: $(srcdir)/os/os_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_rename@o@: $(srcdir)/@OSDIR@/os_rename.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_root@o@: $(srcdir)/os/os_root.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_rpath@o@: $(srcdir)/os/os_rpath.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_rw@o@: $(srcdir)/@OSDIR@/os_rw.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_seek@o@: $(srcdir)/@OSDIR@/os_seek.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_sleep@o@: $(srcdir)/@OSDIR@/os_sleep.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_spin@o@: $(srcdir)/@OSDIR@/os_spin.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_stat@o@: $(srcdir)/@OSDIR@/os_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_tmpdir@o@: $(srcdir)/os/os_tmpdir.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_truncate@o@: $(srcdir)/@OSDIR@/os_truncate.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_uid@o@: $(srcdir)/os/os_uid.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_unlink@o@: $(srcdir)/os/os_unlink.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ os_yield@o@: $(srcdir)/os/os_yield.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam@o@: $(srcdir)/qam/qam.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_auto@o@: $(srcdir)/qam/qam_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_autop@o@: $(srcdir)/qam/qam_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_conv@o@: $(srcdir)/qam/qam_conv.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_files@o@: $(srcdir)/qam/qam_files.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_method@o@: $(srcdir)/qam/qam_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_open@o@: $(srcdir)/qam/qam_open.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_rec@o@: $(srcdir)/qam/qam_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_stat@o@: $(srcdir)/qam/qam_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_stub@o@: $(srcdir)/qam/qam_stub.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_upgrade@o@: $(srcdir)/qam/qam_upgrade.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ qam_verify@o@: $(srcdir)/qam/qam_verify.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_auto@o@: $(srcdir)/rep/rep_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_autop@o@: $(srcdir)/rep/rep_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_backup@o@: $(srcdir)/rep/rep_backup.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_elect@o@: $(srcdir)/rep/rep_elect.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_log@o@: $(srcdir)/rep/rep_log.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_method@o@: $(srcdir)/rep/rep_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_record@o@: $(srcdir)/rep/rep_record.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_region@o@: $(srcdir)/rep/rep_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_stub@o@: $(srcdir)/rep/rep_stub.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_stat@o@: $(srcdir)/rep/rep_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_util@o@: $(srcdir)/rep/rep_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rep_verify@o@: $(srcdir)/rep/rep_verify.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_elect@o@: $(srcdir)/repmgr/repmgr_elect.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_method@o@: $(srcdir)/repmgr/repmgr_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_msg@o@: $(srcdir)/repmgr/repmgr_msg.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_net@o@: $(srcdir)/repmgr/repmgr_net.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_posix@o@: $(srcdir)/repmgr/repmgr_posix.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_queue@o@: $(srcdir)/repmgr/repmgr_queue.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_sel@o@: $(srcdir)/repmgr/repmgr_sel.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_stat@o@: $(srcdir)/repmgr/repmgr_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ repmgr_util@o@: $(srcdir)/repmgr/repmgr_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rijndael-alg-fst@o@: $(srcdir)/crypto/rijndael/rijndael-alg-fst.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rijndael-api-fst@o@: $(srcdir)/crypto/rijndael/rijndael-api-fst.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ seq_stat@o@: $(srcdir)/sequence/seq_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ sequence@o@: $(srcdir)/sequence/sequence.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ sha1@o@: $(srcdir)/hmac/sha1.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ stat_stub@o@: $(srcdir)/common/stat_stub.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn@o@: $(srcdir)/txn/txn.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_auto@o@: $(srcdir)/txn/txn_auto.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_autop@o@: $(srcdir)/txn/txn_autop.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_chkpt@o@: $(srcdir)/txn/txn_chkpt.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_failchk@o@: $(srcdir)/txn/txn_failchk.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_method@o@: $(srcdir)/txn/txn_method.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_rec@o@: $(srcdir)/txn/txn_rec.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_recover@o@: $(srcdir)/txn/txn_recover.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_region@o@: $(srcdir)/txn/txn_region.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_stat@o@: $(srcdir)/txn/txn_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ txn_util@o@: $(srcdir)/txn/txn_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ util_cache@o@: $(srcdir)/common/util_cache.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ util_log@o@: $(srcdir)/common/util_log.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ util_sig@o@: $(srcdir)/common/util_sig.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ uts4_cc@o@: $(srcdir)/mutex/uts4_cc.s
+ $(AS) $(ASFLAGS) -o $@ $?
+ xa@o@: $(srcdir)/xa/xa.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ xa_db@o@: $(srcdir)/xa/xa_db.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ xa_map@o@: $(srcdir)/xa/xa_map.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+
+ ##################################################
+ # C++ API build rules.
+@@ -1709,62 +1709,62 @@
+ # Java API build rules.
+ ##################################################
+ db_java_wrap@o@: $(srcdir)/libdb_java/db_java_wrap.c
+- $(CC) $(CFLAGS) $(SWIGCFLAGS) $?
++ $(COMPILE) $(CFLAGS) $(SWIGCFLAGS) $?
+
+ ##################################################
+ # Tcl API build rules.
+ ##################################################
+ tcl_compat@o@: $(srcdir)/tcl/tcl_compat.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_db@o@: $(srcdir)/tcl/tcl_db.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_db_pkg@o@: $(srcdir)/tcl/tcl_db_pkg.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_dbcursor@o@: $(srcdir)/tcl/tcl_dbcursor.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_env@o@: $(srcdir)/tcl/tcl_env.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_internal@o@: $(srcdir)/tcl/tcl_internal.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_lock@o@: $(srcdir)/tcl/tcl_lock.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_log@o@: $(srcdir)/tcl/tcl_log.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_mp@o@: $(srcdir)/tcl/tcl_mp.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_rep@o@: $(srcdir)/tcl/tcl_rep.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_seq@o@: $(srcdir)/tcl/tcl_seq.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_txn@o@: $(srcdir)/tcl/tcl_txn.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+ tcl_util@o@: $(srcdir)/tcl/tcl_util.c
+- $(CC) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
++ $(COMPILE) $(CFLAGS) $(TCL_INCLUDE_SPEC) $?
+
+ ##################################################
+ # RPC build rules.
+ ##################################################
+ # RPC client files
+ client@o@: $(srcdir)/rpc_client/client.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_server_clnt@o@: db_server_clnt.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ gen_client@o@: $(srcdir)/rpc_client/gen_client.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ gen_client_ret@o@: $(srcdir)/rpc_client/gen_client_ret.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+
+ # RPC server files
+ db_server_proc@o@: $(srcdir)/rpc_server/c/db_server_proc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_server_svc@o@: db_server_svc.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_server_util@o@: $(srcdir)/rpc_server/c/db_server_util.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_server_xdr@o@: db_server_xdr.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ gen_db_server@o@: gen_db_server.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_server_cxxproc@o@: $(srcdir)/rpc_server/cxx/db_server_cxxproc.cpp
+ $(CXX) $(CXXFLAGS) $?
+ db_server_cxxutil@o@: $(srcdir)/rpc_server/cxx/db_server_cxxutil.cpp
+@@ -1774,86 +1774,86 @@
+ # Utility build rules.
+ ##################################################
+ db_archive@o@: $(srcdir)/db_archive/db_archive.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_checkpoint@o@: $(srcdir)/db_checkpoint/db_checkpoint.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_deadlock@o@: $(srcdir)/db_deadlock/db_deadlock.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_dump@o@: $(srcdir)/db_dump/db_dump.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_dump185@o@: $(srcdir)/db_dump185/db_dump185.c
+- $(CC) $(DB185INC) $?
++ $(COMPILE) $(DB185INC) $?
+ db_hotbackup@o@: $(srcdir)/db_hotbackup/db_hotbackup.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_load@o@: $(srcdir)/db_load/db_load.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_printlog@o@: $(srcdir)/db_printlog/db_printlog.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_recover@o@: $(srcdir)/db_recover/db_recover.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_stat@o@: $(srcdir)/db_stat/db_stat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_upgrade@o@: $(srcdir)/db_upgrade/db_upgrade.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ db_verify@o@: $(srcdir)/db_verify/db_verify.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+
+ ##################################################
+ # C library replacement files.
+ ##################################################
+ atoi@o@: $(srcdir)/clib/atoi.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ atol@o@: $(srcdir)/clib/atol.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ ctime@o@: $(srcdir)/clib/ctime.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ getaddrinfo@o@: $(srcdir)/clib/getaddrinfo.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ getcwd@o@: $(srcdir)/clib/getcwd.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ getopt@o@: $(srcdir)/clib/getopt.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ isalpha@o@: $(srcdir)/clib/isalpha.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ isdigit@o@: $(srcdir)/clib/isdigit.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ isprint@o@: $(srcdir)/clib/isprint.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ isspace@o@: $(srcdir)/clib/isspace.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ memcmp@o@: $(srcdir)/clib/memcmp.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ memcpy@o@: $(srcdir)/clib/memmove.c
+- $(CC) -DMEMCOPY $(CFLAGS) $? -o $@
++ $(COMPILE) -DMEMCOPY $(CFLAGS) $? -o $@
+ memmove@o@: $(srcdir)/clib/memmove.c
+- $(CC) -DMEMMOVE $(CFLAGS) $?
++ $(COMPILE) -DMEMMOVE $(CFLAGS) $?
+ printf@o@: $(srcdir)/clib/printf.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ raise@o@: $(srcdir)/clib/raise.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ rand@o@: $(srcdir)/clib/rand.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strcasecmp@o@: $(srcdir)/clib/strcasecmp.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strdup@o@: $(srcdir)/clib/strdup.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ snprintf@o@: $(srcdir)/clib/snprintf.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strcat@o@: $(srcdir)/clib/strcat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strchr@o@: $(srcdir)/clib/strchr.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strerror@o@: $(srcdir)/clib/strerror.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strncat@o@: $(srcdir)/clib/strncat.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strncmp@o@: $(srcdir)/clib/strncmp.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strrchr@o@: $(srcdir)/clib/strrchr.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strsep@o@: $(srcdir)/clib/strsep.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strtol@o@: $(srcdir)/clib/strtol.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+ strtoul@o@: $(srcdir)/clib/strtoul.c
+- $(CC) $(CFLAGS) $?
++ $(COMPILE) $(CFLAGS) $?
+--- rpm-4.5/rpmdb/Makefile.am~ 2008-09-04 16:48:01.000000000 +0300
++++ rpm-4.5/rpmdb/Makefile.am 2008-09-04 17:00:08.797533944 +0300
+@@ -94,7 +94,7 @@
+
+ # XXX grrr, force noinst libdb.la for db3.
+ $(libdb_la):
+- sed -e"/^libdir=/s/^.*$$/libdir=''/" < $(top_builddir)/$(WITH_DB_SUBDIR)/libdb-4.7.la > $(libdb_la)
++ sed -e"/^libdir=/s/^.*$$/libdir=''/" < $(top_builddir)/$(WITH_DB_SUBDIR)/libdb-4.5.la > $(libdb_la)
+
+ db_archive_SOURCES =
+ db_archive_LDADD = \
--- /dev/null
+--- rpm-4.5/rpmdb/dbconfig.c~ 2007-07-27 20:51:24.000000000 +0200
++++ rpm-4.5/rpmdb/dbconfig.c 2009-09-20 21:29:10.437004649 +0200
+@@ -46,8 +46,10 @@
+ NULL, NULL },
+ #endif
+
++#ifdef DB_XA_CREATE
+ { "xa_create", 0,POPT_BIT_SET, &db3dbi.dbi_cflags, DB_XA_CREATE,
+ NULL, NULL },
++#endif
+
+ /* DB_ENV->open and DB->open */
+ #if defined(DB_AUTO_COMMIT)
--- /dev/null
+--- rpm-4.5/db3/configure 2007-05-25 20:35:57.000000000 +0300
++++ trunk/db3/configure 2007-07-01 21:45:10.000000000 +0300
+@@ -7,22 +7,45 @@
+
+ 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=.*$%%'`"
+-
+-CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
+- --enable-shared --enable-static --enable-rpc \
+- --with-uniquename=_rpmdb --srcdir=$db_dist
++# We iterate over the argument list. Processing the arguments using
++# echo "$*" can fail with the sed chopping out parts of unrelated
++# arguments
++set -- "$@" eoa_marker
++while [ "$1" != "eoa_marker" ]; do
++ ARG=`echo "$1" | \
++ sed -e 's%CFLAGS=.*%%' \
++ -e 's%--param=.*%%g' \
++ -e 's%--cache-file=.*$%%' \
++ -e 's%--with-db-rpc=\(.*\)%--enable-rpc=\1%' \
++ -e 's%--with-db-rpc%--enable-rpc%' \
++ -e 's%--without-db-rpc%--disable-rpc%' \
++ -e 's%--with-db-largefile=\(.*\)%--enable-largefile=\1%' \
++ -e 's%--with-db-largefile%--enable-largefile%' \
++ -e 's%--without-db-largefile%--disable-largefile%' \
++ -e 's%--with-db-mutex=\(.*\)%--with-mutex=\1%' \
++ -e 's%--with-db-mutex%%' \
++ -e 's%--without-db-mutex%%' \
++ `
++ shift
++ set -- "$@" "$ARG"
++done
++shift
++
++
++# NOTICE:
++# 1. "--enable-shared" is there for enforcing GNU libtool usage only
++# as Berkeley-DB "configure" else would not use GNU libtool at all.
++# 2. "--enable-static" is there for enforcing the building of a static
++# version of the libdb objects RPM actually is interested in.
++
++CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure "$@" \
++ --enable-shared --enable-static \
++ --with-uniquename=_rpmdb --srcdir=$db_dist || exit 1
+
+ mv Makefile Makefile.orig
+ cat Makefile.orig | sed -e '/^install[:-]/c\
+-.PHONY: listobjs\
+-listobjs:\
+-\ @echo $(OBJS) $(C_OBJS) \
+-\
+ distdir install check:\
+-\
+-db4_install: all install_setip' > Makefile
++' -e 's/^\(SOFLAGS=\).*$/\1/' > Makefile
+
+ mv db.h db.h.orig
+ cat db.h.orig | sed \
+@@ -35,5 +58,3 @@
+ -e '/^int txn_commit __P((/a\
+ /*@=declundef =noparams =fcnuse =fielduse =enummemuse =typeuse @*/' > db.h
+
+-# Generate manifest for rpmdb.
+-make -s listobjs > db3lobjs
--- /dev/null
+--- rpm-4.5/scripts/find-debuginfo.sh~ 2009-06-08 23:57:15.000000000 +0300
++++ rpm-4.5/scripts/find-debuginfo.sh 2009-06-09 00:10:21.603343056 +0300
+@@ -306,6 +306,9 @@
+ sed -n -r "\#^$ptn #s/ .*\$//p" "$LINKSFILE" | append_uniq "$out"
+ }
+
++# get rid of top level dir, we want it be only in filesystem-debuginfo package
++sed -i -e '/^%dir \/usr\/lib\/debug$/d' "$LISTFILE"
++
+ #
+ # When given multiple -o switches, split up the output as directed.
+ #
--- /dev/null
+diff -urN rpm-4.5/doc/rpmbuild.8 rpm-4.5.new/doc/rpmbuild.8
+--- rpm-4.5/doc/rpmbuild.8 2009-04-12 11:29:27.449408696 +0200
++++ rpm-4.5.new/doc/rpmbuild.8 2009-04-12 12:04:02.462534640 +0200
+@@ -252,6 +252,13 @@
+ .SS "Temporary"
+ .PP
+ \fI/var/tmp/rpm*\fR
++.SH "BUGS"
++Extraction of the debugging data may fail if the source refer to files
++with "//" in their path. In that case, the tool "debugedit" used by rpmbuild
++to extract the debugging information will fail with a message "canonicalization
++unexpectedly shrank by one character" but the binary package will be built
++nevertheless.
++
+ .SH "SEE ALSO"
+
+ .nf
+diff -urN rpm-4.5/scripts/find-debuginfo.sh rpm-4.5.new/scripts/find-debuginfo.sh
+--- rpm-4.5/scripts/find-debuginfo.sh 2009-04-12 11:29:27.006092294 +0200
++++ rpm-4.5.new/scripts/find-debuginfo.sh 2009-04-12 11:59:26.240060976 +0200
+@@ -200,7 +200,7 @@
+
+ echo "extracting debug info from $f"
+ id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
+- -i -l "$SOURCEFILE" "$f") || exit
++ -i -l "$SOURCEFILE" "$f")
+ if [ -z "$id" ]; then
+ echo >&2 "*** ${strict_error}: No build ID note found in $f"
+ $strict && exit 2
--- /dev/null
+--- rpm-4.4.9.orig/macros.in 2008-01-31 19:20:08.798315963 +0200
++++ rpm-4.4.9/macros.in 2008-01-31 19:20:50.850567944 +0200
+@@ -188,15 +188,21 @@
+ %debug_package \
+ %ifnarch noarch\
+ %global __debug_package 1\
+-%package debug\
++%package debuginfo\
+ Summary: Debug information for package %{name}\
++Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\
+ Group: Development/Debug\
++Requires: filesystem-debuginfo >= 3.0-16\
+ AutoReqProv: 0\
+-%description debug\
++%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 debug -f debugfiles.list\
++%description debuginfo -l pl.UTF-8\
++Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
++Informacje te są przydatne przy rozwijaniu aplikacji używających tego\
++pakietu oraz przy odpluskwianiu samego pakietu.\
++%files debuginfo -f debugfiles.list\
+ %defattr(-,root,root)\
+ %endif\
+ %{nil}
+@@ -1046,7 +1052,7 @@
+ %{?buildroot:%{__rm} -rf '%{buildroot}'}
+ %__spec_install_body %{___build_body}
+ %__spec_install_post\
+-%{?__debug_package:%{__debug_install_post}}\
++%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
+ %{__arch_install_post}\
+ %{__os_install_post}\
+ %{nil}
+--- rpm-4.4.9.orig/platform.in 2008-01-31 19:20:08.676303626 +0200
++++ rpm-4.4.9/platform.in 2008-01-31 19:20:50.844567337 +0200
+@@ -61,7 +61,7 @@
+ %{nil}
+
+ %__spec_install_post\
+- %{?__debug_package:%{__debug_install_post}}\
++ %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
+ %{__arch_install_post}\
+ %{__os_install_post}\
+ %{nil}
--- /dev/null
+Index: lib/depends.c
+===================================================================
+RCS file: /v/rpm/cvs/rpm/lib/depends.c,v
+retrieving revision 1.404
+retrieving revision 1.405
+diff -w -u -r1.404 -r1.405
+--- lib/depends.c 3 Jul 2008 15:08:05 -0000 1.404
++++ lib/depends.c 17 Jul 2008 13:57:42 -0000 1.405
+@@ -1462,6 +1462,8 @@
+ int terminate = 2; /* XXX terminate if rc >= terminate */
+ int rc;
+ int ourrc = 0;
++ int dirname_deps;
++ int symlink_deps;
+
+ requires = rpmdsInit(requires);
+ if (requires != NULL)
+@@ -1537,6 +1539,8 @@
+ }
+ }
+
++ dirname_deps = rpmExpandNumeric("%{?_check_dirname_deps}%{?!_check_dirname_deps:1}");
++ if (dirname_deps) {
+ dirnames = rpmdsInit(dirnames);
+ if (dirnames != NULL)
+ while (ourrc < terminate && rpmdsNext(dirnames) >= 0) {
+@@ -1577,7 +1581,10 @@
+ /*@switchbreak@*/ break;
+ }
+ }
++ }
+
++ symlink_deps = rpmExpandNumeric("%{?_check_symlink_deps}%{?!_check_symlink_deps:1}");
++ if (symlink_deps) {
+ linktos = rpmdsInit(linktos);
+ if (linktos != NULL)
+ while (ourrc < terminate && rpmdsNext(linktos) >= 0) {
+@@ -1595,6 +1602,7 @@
+ dscolor = rpmdsColor(linktos);
+ if (tscolor && dscolor && !(tscolor & dscolor))
+ continue;
++ }
+
+ rc = unsatisfiedDepend(ts, linktos, adding);
+
--- /dev/null
+--- rpm-4.5/macros.in~ 2008-10-26 23:13:47.000000000 +0200
++++ rpm-4.5/macros.in 2008-10-26 23:14:17.862069247 +0200
+@@ -811,7 +811,7 @@
+ %_repackage_root %{nil}
+
+ # If non-zero, all erasures will be automagically repackaged.
+-%_repackage_all_erasures 1
++%_repackage_all_erasures 0
+
+ # Prevent pure erasure transactions with --rollback. Pure
+ # erasure rollback transactions will undo an anaconda install,
+@@ -1476,7 +1476,7 @@
+ #%__scriptlet_requires /bin/bash --rpm-requires
+
+ # PLD rpm macros
+-%_enable_debug_packages 1
++%_enable_debug_packages 0
+
+ #-----------------------------------------------------------------
+ # CFLAGS and LDFLAGS used to build
--- /dev/null
+--- rpm-4.5/macros.in~ 2008-06-10 02:17:16.000000000 +0300
++++ rpm-4.5/macros.in 2008-06-10 02:17:47.682505213 +0300
+@@ -350,7 +350,7 @@
+ # "w9.lzdio" lzma level 9.
+ #
+ %_source_payload w9.gzdio
+-%_binary_payload w9.lzdio
++%_binary_payload w9.bzdio
+
+ # Archive formats to use for source/binary package payloads.
+ # "cpio" cpio archive (default)
+@@ -1448,8 +1448,8 @@
+ #
+ # Note: Used iff _use_internal_dependency_generator is non-zero. The
+ # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+-%__libtool_provides %{_rpmhome}/libtooldeps.sh --provides %{buildroot} %{name}
+-%__libtool_requires %{_rpmhome}/libtooldeps.sh --requires %{buildroot} %{name}
++#%__libtool_provides %{_rpmhome}/libtooldeps.sh --provides %{buildroot} %{name}
++#%__libtool_requires %{_rpmhome}/libtooldeps.sh --requires %{buildroot} %{name}
+
+ #------------------------------------------------------------------------
+ # pkgconfig(...) configuration.
+@@ -1458,8 +1458,8 @@
+ #
+ # Note: Used iff _use_internal_dependency_generator is non-zero. The
+ # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+-%__pkgconfig_provides %{_rpmhome}/pkgconfigdeps.sh --provides
+-%__pkgconfig_requires %{_rpmhome}/pkgconfigdeps.sh --requires
++#%__pkgconfig_provides %{_rpmhome}/pkgconfigdeps.sh --provides
++#%__pkgconfig_requires %{_rpmhome}/pkgconfigdeps.sh --requires
+
+ #------------------------------------------------------------------------
+ # executable(...) configuration.
+@@ -1451,7 +1451,7 @@
+ #%__scriptlet_requires /bin/bash --rpm-requires
+
+ # PLD rpm macros
+-%_enable_debug_packages 1
++%_enable_debug_packages 0
+
+ #-----------------------------------------------------------------
+ # CFLAGS and LDFLAGS used to build
--- /dev/null
+--- rpm-4.5/macros.in~ 2009-06-05 00:50:12.000000000 +0300
++++ rpm-4.5/macros.in 2009-06-05 01:25:32.648494029 +0300
+@@ -746,8 +746,8 @@
+
+ # Horowitz Key Protocol server configuration
+ #
+-%_hkp_keyserver hkp://subkeys.pgp.net
+-%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x
++#%_hkp_keyserver hkp://subkeys.pgp.net
++#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x
+
+ #==============================================================================
+ # ---- Transaction macros.
--- /dev/null
+--- rpm-4.4.9/Doxyfile.in.orig 2007-05-13 05:20:43.000000000 +0200
++++ rpm-4.4.9/Doxyfile.in 2007-05-22 17:41:12.107028314 +0200
+@@ -504,23 +504,6 @@
+ @top_srcdir@/doc/manual/spec \
+ @top_srcdir@/doc/manual/triggers \
+ @top_srcdir@/doc/manual/tsort \
+- @top_srcdir@/file/src/apprentice.c \
+- @top_srcdir@/file/src/apptype.c \
+- @top_srcdir@/file/src/ascmagic.c \
+- @top_srcdir@/file/src/compress.c \
+- @top_srcdir@/file/src/file.c \
+- @top_srcdir@/file/src/file.h \
+- @top_srcdir@/file/src/fsmagic.c \
+- @top_srcdir@/file/src/funcs.c \
+- @top_srcdir@/file/src/is_tar.c \
+- @top_srcdir@/file/src/magic.c \
+- @top_srcdir@/file/src/magic.h \
+- @top_srcdir@/file/src/names.h \
+- @top_srcdir@/file/src/print.c \
+- @top_srcdir@/file/src/readelf.c \
+- @top_srcdir@/file/src/readelf.h \
+- @top_srcdir@/file/src/softmagic.c \
+- @top_srcdir@/file/src/tar.h \
+ @top_srcdir@/lib/cpio.c \
+ @top_srcdir@/lib/cpio.h \
+ @top_srcdir@/lib/depends.c \
--- /dev/null
+--- rpm-4.3.orig/build/parsePreamble.c 2003-11-16 13:47:23.000000000 +0100
++++ rpm-4.3/build/parsePreamble.c 2004-02-29 15:40:58.466804704 +0100
+@@ -942,6 +943,12 @@
+ headerCopyTags(spec->packages->header, pkg->header,
+ (int_32 *)copyTagsDuringParse);
+
++ if (headerGetEntry(pkg->header, RPMTAG_EPOCH, NULL, NULL, NULL) == 0) {
++ int num = 0;
++ headerAddEntry(pkg->header, RPMTAG_EPOCH, RPM_INT32_TYPE, &num, 1);
++ addMacro(spec->macros, "epoch", NULL, "0", RMIL_SPEC);
++ }
++
+ if (checkForRequired(pkg->header, NVR))
+ return RPMERR_BADSPEC;
+
--- /dev/null
+diff -Nru rpm-4.1/lib/rpmrc.c rpm-4.1.new/lib/rpmrc.c
+--- rpm-4.1/lib/rpmrc.c Tue Aug 20 16:53:44 2002
++++ rpm-4.1.new/lib/rpmrc.c Tue Mar 11 18:41:48 2003
+@@ -1820,23 +1820,37 @@
+ /* Expand ~/ to $HOME/ */
+ fn[0] = '\0';
+ if (r[0] == '~' && r[1] == '/') {
++ const char * etc_dir = getenv("HOME_ETC");
+ const char * home = getenv("HOME");
+- if (home == NULL) {
+- /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
+- if (rcfiles == rpmRcfiles && myrcfiles != r)
+- continue;
+- rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
+- rc = 1;
+- break;
+- }
+- if (strlen(home) > (sizeof(fn) - strlen(r))) {
+- rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
+- r);
+- rc = 1;
+- break;
++ if (etc_dir) {
++ if (strlen(etc_dir) > (sizeof(fn) - strlen(r))) {
++ rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME_ETC is too large.\n"),r);
++ rc = 1;
++ break;
++ }
++ strcpy(fn, etc_dir);
++ strncat(fn, "/", sizeof(fn) - strlen(fn));
++ r+=2;
++ } else {
++ if (home == NULL) {
++ /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
++ if (rcfiles == rpmRcfiles && myrcfiles != r)
++ continue;
++ rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
++ rc = 1;
++ break;
++ }
++ if (strlen(home) > (sizeof(fn) - strlen(r))) {
++ rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
++ r);
++ rc = 1;
++ break;
++ }
++ strcpy(fn, home);
++ r++;
+ }
+- strcpy(fn, home);
+- r++;
++
++
+ }
+ strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
+ fn[sizeof(fn)-1] = '\0';
+--- rpm-4.5/po/pl.po~ 2008-04-13 03:27:17.000000000 +0300
++++ rpm-4.5/po/pl.po 2008-04-13 03:27:53.561742210 +0300
+@@ -3088,6 +3088,10 @@
+ msgid "Cannot read %s, HOME is too large.\n"
+ msgstr "Nie mo¿na odczytaæ %s, HOME jest zbyt du¿e.\n"
+
++#: lib/rpmrc.c:1935
++msgid "Cannot read %s, HOME_ETC is too large.\n"
++msgstr "Nie mo¿na odczytaæ %s, HOME_ETC jest zbyt du¿e.\n"
++
+ #: lib/rpmrc.c:1961
+ #, c-format
+ msgid "Unable to open %s for reading: %s.\n"
--- /dev/null
+#!/bin/sh
+# Display bcond (_with_*, _without_*) macros from given spec
+# $Id: rpm-find-spec-bcond,v 1.10 2008/02/23 17:33:34 glen Exp $
+
+if [ "$#" = 0 ]; then
+ echo "Usage: $0 SPEC"
+ exit 1
+fi
+
+SPEC=$1
+if [ $SPEC = "--" ]; then
+ if [ "$#" -lt 2 ]; then
+ echo "Usage: rpmbuikd --bcond SPEC"
+ exit 1
+ fi
+ SPEC=$2
+fi
+
+if [ ! -f $SPEC ]; then
+ echo "rpmbuild: $SPEC: no such file"
+ exit 1
+fi
+
+bconds=`awk -F"\n" 'BEGIN { chlog=0 }
+ /^%changelog/ { chlog=1 }
+ /_with(out)?_[_a-zA-Z0-9]+/ && chlog == 0 {
+ match($0, /_with(out)?_[_a-zA-Z0-9]+/);
+ print substr($0, RSTART, RLENGTH)
+ }
+ /^%bcond_with/ && chlog == 0 {
+ match($0, /bcond_with(out)?[ \t]+[_a-zA-Z0-9]+/);
+ bcond = substr($0, RSTART +5 , RLENGTH -5);
+ gsub(/[ \t]+/,"_",bcond);
+ print bcond
+ }' $SPEC | sort -u`
+
+for c in $bconds; do
+ echo -n "$c"
+
+ if ! echo `rpm --eval "%$c"` | grep $c >/dev/null; then
+ echo " (on)"
+ else
+ echo ""
+ fi
+done
+
+
+for bcond in $bconds; do
+ isset=`awk -F"\n" "BEGIN { val=0 }
+ /^%define[\t ]+$bcond/ {
+ if (match(\\$0, /$bcond[\t ]+0[\t ]*$/)) {
+ val = 0
+ } else if (match(\\$0, /$bcond[\t ]+1[\t ]*$/)) {
+ val = 1
+ } else {
+ print \"couldn't determine $bcond value from \", \\$0
+ }
+ } END { print val }" $SPEC`;
+
+ if [ x"$isset" = x"1" ]; then
+ echo "WARN: $bcond defined in spec";
+ fi
+done
+
--- /dev/null
+--- ./scripts/gendiff.org 2008-04-06 10:48:23.000000000 +0200
++++ ./scripts/gendiff 2009-02-11 15:44:23.070120721 +0100
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ function usage () {
+ echo "usage: $0 <directory> <diff-extension>" 1>&2
--- /dev/null
+--- rpm-4.1/rpmdb/header.c.wiget2 Thu Sep 19 00:47:29 2002
++++ rpm-4.1/rpmdb/header.c Thu Sep 19 00:52:10 2002
+@@ -1645,7 +1645,8 @@
+ }
+ /*@=boundsread@*/
+
+- return entry->data;
++/* when everything fail, try gettext */
++ return ((entry->data != NULL) && *(char*)(entry->data)) ? _(entry->data) : entry->data;
+ }
+
+ /**
--- /dev/null
+--- rpm-4.5/rpmio/ugid.c 2009-06-05 00:46:30.450894061 +0300
++++ rpm-4.5/rpmio/ugid.c 2009-06-19 19:35:42.374530092 +0300
+@@ -101,10 +101,10 @@
+ /*@=internalglobs@*/
+ grent = getgrnam(thisGname);
+ if (grent == NULL) {
+- /* XXX The filesystem package needs group/lock w/o getgrnam. */
+- if (strcmp(thisGname, "lock") == 0) {
++ /* XXX The FHS package needs group/uucp w/o getgrnam, filesystem needs adm */
++ if (strcmp(thisGname, "uucp") == 0) {
+ /*@-boundswrite@*/
+- *gid = lastGid = 54;
++ *gid = lastGid = 14;
+ /*@=boundswrite@*/
+ return 0;
+ } else
+@@ -114,6 +114,12 @@
+ /*@=boundswrite@*/
+ return 0;
+ } else
++ if (strcmp(thisGname, "adm") == 0) {
++/*@-boundswrite@*/
++ *gid = lastGid = 4;
++/*@=boundswrite@*/
++ return 0;
++ } else
+ return -1;
+ }
+ }
--- /dev/null
+--- rpm-4.5/rpmio/rpmrpc.c~ 2010-12-19 14:19:57.678043380 +0100
++++ rpm-4.5/rpmio/rpmrpc.c 2010-12-19 14:20:39.353812967 +0100
+@@ -1711,6 +1711,17 @@
+ if (_rpmio_debug)
+ fprintf(stderr, "*** Glob(%s,0x%x,%p,%p)\n", pattern, (unsigned)flags, (void *)errfunc, pglob);
+ /*@=castfcnptr@*/
++
++ /* same as upstream glob with difference that gl_stat is Lstat now */
++ pglob->gl_closedir = closedir;
++ pglob->gl_readdir = readdir;
++ pglob->gl_opendir = opendir;
++ pglob->gl_lstat = Lstat;
++ pglob->gl_stat = Lstat;
++
++/*@=type@*/
++ flags |= GLOB_ALTDIRFUNC;
++
+ switch (ut) {
+ case URL_IS_HTTPS:
+ case URL_IS_HTTP:
+--- rpm-4.5/configure.ac~ 2010-12-19 13:46:37.917863585 +0100
++++ rpm-4.5/configure.ac 2010-12-19 13:50:49.826071048 +0100
+@@ -1004,8 +1004,8 @@
+ #fi
+ #
+ #if test "$rpm_cv_glob" = yes; then
+- AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
+- AC_LIBOBJ(glob)
++# AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
++# AC_LIBOBJ(glob)
+ AC_LIBOBJ(fnmatch)
+ #fi
+
+
--- /dev/null
+#!/bin/awk -f
+
+BEGIN {
+ group = "NONE"
+}
+
+/^[A-Z].*/ {
+ group = $0
+}
+
+/^[ \t]*\[.+\]:/ {
+ if(group != "NONE") {
+ locale = $1
+ gsub(/[\[\]:]/,"",locale)
+ printf "msgid \"%s\"\n",group >> "po/"locale".po"
+ gsub(/^.*:[ \t]*/,"")
+ gsub(/[ \t]*$/,"")
+ printf "msgstr \"%s\"\n\n",$0 >> "po/"locale".po"
+ }
+}
--- /dev/null
+diff -urN rpm/lib/rpmfc.c rpm.new/lib/rpmfc.c
+--- rpm/lib/rpmfc.c 2008-12-28 13:38:03.000000000 +0100
++++ rpm.new/lib/rpmfc.c 2008-12-31 22:20:54.000000000 +0100
+@@ -960,13 +960,15 @@
+ /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
+ {
+ const char * fn = fc->fn[fc->ix];
+- int flags = 0;
++ int flags = 0, xx;
+
+ if (fc->skipProv)
+ flags |= RPMELF_FLAG_SKIPPROVIDES;
+ if (fc->skipReq)
+ flags |= RPMELF_FLAG_SKIPREQUIRES;
+
++ xx = rpmfcHelper(fc, 'P', "gstreamer");
++
+ return rpmdsELF(fn, flags, rpmfcMergePR, fc);
+ }
+
+diff -urN rpm/macros.in rpm.new/macros.in
+--- rpm/macros.in 2008-12-28 13:38:02.000000000 +0100
++++ rpm.new/macros.in 2008-12-28 15:18:46.000000000 +0100
+@@ -1505,5 +1505,7 @@
+ # helper is also used by %{_rpmhome}/rpmdeps --provides
+ %__mimetype_provides %{_rpmhome}/mimetypedeps.sh --provides
+
++%__gstreamer_provides %{nil}
++
+ # \endverbatim
+ #*/
--- /dev/null
+--- rpm-4.3/build/files.c.orig 2003-11-24 19:10:54.000000000 +0100
++++ rpm-4.3/build/files.c 2003-11-24 19:20:05.827568008 +0100
+@@ -2119,7 +2119,7 @@
+ goto exit;
+
+ /* Verify that file attributes scope over hardlinks correctly. */
+- if (checkHardLinks(&fl))
++ if (checkHardLinks(&fl) && !rpmExpandNumeric("%{_hack_dontneed_PartialHardlinkSets}"))
+ (void) rpmlibNeedsFeature(pkg->header,
+ "PartialHardlinkSets", "4.0.4-1");
+
--- /dev/null
+--- rpm-4.5/rpmdb/rpmdb.c~ 2008-10-26 21:16:40.000000000 +0200
++++ rpm-4.5/rpmdb/rpmdb.c 2008-10-26 22:30:16.229630486 +0200
+@@ -846,7 +846,7 @@
+ if (fd != NULL) {
+ xx = Fclose(fd);
+ fd = NULL;
+- if (headerGetEntry(h, RPMTAG_INSTALLTID, NULL, &iidp, NULL)) {
++ if (headerGetEntry(h, RPMTAG_INSTALLTIME, NULL, &iidp, NULL)) {
+ struct utimbuf stamp;
+ stamp.actime = *iidp;
+ stamp.modtime = *iidp;
--- /dev/null
+#!/bin/sh
+build_hrmib_cache() {
+ # skip if no rpm(1), touch(1), xargs(1)
+ [ -x /bin/rpm -a -x /bin/touch -a -x /bin/xargs ] || return
+
+ export LC_ALL=C
+ umask 002
+
+ mydir=/var/cache/hrmib
+
+ echo >&2 "Populating $mydir with initial contents"
+ mkdir -p $mydir || return
+ echo $mydir/* | xargs rm -f
+
+ buf=$(rpm --nodigest --nosignature -qa --qf '%{N}-%{V}-%{R}.%{ARCH} %{INSTALLTIME:date}\n')
+ echo "$buf" | while read nvra idate; do
+ touch -d "$idate" "$mydir/$nvra"
+ done
+ touch $mydir
+}
+
+build_hrmib_cache
--- /dev/null
+#!/bin/sh
+
+install -d `rpm --eval "%{_rpmdir} %{_specdir} %{_sourcedir} %{_srcrpmdir} %{_builddir}"`
--- /dev/null
+ 4.4.9 -> 4.5:
++ - jbj: add a relation to to force install-before-erase.
++ - jbj: display dependency loops as an error for now.
+ - glen: do not skip %clean from spec file
+ - robert: install rpmdeps and debugedit to pkglibdir as on HEAD
+ - jbj: fix: python ts.hdrFromFdno(fdno) segfault.
+--- rpm-4.5/lib/depends.c~ 2008/10/26 18:29:50 1.327.2.10
++++ rpm-4.5/lib/depends.c 2008-10-27 14:42:52.984295775 +0200
+@@ -1936,7 +1936,7 @@
+ return 0;
+
+ /* Avoid certain dependency relations. */
+- if (teType == TR_ADDED && ignoreDep(ts, p, q))
++ if (ignoreDep(ts, p, q))
+ return 0;
+
+ /* Avoid redundant relations. */
+@@ -2191,6 +2191,25 @@
+ }
+ }
+
++
++ /* Ensure that erasures follow installs during upgrades. */
++ if (rpmteType(p) == TR_REMOVED && p->flink.Pkgid && p->flink.Pkgid[0]) {
++
++ qi = rpmtsiInit(ts);
++ while ((q = rpmtsiNext(qi, TR_ADDED)) != NULL) {
++ if (strcmp(q->pkgid, p->flink.Pkgid[0]))
++ continue;
++ requires = rpmdsFromPRCO(q->PRCO, RPMTAG_NAME);
++ if (requires != NULL) {
++ /* XXX disable erased arrow reversal. */
++ p->type = TR_ADDED;
++ (void) addRelation(ts, p, selected, requires);
++ p->type = TR_REMOVED;
++ }
++ }
++ qi = rpmtsiFree(qi);
++ }
++
+ if (_autobits != 0xffffffff)
+ {
+
+@@ -2401,7 +2420,7 @@
+ const char * dp;
+ char buf[4096];
+ int msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS))
+- ? RPMMESS_WARNING : RPMMESS_DEBUG;
++ ? RPMMESS_WARNING : RPMMESS_ERROR;
+ ;
+
+ /* Unchain predecessor loop. */
--- /dev/null
+#!/bin/sh
+# This script reads filenames from STDIN and outputs any relevant requires
+# information that needs to be included in the package.
+#
+# Based on rpm-4.4.2/scripts/find-req.pl
+# Authors: Elan Ruusamäe <glen@pld-linux.org>
+
+export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+
+# Set the prefix, unless it is overriden
+: ${RPM_LIBDIR=/usr/lib/rpm}
+
+# Enable debug: JAVADEPS_DEBUG=true
+: ${JAVADEPS_DEBUG=false}
+
+# xsltproc for eclipse feature.xml
+: ${xsltproc=/usr/bin/xsltproc}
+
+# save $- state, to enable in functions
+debug=$-
+
+javaclassversion() {
+ set -$debug
+ local mode=$1; shift
+ [ $# -gt 0 ] || return 1
+ $JAVADEPS_DEBUG && echo >&2 ">> javaclassversion($mode): $*"
+
+ # process only requires
+ [ "$mode" = requires ] || return $ret
+
+ local classver=$(echo "$@" | xargs -r file | grep -o 'compiled Java class data, version [0-9.]*' | awk '{print $NF}' | sort -u)
+ if [ -z "$classver" ]; then
+ return 1
+ fi
+
+ local v
+ for v in $classver; do
+ echo "java(ClassDataVersion) >= $v"
+ done
+ return 0
+}
+
+javajarversion() {
+ set -$debug
+ local mode=$1; shift
+ local jar=$1
+ local tmp ret=0
+ $JAVADEPS_DEBUG && echo >&2 ">> javajarversion($mode): $jar"
+
+ # check only files, symlinks could point outside buildroot
+ [ -f "$jar" -a ! -L "$jar" ] || return $ret
+
+ tmp=$(mktemp -d)
+ unzip -q -d $tmp $jar >&2
+ # workaround for .jar files with stupid permissions
+ chmod -R u+rwX $tmp
+
+ # find .jar and .class files
+ find_javadeps $mode $(find $tmp -type f -regextype posix-extended -regex '^.+\.(class|jar)$') || ret=1
+ rm -rf $tmp
+ return $ret
+}
+
+eclipse_feature() {
+ set -$debug
+ local mode=$1; shift
+ local file=$1
+ local ret=0
+
+ $JAVADEPS_DEBUG && echo >&2 ">> eclipse_feature($mode): $file"
+
+ if [ ! -x $xsltproc ]; then
+ return 0
+ fi
+
+ $xsltproc --stringparam mode $mode ${RPM_LIBDIR}/eclipse-feature.xslt $file
+}
+
+find_javadeps() {
+ set -$debug
+ local mode=$1; shift
+ local ret=0
+
+ $JAVADEPS_DEBUG && echo >&2 ">> find_javadeps($mode): $*"
+ for file in $@; do
+ case $file in
+ *.jar)
+ javajarversion $mode "$file" || ret=1
+ ;;
+ *.class)
+ javaclassversion $mode "$file" || {
+ echo >&2 "ERROR: Class version could not be extracted from $file"
+ ret=1
+ }
+ ;;
+ */feature.xml)
+ eclipse_feature $mode "$file" || ret=1
+ ;;
+ *)
+ $JAVADEPS_DEBUG && echo >&2 ">> find_javadeps($mode): no handle: $file"
+ ;;
+ esac
+ done
+ return $ret
+}
+
+ret=0
+# default mode to requires for backward compat
+mode=requires
+case $1 in
+-P|--provides)
+ mode=provides
+ shift
+ ;;
+-R|--requires)
+ mode=requires
+ shift
+ ;;
+esac
+
+t=$(mktemp)
+find_javadeps $mode $(cat -) > $t || ret=1
+sort -u $t
+rm -f $t
+
+exit $ret
--- /dev/null
+--- rpm-4.3/lib/psm.c.orig 2003-05-10 17:20:15.000000000 +0200
++++ rpm-4.3/lib/psm.c 2003-08-24 21:41:29.637316776 +0200
+@@ -550,7 +550,10 @@
+ xx = headerNVR(h, &n, &v, &r);
+
+ /* XXX bash must have functional libtermcap.so.2 */
+- if (!strcmp(n, "libtermcap"))
++ /* if (!strcmp(n, "libtermcap"))
++ * -- always run ldconfig, these checks didn't work when few packages with
++ * shared libs were installed just one after another in the same
++ * transaction */
+ ldconfig_done = 0;
+
+ /*
--- /dev/null
+--- rpm-4.5/lib/rpmfc.c.org 2010-10-06 20:47:04.748417761 +0200
++++ rpm-4.5/lib/rpmfc.c 2010-10-06 20:48:13.364041124 +0200
+@@ -1356,8 +1356,18 @@
+ /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */
+ else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
+ ftype = "";
+- else
++ else {
++ char *old_loc = setlocale(LC_CTYPE, NULL);
++ if (old_loc) {
++ old_loc = xstrdup(old_loc);
++ setlocale(LC_CTYPE, "C");
++ }
+ ftype = magic_file(ms, s);
++ if (old_loc) {
++ setlocale(LC_CTYPE, old_loc);
++ _free(old_loc);
++ }
++ }
+
+ if (ftype == NULL) {
+ xx = RPMERR_EXEC;
--- /dev/null
+--- rpm-4.4.8.org/scripts/libtooldeps.sh 2005-11-12 22:20:42.000000000 +0100
++++ rpm-4.4.8/scripts/libtooldeps.sh 2006-11-26 20:06:49.254008750 +0100
+@@ -5,15 +5,17 @@
+ exit 0
+ }
+
++pkgname="$3"
++
+ case $1 in
+ -P|--provides)
+ shift
+- RPM_BUILD_ROOT="$1"
++ RPM_BUILD_ROOT="$1"
+ while read possible
+ do
+ case "$possible" in
+ *.la)
+- if grep -iq '^# Generated by ltmain.sh' "$possible" 2> /dev/null ; then
++ if file -L "$possible" | grep -iq 'libtool library file' 2> /dev/null ; then
+ possible="`echo ${possible} | sed -e s,${RPM_BUILD_ROOT}/,/,`"
+ echo "libtool($possible)"
+ fi
+@@ -22,21 +24,28 @@
+ done
+ ;;
+ -R|--requires)
+- while read possible ; do
+- case "$possible" in
+- *.la)
+- for dep in `grep '^dependency_libs='"$possible" 2> /dev/null | \
+- sed -e "s,^dependency_libs='\(.*\)',\1,g"`
+- do
+- case "$dep" in
+- /*.la)
+- echo "libtool($dep)"
++ case $pkgname in
++ *-devel)
++ while read possible ; do
++ case "$possible" in
++ *.la)
++ for dep in `grep '^dependency_libs=' "$possible" 2> /dev/null | \
++ sed -e "s,^dependency_libs='\(.*\)',\1,g"`
++ do
++ case "$dep" in
++ /*.la)
++ dep="`readlink -f "$dep" 2> /dev/null || echo "$dep"`"
++ echo "libtool($dep)"
++ ;;
++ esac
++ done
+ ;;
+ esac
+ done
+- ;;
+- esac
+- done
+- ;;
++ ;;
++ *)
++ cat > /dev/null
++ ;;
++ esac
+ esac
+ exit 0
--- /dev/null
+diff -urN rpm-4.5/rpmdb/Makefile.am rpm-4.5.new/rpmdb/Makefile.am
+--- rpm-4.5/rpmdb/Makefile.am 2008-09-06 16:46:54.000000000 +0200
++++ rpm-4.5.new/rpmdb/Makefile.am 2008-09-06 19:35:40.000000000 +0200
+@@ -49,7 +49,8 @@
+ $(top_builddir)/rpmio/librpmio.la \
+ @WITH_POPT_LIB@ \
+ @WITH_SQLITE3_LIB@ \
+- @WITH_LIBELF_LIB@
++ @WITH_LIBELF_LIB@ \
++ @WITH_SELINUX_LIB@
+ librpmdb_la_LIBADD = $(DBLIBOBJS) $(libdb_la)
+ librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) $(libdb_la)
+
--- /dev/null
+--- rpm-4.4.3/configure.ac.orig 2005-11-19 11:30:59.197389000 +0100
++++ rpm-4.4.3/configure.ac 2005-11-19 16:17:10.397970072 +0100
+@@ -439,7 +439,7 @@
+ ])
+
+ AC_CHECK_HEADERS(aio.h)
+-AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
++dnl not used? AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
+
+ dnl Better not use fchmod at all.
+ AC_CHECK_FUNC(fchmod)
--- /dev/null
+--- rpm-4.5/lib/psm.c 2010-05-08 14:14:22.817080224 +0200
++++ rpm-4.5/lib/psm.c 2010-05-08 14:14:03.063343062 +0200
+@@ -469,6 +469,7 @@
+ /*@modifies psm, fileSystem, internalState @*/
+ {
+ const rpmts ts = psm->ts;
++ int pwdFdno = -1;
+ int rootFdno = -1;
+ const char *n, *v, *r;
+ rpmRC rc = RPMRC_OK;
+@@ -487,9 +488,12 @@
+
+ /* Save the current working directory. */
+ /*@-nullpass@*/
+- rootFdno = open(".", O_RDONLY, 0);
++ pwdFdno = open(".", O_RDONLY, 0);
+ /*@=nullpass@*/
+
++ /* Save the current root directory. */
++ rootFdno = open("/", O_RDONLY, 0);
++
+ /* Get into the chroot. */
+ if (!rpmtsChrootDone(ts)) {
+ const char *rootDir = rpmtsRootDir(ts);
+@@ -554,10 +558,12 @@
+ /*@=superuser =noeffect @*/
+ xx = rpmtsSetChrootDone(ts, 0);
+ }
++ xx = fchdir(pwdFdno);
+ } else
+- xx = fchdir(rootFdno);
++ xx = fchdir(pwdFdno);
+
+ xx = close(rootFdno);
++ xx = close(pwdFdno);
+
+ return rc;
+ }
--- /dev/null
+--- rpm-4.5/lib/psm.c~ 2008-11-22 17:18:39.325237949 +0100
++++ rpm-4.5/lib/psm.c 2008-11-22 17:30:16.807430141 +0100
+@@ -2308,13 +2308,16 @@
+ replace_lzma_with_gzip(psm->oh);
+ }
+ *t = '\0';
+- t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
+- if (!strcmp(payload_compressor, "gzip"))
+- t = stpcpy(t, ".gzdio");
+- if (!strcmp(payload_compressor, "bzip2"))
+- t = stpcpy(t, ".bzdio");
+- if (!strcmp(payload_compressor, "lzma"))
+- t = stpcpy(t, ".lzdio");
++ if (!strcmp(payload_compressor, "lzma")) {
++ t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w7" : "r"));
++ t = stpcpy(t, ".lzdio");
++ } else {
++ t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
++ if (!strcmp(payload_compressor, "gzip"))
++ t = stpcpy(t, ".gzdio");
++ if (!strcmp(payload_compressor, "bzip2"))
++ t = stpcpy(t, ".bzdio");
++ }
+
+ /*@-branchstate@*/
+ if (!hge(fi->h, RPMTAG_PAYLOADFORMAT, NULL,
--- /dev/null
+--- rpm-4.5/rpmio/lzdio.c.org 2008-11-05 18:13:43.655364585 +0100
++++ rpm-4.5/rpmio/lzdio.c 2008-11-05 18:13:51.136793343 +0100
+@@ -132,7 +132,7 @@
+ for (i = 3; i < 1024; i++)
+ xx = close(i);
+ lzma = rpmGetPath("%{?__lzma}%{!?__lzma:/usr/bin/lzma}", NULL);
+- if (execle(lzma, "lzma", level, NULL, env))
++ if (execle(lzma, "lzma", level, "-M0", NULL, env))
+ _exit(1);
+ lzma = _free(lzma);
+ }
--- /dev/null
+--- rpm-4.4.9/rpmio/LzmaDecode.h.orig 2007-10-14 19:23:02.629594398 +0000
++++ rpm-4.4.9/rpmio/LzmaDecode.h 2007-10-14 19:23:16.628653630 +0000
+@@ -35,7 +35,7 @@
+ /* #define _LZMA_LOC_OPT */
+ /* Enable local speed optimizations inside code */
+
+-/* #define _LZMA_SYSTEM_SIZE_T */
++#define _LZMA_SYSTEM_SIZE_T
+ /* Use system's size_t. You can use it to enable 64-bit sizes supporting*/
+
+ #ifndef UInt32
--- /dev/null
+--- rpm-4.5/scripts/rpm2cpio 2008-08-19 10:31:53.658158936 +0300
++++ rpm-4.4.9/scripts/rpm2cpio 2008-10-05 00:44:53.976068978 +0300
+@@ -24,13 +24,13 @@
+ o=`expr $o + $hdrsize`
+
+-comp=`dd if="$pkg" ibs=$o skip=1 count=1 2>/dev/null \
+- | dd bs=3 count=1 2>/dev/null`
++comp=$(dd if="$pkg" ibs=$o skip=1 count=1 2>/dev/null \
++ | dd bs=3 count=1 2> /dev/null)
+
+-gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`"
++gz="$(echo -en '\037\0213')"
+ case "$comp" in
+ BZh) dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;;
+ "$gz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;;
+ # no magic in old lzma format, if unknown we assume that's lzma for now
+- *) dd if="$pkg" ibs=$o skip=1 2>/dev/null | lzma d -si -so ;;
++ *) dd if="$pkg" ibs=$o skip=1 2>/dev/null | lzma -dc - ;;
+ #*) echo "Unrecognized rpm file: $pkg"; return 1 ;;
+ esac
--- /dev/null
+--- rpm-4.5/configure.ac~ 2008-09-03 18:51:51.000000000 +0300
++++ rpm-4.5/configure.ac 2008-09-03 19:09:02.754451743 +0300
+@@ -25,6 +25,7 @@
+ AC_PROG_AWK
+ AC_PROG_CC
+ AC_PROG_CPP
++AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
--- /dev/null
+diff -urN rpm-4.5/macros.in rpm-4.5.new//macros.in
+--- rpm-4.5/macros.in 2010-05-28 20:56:02.854032755 +0200
++++ rpm-4.5.new//macros.in 2010-05-28 20:59:04.177348180 +0200
+@@ -277,6 +277,9 @@
+ #
+ #%distribution
+
++# PLD Linux Release
++%pld_release ti
++
+ # Configurable distribution URL, same as DistURL: tag in a specfile.
+ # The URL will be used to supply reliable information to tools like
+ # rpmfind.
+@@ -1449,7 +1452,7 @@
+ # Note: Used iff _use_internal_dependency_generator is non-zero. The
+ # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+ %__libtool_provides %{_rpmhome}/libtooldeps.sh --provides %{buildroot} %{name}
+-%__libtool_requires %{_rpmhome}/libtooldeps.sh --requires %{buildroot} %{name}
++%__libtool_requires %{nil}
+
+ #------------------------------------------------------------------------
+ # pkgconfig(...) configuration.
+@@ -1459,7 +1462,7 @@
+ # Note: Used iff _use_internal_dependency_generator is non-zero. The
+ # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+ %__pkgconfig_provides %{_rpmhome}/pkgconfigdeps.sh --provides
+-%__pkgconfig_requires %{_rpmhome}/pkgconfigdeps.sh --requires
++%__pkgconfig_requires %{nil}
+
+ #------------------------------------------------------------------------
+ # executable(...) configuration.
+@@ -1482,6 +1485,8 @@
+ # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
+
+ %debugcflags -O0 -g -Wall
++%optldflags -Wl,--as-needed
++%optcppflags %{nil}
+
+ # Warning: those macros are overwritten by macros.build,
+ # left here for compatibility
--- /dev/null
+%define __gstreamer_provides /usr/lib/rpm/gstreamerdeps.sh --provides
--- /dev/null
+%define __java_provides %{nil}
+%define __java_requires env RPM_BUILD_ROOT=%{buildroot} /usr/lib/rpm/java-find-requires
--- /dev/null
+--- rpm-4.4.9/macros.in 2008-04-04 23:15:28.121279270 +0300
++++ rpm-4.5/macros.in 2008-09-03 16:47:30.861766714 +0300
+@@ -109,6 +109,10 @@
+ %__automake automake
+ %__autoconf autoconf
+
++# compiler used to build kernel and kernel modules
++%kgcc %{__cc}
++%kgcc_package gcc
++
+ #==============================================================================
+ # Conditional build stuff.
+
+@@ -206,7 +210,7 @@
+ %endif\
+ %{nil}
+
+-%_defaultdocdir %{_usr}/doc
++%_defaultdocdir %{_usr}/share/doc
+
+ # The path to the pgp executable (legacy, use %{__pgp} instead).
+ %_pgpbin %{__pgp}
+@@ -233,12 +237,12 @@
+ # The directory where newly built source packages will be written.
+ %_srcrpmdir %{_topdir}/SRPMS
+
+-# Directory where temporaray files can be created.
+-%_tmppath %{_var}/tmp
++# Directory where temporary files can be created.
++%_tmppath %(echo "${TMPDIR:-/tmp}")
+ %tmpdir %{_tmppath}
+
+ # Path to top of build area.
+-%_topdir %{_usrsrc}/rpm
++%_topdir %(echo $HOME)/rpm
+
+ #==============================================================================
+ # ---- Optional rpmrc macros.
+@@ -248,7 +252,7 @@
+ # Configurable build root path, same as BuildRoot: in a specfile.
+ # (Note: the configured macro value will override the spec file value).
+ #
+-%buildroot %{_tmppath}/%{name}-root
++%buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
+
+ # The sub-directory (relative to %{_builddir}) where sources are compiled.
+ # This macro is set after processing %setup, either explicitly from the
+@@ -347,8 +351,8 @@
+ # "w9.bzdio" bzip2 level 9.
+ # "w9.lzdio" lzma level 9.
+ #
+-#%_source_payload w9.gzdio
+-#%_binary_payload w9.gzdio
++%_source_payload w9.gzdio
++%_binary_payload w9.lzdio
+
+ # Archive formats to use for source/binary package payloads.
+ # "cpio" cpio archive (default)
+@@ -508,7 +512,7 @@
+
+ #
+ # Path to magic file used for file classification.
+-%_rpmfc_magic_path %{_rpmhome}/magic
++%_rpmfc_magic_path /usr/share/file/magic
+
+ #==============================================================================
+ # ---- Database configuration macros.
+@@ -954,7 +954,7 @@
+
+ %___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
+ %___build_args -e
+-%___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
++%___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{?_clean_env:%{_clean_env} }%{___build_shell} %{___build_args}
+ %___build_pre \
+ RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
+ RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
+@@ -991,9 +995,12 @@
+ %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
+ export CLASSPATH}\
+ unset PERL_MM_OPT || :\
+- LANG=C\
+- export LANG\
+- unset DISPLAY || :\
++ export LC_ALL=C\
++ export LANG=C\
++ unset LINGUAS ||:\
++ unset LANGUAGE ||:\
++ unset LC_MESSAGES ||:\
++ unset DISPLAY ||:\
+ \
+ %{verbose:set -x}%{!verbose:exec > /dev/null}\
+ umask 022\
+@@ -1127,17 +1134,17 @@
+ %_exec_prefix %{_prefix}
+ %_bindir %{_exec_prefix}/bin
+ %_sbindir %{_exec_prefix}/sbin
+-%_libexecdir %{_exec_prefix}/libexec
++%_libexecdir %{_exec_prefix}/lib
+ %_datadir %{_prefix}/share
+-%_sysconfdir %{_prefix}/etc
+-%_sharedstatedir %{_prefix}/com
+-%_localstatedir %{_prefix}/var
++%_sysconfdir /etc
++%_sharedstatedir /var/lib
++%_localstatedir /var
+ %_lib lib
+ %_libdir %{_exec_prefix}/%{_lib}
+ %_includedir %{_prefix}/include
+ %_oldincludedir /usr/include
+-%_infodir %{_prefix}/info
+-%_mandir %{_prefix}/man
++%_infodir %{_prefix}/share/info
++%_mandir %{_prefix}/share/man
+ %_localedir %{_datadir}/locale
+
+ #==============================================================================
+@@ -1429,6 +1436,22 @@
+ #%__executable_provides %{_usrlibrpm}/executabledeps.sh --provides
+ #%__executable_requires %{_usrlibrpm}/executabledeps.sh --requires
+-%__scriptlet_requires /bin/bash --rpm-requires
++#%__scriptlet_requires /bin/bash --rpm-requires
++
++# PLD rpm macros
++%_enable_debug_packages 1
++
++#-----------------------------------------------------------------
++# CFLAGS and LDFLAGS used to build
++
++%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-3 -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
++
++%debugcflags -O0 -g -Wall
+
++# Warning: those macros are overwritten by macros.build,
++# left here for compatibility
++%rpmcflags %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
++%rpmcxxflags %{rpmcflags}
++%rpmldflags %{!?no_build_with_as_needed:-Wl,--as-needed}
++
+ # \endverbatim
+ #*/
+@@ -1480,7 +1504,7 @@
+ #
+ # Note: Used if _use_internal_dependency_generator is non-zero. The
+ # helper is also used by %{_rpmhome}/rpmdeps --provides
+-#%__mimetype_provides %{_rpmhome}/mimetypedeps.sh --provides
++%__mimetype_provides %{_rpmhome}/mimetypedeps.sh --provides
+
+ # \endverbatim
+ #*/
+--- rpm-4.5/configure.ac~ 2008-06-10 02:03:07.000000000 +0300
++++ rpm-4.5/configure.ac 2008-06-10 02:04:18.395836371 +0300
+@@ -1479,7 +1479,7 @@
+ [Full path to rpm system configuration directory (usually /etc/rpm)])
+ AC_SUBST(SYSCONFIGDIR)
+
+-MACROFILES="${USRLIBRPM}/${VERSION}/macros:${USRLIBRPM}/%{_target}/macros:${SYSCONFIGDIR}/%{_host_vendor}/macros:${SYSCONFIGDIR}/%{_host_vendor}/%{_target}/macros:${SYSCONFIGDIR}/macros.*:${SYSCONFIGDIR}/macros.d/*.macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/%{_target}/macros:~/.rpmmacros"
++MACROFILES="${USRLIBRPM}/macros:${USRLIBRPM}/macros.build:${USRLIBRPM}/%{_target}/macros:${SYSCONFIGDIR}/macros.*:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/%{_target}/macros:~/etc/.rpmmacros:~/.rpmmacros"
+ AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES",
+ [Colon separated paths of macro files to read.])
+ AC_SUBST(MACROFILES)
--- /dev/null
+diff -x '*~' -durN rpm-4.3.orig/Makefile.am rpm-4.3/Makefile.am
+--- rpm-4.3.orig/Makefile.am 2004-12-19 08:39:09.000000000 +0100
++++ rpm-4.3/Makefile.am 2004-12-19 08:39:45.135670136 +0100
+@@ -96,7 +96,7 @@
+ rpm2cpio_LDFLAGS = $(myLDFLAGS)
+ rpm2cpio_LDADD = $(myLDADD) @LIBMISC@
+
+-$(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@
++$(PROGRAMS): @WITH_APIDOCS_TARGET@
+
+ .PHONY: splint
+ splint:
--- /dev/null
+--- rpm/doc/pl/rpm.8~ 2007-11-24 23:21:26.000000000 +0100
++++ rpm/doc/pl/rpm.8 2007-11-24 23:21:26.000000000 +0100
+@@ -325,6 +325,7 @@
+ Instaluje pakiety nawet je¶li niektóre z nich s± ju¿ zainstalowane na tym
+ systemie.
+ .TP
++\fB--test\fR
+ Nie instaluje pakietu, po prostu sprawdza i raportuje potencjalne
+ konflikty.
+ .SS "OPCJE USUWANIA"
--- /dev/null
+--- rpm-4.3/lib/rpmfi.c.orig 2004-01-12 09:39:32.000000000 +0000
++++ rpm-4.3/lib/rpmfi.c 2004-01-12 10:34:20.000000000 +0000
+@@ -13,6 +13,8 @@
+
+ #include "rpmds.h"
+
++#include "legacy.h"
++
+ #define _RPMFI_INTERNAL
+ #include "rpmfi.h"
+
+--- rpm-4.3/lib/rpmrc.c.orig 2004-01-12 09:39:32.000000000 +0000
++++ rpm-4.3/lib/rpmrc.c 2004-01-12 10:54:42.000000000 +0000
+@@ -14,6 +14,7 @@
+ #define __power_pc() 0
+ #endif
+
++#include "rpmio_internal.h"
+ #include <rpmcli.h>
+ #include <rpmmacro.h>
+ #include <rpmlua.h>
+--- rpm-4.3/tools/convertdb1.c.orig 2004-01-04 02:13:09.000000000 +0000
++++ rpm-4.3/tools/convertdb1.c 2004-01-12 10:52:04.000000000 +0000
+@@ -10,6 +10,7 @@
+ #include <rpmdb.h>
+ #include <rpmio.h>
+ #include <rpmmacro.h>
++#include "legacy.h"
+
+ #define FA_MAGIC 0x02050920
+
--- /dev/null
+diff -urN rpm-4.5/lib/rpmfc.c rpm-4.5.new/lib/rpmfc.c
+--- rpm-4.5/lib/rpmfc.c 2008-11-09 15:05:53.000000000 +0100
++++ rpm-4.5.new/lib/rpmfc.c 2008-11-09 15:07:53.000000000 +0100
+@@ -555,6 +555,7 @@
+ { "Java ", RPMFC_JAVA|RPMFC_INCLUDE },
+
+ /* .NET executables and libraries. file(1) cannot differ it from native win32 executables unfortunatelly */
++ { "Mono/.Net assembly", RPMFC_MONO|RPMFC_INCLUDE },
+ { "PE executable", RPMFC_MONO|RPMFC_INCLUDE },
+ { "executable PE", RPMFC_MONO|RPMFC_INCLUDE },
+
--- /dev/null
+diff -ur rpm-4.4.4/Makefile.am rpm-4.4.4.morearchs/Makefile.am
+--- rpm-4.4.4/Makefile.am 2006-02-11 15:01:38.000000000 +0000
++++ rpm-4.4.4.morearchs/Makefile.am 2006-02-11 18:06:51.000000000 +0000
+@@ -188,6 +188,8 @@
+ powerpc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppciseries ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppcpseries ;\
++ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc7400 ;\
++ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc7450 ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64 ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64iseries ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64pseries ;;\
+diff -ur rpm-4.4.4/installplatform rpm-4.4.4.morearchs/installplatform
+--- rpm-4.4.4/installplatform 2005-10-25 21:19:24.000000000 +0000
++++ rpm-4.4.4.morearchs/installplatform 2006-02-11 18:02:55.000000000 +0000
+@@ -33,7 +33,7 @@
+ i[3456]86|pentium[34]|athlon) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_' ;;
+ alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
+ sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
+- powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
++ powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc7400_ s_ppc\([^6ip]\|$\)_ppc7450_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
+ s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;;
+ *) SUBSTS=y___ ;;
+ esac
+--- rpm-4.4.5/lib/rpmrc.c.orig 2006-02-28 22:01:56.462419250 +0100
++++ rpm-4.4.5/lib/rpmrc.c 2006-02-28 22:09:36.415164500 +0100
+@@ -1331,10 +1331,18 @@
+ switch (pvr) {
+ /* IBM750FX, 7410, 7450, 7451, 7441, 7455, 7445 */
+ case 0x7000:
++ strcpy(un.machine, "ppc");
++ break;
+ case 0x8000:
+ case 0x8001:
++ case 0x8002:
++ case 0x8003:
++ /* 0x8000: 7450, 0x8001: 7455, 0x8002: 7457, 0x8003: 7447A */
++ strcpy(un.machine, "ppc7450");
++ break;
+ case 0x800c:
+- strcpy(un.machine, "ppc");
++ case 0x000c:
++ strcpy(un.machine, "ppc7400");
+ break;
+ case 0x36:
+ case 0x37:
+diff -ur rpm-4.4.4/macros.in rpm-4.4.4.morearchs/macros.in
+--- rpm-4.4.4/macros.in 2006-02-11 15:01:38.000000000 +0000
++++ rpm-4.4.4.morearchs/macros.in 2006-02-11 18:17:36.000000000 +0000
+@@ -1244,6 +1244,7 @@
+ # conditionals.
+ #
+ %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
++%ppc ppc ppc7400 ppc7450
+
+ #------------------------------------------------------------------------
+ # Use in %install to generate locale specific file lists. For example,
+diff -ur rpm-4.4.4/rpmrc.in rpm-4.4.4.morearchs/rpmrc.in
+--- rpm-4.4.4/rpmrc.in 2006-02-11 15:01:38.000000000 +0000
++++ rpm-4.4.4.morearchs/rpmrc.in 2006-02-11 18:11:55.000000000 +0000
+@@ -42,6 +42,8 @@
+ optflags: m68k -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_m68k: %{specflags_m68k}}}
+
+ optflags: ppc -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
++optflags: ppc7400 -O2 -mcpu=7400 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
++optflags: ppc7450 -O2 -mcpu=7450 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
+ optflags: ppc8260 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8260: %{specflags_ppc8260}}}
+ optflags: ppc8560 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8560: %{specflags_ppc8560}}}
+ optflags: ppc32dy4 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc32dy4: %{specflags_ppc32dy4}}}
+@@ -110,6 +112,8 @@
+ arch_canon: mips: mips 4
+
+ arch_canon: ppc: ppc 5
++arch_canon: ppc7400: ppc7400 5
++arch_canon: ppc7450: ppc7450 5
+ arch_canon: ppc8260: ppc8260 5
+ arch_canon: ppc8560: ppc8560 5
+ arch_canon: ppc32dy4: ppc32dy4 5
+@@ -212,7 +216,8 @@
+ buildarchtranslate: sun4u: sparc64
+ buildarchtranslate: sparc64: sparc64
+
+-buildarchtranslate: osfmach3_ppc: ppc
++buildarchtranslate: ppc7400: ppc7400
++buildarchtranslate: ppc7450: ppc7450
+ buildarchtranslate: powerpc: ppc
+ buildarchtranslate: powerppc: ppc
+ buildarchtranslate: ppc8260: ppc
+@@ -263,6 +268,8 @@
+ arch_compat: osfmach3_i486: i486 osfmach3_i386
+ arch_compat: osfmach3_i386: i486
+
++arch_compat: ppc7450: ppc7400
++arch_compat: ppc7400: ppc
+ arch_compat: osfmach3_ppc: ppc
+ arch_compat: powerpc: ppc
+ arch_compat: powerppc: ppc
+@@ -375,6 +382,8 @@
+
+ buildarch_compat: m68k: noarch
+
++buildarch_compat: ppc7450: ppc7400
++buildarch_compat: ppc7400: ppc
+ buildarch_compat: ppc8260: noarch
+ buildarch_compat: ppc8560: noarch
+ buildarch_compat: ppc32dy4: noarch
--- /dev/null
+Disable Provides: user(NAME), group(NAME) probes as it would fire trigger on NAME uninstall
+
+as for example uninstalling this spec: https://bugs.pld-linux.org/attachment.cgi?id=20
+
+15:30:53 jbj> glen_: rpmns.c splits group(mailman) into the tuple {group, mailman} for name space processing.
+15:32:48 jbj> the code in unbsatisfiedDepnds is driven by the name "group". if split, then its not the string
+ "group(mailman)" any more.
+
+--- rpm-4.4.9/lib/depends.c~ 2008-04-08 19:44:02.000000000 +0300
++++ rpm-4.4.9/lib/depends.c 2008-04-25 15:12:52.734623679 +0300
+@@ -611,6 +611,7 @@
+ goto exit;
+ }
+
++#if 0
+ /* Evaluate user/group lookup probes. */
+ if (NSType == RPMNS_TYPE_USER) {
+ const char *s;
+@@ -646,6 +647,7 @@
+ rpmdsNotify(dep, _("(group lookup)"), rc);
+ goto exit;
+ }
++#endif
+
+ /* Evaluate access(2) probe dependencies. */
+ if (NSType == RPMNS_TYPE_ACCESS) {
+--- rpm-4.4.9/lib/rpmns.c~ 2007-05-16 14:31:58.000000000 +0300
++++ rpm-4.4.9/lib/rpmns.c 2008-04-25 15:36:20.223855745 +0300
+@@ -179,8 +179,10 @@
+ case RPMNS_TYPE_UNAME:
+ case RPMNS_TYPE_SONAME:
+ case RPMNS_TYPE_ACCESS:
++#if 0
+ case RPMNS_TYPE_USER:
+ case RPMNS_TYPE_GROUP:
++#endif
+ case RPMNS_TYPE_MOUNTED:
+ case RPMNS_TYPE_DISKSPACE:
+ case RPMNS_TYPE_DIGEST:
--- /dev/null
+--- rpm-4.5/macros.in.org 2009-03-23 09:25:24.383581794 +0100
++++ rpm-4.5/macros.in 2009-03-23 09:25:19.403234944 +0100
+@@ -183,7 +183,7 @@
+ # Path to script that creates debug symbols in a /usr/lib/debug
+ # shadow tree.
+ %__debug_install_post \
+- %{_rpmhome}/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
++ %{_rpmhome}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
+ %{nil}
+
+ # Template for debug information sub-package.
+--- rpm-4.5/scripts/find-debuginfo.sh.orig 2007-08-31 03:07:02.000000000 +0200
++++ rpm-4.5/scripts/find-debuginfo.sh 2009-09-17 15:22:30.299290490 +0200
+@@ -1,57 +1,327 @@
+-#!/bin/sh
++#!/bin/bash
+ #find-debuginfo.sh - automagically generate debug info and file list
+ #for inclusion in an rpm spec file.
++#
++# Usage: find-debuginfo.sh [--strict-build-id]
++# [-o debugfiles.list]
++# [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
++# [builddir]
++#
++# The --strict-build-id flag says to exit with failure status if
++# any ELF binary processed fails to contain a build-id note.
++#
++# A single -o switch before any -l or -p switches simply renames
++# the primary output file from debugfiles.list to something else.
++# A -o switch that follows a -p switch or some -l switches produces
++# an additional output file with the debuginfo for the files in
++# the -l filelist file, or whose names match the -p pattern.
++# The -p argument is an egrep-style regexp matching the a file name,
++# and must not use anchors (^ or $).
++#
++# All file names in switches are relative to builddir (. if not given).
++#
++
++# Barf on missing build IDs.
++strict=false
++
++BUILDDIR=.
++out=debugfiles.list
++nout=0
++while [ $# -gt 0 ]; do
++ case "$1" in
++ --strict-build-id)
++ strict=true
++ ;;
++ -o)
++ if [ -z "${lists[$nout]}" -a -z "${ptns[$nout]}" ]; then
++ out=$2
++ else
++ outs[$nout]=$2
++ ((nout++))
++ fi
++ shift
++ ;;
++ -l)
++ lists[$nout]="${lists[$nout]} $2"
++ shift
++ ;;
++ -p)
++ ptns[$nout]=$2
++ shift
++ ;;
++ *)
++ BUILDDIR=$1
++ shift
++ break
++ ;;
++ esac
++ shift
++done
+
+-if [ -z "$1" ] ; then BUILDDIR="."
+-else BUILDDIR=$1
+-fi
++i=0
++while ((i < nout)); do
++ outs[$i]="$BUILDDIR/${outs[$i]}"
++ l=''
++ for f in ${lists[$i]}; do
++ l="$l $BUILDDIR/$f"
++ done
++ lists[$i]=$l
++ ((++i))
++done
+
+-LISTFILE=$BUILDDIR/debugfiles.list
+-SOURCEFILE=$BUILDDIR/debugsources.list
++LISTFILE="$BUILDDIR/$out"
++SOURCEFILE="$BUILDDIR/debugsources.list"
++LINKSFILE="$BUILDDIR/debuglinks.list"
++
++> "$SOURCEFILE"
++> "$LISTFILE"
++> "$LINKSFILE"
+
+ debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"
+
+-echo -n > $SOURCEFILE
+-
+ strip_to_debug()
+ {
+- eu-strip --remove-comment -f "$1" "$2" || :
++ local t=$(mktemp "/tmp/rpm.stripped.XXXXXX")
++ eu-strip --remove-comment -f "$1" "$2" -o "$t" || exit
++ rm -f "$t"
++}
++
++# Make a relative symlink to $1 called $3$2
++shopt -s extglob
++link_relative()
++{
++ local t="$1" f="$2" pfx="$3"
++ local fn="${f#/}" tn="${t#/}"
++ local fd td d
++
++ while fd="${fn%%/*}"; td="${tn%%/*}"; [ "$fd" = "$td" ]; do
++ fn="${fn#*/}"
++ tn="${tn#*/}"
++ done
++
++ d="${fn%/*}"
++ if [ "$d" != "$fn" ]; then
++ d="${d//+([!\/])/..}"
++ tn="${d}/${tn}"
++ fi
++
++ mkdir -p "$(dirname "$pfx$f")" && ln -snf "$tn" "$pfx$f"
+ }
+
++# Make a symlink in /usr/lib/debug/$2 to $1
++debug_link()
++{
++ local l="/usr/lib/debug$2"
++ local t="$1"
++ echo >> "$LINKSFILE" "$l $t"
++ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
++}
++
++# Make a build-id symlink for id $1 with suffix $3 to file $2.
++make_id_link()
++{
++ local id="$1" file="$2"
++ local idfile=".build-id/${id:0:2}/${id:2}"
++ [ $# -eq 3 ] && idfile="${idfile}$3"
++ local root_idfile="$RPM_BUILD_ROOT/usr/lib/debug/$idfile"
++
++ if [ ! -L "$root_idfile" ]; then
++ debug_link "$file" "/$idfile"
++ return
++ fi
++
++ [ $# -eq 3 ] && return 0
++
++ 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
++ # Two copies. Maybe one has to be setuid or something.
++ echo >&2 "*** WARNING: identical binaries are copied, not linked:"
++ echo >&2 " $file"
++ echo >&2 " and $other"
++ else
++ # This is pathological, break the build.
++ echo >&2 "*** ERROR: same build ID in nonidentical files!"
++ echo >&2 " $file"
++ echo >&2 " and $other"
++ exit 2
++ fi
++}
++
++get_debugfn()
++{
++ dn=$(dirname "${1#$RPM_BUILD_ROOT}")
++ bn=$(basename "$1" .debug).debug
++
++ debugdn=${debugdir}${dn}
++ debugfn=${debugdn}/${bn}
++}
++
++set -o pipefail
++
++strict_error=ERROR
++$strict || strict_error=WARNING
++
+ # Strip ELF binaries
+-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'`
++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' |
++while read nlinks inum f; do
++ get_debugfn "$f"
++ [ -f "${debugfn}" ] && continue
++
++ # If this file has multiple links, keep track and make
++ # the corresponding .debug files all links to one file too.
++ if [ $nlinks -gt 1 ]; then
++ eval linked=\$linked_$inum
++ if [ -n "$linked" ]; then
++ link=$debugfn
++ get_debugfn "$linked"
++ echo "hard linked $link to $debugfn"
++ ln -nf "$debugfn" "$link"
++ continue
++ else
++ eval linked_$inum=\$f
++ echo "file $f has $[$nlinks - 1] other hard links"
++ fi
++ fi
++
++ echo "extracting debug info from $f"
++ id=$(/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
++ fi
++
++ # A binary already copied into /usr/lib/debug doesn't get stripped,
++ # just has its file names collected and adjusted.
++ case "$dn" in
++ /usr/lib/debug/*)
++ [ -z "$id" ] || make_id_link "$id" "$dn/$(basename $f)"
++ continue ;;
++ esac
++
++ 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
++
++ if [ -n "$id" ]; then
++ make_id_link "$id" "$dn/$(basename $f)"
++ make_id_link "$id" "/usr/lib/debug$dn/$bn" .debug
++ 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
+- dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
+- bn=$(basename $f .debug).debug
+-
+- debugdn="${debugdir}${dn}"
+- debugfn="${debugdn}/${bn}"
+- [ -f "${debugfn}" ] && continue
+-
+- echo extracting debug info from $f
+- /usr/lib/rpm/4.5/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
+-
+- # A binary already copied into /usr/lib/debug doesn't get stripped,
+- # just has its file names collected and adjusted.
+- case "$dn" in
+- /usr/lib/debug/*) continue ;;
+- esac
+-
+- 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
++ 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
+
+-mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug
+-cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0mL ${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
++if [ -s "$SOURCEFILE" ]; then
++ mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug"
++ LC_ALL=C sort -z -u "$SOURCEFILE" | egrep -v -z '(<internal>|<built-in>)$' |
++ (cd "$RPM_BUILD_DIR"; cpio -pd0mL "${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 --no-run-if-empty -0 chmod a+rx
++fi
++
++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) |
++ sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
++
++ (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
++
++# Append to $1 only the lines from stdin not already in the file.
++append_uniq()
++{
++ fgrep -f "$1" -x -v >> "$1"
++}
+
+-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
++# Helper to generate list of corresponding .debug files from a file list.
++filelist_debugfiles()
++{
++ local extra="$1"
++ shift
++ sed 's/^%[a-z0-9_][a-z0-9_]*([^)]*) *//
++s/^%[a-z0-9_][a-z0-9_]* *//
++/^$/d
++'"$extra" "$@"
++}
++
++# Write an output debuginfo file list based on given input file lists.
++filtered_list()
++{
++ local out="$1"
++ shift
++ test $# -gt 0 || return
++ fgrep -f <(filelist_debugfiles 's,^.*$,/usr/lib/debug&.debug,' "$@") \
++ -x $LISTFILE >> $out
++ sed -n -f <(filelist_debugfiles 's/[\\.*+#]/\\&/g
++h
++s,^.*$,s# &$##p,p
++g
++s,^.*$,s# /usr/lib/debug&.debug$##p,p
++' "$@") "$LINKSFILE" | append_uniq "$out"
++}
++
++# Write an output debuginfo file list based on an egrep-style regexp.
++pattern_list()
++{
++ local out="$1" ptn="$2"
++ test -n "$ptn" || return
++ egrep -x -e "$ptn" "$LISTFILE" >> "$out"
++ sed -n -r "\#^$ptn #s/ .*\$//p" "$LINKSFILE" | append_uniq "$out"
++}
++
++#
++# When given multiple -o switches, split up the output as directed.
++#
++i=0
++while ((i < nout)); do
++ > ${outs[$i]}
++ filtered_list ${outs[$i]} ${lists[$i]}
++ pattern_list ${outs[$i]} "${ptns[$i]}"
++ fgrep -vx -f ${outs[$i]} "$LISTFILE" > "${LISTFILE}.new"
++ mv "${LISTFILE}.new" "$LISTFILE"
++ ((++i))
++done
++if ((nout > 0)); then
++ # Now add the right %dir lines to each output list.
++ (cd "${RPM_BUILD_ROOT}"; find usr/lib/debug -type d) |
++ sed 's#^.*$#\\@^/&/@{h;s@^.*$@%dir /&@p;g;}#' |
++ LC_ALL=C sort -ur > "${LISTFILE}.dirs.sed"
++ i=0
++ while ((i < nout)); do
++ sed -n -f "${LISTFILE}.dirs.sed" "${outs[$i]}" | sort -u > "${outs[$i]}.new"
++ cat "${outs[$i]}" >> "${outs[$i]}.new"
++ mv -f "${outs[$i]}.new" "${outs[$i]}"
++ ((++i))
++ done
++ sed -n -f "${LISTFILE}.dirs.sed" "${LISTFILE}" | sort -u > "${LISTFILE}.new"
++ cat "$LISTFILE" >> "${LISTFILE}.new"
++ mv "${LISTFILE}.new" "$LISTFILE"
++fi
--- /dev/null
+--- rpm-4.5/rpmio/rpmdav.c~ 2008-07-09 12:38:31.000000000 +0300
++++ rpm-4.5/rpmio/rpmdav.c 2008-09-04 17:43:50.215697868 +0300
+@@ -9,58 +9,6 @@
+ #include <pthread.h>
+ #endif
+
+-#if USE_INTERNAL_NEON
+-#include "ne_alloc.h"
+-#include "ne_auth.h"
+-#include "ne_basic.h"
+-#include "ne_dates.h"
+-#include "ne_locks.h"
+-#else
+-#include "neon/ne_alloc.h"
+-#include "neon/ne_auth.h"
+-#include "neon/ne_basic.h"
+-#include "neon/ne_dates.h"
+-#include "neon/ne_locks.h"
+-#endif
+-
+-#define NEONBLOWSCHUNKS
+-#ifndef NEONBLOWSCHUNKS
+-/* HACK: include ne_private.h to access sess->socket for now. */
+-#include "../neon/src/ne_private.h"
+-#endif
+-
+-#if USE_INTERNAL_NEON
+-#include "ne_props.h"
+-#include "ne_request.h"
+-#include "ne_socket.h"
+-#include "ne_string.h"
+-#include "ne_utils.h"
+-#include "ne_md5.h" /* for version detection only */
+-#else
+-#include "neon/ne_props.h"
+-#include "neon/ne_request.h"
+-#include "neon/ne_socket.h"
+-#include "neon/ne_string.h"
+-#include "neon/ne_utils.h"
+-#include "neon/ne_md5.h" /* for version detection only */
+-#endif
+-
+-/* poor-man's NEON version determination */
+-#if defined(NE_MD5_H)
+-#define WITH_NEON_MIN_VERSION 0x002700
+-#elif defined(NE_FEATURE_I18N)
+-#define WITH_NEON_MIN_VERSION 0x002600
+-#else
+-#define WITH_NEON_MIN_VERSION 0x002500
+-#endif
+-
+-/* XXX API changes for NEON 0.26 */
+-#if WITH_NEON_MIN_VERSION >= 0x002600
+-#define ne_set_persist(_sess, _flag)
+-#define ne_propfind_set_private(_pfh, _create_item, NULL) \
+- ne_propfind_set_private(_pfh, _create_item, NULL, NULL)
+-#endif
+-
+ #include <rpmio_internal.h>
+
+ #define _RPMDAV_INTERNAL
+@@ -74,1469 +22,6 @@
+ /*@access FD_t @*/
+ /*@access urlinfo @*/
+
+-#if 0 /* HACK: reasonable value needed. */
+-#define TIMEOUT_SECS 60
+-#else
+-#define TIMEOUT_SECS 5
+-#endif
+-/*@unchecked@*/
+-static int httpTimeoutSecs = TIMEOUT_SECS;
+-
+-/* =============================================================== */
+-int davFree(urlinfo u)
+- /*@globals internalState @*/
+- /*@modifies u, internalState @*/
+-{
+- if (u != NULL) {
+- if (u->sess != NULL) {
+- ne_session_destroy(u->sess);
+- u->sess = NULL;
+- }
+- switch (u->urltype) {
+- default:
+- /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- case URL_IS_HKP:
+- u->capabilities = _free(u->capabilities);
+- if (u->lockstore != NULL)
+- ne_lockstore_destroy(u->lockstore);
+- u->lockstore = NULL;
+- ne_sock_exit();
+- break;
+- }
+- }
+- return 0;
+-}
+-
+-static void davProgress(void * userdata, off_t current, off_t total)
+- /*@*/
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+-
+-assert(u != NULL);
+- sess = u->sess;
+-assert(sess != NULL);
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+- u->current = current;
+- u->total = total;
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davProgress(%p,0x%x:0x%x) sess %p u %p\n", userdata, (unsigned int)current, (unsigned int)total, sess, u);
+-}
+-
+-#if WITH_NEON_MIN_VERSION >= 0x002700
+-static void davNotify(void * userdata,
+- ne_session_status connstatus, const ne_session_status_info *info)
+-#else
+-static void davNotify(void * userdata,
+- ne_conn_status connstatus, const char * info)
+-#endif
+- /*@*/
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+- /*@observer@*/
+- static const char * connstates[] = {
+- "namelookup",
+- "connecting",
+- "connected",
+- "secure",
+- "unknown"
+- };
+-
+-assert(u != NULL);
+- sess = u->sess;
+-assert(sess != NULL);
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+-#ifdef REFERENCE
+-typedef enum {
+- ne_conn_namelookup, /* lookup up hostname (info = hostname) */
+- ne_conn_connecting, /* connecting to host (info = hostname) */
+- ne_conn_connected, /* connected to host (info = hostname) */
+- ne_conn_secure /* connection now secure (info = crypto level) */
+-} ne_conn_status;
+-#endif
+-
+-#if WITH_NEON_MIN_VERSION < 0x002700
+- u->connstatus = connstatus;
+-#endif
+-
+-/*@-boundsread@*/
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davNotify(%p,%d,%p) sess %p u %p %s\n", userdata, connstatus, info, sess, u, connstates[ (connstatus < 4 ? connstatus : 4)]);
+-/*@=boundsread@*/
+-
+-}
+-
+-static void davCreateRequest(ne_request * req, void * userdata,
+- const char * method, const char * uri)
+- /*@*/
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+- void * private = NULL;
+- const char * id = "urlinfo";
+-
+-assert(u != NULL);
+-assert(u->sess != NULL);
+-assert(req != NULL);
+- sess = ne_get_session(req);
+-assert(sess == u->sess);
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+-assert(sess != NULL);
+- private = ne_get_session_private(sess, id);
+-assert(u == private);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davCreateRequest(%p,%p,%s,%s) %s:%p\n", req, userdata, method, uri, id, private);
+-}
+-
+-static void davPreSend(ne_request * req, void * userdata, ne_buffer * buf)
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+- const char * id = "fd";
+- FD_t fd = NULL;
+-
+-assert(u != NULL);
+-assert(u->sess != NULL);
+-assert(req != NULL);
+- sess = ne_get_session(req);
+-assert(sess == u->sess);
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+- fd = ne_get_request_private(req, id);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davPreSend(%p,%p,%p) sess %p %s %p\n", req, userdata, buf, sess, id, fd);
+-if (_dav_debug)
+-fprintf(stderr, "-> %s\n", buf->data);
+-
+-}
+-
+-static int davPostSend(ne_request * req, void * userdata, const ne_status * status)
+- /*@*/
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+- const char * id = "fd";
+- FD_t fd = NULL;
+-
+-assert(u != NULL);
+-assert(u->sess != NULL);
+-assert(req != NULL);
+- sess = ne_get_session(req);
+-assert(sess == u->sess);
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+- fd = ne_get_request_private(req, id);
+-
+-/*@-evalorder@*/
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davPostSend(%p,%p,%p) sess %p %s %p %s\n", req, userdata, status, sess, id, fd, ne_get_error(sess));
+-/*@=evalorder@*/
+- return NE_OK;
+-}
+-
+-static void davDestroyRequest(ne_request * req, void * userdata)
+- /*@*/
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+- const char * id = "fd";
+- FD_t fd = NULL;
+-
+-assert(u != NULL);
+-assert(u->sess != NULL);
+-assert(req != NULL);
+- sess = ne_get_session(req);
+-assert(sess == u->sess);
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+- fd = ne_get_request_private(req, id);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davDestroyRequest(%p,%p) sess %p %s %p\n", req, userdata, sess, id, fd);
+-}
+-
+-static void davDestroySession(void * userdata)
+- /*@*/
+-{
+- urlinfo u = userdata;
+- ne_session * sess;
+- void * private = NULL;
+- const char * id = "urlinfo";
+-
+-assert(u != NULL);
+-assert(u->sess != NULL);
+- sess = u->sess;
+-assert(u == ne_get_session_private(sess, "urlinfo"));
+-
+-assert(sess != NULL);
+- private = ne_get_session_private(sess, id);
+-assert(u == private);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davDestroySession(%p) sess %p %s %p\n", userdata, sess, id, private);
+-}
+-
+-static int
+-davVerifyCert(void *userdata, int failures, const ne_ssl_certificate *cert)
+- /*@*/
+-{
+- const char *hostname = userdata;
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davVerifyCert(%p,%d,%p) %s\n", userdata, failures, cert, hostname);
+-
+- return 0; /* HACK: trust all server certificates. */
+-}
+-
+-static int davConnect(urlinfo u)
+- /*@globals internalState @*/
+- /*@modifies u, internalState @*/
+-{
+- const char * path = NULL;
+- int rc;
+-
+- /* HACK: hkp:// has no steenkin' options */
+- if (!(u->urltype == URL_IS_HTTP || u->urltype == URL_IS_HTTPS))
+- return 0;
+-
+- /* HACK: where should server capabilities be read? */
+- (void) urlPath(u->url, &path);
+- /* HACK: perhaps capture Allow: tag, look for PUT permitted. */
+- /* XXX [hdr] Allow: GET,HEAD,POST,OPTIONS,TRACE */
+- rc = ne_options(u->sess, path, u->capabilities);
+- switch (rc) {
+- case NE_OK:
+- { ne_server_capabilities *cap = u->capabilities;
+- if (cap->dav_class1)
+- u->allow |= RPMURL_SERVER_HASDAVCLASS1;
+- else
+- u->allow &= ~RPMURL_SERVER_HASDAVCLASS1;
+- if (cap->dav_class2)
+- u->allow |= RPMURL_SERVER_HASDAVCLASS2;
+- else
+- u->allow &= ~RPMURL_SERVER_HASDAVCLASS2;
+- if (cap->dav_executable)
+- u->allow |= RPMURL_SERVER_HASDAVEXEC;
+- else
+- u->allow &= ~RPMURL_SERVER_HASDAVEXEC;
+- } break;
+- case NE_ERROR:
+- /* HACK: "301 Moved Permanently" on empty subdir. */
+- if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
+- break;
+- errno = EIO; /* HACK: more precise errno. */
+- goto bottom;
+- case NE_LOOKUP:
+- errno = ENOENT; /* HACK: errno same as non-existent path. */
+- goto bottom;
+- case NE_CONNECT: /* HACK: errno set already? */
+- default:
+-bottom:
+-if (_dav_debug)
+-fprintf(stderr, "*** Connect to %s:%d failed(%d):\n\t%s\n",
+- u->host, u->port, rc, ne_get_error(u->sess));
+- break;
+- }
+-
+- /* HACK: sensitive to error returns? */
+- u->httpVersion = (ne_version_pre_http11(u->sess) ? 0 : 1);
+-
+- return rc;
+-}
+-
+-static int davInit(const char * url, urlinfo * uret)
+- /*@globals internalState @*/
+- /*@modifies *uret, internalState @*/
+-{
+- urlinfo u = NULL;
+- int rc = 0;
+-
+-/*@-globs@*/ /* FIX: h_errno annoyance. */
+- if (urlSplit(url, &u))
+- return -1; /* XXX error returns needed. */
+-/*@=globs@*/
+-
+- if (u->url != NULL && u->sess == NULL)
+- switch (u->urltype) {
+- default:
+- assert(u->urltype != u->urltype);
+- /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- case URL_IS_HKP:
+- { ne_server_capabilities * capabilities;
+-
+- /* HACK: oneshots should be done Somewhere Else Instead. */
+-/*@-noeffect@*/
+- rc = ((_dav_debug < 0) ? NE_DBG_HTTP : 0);
+- ne_debug_init(stderr, rc); /* XXX oneshot? */
+-/*@=noeffect@*/
+- rc = ne_sock_init(); /* XXX oneshot? */
+-
+- u->lockstore = ne_lockstore_create(); /* XXX oneshot? */
+-
+- u->capabilities = capabilities = xcalloc(1, sizeof(*capabilities));
+- u->sess = ne_session_create(u->scheme, u->host, u->port);
+-
+- ne_lockstore_register(u->lockstore, u->sess);
+-
+- if (u->proxyh != NULL)
+- ne_session_proxy(u->sess, u->proxyh, u->proxyp);
+-
+-#if 0
+- { const ne_inet_addr ** addrs;
+- unsigned int n;
+- ne_set_addrlist(u->sess, addrs, n);
+- }
+-#endif
+-
+- ne_set_progress(u->sess, davProgress, u);
+-#if WITH_NEON_MIN_VERSION >= 0x002700
+- ne_set_notifier(u->sess, davNotify, u);
+-#else
+- ne_set_status(u->sess, davNotify, u);
+-#endif
+-
+- ne_set_persist(u->sess, 1);
+- ne_set_read_timeout(u->sess, httpTimeoutSecs);
+- ne_set_useragent(u->sess, PACKAGE "/" PACKAGE_VERSION);
+-
+- /* XXX check that neon is ssl enabled. */
+- if (!strcasecmp(u->scheme, "https"))
+- ne_ssl_set_verify(u->sess, davVerifyCert, (char *)u->host);
+-
+- ne_set_session_private(u->sess, "urlinfo", u);
+-
+- ne_hook_destroy_session(u->sess, davDestroySession, u);
+-
+- ne_hook_create_request(u->sess, davCreateRequest, u);
+- ne_hook_pre_send(u->sess, davPreSend, u);
+- ne_hook_post_send(u->sess, davPostSend, u);
+- ne_hook_destroy_request(u->sess, davDestroyRequest, u);
+-
+- /* HACK: where should server capabilities be read? */
+- rc = davConnect(u);
+- if (rc)
+- goto exit;
+- } break;
+- }
+-
+-exit:
+-/*@-boundswrite@*/
+- if (uret != NULL)
+- *uret = urlLink(u, "davInit");
+-/*@=boundswrite@*/
+- u = urlFree(u, "urlSplit (davInit)");
+-
+- return rc;
+-}
+-
+-/* =============================================================== */
+-enum fetch_rtype_e {
+- resr_normal = 0,
+- resr_collection,
+- resr_reference,
+- resr_error
+-};
+-
+-struct fetch_resource_s {
+-/*@dependent@*/
+- struct fetch_resource_s *next;
+- char *uri;
+-/*@unused@*/
+- char *displayname;
+- enum fetch_rtype_e type;
+- size_t size;
+- time_t modtime;
+- int is_executable;
+- int is_vcr; /* Is version resource. 0: no vcr, 1 checkin 2 checkout */
+- char *error_reason; /* error string returned for this resource */
+- int error_status; /* error status returned for this resource */
+-};
+-
+-/*@null@*/
+-static void *fetch_destroy_item(/*@only@*/ struct fetch_resource_s *res)
+- /*@modifies res @*/
+-{
+- ne_free(res->uri);
+- ne_free(res->error_reason);
+- res = _free(res);
+- return NULL;
+-}
+-
+-#ifdef UNUSED
+-/*@null@*/
+-static void *fetch_destroy_list(/*@only@*/ struct fetch_resource_s *res)
+- /*@modifies res @*/
+-{
+- struct fetch_resource_s *next;
+-/*@-branchstate@*/
+- for (; res != NULL; res = next) {
+- next = res->next;
+- res = fetch_destroy_item(res);
+- }
+-/*@=branchstate@*/
+- return NULL;
+-}
+-#endif
+-
+-#if WITH_NEON_MIN_VERSION >= 0x002600
+-static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const ne_uri *uri)
+-#else
+-static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const char *uri)
+-#endif
+- /*@*/
+-{
+- struct fetch_resource_s * res = ne_calloc(sizeof(*res));
+- return res;
+-}
+-
+-/* =============================================================== */
+-struct fetch_context_s {
+-/*@relnull@*/ /*@dependent@*/
+- struct fetch_resource_s **resrock;
+- const char *uri;
+- unsigned int include_target; /* Include resource at href */
+-/*@refcounted@*/
+- urlinfo u;
+- int ac;
+- int nalloced;
+- ARGV_t av;
+-/*@null@*/ /*@shared@*/
+- struct stat *st;
+- mode_t * modes;
+- size_t * sizes;
+- time_t * mtimes;
+-};
+-
+-/*@null@*/
+-static void *fetch_destroy_context(/*@only@*/ /*@null@*/ struct fetch_context_s *ctx)
+- /*@globals internalState @*/
+- /*@modifies ctx, internalState @*/
+-{
+- if (ctx == NULL)
+- return NULL;
+- if (ctx->av != NULL)
+- ctx->av = argvFree(ctx->av);
+- ctx->modes = _free(ctx->modes);
+- ctx->sizes = _free(ctx->sizes);
+- ctx->mtimes = _free(ctx->mtimes);
+- ctx->u = urlFree(ctx->u, "fetch_destroy_context");
+- ctx->uri = _free(ctx->uri);
+-/*@-boundswrite@*/
+- memset(ctx, 0, sizeof(*ctx));
+-/*@=boundswrite@*/
+- ctx = _free(ctx);
+- return NULL;
+-}
+-
+-/*@null@*/
+-static void *fetch_create_context(const char *uri, /*@null@*/ struct stat *st)
+- /*@globals internalState @*/
+- /*@modifies internalState @*/
+-{
+- struct fetch_context_s * ctx;
+- urlinfo u;
+-
+-/*@-globs@*/ /* FIX: h_errno annoyance. */
+- if (urlSplit(uri, &u))
+- return NULL;
+-/*@=globs@*/
+-
+- ctx = ne_calloc(sizeof(*ctx));
+- ctx->uri = xstrdup(uri);
+- ctx->u = urlLink(u, "fetch_create_context");
+- if ((ctx->st = st) != NULL)
+- memset(ctx->st, 0, sizeof(*ctx->st));
+- return ctx;
+-}
+-
+-/*@unchecked@*/ /*@observer@*/
+-static const ne_propname fetch_props[] = {
+- { "DAV:", "getcontentlength" },
+- { "DAV:", "getlastmodified" },
+- { "http://apache.org/dav/props/", "executable" },
+- { "DAV:", "resourcetype" },
+- { "DAV:", "checked-in" },
+- { "DAV:", "checked-out" },
+- { NULL, NULL }
+-};
+-
+-#define ELM_resourcetype (NE_PROPS_STATE_TOP + 1)
+-#define ELM_collection (NE_PROPS_STATE_TOP + 2)
+-
+-/*@unchecked@*/ /*@observer@*/
+-static const struct ne_xml_idmap fetch_idmap[] = {
+- { "DAV:", "resourcetype", ELM_resourcetype },
+- { "DAV:", "collection", ELM_collection }
+-};
+-
+-static int fetch_startelm(void *userdata, int parent,
+- const char *nspace, const char *name,
+- /*@unused@*/ const char **atts)
+- /*@*/
+-{
+- ne_propfind_handler *pfh = userdata;
+- struct fetch_resource_s *r = ne_propfind_current_private(pfh);
+- int state = ne_xml_mapid(fetch_idmap, NE_XML_MAPLEN(fetch_idmap),
+- nspace, name);
+-
+- if (r == NULL ||
+- !((parent == NE_207_STATE_PROP && state == ELM_resourcetype) ||
+- (parent == ELM_resourcetype && state == ELM_collection)))
+- return NE_XML_DECLINE;
+-
+- if (state == ELM_collection) {
+- r->type = resr_collection;
+- }
+-
+- return state;
+-}
+-
+-static int fetch_compare(const struct fetch_resource_s *r1,
+- const struct fetch_resource_s *r2)
+- /*@*/
+-{
+- /* Sort errors first, then collections, then alphabetically */
+- if (r1->type == resr_error) {
+- return -1;
+- } else if (r2->type == resr_error) {
+- return 1;
+- } else if (r1->type == resr_collection) {
+- if (r2->type != resr_collection) {
+- return -1;
+- } else {
+- return strcmp(r1->uri, r2->uri);
+- }
+- } else {
+- if (r2->type != resr_collection) {
+- return strcmp(r1->uri, r2->uri);
+- } else {
+- return 1;
+- }
+- }
+-}
+-
+-#if WITH_NEON_MIN_VERSION >= 0x002600
+-static void fetch_results(void *userdata, const ne_uri *uarg,
+- const ne_prop_result_set *set)
+-#else
+-static void fetch_results(void *userdata, void *uarg,
+- const ne_prop_result_set *set)
+-#endif
+- /*@*/
+-{
+- struct fetch_context_s *ctx = userdata;
+- struct fetch_resource_s *current, *previous, *newres;
+- const char *clength, *modtime, *isexec;
+- const char *checkin, *checkout;
+- const ne_status *status = NULL;
+- const char * path = NULL;
+-
+-#if WITH_NEON_MIN_VERSION >= 0x002600
+- const ne_uri * uri = uarg;
+- (void) urlPath(uri->path, &path);
+-#else
+- const char * uri = uarg;
+- (void) urlPath(uri, &path);
+-#endif
+- if (path == NULL)
+- return;
+-
+- newres = ne_propset_private(set);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "==> %s in uri %s\n", path, ctx->uri);
+-
+- if (ne_path_compare(ctx->uri, path) == 0 && !ctx->include_target) {
+- /* This is the target URI */
+-if (_dav_debug < 0)
+-fprintf(stderr, "==> %s skipping target resource.\n", path);
+- /* Free the private structure. */
+-/*@-dependenttrans -exposetrans@*/
+- free(newres);
+-/*@=dependenttrans =exposetrans@*/
+- return;
+- }
+-
+- newres->uri = ne_strdup(path);
+-
+-/*@-boundsread@*/
+- clength = ne_propset_value(set, &fetch_props[0]);
+- modtime = ne_propset_value(set, &fetch_props[1]);
+- isexec = ne_propset_value(set, &fetch_props[2]);
+- checkin = ne_propset_value(set, &fetch_props[4]);
+- checkout = ne_propset_value(set, &fetch_props[5]);
+-/*@=boundsread@*/
+-
+-/*@-branchstate@*/
+- if (clength == NULL)
+- status = ne_propset_status(set, &fetch_props[0]);
+- if (modtime == NULL)
+- status = ne_propset_status(set, &fetch_props[1]);
+-/*@=branchstate@*/
+-
+- if (newres->type == resr_normal && status != NULL) {
+- /* It's an error! */
+- newres->error_status = status->code;
+-
+- /* Special hack for Apache 1.3/mod_dav */
+- if (strcmp(status->reason_phrase, "status text goes here") == 0) {
+- const char *desc;
+- if (status->code == 401) {
+- desc = _("Authorization Required");
+- } else if (status->klass == 3) {
+- desc = _("Redirect");
+- } else if (status->klass == 5) {
+- desc = _("Server Error");
+- } else {
+- desc = _("Unknown Error");
+- }
+- newres->error_reason = ne_strdup(desc);
+- } else {
+- newres->error_reason = ne_strdup(status->reason_phrase);
+- }
+- newres->type = resr_error;
+- }
+-
+- if (isexec && strcasecmp(isexec, "T") == 0) {
+- newres->is_executable = 1;
+- } else {
+- newres->is_executable = 0;
+- }
+-
+- if (modtime)
+- newres->modtime = ne_httpdate_parse(modtime);
+-
+- if (clength)
+- newres->size = atoi(clength);
+-
+- /* is vcr */
+- if (checkin) {
+- newres->is_vcr = 1;
+- } else if (checkout) {
+- newres->is_vcr = 2;
+- } else {
+- newres->is_vcr = 0;
+- }
+-
+- for (current = *ctx->resrock, previous = NULL; current != NULL;
+- previous = current, current = current->next)
+- {
+- if (fetch_compare(current, newres) >= 0) {
+- break;
+- }
+- }
+- if (previous) {
+- previous->next = newres;
+- } else {
+-/*@-boundswrite -dependenttrans @*/
+- *ctx->resrock = newres;
+-/*@=boundswrite =dependenttrans @*/
+- }
+- newres->next = current;
+-}
+-
+-static int davFetch(const urlinfo u, struct fetch_context_s * ctx)
+- /*@globals internalState @*/
+- /*@modifies ctx, internalState @*/
+-{
+- const char * path = NULL;
+- int depth = 1; /* XXX passed arg? */
+- unsigned int include_target = 0; /* XXX passed arg? */
+- struct fetch_resource_s * resitem = NULL;
+- struct fetch_resource_s ** resrock = &resitem; /* XXX passed arg? */
+- ne_propfind_handler *pfh;
+- struct fetch_resource_s *current, *next;
+- mode_t st_mode;
+- int rc = 0;
+- int xx;
+-
+- (void) urlPath(u->url, &path);
+- pfh = ne_propfind_create(u->sess, ctx->uri, depth);
+-
+- /* HACK: need to set RPMURL_SERVER_HASRANGE in u->allow here. */
+-
+- ctx->resrock = resrock;
+- ctx->include_target = include_target;
+-
+- ne_xml_push_handler(ne_propfind_get_parser(pfh),
+- fetch_startelm, NULL, NULL, pfh);
+-
+- ne_propfind_set_private(pfh, fetch_create_item, NULL);
+-
+- rc = ne_propfind_named(pfh, fetch_props, fetch_results, ctx);
+-
+- ne_propfind_destroy(pfh);
+-
+- for (current = resitem; current != NULL; current = next) {
+- const char *s, *se;
+- char * val;
+-
+- next = current->next;
+-
+- /* Collections have trailing '/' that needs trim. */
+- /* The top level collection is returned as well. */
+- se = current->uri + strlen(current->uri);
+- if (se[-1] == '/') {
+- if (strlen(current->uri) <= strlen(path)) {
+- current = fetch_destroy_item(current);
+- continue;
+- }
+- se--;
+- }
+- s = se;
+- while (s > current->uri && s[-1] != '/')
+- s--;
+-
+- val = ne_strndup(s, (se - s));
+-
+-/*@-nullpass@*/
+- val = ne_path_unescape(val);
+-/*@=nullpass@*/
+-
+- xx = argvAdd(&ctx->av, val);
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** argvAdd(%p,\"%s\")\n", &ctx->av, val);
+- ne_free(val);
+-
+- while (ctx->ac >= ctx->nalloced) {
+- if (ctx->nalloced <= 0)
+- ctx->nalloced = 1;
+- ctx->nalloced *= 2;
+- ctx->modes = xrealloc(ctx->modes,
+- (sizeof(*ctx->modes) * ctx->nalloced));
+- ctx->sizes = xrealloc(ctx->sizes,
+- (sizeof(*ctx->sizes) * ctx->nalloced));
+- ctx->mtimes = xrealloc(ctx->mtimes,
+- (sizeof(*ctx->mtimes) * ctx->nalloced));
+- }
+-
+- switch (current->type) {
+- case resr_normal:
+- st_mode = S_IFREG;
+- /*@switchbreak@*/ break;
+- case resr_collection:
+- st_mode = S_IFDIR;
+- /*@switchbreak@*/ break;
+- case resr_reference:
+- case resr_error:
+- default:
+- st_mode = 0;
+- /*@switchbreak@*/ break;
+- }
+-/*@-boundswrite@*/
+- ctx->modes[ctx->ac] = st_mode;
+- ctx->sizes[ctx->ac] = current->size;
+- ctx->mtimes[ctx->ac] = current->modtime;
+-/*@=boundswrite@*/
+- ctx->ac++;
+-
+- current = fetch_destroy_item(current);
+- }
+- ctx->resrock = NULL; /* HACK: avoid leaving stack reference. */
+- /* HACK realloc to truncate modes/sizes/mtimes */
+-
+- return rc;
+-}
+-
+-/* HACK this should be rewritten to use davReq/davResp w callbacks. */
+-static int davHEAD(urlinfo u, struct stat *st)
+- /*@modifies *st @*/
+-{
+- ne_request *req;
+- const char *htag;
+- const char *value = NULL;
+- int rc;
+-
+- st->st_mode = S_IFREG;
+- st->st_blksize = 4 * 1024; /* HACK correct for linux ext */
+- st->st_size = -1;
+- st->st_atime = -1;
+- st->st_mtime = -1;
+- st->st_ctime = -1;
+-
+- req = ne_request_create(u->sess, "HEAD", u->url);
+-
+- rc = ne_request_dispatch(req);
+- switch (rc) {
+- default:
+- goto exit;
+- /*@notreached@*/
+- case NE_OK:
+- if (ne_get_status(req)->klass != 2) {
+- rc = NE_ERROR;
+- goto exit;
+- }
+- break;
+- }
+-
+-#ifdef NOTYET
+- htag = "ETag";
+- value = ne_get_response_header(req, htag);
+- if (value) {
+- /* inode-size-mtime */
+- }
+-#endif
+-
+- htag = "Content-Length";
+-#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+- value = ne_get_response_header(req, htag);
+-#endif
+- if (value) {
+- st->st_size = strtoll(value, NULL, 10);
+- st->st_blocks = (st->st_size + 511)/512;
+- }
+-
+- htag = "Last-Modified";
+-#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+- value = ne_get_response_header(req, htag);
+-#endif
+- if (value) {
+- st->st_mtime = ne_httpdate_parse(value);
+- st->st_atime = st->st_ctime = st->st_mtime; /* HACK */
+- }
+-
+-exit:
+- ne_request_destroy(req);
+- return rc;
+-}
+-
+-static int davNLST(struct fetch_context_s * ctx)
+- /*@globals internalState @*/
+- /*@modifies ctx, internalState @*/
+-{
+- urlinfo u = NULL;
+- int rc;
+- int xx;
+-
+- rc = davInit(ctx->uri, &u);
+- if (rc || u == NULL)
+- goto exit;
+-
+-/* HACK do PROPFIND through davFetch iff enabled, otherwise HEAD Content-length/ETag/Last-Modified */
+- if (u->allow & RPMURL_SERVER_HASDAV)
+- rc = davFetch(u, ctx); /* use PROPFIND to get contentLength */
+- else
+- rc = davHEAD(u, ctx->st); /* use HEAD to get contentLength */
+-
+- switch (rc) {
+- case NE_OK:
+- break;
+- case NE_ERROR:
+- /* HACK: "405 Method Not Allowed" for PROPFIND on non-DAV servers. */
+- /* XXX #206066 OPTIONS is ok, but PROPFIND from Stat() fails. */
+- /* rpm -qp --rpmiodebug --davdebug http://people.freedesktop.org/~sandmann/metacity-2.16.0-2.fc6/i386/metacity-2.16.0-2.fc6.i386.rpm */
+- /* HACK: "301 Moved Permanently" on empty subdir. */
+- if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
+- break;
+- /*@fallthrough@*/
+- default:
+-if (_dav_debug)
+-fprintf(stderr, "*** Fetch from %s:%d failed:\n\t%s\n",
+- u->host, u->port, ne_get_error(u->sess));
+- break;
+- }
+-
+-exit:
+- xx = davFree(u);
+- return rc;
+-}
+-
+-/* =============================================================== */
+-static int my_result(const char * msg, int ret, /*@null@*/ FILE * fp)
+- /*@modifies *fp @*/
+-{
+- /* HACK: don't print unless debugging. */
+- if (_dav_debug >= 0)
+- return ret;
+- if (fp == NULL)
+- fp = stderr;
+- if (msg != NULL)
+- fprintf(fp, "*** %s: ", msg);
+-
+- /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */
+-#ifdef HACK
+- fprintf(fp, "%s: %s\n", ftpStrerror(-ret), ne_get_error(sess));
+-#else
+- fprintf(fp, "%s\n", ftpStrerror(-ret));
+-#endif
+- return ret;
+-}
+-
+-#ifdef DYING
+-static void hexdump(const unsigned char * buf, ssize_t len)
+- /*@*/
+-{
+- int i;
+- if (len <= 0)
+- return;
+- for (i = 0; i < len; i++) {
+- if (i != 0 && (i%16) == 0)
+- fprintf(stderr, "\n");
+- fprintf(stderr, " %02X", buf[i]);
+- }
+- fprintf(stderr, "\n");
+-}
+-#endif
+-
+-/*@-mustmod@*/
+-static void davAcceptRanges(void * userdata, /*@null@*/ const char * value)
+- /*@modifies userdata @*/
+-{
+- urlinfo u = userdata;
+-
+- if (!(u != NULL && value != NULL)) return;
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** u %p Accept-Ranges: %s\n", u, value);
+- if (!strcmp(value, "bytes"))
+- u->allow |= RPMURL_SERVER_HASRANGE;
+- if (!strcmp(value, "none"))
+- u->allow &= ~RPMURL_SERVER_HASRANGE;
+-}
+-/*@=mustmod@*/
+-
+-#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+-static void davAllHeaders(void * userdata, const char * value)
+-{
+- FD_t ctrl = userdata;
+-
+- if (!(ctrl != NULL && value != NULL)) return;
+-if (_dav_debug)
+-fprintf(stderr, "<- %s\n", value);
+-}
+-#endif
+-
+-/*@-mustmod@*/
+-static void davContentLength(void * userdata, /*@null@*/ const char * value)
+- /*@modifies userdata @*/
+-{
+- FD_t ctrl = userdata;
+-
+- if (!(ctrl != NULL && value != NULL)) return;
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** fd %p Content-Length: %s\n", ctrl, value);
+-/*@-unrecog@*/
+- ctrl->contentLength = strtoll(value, NULL, 10);
+-/*@=unrecog@*/
+-}
+-/*@=mustmod@*/
+-
+-/*@-mustmod@*/
+-static void davConnection(void * userdata, /*@null@*/ const char * value)
+- /*@modifies userdata @*/
+-{
+- FD_t ctrl = userdata;
+-
+- if (!(ctrl != NULL && value != NULL)) return;
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** fd %p Connection: %s\n", ctrl, value);
+- if (!strcasecmp(value, "close"))
+- ctrl->persist = 0;
+- else if (!strcasecmp(value, "Keep-Alive"))
+- ctrl->persist = 1;
+-}
+-/*@=mustmod@*/
+-
+-/*@-mustmod@*/ /* HACK: stash error in *str. */
+-int davResp(urlinfo u, FD_t ctrl, /*@unused@*/ char *const * str)
+-{
+- int rc = 0;
+-
+- rc = ne_begin_request(ctrl->req);
+- rc = my_result("ne_begin_req(ctrl->req)", rc, NULL);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davResp(%p,%p,%p) sess %p req %p rc %d\n", u, ctrl, str, u->sess, ctrl->req, rc);
+-
+- /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */
+-/*@-observertrans@*/
+- if (rc)
+- fdSetSyserrno(ctrl, errno, ftpStrerror(-rc));
+-/*@=observertrans@*/
+-
+- return rc;
+-}
+-/*@=mustmod@*/
+-
+-int davReq(FD_t ctrl, const char * httpCmd, const char * httpArg)
+-{
+- urlinfo u;
+- int rc = 0;
+-
+-assert(ctrl != NULL);
+- u = ctrl->url;
+- URLSANE(u);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davReq(%p,%s,\"%s\") entry sess %p req %p\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req);
+-
+- ctrl->persist = (u->httpVersion > 0 ? 1 : 0);
+- ctrl = fdLink(ctrl, "open ctrl (davReq)");
+-
+-assert(u->sess != NULL);
+-assert(ctrl->req == NULL);
+-/*@-nullpass@*/
+- ctrl->req = ne_request_create(u->sess, httpCmd, httpArg);
+-/*@=nullpass@*/
+-assert(ctrl->req != NULL);
+-
+- ne_set_request_private(ctrl->req, "fd", ctrl);
+-
+-#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+- ne_add_response_header_catcher(ctrl->req, davAllHeaders, ctrl);
+-
+- ne_add_response_header_handler(ctrl->req, "Content-Length",
+- davContentLength, ctrl);
+- ne_add_response_header_handler(ctrl->req, "Connection",
+- davConnection, ctrl);
+-#endif
+-
+- if (!strcmp(httpCmd, "PUT")) {
+-#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
+- ctrl->wr_chunked = 1;
+- ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
+- ne_set_request_chunked(ctrl->req, 1);
+- /* HACK: no retries if/when chunking. */
+- rc = davResp(u, ctrl, NULL);
+-#else
+- rc = FTPERR_SERVER_IO_ERROR;
+-#endif
+- } else {
+- /* HACK: possible Last-Modified: Tue, 02 Nov 2004 14:29:36 GMT */
+- /* HACK: possible ETag: "inode-size-mtime" */
+-#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+- ne_add_response_header_handler(ctrl->req, "Accept-Ranges",
+- davAcceptRanges, u);
+-#endif
+- /* HACK: possible Transfer-Encoding: on GET. */
+-
+- /* HACK: other errors may need retry too. */
+- /* HACK: neon retries once, gud enuf. */
+- /* HACK: retry counter? */
+- do {
+- rc = davResp(u, ctrl, NULL);
+- } while (rc == NE_RETRY);
+- }
+- if (rc)
+- goto errxit;
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davReq(%p,%s,\"%s\") exit sess %p req %p rc %d\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req, rc);
+-
+-#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+- davContentLength(ctrl,
+- ne_get_response_header(ctrl->req, "Content-Length"));
+- davConnection(ctrl,
+- ne_get_response_header(ctrl->req, "Connection"));
+- if (strcmp(httpCmd, "PUT"))
+- davAcceptRanges(u,
+- ne_get_response_header(ctrl->req, "Accept-Ranges"));
+-#endif
+-
+- ctrl = fdLink(ctrl, "open data (davReq)");
+- return 0;
+-
+-errxit:
+-/*@-observertrans@*/
+- fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
+-/*@=observertrans@*/
+-
+- /* HACK balance fd refs. ne_session_destroy to tear down non-keepalive? */
+- ctrl = fdLink(ctrl, "error data (davReq)");
+-
+- return rc;
+-}
+-
+-FD_t davOpen(const char * url, /*@unused@*/ int flags,
+- /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
+-{
+- const char * path = NULL;
+- urltype urlType = urlPath(url, &path);
+- urlinfo u = NULL;
+- FD_t fd = NULL;
+- int rc;
+-
+-#if 0 /* XXX makeTempFile() heartburn */
+- assert(!(flags & O_RDWR));
+-#endif
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davOpen(%s,0x%x,0%o,%p)\n", url, flags, mode, uret);
+- rc = davInit(url, &u);
+- if (rc || u == NULL || u->sess == NULL)
+- goto exit;
+-
+- if (u->ctrl == NULL)
+- u->ctrl = fdNew("persist ctrl (davOpen)");
+- if (u->ctrl->nrefs > 2 && u->data == NULL)
+- u->data = fdNew("persist data (davOpen)");
+-
+- if (u->ctrl->url == NULL)
+- fd = fdLink(u->ctrl, "grab ctrl (davOpen persist ctrl)");
+- else if (u->data->url == NULL)
+- fd = fdLink(u->data, "grab ctrl (davOpen persist data)");
+- else
+- fd = fdNew("grab ctrl (davOpen)");
+-
+- if (fd) {
+- fdSetOpen(fd, url, flags, mode);
+- fdSetIo(fd, ufdio);
+-
+- fd->ftpFileDoneNeeded = 0;
+- fd->rd_timeoutsecs = httpTimeoutSecs;
+- fd->contentLength = fd->bytesRemain = -1;
+- fd->url = urlLink(u, "url (davOpen)");
+- fd = fdLink(fd, "grab data (davOpen)");
+-assert(urlType == URL_IS_HTTPS || urlType == URL_IS_HTTP || urlType == URL_IS_HKP);
+- fd->urlType = urlType;
+- }
+-
+-exit:
+-/*@-boundswrite@*/
+- if (uret)
+- *uret = u;
+-/*@=boundswrite@*/
+- /*@-refcounttrans@*/
+- return fd;
+- /*@=refcounttrans@*/
+-}
+-
+-ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
+-{
+- FD_t fd = cookie;
+- ssize_t rc;
+-
+-#if 0
+-assert(count >= 128); /* HACK: see ne_request.h comment */
+-#endif
+- rc = ne_read_response_block(fd->req, buf, count);
+-
+-if (_dav_debug < 0) {
+-fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
+-#ifdef DYING
+-hexdump(buf, rc);
+-#endif
+- }
+-
+- return rc;
+-}
+-
+-ssize_t davWrite(void * cookie, const char * buf, size_t count)
+-{
+-#if !defined(NEONBLOWSCHUNKS) || defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
+- FD_t fd = cookie;
+-#endif
+- ssize_t rc;
+- int xx = -1;
+-
+-#if !defined(NEONBLOWSCHUNKS)
+- ne_session * sess;
+-
+-assert(fd->req != NULL);
+- sess = ne_get_session(fd->req);
+-assert(sess != NULL);
+-
+- /* HACK: include ne_private.h to access sess->socket for now. */
+- xx = ne_sock_fullwrite(sess->socket, buf, count);
+-#else
+-#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
+-assert(fd->req != NULL);
+- xx = ne_send_request_chunk(fd->req, buf, count);
+-#else
+- errno = EIO; /* HACK */
+- return -1;
+-#endif
+-#endif
+-
+- /* HACK: stupid error impedence matching. */
+- rc = (xx == 0 ? count : -1);
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
+-#ifdef DYING
+-if (count > 0)
+-hexdump(buf, count);
+-#endif
+-
+- return rc;
+-}
+-
+-int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)
+-{
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davSeek(%p,pos,%d)\n", cookie, whence);
+- return -1;
+-}
+-
+-/*@-mustmod@*/ /* HACK: fd->req is modified. */
+-int davClose(void * cookie)
+-{
+-/*@-onlytrans@*/
+- FD_t fd = cookie;
+-/*@=onlytrans@*/
+- int rc;
+-
+-assert(fd->req != NULL);
+- rc = ne_end_request(fd->req);
+- rc = my_result("ne_end_request(req)", rc, NULL);
+-
+- ne_request_destroy(fd->req);
+- fd->req = NULL;
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davClose(%p) rc %d\n", fd, rc);
+- return rc;
+-}
+-/*@=mustmod@*/
+-
+-/* =============================================================== */
+-int davMkdir(const char * path, mode_t mode)
+-{
+- urlinfo u = NULL;
+- const char * src = NULL;
+- int rc;
+-
+- rc = davInit(path, &u);
+- if (rc)
+- goto exit;
+-
+- (void) urlPath(path, &src);
+-
+- rc = ne_mkcol(u->sess, path);
+-
+- if (rc) rc = -1; /* XXX HACK: errno impedance match */
+-
+- /* XXX HACK: verify getrestype(remote) == resr_collection */
+-
+-exit:
+-if (_dav_debug)
+-fprintf(stderr, "*** davMkdir(%s,0%o) rc %d\n", path, mode, rc);
+- return rc;
+-}
+-
+-int davRmdir(const char * path)
+-{
+- urlinfo u = NULL;
+- const char * src = NULL;
+- int rc;
+-
+- rc = davInit(path, &u);
+- if (rc)
+- goto exit;
+-
+- (void) urlPath(path, &src);
+-
+- /* XXX HACK: only getrestype(remote) == resr_collection */
+-
+- rc = ne_delete(u->sess, path);
+-
+- if (rc) rc = -1; /* XXX HACK: errno impedance match */
+-
+-exit:
+-if (_dav_debug)
+-fprintf(stderr, "*** davRmdir(%s) rc %d\n", path, rc);
+- return rc;
+-}
+-
+-int davRename(const char * oldpath, const char * newpath)
+-{
+- urlinfo u = NULL;
+- const char * src = NULL;
+- const char * dst = NULL;
+- int overwrite = 1; /* HACK: set this correctly. */
+- int rc;
+-
+- rc = davInit(oldpath, &u);
+- if (rc)
+- goto exit;
+-
+- (void) urlPath(oldpath, &src);
+- (void) urlPath(newpath, &dst);
+-
+- /* XXX HACK: only getrestype(remote) != resr_collection */
+-
+- rc = ne_move(u->sess, overwrite, src, dst);
+-
+- if (rc) rc = -1; /* XXX HACK: errno impedance match */
+-
+-exit:
+-if (_dav_debug)
+-fprintf(stderr, "*** davRename(%s,%s) rc %d\n", oldpath, newpath, rc);
+- return rc;
+-}
+-
+-int davUnlink(const char * path)
+-{
+- urlinfo u = NULL;
+- const char * src = NULL;
+- int rc;
+-
+- rc = davInit(path, &u);
+- if (rc)
+- goto exit;
+-
+- (void) urlPath(path, &src);
+-
+- /* XXX HACK: only getrestype(remote) != resr_collection */
+-
+- rc = ne_delete(u->sess, src);
+-
+-exit:
+- if (rc) rc = -1; /* XXX HACK: errno impedance match */
+-
+-if (_dav_debug)
+-fprintf(stderr, "*** davUnlink(%s) rc %d\n", path, rc);
+- return rc;
+-}
+-
+-#ifdef NOTYET
+-static int davChdir(const char * path)
+- /*@globals h_errno, fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/
+-{
+- return davCommand("CWD", path, NULL);
+-}
+-#endif /* NOTYET */
+-
+-/* =============================================================== */
+-
+-static const char * statstr(const struct stat * st,
+- /*@returned@*/ /*@out@*/ char * buf)
+- /*@modifies *buf @*/
+-{
+- sprintf(buf,
+- "*** dev %x ino %x mode %0o nlink %d uid %d gid %d rdev %x size %x\n",
+- (unsigned)st->st_dev,
+- (unsigned)st->st_ino,
+- st->st_mode,
+- (unsigned)st->st_nlink,
+- st->st_uid,
+- st->st_gid,
+- (unsigned)st->st_rdev,
+- (unsigned)st->st_size);
+- return buf;
+-}
+-
+-/*@unchecked@*/
+-static unsigned int dav_st_ino = 0xdead0000;
+-
+-/*@-boundswrite@*/
+-int davStat(const char * path, /*@out@*/ struct stat *st)
+- /*@globals dav_st_ino, fileSystem, internalState @*/
+- /*@modifies *st, dav_st_ino, fileSystem, internalState @*/
+-{
+- struct fetch_context_s * ctx = NULL;
+- char buf[1024];
+- int rc = -1;
+-
+-/* HACK: neon really wants collections with trailing '/' */
+- ctx = fetch_create_context(path, st);
+- if (ctx == NULL) {
+-fprintf(stderr, "==> %s fetch_create_context ctx %p\n", "davStat", ctx);
+-/* HACK: errno = ??? */
+- goto exit;
+- }
+- rc = davNLST(ctx);
+- if (rc) {
+-/* HACK: errno = ??? */
+- goto exit;
+- }
+-
+- if (st->st_mode == 0)
+- st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG);
+- st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size);
+- st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime);
+- st->st_atime = st->st_ctime = st->st_mtime; /* HACK */
+- if (S_ISDIR(st->st_mode)) {
+- st->st_nlink = 2;
+- st->st_mode |= 0755;
+- } else
+- if (S_ISREG(st->st_mode)) {
+- st->st_nlink = 1;
+- st->st_mode |= 0644;
+- }
+-
+- /* XXX fts(3) needs/uses st_ino, make something up for now. */
+- if (st->st_ino == 0)
+- st->st_ino = dav_st_ino++;
+-
+-exit:
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davStat(%s) rc %d\n%s", path, rc, statstr(st, buf));
+- ctx = fetch_destroy_context(ctx);
+- return rc;
+-}
+-/*@=boundswrite@*/
+-
+-/*@-boundswrite@*/
+-int davLstat(const char * path, /*@out@*/ struct stat *st)
+- /*@globals dav_st_ino, fileSystem, internalState @*/
+- /*@modifies *st, dav_st_ino, fileSystem, internalState @*/
+-{
+- struct fetch_context_s * ctx = NULL;
+- char buf[1024];
+- int rc = -1;
+-
+-/* HACK: neon really wants collections with trailing '/' */
+- ctx = fetch_create_context(path, st);
+- if (ctx == NULL) {
+-/* HACK: errno = ??? */
+- goto exit;
+- }
+- rc = davNLST(ctx);
+- if (rc) {
+-/* HACK: errno = ??? */
+- goto exit;
+- }
+-
+- if (st->st_mode == 0)
+- st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG);
+- st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size);
+- st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime);
+- st->st_atime = st->st_ctime = st->st_mtime; /* HACK */
+- if (S_ISDIR(st->st_mode)) {
+- st->st_nlink = 2;
+- st->st_mode |= 0755;
+- } else
+- if (S_ISREG(st->st_mode)) {
+- st->st_nlink = 1;
+- st->st_mode |= 0644;
+- }
+-
+- /* XXX fts(3) needs/uses st_ino, make something up for now. */
+- if (st->st_ino == 0)
+- st->st_ino = dav_st_ino++;
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davLstat(%s) rc %d\n%s\n", path, rc, statstr(st, buf));
+-exit:
+- ctx = fetch_destroy_context(ctx);
+- return rc;
+-}
+-/*@=boundswrite@*/
+-
+-#ifdef NOTYET
+-static int davReadlink(const char * path, /*@out@*/ char * buf, size_t bufsiz)
+- /*@globals h_errno, fileSystem, internalState @*/
+- /*@modifies *buf, fileSystem, internalState @*/
+-{
+- int rc;
+- rc = davNLST(path, DO_FTP_READLINK, NULL, buf, bufsiz);
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davReadlink(%s) rc %d\n", path, rc);
+- return rc;
+-}
+-#endif /* NOTYET */
+-
+ /* =============================================================== */
+ /*@unchecked@*/
+ int avmagicdir = 0x3607113;
+@@ -1660,179 +145,3 @@
+ /*@=kepttrans@*/
+ }
+ /*@=boundswrite@*/
+-
+-/* =============================================================== */
+-/*@unchecked@*/
+-int davmagicdir = 0x8440291;
+-
+-int davClosedir(/*@only@*/ DIR * dir)
+-{
+- DAVDIR avdir = (DAVDIR)dir;
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davClosedir(%p)\n", avdir);
+-
+-#if defined(HAVE_PTHREAD_H)
+-/*@-moduncon -noeffectuncon @*/
+- (void) pthread_mutex_destroy(&avdir->lock);
+-/*@=moduncon =noeffectuncon @*/
+-#endif
+-
+- avdir = _free(avdir);
+- return 0;
+-}
+-
+-struct dirent * davReaddir(DIR * dir)
+-{
+- DAVDIR avdir = (DAVDIR)dir;
+- struct dirent * dp;
+- const char ** av;
+- unsigned char * dt;
+- int ac;
+- int i;
+-
+- if (avdir == NULL || !ISDAVMAGIC(avdir) || avdir->data == NULL) {
+- /* XXX TODO: EBADF errno. */
+- return NULL;
+- }
+-
+- dp = (struct dirent *) avdir->data;
+- av = (const char **) (dp + 1);
+- ac = avdir->size;
+- dt = (unsigned char *) (av + (ac + 1));
+- i = avdir->offset + 1;
+-
+-/*@-boundsread@*/
+- if (i < 0 || i >= ac || av[i] == NULL)
+- return NULL;
+-/*@=boundsread@*/
+-
+- avdir->offset = i;
+-
+- /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
+-/*@-type@*/
+- dp->d_ino = i + 1; /* W2DO? */
+- dp->d_reclen = 0; /* W2DO? */
+-
+-#if !(defined(hpux) || defined(__hpux) || defined(sun))
+-#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)
+- dp->d_off = 0; /* W2DO? */
+-#endif
+-/*@-boundsread@*/
+- dp->d_type = dt[i];
+-/*@=boundsread@*/
+-#endif
+-/*@=type@*/
+-
+- strncpy(dp->d_name, av[i], sizeof(dp->d_name));
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davReaddir(%p) %p \"%s\"\n", (void *)avdir, dp, dp->d_name);
+-
+- return dp;
+-}
+-
+-/*@-boundswrite@*/
+-DIR * davOpendir(const char * path)
+-{
+- struct fetch_context_s * ctx;
+- DAVDIR avdir;
+- struct dirent * dp;
+- size_t nb;
+- const char ** av, ** nav;
+- unsigned char * dt;
+- char * t;
+- int ac, nac;
+- int rc;
+-
+- /* HACK: glob does not pass dirs with trailing '/' */
+- nb = strlen(path)+1;
+-/*@-branchstate@*/
+- if (path[nb-1] != '/') {
+- char * npath = alloca(nb+1);
+- *npath = '\0';
+- (void) stpcpy( stpcpy(npath, path), "/");
+- path = npath;
+- }
+-/*@=branchstate@*/
+-
+-if (_dav_debug < 0)
+-fprintf(stderr, "*** davOpendir(%s)\n", path);
+-
+- /* Load DAV collection into argv. */
+- ctx = fetch_create_context(path, NULL);
+- if (ctx == NULL) {
+-/* HACK: errno = ??? */
+- return NULL;
+- }
+- rc = davNLST(ctx);
+- if (rc) {
+-/* HACK: errno = ??? */
+- return NULL;
+- }
+-
+- nb = 0;
+- ac = 0;
+- av = ctx->av;
+- if (av != NULL)
+- while (av[ac] != NULL)
+- nb += strlen(av[ac++]) + 1;
+- ac += 2; /* for "." and ".." */
+- nb += sizeof(".") + sizeof("..");
+-
+- nb += sizeof(*avdir) + sizeof(*dp) + ((ac + 1) * sizeof(*av)) + (ac + 1);
+- avdir = xcalloc(1, nb);
+- /*@-abstract@*/
+- dp = (struct dirent *) (avdir + 1);
+- nav = (const char **) (dp + 1);
+- dt = (unsigned char *) (nav + (ac + 1));
+- t = (char *) (dt + ac + 1);
+- /*@=abstract@*/
+-
+- avdir->fd = davmagicdir;
+-/*@-usereleased@*/
+- avdir->data = (char *) dp;
+-/*@=usereleased@*/
+- avdir->allocation = nb;
+- avdir->size = ac;
+- avdir->offset = -1;
+- avdir->filepos = 0;
+-
+-#if defined(HAVE_PTHREAD_H)
+-/*@-moduncon -noeffectuncon -nullpass @*/
+- (void) pthread_mutex_init(&avdir->lock, NULL);
+-/*@=moduncon =noeffectuncon =nullpass @*/
+-#endif
+-
+- nac = 0;
+-/*@-dependenttrans -unrecog@*/
+- dt[nac] = DT_DIR; nav[nac++] = t; t = stpcpy(t, "."); t++;
+- dt[nac] = DT_DIR; nav[nac++] = t; t = stpcpy(t, ".."); t++;
+-/*@=dependenttrans =unrecog@*/
+-
+- /* Copy DAV items into DIR elments. */
+- ac = 0;
+- if (av != NULL)
+- while (av[ac] != NULL) {
+- nav[nac] = t;
+- dt[nac] = (S_ISDIR(ctx->modes[ac]) ? DT_DIR : DT_REG);
+- t = stpcpy(t, av[ac]);
+- ac++;
+- t++;
+- nac++;
+- }
+- nav[nac] = NULL;
+-
+- ctx = fetch_destroy_context(ctx);
+-
+-/*@-kepttrans@*/
+- return (DIR *) avdir;
+-/*@=kepttrans@*/
+-}
+-/*@=modfilesys@*/
+-
+-char * davRealpath(const char * path, char * resolved_path)
+-{
+-assert(resolved_path == NULL); /* XXX no POSIXly broken realpath(3) here. */
+- /* XXX TODO: handle redirects. For now, just dupe the path. */
+- return xstrdup(path);
+-}
+--- rpm-4.5/rpmio/rpmdav.h 2007-05-25 20:36:36.000000000 +0300
++++ rpm-4.4.9/rpmio/rpmdav.h 2008-09-04 17:21:50.369579599 +0300
+@@ -46,12 +46,6 @@
+ extern int avmagicdir;
+ #define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir)))
+
+-/**
+- */
+-/*@unchecked@*/
+-extern int davmagicdir;
+-#define ISDAVMAGIC(_dir) (!memcmp((_dir), &davmagicdir, sizeof(davmagicdir)))
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -85,133 +79,6 @@
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/;
+
+-/**
+- * Send a http request.
+- * @param ctrl
+- * @param httpCmd http command
+- * @param httpArg http command argument (NULL if none)
+- * @returns 0 on success
+- */
+-int davReq(FD_t ctrl, const char * httpCmd, /*@null@*/ const char * httpArg)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies ctrl, fileSystem, internalState @*/;
+-
+-/**
+- * Read a http response.
+- * @param u
+- * @param cntl
+- * @retval *str error msg
+- * @returns 0 on success
+- */
+-/*@-exportlocal@*/
+-int davResp(urlinfo u, FD_t ctrl, /*@out@*/ /*@null@*/ char *const * str)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies ctrl, *str, fileSystem, internalState @*/;
+-/*@=exportlocal@*/
+-
+-/**
+- */
+-/*@null@*/
+-FD_t davOpen(const char * url, /*@unused@*/ int flags,
+- /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
+- /*@globals internalState @*/
+- /*@modifies *uret, internalState @*/;
+-
+-/**
+- */
+-/*@-incondefs@*/
+-ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies buf, fileSystem, internalState @*/
+- /*@requires maxSet(buf) >= (count - 1) @*/
+- /*@ensures maxRead(buf) == result @*/;
+-/*@=incondefs@*/
+-
+-/**
+- */
+-ssize_t davWrite(void * cookie, const char * buf, size_t count)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- */
+-int davSeek(void * cookie, _libio_pos_t pos, int whence)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- */
+-int davClose(void * cookie)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies cookie, fileSystem, internalState @*/;
+-
+-/**
+- */
+-int davMkdir(const char * path, mode_t mode)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- */
+-int davRmdir(const char * path)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- */
+-int davRename(const char * oldpath, const char * newpath)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- */
+-int davUnlink(const char * path)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- * Close a DAV collection.
+- * @param dir argv DIR
+- * @return 0 always
+- */
+-int davClosedir(/*@only@*/ DIR * dir)
+- /*@globals fileSystem @*/
+- /*@modifies dir, fileSystem @*/;
+-
+-/**
+- * Return next entry from a DAV collection.
+- * @param dir argv DIR
+- * @return next entry
+- */
+-/*@dependent@*/ /*@null@*/
+-struct dirent * davReaddir(DIR * dir)
+- /*@globals fileSystem @*/
+- /*@modifies fileSystem @*/;
+-
+-/**
+- * Create an argv directory from DAV collection.
+- * @param path URL for DAV collection path
+- * @return argv DIR
+- */
+-/*@null@*/
+-DIR * davOpendir(const char * path)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies fileSystem, internalState @*/;
+-
+-/**
+- * stat(2) clone.
+- */
+-int davStat(const char * path, /*@out@*/ struct stat * st)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies *st, fileSystem, internalState @*/;
+-
+-/**
+- * lstat(2) clone.
+- */
+-int davLstat(const char * path, /*@out@*/ struct stat * st)
+- /*@globals fileSystem, internalState @*/
+- /*@modifies *st, fileSystem, internalState @*/;
+-
+ #ifdef __cplusplus
+ }
+ #endif
+--- rpm-4.5/rpmio/rpmio.c 2008-09-04 18:04:37.362241187 +0300
++++ rpm-4.5/rpmio/rpmio.c 2008-09-04 18:05:08.695569896 +0300
+@@ -155,11 +155,6 @@
+ /*@unchecked@*/
+ int _ftp_debug = 0;
+
+-/**
+- */
+-/*@unchecked@*/
+-int _dav_debug = 0;
+-
+ /* =============================================================== */
+
+ /*@-boundswrite@*/
+@@ -386,13 +381,6 @@
+
+ fdstat_enter(fd, FDSTAT_READ);
+ /*@-boundswrite@*/
+- /* HACK: flimsy wiring for davRead */
+- if (fd->req != NULL) {
+- rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
+- /* XXX Chunked davRead EOF. */
+- if (rc == 0)
+- fd->bytesRemain = 0;
+- } else
+ rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
+ /*@=boundswrite@*/
+ fdstat_exit(fd, FDSTAT_READ, rc);
+@@ -420,10 +408,6 @@
+
+ fdstat_enter(fd, FDSTAT_WRITE);
+ /*@-boundsread@*/
+- /* HACK: flimsy wiring for davWrite */
+- if (fd->req != NULL)
+- rc = davWrite(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
+- else
+ rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
+ /*@=boundsread@*/
+ fdstat_exit(fd, FDSTAT_WRITE, rc);
+@@ -470,11 +454,6 @@
+ fdSetFdno(fd, -1);
+
+ fdstat_enter(fd, FDSTAT_CLOSE);
+- /* HACK: flimsy wiring for davClose */
+-/*@-branchstate@*/
+- if (fd->req != NULL)
+- rc = davClose(fd);
+- else
+ rc = ((fdno >= 0) ? close(fdno) : -2);
+ /*@=branchstate@*/
+ fdstat_exit(fd, FDSTAT_CLOSE, rc);
+@@ -544,10 +523,6 @@
+ FD_ZERO(&wrfds);
+ #endif
+
+- /* HACK: flimsy wiring for davWrite */
+- if (fd->req != NULL)
+- return 1;
+-
+ if ((fdno = fdFileno(fd)) < 0)
+ return -1; /* XXX W2DO? */
+
+@@ -599,10 +574,6 @@
+ FD_ZERO(&rdfds);
+ #endif
+
+- /* HACK: flimsy wiring for davRead */
+- if (fd->req != NULL)
+- return 1;
+-
+ if ((fdno = fdFileno(fd)) < 0)
+ return -1; /* XXX W2DO? */
+
+@@ -2265,29 +2236,6 @@
+ fd->wr_chunked = 0;
+ }
+ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- case URL_IS_HKP:
+- fd = davOpen(url, flags, mode, &u);
+- if (fd == NULL || u == NULL)
+- break;
+-
+- cmd = ((flags & O_WRONLY)
+- ? ((flags & O_APPEND) ? "PUT" :
+- ((flags & O_CREAT) ? "PUT" : "PUT"))
+- : "GET");
+- u->openError = davReq(fd, cmd, path);
+- if (u->openError < 0) {
+- /* XXX make sure that we can exit through ufdClose */
+- fd = fdLink(fd, "error ctrl (ufdOpen HTTP)");
+- fd = fdLink(fd, "error data (ufdOpen HTTP)");
+- } else {
+- fd->bytesRemain = ((!strcmp(cmd, "GET"))
+- ? fd->contentLength : -1);
+- fd->wr_chunked = ((!strcmp(cmd, "PUT"))
+- ? fd->wr_chunked : 0);
+- }
+- break;
+ case URL_IS_DASH:
+ assert(!(flags & O_RDWR));
+ fd = fdDup( ((flags & O_WRONLY) ? STDOUT_FILENO : STDIN_FILENO) );
+@@ -2911,10 +2859,8 @@
+ if (fd->nfps > 0 && fpno == -1 &&
+ fd->fps[fd->nfps-1].io == ufdio &&
+ fd->fps[fd->nfps-1].fp == fp &&
+- (fd->fps[fd->nfps-1].fdno >= 0 || fd->req != NULL))
++ (fd->fps[fd->nfps-1].fdno >= 0))
+ {
+- int hadreqpersist = (fd->req != NULL);
+-
+ if (fp)
+ rc = fflush(fp);
+ fd->nfps--;
+@@ -2924,26 +2870,9 @@
+ /*@-usereleased@*/
+ if (fdGetFdno(fd) >= 0)
+ break;
+- if (!fd->persist)
+- hadreqpersist = 0;
+ fdSetFp(fd, NULL);
+ fd->nfps++;
+ if (fp) {
+- /* HACK: flimsy Keepalive wiring. */
+- if (hadreqpersist) {
+- fd->nfps--;
+-/*@-exposetrans@*/
+- fdSetFp(fd, fp);
+-/*@=exposetrans@*/
+-/*@-refcounttrans@*/
+- (void) fdClose(fd);
+-/*@=refcounttrans@*/
+- fdSetFp(fd, NULL);
+- fd->nfps++;
+-/*@-refcounttrans@*/
+- (void) fdClose(fd);
+-/*@=refcounttrans@*/
+- } else
+ rc = fclose(fp);
+ }
+ fdPop(fd);
+@@ -3223,7 +3152,7 @@
+ if (_rpmio_debug)
+ fprintf(stderr, "*** Fopen ufdio path %s fmode %s\n", path, fmode);
+ fd = ufdOpen(path, flags, perms);
+- if (fd == NULL || !(fdFileno(fd) >= 0 || fd->req != NULL))
++ if (fd == NULL || !(fdFileno(fd) >= 0))
+ return fd;
+ break;
+ default:
+@@ -3234,7 +3163,7 @@
+ }
+
+ /* XXX persistent HTTP/1.1 returns the previously opened fp */
+- if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0 || fd->req != NULL))
++ if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0))
+ {
+ /*@+voidabstract@*/
+ fdPush(fd, fpio, fp, fileno(fp)); /* Push fpio onto stack */
+@@ -3276,10 +3205,6 @@
+ int i, rc = 0;
+
+ if (fd == NULL) return -1;
+- if (fd->req != NULL) {
+- /* HACK: flimsy wiring for neon errors. */
+- rc = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0;
+- } else
+ for (i = fd->nfps; rc == 0 && i >= 0; i--) {
+ /*@-boundsread@*/
+ FDSTACK_t * fps = &fd->fps[i];
+@@ -3317,9 +3242,6 @@
+ {
+ int i, rc = -1;
+
+- if (fd->req != NULL)
+- rc = 123456789; /* HACK: https has no steenkin fileno. */
+- else
+ for (i = fd->nfps ; rc == -1 && i >= 0; i--) {
+ /*@-boundsread@*/
+ rc = fd->fps[i].fdno;
+--- rpm-4.5/rpmio/librpmio.vers~ 2008-07-09 12:38:31.000000000 +0300
++++ rpm-4.5/rpmio/librpmio.vers 2008-09-04 17:52:56.158976430 +0300
+@@ -29,25 +29,6 @@
+ Chmod;
+ Chown;
+ Chroot;
+- davClose;
+- davClosedir;
+- _dav_debug;
+- davLstat;
+- davmagicdir;
+- davMkdir;
+- davOpen;
+- davOpendir;
+- davRead;
+- davReaddir;
+- davRealpath;
+- davRename;
+- davReq;
+- davResp;
+- davRmdir;
+- davSeek;
+- davStat;
+- davUnlink;
+- davWrite;
+ delMacro;
+ expandMacros;
+ Fclose;
+--- rpm-4.5/lib/poptALL.c~ 2007-10-23 18:53:08.000000000 +0300
++++ rpm-4.5/lib/poptALL.c 2008-09-04 17:53:21.845642132 +0300
+@@ -126,8 +126,6 @@
+ extern int _ftp_debug;
+ /*@unchecked@*/
+ extern int _av_debug;
+-/*@unchecked@*/
+-extern int _dav_debug;
+
+ /*@unchecked@*/
+ extern int noLibio;
+@@ -424,8 +422,6 @@
+ N_("debug FTP/HTTP data stream"), NULL},
+ { "avdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_av_debug, -1,
+ N_("debug argv collections"), NULL},
+- { "davdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_dav_debug, -1,
+- N_("debug WebDAV data stream"), NULL},
+ { "hdrdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_hdr_debug, -1,
+ NULL, NULL},
+ { "miredebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_mire_debug, -1,
+--- rpm-4.5/rpmio/rpmrpc.c 2008-09-04 17:56:39.132287618 +0300
++++ rpm-4.5/rpmio/rpmrpc.c 2008-09-04 17:57:38.618948392 +0300
+@@ -78,10 +78,6 @@
+ case URL_IS_FTP:
+ return ftpMkdir(path, mode);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davMkdir(path, mode);
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -105,15 +101,6 @@
+ case URL_IS_FTP:
+ return ftpChdir(path);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+-#ifdef NOTYET
+- return davChdir(path);
+-#else
+- errno = EINVAL; /* XXX W2DO? */
+- return -2;
+-#endif
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -138,10 +125,6 @@
+ case URL_IS_FTP:
+ return ftpRmdir(path);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davRmdir(path);
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -245,10 +228,6 @@
+
+ oldut = urlPath(oldpath, &oe);
+ switch (oldut) {
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davRename(oldpath, newpath);
+- /*@notreached@*/ break;
+ case URL_IS_FTP: /* XXX WRONG WRONG WRONG */
+ case URL_IS_PATH:
+ case URL_IS_UNKNOWN:
+@@ -343,10 +322,6 @@
+ case URL_IS_FTP:
+ return ftpUnlink(path);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davUnlink(path);
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -1354,10 +1329,6 @@
+ case URL_IS_FTP:
+ return ftpStat(path, st);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davStat(path, st);
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -1384,10 +1355,6 @@
+ case URL_IS_FTP:
+ return ftpLstat(path, st);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davLstat(path, st);
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -1630,14 +1597,6 @@
+ case URL_IS_FTP:
+ return ftpReadlink(path, buf, bufsiz);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+-#ifdef NOTYET
+- return davReadlink(path, buf, bufsiz);
+-#else
+- return -2;
+-#endif
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -1787,10 +1746,6 @@
+ case URL_IS_FTP:
+ return ftpOpendir(path);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- return davOpendir(path);
+- /*@notreached@*/ break;
+ case URL_IS_PATH:
+ path = lpath;
+ /*@fallthrough@*/
+@@ -1815,8 +1770,6 @@
+ return NULL;
+ if (ISAVMAGIC(dir))
+ return avReaddir(dir);
+- if (ISDAVMAGIC(dir))
+- return davReaddir(dir);
+ return readdir(dir);
+ }
+
+@@ -1828,8 +1781,6 @@
+ return 0;
+ if (ISAVMAGIC(dir))
+ return avClosedir(dir);
+- if (ISDAVMAGIC(dir))
+- return davClosedir(dir);
+ return closedir(dir);
+ }
+
+@@ -1852,14 +1803,6 @@
+ case URL_IS_FTP:
+ return ftpRealpath(path, resolved_path);
+ /*@notreached@*/ break;
+- case URL_IS_HTTPS:
+- case URL_IS_HTTP:
+- case URL_IS_HKP:
+-#ifdef WITH_NEON
+- return davRealpath(path, resolved_path);
+- /*@notreached@*/ break;
+-#endif
+- /*@fallthrough@*/
+ default:
+ return xstrdup(path);
+ /*@notreached@*/ break;
+--- rpm-4.5/./rpmio/rpmio_internal.h~ 2008-06-10 02:19:26.000000000 +0300
++++ rpm-4.5/./rpmio/rpmio_internal.h 2008-09-04 18:00:31.015598325 +0300
+@@ -182,7 +182,6 @@
+ /*@dependent@*/
+ void * url; /* ufdio: URL info */
+ /*@relnull@*/
+- void * req; /* ufdio: HTTP request */
+
+ int rd_timeoutsecs; /* ufdRead: per FD_t timer */
+ ssize_t bytesRemain; /* ufdio: */
+--- rpm-4.5/rpmio/rpmurl.h~ 2008-06-10 02:19:26.000000000 +0300
++++ rpm-4.5/rpmio/rpmurl.h 2008-09-04 18:14:00.546141703 +0300
+@@ -54,15 +54,6 @@
+ /*@relnull@*/
+ FD_t data; /*!< per-xfer data channel */
+
+-/*@relnull@*/
+- void * capabilities; /*!< neon: ne_server_capabilities ptr */
+-/*@relnull@*/
+- void * lockstore; /*!< neon: ne_lock_store ptr */
+-/*@relnull@*/
+- void * sess; /*!< neon: ne_session ptr */
+- off_t current; /*!< neon: current body offset. */
+- off_t total; /*!< neon: total body length. */
+- int connstatus; /*!< neon: connection status. */
+ #ifdef REFERENCE
+ typedef enum {
+ ne_conn_namelookup, /* lookup up hostname (info = hostname) */
+--- rpm-4.5/rpmio/url.c~ 2008-06-10 02:19:26.000000000 +0300
++++ rpm-4.5/rpmio/url.c 2008-09-04 20:05:19.011716915 +0300
+@@ -134,7 +134,6 @@
+ (u->scheme ? u->scheme : ""));
+ /*@=usereleased@*/
+ }
+- xx = davFree(u);
+ u->buf = _free(u->buf);
+ u->url = _free(u->url);
+ u->scheme = _free((void *)u->scheme);
+--- rpm-4.5/perl/Makefile.PL.in~ 2008-10-05 01:31:09.000000000 +0300
++++ rpm-4.5/perl/Makefile.PL.in 2008-10-05 01:32:12.688278120 +0300
+@@ -12,7 +12,7 @@
+ 'NAME' => 'RPM',
+ 'VERSION_FROM' => 'RPM.pm', # finds $VERSION
+ 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
+- 'LIBS' => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@ -lneon'],
++ 'LIBS' => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@'],
+ 'DEFINE' => join(" ", @defines), # e.g., '-DHAVE_SOMETHING'
+ 'INC' => join(' ', map { '-I@top_srcdir@/'. $_ } @libdir) . ' @CPPFLAGS@',
+ 'TYPEMAPS' => [ 'typemap' ],
+--- rpm-4.5/configure.ac.orig 2011-02-21 16:29:42.000000000 +0100
++++ rpm-4.5/configure.ac 2011-02-21 16:31:00.574910173 +0100
+@@ -591,28 +591,7 @@
+ WITH_NEON_SUBDIR=
+ WITH_NEON_INCLUDE=
+ WITH_NEON_LIB=
+-AC_CHECK_HEADER([neon/ne_session.h], [
+- AC_CHECK_LIB(neon, ne_session_create, [
+- AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
+- AC_CHECK_LIB(neon, ne_get_response_header, [
+- AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
+- ])
+- AC_CHECK_LIB(neon, ne_send_request_chunk, [
+- AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
+- ])
+- WITH_NEON_INCLUDE="-I${includedir}/neon"
+- WITH_NEON_LIB="-lneon"
+- ])
+-],[
+- if test -d neon ; then
+- AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
+-# XXX HAVE_NEON_NE_GET_RESPONSE_HEADER assumes libneon-0.25 devel internal
+- AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
+- WITH_NEON_SUBDIR=neon
+- WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
+- WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
+- fi
+-])
++
+ AC_SUBST(WITH_NEON_SUBDIR)
+ AC_SUBST(WITH_NEON_INCLUDE)
+ AC_SUBST(WITH_NEON_LIB)
--- /dev/null
+--- rpm-4.4.9/configure.ac.orig 2005-11-19 01:08:41.529577632 +0100
++++ rpm-4.4.9/configure.ac 2005-11-19 01:09:44.521001480 +0100
+@@ -618,24 +596,6 @@
+ WITH_SQLITE3_INCLUDE=
+ WITH_SQLITE3_LIB=
+
+-AC_CHECK_HEADER([sqlite3.h], [
+- AC_CHECK_LIB(sqlite, sqlite3_open, [
+- AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
+- WITH_SQLITE3_SUBDIR=
+- WITH_SQLITE3_INCLUDE=
+- WITH_SQLITE3_LIB="-lsqlite"
+- DBLIBSRCS="$DBLIBSRCS sqlite.c"
+- ])
+-],[
+- if test -d sqlite ; then
+- AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
+- WITH_SQLITE3_SUBDIR=sqlite
+- WITH_SQLITE3_INCLUDE="-I\${top_srcdir}/${WITH_SQLITE3_SUBDIR} -I\${top_srcdir}/${WITH_SQLITE3_SUBDIR}/src"
+- WITH_SQLITE3_LIB="\${top_builddir}/${WITH_SQLITE3_SUBDIR}/libsqlite3.la"
+- DBLIBSRCS="$DBLIBSRCS sqlite.c"
+- fi
+-])
+-
+ AC_SUBST(WITH_SQLITE3_SUBDIR)
+ AC_SUBST(WITH_SQLITE3_INCLUDE)
+ AC_SUBST(WITH_SQLITE3_LIB)
--- /dev/null
+--- rpm-4.4.3/build/parseChangelog.c.orig 2005-11-12 01:20:12.000000000 +0100
++++ rpm-4.4.3/build/parseChangelog.c 2005-11-18 19:46:50.357322048 +0100
+@@ -255,7 +255,7 @@
+ line = xstrtolocale(line);
+ appendStringBuf(sb, spec->line);
+ line = _free(line);
+- if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
++ if ((rc = readLine(spec, STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
+ nextPart = PART_NONE;
+ break;
+ }
+--- rpm-4.3/build/parseSpec.c.wiget Thu May 15 18:15:51 2003
++++ rpm-4.3/build/parseSpec.c Fri May 16 00:08:57 2003
+@@ -156,12 +156,16 @@
+ ofi->readPtr = from;
+
+ /* Don't expand macros (eg. %define) in false branch of %if clause */
++ /* Also don't expand macros in %changelog where we set STRIP_NOEXPAND flag */
++ /* (first line is ommited, so if there is e.g. %date macro, it will be expanded */
++ if (!(strip & STRIP_NOEXPAND)) {
+ if (spec->readStack->reading &&
+ expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
+ rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
+ spec->lineNum, spec->lbuf);
+ return RPMERR_BADSPEC;
+ }
++ }
+ spec->nextline = spec->lbuf;
+ }
+
+@@ -273,6 +277,7 @@
+ SKIPSPACE(s);
+
+ match = -1;
++ if (! (strip & STRIP_NOEXPAND)) {
+ if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) {
+ match = 0;
+ } else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
+@@ -354,6 +359,7 @@
+ ofi = spec->fileStack;
+ goto retry;
+ }
++ }
+
+ if (match != -1) {
+ rl = xmalloc(sizeof(*rl));
+--- rpm-4.3/build/rpmbuild.h.wiget Sat May 10 17:19:33 2003
++++ rpm-4.3/build/rpmbuild.h Fri May 16 00:06:47 2003
+@@ -75,6 +75,7 @@
+ #define STRIP_NOTHING 0
+ #define STRIP_TRAILINGSPACE (1 << 0)
+ #define STRIP_COMMENTS (1 << 1)
++#define STRIP_NOEXPAND (1 << 2)
+
+ #ifdef __cplusplus
+ extern "C" {
--- /dev/null
+--- rpm-4.5/configure.ac~ 2008-06-10 01:59:21.000000000 +0300
++++ rpm-4.5/configure.ac 2008-06-10 01:59:51.820465028 +0300
+@@ -36,7 +36,7 @@
+ if test "$ac_cv_c_compiler_gnu" = yes; then
+ CFLAGS="$CFLAGS -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
+ case "$target" in
+- *-*-linux* ) LDFLAGS="$LDFLAGS -pie" ;;
++ *-*-linux* ) LDFLAGS="$LDFLAGS" ;;
+ esac
+ fi
+ export CFLAGS LDFLAGS
+--- rpm-4.5/Makefile.am~ 2008-06-11 01:11:33.000000000 +0300
++++ rpm-4.5/Makefile.am 2008-06-11 01:33:49.737107691 +0300
+@@ -55,13 +55,13 @@
+ rpm_LDFLAGS = $(myLDFLAGS) $(staticLDFLAGS)
+ rpm_LDADD = rpm.o $(top_builddir)/build/.libs/librpmbuild.a $(myLDADD)
+ rpm.o: $(top_srcdir)/rpmqv.c
+- $(COMPILE) -fpie -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $<
++ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $<
+
+ rpmbuild_SOURCES = $(top_srcdir)/build.c
+ rpmbuild_LDFLAGS = $(myLDFLAGS) $(staticLDFLAGS)
+ rpmbuild_LDADD = rpmbuild.o $(top_builddir)/build/librpmbuild.la $(myLDADD)
+ rpmbuild.o: $(top_srcdir)/rpmqv.c
+- $(COMPILE) -fpie -DIAM_RPMBT -o $@ -c $<
++ $(COMPILE) -DIAM_RPMBT -o $@ -c $<
+
+ $(PROGRAMS): @WITH_APIDOCS_TARGET@
+
--- /dev/null
+--- rpm-4.4.9/platform.in~ 2008-10-09 15:07:56.000000000 +0300
++++ rpm-4.4.9/platform.in 2008-10-09 15:08:51.661842059 +0300
+@@ -32,10 +32,6 @@
+
+ %_defaultdocdir @DEFAULTDOCDIR@
+
+-%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
+- && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
+- [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
+-
+ @MULTILIBSTART@
+ #---------------------------------------------------------------------
+ # Multilibs
--- /dev/null
+--- rpm-4.3/rpmio/rpmsw.c.orig 2003-04-10 20:09:13.000000000 +0200
++++ rpm-4.3/rpmio/rpmsw.c 2003-11-17 21:55:44.649426712 +0100
+@@ -27,7 +27,7 @@
+ /*@unchecked@*/
+ static int rpmsw_initialized = 0;
+
+-#if defined(__i386__)
++#if 0 && defined(__i386__)
+ /* Swiped from glibc-2.3.2 sysdeps/i386/i686/hp-timing.h */
+
+ #define HP_TIMING_ZERO(Var) (Var) = (0)
--- /dev/null
+--- rpm-4.5/configure.ac~ 2008-06-12 22:16:53.000000000 +0300
++++ rpm-4.5/configure.ac 2008-06-12 22:19:01.103542424 +0300
+@@ -1496,7 +1496,7 @@
+ [Colon separated paths of rpmrc files to read.])
+ AC_SUBST(RPMRCFILES)
+
+-RPMPOPTFILE="${USRLIBRPM}/${VERSION}/rpmpopt"
++RPMPOPTFILE="${USRLIBRPM}/rpmpopt"
+ AC_DEFINE_UNQUOTED(RPMPOPTFILE, "$RPMPOPTFILE",
+ [Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)])
+ AC_SUBST(RPMPOPTFILE)
+--- rpm-4.5/macros.in~ 2008-06-11 10:53:07.000000000 +0300
++++ rpm-4.5/macros.in 2008-06-11 21:59:36.949096310 +0300
+@@ -33,7 +33,7 @@
+ %_usrlibrpm @USRLIBRPM@
+ %_etcrpm @SYSCONFIGDIR@
+
+-%_rpmhome %{_usrlibrpm}/%{_rpmversion}
++%_rpmhome %{_usrlibrpm}
+
+ #==============================================================================
+ # ---- Generally useful path macros.
+--- rpm-4.5/Makefile.am~ 2008-06-11 10:52:27.000000000 +0300
++++ rpm-4.5/Makefile.am 2008-06-11 22:04:00.280274462 +0300
+@@ -46,8 +46,7 @@
+ bin_PROGRAMS = rpm rpmbuild
+
+ pkglibdir = @USRLIBRPM@
+-versionlibdir = $(pkglibdir)/@VERSION@
+-versionlib_DATA = rpmpopt macros
++pkglib_DATA = rpmpopt macros
+
+ noinst_HEADERS = build.h debug.h system.h
+
+--- rpm-4.5/tools/Makefile.am~ 2008-07-09 13:30:54.000000000 +0300
++++ rpm-4.5/tools/Makefile.am 2008-07-09 13:34:07.594546056 +0300
+@@ -24,8 +24,7 @@
+ bin_PROGRAMS = rpmdigest rpmmtree rpmrepo
+
+ pkglibdir = @USRLIBRPM@
+-versionlibdir = $(pkglibdir)/@VERSION@
+-versionlib_PROGRAMS = rpmdeps @WITH_LIBDWARF_DEBUGEDIT@
++pkglib_PROGRAMS = rpmdeps @WITH_LIBDWARF_DEBUGEDIT@
+
+ convertdb1_SOURCES = convertdb1.c
+
+--- rpm-4.5/scripts/Makefile.am~ 2008-05-21 23:48:02.000000000 +0300
++++ rpm-4.5/scripts/Makefile.am 2008-06-11 22:05:28.257345656 +0300
+@@ -28,8 +28,7 @@
+ bin_SCRIPTS = gendiff rpm2cpio
+
+ pkglibdir = @USRLIBRPM@
+-versionlibdir = $(pkglibdir)/@VERSION@
+-versionlib_SCRIPTS = \
++pkglib_SCRIPTS = \
+ brp-compress brp-python-bytecompile brp-java-gcjcompile \
+ brp-strip brp-strip-comment-note brp-nobuildrootpath \
+ brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
--- /dev/null
+--- rpm-4.4.4/lib/poptI.c.orig 2005-11-27 13:50:16.000000000 +0000
++++ rpm-4.4.4/lib/poptI.c 2005-12-28 02:43:01.029574304 +0000
+@@ -16,7 +16,7 @@
+ /*@-fullinitblock@*/
+ /*@unchecked@*/
+ struct rpmQVKArguments_s rpmIArgs = {
+- .probFilter = (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
++ .probFilter = 0,
+ };
+ /*@=fullinitblock@*/
+
+@@ -274,9 +273,6 @@
+ N_("skip files with leading component <path> "),
+ N_("<path>") },
+
+- { "fileconflicts", '\0', POPT_BIT_CLR, &rpmIArgs.probFilter,
+- (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
+- N_("detect file conflicts between packages"), NULL},
+ { "force", '\0', 0, NULL, RPMCLI_POPT_FORCE,
+ N_("short hand for --replacepkgs --replacefiles"), NULL},
+
--- /dev/null
+--- rpm-4.5/scripts/perl.req 2008-07-09 12:38:31.000000000 +0300
++++ rpm-4.4.9/scripts/perl.req.in 2008-08-12 23:08:33.518675858 +0300
+@@ -277,20 +277,20 @@
+ # $V-style
+ if ($ver =~ m/5\.([0-5])(\.([0-9]+))?$/) {
+ if (defined $3) {
+- print "perl >= 0:5.00$1_$3\n";
++ print "perl-base >= 0:5.00$1_$3\n";
+ } else {
+- print "perl >= 0:5.00$1\n";
++ print "perl-base >= 0:5.00$1\n";
+ }
+ } else {
+- print "perl >= 1:$ver\n";
++ print "perl-base >= 1:$ver\n";
+ }
+ } else {
+ # $]-style
+ if ($ver =~ m/5\.(00[0-5])_?([0-9]+)?$/) {
+ if (defined $2) {
+- print "perl >= 0:5.$1_$2\n";
++ print "perl-base >= 0:5.$1_$2\n";
+ } else {
+- print "perl >= 0:5.$1\n";
++ print "perl-base >= 0:5.$1\n";
+ }
+ } else {
+ # expand to M.NNN_nnn form
+@@ -299,7 +299,7 @@
+ $ver =~ s/^([0-9]\.[0-9]{3})_?([0-9]{3})0*$/$1_$2/;
+ # match trimming leading 0s
+ $ver =~ m/^([0-9])\.0*([1-9][0-9]*|0)_0*([1-9][0-9]*|0)$/;
+- print "perl >= 1:$1.$2.$3\n";
++ print "perl-base >= 1:$1.$2.$3\n";
+ }
+ }
+ next;
+@@ -326,6 +326,10 @@
+
+ ($module =~ m/\.(ph|pl|t)$/) && next;
+
++ # skip all modules for platforms other than linux.
++
++ ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next;
++
+ # if the module name starts in a dot it is not a module name.
+
+ ($module =~ m/^\./) && next;
--- /dev/null
+--- rpm-4.5/perl/Makefile.PL.in~ 2008-10-05 01:31:01.000000000 +0300
++++ rpm-4.5/perl/Makefile.PL.in 2008-10-05 01:31:09.224607131 +0300
+@@ -12,7 +12,7 @@
+ 'NAME' => 'RPM',
+ 'VERSION_FROM' => 'RPM.pm', # finds $VERSION
+ 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
+- 'LIBS' => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' -lpopt -lneon -lbeecrypt -lpthread -lneon '],
++ 'LIBS' => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@ -lneon'],
+ 'DEFINE' => join(" ", @defines), # e.g., '-DHAVE_SOMETHING'
+ 'INC' => join(' ', map { '-I@top_srcdir@/'. $_ } @libdir) . ' @CPPFLAGS@',
+ 'TYPEMAPS' => [ 'typemap' ],
--- /dev/null
+--- rpm-5.1.4/scripts/perl.req.in.orig 2008-10-26 10:26:43.622757203 +0100
++++ rpm-5.1.4/scripts/perl.req 2008-10-26 10:26:48.452756609 +0100
+@@ -140,15 +140,22 @@
+ return if (!is_perlfile($file, \*FILE));
+
+ while (<FILE>) {
+-
+- # skip the "= <<" block
+
+- if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) ||
+- ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) {
+- $tag = $2;
+- while (<FILE>) {
+- ( $_ =~ /^$tag/) && last;
+- }
++ # skip the documentation
++ if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) {
++ $_ = <FILE> until /^=cut/ or eof;
++ next;
++ }
++
++ # naively strip some comments... will screw m/\#/, m##, q##, qw##, qr##, etc, but these don't really matter for us
++ s/(?<! \\ ) # \b .+ //x;
++
++ # skip the "= <<label", "print <<", "warn <<", "foo(<<label) blocks
++ # note: watch out for the binary << operator and comments
++ if ( m/ (?: = | \b[a-z][a-z_]+\(? ) \s* << \s* (?: q{0,2}(["']) (.+) \1 | ([a-zA-Z][a-zA-Z\d_]*) ) [\s;\)]* $/x ) {
++ my $tag = defined $2 ? $2 : $3;
++ $_ = <FILE> until m/^\Q$tag\E\s*$/ or eof;
++ next;
+ }
+
+ # skip q{} quoted sections - just hope we don't have curly brackets
+@@ -157,21 +164,7 @@
+ if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
+ $tag = $1;
+ $tag =~ tr/{([/})]/;
+- $_ = <FILE> until m/\Q$tag\E/;
+- }
+-
+- # skip the documentation
+-
+- # we should not need to have item in this if statement (it
+- # properly belongs in the over/back section) but people do not
+- # read the perldoc.
+-
+- if ( (m/^=(head[1-4]|pod|item)/) .. (m/^=(cut)/) ) {
+- next;
+- }
+-
+- if ( (m/^=(over)/) .. (m/^=(back)/) ) {
+- next;
++ $_ = <FILE> until m/\Q$tag\E/ or eof;
+ }
+
+ # skip the data section
--- /dev/null
+--- rpm-5.1.4/scripts/perl.req~ 2008-08-20 21:34:42.000000000 +0200
++++ rpm-5.1.4/scripts/perl.req 2008-08-28 12:45:14.820174910 +0200
+@@ -156,10 +156,8 @@
+ # marker, such as occurs right here. Draw the line somewhere.
+ if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
+ $tag = $1;
+- $tag =~ tr/{\(\[\#|\//})]#|\//;
+- while (<FILE>) {
+- ( $_ =~ m/\}/ ) && last;
+- }
++ $tag =~ tr/{([/})]/;
++ $_ = <FILE> until m/\Q$tag\E/;
+ }
+
+ # skip the documentation
--- /dev/null
+--- rpm-5.1.4/scripts/perl.req 2008-08-20 21:27:09.929116479 +0200
++++ rpm-5.1.4/scripts/perl.req 2008-10-26 10:48:31.529709016 +0100
+@@ -196,7 +196,28 @@
+ }
+ }
+
+- if (
++ # handle "use base qw/ foo::bar baz::blah /;" and variations
++ if (
++ m/^ \s* use \s+ base
++ (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* \1
++ |
++ \s* ( ["'] ) ( [\w:]+? ) \3
++ |
++ # qw[], qw(), qw<>, qw{} are handled here; lax, but who gives
++ \s+ q[wq]? \s* [\[({<] \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* [\])}>]
++ )
++ \s* ;
++ /x
++ )
++ {
++ my @deps = ( $1 ? split /\s+/, $2 : $3 ? $4 : split /\s+/, $5 );
++ for my $mod ( grep !exists $require{$_}, @deps ) {
++ $require{$mod} = '';
++ $line{$mod} = $_;
++ }
++ }
++
++ elsif (
+
+ # ouch could be in a eval, perhaps we do not want these since we catch
+ # an exception they must not be required
--- /dev/null
+#!/usr/bin/perl
+#####################################################################
+# #
+# Check system dependences between php-pear modules #
+# #
+# Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
+# Micha³ Moskal <malekith@pld-linux.org> #
+# ------------------------------------------------------------------#
+# TODO: #
+#####################################################################
+
+$pear = "/usr/share/pear";
+
+foreach (@ARGV ? @ARGV : <>) {
+ chomp;
+ $f = $_;
+ next unless ($f =~ /$pear.*\.php$/);
+ $f =~ s/.*$pear\///;
+ print "pear($f)\n";
+}
--- /dev/null
+#!/usr/bin/perl
+#####################################################################
+# #
+# Check system dependences between php-pear modules #
+# #
+# Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
+# Micha³ Moskal <malekith@pld-linux.org> #
+# ------------------------------------------------------------------#
+# TODO: #
+# - extension_loaded - dependencies. #
+# - some clean-up... #
+#####################################################################
+
+$pear = "/usr/share/pear";
+
+@files = ();
+%req = ();
+
+foreach (@ARGV ? $ARGV : <> ) {
+ chomp;
+ $f = $_;
+ push @files, $f;
+ # skip non-php files
+ next unless ($f =~ /\.php$/);
+ open(F, "< $f") or die;
+
+ if ($f =~ /$pear/) {
+ $file_dir = $f;
+ $file_dir =~ s|.*$pear/||;
+ $file_dir =~ s|/[^/]*$||;
+ } else {
+ $file_dir = undef;
+ }
+
+ while (<F>) {
+ # skip comments
+ next if (/^\s*(#|\/\/|\*|\/\*)/);
+
+ while (/(\W|^)(require|include)(_once)?
+ \s* \(? \s* ("([^"]*)"|'([^']*)')
+ \s* \)? \s* ;/xg) {
+ if ($5 ne "") {
+ $x = $5;
+ } elsif ($6 ne "") {
+ $x = $6;
+ } else {
+ next;
+ }
+
+ next if ($x =~ m|^\./| or $x =~ /\$/);
+ next unless ($x =~ /\.php$/);
+ $req{$x} = 1;
+ }
+
+ next unless (defined $file_dir);
+
+ while (/(\W|^)(require|include)(_once)?
+ \s* \(? \s* dirname \s* \( \s* __FILE__ \s* \) \s* \. \s*
+ ("([^"]*)"|'([^']*)')
+ \s* \)? \s* ;/xg) {
+ if ($5 ne "") {
+ $x = $5;
+ } elsif ($6 ne "") {
+ $x = $6;
+ } else {
+ next;
+ }
+
+ next if ($x =~ /\$/);
+ next unless ($x =~ /\.php$/);
+
+ $x = "$file_dir/$x";
+ $x =~ s|/+|/|g;
+ $req{$x} = 1;
+ }
+ }
+}
+
+f: for $f (keys %req) {
+ for $g (@files) { next f if ($g =~ /\Q$f\E$/); }
+ print "pear($f)\n";
+}
--- /dev/null
+--- rpm-4.5/Makefile.am~ 2008-06-10 01:48:59.000000000 +0300
++++ rpm-4.5/Makefile.am 2009-10-15 00:00:46.263391619 +0300
+@@ -51,6 +51,15 @@
+
+ noinst_HEADERS = build.h debug.h system.h
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = rpm.pc
++rpm.pc: $(top_srcdir)/rpm.pc.in
++ @$(SED) \
++ -e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
++ < $(top_srcdir)/rpm.pc.in > rpm.pc.tmp \
++ && ( cd $(top_builddir) && ./config.status --file=${subdir}/rpm.pc:${subdir}/rpm.pc.tmp )
++EXTRA_DIST += rpm.pc.in
++
+ rpm_SOURCES = $(top_srcdir)/build.c
+ rpm_LDFLAGS = $(myLDFLAGS) $(staticLDFLAGS)
+ rpm_LDADD = rpm.o $(top_builddir)/build/.libs/librpmbuild.a $(myLDADD)
+--- /dev/null 2007-02-13 18:29:53.000000000 +0200
++++ rpm/rpm.pc.in 2009-10-14 23:59:01.260069165 +0300
+@@ -0,0 +1,15 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@/rpm
++rpmhome=@RPMCONFIGDIR@
++
++Name: RPM
++Description: RPM Package Manager
++Version: @VERSION@
++URL: http://rpm5.org
++# Requires:
++# Conflicts:
++Cflags: -I${includedir}
++Libs: -L${libdir} -lrpm -lrpmio
++Libs.private: -lpopt -lrt -lpthread @WITH_SELINUX_LIB@ @WITH_SQLITE3_LIB@ -ldb
--- /dev/null
+--- rpm-4.4.8/scripts/pkgconfigdeps.sh.orig 2007-02-14 08:09:42.000000000 +0100
++++ rpm-4.4.8/scripts/pkgconfigdeps.sh 2007-04-08 21:39:49.283342196 +0200
+@@ -31,8 +31,6 @@
+ case "${filename}" in
+ *.pc)
+ $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
+- i="`expr $i + 1`"
+- [ $i -eq 1 ] && echo "pkgconfig"
+ echo "pkgconfig($n)" "$r" "$v"
+ done
+ esac
--- /dev/null
+--- rpm-4.4.8/lib/rpmfc.h.orig 2005-11-18 23:08:14.231293000 +0100
++++ rpm-4.4.8/lib/rpmfc.h 2005-11-18 23:55:16.694214392 +0100
+@@ -1,6 +1,7 @@
+ #ifndef _H_RPMFC_
+ #define _H_RPMFC_
+
++#include <regex.h>
+ #undef FILE_RCSID
+ #include "magic.h"
+
+@@ -44,6 +45,11 @@
+ StringBuf sb_python;/*!< concatenated list of python colored files. */
+ StringBuf sb_php; /*!< concatenated list of php colored files. */
+
++ int findprov, findreq;
++ regex_t *noautoprov;
++ int noautoprov_c;
++ regex_t *noautoreq;
++ int noautoreq_c;
+ };
+
+ /**
+--- rpm-4.5/lib/rpmfc.c~ 2008-06-10 14:06:23.000000000 +0300
++++ rpm-4.5/lib/rpmfc.c 2008-06-10 14:21:53.097663262 +0300
+@@ -15,6 +15,8 @@
+ #define _RPMDS_INTERNAL
+ #include <rpmds.h>
+ #include <rpmfi.h>
++#include <rpmts.h>
++#include <rpmdb.h>
+
+ #include "debug.h"
+
+@@ -309,14 +311,83 @@
+ return buf;
+ };
+
++static regex_t * rpmfcExpandRegexps(const char * str,int *count){
++ int i,j,r;
++ const char *s;
++ ARGV_t patterns=NULL;
++ regex_t *compiled=NULL;
++
++ s=rpmExpand(str,NULL);
++ if (s) {
++ poptParseArgvString(s,count,(const char ***)&patterns);
++ s = _free(s);
++ }
++ if (patterns==NULL){
++ *count=0;
++ return NULL;
++ }
++ if (*count==0){
++ _free(patterns);
++ return NULL;
++ }
++
++ compiled=malloc(sizeof(regex_t)*(*count));
++ j=0;
++ for(i=0;i<*count;i++){
++ r=regcomp(&compiled[j],patterns[i],REG_NOSUB);
++ if (r==0) j++;
++ else {
++ rpmMessage(RPMMESS_NORMAL,
++ _("Compilation of regular expresion '%s'"
++ " (expanded from '%s') failed. Skipping it.\n"),
++ patterns[i],str);
++ }
++ }
++ patterns=_free(patterns);
++ if (j==0) {
++ compiled=_free(compiled);
++ *count=0;
++ return NULL;
++ }
++ *count=j;
++ return compiled;
++}
++
++static int rpmfcMatchRegexps(regex_t *regexps, int count, const char *str, char deptype)
++{
++ int j;
++ for(j = 0; j < count; j++) {
++ rpmMessage(RPMMESS_DEBUG,
++ _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, j);
++ if (!regexec(®exps[j], str, 0, NULL, 0)) {
++ rpmMessage(RPMMESS_NORMAL,
++ _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, j);
++ return 1;
++ }
++ }
++ return 0;
++}
++
++static regex_t * rpmfcFreeRegexps(regex_t *regexps,int count){
++ int i;
++
++ if (regexps)
++ for(i=0;i<count;i++)
++ regfree(®exps[i]);
++ return _free(regexps);
++}
++
+ /**
+ * Run per-interpreter dependency helper.
+ * @param fc file classifier
+ * @param deptype 'P' == Provides:, 'R' == Requires:, helper
+ * @param nsdep class name for interpreter (e.g. "perl")
++ * @param noauto _noauto* regexps
++ * @param noauto_c # of _noauto* regexps
+ * @return 0 on success
+ */
+-static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
++static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep,
++ regex_t * noauto, int noauto_c)
+ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+ /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
+ {
+@@ -402,6 +473,8 @@
+ }
+ /*@=branchstate@*/
+
++ if(rpmfcMatchRegexps(noauto, noauto_c, N, deptype))
++ continue;
+
+ /* Add tracking dependency for versioned Provides: */
+ if (!fc->tracked && deptype == 'P' && *EVR != '\0') {
+@@ -714,7 +787,7 @@
+ *se = '\0';
+ se++;
+
+- if (is_executable) {
++ if (is_executable && fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, s, 'R')) {
+ /* Add to package requires. */
+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES);
+ xx = rpmdsMerge(&fc->requires, ds);
+@@ -808,20 +889,26 @@
+ default:
+ break;
+ case RPMTAG_PROVIDENAME:
++ if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0], 'P')) {
+ /* Add to package provides. */
+ rc = rpmdsMerge(&fc->provides, ds);
+
+ /* Add to file dependencies. */
+ buf[0] = '\0';
+ rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
++ } else
++ rc = 0;
+ break;
+ case RPMTAG_REQUIRENAME:
++ if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0], 'R')) {
+ /* Add to package requires. */
+ rc = rpmdsMerge(&fc->requires, ds);
+
+ /* Add to file dependencies. */
+ buf[0] = '\0';
+ rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
++ } else
++ rc = 0;
+ break;
+ }
+ return rc;
+@@ -862,6 +949,109 @@
+ { NULL, 0 }
+ };
+
++static int rpmfcFindRequiredPackages(rpmfc fc)
++{
++ rpmts ts=NULL;
++ const char * s;
++ char * se;
++ rpmds ds;
++ const char * N;
++ const char * EVR;
++ int_32 Flags;
++ unsigned char deptype;
++ int nddict;
++ int previx;
++ int ix;
++ int i;
++ int j;
++ int xx;
++ int r;
++ const char * hname;
++ rpmdbMatchIterator it;
++ Header hdr;
++ regex_t *noautoreqdep;
++ int noautoreqdep_c;
++
++ noautoreqdep=rpmfcExpandRegexps("%{__noautoreqdep}", &noautoreqdep_c);
++
++ ts = rpmtsCreate(); /* XXX ts created in main() should be used */
++
++ rpmMessage(RPMMESS_NORMAL, _("Searching for required packages....\n"));
++
++ nddict = argvCount(fc->ddict);
++ previx = -1;
++ for (i = 0; i < nddict; i++) {
++ s = fc->ddict[i];
++
++ /* Parse out (file#,deptype,N,EVR,Flags) */
++ ix = strtol(s, &se, 10);
++ assert(se != NULL);
++ deptype = *se++;
++ se++;
++ N = se;
++ while (*se && *se != ' ')
++ se++;
++ *se++ = '\0';
++ EVR = se;
++ while (*se && *se != ' ')
++ se++;
++ *se++ = '\0';
++ Flags = strtol(se, NULL, 16);
++
++ if (deptype!='R') continue;
++
++ rpmMessage(RPMMESS_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags);
++ if (EVR && EVR[0]) {
++ rpmMessage(RPMMESS_DEBUG, _("skipping #%i require\n"));
++ continue;
++ }
++ for(j=0;j<noautoreqdep_c;j++)
++ if (!regexec(&noautoreqdep[j],N,0,NULL,0)) {
++ rpmMessage(RPMMESS_NORMAL,
++ _("skipping %s requirement processing"
++ " (matches noautoreqdep pattern #%i)\n"),N,j);
++ break;
++ }
++ if (j<noautoreqdep_c) continue;
++ if (N[0]=='/') {
++ rpmMessage(RPMMESS_DEBUG, _("skipping #%i require (is file requirement)\n"));
++ continue;
++ }
++ it=rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, N, 0);
++ if (!it) {
++ rpmMessage(RPMMESS_DEBUG, _("%s -> not found\n"),N);
++ continue;
++ }
++ rpmMessage(RPMMESS_DEBUG, _("Iterator: %p\n"),it);
++ if (rpmdbGetIteratorCount(it)>1) {
++ rpmMessage(RPMMESS_DEBUG, _("%s -> multiple (skipping)\n"),N);
++ rpmdbFreeIterator(it);
++ continue;
++ }
++ hdr=rpmdbNextIterator(it);
++ assert(hdr!=NULL);
++ r=headerGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL);
++ assert(r<2);
++ if (!strcmp(hname,N)) {
++ rpmMessage(RPMMESS_DEBUG, _("%s -> %s (skipping)\n"),N,hname);
++ rpmdbFreeIterator(it);
++ continue;
++ }
++
++ rpmMessage(RPMMESS_DEBUG, "%s -> %s\n",N,hname);
++
++ ds = rpmdsSingle(RPMTAG_REQUIRENAME, hname, "", RPMSENSE_FIND_REQUIRES);
++ xx = rpmdsMerge(&fc->requires, ds);
++ ds = rpmdsFree(ds);
++
++ rpmdbFreeIterator(it);
++ }
++
++ noautoreqdep = rpmfcFreeRegexps(noautoreqdep, noautoreqdep_c);
++ ts = rpmtsFree(ts);
++ return 0;
++}
++
+ int rpmfcApply(rpmfc fc)
+ {
+ rpmfcApplyTbl fcat;
+@@ -880,6 +1070,26 @@
+ int i;
+ int xx;
+ int skipping;
++ int j;
++ regex_t *noautoprovfiles = NULL;
++ int noautoprovfiles_c;
++ regex_t *noautoreqfiles = NULL;
++ int noautoreqfiles_c;
++ const char *buildroot;
++ int buildroot_l;
++
++ fc->noautoprov = NULL;
++ fc->noautoreq = NULL;
++
++ buildroot = rpmExpand("%{buildroot}",NULL);
++ buildroot_l = strlen(buildroot);
++
++ noautoprovfiles = rpmfcExpandRegexps("%{__noautoprovfiles}", &noautoprovfiles_c);
++ noautoreqfiles = rpmfcExpandRegexps("%{__noautoreqfiles}", &noautoreqfiles_c);
++ fc->noautoprov = rpmfcExpandRegexps("%{__noautoprov}", &fc->noautoprov_c);
++ fc->noautoreq = rpmfcExpandRegexps("%{__noautoreq}", &fc->noautoreq_c);
++ rpmMessage(RPMMESS_DEBUG, _("%i _noautoprov patterns.\n"), fc->noautoprov_c);
++ rpmMessage(RPMMESS_DEBUG, _("%i _noautoreq patterns.\n"), fc->noautoreq_c);
+
+ /* Generate package and per-file dependencies. */
+ for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
+@@ -900,9 +1110,43 @@
+ for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) {
+ if (!(fc->fcolor->vals[fc->ix] & fcat->colormask))
+ /*@innercontinue@*/ continue;
++ fc->findprov = 1;
++ fc->findreq = 1;
++ if (strncmp(fc->fn[fc->ix],buildroot,buildroot_l)==0) {/* sanity check */
++ for(j = 0; j < noautoprovfiles_c; j++) {
++ if (!regexec(&noautoprovfiles[j],
++ fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
++ rpmMessage(RPMMESS_NORMAL,
++ _("skipping %s provides detection"
++ " (matches noautoprovfiles pattern #%i)\n"),
++ fc->fn[fc->ix], j);
++ fc->findprov = 0;
++ break;
++ }
++ }
++ for(j = 0; j < noautoreqfiles_c; j++) {
++ if (!regexec(&noautoreqfiles[j],
++ fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
++ rpmMessage(RPMMESS_NORMAL,
++ _("skipping %s requires detection"
++ " (matches noautoreqfiles pattern #%i)\n"),
++ fc->fn[fc->ix], j);
++ fc->findreq = 0;
++ break;
++ }
++ }
++ }
++
+ xx = (*fcat->func) (fc);
+ }
+ }
++ noautoprovfiles = rpmfcFreeRegexps(noautoprovfiles, noautoprovfiles_c);
++ noautoreqfiles = rpmfcFreeRegexps(noautoreqfiles, noautoreqfiles_c);
++ fc->noautoprov = rpmfcFreeRegexps(fc->noautoprov, fc->noautoprov_c);
++ fc->noautoreq = rpmfcFreeRegexps(fc->noautoreq, fc->noautoreq_c);
++#ifdef AUTODEP_PKGNAMES /* define to use package names in R */
++ rpmfcFindRequiredPackages(fc);
++#endif
+
+ /*@-boundswrite@*/
+ /* Generate per-file indices into package dependencies. */
+#--- rpm-4.4.9/po/pl.po.orig 2007-05-22 08:11:40.947724921 +0200
+#+++ rpm-4.4.9/po/pl.po 2007-05-22 08:24:24.091213990 +0200
+#@@ -2937,6 +2937,86 @@
+# msgid "Failed to find %s:\n"
+# msgstr "Nie uda³o siê odnale¼æ %s:\n"
+#
+#+#: lib/rpmfc.c:334
+#+#, c-format
+#+msgid "Compilation of regular expresion '%s' (expanded from '%s') failed. Skipping it.\n"
+#+msgstr "Kompilacja wyra¿enia regularnego '%s' (powsta³ego z '%s') nie powiod³a siê; pominiêto.\n"
+#+
+#+#: lib/rpmfc.c:395
+#+#, c-format
+#+msgid "%i _noautoprov patterns.\n"
+#+msgstr "%i wzorców _noautoprov.\n"
+#+
+#+#: lib/rpmfc.c:405
+#+#, c-format
+#+msgid "%i _noautoreq patterns.\n"
+#+msgstr "%i wzorców _noautoreq.\n"
+#+
+#+#: lib/rpmfc.c:459
+#+#, c-format
+#+msgid "Checking %c: '%s' against _noauto expr. #%i\n"
+#+msgstr "Sprawdzanie %c: '%s' z wyra¿eniem _noauto #%i\n"
+#+
+#+#: lib/rpmfc.c:462
+#+#, c-format
+#+msgid "Skipping %c: '%s' as it matches _noauto expr. #%i\n"
+#+msgstr "Pominiêto %c: '%s' pasuj±ce do wyra¿enia _noauto #%i\n"
+#+
+#+#. XXX ts created in main() should be used
+#+#: lib/rpmfc.c:1173
+#+msgid "Searching for required packages....\n"
+#+msgstr "Poszukiwanie wymaganych pakietów...\n"
+#+
+#+#: lib/rpmfc.c:1197
+#+#, c-format
+#+msgid "#%i requires: %s,%s,%i\n"
+#+msgstr "#%i wymaga: %s,%s,%i\n"
+#+
+#+#: lib/rpmfc.c:1199
+#+#, c-format
+#+msgid "skipping #%i require\n"
+#+msgstr "pominiêto zale¿no¶æ #%i\n"
+#+
+#+#: lib/rpmfc.c:1205
+#+#, c-format
+#+msgid "skipping %s requirement processing (matches noautoreqdep pattern #%i)\n"
+#+msgstr "pominiêto przetwarzanie zale¿no¶ci %s (pasuje do wzorca noautoreqdep #%i)\n"
+#+
+#+#: lib/rpmfc.c:1211
+#+#, c-format
+#+msgid "skipping #%i require (is file requirement)\n"
+#+msgstr "pominiêto zale¿no¶æ #%i (zale¿no¶æ od pliku)\n"
+#+
+#+#: lib/rpmfc.c:1216
+#+#, c-format
+#+msgid "%s -> not found\n"
+#+msgstr "%s -> nie znaleziono\n"
+#+
+#+#: lib/rpmfc.c:1219
+#+#, c-format
+#+msgid "Iterator: %p\n"
+#+msgstr "Iterator: %p\n"
+#+
+#+#: lib/rpmfc.c:1221
+#+#, c-format
+#+msgid "%s -> multiple (skipping)\n"
+#+msgstr "%s -> wiele (pominiêto)\n"
+#+
+#+#: lib/rpmfc.c:1230
+#+#, c-format
+#+msgid "%s -> %s (skipping)\n"
+#+msgstr "%s -> %s (pominiêto)\n"
+#+
+#+#: lib/rpmfc.c:1295
+#+#, c-format
+#+msgid "skipping %s provides detection (matches noautoprovfiles pattern #%i)\n"
+#+msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoprovfiles #%i)\n"
+#+
+#+#: lib/rpmfc.c:1306
+#+#, c-format
+#+msgid "skipping %s requires detection (matches noautoreqfiles pattern #%i)\n"
+#+msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoreqfiles #%i)\n"
+#+
+# #: lib/rpmfi.c:622
+# #, c-format
+--- rpm/configure.ac.orig 2004-08-22 13:02:30.000000000 +0200
++++ rpm/configure.ac 2004-08-22 13:25:37.000000000 +0200
+@@ -971,6 +971,18 @@
+ AC_SUBST(__CHGRP_RHF)
+
+ dnl
++dnl enable generating autorequires containing packages names
++dnl
++AC_ARG_ENABLE([adding-packages-names-in-autogenerated-dependancies],
++ [ --enable-adding-packages-names-in-autogenerated-dependancies Add packages names for autogenerated dependancies to requires],
++
++ AC_MSG_RESULT([Using packages names in autogerated requires is enabled])
++ AC_DEFINE(AUTODEP_PKGNAMES, 1, "Generating autorequires containing packages names.")
++
++ )
++
++
++dnl
+ dnl figure out what root's primary group is
+ dnl
+ AC_MSG_CHECKING(root's primary group)
+--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 01:02:40.000000000 +0300
++++ rpm-4.5/lib/rpmfc.c 2008-06-11 01:04:54.048916180 +0300
+@@ -382,12 +382,9 @@
+ * @param fc file classifier
+ * @param deptype 'P' == Provides:, 'R' == Requires:, helper
+ * @param nsdep class name for interpreter (e.g. "perl")
+- * @param noauto _noauto* regexps
+- * @param noauto_c # of _noauto* regexps
+ * @return 0 on success
+ */
+-static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep,
+- regex_t * noauto, int noauto_c)
++static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
+ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+ /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
+ {
+@@ -405,6 +402,8 @@
+ int pac;
+ int xx;
+ int i;
++ regex_t * noauto = fc->noauto;
++ int noauto_c = fc->noauto_c;
+
+ switch (deptype) {
+ default:
+--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 01:04:54.000000000 +0300
++++ rpm-4.5/lib/rpmfc.c 2008-06-11 01:10:06.222936657 +0300
+@@ -410,7 +410,7 @@
+ return -1;
+ /*@notreached@*/ break;
+ case 'P':
+- if (fc->skipProv)
++ if (fc->skipProv || !fc->findprov)
+ return 0;
+ xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep);
+ depsp = &fc->provides;
+@@ -418,7 +418,7 @@
+ tagN = RPMTAG_PROVIDENAME;
+ break;
+ case 'R':
+- if (fc->skipReq)
++ if (fc->skipReq || !fc->findreq)
+ return 0;
+ xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep);
+ depsp = &fc->requires;
+--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 01:11:33.000000000 +0300
++++ rpm-4.5/lib/rpmfc.c 2008-06-11 01:16:17.084344647 +0300
+@@ -402,8 +402,8 @@
+ int pac;
+ int xx;
+ int i;
+- regex_t * noauto = fc->noauto;
+- int noauto_c = fc->noauto_c;
++ regex_t * noauto = NULL;
++ int noauto_c = 0;
+
+ switch (deptype) {
+ default:
+@@ -412,6 +412,8 @@
+ case 'P':
+ if (fc->skipProv || !fc->findprov)
+ return 0;
++ noauto = fc->noautoprov;
++ noauto_c = fc->noautoprov_c;
+ xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep);
+ depsp = &fc->provides;
+ dsContext = RPMSENSE_FIND_PROVIDES;
+@@ -420,6 +422,8 @@
+ case 'R':
+ if (fc->skipReq || !fc->findreq)
+ return 0;
++ noauto = fc->noautoreq;
++ noauto_c = fc->noautoreq_c;
+ xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep);
+ depsp = &fc->requires;
+ dsContext = RPMSENSE_FIND_REQUIRES;
+#--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 00:28:21.000000000 +0300
+#+++ rpm-4.5/lib/rpmfc.c 2008-06-11 00:37:51.675282123 +0300
+#@@ -829,7 +829,6 @@
+# }
+# } else
+# if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) {
+#- xx = rpmfcHelper(fc, 'P', "python");
+# if (fc->findprov)
+# xx = rpmfcHelper(fc, 'P', "python", fc->noautoprov, fc->noautoprov_c);
+# #ifdef NOTYET
+#--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 00:37:51.000000000 +0300
+#+++ rpm-4.5/lib/rpmfc.c 2008-06-11 00:39:12.427942547 +0300
+#@@ -876,7 +876,8 @@
+# xx = rpmfcHelper(fc, 'R', "java", fc->noautoreq, fc->noautoreq_c);
+# } else
+# if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) {
+#- xx = rpmfcHelper(fc, 'P', "mimetype");
+#+ if (fc->findprov)
+#+ xx = rpmfcHelper(fc, 'P', "mimetype", fc->noautoprov, fc->noautoprov_c);
+# }
+#
+# return 0;
+--- rpm-4.4.8/lib/rpmfc.c.orig 2007-02-14 07:31:50.000000000 +0100
++++ rpm-4.4.8/lib/rpmfc.c 2007-04-08 16:48:00.273560592 +0200
+@@ -773,7 +773,7 @@
+ } else
+ if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) {
+ xx = rpmfcHelper(fc, 'P', "php");
+- if (is_executable)
++ /* not only executable, files run by httpd usually are not */
+ xx = rpmfcHelper(fc, 'R', "php");
+ }
+
+
--- /dev/null
+--- rpm-4.5/configure.ac~ 2008-04-28 20:46:35.000000000 +0300
++++ rpm-4.5/configure.ac 2008-04-28 20:48:08.990410515 +0300
+@@ -16,7 +16,7 @@
+ AC_SUBST(LT_AGE, 0)
+
+ dnl Set of available languages.
+-ALL_LINGUAS="cs da de fi fr gl id is ja ko nb pl pt pt_BR ro ru sk sl sr sv tr uk"
++ALL_LINGUAS="cs da de fi fr gl id is it ja ko nb pl pt pt_BR ro ru sk sl sr@Latn sv tr uk"
+
+ AC_AIX
+ AC_MINIX
--- /dev/null
+--- rpm-4.4.9/rpmpopt.in 2008-03-24 22:09:33.709972364 +0200
++++ rpm-4.4.9/rpmpopt.in 2008-04-04 18:51:45.658923774 +0300
+@@ -595,4 +595,19 @@
+ rpmv alias --httpproxy --define '_httpproxy !#:+'
+
++rpm alias --downgrade --oldpackage \
++ --POPTdesc=$"Allow an upgrade to replace a newer package with an older one."
++
++rpm alias --what-provides --whatprovides \
++ --POPTdesc=$"find package name that contains a provided capability"
++
++rpm alias --what-requires --whatrequires \
++ --POPTdesc=$"find package name that contains a required capability"
++
++rpm alias --norepackage --define '_repackage_all_erasures 0' \
++ --POPTdesc=$"Disable re-package of the files before erasing"
++
++rpmbuild alias --disable-debuginfo --define '_enable_debug_packages 0' \
++ --POPTdesc=$"Disable debuginfo package creation"
++
+ # \endverbatim
+ #*/
--- /dev/null
+--- rpm-4.5/rpmpopt.in~ 2008-06-10 14:24:49.000000000 +0300
++++ rpm-4.5/rpmpopt.in 2008-06-10 14:26:04.428174732 +0300
+@@ -55,8 +55,8 @@
+ --POPTdesc=$"set permissions of files in a package"
+
+ rpm alias --setugids -q --qf \
+- '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
+- --pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" \
++ '[chown -h -- %{FILEUSERNAME:shescape}:%{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
++ --pipe "grep -v '(none)' | sh" \
+ --POPTdesc=$"set user/group ownership of files in a package"
+
+ rpm alias --conflicts --qf \
--- /dev/null
+--- rpm-4.5/lib/poptALL.c~ 2008-11-07 03:12:23.000000000 +0200
++++ rpm-4.5/lib/poptALL.c 2008-11-09 18:20:22.263541109 +0200
+@@ -547,7 +547,7 @@
+ /*@=nullpass =temptrans@*/
+ (void) poptReadConfigFile(optCon, RPMPOPTFILE);
+ (void) poptReadDefaultConfig(optCon, 1);
+- poptSetExecPath(optCon, USRLIBRPM "/" VERSION, 1);
++ poptSetExecPath(optCon, USRLIBRPM, 1);
+
+ /* Process all options, whine if unknown. */
+ while ((rc = poptGetNextOpt(optCon)) > 0) {
--- /dev/null
+--- rpm-4.5/lib/psm.c.org 2008-11-21 17:20:34.293584455 +0100
++++ rpm-4.5/lib/psm.c 2008-11-21 17:21:41.482728047 +0100
+@@ -2114,8 +2114,8 @@
+ psm->countCorrection = -1;
+
+ if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) {
+- rc = rpmpsmNext(psm, PSM_SCRIPT);
+- if (rc) break;
++ if (rpmpsmNext(psm, PSM_SCRIPT))
++ rpmMessage(RPMMESS_VERBOSE, _("Ignoring failed %%postun scriptlet\n"));
+ }
+
+ if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) {
--- /dev/null
+--- rpm-4.5/macros.in~ 2008-04-13 02:54:35.000000000 +0300
++++ rpm-4.5/macros.in 2008-04-28 20:45:00.431568869 +0300
+@@ -337,6 +337,14 @@
+ #
+ %_query_selector_match default
+
++# On upgrade, erase older packages of same color (if any).
++# "name" for RPMTAG_NAME, otherwise RPMTAG_PROVIDENAME
++#
++# in PLD Linux we don't want to remove packages which only provided
++# %{name} (e.g. perl-modules in case of some newer perl modules),
++# so we use NAME instead of PROVIDENAME (as in vanilla rpm) here
++%_upgrade_tag name
++
+ # Configurable packager information, same as Packager: in a specfile.
+ #
+ #%packager
--- /dev/null
+--- rpm-4.5/scripts/find-debuginfo.sh 2008-08-18 22:54:31.109085807 +0300
++++ rpm-4.5/scripts/find-debuginfo.sh 2008-08-29 23:27:02.516217319 +0300
+@@ -10,30 +10,38 @@
+
+ LISTFILE=$BUILDDIR/debugfiles.list
+ SOURCEFILE=$BUILDDIR/debugsources.list
++DEBUGFILES=$BUILDDIR/debugfiles-add.list
+
+ : > $SOURCEFILE
+-: > $LISTFILE
++touch $LISTFILE
+
+-strip_to_debug()
+-{
++strip_to_debug() {
+ objcopy --only-keep-debug --remove-section .comment "$2" "$1"
+ objcopy --add-gnu-debuglink="$1" "$2"
+ }
+
++extract_debuginfo() {
++ :
++}
++
+ if [ ! -d $RPM_BUILD_ROOT ]; then
+ # no buildroot, exit
+ exit 0
+ fi
+
++if [ -f $DEBUGFILES ]; then
++ cat $DEBUGFILES > $LISTFILE
++fi
++
+ filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')')
+-if [ -z "$filelist" ]; then
++if [ -z "$filelist" -a ! -f $DEBUGFILES ]; then
+ # no files, exit
+ exit 0
+ fi
+
+ filetypes=$(echo "$filelist" | xargs -r -d'\n' file)
+ elflist=$(echo "$filetypes" | awk -F: '/ELF.*, not stripped/ {print $1}')
+-if [ -z "$elflist" ]; then
++if [ -z "$elflist" -a ! -f $DEBUGFILES ]; then
+ # no elf objects, exit
+ exit 0
+ fi
+@@ -74,2 +82,5 @@
+ find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE
++if [ -f $DEBUGFILES ]; then
++ sed -e "s#^$RPM_BUILD_ROOT##" $DEBUGFILES >> $LISTFILE
++fi
+ find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE
--- /dev/null
+--- rpm-4.4.6/lib/psm.c.old 2006-09-25 17:55:05.000000000 +0200
++++ rpm-4.4.6/lib/psm.c 2006-09-25 19:40:47.000000000 +0200
+@@ -6,6 +6,7 @@
+ #include "system.h"
+
+ #include <rpmio_internal.h>
++#include <header_internal.h>
+ #include <rpmlib.h>
+ #include <rpmmacro.h>
+ #include <rpmurl.h>
+@@ -1403,6 +1404,19 @@
+ return rpmpsmStage(psm, psm->nstage);
+ }
+
++static void replace_lzma_with_gzip(Header h)
++{
++ indexEntry entry;
++ int i;
++
++ for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) {
++ if (entry->info.tag == RPMTAG_PAYLOADCOMPRESSOR) {
++ memcpy(entry->data, "gzip", 4);
++ break;
++ }
++ }
++}
++
+ /**
+ * @todo Packages w/o files never get a callback, hence don't get displayed
+ * on install with -v.
+@@ -2151,6 +2165,11 @@
+ payload_compressor = "gzip";
+ /*@=branchstate@*/
+ psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio"));
++ if (psm->goal == PSM_PKGSAVE && !strcmp(payload_compressor, "lzma") && access("/usr/bin/lzma", X_OK)) {
++ /* FIXME: digest is bad. */
++ payload_compressor = "gzip";
++ replace_lzma_with_gzip(psm->oh);
++ }
+ *t = '\0';
+ t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
+ if (!strcmp(payload_compressor, "gzip"))
--- /dev/null
+--- rpm-4.5/tools/debugedit.c 2008-04-06 23:32:15.000000000 +0300
++++ trunk/tools/debugedit.c 2010-01-27 18:57:49.758813670 +0200
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2001, 2002, 2003, 2005, 2007 Red Hat, Inc.
++/* Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009 Red Hat, Inc.
+ Written by Alexander Larsson <alexl@redhat.com>, 2002
+ Based on code by Jakub Jelinek <jakub@redhat.com>, 2001.
+
+@@ -77,8 +77,9 @@
+ int list_file_fd = -1;
+ int do_build_id = 0;
+
+-typedef unsigned int uint_32;
+-typedef unsigned short uint_16;
++typedef unsigned char rpmuint8_t;
++typedef unsigned int rpmuint32_t;
++typedef unsigned short rpmuint16_t;
+
+ typedef struct
+ {
+@@ -93,7 +90,7 @@
+ typedef struct
+ {
+ unsigned char *ptr;
+- uint_32 addend;
++ rpmuint32_t addend;
+ } REL;
+
+ #define read_uleb128(ptr) ({ \
+@@ -112,31 +109,32 @@
+ ret; \
+ })
+
+-static uint_16 (*do_read_16) (unsigned char *ptr);
+-static uint_32 (*do_read_32) (unsigned char *ptr);
++static rpmuint16_t (*do_read_16) (unsigned char *ptr);
++static rpmuint32_t (*do_read_32) (unsigned char *ptr);
+ static void (*write_32) (unsigned char *ptr, GElf_Addr val);
+
+ static int ptr_size;
++static int cu_version;
+
+-static inline uint_16
++static inline rpmuint16_t
+ buf_read_ule16 (unsigned char *data)
+ {
+ return data[0] | (data[1] << 8);
+ }
+
+-static inline uint_16
++static inline rpmuint16_t
+ buf_read_ube16 (unsigned char *data)
+ {
+ return data[1] | (data[0] << 8);
+ }
+
+-static inline uint_32
++static inline rpmuint32_t
+ buf_read_ule32 (unsigned char *data)
+ {
+ return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
+ }
+
+-static inline uint_32
++static inline rpmuint32_t
+ buf_read_ube32 (unsigned char *data)
+ {
+ return data[3] | (data[2] << 8) | (data[1] << 16) | (data[0] << 24);
+@@ -156,7 +154,7 @@
+ {
+ 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);
+ }
+ }
+@@ -168,13 +166,13 @@
+ #define read_1(ptr) *ptr++
+
+ #define read_16(ptr) ({ \
+- uint_16 ret = do_read_16 (ptr); \
++ rpmuint16_t ret = do_read_16 (ptr); \
+ ptr += 2; \
+ ret; \
+ })
+
+ #define read_32(ptr) ({ \
+- uint_32 ret = do_read_32 (ptr); \
++ rpmuint32_t ret = do_read_32 (ptr); \
+ ptr += 4; \
+ ret; \
+ })
+@@ -183,7 +181,7 @@
+ int reltype;
+
+ #define do_read_32_relocated(ptr) ({ \
+- uint_32 dret = do_read_32 (ptr); \
++ rpmuint32_t dret = do_read_32 (ptr); \
+ if (relptr) \
+ { \
+ while (relptr < relend && relptr->ptr < ptr) \
+@@ -200,7 +198,7 @@
+ })
+
+ #define read_32_relocated(ptr) ({ \
+- uint_32 ret = do_read_32_relocated (ptr); \
++ rpmuint32_t ret = do_read_32_relocated (ptr); \
+ ptr += 4; \
+ ret; \
+ })
+@@ -208,7 +206,7 @@
+ static void
+ dwarf2_write_le32 (unsigned char *p, GElf_Addr val)
+ {
+- uint_32 v = (uint_32) val;
++ rpmuint32_t v = (rpmuint32_t) val;
+
+ p[0] = v;
+ p[1] = v >> 8;
+@@ -220,7 +218,7 @@
+ static void
+ dwarf2_write_be32 (unsigned char *p, GElf_Addr val)
+ {
+- uint_32 v = (uint_32) val;
++ rpmuint32_t v = (rpmuint32_t) val;
+
+ p[3] = v;
+ p[2] = v >> 8;
+@@ -242,16 +240,18 @@
+ #define DEBUG_LINE 2
+ #define DEBUG_ARANGES 3
+ #define DEBUG_PUBNAMES 4
+-#define DEBUG_MACINFO 5
+-#define DEBUG_LOC 6
+-#define DEBUG_STR 7
+-#define DEBUG_FRAME 8
+-#define DEBUG_RANGES 9
++#define DEBUG_PUBTYPES 5
++#define DEBUG_MACINFO 6
++#define DEBUG_LOC 7
++#define DEBUG_STR 8
++#define DEBUG_FRAME 9
++#define DEBUG_RANGES 10
+ { ".debug_info", NULL, NULL, 0, 0, 0 },
+ { ".debug_abbrev", NULL, NULL, 0, 0, 0 },
+ { ".debug_line", NULL, NULL, 0, 0, 0 },
+ { ".debug_aranges", NULL, NULL, 0, 0, 0 },
+ { ".debug_pubnames", NULL, NULL, 0, 0, 0 },
++ { ".debug_pubtypes", NULL, NULL, 0, 0, 0 },
+ { ".debug_macinfo", NULL, NULL, 0, 0, 0 },
+ { ".debug_loc", NULL, NULL, 0, 0, 0 },
+ { ".debug_str", NULL, NULL, 0, 0, 0 },
+@@ -331,7 +331,7 @@
+ }
+ if (*slot != NULL)
+ {
+- error (0, 0, "%s: Duplicate DWARF-2 abbreviation %d", dso->filename,
++ error (0, 0, "%s: Duplicate DWARF abbreviation %d", dso->filename,
+ t->entry);
+ free (t);
+ htab_delete (h);
+@@ -351,7 +351,7 @@
+ form = read_uleb128 (ptr);
+ if (form == 2 || form > DW_FORM_indirect)
+ {
+- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, form);
++ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form);
+ htab_delete (h);
+ return NULL;
+ }
+@@ -361,7 +361,7 @@
+ }
+ if (read_uleb128 (ptr) != 0)
+ {
+- error (0, 0, "%s: DWARF-2 abbreviation does not end with 2 zeros",
++ error (0, 0, "%s: DWARF abbreviation does not end with 2 zeros",
+ dso->filename);
+ htab_delete (h);
+ return NULL;
+@@ -468,8 +468,8 @@
+ has_prefix (const char *str,
+ const char *prefix)
+ {
+- int str_len;
+- int prefix_len;
++ size_t str_len;
++ size_t prefix_len;
+
+ str_len = strlen (str);
+ prefix_len = strlen (prefix);
+@@ -481,14 +481,14 @@
+ }
+
+ static int
+-edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase)
++edit_dwarf2_line (DSO *dso, rpmuint32_t off, char *comp_dir, int phase)
+ {
+ unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir;
+ unsigned char **dirt;
+ unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size;
+ unsigned char *endcu, *endprol;
+ unsigned char opcode_base;
+- uint_32 value, dirt_cnt;
++ rpmuint32_t value, dirt_cnt;
+ size_t comp_dir_len = strlen (comp_dir);
+ size_t abs_file_cnt = 0, abs_dir_cnt = 0;
+
+@@ -513,7 +513,7 @@
+ }
+
+ value = read_16 (ptr);
+- if (value != 2)
++ if (value != 2 && value != 3)
+ {
+ error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
+ value);
+@@ -679,9 +679,12 @@
+ if (--shrank == 0)
+ error (EXIT_FAILURE, 0,
+ "canonicalization unexpectedly shrank by one character");
+- memset (ptr, 'X', shrank);
+- ptr += shrank;
+- *ptr++ = '\0';
++ else
++ {
++ memset (ptr, 'X', shrank);
++ ptr += shrank;
++ *ptr++ = '\0';
++ }
+ }
+
+ if (abs_dir_cnt + abs_file_cnt != 0)
+@@ -737,7 +740,7 @@
+ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
+ {
+ int i;
+- uint_32 list_offs;
++ rpmuint32_t list_offs;
+ int found_list_offs;
+ char *comp_dir;
+
+@@ -746,9 +749,9 @@
+ found_list_offs = 0;
+ for (i = 0; i < t->nattr; ++i)
+ {
+- uint_32 form = t->attr[i].form;
+- uint_32 len = 0;
+- int base_len, dest_len;
++ rpmuint32_t form = t->attr[i].form;
++ size_t len = 0;
++ size_t base_len, dest_len;
+
+
+ while (1)
+@@ -791,7 +794,7 @@
+ {
+ char *dir;
+
+- dir = (char *)debug_sections[DEBUG_STR].data
++ dir = (char *) debug_sections[DEBUG_STR].data
+ + do_read_32_relocated (ptr);
+
+ free (comp_dir);
+@@ -821,7 +824,7 @@
+ {
+ char *name;
+
+- name = (char *)debug_sections[DEBUG_STR].data
++ name = (char *) debug_sections[DEBUG_STR].data
+ + do_read_32_relocated (ptr);
+ if (*name == '/' && comp_dir == NULL)
+ {
+@@ -855,7 +858,12 @@
+
+ switch (form)
+ {
+- case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */
++ case DW_FORM_ref_addr:
++ if (cu_version == 2)
++ ptr += ptr_size;
++ else
++ ptr += 4;
++ break;
+ case DW_FORM_addr:
+ ptr += ptr_size;
+ break;
+@@ -907,7 +915,7 @@
+ assert (len < UINT_MAX);
+ break;
+ default:
+- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename,
++ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename,
+ form);
+ return NULL;
+ }
+@@ -918,6 +926,34 @@
+ break;
+ }
+ }
++
++ /* Ensure the CU current directory will exist even if only empty. Source
++ filenames possibly located in its parent directories refer relatively to
++ it and the debugger (GDB) cannot safely optimize out the missing
++ CU current dir subdirectories. */
++ if (comp_dir && list_file_fd != -1)
++ {
++ char *p;
++ size_t size;
++
++ if (base_dir && has_prefix (comp_dir, base_dir))
++ p = comp_dir + strlen (base_dir);
++ else if (dest_dir && has_prefix (comp_dir, dest_dir))
++ p = comp_dir + strlen (dest_dir);
++ else
++ p = comp_dir;
++
++ size = strlen (p) + 1;
++ while (size > 0)
++ {
++ ssize_t ret = write (list_file_fd, p, size);
++ if (ret == -1)
++ break;
++ size -= ret;
++ p += ret;
++ }
++ }
++
+ if (found_list_offs && comp_dir)
+ edit_dwarf2_line (dso, list_offs, comp_dir, phase);
+
+@@ -1034,7 +1070,7 @@
+ if (debug_sections[DEBUG_INFO].data != NULL)
+ {
+ unsigned char *ptr, *endcu, *endsec;
+- uint_32 value;
++ rpmuint32_t value;
+ htab_t abbrev;
+ struct abbrev_tag tag, *t;
+ int phase;
+@@ -1176,11 +1212,11 @@
+ return 1;
+ }
+
+- value = read_16 (ptr);
+- if (value != 2)
++ cu_version = read_16 (ptr);
++ if (cu_version != 2 && cu_version != 3)
+ {
+ error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
+- value);
++ cu_version);
+ return 1;
+ }
+
+@@ -1190,7 +1226,7 @@
+ if (debug_sections[DEBUG_ABBREV].data == NULL)
+ error (0, 0, "%s: .debug_abbrev not present", dso->filename);
+ else
+- error (0, 0, "%s: DWARF-2 CU abbrev offset too large",
++ error (0, 0, "%s: DWARF CU abbrev offset too large",
+ dso->filename);
+ return 1;
+ }
+@@ -1200,14 +1236,14 @@
+ ptr_size = read_1 (ptr);
+ if (ptr_size != 4 && ptr_size != 8)
+ {
+- error (0, 0, "%s: Invalid DWARF-2 pointer size %d",
++ error (0, 0, "%s: Invalid DWARF pointer size %d",
+ dso->filename, ptr_size);
+ return 1;
+ }
+ }
+ else if (read_1 (ptr) != ptr_size)
+ {
+- error (0, 0, "%s: DWARF-2 pointer size differs between CUs",
++ error (0, 0, "%s: DWARF pointer size differs between CUs",
+ dso->filename);
+ return 1;
+ }
+@@ -1225,7 +1261,7 @@
+ t = htab_find_with_hash (abbrev, &tag, tag.entry);
+ if (t == NULL)
+ {
+- error (0, 0, "%s: Could not find DWARF-2 abbreviation %d",
++ error (0, 0, "%s: Could not find DWARF abbreviation %d",
+ dso->filename, tag.entry);
+ htab_delete (abbrev);
+ return 1;
+@@ -1374,12 +1410,12 @@
+ or Elf64 object, only that we are consistent in what bits feed the
+ hash so it comes out the same for the same file contents. */
+ {
+- inline void process (const void *data, size_t size)
++ auto inline void process (const void *data, size_t size);
++ auto inline void process (const void *data, size_t size)
+ {
+ memchunk chunk = { .data = (void *) data, .size = size };
+ hashFunctionContextUpdateMC (&ctx, &chunk);
+ }
+-
+ union
+ {
+ GElf_Ehdr ehdr;
+@@ -1439,11 +1475,11 @@
+
+ /* Now format the build ID bits in hex to print out. */
+ {
+- const unsigned char * id = (unsigned char *) build_id->d_buf + build_id_offset;
++ const rpmuint8_t * id = (rpmuint8_t *)build_id->d_buf + build_id_offset;
+ char hex[build_id_size * 2 + 1];
+ int n = snprintf (hex, 3, "%02" PRIx8, id[0]);
+ assert (n == 2);
+- for (i = 1; i < build_id_size; ++i)
++ for (i = 1; i < (int)build_id_size; ++i)
+ {
+ n = snprintf (&hex[i * 2], 3, "%02" PRIx8, id[i]);
+ assert (n == 2);
+@@ -1466,8 +1502,7 @@
+ Elf_Data *build_id = NULL;
+ size_t build_id_offset = 0, build_id_size = 0;
+
+- optCon = poptGetContext("debugedit", argc, (const char **)argv,
+- optionsTable, 0);
++ optCon = poptGetContext("debugedit", argc, (const char **)argv, optionsTable, 0);
+
+ while ((nextopt = poptGetNextOpt (optCon)) > 0 || nextopt == POPT_ERROR_BADOPT)
+ /* do nothing */ ;
+@@ -1585,7 +1620,8 @@
+ Elf_Data src = dst;
+ src.d_buf = data->d_buf;
+ assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr));
+- while ((char *) data->d_buf + data->d_size - (char *) src.d_buf > (int) sizeof nh
++ while ((char *) data->d_buf + data->d_size -
++ (char *) src.d_buf > (int) sizeof nh
+ && elf32_xlatetom (&dst, &src, dso->ehdr.e_ident[EI_DATA]))
+ {
+ Elf32_Word len = sizeof nh + nh.n_namesz;
+@@ -1595,7 +1631,8 @@
+ && !memcmp ((char *) src.d_buf + sizeof nh, "GNU", sizeof "GNU"))
+ {
+ build_id = data;
+- build_id_offset = (char *) src.d_buf + len - (char *) data->d_buf;
++ build_id_offset = (char *) src.d_buf + len -
++ (char *) data->d_buf;
+ build_id_size = nh.n_descsz;
+ break;
+ }
--- /dev/null
+Index: rpm/CHANGES
+ 5.0.0 -> 5.1a1:
++ - jbj: fix: reverse arrows on erasure dependency graph.
+ - rse: provide the necessary pre-processor macros to allow misc/err.h to compile with Sun Studio 12 under Solaris 10
+ - jbj: rpmrepo: be kind to the sqlite3 deprived.
+ - jbj: rpmrepo: cleanly separate SQL representation from execution.
+Index: rpm/lib/depends.c
+RCS File: /v/rpm/cvs/rpm/lib/depends.c,v
+rcsdiff -q -kk '-r1.392' '-r1.393' -u '/v/rpm/cvs/rpm/lib/depends.c,v' 2>/dev/null
+--- lib/depends.c 2008/03/17 09:50:01 1.392
++++ lib/depends.c 2008/03/31 23:00:56 1.393
+@@ -1592,7 +1592,7 @@
+ continue;
+ /*@=abstractcompare@*/
+
+- requires = rpmteDS(p, tsi->tsi_tagn);
++ requires = rpmteDS((rpmteType(p) == TR_REMOVED ? q : p), tsi->tsi_tagn);
+ if (requires == NULL) continue; /* XXX can't happen */
+
+ (void) rpmdsSetIx(requires, tsi->tsi_reqx);
+@@ -1882,6 +1882,13 @@
+ return 0;
+ selected[i] = 1;
+
++ /* Erasures are reversed installs. */
++ if (teType == TR_REMOVED) {
++ rpmte r = p;
++ p = q;
++ q = r;
++ }
++
+ /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */
+ rpmteTSI(p)->tsi_count++; /* bump p predecessor count */
+
+@@ -1899,6 +1906,7 @@
+ tsi->tsi_next = rpmteTSI(q)->tsi_next;
+ rpmteTSI(q)->tsi_next = tsi;
+ rpmteTSI(q)->tsi_qcnt++; /* bump q successor count */
++
+ return 0;
+ }
+ /*@=mustmod@*/
--- /dev/null
+Index: rpm/lib/rpmcli.h
+RCS File: /v/rpm/cvs/rpm/lib/rpmcli.h,v
+rcsdiff -q -kk '-r2.67' '-r2.67.2.1' -u '/v/rpm/cvs/rpm/lib/rpmcli.h,v' 2>/dev/null
+--- rpmcli.h 2007/05/25 17:36:02 2.67
++++ rpmcli.h 2007/07/30 03:07:58 2.67.2.1
+@@ -775,7 +775,6 @@
+ rpmRelocation relocations;
+
+ /* database mode arguments */
+- int init; /*!< from --initdb */
+ int rebuild; /*!< from --rebuilddb */
+ int verify; /*!< from --verifydb */
+
+Index: rpm/rpmdb/poptDB.c
+RCS File: /v/rpm/cvs/rpm/rpmdb/poptDB.c,v
+rcsdiff -q -kk '-r1.6' '-r1.6.2.1' -u '/v/rpm/cvs/rpm/rpmdb/poptDB.c,v' 2>/dev/null
+--- poptDB.c 2007/05/25 17:36:33 1.6
++++ poptDB.c 2007/07/30 03:07:58 1.6.2.1
+@@ -14,8 +14,6 @@
+ /**
+ */
+ struct poptOption rpmDatabasePoptTable[] = {
+- { "initdb", '\0', POPT_ARG_VAL, &rpmDBArgs.init, 1,
+- N_("initialize database"), NULL},
+ { "rebuilddb", '\0', POPT_ARG_VAL, &rpmDBArgs.rebuild, 1,
+ N_("rebuild database inverted lists from installed package headers"),
+ NULL},
+Index: rpm/rpmqv.c
+RCS File: /v/rpm/cvs/rpm/rpmqv.c,v
+rcsdiff -q -kk '-r1.113.2.1' '-r1.113.2.2' -u '/v/rpm/cvs/rpm/rpmqv.c,v' 2>/dev/null
+--- rpmqv.c 2007/06/05 22:48:08 1.113.2.1
++++ rpmqv.c 2007/07/30 03:07:58 1.113.2.2
+@@ -290,12 +290,6 @@
+
+ #ifdef IAM_RPMDB
+ if (bigMode == MODE_UNKNOWN || (bigMode & MODES_DB)) {
+- if (da->init) {
+- if (bigMode != MODE_UNKNOWN)
+- argerror(_("only one major mode may be specified"));
+- else
+- bigMode = MODE_INITDB;
+- } else
+ if (da->rebuild) {
+ if (bigMode != MODE_UNKNOWN)
+ argerror(_("only one major mode may be specified"));
--- /dev/null
+Index: rpm/rpmdb/db3.c
+RCS File: /v/rpm/cvs/rpm/rpmdb/db3.c,v
+rcsdiff -q -kk '-r1.71' '-r1.72' -u '/v/rpm/cvs/rpm/rpmdb/db3.c,v' 2>/dev/null
+--- db3.c 2007/08/18 23:40:36 1.71
++++ db3.c 2007/09/24 02:38:57 1.72
+@@ -275,12 +275,21 @@
+ fileSystem @*/
+ /*@modifies dbi, *dbenvp, fileSystem @*/
+ {
++ static int oneshot = 0;
+ rpmdb rpmdb = dbi->dbi_rpmdb;
+ DB_ENV *dbenv = NULL;
+ int eflags;
+ int rc;
+ int xx;
+
++ if (!oneshot) {
++#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4)
++ xx = db_env_set_func_open((int (*)(const char *, int, ...))Open);
++ xx = cvtdberr(dbi, "db_env_set_func_open", xx, _debug);
++#endif
++ oneshot++;
++ }
++
+ if (dbenvp == NULL)
+ return 1;
+
+Index: rpm/rpmdb/rpmdb.c
+RCS File: /v/rpm/cvs/rpm/rpmdb/rpmdb.c,v
+rcsdiff -q -kk '-r1.158' '-r1.159' -u '/v/rpm/cvs/rpm/rpmdb/rpmdb.c,v' 2>/dev/null
+--- rpmdb.c 2007/09/09 19:06:51 1.158
++++ rpmdb.c 2007/09/24 02:38:57 1.159
+@@ -3618,8 +3618,9 @@
+ if (db == NULL) return 0;
+
+ mi = rpmdbInitIterator(db, RPMTAG_BASENAMES, NULL, 0);
+- if (mi == NULL) /* XXX should never happen */
+- return 0;
++assert(mi); /* XXX will never happen. */
++ if (mi == NULL)
++ return 2;
+
+ key = &mi->mi_key;
+ data = &mi->mi_data;
+Index: rpm/rpmio/librpmio.vers
+RCS File: /v/rpm/cvs/rpm/rpmio/librpmio.vers,v
+rcsdiff -q -kk '-r2.12' '-r2.13' -u '/v/rpm/cvs/rpm/rpmio/librpmio.vers,v' 2>/dev/null
+--- librpmio.vers 2007/09/09 20:32:43 2.12
++++ librpmio.vers 2007/09/24 02:38:57 2.13
+@@ -140,6 +140,8 @@
+ _Mknod;
+ Mount;
+ noLibio;
++ Open;
++ _Open;
+ Opendir;
+ _Opendir;
+ pgpArmorKeyTbl;
+Index: rpm/rpmio/rpmio.h
+RCS File: /v/rpm/cvs/rpm/rpmio/rpmio.h,v
+rcsdiff -q -kk '-r1.57' '-r1.58' -u '/v/rpm/cvs/rpm/rpmio/rpmio.h,v' 2>/dev/null
+--- rpmio.h 2007/08/28 20:45:49 1.57
++++ rpmio.h 2007/09/24 02:38:57 1.58
+@@ -342,11 +342,22 @@
+ /*@globals errno, h_errno, fileSystem, internalState @*/
+ /*@modifies errno, fileSystem, internalState @*/;
+
++/*@unchecked@*/ /*@observer@*/ /*@null@*/
++extern const char * _chroot_prefix;
++
+ /**
+ * chroot(2) clone.
+ * @todo Implement remotely.
+ */
+ int Chroot(const char * path)
++ /*@globals _chroot_prefix, errno, fileSystem, internalState @*/
++ /*@modifies _chroot_prefix, errno, fileSystem, internalState @*/;
++
++/**
++ * open(2) clone.
++ * @todo Implement remotely.
++ */
++int Open(const char * path, int flags, mode_t mode)
+ /*@globals errno, fileSystem, internalState @*/
+ /*@modifies errno, fileSystem, internalState @*/;
+
+Index: rpm/rpmio/rpmrpc.c
+RCS File: /v/rpm/cvs/rpm/rpmio/rpmrpc.c,v
+rcsdiff -q -kk '-r2.54' '-r2.55' -u '/v/rpm/cvs/rpm/rpmio/rpmrpc.c,v' 2>/dev/null
+--- rpmrpc.c 2007/07/10 18:00:30 2.54
++++ rpmrpc.c 2007/09/24 02:38:57 2.55
+@@ -160,6 +160,9 @@
+ return rmdir(path);
+ }
+
++/*@unchecked@*/
++const char * _chroot_prefix = NULL;
++
+ int Chroot(const char * path)
+ {
+ const char * lpath;
+@@ -183,11 +186,56 @@
+ return -2;
+ /*@notreached@*/ break;
+ }
++
++ _chroot_prefix = _free(_chroot_prefix);
++ if (strcmp(path, "."))
++ _chroot_prefix = rpmGetPath(path, NULL);
++
+ /*@-superuser@*/
+ return chroot(path);
+ /*@=superuser@*/
+ }
+
++int Open(const char * path, int flags, mode_t mode)
++{
++ const char * lpath;
++ int ut = urlPath(path, &lpath);
++
++if (_rpmio_debug)
++fprintf(stderr, "*** Open(%s, 0x%x, 0%o)\n", path, flags, mode);
++ switch (ut) {
++ case URL_IS_PATH:
++ path = lpath;
++ /*@fallthrough@*/
++ case URL_IS_UNKNOWN:
++ break;
++ case URL_IS_DASH:
++ case URL_IS_HKP:
++ case URL_IS_FTP: /* XXX TODO: implement. */
++ case URL_IS_HTTPS: /* XXX TODO: implement. */
++ case URL_IS_HTTP: /* XXX TODO: implement. */
++ default:
++ errno = EINVAL; /* XXX W2DO? */
++ return -2;
++ /*@notreached@*/ break;
++ }
++
++ if (_chroot_prefix && _chroot_prefix[0] == '/' && _chroot_prefix[1] != '\0')
++ {
++ size_t nb = strlen(_chroot_prefix);
++ size_t ob = strlen(path);
++ while (nb > 0 && _chroot_prefix[nb-1] == '/')
++ nb--;
++ if (ob > nb && !strncmp(path, _chroot_prefix, nb) && path[nb] == '/')
++ path += nb;
++ }
++#ifdef NOTYET /* XXX likely sane default. */
++ if (mode == 0)
++ mode = 0644;
++#endif
++ return open(path, flags, mode);
++}
++
+ /* XXX rpmdb.c: analogue to rename(2). */
+
+ int Rename (const char * oldpath, const char * newpath)
--- /dev/null
+Index: rpm/rpmdb/rpmdb.c
+--- rpm/rpmdb/rpmdb.c 2007/10/22 02:48:42 1.195
++++ rpm/rpmdb/rpmdb.c 2007/11/02 03:07:46 1.196
+@@ -3917,7 +3917,7 @@
+ }
+ dbpath = rootdbpath = rpmGetPath(prefix, tfn, NULL);
+ if (!(prefix[0] == '/' && prefix[1] == '\0'))
+- dbpath += strlen(prefix) - 1;
++ dbpath += strlen(prefix);
+ tfn = _free(tfn);
+
+ /*@-nullpass@*/
--- /dev/null
+--- rpm-4.4.4/rpmpopt.in.orig 2005-10-30 02:15:44.000000000 +0200
++++ rpm-4.4.4/rpmpopt.in 2005-11-18 22:43:57.809703712 +0100
+@@ -246,6 +246,15 @@
+ rpmb alias --without --define "_without_!#:+ --without-!#:+" \
+ --POPTdesc=$"disable configure <option> for build" \
+ --POPTargs=$"<option>"
++# (PLD-specific) Make RPM build tree
++rpmb exec --install-build-tree install-build-tree \
++ --POPTdesc=$"make all needed dirs for building binary rpms"
++# (PLD-specific) Compiling with debuginfo may be enabled by --debug
++rpmb alias --debug --define 'debug 1' \
++ --POPTdesc=$"build packages with debug information"
++# (PLD-specific) Conditional building
++rpmb exec --bcond find-spec-bcond \
++ --POPTdesc=$"find all --with/--without values"
+ #==============================================================================
+ rpmbuild alias --dbpath --define '_dbpath !#:+' \
+ --POPTdesc=$"use database in DIRECTORY" \
+@@ -248,5 +248,14 @@
+ rpmbuild alias --buildroot --define '.buildroot !#:+' \
+ --POPTdesc=$"override build root" \
+ --POPTargs=$"DIRECTORY"
++# (PLD-specific) Make RPM build tree
++rpmbuild exec --install-build-tree install-build-tree \
++ --POPTdesc=$"make all needed dirs for building binary rpms"
++# (PLD-specific) Compiling with debuginfo may be enabled by --debug
++rpmbuild alias --debug --define 'debug 1' \
++ --POPTdesc=$"build packages with debug information"
++# (PLD-specific) Conditional building
++rpmbuild exec --bcond find-spec-bcond \
++ --POPTdesc=$"find all --with/--without values"
+
+ # \endverbatim
+--- rpm-4.5/po/pl.po~ 2008-04-13 03:15:20.000000000 +0300
++++ rpm-4.5/po/pl.po 2008-04-13 03:16:26.314206092 +0300
+@@ -3964,6 +3964,18 @@
+ msgid "check Requires: against Provides: for dependency closure"
+ msgstr "sprawd¼ Requires: wzglêdem Provides: dla dope³nienia zale¿no¶ci"
+
++#: rpmpopt:251
++msgid "make all needed dirs for building binary rpms"
++msgstr "utwórz wszystkie katalogi potrzebne do budowania binarnych RPM-ów"
++
++#: rpmpopt:254
++msgid "build packages with debug information"
++msgstr "buduj pakiety z informacjami do odpluskwiania"
++
++#: rpmpopt:257
++msgid "find all --with/--without values"
++msgstr "znajd¼ wszystkie warto¶ci --with/--without"
++
+ #~ msgid " target platform: %s\n"
+ #~ msgstr " platforma docelowa: %s\n"
+
--- /dev/null
+--- rpm-4.4.9/rpmrc.in~ 2008-01-10 12:40:27.020788566 +0200
++++ rpm-4.4.2/rpmrc.in 2007-11-27 23:25:28.577554219 +0200
+@@ -13,67 +13,65 @@
+ # Values for RPM_OPT_FLAGS for various platforms
+
+ # "fat" binary with both archs, for Darwin
+-optflags: fat -O2 -arch i386 -arch ppc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_fat: %{specflags_fat}}}
++optflags: fat -O2 -arch i386 -arch ppc %{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_fat: %{specflags_fat}}}
+
+-optflags: i386 -O2 -fno-strict-aliasing -fwrapv -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}}
+-optflags: i486 -O2 -fno-strict-aliasing -fwrapv -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}}
+-optflags: i586 -O2 -fno-strict-aliasing -fwrapv -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}}
+-optflags: i686 -O2 -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}}
+-optflags: pentium3 -O2 -fno-strict-aliasing -fwrapv -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}}
+-optflags: pentium4 -O2 -fno-strict-aliasing -fwrapv -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}}
+-optflags: athlon -O2 -fno-strict-aliasing -fwrapv -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}}
+-optflags: ia64 -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}}
+-optflags: x86_64 -O2 -fno-strict-aliasing -fwrapv -march=x86-64%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}}
+-optflags: amd64 -O2 -fno-strict-aliasing -fwrapv -march=k8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}}
+-optflags: ia32e -O2 -fno-strict-aliasing -fwrapv -march=nocona%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}}
+-
+-optflags: alpha -O2 -fno-strict-aliasing -fwrapv -mieee%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}}
+-optflags: alphaev5 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev5%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev5: %{specflags_alphaev5}}}
+-optflags: alphaev56 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev56: %{specflags_alphaev56}}}
+-optflags: alphapca56 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=pca56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphapca56: %{specflags_alphapca56}}}
+-optflags: alphaev6 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev6%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev6: %{specflags_alphaev6}}}
+-optflags: alphaev67 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev67%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev67: %{specflags_alphaev67}}}
+-
+-optflags: sparc -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=v7 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}}
+-optflags: sparcv8 -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=v8 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv8: %{specflags_sparcv8}}}
+-optflags: sparcv9 -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv9: %{specflags_sparcv9}}}
+-optflags: sparc64 -O2 -fno-strict-aliasing -fwrapv -mcpu=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparc64: %{specflags_sparc64}}}
+-
+-optflags: m68k -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_m68k: %{specflags_m68k}}}
+-
+-optflags: ppc -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
+-optflags: ppc8260 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8260: %{specflags_ppc8260}}}
+-optflags: ppc8560 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8560: %{specflags_ppc8560}}}
+-optflags: ppc32dy4 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc32dy4: %{specflags_ppc32dy4}}}
+-optflags: ppciseries -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppciseries: %{specflags_ppciseries}}}
+-optflags: ppcpseries -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppcpseries: %{specflags_ppcpseries}}}
+-optflags: ppc64 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc64: %{specflags_ppc64}}}
+-
+-optflags: parisc -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_parisc: %{specflags_parisc}}}
+-optflags: hppa1.0 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_0: %{specflags_hppa1_0}}}
+-optflags: hppa1.1 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_1: %{specflags_hppa1_1}}}
+-optflags: hppa1.2 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_2: %{specflags_hppa1_2}}}
+-optflags: hppa2.0 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa2_0: %{specflags_hppa2_0}}}
+-
+-optflags: mips -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}}
+-optflags: mipsel -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}%{?specflags_mipsel: %{specflags_mipsel}}}
+-
+-optflags: armv3l -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv3l: %{specflags_armv3l}}}
+-optflags: armv4b -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4b: %{specflags_armv4b}}}
+-optflags: armv4l -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4l: %{specflags_armv4l}}}
+-optflags: armv5teb -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv5te%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv5teb: %{specflags_armv5teb}}}
+-optflags: armv5tel -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv5te%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv5tel: %{specflags_armv5tel}}}
+-
+-optflags: atarist -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atarist: %{specflags_atarist}}}
+-optflags: atariste -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariste: %{specflags_atariste}}}
+-optflags: ataritt -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ataritt: %{specflags_ataritt}}}
+-optflags: falcon -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_falcon: %{specflags_falcon}}}
+-optflags: atariclone -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariclone: %{specflags_atariclone}}}
+-optflags: milan -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_milan: %{specflags_milan}}}
+-optflags: hades -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hades: %{specflags_hades}}}
++optflags: i386 -O2 -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}}
++optflags: i486 -O2 -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}}
++optflags: i586 -O2 -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}}
++optflags: i686 -O2 -march=i686%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}}
++optflags: pentium3 -O2 -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}}
++optflags: pentium4 -O2 -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}}
++optflags: athlon -O2 -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}}
++optflags: ia64 -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}}
++optflags: x86_64 -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}}
++optflags: amd64 -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}}
++optflags: ia32e -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}}
++
++optflags: alpha -O2 -mieee%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}}
++optflags: alphaev5 -O2 -mieee -mcpu=ev5%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev5: %{specflags_alphaev5}}}
++optflags: alphaev56 -O2 -mieee -mcpu=ev56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev56: %{specflags_alphaev56}}}
++optflags: alphapca56 -O2 -mieee -mcpu=pca56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphapca56: %{specflags_alphapca56}}}
++optflags: alphaev6 -O2 -mieee -mcpu=ev6%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev6: %{specflags_alphaev6}}}
++optflags: alphaev67 -O2 -mieee -mcpu=ev67%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev67: %{specflags_alphaev67}}}
++
++optflags: sparc -O2 -m32 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}}
++optflags: sparcv8 -O2 -m32 -mtune=ultrasparc -mv8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv8: %{specflags_sparcv8}}}
++optflags: sparcv9 -O2 -m32 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv9: %{specflags_sparcv9}}}
++optflags: sparc64 -O2 -m64 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparc64: %{specflags_sparc64}}}
++
++optflags: m68k -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_m68k: %{specflags_m68k}}}
++
++optflags: ppc -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
++optflags: ppc8260 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8260: %{specflags_ppc8260}}}
++optflags: ppc8560 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8560: %{specflags_ppc8560}}}
++optflags: ppc32dy4 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc32dy4: %{specflags_ppc32dy4}}}
++optflags: ppciseries -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppciseries: %{specflags_ppciseries}}}
++optflags: ppcpseries -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppcpseries: %{specflags_ppcpseries}}}
++optflags: ppc64 -O2 -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc64: %{specflags_ppc64}}}
++
++optflags: parisc -O2 -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_parisc: %{specflags_parisc}}}
++optflags: hppa1.0 -O2 -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_0: %{specflags_hppa1_0}}}
++optflags: hppa1.1 -O2 -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_1: %{specflags_hppa1_1}}}
++optflags: hppa1.2 -O2 -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_2: %{specflags_hppa1_2}}}
++optflags: hppa2.0 -O2 -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa2_0: %{specflags_hppa2_0}}}
++
++optflags: mips -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}}
++optflags: mipsel -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}%{?specflags_mipsel: %{specflags_mipsel}}}
++
++optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv3l: %{specflags_armv3l}}}
++optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4b: %{specflags_armv4b}}}
++optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4l: %{specflags_armv4l}}}
++
++optflags: atarist -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atarist: %{specflags_atarist}}}
++optflags: atariste -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariste: %{specflags_atariste}}}
++optflags: ataritt -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ataritt: %{specflags_ataritt}}}
++optflags: falcon -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_falcon: %{specflags_falcon}}}
++optflags: atariclone -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariclone: %{specflags_atariclone}}}
++optflags: milan -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_milan: %{specflags_milan}}}
++optflags: hades -O2 -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hades: %{specflags_hades}}}
+
+-optflags: s390 -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}}
+-optflags: s390x -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}%{?specflags_s390x: %{specflags_s390x}}}
++optflags: s390 -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}}
++optflags: s390x -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}%{?specflags_s390x: %{specflags_s390x}}}
+
+ #############################################################
+ # Canonical arch names and numbers
+@@ -126,8 +124,6 @@
+ arch_canon: armv3l: armv3l 12
+ arch_canon: armv4b: armv4b 12
+ arch_canon: armv4l: armv4l 12
+-arch_canon: armv5teb: armv5teb 12
+-arch_canon: armv5tel: armv5tel 12
+
+ arch_canon: m68kmint: m68kmint 13
+ arch_canon: atarist: m68kmint 13
+@@ -205,8 +205,8 @@
+ buildarchtranslate: sun4m: sparc
+ buildarchtranslate: sparcv8: sparc
+ buildarchtranslate: sparcv9: sparcv9
+-buildarchtranslate: sun4u: sparc64
+-buildarchtranslate: sparc64: sparc64
++buildarchtranslate: sun4u: sparc
++buildarchtranslate: sparc64: sparc
+
+ buildarchtranslate: osfmach3_ppc: ppc
+ buildarchtranslate: powerpc: ppc
+@@ -236,9 +232,9 @@
+
+ buildarchtranslate: ia64: ia64
+
+-buildarchtranslate: x86_64: x86_64
+-buildarchtranslate: amd64: x86_64
+-buildarchtranslate: ia32e: x86_64
++buildarchtranslate: x86_64: amd64
++buildarchtranslate: amd64: amd64
++buildarchtranslate: ia32e: amd64
+
+ #############################################################
+ # Architecture compatibility
+@@ -295,8 +291,6 @@
+ arch_compat: hppa1.0: parisc
+ arch_compat: parisc: noarch
+
+-arch_compat: armv5teb: armv4b
+-arch_compat: armv5tel: armv4l
+ arch_compat: armv4b: noarch
+ arch_compat: armv4l: armv3l
+ arch_compat: armv3l: noarch
+@@ -391,8 +385,6 @@
+ buildarch_compat: armv3l: noarch
+ buildarch_compat: armv4b: noarch
+ buildarch_compat: armv4l: noarch
+-buildarch_compat: armv5teb: noarch
+-buildarch_compat: armv5tel: noarch
+
+ buildarch_compat: hppa2.0: hppa1.2
+ buildarch_compat: hppa1.2: hppa1.1
--- /dev/null
+--- rpm-4.4.8/rpmrc.in.orig 2007-02-03 21:02:07.000000000 +0100
++++ rpm-4.4.8/rpmrc.in 2007-04-08 10:43:32.083363453 +0200
+@@ -13,69 +13,67 @@
+ # Values for RPM_OPT_FLAGS for various platforms
+
+ # "fat" binary with both archs, for Darwin
+-optflags: fat -O2 -g -arch i386 -arch ppc
++optflags: fat -O2 -arch i386 -arch ppc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_fat: %{specflags_fat}}}
+
+-optflags: i386 -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
+-optflags: i486 -O2 -g -m32 -march=i486 -fasynchronous-unwind-tables
+-optflags: i586 -O2 -g -m32 -march=i586 -fasynchronous-unwind-tables
+-optflags: i686 -O2 -g -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables
+-optflags: pentium3 -O2 -g -m32 -march=pentium3 -fasynchronous-unwind-tables
+-optflags: pentium4 -O2 -g -m32 -march=pentium4 -fasynchronous-unwind-tables
+-optflags: athlon -O2 -g -m32 -march=athlon -fasynchronous-unwind-tables
+-optflags: ia64 -O2 -g
+-optflags: x86_64 -O2 -g -m64 -mtune=generic
+-optflags: amd64 -O2 -g -m64 -mtune=generic
+-optflags: ia32e -O2 -g -m64 -mtune=generic
+-
+-optflags: alpha -O2 -g -mieee
+-optflags: alphaev5 -O2 -g -mieee -mcpu=ev5
+-optflags: alphaev56 -O2 -g -mieee -mcpu=ev56
+-optflags: alphapca56 -O2 -g -mieee -mcpu=pca56
+-optflags: alphaev6 -O2 -g -mieee -mcpu=ev6
+-optflags: alphaev67 -O2 -g -mieee -mcpu=ev67
+-
+-optflags: sparc -O2 -g -m32 -mcpu=v7 -mtune=ultrasparc
+-optflags: sparcv8 -O2 -g -m32 -mcpu=v8 -mtune=ultrasparc
+-optflags: sparcv9 -O2 -g -m32 -mcpu=ultrasparc
+-optflags: sparc64 -O2 -g -m64 -mcpu=ultrasparc
+-
+-optflags: m68k -O2 -g -fomit-frame-pointer
+-
+-optflags: ppc -O2 -g -m32
+-optflags: ppc8260 -O2 -g -m32
+-optflags: ppc8560 -O2 -g -m32
+-optflags: ppc32dy4 -O2 -g -m32
+-optflags: ppciseries -O2 -g -m32
+-optflags: ppcpseries -O2 -g -m32
+-optflags: ppc64 -O2 -g -m64 -mminimal-toc
+-optflags: ppciseries -O2 -g -m64 -mminimal-toc
+-optflags: ppcpseries -O2 -g -m64 -mminimal-toc
+-
+-optflags: parisc -O2 -g -mpa-risc-1-0
+-optflags: hppa1.0 -O2 -g -mpa-risc-1-0
+-optflags: hppa1.1 -O2 -g -mpa-risc-1-0
+-optflags: hppa1.2 -O2 -g -mpa-risc-1-0
+-optflags: hppa2.0 -O2 -g -mpa-risc-1-0
+-
+-optflags: mips -O2 -g
+-optflags: mipsel -O2 -g
+-
+-optflags: armv3l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv3
+-optflags: armv4b -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
+-optflags: armv4l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
+-optflags: armv5teb -O2 -g -fsigned-char -fomit-frame-pointer -march=armv5te
+-optflags: armv5tel -O2 -g -fsigned-char -fomit-frame-pointer -march=armv5te
+-
+-optflags: atarist -O2 -g -fomit-frame-pointer
+-optflags: atariste -O2 -g -fomit-frame-pointer
+-optflags: ataritt -O2 -g -fomit-frame-pointer
+-optflags: falcon -O2 -g -fomit-frame-pointer
+-optflags: atariclone -O2 -g -fomit-frame-pointer
+-optflags: milan -O2 -g -fomit-frame-pointer
+-optflags: hades -O2 -g -fomit-frame-pointer
++optflags: i386 -O2 -fno-strict-aliasing -fwrapv -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}}
++optflags: i486 -O2 -fno-strict-aliasing -fwrapv -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}}
++optflags: i586 -O2 -fno-strict-aliasing -fwrapv -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}}
++optflags: i686 -O2 -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}}
++optflags: pentium3 -O2 -fno-strict-aliasing -fwrapv -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}}
++optflags: pentium4 -O2 -fno-strict-aliasing -fwrapv -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}}
++optflags: athlon -O2 -fno-strict-aliasing -fwrapv -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}}
++optflags: ia64 -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}}
++optflags: x86_64 -O2 -fno-strict-aliasing -fwrapv -march=x86-64%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}}
++optflags: amd64 -O2 -fno-strict-aliasing -fwrapv -march=k8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}}
++optflags: ia32e -O2 -fno-strict-aliasing -fwrapv -march=nocona%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}}
++
++optflags: alpha -O2 -fno-strict-aliasing -fwrapv -mieee%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}}
++optflags: alphaev5 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev5%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev5: %{specflags_alphaev5}}}
++optflags: alphaev56 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev56: %{specflags_alphaev56}}}
++optflags: alphapca56 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=pca56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphapca56: %{specflags_alphapca56}}}
++optflags: alphaev6 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev6%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev6: %{specflags_alphaev6}}}
++optflags: alphaev67 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev67%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev67: %{specflags_alphaev67}}}
++
++optflags: sparc -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=v7 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}}
++optflags: sparcv8 -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=v8 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv8: %{specflags_sparcv8}}}
++optflags: sparcv9 -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv9: %{specflags_sparcv9}}}
++optflags: sparc64 -O2 -fno-strict-aliasing -fwrapv -mcpu=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparc64: %{specflags_sparc64}}}
++
++optflags: m68k -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_m68k: %{specflags_m68k}}}
++
++optflags: ppc -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
++optflags: ppc8260 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8260: %{specflags_ppc8260}}}
++optflags: ppc8560 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8560: %{specflags_ppc8560}}}
++optflags: ppc32dy4 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc32dy4: %{specflags_ppc32dy4}}}
++optflags: ppciseries -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppciseries: %{specflags_ppciseries}}}
++optflags: ppcpseries -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppcpseries: %{specflags_ppcpseries}}}
++optflags: ppc64 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc64: %{specflags_ppc64}}}
++
++optflags: parisc -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_parisc: %{specflags_parisc}}}
++optflags: hppa1.0 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_0: %{specflags_hppa1_0}}}
++optflags: hppa1.1 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_1: %{specflags_hppa1_1}}}
++optflags: hppa1.2 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_2: %{specflags_hppa1_2}}}
++optflags: hppa2.0 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa2_0: %{specflags_hppa2_0}}}
++
++optflags: mips -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}}
++optflags: mipsel -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}%{?specflags_mipsel: %{specflags_mipsel}}}
++
++optflags: armv3l -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv3l: %{specflags_armv3l}}}
++optflags: armv4b -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4b: %{specflags_armv4b}}}
++optflags: armv4l -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4l: %{specflags_armv4l}}}
++optflags: armv5teb -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv5te%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv5teb: %{specflags_armv5teb}}}
++optflags: armv5tel -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv5te%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv5tel: %{specflags_armv5tel}}}
++
++optflags: atarist -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atarist: %{specflags_atarist}}}
++optflags: atariste -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariste: %{specflags_atariste}}}
++optflags: ataritt -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ataritt: %{specflags_ataritt}}}
++optflags: falcon -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_falcon: %{specflags_falcon}}}
++optflags: atariclone -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariclone: %{specflags_atariclone}}}
++optflags: milan -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_milan: %{specflags_milan}}}
++optflags: hades -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hades: %{specflags_hades}}}
+
+-optflags: s390 -O2 -g -m31
+-optflags: s390x -O2 -g -m64
++optflags: s390 -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}}
++optflags: s390x -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}%{?specflags_s390x: %{specflags_s390x}}}
+
+ #############################################################
+ # Canonical arch names and numbers
+@@ -418,7 +416,7 @@
+ buildarch_compat: amd64: x86_64
+ buildarch_compat: ia32e: x86_64
+
+-macrofiles: @USRLIBRPM@/macros:@USRLIBRPM@/%{_target}/macros:@SYSCONFIGDIR@/macros.*:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/etc/.rpmmacros:~/.rpmmacros
++macrofiles: @USRLIBRPM@/macros:@USRLIBRPM@/macros.build:@USRLIBRPM@/%{_target}/macros:@SYSCONFIGDIR@/macros.*:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/etc/.rpmmacros:~/.rpmmacros
+
+ # \endverbatim
+ #*/
--- /dev/null
+Index: lib/depends.c
+===================================================================
+RCS file: /v/rpm/cvs/rpm/lib/depends.c,v
+retrieving revision 1.327.2.9
+retrieving revision 1.327.2.8
+diff -w -u -r1.327.2.9 -r1.327.2.8
+--- lib/depends.c 6 Jun 2008 14:50:46 -0000 1.327.2.9
++++ lib/depends.c 5 Jun 2008 13:44:41 -0000 1.327.2.8
+@@ -1813,7 +1813,7 @@
+ continue;
+ /*@=abstractcompare@*/
+
+- requires = rpmteDS((rpmteType(p) == TR_REMOVED ? q : p), tsi->tsi_tagn);
++ requires = rpmteDS(p, tsi->tsi_tagn);
+ if (requires == NULL) continue; /* XXX can't happen */
+
+ (void) rpmdsSetIx(requires, tsi->tsi_reqx);
--- /dev/null
+--- ./lib/package.c 2006-07-26 14:45:41.000000000 +0200
++++ rpm-4.4.9/lib/package.c 2008-10-26 17:56:29.000000000 +0200
+@@ -10,6 +10,7 @@
+ #include <rpmlib.h>
+
+ #include "rpmts.h"
++#include "rpmevr.h"
+
+ #include "misc.h" /* XXX stripTrailingChar() */
+ #include "rpmlead.h"
+@@ -94,6 +95,148 @@
+ */
+ #define hdrchkRange(_dl, _off) ((_off) < 0 || (_off) > (_dl))
+
++/*@-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@*/
++
++/*@-bounds@*/
++/**
++ * Convert absolute path tag to (dirname,basename,dirindex) tags.
++ * @param h header
++ */
++static void compressFilelist(Header h)
++ /*@modifies h @*/
++{
++ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
++ HAE_t hae = (HAE_t)headerAddEntry;
++ HRE_t hre = (HRE_t)headerRemoveEntry;
++ HFD_t hfd = headerFreeData;
++ char ** fileNames;
++ const char ** dirNames;
++ const char ** baseNames;
++ int_32 * dirIndexes;
++ rpmTagType fnt;
++ int count;
++ int i, xx;
++ 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 = hre(h, RPMTAG_OLDFILENAMES);
++ return; /* Already converted. */
++ }
++
++ if (!hge(h, RPMTAG_OLDFILENAMES, &fnt, (void **) &fileNames, &count))
++ return; /* no file list */
++ if (fileNames == NULL || count <= 0)
++ return;
++
++ dirNames = alloca(sizeof(*dirNames) * count); /* worst case */
++ baseNames = alloca(sizeof(*dirNames) * count);
++ dirIndexes = alloca(sizeof(*dirIndexes) * count);
++
++ if (fileNames[0][0] != '/') {
++ /* HACK. Source RPM, so just do things differently */
++ dirIndex = 0;
++ dirNames[dirIndex] = "";
++ for (i = 0; i < count; i++) {
++ dirIndexes[i] = dirIndex;
++ baseNames[i] = fileNames[i];
++ }
++ goto exit;
++ }
++
++ /*@-branchstate@*/
++ for (i = 0; i < count; i++) {
++ const char ** needle;
++ char savechar;
++ char * baseName;
++ int len;
++
++ if (fileNames[i] == NULL) /* XXX can't happen */
++ continue;
++ baseName = strrchr(fileNames[i], '/') + 1;
++ len = baseName - fileNames[i];
++ needle = dirNames;
++ savechar = *baseName;
++ *baseName = '\0';
++/*@-compdef@*/
++ if (dirIndex < 0 ||
++ (needle = bsearch(&fileNames[i], dirNames, dirIndex + 1, sizeof(dirNames[0]), dncmp)) == NULL) {
++ char *s = alloca(len + 1);
++ memcpy(s, fileNames[i], len + 1);
++ s[len] = '\0';
++ dirIndexes[i] = ++dirIndex;
++ dirNames[dirIndex] = s;
++ } else
++ dirIndexes[i] = needle - dirNames;
++/*@=compdef@*/
++
++ *baseName = savechar;
++ baseNames[i] = baseName;
++ }
++ /*@=branchstate@*/
++
++exit:
++ if (count > 0) {
++ xx = hae(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, dirIndexes, count);
++ xx = hae(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
++ baseNames, count);
++ xx = hae(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
++ dirNames, dirIndex + 1);
++ }
++
++ fileNames = hfd(fileNames, fnt);
++
++ xx = hre(h, RPMTAG_OLDFILENAMES);
++}
++/*@=bounds@*/
++
++/* rpm v3 compatibility */
++static void rpm3to4(Header h) {
++ char * rpmversion;
++ int_32 rpmversion_type;
++
++ (void) headerGetEntry(h, RPMTAG_RPMVERSION, NULL, (void **) &rpmversion, &rpmversion_type);
++
++ if ((!rpmversion) || rpmversion[0] < '4') {
++ int *epoch;
++ const char * name, *version, *release;
++ const char *pEVR;
++ char *p;
++ int_32 pFlags = RPMSENSE_EQUAL;
++
++ if (headerNVR(h, &name, &version, &release) == 0) {
++ pEVR = p = alloca(21 + strlen(version) + 1 + strlen(release) + 1);
++ *p = '\0';
++ if (headerGetEntry(h, RPMTAG_EPOCH, NULL, (void **) &epoch, NULL)) {
++ sprintf(p, "%d:", *epoch);
++ while (*p != '\0')
++ p++;
++ }
++ (void) stpcpy( stpcpy( stpcpy(p, version) , "-") , release);
++
++ headerAddOrAppendEntry(h, RPMTAG_PROVIDENAME, RPM_STRING_ARRAY_TYPE, &name, 1);
++ headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE, &pFlags, 1);
++ headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE, &pEVR, 1);
++ }
++ compressFilelist(h);
++ }
++ headerFreeTag(h, (void *) rpmversion, rpmversion_type);
++ return;
++}
++
+ void headerMergeLegacySigs(Header h, const Header sigh)
+ {
+ HFD_t hfd = (HFD_t) headerFreeData;
+@@ -1062,6 +1205,8 @@
+ /* Append (and remap) signature tags to the metadata. */
+ headerMergeLegacySigs(h, sigh);
+
++ rpm3to4(h);
++
+ /* Bump reference count for return. */
+ /*@-boundswrite@*/
+ *hdrp = headerLink(h);
--- /dev/null
+--- rpm-4.1/lib/rpminstall.c.wiget Mon Sep 16 21:06:08 2002
++++ rpm-4.1/lib/rpminstall.c Thu Sep 19 00:03:36 2002
+@@ -126,8 +126,15 @@
+ xx = Fclose(fd);
+ fd = NULL;
+ }
+- } else
++ } else {
++ long oldfl;
+ fd = fdLink(fd, "persist (showProgress)");
++ oldfl=Fcntl(fd, F_GETFD, 0);
++ if(oldfl >= 0) {
++ oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
++ Fcntl(fd, F_SETFD, (void*)oldfl);
++ }
++ }
+ /*@=type@*/
+ return fd;
+ /*@notreached@*/ break;
--- /dev/null
+--- rpm-4.4.9/lib/transaction.c~ 2009-03-03 20:03:31.000000000 +0200
++++ rpm-4.4.9/lib/transaction.c 2009-03-03 20:15:17.337085230 +0200
+@@ -1775,6 +1775,9 @@
+ /*@innerbreak@*/ break;
+ }
+ if (rpmteFd(p) != NULL) gotfd = 1;
++ } else {
++ ourrc++;
++ xx = markLinkedFailed(ts, p);
+ }
+ }
+ /*@=type@*/
--- /dev/null
+--- rpm-4.5/rpmdb/header.c~ 2009-05-13 18:25:56.000000000 +0300
++++ rpm-4.5/rpmdb/header.c 2009-05-13 18:26:01.729564093 +0300
+@@ -2977,7 +2977,6 @@
+ static char * shescapeFormat(HE_t he, /*@null@*/ const char ** av)
+ /*@*/
+ {
+- rpmTagData data = { .ptr = he->p.ptr };
+ char * val;
+ size_t nb;
+
+@@ -2985,34 +2984,37 @@
+ if (he->t == RPM_INT32_TYPE) {
+ nb = 20;
+ val = xmalloc(nb);
+- snprintf(val, nb, "%d", data.i32p[0]);
++ snprintf(val, nb, "%d", he->p.i32p[0]);
+ val[nb-1] = '\0';
+ } else if (he->t == RPM_INT64_TYPE) {
+ nb = 40;
+ val = xmalloc(40);
+- snprintf(val, nb, "%lld", data.i64p[0]);
++ snprintf(val, nb, "%lld", he->p.i64p[0]);
+ val[nb-1] = '\0';
+ } else if (he->t == RPM_STRING_TYPE) {
+- const char * s = data.str;
++ const char * s = he->p.str;
+ char * t;
+ int c;
+
+- nb = strlen(data.str) + 1;
+- /* XXX count no. of escapes instead. */
+- t = xmalloc(4 * nb + 3);
++ nb = 0;
++ for (s = he->p.str; (c = (int)*s) != 0; s++) {
++ nb++;
++ if (c == (int)'\'')
++ nb += 3;
++ }
++ nb += 3;
++ t = val = xmalloc(nb);
+ *t++ = '\'';
+- while ((c = *s++) != 0) {
+- if (c == '\'') {
++ for (s = he->p.str; (c = (int)*s) != 0; s++) {
++ if (c == (int)'\'') {
+ *t++ = '\'';
+ *t++ = '\\';
+ *t++ = '\'';
+ }
+- *t++ = c;
++ *t++ = (char) c;
+ }
+ *t++ = '\'';
+ *t = '\0';
+- nb = strlen(t) + 1;
+- val = xrealloc(t, nb);
+ } else
+ val = xstrdup(_("invalid type"));
+
--- /dev/null
+ - jbj: reserve ~1K in RPMSIGTAG_PADDING for now.
+ - jbj: add RPMSIGTAG_PADDING to force metadata header alignment in file.
+--- rpm-4.5/build/pack.c 2007-12-17 00:28:09.000000000 +0200
++++ rpm-4.5-sigpad/build/pack.c 2009-06-08 12:29:50.225343621 +0300
+@@ -702,6 +702,22 @@
+ goto exit;
+ }
+
++ /* Pad the signature header to put the metadata header at known offset. */
++ { size_t slen = headerSizeof(sig, HEADER_MAGIC_YES);
++ void * uh = headerUnload(sig);
++ static const size_t align = 1024;
++ size_t nb = align - 96 - 16 - 8;
++ unsigned char * b;
++
++ uh = _free(uh);
++assert(slen < nb);
++ nb -= slen;
++ b = memset(alloca(nb), 0, nb);
++ (void) headerAddEntry(sig, RPMSIGTAG_PADDING, RPM_BIN_TYPE, b, nb);
++ sig = headerReload(sig, RPMTAG_HEADERSIGNATURES);
++assert(sig != NULL);
++ }
++
+ /* Open the output file */
+ fd = Fopen(fileName, "w");
+ if (fd == NULL || Ferror(fd)) {
+--- rpm-4.5/lib/rpmlib.h 2008-06-10 02:19:16.000000000 +0300
++++ rpm-4.5-sigpad/lib/rpmlib.h 2009-06-08 12:29:50.225343621 +0300
+@@ -1058,7 +1058,8 @@
+ RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2, /*!< internal Broken SHA1, take 2. */
+ RPMSIGTAG_SHA1 = RPMTAG_SHA1HEADER, /*!< internal sha1 header digest. */
+ RPMSIGTAG_DSA = RPMTAG_DSAHEADER, /*!< internal DSA header signature. */
+- RPMSIGTAG_RSA = RPMTAG_RSAHEADER /*!< internal RSA header signature. */
++ RPMSIGTAG_RSA = RPMTAG_RSAHEADER, /*!< internal RSA header signature. */
++ RPMSIGTAG_PADDING = 0x3fffffff /*!< signature header padding */
+ };
+
+ /** \ingroup signature
--- /dev/null
+--- rpm-4.4.8/configure.ac.orig 2007-04-08 16:26:29.303992000 +0200
++++ rpm-4.4.8/configure.ac 2007-04-08 16:35:11.461748504 +0200
+@@ -662,7 +662,7 @@
+
+ dnl ------------------ with internal db
+ AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
+-WITH_DB_SUBDIR=db3
++WITH_DB_SUBDIR=
+ WITH_INTERNAL_DB=1
+ DBLIBSRCS="db3.c"
+
+--- rpm-4.5/configure.ac~ 2008-04-13 03:20:07.000000000 +0300
++++ rpm-4.5/configure.ac 2008-04-13 03:23:45.011443406 +0300
+@@ -1203,7 +1215,7 @@
+ dnl # XXX Propagate -lucb to popt ...
+ dnl export LIBS INCPATH CONFIG_SITE
+
+-AC_CONFIG_SUBDIRS(file db3)
++AC_CONFIG_SUBDIRS(file)
+
+ AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
+ scripts/perl.req scripts/perl.prov
+--- rpm-4.5/rpmdb/Makefile.am~ 2008-04-13 03:28:19.000000000 +0300
++++ rpm-4.5/rpmdb/Makefile.am 2008-04-13 13:49:10.122086563 +0300
+@@ -25,25 +25,18 @@
+ tjfn_LDADD = librpmdb.la
+
+ pkgincdir = $(pkgincludedir)
+-pkginc_HEADERS = db.h header.h hdrinline.h rpmdb.h
++pkginc_HEADERS = header.h hdrinline.h rpmdb.h
+ noinst_HEADERS = fprint.h header_internal.h legacy.h
+
+ pkglibdir = @USRLIBRPM@
+ versionlibdir = $(pkglibdir)/@VERSION@
+-versionlib_PROGRAMS = \
+- db_archive db_checkpoint db_deadlock db_dump \
+- db_hotbackup db_load db_printlog db_recover \
+- db_stat db_upgrade db_verify
+-if WITH_DB_RPC
+-versionlib_PROGRAMS += db_svc
+-endif
+
+ mylibs = librpmdb.la
+
+ LIBS =
+
+ # XXX watchout, ../db3/libdb.la created by this Makefile may surprise
+-libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la
++libdb_la =
+
+ # XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
+ LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
--- /dev/null
+--- rpm-4.5/configure.ac~ 2008-04-13 03:20:07.000000000 +0300
++++ rpm-4.5/configure.ac 2008-04-13 03:23:45.011443406 +0300
+@@ -1203,7 +1215,7 @@
+ dnl # XXX Propagate -lucb to popt ...
+ dnl export LIBS INCPATH CONFIG_SITE
+
+-AC_CONFIG_SUBDIRS(popt zlib file sqlite db3)
++AC_CONFIG_SUBDIRS(file db3)
+
+ AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
+ scripts/perl.req scripts/perl.prov
+@@ -1534,7 +1534,6 @@
+ lua/Makefile
+ ])
+ AC_CONFIG_COMMANDS([default],[[
+- [ -d popt ] && echo timestamp > popt/stamp-h.in
+ echo timestamp > stamp-h.in
+ [ -d perl ] && cd perl && perl Makefile.PL INSTALLDIRS=vendor
+
+--- rpm-4.5/Makefile.am~ 2008-04-13 03:20:07.000000000 +0300
++++ rpm-4.5/Makefile.am 2008-04-13 03:24:33.962259478 +0300
+@@ -72,7 +72,6 @@
+ -load lib/rpmlib.lcd \
+ -load rpmdb/rpmdb.lcd \
+ -load rpmio/rpmio.lcd \
+- -load popt/popt.lcd \
+ $(DEFS) $(INCLUDES) rpmqv.c $(rpmbuild_SOURCES)
+
+ .PHONY: lint
+--- rpm.org/rpmio/Makefile.am.org 2004-11-18 17:42:53.756263795 +0100
++++ rpm.org/rpmio/Makefile.am 2004-11-18 17:43:09.526885309 +0100
+@@ -82,39 +82,39 @@
+
+ tdir_SOURCES = tdir.c
+ tdir_LDFLAGS = @LDFLAGS_STATIC@
+-tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tdir_LDADD = librpmio.la -lpopt
+
+ tfts_SOURCES = tfts.c
+ tfts_LDFLAGS = @LDFLAGS_STATIC@
+-tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tfts_LDADD = librpmio.la -lpopt
+
+ tget_SOURCES = tget.c
+ tget_LDFLAGS = @LDFLAGS_STATIC@
+-tget_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tget_LDADD = librpmio.la -lpopt
+
+ thkp_SOURCES = thkp.c
+ thkp_LDFLAGS = @LDFLAGS_STATIC@
+-thkp_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++thkp_LDADD = librpmio.la -lpopt
+
+ tput_SOURCES = tput.c
+ tput_LDFLAGS = @LDFLAGS_STATIC@
+-tput_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tput_LDADD = librpmio.la -lpopt
+
+
+ tglob_SOURCES = tglob.c
+ tglob_LDFLAGS = @LDFLAGS_STATIC@
+-tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tglob_LDADD = librpmio.la -lpopt
+
+ tinv_SOURCES = tinv.c
+ tinv_LDFLAGS = @LDFLAGS_STATIC@
+-tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tinv_LDADD = librpmio.la -lpopt
+
+ tkey_SOURCES = tkey.c
+ tkey_LDFLAGS = @LDFLAGS_STATIC@
+-tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++tkey_LDADD = librpmio.la -lpopt
+
+ trpmio_SOURCES = trpmio.c
+-trpmio_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
++trpmio_LDADD = librpmio.la -lpopt
+
+ tsw_SOURCES = tsw.c
+ tsw_LDFLAGS = librpmio.la
+
--- /dev/null
+--- rpm-4.5/rpmio/macro.c~ 2008-06-10 02:08:37.000000000 +0300
++++ rpm-4.5/rpmio/macro.c 2008-06-10 02:08:59.476044991 +0300
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <strings.h>
+ #include <ctype.h>
+ #define rpmError fprintf
+ #define rpmIsVerbose() (0)
+@@ -2106,6 +2107,7 @@ int isCompressed(const char * file, rpmC
+ ssize_t nb;
+ int rc = -1;
+ unsigned char magic[13];
++ char *end, *ext;
+
+ *compressed = COMPRESSED_NOT;
+
+@@ -2131,6 +2133,11 @@ int isCompressed(const char * file, rpmC
+
+ rc = 0;
+
++ /* Tar archives will be recognized by filename. */
++ end = strchr(file, '\0');
++ ext = end - 4;
++ if (ext > file && !strcasecmp(ext, ".tar")) return rc;
++
+ if (magic[0] == 'B' && magic[1] == 'Z')
+ *compressed = COMPRESSED_BZIP2;
+ else
--- /dev/null
+# vim:ts=8:sw=4
+--- rpm-4.4.6/build/parseChangelog.c~ 2006-04-30 17:34:40.334393487 +0300
++++ rpm-4.4.6/build/parseChangelog.c 2006-05-02 19:46:06.357193264 +0300
+@@ -8,6 +8,9 @@
+ #include "rpmbuild.h"
+ #include "debug.h"
+
++#define CVS_RCSID "$""Log: "
++#define CVS_REVISION "Revision "
++
+ void addChangelogEntry(Header h, time_t time, const char *name, const char *text)
+ {
+ int_32 mytime = time; /* XXX convert to header representation */
+@@ -123,6 +123,7 @@
+ int nentries = 0;
+ static time_t last = 0;
+ static int oneshot = 0;
++ int numchangelog = rpmExpandNumeric("%{?_buildchangelogtruncate}");
+
+ /* Determine changelog truncation criteria. */
+ if (!oneshot++) {
+@@ -222,6 +223,42 @@
+ /* backup to end of description */
+ while ((s > text) && xisspace(*s))
+ *s-- = '\0';
++
++ if (numchangelog && (s = strstr(text, CVS_RCSID))) {
++ /* find end of line */
++ while(*s && *s != '\n') s++;
++ if (!*s) {
++ goto out;
++ }
++ s++;
++ if (!*s) {
++ goto out;
++ }
++
++ /* we reached place where first Revisions should be */
++ i = 0;
++ while (1) {
++ if (strncmp(s, CVS_REVISION, sizeof(CVS_REVISION) - 1) == 0) {
++ if (i++ == numchangelog) {
++ break;
++ }
++ }
++ while(*s && *s != '\n') s++;
++ if (!*s) {
++ break;
++ }
++ s++;
++ }
++
++ if (*s) {
++ s--;
++ /* backup to the beginning of line */
++ while ((s > text) && (*s == '\n' || xisspace(*s))) {
++ *s-- = '\0';
++ }
++ }
++ }
++out:
+
+ /* Add entry if not truncated. */
+ nentries++;
--- /dev/null
+--- rpm-4.5/rpmio/macro.c.org 2009-08-08 15:42:25.574860247 +0200
++++ rpm-4.5/rpmio/macro.c 2009-08-08 15:47:20.495455961 +0200
+@@ -807,6 +807,41 @@
+ return se;
+ }
+
++/**
++ * Parse (and execute) macro undefinition.
++ * @param mc macro context
++ * @param se macro name to undefine
++ * @return address to continue parsing
++ */
++/*@dependent@*/ static const char *
++doUnglobal(MacroContext mc, /*@returned@*/ const char * se)
++ /*@globals rpmGlobalMacroContext @*/
++ /*@modifies mc, rpmGlobalMacroContext @*/
++{
++ const char *s = se;
++ char *buf = alloca(_macro_BUFSIZ);
++ char *n = buf, *ne = n;
++ int c;
++
++ COPYNAME(ne, s, c);
++
++ /* Move scan over body */
++ while (iseol(*s))
++ s++;
++ se = s;
++
++ /* Names must start with alphabetic or _ and be at least 3 chars */
++ if (!((c = *n) && (xisalpha(c) || c == '_') && (ne - n) > 2)) {
++ rpmError(RPMERR_BADSPEC,
++ _("Macro %%%s has illegal name (%%unglobal)\n"), n);
++ return se;
++ }
++
++ delMacroAll(mc, n);
++
++ return se;
++}
++
+ #ifdef DYING
+ static void
+ dumpME(const char * msg, MacroEntry me)
+@@ -1430,6 +1465,10 @@
+ s = doUndefine(mb->mc, se);
+ continue;
+ }
++ if (STREQ("unglobal", f, fn)) {
++ s = doUnglobal(mb->mc, se);
++ continue;
++ }
+
+ if (STREQ("echo", f, fn) ||
+ STREQ("warn", f, fn) ||
+@@ -1984,6 +2023,18 @@
+ }
+ }
+
++void
++delMacroAll(MacroContext mc, const char * n)
++{
++ MacroEntry * mep;
++
++ if (mc == NULL) mc = rpmGlobalMacroContext;
++ /* If name exists, pop entry */
++ while ((mep = findEntry(mc, n, 0)) != NULL) {
++ delMacro(mc, n);
++ }
++}
++
+ /*@-mustmod@*/ /* LCL: mc is modified through mb->mc, mb is abstract */
+ int
+ rpmDefineMacro(MacroContext mc, const char * macro, int level)
--- /dev/null
+#!/bin/sh
+
+[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
+[ -z "$RPM_SCRIPTVERBOSITY" ] && RPM_SCRIPTVERBOSITY=5
+
+# aborts program abnormally
+die() {
+ local rc=${2:-1}
+ if [ "$1" ]; then
+ echo >&2 "ERROR: $1"
+ else
+ echo >&2 "ERROR"
+ fi
+ exit $rc
+}
+
+bannercmd() {
+ if [ "$BANNERCMD" = cat ]; then
+ echo cat
+ else
+ if [ "$RPM_SCRIPTVERBOSITY" -lt 2 ]; then
+ echo "$BANNERCMD -M $1"
+ else
+ echo "$BANNERCMD -s -M $1"
+ fi
+ fi
+}
+
+testrm() {
+ local mode=$1
+ local name=$2
+
+ [ "$RPM_USERDEL" != yes ] || [ ! -x /bin/rpm ] && return 1
+ [ -z "$name" ] && return 2
+ rpm -q --whatprovides "$mode($name)" >/dev/null 2>&1
+ # no package Provides it (strange)
+ [ $? -ne 0 ] && return 0
+ # only current package Provides it
+ [ $(rpm -q --whatprovides "$mode($name)" | wc -l) -lt 2 ] && return 0
+ return 1
+}
+
+groupremove() {
+ local name="$1"
+ local gid=$(getgid "$name" 2>/dev/null)
+
+ echo "Removing group $name" | $(bannercmd "groupdel-$name")
+ /usr/sbin/groupdel $name || :
+
+ # flush nscd cache
+ [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group
+}
+
+userremove() {
+ local uid=$(id -un "$name" 2>/dev/null)
+
+ echo "Removing user $name" | $(bannercmd "userdel-$name")
+ /usr/sbin/userdel $name || :
+
+ # flush nscd cache
+ [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd
+}
+
+remove() {
+ local mode=$1
+ local name=$2
+ if ! testrm $mode $name; then
+ return
+ fi
+
+ ${mode}remove $name
+}
+
+addtogroup() {
+ local user="$1"
+ local group="$2"
+ local uid=$(id -un "$user" 2>/dev/null)
+ local gid=$(getgid "$group" 2>/dev/null)
+
+ if [ -z "$gid" ]; then
+ if [ "$quiet" ]; then
+ return
+ else
+ die "group $group does not exist"
+ fi
+ fi
+
+ if [ -z "$uid" ]; then
+ if [ "$quiet" ]; then
+ return
+ else
+ die "user $user does not exist"
+ fi
+ fi
+
+ groups=$(id -n -G $user)
+ if [[ " $groups " != *\ $group\ * ]]; then
+ echo "Adding user $user to group $group" | $(bannercmd "${MODE}mod-$user")
+ for grp in $groups $group; do
+ new="$new${new:+,}$grp"
+ done
+ usermod -G "$new" $user
+ fi
+}
+
+if [ -x /usr/bin/banner.sh ]; then
+ BANNERCMD="/usr/bin/banner.sh "
+ BANNERPARA="-s -M user-group.error"
+else
+ BANNERCMD="cat"
+ BANNERPARA=""
+fi
+
+if [ "$1" = user -o "$1" = group ]; then
+ MODE=$1
+ shift
+else
+ die "Invalid usage"
+fi
+
+# quiet mode cames from $ENV
+quiet=$quiet
+
+case "$1" in
+testrm)
+ testrm $MODE $2
+ exit $?
+ ;;
+
+del)
+ remove $MODE $2
+ exit $?
+ ;;
+
+addtogroup)
+ if [ "$MODE" = "user" ]; then
+ if [ -z "$2" -o -z "$3" ]; then
+ die "Invalid usage"
+ fi
+ addtogroup $2 $3
+ fi
+ ;;
+*)
+ die "Invalid usage" 2
+esac
--- /dev/null
+--- a/lib/rpmds.c 10 Jun 2007 17:12:25 -0000 2.55.2.4
++++ b/lib/rpmds.c 6 Oct 2007 01:09:19 -0000
+@@ -253,6 +255,7 @@
+ const char ** N;
+ rpmTagType Nt;
+ int_32 Count;
++int rpmv3 = headerIsEntry(h, RPMTAG_OLDFILENAMES);
+
+ assert(scareMem == 0); /* XXX always allocate memory */
+ if (tagN == RPMTAG_PROVIDENAME) {
+@@ -280,12 +283,12 @@
+ tagEVR = RPMTAG_TRIGGERVERSION;
+ tagF = RPMTAG_TRIGGERFLAGS;
+ } else
+- if (tagN == RPMTAG_DIRNAMES) {
++ if (!rpmv3 && tagN == RPMTAG_DIRNAMES) {
+ Type = "Dirnames";
+ tagEVR = 0;
+ tagF = 0;
+ } else
+- if (tagN == RPMTAG_FILELINKTOS) {
++ if (!rpmv3 && tagN == RPMTAG_FILELINKTOS) {
+ Type = "Filelinktos";
+ tagEVR = RPMTAG_DIRNAMES;
+ tagF = RPMTAG_DIRINDEXES;
--- /dev/null
+Applications
+ [cs]: Aplikace
+ [da]: Programmer
+ [de]: Applikationen
+ [es]: Aplicaciones
+ [fr]: Applications
+ [id]: Aplikasi
+ [is]: Forrit
+ [it]: Applicazioni
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó
+ [nb]: Applikasjoner
+ [pl]: Aplikacje
+ [pt]: Aplicações
+ [pt_BR]: Aplicações
+ [ru]: ðÒÉÌÏÖÅÎÉÑ
+ [sl]: Programi
+ [sv]: Tillämpningar
+ [uk]: Прикладні Програми
+
+Applications/Archiving
+ [cs]: Aplikace/Archivování
+ [da]: Programmer/Arkivering
+ [de]: Applikationen/Archivierung
+ [es]: Aplicaciones/Archivar
+ [fr]: Applications/Archivage
+ [is]: Forrit/Þjöppun
+ [it]: Applicazioni/Archiviazione
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¢¡¼¥«¥¤¥Ö
+ [nb]: Applikasjoner/Arkivering
+ [pl]: Aplikacje/Archiwizacja
+ [pt]: Aplicações/Arquivos
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/áÒÈÉ×ÁÃÉÑ
+ [sl]: Programi/Arhiviranje
+ [sv]: Tillämpningar/Arkivering
+ [uk]: Прикладні Програми/Архівація
+
+Applications/Communications
+ [cs]: Aplikace/Komunikace
+ [da]: Programmer/Kommunikation
+ [de]: Applikationen/Kommunikation
+ [es]: Aplicaciones/Comunicaciones
+ [fr]: Applications/Transmissions
+ [is]: Forrit/Samskipti
+ [it]: Applicazioni/Comunicazioni
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/ÄÌ¿®
+ [nb]: Applikasjoner/Kommunikasjon
+ [pl]: Aplikacje/Komunikacja
+ [pt]: Aplicações/Comunicações
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ëÏÍÍÕÎÉËÁÃÉÉ
+ [sl]: Programi/Komunikacije
+ [sv]: Tillämpningar/Kommunikation
+ [uk]: Прикладні Програми/Комунікації
+
+Applications/Console
+ [cs]: Aplikace/Konzole
+ [da]: Programmer/Konsol
+ [de]: Applikationen/Konsole
+ [es]: Aplicaciones/Consola
+ [fr]: Applications/Console
+ [is]: Forrit/Stjórnskjá
+ [it]: Applicazioni/Console
+ [nb]: Applikasjoner/Konsollet
+ [pl]: Aplikacje/Konsola
+ [pt]: Aplicações/Console
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ëÏÎÓÏÌØ
+ [sv]: Tillämpningar/Konsolen
+ [uk]: Прикладні Програми/Консоль
+
+Applications/Databases
+ [cs]: Aplikace/Databáze
+ [da]: Programmer/Databaser
+ [de]: Applikationen/Datenbanken
+ [es]: Aplicaciones/Bases de Datos
+ [fr]: Applications/Bases de Données
+ [id]: Aplikasi/Database
+ [is]: Forrit/Gagnagrunnar
+ [it]: Applicazioni/Database
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ç¡¼¥¿¥Ù¡¼¥¹
+ [nb]: Applikasjoner/Databaser
+ [pl]: Aplikacje/Bazy Danych
+ [pt]: Aplicações/Bases de Dados
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/âÁÚÙ ÄÁÎÎÙÈ
+ [sl]: Programi/Zbirke podatkov
+ [sv]: Tillämpningar/Databaser
+ [uk]: Прикладні Програми/Бази даних
+
+Applications/Databases/Interfaces
+ [cs]: Aplikace/Databáze/Rozhraní
+ [da]: Programmer/Databaser/Grænsefladen
+ [de]: Applikationen/Datenbanken/Schnittstellen
+ [es]: Aplicaciones/Bases de Datos/Interfaces
+ [fr]: Applications/Bases de données/Interfaces
+ [is]: Forrit/Gagnagrunnar/Viðmót
+ [it]: Applicazioni/Database/Interfacce
+ [nb]: Applikasjoner/Databaser/Grensesnitt
+ [pl]: Aplikacje/Bazy Danych/Interfejsy
+ [pt]: Aplicações/Bases de Dados/Interfaces
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/âÁÚÙ ÄÁÎÎÙÈ/éÎÔÅÒÆÅÊÓÙ
+ [sl]: Programi/Zbirke podatkov/Vmesniki
+ [sv]: Tillämpningar/Databaser/Gränssnitten
+ [uk]: Прикладні Програми/Бази даних/Інтерфейсі
+
+Applications/Dictionaries
+ [cs]: Aplikace/Slovníky
+ [da]: Programmer/Ordbøger
+ [de]: Applikationen/Wörterbücher
+ [es]: Aplicaciones/Diccionarios
+ [fr]: Applications/Dictionaires
+ [is]: Forrit/Orðabókum
+ [it]: Applicazioni/Dizionari
+ [nb]: Applikasjoner/Ordbøker
+ [pl]: Aplikacje/S³owniki
+ [pt]: Aplicações/Dicionários
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/óÌÏ×ÁÒÉ
+ [sl]: Programi/Slovarji
+ [sv]: Tillämpningar/Ordlistor
+ [uk]: Прикладні Програми/Словники
+
+Applications/Editors
+ [cs]: Aplikace/Editory
+ [da]: Programmer/Tekstbehandlere
+ [de]: Applikationen/Editoren
+ [es]: Aplicaciones/Editores
+ [fr]: Applications/Editeurs
+ [is]: Forrit/Ritlar
+ [it]: Applicazioni/Editor
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥Ç¥£¥¿
+ [nb]: Applikasjoner/Editorer
+ [pl]: Aplikacje/Edytory
+ [pt]: Aplicações/Editores
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/òÅÄÁËÔÏÒÙ
+ [sl]: Programi/Urejevalniki
+ [sv]: Tillämpningar/Editorer
+ [uk]: Прикладні Програми/Редактори
+
+Applications/Editors/Emacs
+ [cs]: Aplikace/Editory/Emacs
+ [da]: Programmer/Tekstbehandlere/Emacs
+ [de]: Applikationen/Editoren/Emacs
+ [es]: Aplicaciones/Editores/Emacs
+ [fr]: Applications/Editeurs/Emacs
+ [is]: Forrit/Ritlar/Emacs
+ [it]: Applicazioni/Editor/Emacs
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥Ç¥£¥¿/Emacs
+ [nb]: Applikasjoner/Editorer/Emacs
+ [pl]: Aplikacje/Edytory/Emacs
+ [pt]: Aplicações/Editores/Emacs
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/òÅÄÁËÔÏÒÙ/Emacs
+ [sl]: Programi/Urejevalniki/Emacs
+ [sv]: Tillämpningar/Editorer/Emacs
+ [uk]: Прикладні Програми/Редактори/Emacs
+
+Applications/Editors/Vim
+ [cs]: Aplikace/Editory/Vim
+ [da]: Programmer/Tekstbehandlere/Vim
+ [de]: Applikationen/Editoren/Vim
+ [es]: Aplicaciones/Editores/Vim
+ [fr]: Applications/Editeurs/Vim
+ [is]: Forrit/Ritlar/Vim
+ [it]: Applicazioni/Editor/Vim
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥Ç¥£¥¿/Vim
+ [nb]: Applikasjoner/Editorer/Vim
+ [pl]: Aplikacje/Edytory/Vim
+ [pt]: Aplicações/Editores/Vim
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/òÅÄÁËÔÏÒÙ/Vim
+ [sl]: Programi/Urejevalniki/Vim
+ [sv]: Tillämpningar/Editorer/Vim
+ [uk]: Прикладні Програми/Редактори/Vim
+
+Applications/Editors/XEmacs
+ [cs]: Aplikace/Editory/XEmacs
+ [da]: Programmer/Tekstbehandlere/XEmacs
+ [de]: Applikationen/Editoren/XEmacs
+ [es]: Aplicaciones/Editores/XEmacs
+ [fr]: Applications/Editeurs/XEmacs
+ [is]: Forrit/Ritlar/XEmacs
+ [it]: Applicazioni/Editor/XEmacs
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥Ç¥£¥¿/XEmacs
+ [nb]: Applikasjoner/Editorer/XEmacs
+ [pl]: Aplikacje/Edytory/XEmacs
+ [pt]: Aplicações/Editores/XEmacs
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/òÅÄÁËÔÏÒÙ/XEmacs
+ [sl]: Programi/Urejevalniki/XEmacs
+ [sv]: Tillämpningar/Editorer/XEmacs
+ [uk]: Прикладні Програми/Редактори/XEmacs
+
+Applications/Emulators
+ [da]: Programmer/Emulatorer
+ [de]: Applikationen/Emulatoren
+ [es]: Aplicaciones/Emuladores
+ [fr]: Applications/Émulateurs
+ [is]: Forrit/Hermar
+ [it]: Applicazioni/Emulatori
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥ß¥å¥ì¡¼¥¿
+ [nb]: Applikasjoner/Emulatorer
+ [pl]: Aplikacje/Emulatory
+ [pt]: Aplicações/Emuladores
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/üÍÕÌÑÔÏÒÙ
+ [sl]: Programi/Emulatorji
+ [sv]: Tillämpningar/Emulatorer
+ [uk]: Прикладні Програми/Емулятори
+
+Applications/Engineering
+ [cs]: Aplikace/In¾enýrské
+ [da]: Programmer/Ingeniørarbejde
+ [de]: Applikationen/Technik
+ [es]: Aplicaciones/Ingeniería
+ [fr]: Applications/Ingénierie
+ [is]: Forrit/Verkfræði
+ [it]: Applicazioni/Engineering
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥ó¥¸¥Ë¥¢¥ê¥ó¥°
+ [nb]: Applikasjoner/Teknisk
+ [pl]: Aplikacje/In¿ynierskie
+ [pt]: Aplicações/Engenharia
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/éÎÖÅÎÅÒÎÙÅ ÐÒÉÌÏÖÅÎÉÑ
+ [sl]: Programi/In¾enirstvo
+ [sv]: Tillämpningar/Konstruktion
+
+Applications/File
+ [cs]: Aplikace/Práce se soubory
+ [da]: Programmer/Filer
+ [de]: Applikationen/Datei
+ [es]: Aplicaciones/Archivos
+ [fr]: Applications/Fichiers
+ [is]: Forrit/Skráatól
+ [it]: Applicazioni/File
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Õ¥¡¥¤¥ë
+ [nb]: Applikasjoner/Fil
+ [pl]: Aplikacje/Pliki
+ [pt]: Aplicações/Ficheiros
+ [pt_BR]: Aplicações/Arquivos
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/æÁÊÌÏ×ÙÅ ÕÔÉÌÉÔÙ
+ [sl]: Programi/Datoteke
+ [sv]: Tillämpningar/Fil
+ [uk]: Прикладні Програми/Файлові утиліти
+
+Applications/Graphics
+ [cs]: Aplikace/Grafika
+ [da]: Programmer/Grafik
+ [de]: Applikationen/Graphiken
+ [es]: Aplicaciones/Gráficos
+ [fr]: Applications/Graphiques
+ [id]: Aplikasi/Grafik
+ [is]: Forrit/Myndvinnsla
+ [it]: Applicazioni/Immagini
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥°¥é¥Õ¥£¥Ã¥¯¥¹
+ [nb]: Applikasjoner/Grafikk
+ [pl]: Aplikacje/Grafika
+ [pt]: Aplicações/Gráficos
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/çÒÁÆÉËÁ
+ [sl]: Programi/Grafika
+ [sv]: Tillämpningar/Grafik
+ [uk]: Прикладні Програми/Графіка
+
+Applications/Games
+ [cs]: Aplikace/Hry
+ [da]: Programmer/Spil
+ [de]: Applikationen/Spiele
+ [es]: Aplicaciones/Juegos
+ [fr]: Applications/Jeux
+ [is]: Forrit/Leikir
+ [it]: Applicazioni/Giochi
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥²¡¼¥à
+ [nb]: Applikasjoner/Spill
+ [pl]: Aplikacje/Gry
+ [pt]: Aplicações/Jogos
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/éÇÒÙ
+ [sl]: Programi/Igre
+ [sv]: Tillämpningar/Spel
+ [uk]: Прикладні Програми/Ігри
+
+Applications/Games/Boards
+ [pl]: Aplikacje/Gry/Planszowe
+
+Applications/Mail
+ [cs]: Aplikace/Po¹ta
+ [da]: Programmer/Post
+ [de]: Applikationen/Post
+ [es]: Aplicaciones/Correo Electrónico
+ [fr]: Applications/Courrier
+ [is]: Forrit/Póst
+ [it]: Applicazioni/Posta
+ [nb]: Applikasjoner/Epost
+ [pl]: Aplikacje/Poczta
+ [pt]: Aplicações/Correio Eletrônico
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/üÌÅËÔÒÏÎÎÁÑ ÐÏÞÔÁ
+ [sl]: Programi/Po¹tna
+ [sv]: Tillämpningar/Post
+ [uk]: Прикладні Програми/Пошта
+
+Applications/Math
+ [cs]: Aplikace/Matematické
+ [da]: Programmer/Matematik
+ [de]: Applikationen/Mathematik
+ [es]: Aplicaciones/Matemáticas
+ [fr]: Applications/Mathématiques
+ [it]: Applicazioni/Matematiche
+ [nb]: Applikasjoner/Matematiske
+ [pl]: Aplikacje/Matematyczne
+ [pt]: Aplicações/Matemática
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/íÁÔÅÍÁÔÉÞÅÓËÉÅ
+ [sl]: Programi/Matematièni
+ [sv]: Tillämpningar/Matemataisk
+ [uk]: Прикладні Програми/Математика
+
+Applications/Multimedia
+ [cs]: Aplikace/Multimédia
+ [da]: Programmer/Multimedie
+ [de]: Applikationen/Multimedien
+ [es]: Aplicaciones/Multimedia
+ [fr]: Applications/Multimédia
+ [is]: Forrit/Margmiðlun
+ [it]: Applicazioni/Multimedia
+ [ja]: ¥ê¥±¡¼¥·¥ç¥ó/¥Þ¥ë¥Á¥á¥Ç¥£¥¢
+ [nb]: Programmer/Multimedia
+ [pl]: Aplikacje/Multimedia
+ [pt]: Aplicações/Multimédia
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/íÕÌØÔÉÍÅÄÉÁ
+ [sl]: Programi/Veèpredstavnost
+ [sv]: Tillämpningar/Multimedia
+ [uk]: Прикладні Програми/Мультимедіа
+
+Applications/Networking
+ [cs]: Aplikace/Sí»ové
+ [da]: Programmer/Netværks
+ [de]: Applikationen/Netzwerkwesen
+ [es]: Aplicaciones/Red
+ [fr]: Applications/Réseau
+ [is]: Forrit/Net
+ [it]: Applicazioni/Rete
+ [nb]: Applikasjoner/Nettverk
+ [pl]: Aplikacje/Sieciowe
+ [pt]: Aplicações/Rede
+ [pt_BR]: Aplicações/Rede
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/óÅÔØ
+ [sl]: Programi/Omre¾ni
+ [sv]: Tillämpningar/Nätverk
+ [uk]: Прикладні Програми/Мережа
+
+Applications/News
+ [cs]: Aplikace/News
+ [da]: Programmer/Nyheder
+ [de]: Applikationen/News
+ [es]: Aplicaciones/Noticias
+ [fr]: Applications/Nouvelles
+ [is]: Forrit/Fréttir
+ [it]: Applicazioni/News
+ [nb]: Applikasjoner/News
+ [pl]: Aplikacje/News
+ [pt]: Aplicações/News
+ [pt_BR]: Aplicações/News
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/îÏ×ÏÓÔÉ
+ [sl]: Programi/Novièarske
+ [sv]: Tillämpningar/Nyheter
+ [uk]: Прикладні Програми/Новини
+
+Applications/Printing
+ [cs]: Aplikace/Tisk
+ [da]: Programmer/Udskrift
+ [de]: Applikationen/Drucken
+ [es]: Aplicaciones/Impresión
+ [fr]: Applications/Impression
+ [is]: Forrit/Þróað
+ [it]: Applicazioni/Stampa
+ [nb]: Applikasjoner/Utskrift
+ [pl]: Aplikacje/Drukowanie
+ [pt]: Aplicações/Impressão
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ðÅÞÁÔØ
+ [sl]: Programi/Tiskanje
+ [sv]: Tillämpningar/Utskrift
+ [uk]: Прикладні Програми/Друк
+
+Applications/Publishing
+ [cs]: Aplikace/Publikování
+ [da]: Programmer/Udgivelse
+ [de]: Applikationen/Publizieren
+ [es]: Aplicaciones/Edición
+ [fr]: Applications/Edition
+ [is]: Forrit/Umbrot
+ [it]: Applicazioni/Publishing
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ñ¥Ö¥ê¥Ã¥·¥ó¥°
+ [nb]: Applikasjoner/Publisering
+ [pl]: Aplikacje/Publikowanie
+ [pt]: Aplicações/Publicação
+ [pt_BR]: Aplicações/Editoração
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ôÉÐÏÇÒÁÆÉÑ
+ [sl]: Programi/Zalo¾ni¹tvo
+ [sv]: Tillämpningar/Publicering
+ [uk]: Прикладні Програми/Типографія
+
+Applications/Publishing/SGML
+ [cs]: Aplikace/Publikování/SGML
+ [da]: Programmer/Udgivelse/SGML
+ [de]: Applikationen/Publizieren/SGML
+ [es]: Aplicaciones/Edición/SGML
+ [fr]: Applications/Edition/SGML
+ [is]: Forrit/Umbrot/SGML
+ [it]: Applicazioni/Publishing/SGML
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ñ¥Ö¥ê¥Ã¥·¥ó¥°/SGML
+ [nb]: Applikasjoner/Publisering/SGML
+ [pl]: Aplikacje/Publikowanie/SGML
+ [pt]: Aplicações/Publicação/SGML
+ [pt_BR]: Aplicações/Editoração/SGML
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/éÚÄÁÔÅÌØÓÔ×Ï/SGML
+ [sl]: Programi/Zalo¾ni¹tvo/SGML
+ [sv]: Tillämpningar/Publicering/SGML
+ [uk]: Прикладні Програми/Типографія/SGML
+
+Applications/Publishing/TeX
+ [cs]: Aplikace/Publikování/TeX
+ [da]: Programmer/Udgivelse/TeX
+ [de]: Applikationen/Publizieren/TeX
+ [es]: Aplicaciones/Edición/TeX
+ [fr]: Applications/Edition/TeX
+ [is]: Forrit/Umbrot/TeX
+ [it]: Applicazioni/Publishing/TeX
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ñ¥Ö¥ê¥Ã¥·¥ó¥°/TeX
+ [nb]: Applikasjoner/Publisering/TeX
+ [pl]: Aplikacje/Publikowanie/TeX
+ [pt]: Aplicações/Publicação/TeX
+ [pt_BR]: Aplicações/Editoração/TeX
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/éÚÄÁÔÅÌØÓÔ×Ï/TeX
+ [sl]: Programi/Zalo¾ni¹tvo/TeX
+ [sv]: Tillämpningar/Publicering/TeX
+ [uk]: Прикладні Програми/Типографія/TeX
+
+Applications/Publishing/XML
+ [cs]: Aplikace/Publikování/XML
+ [da]: Programmer/Udgivelse/XML
+ [de]: Applikationen/Publizieren/XML
+ [es]: Aplicaciones/Edición/XML
+ [fr]: Applications/Edition/XML
+ [is]: Forrit/Umbrot/XML
+ [it]: Applicazioni/Publishing/XML
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ñ¥Ö¥ê¥Ã¥·¥ó¥°/XML
+ [nb]: Applikasjoner/Publisering/XML
+ [pl]: Aplikacje/Publikowanie/XML
+ [pt]: Aplicações/Publicação/XML
+ [pt_BR]: Aplicações/Editoração/XML
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/éÚÄÁÔÅÌØÓÔ×Ï/XML
+ [sl]: Programi/Zalo¾ni¹tvo/XML
+ [sv]: Tillämpningar/Publicering/XML
+ [uk]: Прикладні Програми/Типографія/XML
+
+Applications/Publishing/XML/Java
+ [cs]: Aplikace/Publikování/XML/Java
+ [da]: Programmer/Udgivelse/XML/Java
+ [de]: Applikationen/Publizieren/XML/Java
+ [es]: Aplicaciones/Edición/XML/Java
+ [fr]: Applications/Edition/XML/Java
+ [is]: Forrit/Umbrot/XML/Java
+ [it]: Applicazioni/Publishing/XML/Java
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ñ¥Ö¥ê¥Ã¥·¥ó¥°/XML/Java
+ [nb]: Applikasjoner/Publisering/XML/Java
+ [pl]: Aplikacje/Publikowanie/XML/Java
+ [pt]: Aplicações/Publicação/XML/Java
+ [pt_BR]: Aplicações/Editoração/XML/Java
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/éÚÄÁÔÅÌØÓÔ×Ï/XML/Java
+ [sl]: Programi/Zalo¾ni¹tvo/XML/Java
+ [sv]: Tillämpningar/Publicering/XML/Java
+ [uk]: Прикладні Програми/Типографія/XML/Java
+
+Applications/Science
+ [cs]: Aplikace/Vìdecké
+ [de]: Applikationen/Wissenschaft
+ [es]: Aplicaciones/Ciencia
+ [fr]: Applications/Science
+ [it]: Applicazioni/Sciencia
+ [pl]: Aplikacje/Nauka
+ [pt]: Aplicações/Ciência
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/îÁÕËÁ
+ [sv]: Tillämpningar/Vetenskaplig
+ [uk]: Прикладні Програми/Наука
+
+Applications/Shells
+ [cs]: Aplikace/Shelly
+ [da]: Programmer/Skaller
+ [de]: Applikationen/Shells
+ [es]: Aplicaciones/Shells
+ [fr]: Applications/Shells
+ [is]: Forrit/Skeljar
+ [it]: Applicazioni/Shell
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥·¥§¥ë
+ [nb]: Applikasjoner/Skall
+ [pl]: Aplikacje/Pow³oki
+ [pt]: Aplicações/Shells
+ [pt_BR]: Aplicações/Shells
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ëÏÍÁÎÄÎÙÅ ÐÒÏÃÅÓÓÏÒÙ
+ [sl]: Programi/Ukazne lupine
+ [sv]: Tillämpningar/Skal
+ [uk]: Прикладні Програми/Командні процесори
+
+Applications/Sound
+ [cs]: Aplikace/Zvuk
+ [da]: Programmer/Lyd
+ [de]: Applikationen/Laut
+ [es]: Aplicaciones/Sonido
+ [fr]: Aplications/Son
+ [is]: Forrit/Hljóð
+ [it]: Applicazioni/Audio
+ [nb]: Applikasjoner/Lyd
+ [pl]: Aplikacje/D¼wiêk
+ [pt]: Aplicações/Som
+ [pt_BR]: Aplicações/Som
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ú×ÕË
+ [sl]: Programi/Zvok
+ [sv]: Tillämpningar/Ljud
+ [uk]: Прикладні Програми/Звук
+
+Applications/Spreadsheets
+ [cs]: Aplikace/Tabulkove procesorý
+ [da]: Programmer/Regneark
+ [de]: Applikationen/Arbeitsblätter
+ [es]: Aplicaciones/Hojas de Cálculo
+ [fr]: Applications/Tableurs
+ [is]: Forrit/Töflureikni
+ [it]: Applicazioni/Fogli di calcolo
+ [nb]: Applikasjoner/Regneark
+ [pl]: Aplikacje/Arkusze kalkulacyjne
+ [pt]: Aplicações/Folhas de Cálculo
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/üÌÅËÔÒÏÎÎÙÅ ÔÁÂÌÉÃÙ
+ [sl]: Programi/Preglednice
+ [sv]: Tillämpningar/Kalkylark
+ [uk]: Прикладні Програми/Електронна таблиця
+
+Applications/System
+ [cs]: Aplikace/Systém
+ [da]: Programmer/System
+ [de]: Applikationen/System
+ [es]: Aplicaciones/Sistema
+ [fr]: Applications/Système
+ [is]: Forrit/Kerfisforrit
+ [it]: Applicazioni/Sistema
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥·¥¹¥Æ¥à
+ [nb]: Applikasjoner/System
+ [pl]: Aplikacje/System
+ [pt]: Aplicações/Sistema
+ [pt_BR]: Aplicações/Sistema
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/óÉÓÔÅÍÁ
+ [sl]: Programi/Sistem
+ [sv]: Tillämpningar/System
+ [uk]: Прикладні Програми/Система
+
+Applications/Terminal
+ [cs]: Aplikace/Terminál
+ [da]: Programmer/Terminal
+ [de]: Applikationen/Terminal
+ [es]: Aplicaciones/Terminal
+ [fr]: Applications/Terminal
+ [is]: Forrit/Textaskilum
+ [it]: Applicazioni/Terminale
+ [nb]: Applikasjoner/Terminal
+ [pl]: Aplikacje/Terminal
+ [pt]: Aplicações/Terminal
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ôÅÒÍÉÎÁÌ
+ [sl]: Programi/Terminal
+ [sv]: Tillämpningar/Terminal
+ [uk]: Прикладні Програми/Термінали
+
+Applications/Text
+ [cs]: Aplikace/Text
+ [da]: Programmer/Tekst
+ [de]: Applikationen/Text
+ [es]: Aplicaciones/Texto
+ [fr]: Applications/Texte
+ [is]: Forrit/Texti
+ [it]: Applicazioni/Testo
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Æ¥¥¹¥È
+ [nb]: Applikasjoner/Tekst
+ [pl]: Aplikacje/Tekst
+ [pt]: Aplicações/Texto
+ [ru]: ðÒÉÌÏÖÅÎÉÑ/ôÅËÓÔÏ×ÙÅ ÕÔÉÌÉÔÙ
+ [sl]: Programi/Besedilo
+ [sv]: Tillämpningar/Text
+ [uk]: Прикладні Програми/Текстові утиліти
+
+Applications/WWW
+ [cs]: Aplikace/WWW
+ [da]: Programmer/WWW
+ [de]: Applikationen/WWW
+ [es]: Aplicaciones/WWW
+ [fr]: Applications/WWW
+ [is]: Forrit/WWW
+ [nb]: Applikasjoner/WWW
+ [pl]: Aplikacje/WWW
+ [pt]: Aplicações/WWW
+ [sl]: Programi/WWW
+ [sv]: Tillämpningar/WWW
+
+Base
+ [cs]: Základ
+ [da]: Basal
+ [de]: Grundsätzlich
+ [es]: Base
+ [fr]: Base
+ [is]: Grunnforrit
+ [it]: Base
+ [ja]: ¥Ù¡¼¥¹
+ [nb]: Basis
+ [pl]: Podstawowe
+ [pt]: Base
+ [pt_BR]: Base
+ [ru]: âÁÚÁ
+ [sl]: Osnova
+ [sv]: Bas
+ [uk]: База
+
+Base/Kernel
+ [cs]: Základ/Jádro
+ [da]: Basal/Kerne
+ [de]: Grundsätzlich/Kern
+ [es]: Base/Núcleo
+ [fr]: Base/Noyau
+ [is]: Grunnforrit/Kjarninn
+ [it]: Base/Kernel
+ [ja]: ¥Ù¡¼¥¹/¥«¡¼¥Í¥ë
+ [nb]: Basis/Kjerne
+ [pl]: Podstawowe/J±dro
+ [pt]: Base/Núcleo
+ [ru]: âÁÚÁ/ñÄÒÏ
+ [sl]: Osnova/Jedro
+ [sv]: Bas/Kärna
+ [uk]: База/Ядро
+
+Base/Authentication and Authorization
+ [cs]: Základ/Autentizace a autorizace
+ [de]: Grundsätzlich/Authentisierung und Ermächtigung
+ [es]: Base/Autenticación y Autorización
+ [fr]: Base/Authentification et autorisation
+ [it]: Base/Autenticazione e autorizzazione
+ [pl]: Podstawowe/Uwierzytelnianie i autoryzacja
+ [pt]: Base/Autenticação e Autorização
+ [ru]: âÁÚÁ/áÕÔÅÎÔÉÆÉËÁÃÉÑ É Á×ÔÏÒÉÚÁÃÉÑ
+ [sl]: Osnova/Avtentikacija in identifikacija
+ [sv]: Bas/Autentisering och Auktorisering
+ [uk]: База/Аутентикація та авторизація
+
+Base/Utilities
+ [cs]: Základ/Utility
+ [da]: Basal/Værktøj
+ [de]: Gründsätzlich/Dienstprogramme
+ [es]: Base/Utilitarios
+ [fr]: Base/Utilitaires
+ [is]: Grunnforrit/Tól
+ [it]: Base/Utility
+ [nb]: Basis/Verktøy
+ [pl]: Podstawowe/Narzêdzia
+ [pt]: Base/Utilidades
+ [pt_BR]: Base/Utilitários
+ [ru]: âÁÚÁ/õÔÉÌÉÔÙ
+ [sl]: Osnova/Pripomoèki
+ [sv]: Bas/Verktyg
+ [uk]: База/Утиліти
+
+Daemons
+ [cs]: Démoni
+ [da]: Dæmoner
+ [de]: Server
+ [es]: Servidores
+ [fr]: Serveurs
+ [is]: Púkar
+ [it]: Demoni
+ [ja]: ¥Ç¡¼¥â¥ó
+ [nb]: Daemoner
+ [pl]: Serwery
+ [pt]: Servidores
+ [ru]: äÅÍÏÎÙ
+ [sl]: Stre¾niki
+ [sv]: Demoner
+ [uk]: Демони
+
+Development
+ [cs]: Vývojové prostøedky
+ [da]: Udvikling
+ [de]: Entwicklung
+ [es]: Desarrollo
+ [fr]: Développement
+ [is]: Þróunartól
+ [it]: Sviluppo
+ [ja]: ³«È¯
+ [nb]: Utvikling
+ [pl]: Programowanie
+ [pt]: Desenvolvimento
+ [pt_BR]: Desenvolvimento
+ [ru]: òÁÚÒÁÂÏÔËÁ
+ [sl]: Razvoj
+ [sv]: Utveckling
+ [uk]: Розробка
+
+Development/Building
+ [cs]: Základ/Vývoj
+ [da]: Udvikling/Bygge
+ [de]: Entwicklung/Bauen
+ [es]: Desarrollo/Construcción
+ [fr]: Développement/Construction
+ [it]: Sviluppo/Sviluppo
+ [nb]: Utvikling/Bygge
+ [pl]: Programowanie/Budowanie
+ [pt]: Desenvolvimento/Criação
+ [ru]: òÁÚÒÁÂÏÔËÁ/óÔÒÏÅÎÉÅ
+ [sv]: Utveckling/Bygga
+ [uk]: Розробка/Будова
+
+Development/Debug
+ [pl]: Programowanie/Odpluskwianie
+
+Development/Debuggers
+ [cs]: Vývojové prostøedky/Debuggery
+ [da]: Udvikling/Fejlfinding
+ [de]: Entwicklung/Debugger
+ [es]: Desarrollo/Depuradores
+ [fr]: Développement/Débogueurs
+ [is]: Þróunartól/Aflúsarar
+ [it]: Sviluppo/Debugger
+ [ja]: ³«È¯/¥Ç¥Ð¥Ã¥¬
+ [nb]: Utvikling/Debuggere
+ [pl]: Programowanie/Odpluskwiacze
+ [pt]: Desenvolvimento/Depuradores
+ [ru]: òÁÚÒÁÂÏÔËÁ/ïÔÌÁÄÞÉËÉ
+ [sl]: Razvoj/Razhro¹èevalniki
+ [sv]: Utveckling/Felsökning
+ [uk]: Розробка/Відладчики
+
+Development/Languages
+ [cs]: Vývojové prostøedky/Programovací jazyky
+ [da]: Udvikling/Sprog
+ [de]: Entwicklung/Sprachen
+ [es]: Desarrollo/Lenguajes
+ [fr]: Développement/Langues
+ [is]: Þróunartól/Forritunarmál
+ [it]: Sviluppo/Linguaggi
+ [ja]: ³«È¯/¸À¸ì
+ [nb]: Utvikling/Programmeringsspråk
+ [pl]: Programowanie/Jêzyki
+ [pt]: Desenvolvimento/Linguagens
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ
+ [sl]: Razvoj/Jeziki
+ [sv]: Utveckling/Språk
+ [uk]: Розробка/Мови
+
+Development/Languages/Fortran
+ [cs]: Vývojové prostøedky/Programovací jazyky/Fortran
+ [da]: Udvikling/Sprog/Fortran
+ [de]: Entwicklung/Sprachen/Fortran
+ [es]: Desarrollo/Lenguajes/Fortran
+ [fr]: Développement/Langues/Fortran
+ [is]: Þróunartól/Forritunarmál/Fortran
+ [it]: Sviluppo/Linguaggi/Fortran
+ [ja]: ³«È¯/¸À¸ì/Fortran
+ [nb]: Utvikling/Programmeringsspråk/Fortran
+ [pl]: Programowanie/Jêzyki/Fortran
+ [pt]: Desenvolvimento/Linguagens/Fortran
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Fortran
+ [sl]: Razvoj/Jeziki/Fortran
+ [sv]: Utveckling/Språk/Fortran
+ [uk]: Розробка/Мови/Fortran
+
+Development/Languages/Java
+ [cs]: Vývojové prostøedky/Programovací jazyky/Java
+ [da]: Udvikling/Sprog/Java
+ [de]: Entwicklung/Sprachen/Java
+ [es]: Desarrollo/Lenguajes/Java
+ [fr]: Développement/Langues/Java
+ [is]: Þróunartól/Forritunarmál/Java
+ [it]: Sviluppo/Linguaggi/Java
+ [ja]: ³«È¯/¸À¸ì/Java
+ [nb]: Utvikling/Programmeringsspråk/Java
+ [pl]: Programowanie/Jêzyki/Java
+ [pt]: Desenvolvimento/Linguagens/Java
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Java
+ [sl]: Razvoj/Jeziki/Java
+ [sv]: Utveckling/Språk/Java
+ [uk]: Розробка/Мови/Java
+
+Development/Languages/Modula3
+ [cs]: Vývojové prostøedky/Programovací jazyky/Modula3
+ [da]: Udvikling/Sprog/Modula3
+ [de]: Entwicklung/Sprachen/Modula3
+ [es]: Desarrollo/Lenguajes/Modula3
+ [fr]: Développement/Langues/Modula3
+ [is]: Þróunartól/Forritunarmál/Modula3
+ [it]: Sviluppo/Linguaggi/Modula3
+ [ja]: ³«È¯/¸À¸ì/Modula3
+ [nb]: Utvikling/Programmeringsspråk/Modula3
+ [pl]: Programowanie/Jêzyki/Modula3
+ [pt]: Desenvolvimento/Linguagens/Modula3
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Modula3
+ [sl]: Razvoj/Jeziki/Modula3
+ [sv]: Utveckling/Språk/Modula3
+ [uk]: Розробка/Мови/Modula3
+
+Development/Languages/PHP
+ [cs]: Vývojové prostøedky/Programovací jazyky/PHP
+ [da]: Udvikling/Sprog/PHP
+ [de]: Entwicklung/Sprachen/PHP
+ [es]: Desarrollo/Lenguajes/PHP
+ [fr]: Développement/Langues/PHP
+ [is]: Þróunartól/Forritunarmál/PHP
+ [it]: Sviluppo/Linguaggi/PHP
+ [ja]: ³«È¯/¸À¸ì/PHP
+ [nb]: Utvikling/Programmeringsspråk/PHP
+ [pl]: Programowanie/Jêzyki/PHP
+ [pt]: Desenvolvimento/Linguagens/PHP
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/PHP
+ [sl]: Razvoj/Jeziki/PHP
+ [sv]: Utveckling/Språk/PHP
+ [uk]: Розробка/Мови/PHP
+
+Development/Languages/Perl
+ [cs]: Vývojové prostøedky/Programovací jazyky/Perl
+ [da]: Udvikling/Sprog/Perl
+ [de]: Entwicklung/Sprachen/Perl
+ [es]: Desarrollo/Lenguajes/Perl
+ [fr]: Développement/Langues/Perl
+ [is]: Þróunartól/Forritunarmál/Perl
+ [it]: Sviluppo/Linguaggi/Perl
+ [ja]: ³«È¯/¸À¸ì/Perl
+ [nb]: Utvikling/Programmeringsspråk/Perl
+ [pl]: Programowanie/Jêzyki/Perl
+ [pt]: Desenvolvimento/Linguagens/Perl
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Perl
+ [sl]: Razvoj/Jeziki/Perl
+ [sv]: Utveckling/Språk/Perl
+ [uk]: Розробка/Мови/Perl
+
+Development/Languages/Python
+ [cs]: Vývojové prostøedky/Programovací jazyky/Python
+ [da]: Udvikling/Sprog/Python
+ [de]: Entwicklung/Sprachen/Python
+ [es]: Desarrollo/Lenguajes/Python
+ [fr]: Développement/Langues/Python
+ [is]: Þróunartól/Forritunarmál/Python
+ [it]: Sviluppo/Linguaggi/Python
+ [ja]: ³«È¯/¸À¸ì/Python
+ [nb]: Utvikling/Programmeringsspråk/Python
+ [pl]: Programowanie/Jêzyki/Python
+ [pt]: Desenvolvimento/Linguagens/Python
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Python
+ [sl]: Razvoj/Jeziki/Python
+ [sv]: Utveckling/Språk/Python
+ [uk]: Розробка/Мови/Python
+
+Development/Languages/Scheme
+ [cs]: Vývojové prostøedky/Programovací jazyky/Scheme
+ [da]: Udvikling/Sprog/Scheme
+ [de]: Entwicklung/Sprachen/Scheme
+ [es]: Desarrollo/Lenguajes/Scheme
+ [fr]: Développement/Langues/Scheme
+ [is]: Þróunartól/Forritunarmál/Scheme
+ [it]: Sviluppo/Linguaggi/Scheme
+ [ja]: ³«È¯/¸À¸ì/Scheme
+ [nb]: Utvikling/Programmeringsspråk/Scheme
+ [pl]: Programowanie/Jêzyki/Scheme
+ [pt]: Desenvolvimento/Linguagens/Scheme
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Scheme
+ [sl]: Razvoj/Jeziki/Scheme
+ [sv]: Utveckling/Språk/Scheme
+ [uk]: Розробка/Мови/Scheme
+
+Development/Languages/Tcl
+ [cs]: Vývojové prostøedky/Programovací jazyky/Tcl
+ [da]: Udvikling/Sprog/Tcl
+ [de]: Entwicklung/Sprachen/Tcl
+ [es]: Desarrollo/Lenguajes/Tcl
+ [fr]: Développement/Langues/Tcl
+ [is]: Þróunartól/Forritunarmál/Tcl
+ [it]: Sviluppo/Linguaggi/Tcl
+ [ja]: ³«È¯/¸À¸ì/Tcl
+ [nb]: Utvikling/Programmeringsspråk/Tcl
+ [pl]: Programowanie/Jêzyki/Tcl
+ [pt]: Desenvolvimento/Linguagens/Tcl
+ [ru]: òÁÚÒÁÂÏÔËÁ/ñÚÙËÉ/Tcl
+ [sl]: Razvoj/Jeziki/Tcl
+ [sv]: Utveckling/Språk/Tcl
+ [uk]: Розробка/Мови/Tcl
+
+Development/Libraries
+ [cs]: Vývojové prostøedky/Knihovny
+ [da]: Udvikling/Biblioteker
+ [de]: Entwicklung/Bibliotheken
+ [es]: Desarrollo/Bibliotecas
+ [fr]: Développement/Librairies
+ [is]: Þróunartól/Aðgerðasöfn
+ [it]: Sviluppo/Librerie
+ [ja]: ³«È¯/¥é¥¤¥Ö¥é¥ê
+ [nb]: Utvikling/Bibliotek
+ [pl]: Programowanie/Biblioteki
+ [pt]: Desenvolvimento/Bibliotecas
+ [pt_BR]: Desenvolvimento/Bibliotecas
+ [ru]: òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
+ [sl]: Razvoj/Knji¾nice
+ [sv]: Utveckling/Bibliotek
+ [uk]: Розробка/Бібліотеки
+
+Development/Libraries/Libc
+ [cs]: Vývojové prostøedky/Knihovny/Libc
+ [da]: Udvikling/Biblioteker/Libc
+ [de]: Entwicklung/Bibliotheken/Libc
+ [es]: Desarrollo/Bibliotecas/Libc
+ [fr]: Développement/Librairies/Libc
+ [is]: Þróunartól/Aðgerðasöfn/Libc
+ [it]: Sviluppo/Librerie/Libc
+ [ja]: ³«È¯/¥é¥¤¥Ö¥é¥ê/Libc
+ [nb]: Utvikling/Bibliotek/Libc
+ [pl]: Programowanie/Biblioteki/Libc
+ [pt]: Desenvolvimento/Bibliotecas/Libc
+ [pt_BR]: Desenvolvimento/Bibliotecas/Libc
+ [ru]: òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ/Libc
+ [sl]: Razvoj/Knji¾nice/Libc
+ [sv]: Utveckling/Bibliotek/Libc
+ [uk]: Розробка/Бібліотеки/Libc
+
+Development/Tools
+ [cs]: Vývojové prostøedky/Nástroje
+ [da]: Udvikling/Værktøj
+ [de]: Entwicklung/Tools
+ [es]: Desarrollo/Herramientas
+ [fr]: Développement/Outils
+ [is]: Þróunartól/Tól
+ [it]: Sviluppo/Tool
+ [ja]: ³«È¯/¥Ä¡¼¥ë
+ [nb]: Utvikling/Verktøy
+ [pl]: Programowanie/Narzêdzia
+ [pt]: Desenvolvimento/Ferramentas
+ [ru]: òÁÚÒÁÂÏÔËÁ/éÎÓÔÒÕÍÅÎÔÙ
+ [sl]: Razvoj/Orodja
+ [sv]: Utveckling/Verktyg
+ [uk]: Розробка/Інструменти
+
+Development/Version Control
+ [cs]: Vývojové prostøedky/Správ verzí
+ [da]: Udvikling/Versionskontrol
+ [de]: Entwicklung/Versionkontrolle
+ [es]: Desarrollo/Control de Versiones
+ [fr]: Développement/Contrôle de version
+ [is]: Þróunartól/Útgáfu Stýring
+ [it]: Sviluppo/Controllo della versione
+ [nb]: Utvikling/Versjonskontroll
+ [pl]: Programowanie/Zarz±dzanie wersjami
+ [pt]: Desenvolvimento/Controlo de Versões
+ [ru]: òÁÚÒÁÂÏÔËÁ/ëÏÎÔÒÏÌØ ×ÅÒÓÉÊ
+ [sl]: Razvoj/Nadzor razlièic
+ [sv]: Utveckling/Versionshantering
+ [uk]: Розробка/Керуванне версіями
+
+Documentation
+ [cs]: Dokumentace
+ [da]: Dokumentationen
+ [de]: Dokumentation
+ [es]: Documentación
+ [fr]: Documentacion
+ [is]: Skjölun
+ [it]: Documentazione
+ [nb]: Dokumentasjonen
+ [pl]: Dokumentacja
+ [pt]: Documentação
+ [ru]: äÏËÕÍÅÎÔÁÃÉÑ
+ [sl]: Dokumentacija
+ [sv]: Dokumentation
+ [uk]: Документація
+
+Fonts
+ [cs]: Fonty
+ [da]: Skrifttyper
+ [de]: Zeichensätze
+ [es]: Fuentes
+ [fr]: Polices
+ [is]: Leturgerðir
+ [it]: Font
+ [nb]: Skrifttyper
+ [pl]: Fonty
+ [pt]: Tipos de Letra
+ [ru]: ûÒÉÆÔÙ
+ [sl]: Pisave
+ [sv]: Typsnitt
+ [uk]: Шрифти
+
+I18n
+
+Libraries
+ [cs]: Knihovny
+ [da]: Biblioteker
+ [de]: Bibliotheken
+ [es]: Bibliotecas
+ [fr]: Librairies
+ [is]: Aðgerðasöfn
+ [it]: Librerie
+ [ja]: ¥é¥¤¥Ö¥é¥ê
+ [nb]: Biblioteker
+ [pl]: Biblioteki
+ [pt]: Bibliotecas
+ [pt_BR]: Bibliotecas
+ [ru]: âÉÂÌÉÏÔÅËÉ
+ [sv]: Bibliotek
+ [sl]: Knji¾nice
+ [uk]: Бібліотеки
+
+Libraries/Python
+ [cs]: Knihovny/Python
+ [da]: Biblioteker/Python
+ [de]: Bibliotheken/Python
+ [es]: Bibliotecas/Python
+ [fr]: Librairies/Python
+ [is]: Aðgerðasöfn/Python
+ [it]: Librerie/Python
+ [ja]: ¥é¥¤¥Ö¥é¥ê/Python
+ [nb]: Biblioteker/Python
+ [pl]: Biblioteki/Python
+ [pt]: Bibliotecas/Python
+ [pt_BR]: Bibliotecas/Python
+ [ru]: âÉÂÌÉÏÔÅËÉ/Python
+ [sv]: Bibliotek/Python
+ [sl]: Knji¾nice/Python
+ [uk]: Бібліотеки/Python
+
+Libraries/Java
+ [cs]: Knihovny/Java
+ [da]: Biblioteker/Java
+ [de]: Bibliotheken/Java
+ [es]: Bibliotecas/Java
+ [et]: Teegid/Java
+ [fr]: Librairies/Java
+ [is]: Aðgerðasöfn/Java
+ [it]: Librerie/Java
+ [ja]: ¥é¥¤¥Ö¥é¥ê/Java
+ [nb]: Biblioteker/Java
+ [pl]: Biblioteki/Java
+ [pt]: Bibliotecas/Java
+ [pt_BR]: Bibliotecas/Java
+ [ru]: âÉÂÌÉÏÔÅËÉ/Java
+ [sv]: Bibliotek/Java
+ [sl]: Knji¾nice/Java
+ [uk]: Бібліотеки/Java
+
+Libraries/XML
+ [cs]: Knihovny/XML
+ [da]: Biblioteker/XML
+ [de]: Bibliotheken/XML
+ [es]: Bibliotecas/XML
+ [fr]: Librairies/XML
+ [is]: Aðgerðasöfn/XML
+ [it]: Librerie/XML
+ [ja]: ¥é¥¤¥Ö¥é¥ê/XML
+ [nb]: Biblioteker/XML
+ [pl]: Biblioteki/XML
+ [pt]: Bibliotecas/XML
+ [pt_BR]: Bibliotecas/XML
+ [ru]: âÉÂÌÉÏÔÅËÉ/XML
+ [sl]: Knji¾nice/XML
+ [sv]: Bibliotek/XML
+ [uk]: Бібліотеки/XML
+
+Networking
+ [cs]: Sí»ové
+ [da]: Netværks
+ [de]: Netzwerkwesen
+ [es]: Red
+ [fr]: Réseau
+ [is]: Net
+ [it]: Rete
+ [nb]: Nettverks
+ [pl]: Sieciowe
+ [pt]: Rede
+ [pt_BR]: Rede
+ [ru]: óÅÔØ
+ [sl]: Omre¾ni
+ [sv]: Nätverk
+ [uk]: Мережа
+
+Networking/Admin
+ [cs]: Sí»ové/Administrace
+ [da]: Netværks/Administration
+ [de]: Netzwerkwesen/Administration
+ [es]: Red/Administración
+ [fr]: Réseau/Administration
+ [is]: Net/Stjórnar
+ [it]: Rete/Amministrazione
+ [nb]: Nettverks/Administrasjon
+ [pl]: Sieciowe/Administracyjne
+ [pt]: Rede/Administração
+ [ru]: óÅÔØ/õÐÒÁ×ÌÅÎÉÅ
+ [sv]: Nätverk/Administration
+ [uk]: Мережа/Керуванне
+
+Networking/Daemons
+ [cs]: Sí»ové/Démoni
+ [da]: Netværks/Dæmoner
+ [de]: Netzwerkwesen/Server
+ [es]: Red/Servidores
+ [fr]: Réseau/Serveurs
+ [is]: Net/Púkar
+ [it]: Rete/Demoni
+ [nb]: Nettverks/Daemoner
+ [pl]: Sieciowe/Serwery
+ [pt]: Rede/Servidores
+ [ru]: óÅÔØ/äÅÍÏÎÙ
+ [sl]: Omre¾ni/Stre¾niki
+ [sv]: Nätverk/Demoner
+ [uk]: Мережа/Демони
+
+Networking/Daemons/FTP
+ [cs]: Sí»ové/Démoni/FTP
+ [da]: Netværks/Dæmoner/FTP
+ [de]: Netzwerkwesen/Server/FTP
+ [es]: Red/Servidores/FTP
+ [fr]: Réseau/Serveurs/FTP
+ [is]: Net/Púkar/FTP
+ [it]: Rete/Demoni/FTP
+ [nb]: Nettverks/Daemoner/FTP
+ [pl]: Sieciowe/Serwery/FTP
+ [pt]: Rede/Servidores/FTP
+ [ru]: óÅÔØ/äÅÍÏÎÙ/FTP
+ [sl]: Omre¾ni/Stre¾niki/FTP
+ [sv]: Nätverk/Demoner/FTP
+ [uk]: Мережа/Демони/FTP
+
+Networking/Daemons/HTTP
+ [cs]: Sí»ové/Démoni/HTTP
+ [da]: Netværks/Dæmoner/HTTP
+ [de]: Netzwerkwesen/Server/HTTP
+ [es]: Red/Servidores/HTTP
+ [fr]: Réseau/Serveurs/HTTP
+ [is]: Net/Púkar/HTTP
+ [it]: Rete/Demoni/HTTP
+ [nb]: Nettverks/Daemoner/HTTP
+ [pl]: Sieciowe/Serwery/HTTP
+ [pt]: Rede/Servidores/HTTP
+ [ru]: óÅÔØ/äÅÍÏÎÙ/HTTP
+ [sl]: Omre¾ni/Stre¾niki/HTTP
+ [sv]: Nätverk/Demoner/HTTP
+ [uk]: Мережа/Демони/HTTP
+
+Networking/Daemons/Java
+ [cs]: Sí»ové/Démoni/Java
+ [da]: Netværks/Dæmoner/Java
+ [de]: Netzwerkwesen/Server/Java
+ [es]: Red/Servidores/Java
+ [fr]: Réseau/Serveurs/Java
+ [is]: Net/Púkar/Java
+ [it]: Rete/Demoni/Java
+ [nb]: Nettverks/Daemoner/Java
+ [pl]: Sieciowe/Serwery/Java
+ [pt]: Rede/Servidores/Java
+ [ru]: óÅÔØ/äÅÍÏÎÙ/Java
+ [sl]: Omre¾ni/Stre¾niki/Java
+ [sv]: Nätverk/Demoner/Java
+ [uk]: Мережа/Демони/Java
+
+Networking/Daemons/Java/Extensions
+ [cs]: Sí»ové/Démoni/Java/Roz¹íøení
+ [da]: Netværks/Dæmoner/Java/Udvidelser
+ [de]: Netzwerkwesen/Server/Java/Extensionen
+ [es]: Red/Servidores/Java/Extensiones
+ [fr]: Réseau/Serveurs/Java/Extensions
+ [it]: Rete/Demoni/Java/Estensioni
+ [nb]: Nettverks/Daemoner/Java/Utvidelser
+ [pl]: Sieciowe/Serwery/Java/Rozszerzenia
+ [pt]: Rede/Servidores/Java/Extensões
+ [ru]: óÅÔØ/äÅÍÏÎÙ/Java/òÁÓÛÉÒÅÎÉÑ
+ [sl]: Omre¾ni/Stre¾niki/Java/Raz¹iritve
+ [sv]: Nätverk/Demoner/Java/Utvidgningar
+ [uk]: Мережа/Демони/Java/Расширение
+
+Networking/Daemons/Java/Servlets
+ [pl]: Sieciowe/Serwery/Java/Servlety
+
+Networking/Daemons/POP3
+ [cs]: Sí»ové/Démoni/POP3
+ [da]: Netværks/Dæmoner/POP3
+ [de]: Netzwerkwesen/Server/POP3
+ [es]: Red/Servidores/POP3
+ [fr]: Réseau/Serveurs/POP3
+ [is]: Net/Púkar/POP3
+ [it]: Rete/Demoni/POP3
+ [nb]: Nettverks/Daemoner/POP3
+ [pl]: Sieciowe/Serwery/POP3
+ [pt]: Rede/Servidores/POP3
+ [ru]: óÅÔØ/äÅÍÏÎÙ/POP3
+ [sl]: Omre¾ni/Stre¾niki/POP3
+ [sv]: Nätverk/Demoner/POP3
+ [uk]: Мережа/Демони/POP3
+
+Networking/Daemons/Radius
+ [cs]: Sí»ové/Démoni/Radius
+ [da]: Netværks/Dæmoner/Radius
+ [de]: Netzwerkwesen/Server/Radius
+ [es]: Red/Servidores/Radius
+ [fr]: Réseau/Serveurs/Radius
+ [is]: Net/Púkar/Radius
+ [it]: Rete/Demoni/Radius
+ [nb]: Nettverks/Daemoner/Radius
+ [pl]: Sieciowe/Serwery/Radius
+ [pt]: Rede/Servidores/Radius
+ [ru]: óÅÔØ/äÅÍÏÎÙ/Radius
+ [sl]: Omre¾ni/Stre¾niki/Radius
+ [sv]: Nätverk/Demoner/Radius
+ [uk]: Мережа/Демони/Radius
+
+Networking/Daemons/SMTP
+ [cs]: Sí»ové/Démoni/SMTP
+ [da]: Netværks/Dæmoner/SMTP
+ [de]: Netzwerkwesen/Server/SMTP
+ [es]: Red/Servidores/SMTP
+ [fr]: Réseau/Serveurs/SMTP
+ [is]: Net/Púkar/SMTP
+ [it]: Rete/Demoni/SMTP
+ [nb]: Nettverks/Daemoner/SMTP
+ [pl]: Sieciowe/Serwery/SMTP
+ [pt]: Rede/Servidores/SMTP
+ [ru]: óÅÔØ/äÅÍÏÎÙ/SMTP
+ [sl]: Omre¾ni/Stre¾niki/SMTP
+ [sv]: Nätverk/Demoner/SMTP
+ [uk]: Мережа/Демони/SMTP
+
+Networking/News
+ [cs]: Sí»ové/News
+ [da]: Netværks/Nyheder
+ [de]: Netzwerkwesen/News
+ [es]: Red/Noticias
+ [fr]: Réseau/Nouvelles
+ [is]: Net/Fréttir
+ [it]: Rete/News
+ [nb]: Nettverks/News
+ [pl]: Sieciowe/News
+ [pt]: Rede/News
+ [pt_BR]: Rede/News
+ [ru]: óÅÔØ/îÏ×ÏÓÔÉ
+ [sl]: Omre¾ni/Novièarske
+ [sv]: Nätverk/Nyheter
+ [uk]: Мережа/Новини
+
+Networking/Utilities
+ [cs]: Sí»ové/Utility
+ [da]: Netværks/Værktøj
+ [de]: Netzwerkwesen/Dienstprogramme
+ [es]: Red/Utilitarios
+ [fr]: Réseau/Utilitaires
+ [is]: Net/Tól
+ [it]: Rete/Utility
+ [nb]: Nettverks/Verktøy
+ [pl]: Sieciowe/Narzêdzia
+ [pt]: Rede/Utilidades
+ [pt_BR]: Rede/Utilitários
+ [ru]: óÅÔØ/õÔÉÌÉÔÙ
+ [sl]: Omre¾ni/Pripomoèki
+ [sv]: Nätverk/Verktyg
+ [uk]: Мережа/Утиліти
+
+Themes
+ [cs]: Témata
+ [da]: Temaer
+ [de]: Themen
+ [es]: Temas
+ [fr]: Thèmes
+ [is]: Þemur
+ [it]: Temi
+ [nb]: Temaer
+ [pl]: Motywy
+ [pt]: Temas
+ [ru]: ôÅÍÙ
+ [sv]: Teman
+ [uk]: Теми
+
+Themes/GTK+
+ [cs]: Témata/GTK+
+ [da]: Temaer/GTK+
+ [de]: Themen/GTK+
+ [es]: Temas/GTK+
+ [fr]: Thèmes/GTK+
+ [is]: Þemur/GTK+
+ [it]: Temi/GTK+
+ [nb]: Temaer/GTK+
+ [pl]: Motywy/GTK+
+ [pt]: Temas/GTK+
+ [ru]: ôÅÍÙ/GTK+
+ [sv]: Teman/GTK+
+ [uk]: Теми/GTK+
+
+X11
+ [cs]: X11
+ [da]: X11
+ [de]: X11
+ [es]: X11
+ [fr]: X11
+ [id]: X11
+ [is]: X11
+ [it]: X11
+ [ja]: X11
+ [nb]: X11
+ [pl]: X11
+ [pt]: X11
+ [pt_BR]: X11
+ [ru]: X11
+ [sl]: X11
+ [sv]: X11
+ [uk]: X11
+
+X11/Amusements
+ [cs]: X11/Zábava
+ [da]: X11/Underholdning
+ [de]: X11/Unterhaltung
+ [es]: X11/Diversiones
+ [fr]: X11/Divertissements
+ [id]: X11/Hiburan
+ [is]: X11/Skemmtun
+ [it]: X11/Divertimenti
+ [ja]: X11/¥¢¥ß¥å¡¼¥º¥á¥ó¥È
+ [nb]: X11/Fornøyelse
+ [pl]: X11/Rozrywka
+ [pt]: X11/Divertimentos
+ [ru]: X11/òÁÚ×ÌÅÞÅÎÉÑ
+ [sl]: X11/Zabava
+ [sv]: X11/Underhållning
+ [uk]: X11/Розваги
+
+X11/Applications
+ [cs]: X11/Aplikace
+ [da]: X11/Programmer
+ [de]: X11/Applikationen
+ [es]: X11/Aplicaciones
+ [fr]: X11/Applications
+ [id]: X11/Aplikasi
+ [is]: X11/Forrit
+ [it]: X11/Applicazioni
+ [ja]: X11/¥¢¥×¥ê¥±¡¼¥·¥ç¥ó
+ [nb]: X11/Applikasjoner
+ [pl]: X11/Aplikacje
+ [pt]: X11/Aplicações
+ [pt_BR]: X11/Aplicações
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ
+ [sl]: X11/Programi
+ [sv]: X11/Tillämpningar
+ [uk]: X11/Прикладні Програми
+
+X11/Applications/Accessibility
+
+X11/Applications/Editors
+ [cs]: X11/Aplikace/Editory
+ [da]: X11/Programmer/Tekstbehandlere
+ [de]: X11/Applikationen/Editoren
+ [es]: X11/Aplicaciones/Editores
+ [fr]: X11/Applications/Editeurs
+ [is]: X11/Forrit/Ritlar
+ [it]: X11/Applicazioni/Editor
+ [ja]: X11/¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¨¥Ç¥£¥¿
+ [nb]: X11/Applikasjoner/Editorer
+ [pl]: X11/Aplikacje/Edytory
+ [pt]: X11/Aplicações/Editores
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/òÅÄÁËÔÏÒÙ
+ [sl]: X11/Programi/Urejevalniki
+ [sv]: X11/Tillämpningar/Editorer
+ [uk]: X11/Прикладні Програми/Редактори
+
+X11/Applications/Games
+ [cs]: X11/Aplikace/Hry
+ [da]: X11/Programmer/Spil
+ [de]: X11/Applikationen/Spiele
+ [es]: X11/Aplicaciones/Juegos
+ [fr]: X11/Applications/Jeux
+ [is]: X11/Forrit/Leikir
+ [it]: X11/Applicazioni/Giochi
+ [ja]: X11/¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥²¡¼¥à
+ [nb]: X11/Applikasjoner/Spill
+ [pl]: X11/Aplikacje/Gry
+ [pt]: X11/Aplicações/Jogos
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/éÇÒÙ
+ [sl]: X11/Programi/Igre
+ [sv]: X11/Tillämpningar/Spel
+ [uk]: X11/Прикладні Програми/Ігри
+
+X11/Applications/Games/Strategy
+ [cs]: X11/Aplikace/Hry/Strategické
+ [da]: X11/Programmer/Spil/Strategi
+ [de]: X11/Applikationen/Spiele/Strategie
+ [es]: X11/Aplicaciones/Juegos/Estratégico
+ [fr]: X11/Applications/Jeux/Stratégique
+ [it]: X11/Applicazioni/Giochi/Strategico
+ [nb]: X11/Applikasjoner/Spill/Strategi
+ [pl]: X11/Aplikacje/Gry/Strategiczne
+ [pt]: X11/Aplicações/Jogos/Estratégico
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/éÇÒÙ/óÔÒÁÔÅÇÉÞÅÓËÉÅ
+ [sl]: X11/Programi/Igre/Strate¹ke
+ [sv]: X11/Tillämpningar/Spel/Strategi
+ [uk]: X11/Прикладні Програми/Ігри/Стратегія
+
+X11/Applications/Graphics
+ [cs]: X11/Aplikace/Grafika
+ [da]: X11/Programmer/Grafik
+ [de]: X11/Applikationen/Grafik
+ [es]: X11/Aplicaciones/Gráficos
+ [fr]: X11/Applications/Graphiques
+ [id]: X11/Aplikasi/Grafik
+ [is]: X11/Forrit/Myndvinnsla
+ [it]: X11/Applicazioni/Immagini
+ [ja]: X11/¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥°¥é¥Õ¥£¥Ã¥¯¥¹
+ [nb]: X11/Applikasjoner/Grafikk
+ [pl]: X11/Aplikacje/Grafika
+ [pt]: X11/Aplicações/Gráficos
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/çÒÁÆÉËÁ
+ [sl]: X11/Programi/Grafika
+ [sv]: X11/Tillämpningar/Grafik
+ [uk]: X11/Прикладні Програми/Графіка
+
+X11/Applications/Mail
+ [cs]: X11/Aplikace/Po¹ta
+ [da]: X11/Programmer/Post
+ [de]: X11/Applikationen/Post
+ [es]: X11/Aplicaciones/Correo Electrónico
+ [fr]: X11/Applications/Courrier
+ [is]: X11/Forrit/Póst
+ [it]: X11/Applicazioni/Posta
+ [nb]: X11/Applikasjoner/Epost
+ [pl]: X11/Aplikacje/Poczta
+ [pt]: X11/Aplicações/Correio Eletrônico
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/üÌÅËÔÒÏÎÎÁÑ ÐÏÞÔÁ
+ [sl]: X11/Programi/Po¹tna
+ [sv]: X11/Tillämpningar/Post
+ [uk]: X11/Прикладні Програми/Пошта
+
+X11/Applications/Multimedia
+ [cs]: X11/Aplikace/Multimédia
+ [da]: X11/Programmer/Multimedie
+ [de]: X11/Applikationen/Multimedien
+ [es]: X11/Aplicaciones/Multimedia
+ [fr]: X11/Applications/Multimédia
+ [is]: X11/Forrit/Margmiðlun
+ [it]: X11/Applicazioni/Multimedia
+ [ja]: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Þ¥ë¥Á¥á¥Ç¥£¥¢
+ [nb]: X11/Programmer/Multimedia
+ [pl]: X11/Aplikacje/Multimedia
+ [pt]: X11/Aplicações/Multimédia
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/íÕÌØÔÉÍÅÄÉÁ
+ [sl]: X11/Programi/Veèpredstavnost
+ [sv]: X11/Tillämpningar/Multimedia
+ [uk]: X11/Прикладні Програми/Мультимедіа
+
+X11/Applications/Networking
+ [cs]: X11/Aplikace/Sí»ové
+ [da]: X11/Programmer/Netværks
+ [de]: X11/Applikationen/Netzwerkwesen
+ [es]: X11/Aplicaciones/Red
+ [fr]: X11/Applications/Réseau
+ [is]: X11/Forrit/Net
+ [it]: X11/Applicazioni/Rete
+ [nb]: X11/Applikasjoner/Nettverks
+ [pl]: X11/Aplikacje/Sieciowe
+ [pt]: X11/Aplicações/Rede
+ [pt_BR]: X11/Aplicações/Rede
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/óÅÔØ
+ [sl]: X11/Programi/Omre¾ni
+ [sv]: X11/Tillämpningar/Nätverk
+ [uk]: X11/Прикладні Програми/Мережа
+
+X11/Applications/Publishing
+ [cs]: X11/Aplikace/Publikování
+ [da]: X11/Programmer/Udgivelse
+ [de]: X11/Applikationen/Publizieren
+ [es]: X11/Aplicaciones/Edición
+ [fr]: X11/Applications/Edition
+ [is]: X11/Forrit/Umbrot
+ [it]: X11/Applicazioni/Publishing
+ [ja]: X11/¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥Ñ¥Ö¥ê¥Ã¥·¥ó¥°
+ [nb]: X11/Applikasjoner/Publisering
+ [pl]: X11/Aplikacje/Publikowanie
+ [pt]: X11/Aplicações/Publicação
+ [pt_BR]: X11/Aplicações/Editoração
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/ôÉÐÏÇÒÁÆÉÑ
+ [sl]: X11/Programi/Zalo¾ni¹tvo
+ [sv]: X11/Tillämpningar/Publicering
+ [uk]: X11/Прикладні Програми/Типографія
+
+X11/Applications/Science
+ [cs]: X11/Aplikace/Vìdecké
+ [de]: X11/Applikationen/Wissenschaft
+ [es]: X11/Aplicaciones/Ciencia
+ [fr]: X11/Applications/Science
+ [it]: X11/Applicazioni/Sciencia
+ [pl]: X11/Aplikacje/Nauka
+ [pt]: X11/Aplicações/Ciência
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/îÁÕËÁ
+ [sv]: X11/Tillämpningar/Vetenskaplig
+ [uk]: X11/Прикладні Програми/Наука
+
+X11/Applications/Sound
+ [cs]: X11/Aplikace/Zvuk
+ [da]: X11/Programmer/Lyd
+ [de]: X11/Applikationen/Laut
+ [es]: X11/Aplicaciones/Sonido
+ [fr]: X11/Aplicações/Son
+ [is]: X11/Forrit/Hljóð
+ [it]: X11/Applicazioni/Audio
+ [nb]: X11/Applikasjoner/Lyd
+ [pl]: X11/Aplikacje/D¼wiêk
+ [pt]: X11/Aplicações/Som
+ [pt_BR]: X11/Aplicações/Som
+ [ru]: X11/ðÒÉÌÏÖÅÎÉÑ/ú×ÕË
+ [sl]: X11/Programi/Zvok
+ [sv]: X11/Tillämpningar/Ljud
+ [uk]: X11/Прикладні Програми/Звук
+
+X11/Development/Libraries
+ [cs]: X11/Vývojové prostøedky/Knihovny
+ [da]: X11/Udvikling/Biblioteker
+ [de]: X11/Entwicklung/Bibliotheken
+ [es]: X11/Desarrollo/Bibliotecas
+ [fr]: X11/Développement/Librairies
+ [is]: X11/Þróunartól/Aðgerðasöfn
+ [it]: X11/Sviluppo/Librerie
+ [ja]: X11/³«È¯/¥é¥¤¥Ö¥é¥ê
+ [nb]: X11/Applikasjoner/Biblioteker
+ [pl]: X11/Programowanie/Biblioteki
+ [pt]: X11/Desenvolvimento/Bibliotecas
+ [pt_BR]: X11/Desenvolvimento/Bibliotecas
+ [ru]: X11/òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
+ [sl]: X11/Razvoj/Knji¾nice
+ [sv]: X11/Utveckling/Bibliotek
+ [uk]: X11/Розробка/Бібліотеки
+
+X11/Development/Tools
+ [cs]: X11/Vývojové prostøedky/Nástroje
+ [da]: X11/Udvikling/Værktøj
+ [de]: X11/Entwicklung/Tools
+ [es]: X11/Desarrollo/Herramientas
+ [fr]: X11/Développement/Outils
+ [is]: X11/Þróunartól/Tól
+ [it]: X11/Sviluppo/Tool
+ [ja]: X11/³«È¯/¥Ä¡¼¥ë
+ [nb]: X11/Applikasjoner/Verktøy
+ [pl]: X11/Programowanie/Narzêdzia
+ [pt]: X11/Desenvolvimento/Ferramentas
+ [ru]: X11/òÁÚÒÁÂÏÔËÁ/éÎÓÔÒÕÍÅÎÔÙ
+ [sl]: X11/Razvoj/Orodja
+ [sv]: X11/Utveckling/Verktyg
+ [uk]: X11/Розробка/Інструменти
+
+X11/Libraries
+ [cs]: X11/Knihovny
+ [da]: X11/Biblioteker
+ [de]: X11/Bibliotheken
+ [es]: X11/Bibliotecas
+ [fr]: X11/Librairies
+ [is]: X11/Aðgerðasöfn
+ [it]: X11/Librerie
+ [ja]: X11/¥é¥¤¥Ö¥é¥ê
+ [nb]: X11/Biblioteker
+ [pl]: X11/Biblioteki
+ [pt]: X11/Bibliotecas
+ [pt_BR]: X11/Bibliotecas
+ [ru]: X11/âÉÂÌÉÏÔÅËÉ
+ [sl]: X11/Knji¾nice
+ [sv]: X11/Bibliotek
+ [uk]: X11/Бібліотеки
+
+X11/Servers
+ [cs]: X11/Servery
+ [da]: X11/Tjenere
+ [de]: X11/Server
+ [es]: X11/Servidores
+ [fr]: X11/Serveurs
+ [is]: X11/Þjóna
+ [it]: X11/Server
+ [nb]: X11/Tjenere
+ [pl]: X11/Serwery
+ [pt]: X11/Servidores
+ [ru]: X11/óÅÒ×ÅÒÙ
+ [sl]: X11/Stre¾niki
+ [sv]: X11/Servrar
+ [uk]: X11/Сервери
+
+X11/Window Managers
+ [cs]: X11/Okenní mana¾ery
+ [da]: X11/Vindueshåndtererene
+ [de]: X11/Fenstermanagern
+ [es]: X11/Administradores de Ventanas
+ [fr]: X11/Gestionnaires de fenêtres
+ [is]: X11/Gluggastjórunum
+ [it]: X11/Window manager
+ [nb]: X11/Vindushåndtererene
+ [pl]: X11/Zarz±dcy okien
+ [pt]: X11/Gestores de Janelas
+ [ru]: X11/ïËÏÎÎÙÅ ÍÅÎÅÄÖÅÒÙ
+ [sl]: X11/Upravljalniki
+ [sv]: X11/Fönsterhanterarna
+ [uk]: X11/Віконні менеджери
+
+X11/Window Managers/Tools
+ [cs]: X11/Okenní mana¾ery/Nástroje
+ [da]: X11/Vindueshåndtererene/Værktøj
+ [de]: X11/Fenstermanager/Tools
+ [es]: X11/Administradores de Ventanas/Herramientas
+ [fr]: X11/Gestionnaires de fenêtres/Outils
+ [is]: X11/Gluggastjórunum/Tól
+ [it]: X11/Window manager/Tool
+ [nb]: X11/Vindushåndtererene/Verktøy
+ [pl]: X11/Zarz±dcy okien/Narzêdzia
+ [pt]: X11/Gestores de Janelas/Ferramentas
+ [ru]: X11/ïËÏÎÎÙÅ ÍÅÎÅÄÖÅÒÙ/éÎÓÔÒÕÍÅÎÔÙ
+ [sl]: X11/Upravljalniki/Orodja
+ [sv]: X11/Fönsterhanterarna/Verktyg
+ [uk]: X11/Віконні менеджери/Інструменти
--- /dev/null
+# TLD rpm macros
+
+%__id /bin/id
+%__id_u %{__id} -u
+%__chown_Rhf %{__chown} -Rhf
+%__chgrp_Rhf %{__chgrp} -Rhf
+
+%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root:root
+%_fixgroup true
+%_fixperms %{__chmod} -Rf -Rf a+rX,u+w,g-w,o-w
+
+%_exec_prefix %{_prefix}
+%_bindir %{_exec_prefix}/bin
+%_sbindir %{_exec_prefix}/sbin
+%_datadir %{_prefix}/share
+%_sharedstatedir /var/lib
+%_lib @LIB@
+%_libdir %{_exec_prefix}/%{_lib}
+%_libexecdir %{_exec_prefix}/%{_lib}
+%_includedir %{_prefix}/include
+%_oldincludedir /usr/include
+%_sysconfdir /etc
+%_localstatedir /var
+%_infodir /usr/share/info
+%_mandir %{_prefix}/share/man
+%_defaultdocdir /usr/share/doc
+
+%__os_install_post \
+%{__spec_install_post_strip}\
+%{__spec_install_post_chrpath}\
+%{__spec_install_post_check_so}\
+%{__spec_install_post_compress_docs}\
+%{__spec_install_post_compress_modules}\
+%{__spec_install_post_py_hardlink}\
+%{__spec_install_post_perl_clean}\
+%{__arch_install_post}\
+%{nil}
+
--- /dev/null
+# TODO:
+# pluto_> btw. /usr/lib/rpm/find-debuginfo.sh needs fix. it extract debuginfo also from kernel modules.
+# pluto_> there's a filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f
+# pluto_> and we need to add ! -path /lib/modules/...
+# - python(abi) cap is not provided automatically because /usr/lib*/libpython2*.so.*
+# matches ELF first
+# - repackaging when lzma is not installed (todo: fix digest signature of header)
+# rpmbuild computes digest when writing package to temporary file, then adds a few
+# tags (incl. digest) and writes whole package to destination file;
+# repackaging uses unchanged "immutable header" image from original rpm, also
+# preserving payload format and compressor from original rpm, _not_ current settings
+# /usr/bin/install: cannot stat `./it.gmo': No such file or directory
+# /usr/bin/install: cannot stat `./sr@Latn.gmo': No such file or directory
+# - maybe? http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=cfcd1f9bd98d5d0fc46a84931984efec3b9d47e2
+# - fix linking, rpm is beeing linked against installed rpmio
+#
+# Conditional build:
+%bcond_with static # build static rpm+rpmi
+%bcond_without apidocs # don't generate documentation with doxygen
+%bcond_with internal_db # internal db (db 4.5.20)
+%bcond_with autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
+%bcond_without nptl # internal db: don't use process-shared POSIX mutexes (NPTL provides full interface)
+%bcond_without python # don't build python bindings
+%bcond_without selinux # build without selinux support
+%bcond_without system_libmagic # don't use system libmagic
+%bcond_without suggest_tags # build without Suggest tag (bootstrapping)
+%bcond_with neon # build with HTTP/WebDAV support (neon library). NOTE: neon libs are in /usr!
+# force_cc - force using __cc other than "%{_target_cpu}-tld-linux-gcc"
+# force_cxx - force using __cxx other than "%{_target_cpu}-tld-linux-g++"
+# force_cpp - force using __cpp other than "%{_target_cpu}-tld-linux-gcc -E"
+
+%ifarch sparc sparcv9 sparc64
+%undefine with_apidocs
+%endif
+
+# versions of required libraries
+%define reqdb_ver 4.5.20
+%define reqpopt_ver 1.10.8
+%define beecrypt_ver 2:4.1.2-4
+%define sover 4.5
+Summary: RPM Package Manager
+Summary(de.UTF-8): RPM Packet-Manager
+Summary(es.UTF-8): Gestor de paquetes RPM
+Summary(pl.UTF-8): Aplikacja do zarządzania pakietami RPM
+Summary(pt_BR.UTF-8): Gerenciador de pacotes RPM
+Summary(ru.UTF-8): Менеджер пакетов от RPM
+Summary(uk.UTF-8): Менеджер пакетів від RPM
+Name: rpm
+Version: 4.5
+Release: 55
+License: LGPL
+Group: Base
+Source0: %{name}-%{version}.tar.gz
+# Source0-md5: 6b4cda21de59dc250d2e33e4187fd166
+Source1: %{name}.groups
+Source2: %{name}.platform
+Source3: %{name}-install-tree
+Source4: %{name}-find-spec-bcond
+Source5: %{name}-hrmib-cache
+Source6: %{name}-groups-po.awk
+Source7: %{name}-compress-doc
+Source10: %{name}-php-provides
+Source11: %{name}-php-requires
+Source12: %{name}.sysinfo
+Source13: perl.prov
+Source14: %{name}-user_group.sh
+Source15: %{name}.sysconfig
+Source16: %{name}-macros.java
+Source17: %{name}-java-requires
+# http://svn.pld-linux.org/banner.sh/
+Source18: banner.sh
+Source19: %{name}-macros.gstreamer
+Patch1000: %{name}-new-debuginfo.patch
+Patch1067: %{name}-disable-features.patch
+Patch1070: %{name}-rpmrc-ac.patch
+#Patch0: %{name}-pl.po.patch
+Patch1: %{name}-rpmrc.patch
+Patch2: %{name}-arch.patch
+Patch3: %{name}-rpmpopt.patch
+Patch4: %{name}-perl-macros.patch
+Patch6: %{name}-noexpand.patch
+Patch7: %{name}-scripts-closefds.patch
+Patch8: %{name}-db.patch
+Patch9: %{name}-gettext-in-header.patch
+Patch10: %{name}-compress-doc.patch
+Patch11: %{name}-rpm5-patchset-8074.patch
+Patch12: %{name}-system_libs.patch
+Patch13: %{name}-unglobal.patch
+Patch14: %{name}-etc_dir.patch
+Patch15: %{name}-system_libs-more.patch
+Patch16: %{name}-libmagic-locale.patch
+Patch17: %{name}-ldconfig-always.patch
+Patch20: %{name}-macros-ti.patch
+Patch21: %{name}-perl_req-skip_multiline.patch
+Patch22: %{name}-provides-dont-obsolete.patch
+Patch23: %{name}-pkgconfigdeps.patch
+Patch24: %{name}-po.patch
+Patch25: %{name}-link.patch
+Patch26: %{name}-notsc.patch
+Patch27: %{name}-hack-norpmlibdep.patch
+Patch28: %{name}-makefile-no_myLDADD_deps.patch
+Patch29: %{name}-perl_req-use_base.patch
+Patch31: %{name}-missing-prototypes.patch
+Patch32: %{name}-pld-autodep.patch
+Patch33: %{name}-arch-x86_64.patch
+Patch34: %{name}-epoch0.patch
+Patch35: %{name}-disable-features-ti.patch
+Patch36: %{name}-debuginfo.patch
+Patch37: %{name}-doxygen_hack.patch
+Patch39: %{name}-popt-coreutils.patch
+Patch42: %{name}-old-fileconflicts-behaviour.patch
+Patch43: %{name}-rpm5-patchset-8637.patch
+Patch44: %{name}-no-neon.patch
+Patch45: %{name}-no-sqlite.patch
+Patch48: %{name}-nopie.patch
+Patch50: %{name}-macros.patch
+Patch51: %{name}-cleanlibdirs.patch
+Patch52: %{name}-morearchs.patch
+Patch53: %{name}-chroot-hack.patch
+Patch55: %{name}-truncate-cvslog.patch
+Patch56: %{name}-rpm5-patchset-8413.patch
+Patch57: %{name}-as_needed-fix.patch
+Patch58: %{name}-repackage-wo-lzma.patch
+Patch59: %{name}-libtool-deps.patch
+Patch61: %{name}-lzma-mem.patch
+Patch62: %{name}-lzma-size_t.patch
+Patch63: %{name}-tar_as_secondary_source.patch
+Patch64: %{name}-man_pl.patch
+Patch65: %{name}-lzma-tukaani.patch
+Patch66: %{name}-v3-support.patch
+Patch67: %{name}-cleanbody.patch
+Patch69: %{name}-popt-aliases.patch
+# reverse arrows patch
+Patch70: %{name}-rpm5-patchset-10061.patch
+Patch71: %{name}-installbeforeerase.patch
+Patch72: %{name}-postun-nofail.patch
+Patch73: %{name}-namespace-probe.patch
+Patch74: %{name}-noversiondir.patch
+Patch75: %{name}-rpmte-segv.patch
+Patch76: %{name}-pydebuginfo.patch
+Patch77: %{name}-dirdeps-macro.patch
+Patch78: %{name}-db3-configure.patch
+Patch79: %{name}-macros-cpp.patch
+Patch80: %{name}-link-selinux.patch
+Patch81: %{name}-db-configure.patch
+Patch82: %{name}-perl-makefile.patch
+Patch83: %{name}-nosmpflags.patch
+Patch84: %{name}-hirmib-ts.patch
+Patch85: %{name}-perl_req-heredocs_pod.patch
+Patch86: %{name}-rpmv3-support.patch
+Patch87: %{name}-mono.patch
+Patch88: %{name}-poptexecpath.patch
+Patch89: %{name}-lzma-compress-level.patch
+Patch90: %{name}-gstreamer.patch
+Patch91: %{name}-gendiff.patch
+Patch92: %{name}-set-failed-on-reopen.patch
+Patch93: %{name}-debugedit-workaround.patch
+Patch94: %{name}-shescape-memfault.patch
+Patch95: %{name}-gid-uucp.patch
+Patch96: %{name}-disable-hkp.patch
+Patch97: %{name}-sigpad.patch
+Patch98: %{name}-debugdir.patch
+Patch99: %{name}-pkgconfig.patch
+Patch100: %{name}-rpm5-debugedit.patch
+Patch101: %{name}-builddir-readlink.patch
+Patch102: pythondeps-speedup.patch
+Patch103: %{name}-lua-exit-chroot-correctly.patch
+Patch104: %{name}-glob.patch
+URL: http://rpm5.org/
+BuildRequires: autoconf >= 2.57
+BuildRequires: automake >= 1.4
+BuildRequires: beecrypt-devel >= %{beecrypt_ver}
+BuildRequires: bzip2-devel >= 1.0.2-17
+%{!?with_internal_db:BuildRequires: db-devel >= %{reqdb_ver}}
+BuildRequires: elfutils-devel >= 0.108
+BuildRequires: gettext-devel >= 0.11.4-2
+BuildRequires: keyutils-devel
+%{?with_system_libmagic:BuildRequires: libmagic-devel}
+%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
+# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 1:1.4.2-9
+%if %{with neon}
+BuildRequires: libxml2-devel
+BuildRequires: neon-devel >= 0.25.5
+%endif
+BuildRequires: ossp-uuid-devel >= 1.6.2-8
+BuildRequires: patch >= 2.2
+BuildRequires: popt-devel >= %{reqpopt_ver}
+%{?with_python:BuildRequires: python-devel >= 1:2.3}
+BuildRequires: python-modules >= 1:2.3
+BuildRequires: rpm-perlprov
+%{?with_python:BuildRequires: rpm-pythonprov}
+BuildRequires: rpmbuild(macros) >= 1.351
+BuildRequires: tar >= 1:1.15.1
+BuildRequires: zlib-devel >= 1.2.3.3
+%if %{with apidocs}
+BuildRequires: doxygen
+BuildRequires: ghostscript
+BuildRequires: graphviz
+BuildRequires: tetex-pdftex
+%endif
+%if %{with static}
+# Require static library only for static build
+BuildRequires: beecrypt-static >= %{beecrypt_ver}
+BuildRequires: bzip2-static >= 1.0.2-17
+%{!?with_internal_db:BuildRequires: db-static >= %{reqdb_ver}}
+BuildRequires: elfutils-static
+BuildRequires: glibc-static >= 2.2.94
+%{?with_system_libmagic:BuildRequires: libmagic-static}
+%{?with_selinux:BuildRequires: libselinux-static >= 1.18}
+BuildRequires: popt-static >= %{reqpopt_ver}
+BuildRequires: zlib-static >= 1.2.3.3
+%endif
+Requires: %{name}-base = %{version}-%{release}
+Requires: %{name}-lib = %{version}-%{release}
+Requires: beecrypt >= %{beecrypt_ver}
+Requires: popt >= %{reqpopt_ver}
+Provides: rpm-db-ver = %{reqdb_ver}
+Obsoletes: rpm-getdeps
+%{!?with_static:Obsoletes: rpm-utils-static}
+Obsoletes: tmpwatch-rpmrepackage
+Conflicts: glibc < 2.2.92
+Conflicts: poldek < 0.21-0.20070703.00.11
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _binary_payload w9.gzdio
+%define _noPayloadPrefix 1
+
+# don't require very fresh rpm.macros to build
+%define __gettextize gettextize --copy --force --no-changelog; [ -f po/Makevars ] || cp -f po/Makevars{.template,}
+%define find_lang sh ./scripts/find-lang.sh $RPM_BUILD_ROOT
+%define ix86 i386 i486 i586 i686 athlon pentium3 pentium4
+%define ppc ppc ppc7400 ppc7450
+%define x8664 amd64 ia32e x86_64
+
+# stabilize new build environment
+%define __newcc %{?force_cc}%{!?force_cc:%{_target_cpu}-tld-linux-gcc}
+%define __newcxx %{?force_cxx}%{!?force_cxx:%{_target_cpu}-tld-linux-g++}
+%define __newcpp %{?force_cpp}%{!?force_cpp:%{_target_cpu}-tld-linux-gcc -E}
+
+%define _rpmlibdir /usr/lib/rpm
+
+%define specflags -fno-strict-aliasing
+
+%description
+RPM is a powerful package manager, which can be used to build,
+install, query, verify, update, and uninstall individual software
+packages. A package consists of an archive of files, and package
+information, including name, version, and description.
+
+%description -l de.UTF-8
+RPM ist ein kräftiger Packet-Manager, der verwendet sein kann zur
+Installation, Anfrage, Verifizierung, Aktualisierung und
+Uninstallation individueller Softwarepakete. Ein Paket besteht aus
+einem Archiv Dateien und Paketinformation, inklusive Name, Version und
+Beschreibung.
+
+%description -l es.UTF-8
+RPM es un poderoso administrador de paquetes, que puede ser usado para
+construir, instalar, pesquisar, verificar, actualizar y desinstalar
+paquetes individuales de software. Un paquete consiste en un
+almacenaje de archivos, y información sobre el paquete, incluyendo
+nombre, versión y descripción.
+
+%description -l pl.UTF-8
+RPM jest doskonałym programem zarządzającym pakietami. Umożliwia on
+przebudowanie, instalację czy weryfikację dowolnego pakietu.
+Informacje dotyczące każdego pakietu, takie jak jego opis, lista
+plików wchodzących w skład pakietu, zależności od innych pakietów, są
+przechowywane w bazie danych i można je uzyskać za pomocą opcji
+odpytywania programu rpm.
+
+%description -l pt_BR.UTF-8
+RPM é um poderoso gerenciador de pacotes, que pode ser usado para
+construir, instalar, pesquisar, verificar, atualizar e desinstalar
+pacotes individuais de software. Um pacote consiste de um conjunto de
+arquivos e informações adicionais, incluindo nome, versão e descrição
+do pacote, permissões dos arquivos, etc.
+
+%description -l ru.UTF-8
+RPM - это мощный менеджер пакетов, который может быть использован для
+создания, инсталляции, запросов (query), проверки, обновления и
+удаления программных пакетов. Пакет состоит из файлового архива и
+служебной информации, включающей название, версию, описание и другие
+данные о пакете.
+
+%description -l uk.UTF-8
+RPM - це потужний менеджер пакетів, що може бути використаний для
+створення, інсталяції, запитів (query), перевірки, поновлення та
+видалення програмних пакетів. Пакет складається з файлового архіву та
+службової інформації, що містить назву, версію, опис та іншу
+інформацію про пакет.
+
+%package base
+Summary: RPM base package - scripts used by rpm packages themselves
+Summary(pl.UTF-8): Podstawowy pakiet RPM - skrypty używane przez same pakiety rpm
+Group: Base
+Requires: filesystem
+Obsoletes: rpm-scripts
+Obsoletes: vserver-rpm
+
+%description base
+The RPM base package contains scripts used by rpm packages themselves.
+These include:
+- scripts for adding/removing groups and users needed for rpm
+ packages,
+- banner.sh to display %%banner messages from rpm scriptlets.
+
+%description base -l pl.UTF-8
+Pakiet podstawowy RPM zwiera skrypty używane przez same pakiety rpm.
+Zawiera on:
+- skrypty dodające/usuwające grupy i użytkowników dla pakietów rpm,
+- banner.sh do pokazywania komunikatów %%banner dla skryptletów rpm.
+
+%package lib
+Summary: RPMs library
+Summary(pl.UTF-8): Biblioteki RPM-a
+Group: Libraries
+Requires: beecrypt >= %{beecrypt_ver}
+%{!?with_internal_db:Requires: db >= %{reqdb_ver}}
+%{?with_system_libmagic:Requires: libmagic >= 1.15-2}
+%{?with_selinux:Requires: libselinux >= 1.18}
+Requires: ossp-uuid >= 1.6.2-4
+Requires: popt >= %{reqpopt_ver}
+%{?with_internal_db:%{?with_nptl:Requires: uname(release) >= 2.6.0}}
+Requires: zlib >= 1.2.3.3
+%{?with_suggest_tags:Suggests: xz}
+Obsoletes: rpm-libs
+# avoid installing with incompatible (non-tukaani) lzma
+# avoid incompatible (-M0 not supported) lzma
+Conflicts: lzma < 1:4.999.5-0.alpha.2
+# avoid SEGV caused by mixed db versions
+Conflicts: poldek < 0.18.1-16
+
+%description lib
+RPMs library.
+
+%description lib -l pl.UTF-8
+Biblioteki RPM-a.
+
+%package devel
+Summary: Header files for rpm libraries
+Summary(de.UTF-8): Header-Dateien für rpm Libraries
+Summary(es.UTF-8): Archivos de inclusión y bibliotecas para programas de manipulación de paquetes rpm
+Summary(pl.UTF-8): Pliki nagłówkowe bibliotek rpm
+Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para programas de manipulação de pacotes RPM
+Summary(ru.UTF-8): Хедеры и библиотеки для программ, работающих с rpm-пакетами
+Summary(uk.UTF-8): Хедери та бібліотеки для програм, що працюють з пакетами rpm
+Group: Development/Libraries
+Requires: %{name}-lib = %{version}-%{release}
+Requires: beecrypt-devel >= %{beecrypt_ver}
+Requires: bzip2-devel
+%{!?with_internal_db:Requires: db-devel >= %{reqdb_ver}}
+Requires: elfutils-devel
+Requires: keyutils-devel
+%{?with_system_libmagic:Requires: libmagic-devel}
+%{?with_selinux:Requires: libselinux-devel}
+Requires: ossp-uuid-devel >= 1.6.2-6
+Requires: popt-devel >= %{reqpopt_ver}
+Requires: zlib-devel >= 1.2.3.3
+
+%description devel
+The RPM packaging system includes C libraries that make it easy to
+manipulate RPM packages and databases. They are intended to ease the
+creation of graphical package managers and other tools that need
+intimate knowledge of RPM packages. This package contains header files
+for these libraries.
+
+%description devel -l de.UTF-8
+Der RPM-Packensystem enthält eine C-Library, die macht es einfach
+RPM-Pakete und Dateibanken zu manipulieren. Er eignet sich für
+Vereinfachung des Schaffens grafischer Paket-Manager und anderer
+Werkzeuge, die intime Kenntnis von RPM-Paketen brauchen.
+
+%description devel -l es.UTF-8
+El sistema de empaquetado RPM incluye una biblioteca C que vuelve
+fácil la manipulación de paquetes y bases de datos RPM. Su objetivo es
+facilitar la creación de administradores gráficos de paquetes y otras
+herramientas que necesiten un conocimiento profundo de paquetes RPM.
+
+%description devel -l pl.UTF-8
+System RPM zawiera biblioteki C, które ułatwiają manipulowanie
+pakietami RPM oraz bazami danych. W zamiarze ma to uprościć tworzenie
+graficznych programów zarządzających pakietami oraz innych narzędzi,
+które wymagają szczegółowej wiedzy na temat pakietów RPM. Ten pakiet
+zawiera pliki nagłówkowe wspomnianych bibliotek.
+
+%description devel -l pt_BR.UTF-8
+O sistema de empacotamento RPM inclui uma biblioteca C que torna fácil
+a manipulação de pacotes e bases de dados RPM. Seu objetivo é
+facilitar a criação de gerenciadores gráficos de pacotes e outras
+ferramentas que precisem de conhecimento profundo de pacotes RPM.
+
+%description devel -l ru.UTF-8
+Система управления пакетами RPM содержит библиотеку C, которая
+упрощает манипуляцию пакетами RPM и соответствующими базами данных.
+Эта библиотека предназначена для облегчения создания графических
+пакетных менеджеров и других утилит, которым необходимо работать с
+пакетами RPM.
+
+%description devel -l uk.UTF-8
+Система керування пакетами RPM містить бібліотеку C, котра спрощує
+роботу з пакетами RPM та відповідними базами даних. Ця бібліотека
+призначена для полегшення створення графічних пакетних менеджерів та
+інших утиліт, що працюють з пакетами RPM.
+
+%package static
+Summary: RPM static libraries
+Summary(de.UTF-8): RPMs statische Libraries
+Summary(pl.UTF-8): Biblioteki statyczne RPM-a
+Summary(pt_BR.UTF-8): Bibliotecas estáticas para o desenvolvimento de aplicações RPM
+Summary(ru.UTF-8): Статическая библиотека для программ, работающих с rpm-пакетами
+Summary(uk.UTF-8): Статична бібліотека для програм, що працюють з пакетами rpm
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: beecrypt-static >= %{beecrypt_ver}
+Requires: bzip2-static
+%{!?with_internal_db:Requires: db-static >= %{reqdb_ver}}
+Requires: elfutils-static
+Requires: keyutils-static
+%{?with_system_libmagic:Requires: libmagic-static}
+Requires: popt-static >= %{reqpopt_ver}
+Requires: zlib-static >= 1.2.3.3
+
+%description static
+RPM static libraries.
+
+%description static -l de.UTF-8
+RPMs statische Libraries.
+
+%description static -l pl.UTF-8
+Biblioteki statyczne RPM-a.
+
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para desenvolvimento.
+
+%description static -l ru.UTF-8
+Система управления пакетами RPM содержит библиотеку C, которая
+упрощает манипуляцию пакетами RPM и соответствующими базами данных.
+Это статическая библиотека RPM.
+
+%description static -l uk.UTF-8
+Система керування пакетами RPM містить бібліотеку C, котра спрощує
+роботу з пакетами RPM та відповідними базами даних. Це статична
+бібліотека RPM.
+
+%package utils
+Summary: Additional utilities for managing RPM packages and database
+Summary(de.UTF-8): Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
+Summary(pl.UTF-8): Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+Requires: popt >= %{reqpopt_ver}
+Conflicts: filesystem-debuginfo < 3.0-16
+
+%description utils
+Additional utilities for managing RPM packages and database.
+
+%description utils -l de.UTF-8
+Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken.
+
+%description utils -l pl.UTF-8
+Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami.
+
+%package utils-perl
+Summary: Additional utilities for managing RPM packages and database
+Summary(de.UTF-8): Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
+Summary(pl.UTF-8): Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
+Group: Applications/File
+Requires: %{name}-utils = %{version}-%{release}
+Requires: popt >= %{reqpopt_ver}
+
+%description utils-perl
+Additional utilities for managing RPM packages and database.
+
+%description utils-perl -l de.UTF-8
+Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken.
+
+%description utils-perl -l pl.UTF-8
+Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami.
+
+%package utils-static
+Summary: Static rpm utilities
+Summary(pl.UTF-8): Statyczne narzędzia rpm
+Group: Applications/System
+Requires: %{name} = %{version}-%{release}
+
+%description utils-static
+Static rpm utilities for repairing system in case something with
+shared libraries used by rpm become broken. Currently it contains rpmi
+binary, which can be used to install/upgrade/remove packages without
+using shared libraries (well, in fact with exception of NSS modules).
+
+%description utils-static -l pl.UTF-8
+Statyczne narzędzia rpm do naprawy systemu w przypadku zepsucia czegoś
+związanego z bibliotekami współdzielonymi używanymi przez rpm-a.
+Aktualnie pakiet zawiera binarkę rpmi, którą można użyć do instalacji,
+uaktualniania lub usuwania pakietów bez udziału bibliotek statycznych
+(z wyjątkiem modułów NSS).
+
+%package build
+Summary: Scripts for building binary RPM packages
+Summary(de.UTF-8): Scripts fürs Bauen binärer RPM-Pakete
+Summary(pl.UTF-8): Skrypty pomocnicze do budowania binarnych RPM-ów
+Summary(pt_BR.UTF-8): Scripts e programas executáveis usados para construir pacotes
+Summary(ru.UTF-8): Скрипты и утилиты, необходимые для сборки пакетов
+Summary(uk.UTF-8): Скрипти та утиліти, необхідні для побудови пакетів
+Group: Applications/File
+Requires(pretrans): findutils
+Requires: %{name}-build-macros >= 1.514
+Requires: %{name}-utils = %{version}-%{release}
+Requires: /bin/id
+Requires: awk
+Requires: bzip2
+Requires: chrpath >= 0.10-4
+Requires: cpio
+Requires: diffutils
+Requires: elfutils
+Requires: file >= 4.17
+Requires: fileutils
+Requires: findutils
+# rpmrc patch adds flags specific to gcc >= 3.4
+Requires: gcc >= 5:3.4
+Requires: glibc-devel
+Requires: grep
+Requires: gzip
+Requires: make
+Requires: patch
+Requires: sed
+Requires: sh-utils
+Requires: tar
+Requires: textutils
+Requires: xz
+Provides: rpmbuild(monoautodeps)
+Provides: rpmbuild(noauto) = 3
+%ifarch %{x8664}
+Conflicts: automake < 1:1.7.9-2
+Conflicts: libtool < 2:1.5-13
+%endif
+
+%description build
+Scripts for building binary RPM packages.
+
+%description build -l de.UTF-8
+Scripts fürs Bauen binärer RPM-Pakete.
+
+%description build -l pl.UTF-8
+Skrypty pomocnicze do budowania binarnych RPM-ów.
+
+%description build -l pt_BR.UTF-8
+Este pacote contém scripts e programas executáveis que são usados para
+construir pacotes usando o RPM.
+
+%description build -l ru.UTF-8
+Различные вспомогательные скрипты и исполняемые программы, которые
+используются для сборки RPM'ов.
+
+%description build -l uk.UTF-8
+Різноманітні допоміжні скрипти та утиліти, які використовуються для
+побудови RPM'ів.
+
+%package javaprov
+Summary: Additional utilities for checking Java provides/requires in RPM packages
+Summary(pl.UTF-8): Dodatkowe narzędzia do sprawdzania zależności kodu w Javie w pakietach RPM
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+Requires: file
+Requires: findutils >= 1:4.2.26
+Requires: mktemp
+Requires: unzip
+
+%description javaprov
+Additional utilities for checking Java provides/requires in RPM
+packages.
+
+%description javaprov -l pl.UTF-8
+Dodatkowe narzędzia do sprawdzania zależności kodu w Javie w pakietach
+RPM.
+
+%package perlprov
+Summary: Additional utilities for checking Perl provides/requires in RPM packages
+Summary(de.UTF-8): Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
+Summary(pl.UTF-8): Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w pakietach RPM
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+Requires: perl-devel
+Requires: perl-modules
+
+%description perlprov
+Additional utilities for checking Perl provides/requires in RPM
+packages.
+
+%description perlprov -l de.UTF-8
+Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen.
+
+%description perlprov -l pl.UTF-8
+Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w
+pakietach RPM.
+
+%package pythonprov
+Summary: Python macros, which simplifies creation of RPM packages with Python software
+Summary(pl.UTF-8): Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Pythonie
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+Requires: python
+Requires: python-modules
+
+%description pythonprov
+Python macros, which simplifies creation of RPM packages with Python
+software.
+
+%description pythonprov -l pl.UTF-8
+Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w
+Pythonie.
+
+%package php-pearprov
+Summary: Additional utilities for checking PHP PEAR provides/requires in RPM packages
+Summary(pl.UTF-8): Dodatkowe narzędzia do sprawdzania zależności skryptów php w RPM
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+Requires: sed >= 4.0
+
+%description php-pearprov
+Additional utilities for checking PHP PEAR provides/requires in RPM
+packages.
+
+%description php-pearprov -l pl.UTF-8
+Dodatkowe narzędzia do sprawdzenia zależności skryptów PHP PEAR w
+pakietach RPM.
+
+%package -n python-rpm
+Summary: Python interface to RPM library
+Summary(pl.UTF-8): Pythonowy interfejs do biblioteki RPM-a
+Summary(pt_BR.UTF-8): Módulo Python para aplicativos que manipulam pacotes RPM
+Group: Development/Languages/Python
+Requires: %{name} = %{version}-%{release}
+%pyrequires_eq python
+Obsoletes: rpm-python
+
+%description -n python-rpm
+The rpm-python package contains a module which permits applications
+written in the Python programming language to use the interface
+supplied by RPM (RPM Package Manager) libraries.
+
+This package should be installed if you want to develop Python
+programs that will manipulate RPM packages and databases.
+
+%description -n python-rpm -l pl.UTF-8
+Pakiet rpm-python zawiera moduł, który pozwala aplikacjom napisanym w
+Pythonie na używanie interfejsu dostarczanego przez biblioteki RPM-a.
+
+Pakiet ten powinien zostać zainstalowany, jeśli chcesz pisać w
+Pythonie programy manipulujące pakietami i bazami danych rpm.
+
+%description -n python-rpm -l pt_BR.UTF-8
+O pacote rpm-python contém um módulo que permite que aplicações
+escritas em Python utilizem a interface fornecida pelas bibliotecas
+RPM (RPM Package Manager).
+
+Esse pacote deve ser instalado se você quiser desenvolver programas em
+Python para manipular pacotes e bancos de dados RPM.
+
+%package apidocs
+Summary: RPM API documentation and guides
+Summary(pl.UTF-8): Documentacja API RPM-a i przewodniki
+Group: Documentation
+
+%description apidocs
+Documentation for RPM API and guides in HTML format generated from rpm
+sources by doxygen.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
+źrodeł RPM-a przez doxygen.
+
+%prep
+%setup -q
+%patch1000 -p1
+#%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1 -R
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch16 -p1
+%patch17 -p1
+sed -e 's/^/@tld@/' %{SOURCE2} >>platform.in
+echo '%%define __perl_provides %%{__perl} /usr/lib/rpm/perl.prov' > macros.perl
+echo '%%define __perl_requires %%{__perl} /usr/lib/rpm/perl.req' >> macros.perl
+echo '# obsoleted file' > macros.python
+echo '%%define __php_provides /usr/lib/rpm/php.prov' > macros.php
+echo '%%define __php_requires /usr/lib/rpm/php.req' >> macros.php
+echo '%%define __mono_provides /usr/lib/rpm/mono-find-provides' > macros.mono
+echo '%%define __mono_requires /usr/lib/rpm/mono-find-requires' >> macros.mono
+install %{SOURCE10} scripts/php.prov
+install %{SOURCE11} scripts/php.req
+install %{SOURCE13} scripts/perl.prov
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch36 -p1
+%patch37 -p1
+%patch39 -p1
+%patch42 -p1
+%patch43 -p1
+%patch82 -p1
+%{!?with_neon:%patch44 -p1}
+%patch45 -p1
+%patch48 -p1
+%patch50 -p1
+%patch20 -p1
+%patch35 -p1
+%patch51 -p1
+#%patch52 -p1
+%patch55 -p1
+%patch56 -p1
+%patch57 -p1
+%patch58 -p1
+%patch59 -p1
+%patch61 -p1
+%patch62 -p1
+%patch63 -p1
+%patch64 -p1
+%patch65 -p1
+%patch66 -p1
+%patch67 -p1
+%patch69 -p1
+%patch71 -p1
+%patch72 -p1
+%patch73 -p1
+%patch74 -p1
+%patch75 -p0
+# having .py sources in -debuginfo needs more testing
+#%patch76 -p1
+%patch77 -p0
+%patch79 -p1
+%patch80 -p1
+%patch83 -p1
+%patch84 -p1
+%patch85 -p1
+%patch86 -p1
+%patch70 -p0
+%patch87 -p1
+%patch88 -p1
+%patch89 -p1
+%patch90 -p1
+%patch91 -p1
+%patch92 -p1
+%patch93 -p1
+%patch94 -p1
+%patch95 -p1
+%patch96 -p1
+%patch97 -p1
+%patch98 -p1
+%patch99 -p1
+%patch53 -p1
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+
+mv -f po/{sr,sr@Latn}.po
+rm -rf sqlite zlib popt
+
+%if %{with internal_db}
+%if %{without nptl}
+sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' db/dist/aclocal/mutex.ac
+%endif
+%patch78 -p1
+%patch81 -p1
+%else
+%patch15 -p1
+rm -rf db3 db rpmdb/db.h
+%endif
+
+# generate Group translations to *.po
+awk -f %{SOURCE6} %{SOURCE1}
+
+# update macros paths
+for f in doc{,/ja,/pl}/rpm.8 doc{,/ja,/pl}/rpmbuild.8 ; do
+ sed -e 's@lib/rpm/redhat@lib/rpm/tld@g' $f > ${f}.tmp
+ mv -f ${f}.tmp $f
+done
+
+%build
+%if %{with system_libmagic}
+rm -rf file
+%else
+cd file
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+cd ..
+%endif
+
+%{__libtoolize}
+%{__gettextize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+%if %{with internal_db}
+cd db3
+echo -e 'AC_CONFIG_AUX_DIR(.)\nAC_PROG_LIBTOOL'> configure.ac
+%{__libtoolize}
+rm -f configure.ac
+cd ../db
+cp -f /usr/share/aclocal/libtool.m4 dist/aclocal/libtool.ac
+cp -f /usr/share/automake/config.sub dist
+if [ -f /usr/share/libtool/config/ltmain.sh ]; then
+ cp -f /usr/share/libtool/config/ltmain.sh dist
+else
+ cp -f /usr/share/libtool/ltmain.sh dist
+fi
+cd ..
+%endif
+
+# rpm checks for CPU type at runtime, but it looks better
+sed -i \
+ -e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \
+ -e 's|@host_cpu@|%{_target_cpu}|' \
+ -e 's|@host_os@|%{_target_os}|' \
+ macros.in
+
+# pass CC and CXX too in case of building with some older configure macro
+# disable perl-RPM2 build, we have it in separate spec
+CPPFLAGS="%{rpmcppflags} -I/usr/include/ossp-uuid"
+%configure \
+ CC="%{__newcc}" \
+ CXX="%{__newcxx}" \
+ CPP="%{__newcpp}" \
+ WITH_PERL_VERSION=no \
+ %{?with_autoreqdep:--enable-adding-packages-names-in-autogenerated-dependancies} \
+ --enable-shared \
+ --enable-static \
+ %{!?with_apidocs:--without-apidocs} \
+ %{?with_python:--with-python=%{py_ver}} \
+ %{!?with_python:--without-python} \
+ %{!?with_selinux:--without-selinux} \
+ %{?with_internal_db:--%{?with_nptl:en}%{!?with_nptl:dis}able-posixmutexes} \
+ --without-db
+
+%{__make} \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ CPP="%{__cpp}" \
+ libdb_la=%{_libdir}/libdb.la \
+ pylibdir=%{py_libdir} \
+ myLDFLAGS="%{rpmldflags}" \
+ staticLDFLAGS=%{?with_static:-all-static}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/%{_lib},/etc/{sysconfig,tmpwatch},%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT \
+ staticLDFLAGS=%{?with_static:-all-static} \
+ pylibdir=%{py_libdir} \
+ pkgbindir="%{_bindir}"
+
+cat <<'EOF' > $RPM_BUILD_ROOT/etc/tmpwatch/rpm.conf
+# Cleanup 90-days old repackage files.
+/var/spool/repackage 2160
+EOF
+
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
+# first platform file entry can't contain regexps
+%{_target_cpu}-%{_target_vendor}-linux
+
+%ifarch x86_64
+# x86_64 things
+amd64-[^-]*-[Ll]inux(-gnu)?
+x86_64-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch amd64
+amd64-[^-]*-[Ll]inux(-gnu)?
+x86_64-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch ia32e
+ia32e-[^-]*-[Ll]inux(-gnu)?
+x86_64-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+%ifarch athlon %{x8664}
+# x86 things
+athlon-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch pentium4 athlon %{x8664}
+pentium4-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch pentium3 pentium4 athlon %{x8664}
+pentium3-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch i686 pentium3 pentium4 athlon %{x8664}
+i686-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch i586 i686 pentium3 pentium4 athlon %{x8664}
+i586-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch i486 i586 i686 pentium3 pentium4 athlon %{x8664}
+i486-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch %{ix86} %{x8664}
+i386-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+%ifarch alpha
+alpha-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+%ifarch ia64
+ia64-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+%ifarch ppc64
+powerpc64-[^-]*-[Ll]inux(-gnu)?
+ppc64-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch ppc ppc64
+powerpc-[^-]*-[Ll]inux(-gnu)?
+ppc-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+%ifarch s390x
+s390x-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch s390 s390x
+s390-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+%ifarch sparc64
+sparc64-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch sparcv9 sparc64
+sparcv9-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch sparc sparcv9 sparc64
+sparc-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv5tel
+armv5tel-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv4t armv5tel
+armv4t-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv3t armv4t armv5tel
+armv3t-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv5teb
+armv5teb-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv4b armv5teb
+armv4b-[^-]*-[Ll]inux(-gnu)?
+%endif
+
+# noarch
+noarch-[^-]*-.*
+EOF
+
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/vpkg-provides*
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{prov,req}.pl
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{provides,requires}.perl
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
+
+# not installed since 4.4.8 (-tools-perl subpackage)
+install -p scripts/rpmdiff scripts/rpmdiff.cgi $RPM_BUILD_ROOT%{_rpmlibdir}
+
+cp -a macros.perl $RPM_BUILD_ROOT%{_rpmlibdir}/macros.perl
+cp -a macros.python $RPM_BUILD_ROOT%{_rpmlibdir}/macros.python
+cp -a macros.php $RPM_BUILD_ROOT%{_rpmlibdir}/macros.php
+cp -a macros.mono $RPM_BUILD_ROOT%{_rpmlibdir}/macros.mono
+cp -a %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.java
+cp -a %{SOURCE19} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.gstreamer
+
+install -p %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
+install -p %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond
+install -p %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc
+install -p %{SOURCE14} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
+install -p %{SOURCE17} $RPM_BUILD_ROOT%{_rpmlibdir}/java-find-requires
+install -p scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir}
+install -p %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache
+install -p %{SOURCE18} $RPM_BUILD_ROOT%{_bindir}/banner.sh
+cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/rpm
+
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo
+touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Conflictname
+touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Dirnames
+cp -a %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Filelinktos
+touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Obsoletename
+touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Providename
+touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Requirename
+
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <<EOF
+# customized rpm macros - global for host
+#
+%%distribution TLD
+#
+# remove or replace with file_contexts path if you want to use custom
+# SELinux file contexts policy instead of one stored in packages payload
+%%_install_file_context_path %%{nil}
+%%_verify_file_context_path %%{nil}
+
+# If non-zero, all erasures will be automagically repackaged.
+#%%_repackage_all_erasures 0
+
+# If non-zero, create debuginfo packages
+#%%_enable_debug_packages 0
+
+# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
+# marked as %doc should be installed.
+#%%_excludedocs 1
+EOF
+
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.lang <<EOF
+# Customized rpm macros - global for host
+# A colon separated list of desired locales to be installed;
+# "all" means install all locale specific files.
+#
+#%%_install_langs pl_PL:en_US
+EOF
+
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles <<EOF
+# global list of files (regexps) which don't generate Provides
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprov <<EOF
+# global list of script capabilities (regexps) not to be used in Provides
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles <<EOF
+# global list of files (regexps) which don't generate Requires
+^%{_examplesdir}/
+^%{_docdir}/
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreq <<EOF
+# global list of script capabilities (regexps) not to be used in Requires
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqdep <<EOF
+# global list of capabilities (SONAME, perl(module), php(module) regexps)
+# which don't generate dependencies on package NAMES
+# -- OpenGL implementation
+^libGL.so.1
+^libGLU.so.1
+^libOSMesa.so
+# -- Glide
+^libglide3.so.3
+# -- mozilla
+^libgtkmozembed.so
+^libgtksuperwin.so
+^libxpcom.so
+# -- X11 implementation
+^libFS.so
+^libI810XvMC.so
+^libICE.so
+^libSM.so
+^libX11.so
+^libXRes.so
+^libXTrap.so
+^libXaw.so
+^libXcomposite.so
+^libXcursor.so
+^libXdamage.so
+^libXdmcp.so
+^libXevie.so
+^libXext.so
+^libXfixes.so
+^libXfont.so
+^libXfontcache.so
+^libXft.so
+^libXi.so
+^libXinerama.so
+^libXmu.so
+^libXmuu.so
+^libXp.so
+^libXpm.so
+^libXrandr.so
+^libXrender.so
+^libXss.so
+^libXt.so
+^libXtst.so
+^libXv.so
+^libXvMC.so
+^libXxf86dga.so
+^libXxf86misc.so
+^libXxf86rush.so
+^libXxf86vm.so
+^libdps.so
+^libdpstk.so
+^libfontenc.so
+^libpsres.so
+^libxkbfile.so
+^libxkbui.so
+# -- fam / gamin
+^libfam.so.0
+# -- mdns-bonjour: mDNSResponder-libs / avahi-compat-libdns_sd
+^libdns_sd.so.1
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautocompressdoc <<EOF
+# global list of file masks not to be compressed in DOCDIR
+EOF
+
+# for rpm -e|-U --repackage
+install -d $RPM_BUILD_ROOT/var/{spool/repackage,lock/rpm}
+touch $RPM_BUILD_ROOT/var/lock/rpm/transaction
+
+# move rpm to /bin
+install -d $RPM_BUILD_ROOT/bin
+mv $RPM_BUILD_ROOT%{_bindir}/rpm $RPM_BUILD_ROOT/bin
+# move essential libs to /lib (libs that /bin/rpm links to)
+for a in librpm-%{sover}.so librpmdb-%{sover}.so librpmio-%{sover}.so ; do
+ mv -f $RPM_BUILD_ROOT%{_libdir}/$a $RPM_BUILD_ROOT/%{_lib}
+ ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
+done
+
+# remove arch dependant macros which have no use on noarch
+%{__sed} -i -e '
+/{__spec_install_post_strip}/d
+/{__spec_install_post_chrpath}/d
+/{__spec_install_post_compress_modules}/d
+' $RPM_BUILD_ROOT%{_rpmlibdir}/noarch-linux/macros
+
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+
+rm -f $RPM_BUILD_ROOT%{py_sitedir}/rpm/*.{la,a,py}
+
+# (currently) not used or supported in PLD
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/{http.req,perldeps.pl}
+# wrong location, not used anyway
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log,xinetd}
+
+# unpackaged in 4.4.9, reasons unknown
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/symclash.{sh,py}
+%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/RPM.pm
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RPM/.packlist
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RPM/RPM.bs
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RPM/RPM.so
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/RPM.3pm
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{,ja,pl}/man8/rpm{cache,graph}.8
+
+%find_lang %{name}
+
+rm -rf manual
+cp -a doc/manual manual
+cp -a %{SOURCE1} manual/groups
+rm -f manual/Makefile*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%triggerpostun lib -- %{name}-lib < %{version}
+echo >&2 "rpm-lib upgrade: Removing /var/lib/rpm/__db* from older rpmdb version"
+rm -f /var/lib/rpm/__db*
+if [ -d /vservers ]; then
+ echo >&2 "rpm-lib upgrade: Removing vservers apps/pkgmgmt/base/rpm/state/__* from older rpmdb version"
+ rm -f /etc/vservers/*/apps/pkgmgmt/base/rpm/state/__*
+fi
+echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
+
+%triggerpostun lib -- db4.5 < %{reqdb_ver}
+echo >&2 "db4.5 upgrade: Removing /var/lib/rpm/__db* from older rpmdb version"
+rm -f /var/lib/rpm/__db*
+if [ -d /vservers ]; then
+ echo >&2 "db4.5 upgrade: Removing vservers apps/pkgmgmt/base/rpm/state/__* from older rpmdb version"
+ rm -f /etc/vservers/*/apps/pkgmgmt/base/rpm/state/__*
+fi
+echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
+
+%triggerpostun -- %{name} < 4.4.9-44
+%{_rpmlibdir}/hrmib-cache
+
+%post lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
+
+%pretrans build
+find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc CHANGES CREDITS README manual/*
+
+%attr(755,root,root) /bin/rpm
+
+%config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/rpm.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
+%dir %{_sysconfdir}/rpm/sysinfo
+# these are ok to be replaced
+%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/sysinfo/*
+%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform
+
+
+%{_mandir}/man8/rpm.8*
+%lang(fr) %{_mandir}/fr/man8/rpm.8*
+%lang(ja) %{_mandir}/ja/man8/rpm.8*
+%lang(ko) %{_mandir}/ko/man8/rpm.8*
+%lang(pl) %{_mandir}/pl/man8/rpm.8*
+%lang(ru) %{_mandir}/ru/man8/rpm.8*
+%lang(sk) %{_mandir}/sk/man8/rpm.8*
+
+%dir /var/lib/rpm
+%dir %attr(700,root,root) /var/spool/repackage
+%dir /var/lock/rpm
+/var/lock/rpm/transaction
+
+# exported package NVRA (stamped with install tid)
+# net-snmp hrSWInstalledName queries, bash-completions
+%dir /var/cache/hrmib
+
+#%attr(755,root,root) %{_rpmlibdir}/rpmd
+#%{!?with_static:%attr(755,root,root) %{_rpmlibdir}/rpm[eiu]}
+#%attr(755,root,root) %{_rpmlibdir}/rpmk
+#%attr(755,root,root) %{_rpmlibdir}/rpm[qv]
+
+%{_rpmlibdir}/rpmpopt*
+%{_rpmlibdir}/macros
+
+%attr(755,root,root) %{_rpmlibdir}/hrmib-cache
+
+%files base
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/rpm
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpm
+%dir %{_rpmlibdir}
+%attr(755,root,root) %{_bindir}/banner.sh
+%attr(755,root,root) %{_rpmlibdir}/user_group.sh
+%dir /var/lib/banner
+
+%files lib
+%defattr(644,root,root,755)
+%attr(755,root,root) /%{_lib}/librpm-%{sover}.so
+%attr(755,root,root) /%{_lib}/librpmdb-%{sover}.so
+%attr(755,root,root) /%{_lib}/librpmio-%{sover}.so
+%attr(755,root,root) %{_libdir}/librpmbuild-%{sover}.so
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/librpm.so
+%attr(755,root,root) %{_libdir}/librpm-%{sover}.so
+%attr(755,root,root) %{_libdir}/librpmio.so
+%attr(755,root,root) %{_libdir}/librpmio-%{sover}.so
+%attr(755,root,root) %{_libdir}/librpmdb.so
+%attr(755,root,root) %{_libdir}/librpmdb-%{sover}.so
+%attr(755,root,root) %{_libdir}/librpmbuild.so
+%{_libdir}/librpm.la
+%{_libdir}/librpmbuild.la
+%{_libdir}/librpmdb.la
+%{_libdir}/librpmio.la
+%{_includedir}/rpm
+%{_pkgconfigdir}/rpm.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/librpm.a
+%{_libdir}/librpmbuild.a
+%{_libdir}/librpmdb.a
+%{_libdir}/librpmio.a
+
+%files utils
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rpm2cpio
+%attr(755,root,root) %{_bindir}/rpmdigest
+%attr(755,root,root) %{_bindir}/rpmmtree
+%attr(755,root,root) %{_bindir}/rpmrepo
+%{!?with_system_libmagic:%attr(755,root,root) %{_bindir}/rpmfile}
+%attr(755,root,root) %{_rpmlibdir}/debugedit
+%attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_loadcvt
+%attr(755,root,root) %{_rpmlibdir}/rpmdeps
+%attr(755,root,root) %{_rpmlibdir}/tgpg
+%{_mandir}/man8/rpm2cpio.8*
+%{_mandir}/man8/rpmdeps.8*
+%lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
+%lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
+%lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
+%lang(pl) %{_mandir}/pl/man8/rpmdeps.8*
+%lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
+
+%files utils-perl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_rpmlibdir}/rpmdiff*
+
+%if %{with static}
+%files utils-static
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rpm[ieu]
+%attr(755,root,root) %{_rpmlibdir}/rpm[ieu]
+%endif
+
+%files build
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/noauto*
+%attr(755,root,root) %{_rpmlibdir}/brp-*
+%attr(755,root,root) %{_rpmlibdir}/check-files
+# %attr(755,root,root) %{_rpmlibdir}/check-prereqs
+%attr(755,root,root) %{_rpmlibdir}/compress-doc
+%attr(755,root,root) %{_rpmlibdir}/cross-build
+%attr(755,root,root) %{_rpmlibdir}/find-spec-bcond
+%attr(755,root,root) %{_rpmlibdir}/getpo.sh
+%attr(755,root,root) %{_rpmlibdir}/install-build-tree
+#%attr(755,root,root) %{_rpmlibdir}/config.*
+#%attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
+%attr(755,root,root) %{_rpmlibdir}/u_pkg.sh
+%attr(755,root,root) %{_rpmlibdir}/executabledeps.sh
+%attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
+%attr(755,root,root) %{_rpmlibdir}/mimetypedeps.sh
+# needs hacked pkg-config to return anything
+%attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
+#%attr(755,root,root) %{_rpmlibdir}/rpmb
+#%attr(755,root,root) %{_rpmlibdir}/rpmt
+%{_rpmlibdir}/noarch-*
+%ifarch %{ix86}
+%{_rpmlibdir}/i?86*
+%{_rpmlibdir}/pentium*
+%{_rpmlibdir}/athlon*
+%endif
+%ifarch alpha
+%{_rpmlibdir}/alpha*
+%endif
+%ifarch ia64
+%{_rpmlibdir}/ia64*
+%endif
+%ifarch mips mipsel mips64 mips64el
+%{_rpmlibdir}/mips*
+%endif
+%ifarch %{ppc}
+%{_rpmlibdir}/ppc*
+%endif
+%ifarch sparc sparcv9 sparc64
+%{_rpmlibdir}/sparc*
+%endif
+%ifarch %{x8664}
+%{_rpmlibdir}/amd64*
+%{_rpmlibdir}/ia32e*
+%{_rpmlibdir}/x86_64*
+%endif
+%ifarch armv5tel armv4t armv3t armv5teb armv4b
+%{_rpmlibdir}/arm*
+%endif
+# must be here for "Requires: rpm-*prov" to work
+%{_rpmlibdir}/macros.gstreamer
+%{_rpmlibdir}/macros.java
+%{_rpmlibdir}/macros.mono
+%{_rpmlibdir}/macros.perl
+%{_rpmlibdir}/macros.php
+# not used yet ... these six depend on perl
+#%attr(755,root,root) %{_rpmlibdir}/http.req
+#%attr(755,root,root) %{_rpmlibdir}/magic.prov
+#%attr(755,root,root) %{_rpmlibdir}/magic.req
+#%{_rpmlibdir}/sql.prov
+#%{_rpmlibdir}/sql.req
+#%{_rpmlibdir}/tcl.req
+
+%attr(755,root,root) %{_bindir}/gendiff
+%attr(755,root,root) %{_bindir}/rpmbuild
+
+%{_mandir}/man1/gendiff.1*
+%{_mandir}/man8/rpmbuild.8*
+%lang(ja) %{_mandir}/ja/man8/rpmbuild.8*
+%lang(pl) %{_mandir}/pl/man1/gendiff.1*
+%lang(pl) %{_mandir}/pl/man8/rpmbuild.8*
+
+%files javaprov
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_rpmlibdir}/java-find-requires
+# needs jar (any jdk), jcf-dump (gcc-java) to work
+%attr(755,root,root) %{_rpmlibdir}/javadeps.sh
+
+%files perlprov
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_rpmlibdir}/perl.*
+#%attr(755,root,root) %{_rpmlibdir}/perldeps.pl
+#%attr(755,root,root) %{_rpmlibdir}/find-perl-*
+#%attr(755,root,root) %{_rpmlibdir}/find-*.perl
+#%attr(755,root,root) %{_rpmlibdir}/find-prov.pl
+#%attr(755,root,root) %{_rpmlibdir}/find-req.pl
+#%attr(755,root,root) %{_rpmlibdir}/get_magic.pl
+
+%files pythonprov
+%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.python
+%attr(755,root,root) %{_rpmlibdir}/pythondeps.sh
+
+%files php-pearprov
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_rpmlibdir}/php*
+
+%if %{with python}
+%files -n python-rpm
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/rpm
+%attr(755,root,root) %{py_sitedir}/rpm/*.so
+%{py_sitedir}/rpm/*.py[co]
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc apidocs
+%endif
--- /dev/null
+# This file is intended for setting rpm options that cannot be set as macros
+#
+# NOTE:
+# At this moment only few packages use this features.
+
+# How verbose the .rpm scripts/triggers should be?
+RPM_SCRIPTVERBOSITY=5
+
+# Should unused users be removed at package deinstallation?
+RPM_USERDEL=yes
+
+# Should automatic restarts from rpm upgrades be skipped?
+# You can also disable this per service, if service supports it from
+# /etc/sysconfig/SERVICE
+#RPM_SKIP_AUTO_RESTART=yes
--- /dev/null
+/proc/self/fd
+/dev/fd/0
+/dev/fd/1
+/dev/fd/2