From 685372ccad422be5593dabe2ed2d89f19037e7ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20=C5=9Awi=C4=85tek?= Date: Mon, 3 Oct 2011 02:31:55 +0200 Subject: [PATCH 1/1] - new from pld cvs @rpm-4_5 branch - adjustments for TLD, may be not finished, dunno exactly --- banner.sh | 285 +++ perl.prov | 140 ++ pythondeps-speedup.patch | 25 + rpm-arch-x86_64.patch | 11 + rpm-arch.patch | 33 + rpm-as_needed-fix.patch | 22 + rpm-builddir-readlink.patch | 26 + rpm-chroot-hack.patch | 28 + rpm-cleanbody.patch | 10 + rpm-cleanlibdirs.patch | 45 + rpm-compress-doc | 85 + rpm-compress-doc.patch | 30 + rpm-db-configure.patch | 1293 ++++++++++++++ rpm-db.patch | 13 + rpm-db3-configure.patch | 66 + rpm-debugdir.patch | 12 + rpm-debugedit-workaround.patch | 29 + rpm-debuginfo.patch | 47 + rpm-dirdeps-macro.patch | 45 + rpm-disable-features-ti.patch | 20 + rpm-disable-features.patch | 42 + rpm-disable-hkp.patch | 13 + rpm-doxygen_hack.patch | 26 + rpm-epoch0.patch | 15 + rpm-etc_dir.patch | 69 + rpm-find-spec-bcond | 64 + rpm-gendiff.patch | 8 + rpm-gettext-in-header.patch | 12 + rpm-gid-uucp.patch | 29 + rpm-glob.patch | 34 + rpm-groups-po.awk | 20 + rpm-gstreamer.patch | 31 + rpm-hack-norpmlibdep.patch | 11 + rpm-hirmib-ts.patch | 11 + rpm-hrmib-cache | 22 + rpm-install-tree | 3 + rpm-installbeforeerase.patch | 52 + rpm-java-requires | 126 ++ rpm-ldconfig-always.patch | 14 + rpm-libmagic-locale.patch | 22 + rpm-libtool-deps.patch | 64 + rpm-link-selinux.patch | 13 + rpm-link.patch | 11 + rpm-lua-exit-chroot-correctly.patch | 38 + rpm-lzma-compress-level.patch | 26 + rpm-lzma-mem.patch | 11 + rpm-lzma-size_t.patch | 11 + rpm-lzma-tukaani.patch | 20 + rpm-macros-cpp.patch | 10 + rpm-macros-ti.patch | 40 + rpm-macros.gstreamer | 1 + rpm-macros.java | 2 + rpm-macros.patch | 160 ++ rpm-makefile-no_myLDADD_deps.patch | 12 + rpm-man_pl.patch | 10 + rpm-missing-prototypes.patch | 31 + rpm-mono.patch | 11 + rpm-morearchs.patch | 106 ++ rpm-namespace-probe.patch | 39 + rpm-new-debuginfo.patch | 382 ++++ rpm-no-neon.patch | 2313 +++++++++++++++++++++++++ rpm-no-sqlite.patch | 27 + rpm-noexpand.patch | 56 + rpm-nopie.patch | 29 + rpm-nosmpflags.patch | 13 + rpm-notsc.patch | 11 + rpm-noversiondir.patch | 58 + rpm-old-fileconflicts-behaviour.patch | 21 + rpm-perl-macros.patch | 48 + rpm-perl-makefile.patch | 11 + rpm-perl_req-heredocs_pod.patch | 56 + rpm-perl_req-skip_multiline.patch | 15 + rpm-perl_req-use_base.patch | 32 + rpm-php-provides | 20 + rpm-php-requires | 82 + rpm-pkgconfig.patch | 36 + rpm-pkgconfigdeps.patch | 11 + rpm-pld-autodep.patch | 563 ++++++ rpm-po.patch | 11 + rpm-popt-aliases.patch | 22 + rpm-popt-coreutils.patch | 13 + rpm-poptexecpath.patch | 11 + rpm-postun-nofail.patch | 13 + rpm-provides-dont-obsolete.patch | 17 + rpm-pydebuginfo.patch | 52 + rpm-repackage-wo-lzma.patch | 42 + rpm-rpm5-debugedit.patch | 449 +++++ rpm-rpm5-patchset-10061.patch | 42 + rpm-rpm5-patchset-8074.patch | 45 + rpm-rpm5-patchset-8413.patch | 158 ++ rpm-rpm5-patchset-8637.patch | 12 + rpm-rpmpopt.patch | 54 + rpm-rpmrc-ac.patch | 178 ++ rpm-rpmrc.patch | 140 ++ rpm-rpmte-segv.patch | 17 + rpm-rpmv3-support.patch | 168 ++ rpm-scripts-closefds.patch | 19 + rpm-set-failed-on-reopen.patch | 12 + rpm-shescape-memfault.patch | 59 + rpm-sigpad.patch | 39 + rpm-system_libs-more.patch | 52 + rpm-system_libs.patch | 81 + rpm-tar_as_secondary_source.patch | 30 + rpm-truncate-cvslog.patch | 64 + rpm-unglobal.patch | 74 + rpm-user_group.sh | 145 ++ rpm-v3-support.patch | 25 + rpm.groups | 1600 +++++++++++++++++ rpm.platform | 38 + rpm.spec | 1422 +++++++++++++++ rpm.sysconfig | 15 + rpm.sysinfo | 4 + 112 files changed, 12412 insertions(+) create mode 100644 banner.sh create mode 100644 perl.prov create mode 100644 pythondeps-speedup.patch create mode 100644 rpm-arch-x86_64.patch create mode 100644 rpm-arch.patch create mode 100644 rpm-as_needed-fix.patch create mode 100644 rpm-builddir-readlink.patch create mode 100644 rpm-chroot-hack.patch create mode 100644 rpm-cleanbody.patch create mode 100644 rpm-cleanlibdirs.patch create mode 100644 rpm-compress-doc create mode 100644 rpm-compress-doc.patch create mode 100644 rpm-db-configure.patch create mode 100644 rpm-db.patch create mode 100644 rpm-db3-configure.patch create mode 100644 rpm-debugdir.patch create mode 100644 rpm-debugedit-workaround.patch create mode 100644 rpm-debuginfo.patch create mode 100644 rpm-dirdeps-macro.patch create mode 100644 rpm-disable-features-ti.patch create mode 100644 rpm-disable-features.patch create mode 100644 rpm-disable-hkp.patch create mode 100644 rpm-doxygen_hack.patch create mode 100644 rpm-epoch0.patch create mode 100644 rpm-etc_dir.patch create mode 100644 rpm-find-spec-bcond create mode 100644 rpm-gendiff.patch create mode 100644 rpm-gettext-in-header.patch create mode 100644 rpm-gid-uucp.patch create mode 100644 rpm-glob.patch create mode 100644 rpm-groups-po.awk create mode 100644 rpm-gstreamer.patch create mode 100644 rpm-hack-norpmlibdep.patch create mode 100644 rpm-hirmib-ts.patch create mode 100644 rpm-hrmib-cache create mode 100644 rpm-install-tree create mode 100644 rpm-installbeforeerase.patch create mode 100755 rpm-java-requires create mode 100644 rpm-ldconfig-always.patch create mode 100644 rpm-libmagic-locale.patch create mode 100644 rpm-libtool-deps.patch create mode 100644 rpm-link-selinux.patch create mode 100644 rpm-link.patch create mode 100644 rpm-lua-exit-chroot-correctly.patch create mode 100644 rpm-lzma-compress-level.patch create mode 100644 rpm-lzma-mem.patch create mode 100644 rpm-lzma-size_t.patch create mode 100644 rpm-lzma-tukaani.patch create mode 100644 rpm-macros-cpp.patch create mode 100644 rpm-macros-ti.patch create mode 100644 rpm-macros.gstreamer create mode 100644 rpm-macros.java create mode 100644 rpm-macros.patch create mode 100644 rpm-makefile-no_myLDADD_deps.patch create mode 100644 rpm-man_pl.patch create mode 100644 rpm-missing-prototypes.patch create mode 100644 rpm-mono.patch create mode 100644 rpm-morearchs.patch create mode 100644 rpm-namespace-probe.patch create mode 100644 rpm-new-debuginfo.patch create mode 100644 rpm-no-neon.patch create mode 100644 rpm-no-sqlite.patch create mode 100644 rpm-noexpand.patch create mode 100644 rpm-nopie.patch create mode 100644 rpm-nosmpflags.patch create mode 100644 rpm-notsc.patch create mode 100644 rpm-noversiondir.patch create mode 100644 rpm-old-fileconflicts-behaviour.patch create mode 100644 rpm-perl-macros.patch create mode 100644 rpm-perl-makefile.patch create mode 100644 rpm-perl_req-heredocs_pod.patch create mode 100644 rpm-perl_req-skip_multiline.patch create mode 100644 rpm-perl_req-use_base.patch create mode 100644 rpm-php-provides create mode 100644 rpm-php-requires create mode 100644 rpm-pkgconfig.patch create mode 100644 rpm-pkgconfigdeps.patch create mode 100644 rpm-pld-autodep.patch create mode 100644 rpm-po.patch create mode 100644 rpm-popt-aliases.patch create mode 100644 rpm-popt-coreutils.patch create mode 100644 rpm-poptexecpath.patch create mode 100644 rpm-postun-nofail.patch create mode 100644 rpm-provides-dont-obsolete.patch create mode 100644 rpm-pydebuginfo.patch create mode 100644 rpm-repackage-wo-lzma.patch create mode 100644 rpm-rpm5-debugedit.patch create mode 100644 rpm-rpm5-patchset-10061.patch create mode 100644 rpm-rpm5-patchset-8074.patch create mode 100644 rpm-rpm5-patchset-8413.patch create mode 100644 rpm-rpm5-patchset-8637.patch create mode 100644 rpm-rpmpopt.patch create mode 100644 rpm-rpmrc-ac.patch create mode 100644 rpm-rpmrc.patch create mode 100644 rpm-rpmte-segv.patch create mode 100644 rpm-rpmv3-support.patch create mode 100644 rpm-scripts-closefds.patch create mode 100644 rpm-set-failed-on-reopen.patch create mode 100644 rpm-shescape-memfault.patch create mode 100644 rpm-sigpad.patch create mode 100644 rpm-system_libs-more.patch create mode 100644 rpm-system_libs.patch create mode 100644 rpm-tar_as_secondary_source.patch create mode 100644 rpm-truncate-cvslog.patch create mode 100644 rpm-unglobal.patch create mode 100755 rpm-user_group.sh create mode 100644 rpm-v3-support.patch create mode 100755 rpm.groups create mode 100644 rpm.platform create mode 100644 rpm.spec create mode 100644 rpm.sysconfig create mode 100644 rpm.sysinfo diff --git a/banner.sh b/banner.sh new file mode 100644 index 0000000..5c92c5c --- /dev/null +++ b/banner.sh @@ -0,0 +1,285 @@ +#!/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 + + + diff --git a/perl.prov b/perl.prov new file mode 100644 index 0000000..8f1a79d --- /dev/null +++ b/perl.prov @@ -0,0 +1,140 @@ +#!/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 () { + + # 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 if the package name matches the path, +# so you can use() it. C 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 diff --git a/pythondeps-speedup.patch b/pythondeps-speedup.patch new file mode 100644 index 0000000..98f6039 --- /dev/null +++ b/pythondeps-speedup.patch @@ -0,0 +1,25 @@ +--- 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). + # diff --git a/rpm-arch-x86_64.patch b/rpm-arch-x86_64.patch new file mode 100644 index 0000000..11100c0 --- /dev/null +++ b/rpm-arch-x86_64.patch @@ -0,0 +1,11 @@ +--- 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 + diff --git a/rpm-arch.patch b/rpm-arch.patch new file mode 100644 index 0000000..e185db6 --- /dev/null +++ b/rpm-arch.patch @@ -0,0 +1,33 @@ +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 diff --git a/rpm-as_needed-fix.patch b/rpm-as_needed-fix.patch new file mode 100644 index 0000000..119831c --- /dev/null +++ b/rpm-as_needed-fix.patch @@ -0,0 +1,22 @@ +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@ diff --git a/rpm-builddir-readlink.patch b/rpm-builddir-readlink.patch new file mode 100644 index 0000000..11afecf --- /dev/null +++ b/rpm-builddir-readlink.patch @@ -0,0 +1,26 @@ +--- 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 diff --git a/rpm-chroot-hack.patch b/rpm-chroot-hack.patch new file mode 100644 index 0000000..472eb6d --- /dev/null +++ b/rpm-chroot-hack.patch @@ -0,0 +1,28 @@ +--- 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). */ diff --git a/rpm-cleanbody.patch b/rpm-cleanbody.patch new file mode 100644 index 0000000..f8b29ef --- /dev/null +++ b/rpm-cleanbody.patch @@ -0,0 +1,10 @@ +--- 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 */ diff --git a/rpm-cleanlibdirs.patch b/rpm-cleanlibdirs.patch new file mode 100644 index 0000000..e2d6930 --- /dev/null +++ b/rpm-cleanlibdirs.patch @@ -0,0 +1,45 @@ +--- 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 = \ diff --git a/rpm-compress-doc b/rpm-compress-doc new file mode 100644 index 0000000..3c5ff93 --- /dev/null +++ b/rpm-compress-doc @@ -0,0 +1,85 @@ +#!/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." diff --git a/rpm-compress-doc.patch b/rpm-compress-doc.patch new file mode 100644 index 0000000..90fa456 --- /dev/null +++ b/rpm-compress-doc.patch @@ -0,0 +1,30 @@ +--- 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 diff --git a/rpm-db-configure.patch b/rpm-db-configure.patch new file mode 100644 index 0000000..7391551 --- /dev/null +++ b/rpm-db-configure.patch @@ -0,0 +1,1293 @@ +--- 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 = \ diff --git a/rpm-db.patch b/rpm-db.patch new file mode 100644 index 0000000..5ea06e1 --- /dev/null +++ b/rpm-db.patch @@ -0,0 +1,13 @@ +--- 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) diff --git a/rpm-db3-configure.patch b/rpm-db3-configure.patch new file mode 100644 index 0000000..41d0c08 --- /dev/null +++ b/rpm-db3-configure.patch @@ -0,0 +1,66 @@ +--- 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 diff --git a/rpm-debugdir.patch b/rpm-debugdir.patch new file mode 100644 index 0000000..ff534f7 --- /dev/null +++ b/rpm-debugdir.patch @@ -0,0 +1,12 @@ +--- 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. + # diff --git a/rpm-debugedit-workaround.patch b/rpm-debugedit-workaround.patch new file mode 100644 index 0000000..00facee --- /dev/null +++ b/rpm-debugedit-workaround.patch @@ -0,0 +1,29 @@ +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 diff --git a/rpm-debuginfo.patch b/rpm-debuginfo.patch new file mode 100644 index 0000000..537f8bc --- /dev/null +++ b/rpm-debuginfo.patch @@ -0,0 +1,47 @@ +--- 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} diff --git a/rpm-dirdeps-macro.patch b/rpm-dirdeps-macro.patch new file mode 100644 index 0000000..2cef12d --- /dev/null +++ b/rpm-dirdeps-macro.patch @@ -0,0 +1,45 @@ +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); + diff --git a/rpm-disable-features-ti.patch b/rpm-disable-features-ti.patch new file mode 100644 index 0000000..b9200e8 --- /dev/null +++ b/rpm-disable-features-ti.patch @@ -0,0 +1,20 @@ +--- 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 diff --git a/rpm-disable-features.patch b/rpm-disable-features.patch new file mode 100644 index 0000000..f839135 --- /dev/null +++ b/rpm-disable-features.patch @@ -0,0 +1,42 @@ +--- 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 diff --git a/rpm-disable-hkp.patch b/rpm-disable-hkp.patch new file mode 100644 index 0000000..ca42361 --- /dev/null +++ b/rpm-disable-hkp.patch @@ -0,0 +1,13 @@ +--- 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. diff --git a/rpm-doxygen_hack.patch b/rpm-doxygen_hack.patch new file mode 100644 index 0000000..4654eba --- /dev/null +++ b/rpm-doxygen_hack.patch @@ -0,0 +1,26 @@ +--- 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 \ diff --git a/rpm-epoch0.patch b/rpm-epoch0.patch new file mode 100644 index 0000000..cdf2b5f --- /dev/null +++ b/rpm-epoch0.patch @@ -0,0 +1,15 @@ +--- 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; + diff --git a/rpm-etc_dir.patch b/rpm-etc_dir.patch new file mode 100644 index 0000000..80cc580 --- /dev/null +++ b/rpm-etc_dir.patch @@ -0,0 +1,69 @@ +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" diff --git a/rpm-find-spec-bcond b/rpm-find-spec-bcond new file mode 100644 index 0000000..f641453 --- /dev/null +++ b/rpm-find-spec-bcond @@ -0,0 +1,64 @@ +#!/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 + diff --git a/rpm-gendiff.patch b/rpm-gendiff.patch new file mode 100644 index 0000000..6eec5b1 --- /dev/null +++ b/rpm-gendiff.patch @@ -0,0 +1,8 @@ +--- ./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 " 1>&2 diff --git a/rpm-gettext-in-header.patch b/rpm-gettext-in-header.patch new file mode 100644 index 0000000..9e3ff96 --- /dev/null +++ b/rpm-gettext-in-header.patch @@ -0,0 +1,12 @@ +--- 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; + } + + /** diff --git a/rpm-gid-uucp.patch b/rpm-gid-uucp.patch new file mode 100644 index 0000000..765adf0 --- /dev/null +++ b/rpm-gid-uucp.patch @@ -0,0 +1,29 @@ +--- 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; + } + } diff --git a/rpm-glob.patch b/rpm-glob.patch new file mode 100644 index 0000000..189c9e5 --- /dev/null +++ b/rpm-glob.patch @@ -0,0 +1,34 @@ +--- 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 + + diff --git a/rpm-groups-po.awk b/rpm-groups-po.awk new file mode 100644 index 0000000..40c3e14 --- /dev/null +++ b/rpm-groups-po.awk @@ -0,0 +1,20 @@ +#!/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" + } +} diff --git a/rpm-gstreamer.patch b/rpm-gstreamer.patch new file mode 100644 index 0000000..15c189a --- /dev/null +++ b/rpm-gstreamer.patch @@ -0,0 +1,31 @@ +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 + #*/ diff --git a/rpm-hack-norpmlibdep.patch b/rpm-hack-norpmlibdep.patch new file mode 100644 index 0000000..05e8902 --- /dev/null +++ b/rpm-hack-norpmlibdep.patch @@ -0,0 +1,11 @@ +--- 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"); + diff --git a/rpm-hirmib-ts.patch b/rpm-hirmib-ts.patch new file mode 100644 index 0000000..4a8bbb1 --- /dev/null +++ b/rpm-hirmib-ts.patch @@ -0,0 +1,11 @@ +--- 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; diff --git a/rpm-hrmib-cache b/rpm-hrmib-cache new file mode 100644 index 0000000..8ee25bb --- /dev/null +++ b/rpm-hrmib-cache @@ -0,0 +1,22 @@ +#!/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 diff --git a/rpm-install-tree b/rpm-install-tree new file mode 100644 index 0000000..0232381 --- /dev/null +++ b/rpm-install-tree @@ -0,0 +1,3 @@ +#!/bin/sh + +install -d `rpm --eval "%{_rpmdir} %{_specdir} %{_sourcedir} %{_srcrpmdir} %{_builddir}"` diff --git a/rpm-installbeforeerase.patch b/rpm-installbeforeerase.patch new file mode 100644 index 0000000..33715cf --- /dev/null +++ b/rpm-installbeforeerase.patch @@ -0,0 +1,52 @@ + 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. */ diff --git a/rpm-java-requires b/rpm-java-requires new file mode 100755 index 0000000..dc069c8 --- /dev/null +++ b/rpm-java-requires @@ -0,0 +1,126 @@ +#!/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 + +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 diff --git a/rpm-ldconfig-always.patch b/rpm-ldconfig-always.patch new file mode 100644 index 0000000..fbf86d4 --- /dev/null +++ b/rpm-ldconfig-always.patch @@ -0,0 +1,14 @@ +--- 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; + + /* diff --git a/rpm-libmagic-locale.patch b/rpm-libmagic-locale.patch new file mode 100644 index 0000000..b257407 --- /dev/null +++ b/rpm-libmagic-locale.patch @@ -0,0 +1,22 @@ +--- 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; diff --git a/rpm-libtool-deps.patch b/rpm-libtool-deps.patch new file mode 100644 index 0000000..4dc62f4 --- /dev/null +++ b/rpm-libtool-deps.patch @@ -0,0 +1,64 @@ +--- 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 diff --git a/rpm-link-selinux.patch b/rpm-link-selinux.patch new file mode 100644 index 0000000..7672a19 --- /dev/null +++ b/rpm-link-selinux.patch @@ -0,0 +1,13 @@ +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) + diff --git a/rpm-link.patch b/rpm-link.patch new file mode 100644 index 0000000..3ea978b --- /dev/null +++ b/rpm-link.patch @@ -0,0 +1,11 @@ +--- 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) diff --git a/rpm-lua-exit-chroot-correctly.patch b/rpm-lua-exit-chroot-correctly.patch new file mode 100644 index 0000000..c71ed1c --- /dev/null +++ b/rpm-lua-exit-chroot-correctly.patch @@ -0,0 +1,38 @@ +--- 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; + } diff --git a/rpm-lzma-compress-level.patch b/rpm-lzma-compress-level.patch new file mode 100644 index 0000000..c77311e --- /dev/null +++ b/rpm-lzma-compress-level.patch @@ -0,0 +1,26 @@ +--- 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, diff --git a/rpm-lzma-mem.patch b/rpm-lzma-mem.patch new file mode 100644 index 0000000..544c247 --- /dev/null +++ b/rpm-lzma-mem.patch @@ -0,0 +1,11 @@ +--- 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); + } diff --git a/rpm-lzma-size_t.patch b/rpm-lzma-size_t.patch new file mode 100644 index 0000000..1f5a0fe --- /dev/null +++ b/rpm-lzma-size_t.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/rpm-lzma-tukaani.patch b/rpm-lzma-tukaani.patch new file mode 100644 index 0000000..c68cb48 --- /dev/null +++ b/rpm-lzma-tukaani.patch @@ -0,0 +1,20 @@ +--- 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 diff --git a/rpm-macros-cpp.patch b/rpm-macros-cpp.patch new file mode 100644 index 0000000..e3282af --- /dev/null +++ b/rpm-macros-cpp.patch @@ -0,0 +1,10 @@ +--- 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 diff --git a/rpm-macros-ti.patch b/rpm-macros-ti.patch new file mode 100644 index 0000000..cb94949 --- /dev/null +++ b/rpm-macros-ti.patch @@ -0,0 +1,40 @@ +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 diff --git a/rpm-macros.gstreamer b/rpm-macros.gstreamer new file mode 100644 index 0000000..b9b366b --- /dev/null +++ b/rpm-macros.gstreamer @@ -0,0 +1 @@ +%define __gstreamer_provides /usr/lib/rpm/gstreamerdeps.sh --provides diff --git a/rpm-macros.java b/rpm-macros.java new file mode 100644 index 0000000..30e1539 --- /dev/null +++ b/rpm-macros.java @@ -0,0 +1,2 @@ +%define __java_provides %{nil} +%define __java_requires env RPM_BUILD_ROOT=%{buildroot} /usr/lib/rpm/java-find-requires diff --git a/rpm-macros.patch b/rpm-macros.patch new file mode 100644 index 0000000..481fae8 --- /dev/null +++ b/rpm-macros.patch @@ -0,0 +1,160 @@ +--- 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) diff --git a/rpm-makefile-no_myLDADD_deps.patch b/rpm-makefile-no_myLDADD_deps.patch new file mode 100644 index 0000000..f67d01d --- /dev/null +++ b/rpm-makefile-no_myLDADD_deps.patch @@ -0,0 +1,12 @@ +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: diff --git a/rpm-man_pl.patch b/rpm-man_pl.patch new file mode 100644 index 0000000..db61324 --- /dev/null +++ b/rpm-man_pl.patch @@ -0,0 +1,10 @@ +--- 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" diff --git a/rpm-missing-prototypes.patch b/rpm-missing-prototypes.patch new file mode 100644 index 0000000..c4b4cab --- /dev/null +++ b/rpm-missing-prototypes.patch @@ -0,0 +1,31 @@ +--- 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 + #include + #include +--- 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 + #include + #include ++#include "legacy.h" + + #define FA_MAGIC 0x02050920 + diff --git a/rpm-mono.patch b/rpm-mono.patch new file mode 100644 index 0000000..25604d3 --- /dev/null +++ b/rpm-mono.patch @@ -0,0 +1,11 @@ +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 }, + diff --git a/rpm-morearchs.patch b/rpm-morearchs.patch new file mode 100644 index 0000000..7cd8a5e --- /dev/null +++ b/rpm-morearchs.patch @@ -0,0 +1,106 @@ +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 diff --git a/rpm-namespace-probe.patch b/rpm-namespace-probe.patch new file mode 100644 index 0000000..d7f271b --- /dev/null +++ b/rpm-namespace-probe.patch @@ -0,0 +1,39 @@ +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: diff --git a/rpm-new-debuginfo.patch b/rpm-new-debuginfo.patch new file mode 100644 index 0000000..b7170c0 --- /dev/null +++ b/rpm-new-debuginfo.patch @@ -0,0 +1,382 @@ +--- 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 '(|)$' | ++ (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 diff --git a/rpm-no-neon.patch b/rpm-no-neon.patch new file mode 100644 index 0000000..bd926d1 --- /dev/null +++ b/rpm-no-neon.patch @@ -0,0 +1,2313 @@ +--- 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 + #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 + + #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) diff --git a/rpm-no-sqlite.patch b/rpm-no-sqlite.patch new file mode 100644 index 0000000..5a686a5 --- /dev/null +++ b/rpm-no-sqlite.patch @@ -0,0 +1,27 @@ +--- 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 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 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) diff --git a/rpm-noexpand.patch b/rpm-noexpand.patch new file mode 100644 index 0000000..781a54e --- /dev/null +++ b/rpm-noexpand.patch @@ -0,0 +1,56 @@ +--- 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" { diff --git a/rpm-nopie.patch b/rpm-nopie.patch new file mode 100644 index 0000000..84def0d --- /dev/null +++ b/rpm-nopie.patch @@ -0,0 +1,29 @@ +--- 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@ + diff --git a/rpm-nosmpflags.patch b/rpm-nosmpflags.patch new file mode 100644 index 0000000..04bcb34 --- /dev/null +++ b/rpm-nosmpflags.patch @@ -0,0 +1,13 @@ +--- 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 diff --git a/rpm-notsc.patch b/rpm-notsc.patch new file mode 100644 index 0000000..17eb68a --- /dev/null +++ b/rpm-notsc.patch @@ -0,0 +1,11 @@ +--- 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) diff --git a/rpm-noversiondir.patch b/rpm-noversiondir.patch new file mode 100644 index 0000000..c0697cd --- /dev/null +++ b/rpm-noversiondir.patch @@ -0,0 +1,58 @@ +--- 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 \ diff --git a/rpm-old-fileconflicts-behaviour.patch b/rpm-old-fileconflicts-behaviour.patch new file mode 100644 index 0000000..9869de2 --- /dev/null +++ b/rpm-old-fileconflicts-behaviour.patch @@ -0,0 +1,21 @@ +--- 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 "), + N_("") }, + +- { "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}, + diff --git a/rpm-perl-macros.patch b/rpm-perl-macros.patch new file mode 100644 index 0000000..0744b9f --- /dev/null +++ b/rpm-perl-macros.patch @@ -0,0 +1,48 @@ +--- 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; diff --git a/rpm-perl-makefile.patch b/rpm-perl-makefile.patch new file mode 100644 index 0000000..9387e26 --- /dev/null +++ b/rpm-perl-makefile.patch @@ -0,0 +1,11 @@ +--- 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' ], diff --git a/rpm-perl_req-heredocs_pod.patch b/rpm-perl_req-heredocs_pod.patch new file mode 100644 index 0000000..5d7d9f2 --- /dev/null +++ b/rpm-perl_req-heredocs_pod.patch @@ -0,0 +1,56 @@ +--- 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 () { +- +- # skip the "= <<" block + +- if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) || +- ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) { +- $tag = $2; +- while () { +- ( $_ =~ /^$tag/) && last; +- } ++ # skip the documentation ++ if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) { ++ $_ = 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/(? 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/{([/})]/; +- $_ = 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; ++ $_ = until m/\Q$tag\E/ or eof; + } + + # skip the data section diff --git a/rpm-perl_req-skip_multiline.patch b/rpm-perl_req-skip_multiline.patch new file mode 100644 index 0000000..e94feb3 --- /dev/null +++ b/rpm-perl_req-skip_multiline.patch @@ -0,0 +1,15 @@ +--- 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 () { +- ( $_ =~ m/\}/ ) && last; +- } ++ $tag =~ tr/{([/})]/; ++ $_ = until m/\Q$tag\E/; + } + + # skip the documentation diff --git a/rpm-perl_req-use_base.patch b/rpm-perl_req-use_base.patch new file mode 100644 index 0000000..cdb0a7c --- /dev/null +++ b/rpm-perl_req-use_base.patch @@ -0,0 +1,32 @@ +--- 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 diff --git a/rpm-php-provides b/rpm-php-provides new file mode 100644 index 0000000..a094cba --- /dev/null +++ b/rpm-php-provides @@ -0,0 +1,20 @@ +#!/usr/bin/perl +##################################################################### +# # +# Check system dependences between php-pear modules # +# # +# Pawe³ Go³aszewski # +# Micha³ Moskal # +# ------------------------------------------------------------------# +# TODO: # +##################################################################### + +$pear = "/usr/share/pear"; + +foreach (@ARGV ? @ARGV : <>) { + chomp; + $f = $_; + next unless ($f =~ /$pear.*\.php$/); + $f =~ s/.*$pear\///; + print "pear($f)\n"; +} diff --git a/rpm-php-requires b/rpm-php-requires new file mode 100644 index 0000000..2a3fb60 --- /dev/null +++ b/rpm-php-requires @@ -0,0 +1,82 @@ +#!/usr/bin/perl +##################################################################### +# # +# Check system dependences between php-pear modules # +# # +# Pawe³ Go³aszewski # +# Micha³ Moskal # +# ------------------------------------------------------------------# +# 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 () { + # 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"; +} diff --git a/rpm-pkgconfig.patch b/rpm-pkgconfig.patch new file mode 100644 index 0000000..add421a --- /dev/null +++ b/rpm-pkgconfig.patch @@ -0,0 +1,36 @@ +--- 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 diff --git a/rpm-pkgconfigdeps.patch b/rpm-pkgconfigdeps.patch new file mode 100644 index 0000000..9cc82f5 --- /dev/null +++ b/rpm-pkgconfigdeps.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/rpm-pld-autodep.patch b/rpm-pld-autodep.patch new file mode 100644 index 0000000..1a3ee0e --- /dev/null +++ b/rpm-pld-autodep.patch @@ -0,0 +1,563 @@ +--- 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 + #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 + #include ++#include ++#include + + #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;itracked && 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 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"); + } + + diff --git a/rpm-po.patch b/rpm-po.patch new file mode 100644 index 0000000..38be040 --- /dev/null +++ b/rpm-po.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/rpm-popt-aliases.patch b/rpm-popt-aliases.patch new file mode 100644 index 0000000..6ddd2da --- /dev/null +++ b/rpm-popt-aliases.patch @@ -0,0 +1,22 @@ +--- 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 + #*/ diff --git a/rpm-popt-coreutils.patch b/rpm-popt-coreutils.patch new file mode 100644 index 0000000..250ae97 --- /dev/null +++ b/rpm-popt-coreutils.patch @@ -0,0 +1,13 @@ +--- 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 \ diff --git a/rpm-poptexecpath.patch b/rpm-poptexecpath.patch new file mode 100644 index 0000000..c08fba2 --- /dev/null +++ b/rpm-poptexecpath.patch @@ -0,0 +1,11 @@ +--- 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) { diff --git a/rpm-postun-nofail.patch b/rpm-postun-nofail.patch new file mode 100644 index 0000000..12a6406 --- /dev/null +++ b/rpm-postun-nofail.patch @@ -0,0 +1,13 @@ +--- 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)) { diff --git a/rpm-provides-dont-obsolete.patch b/rpm-provides-dont-obsolete.patch new file mode 100644 index 0000000..5e764dc --- /dev/null +++ b/rpm-provides-dont-obsolete.patch @@ -0,0 +1,17 @@ +--- 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 diff --git a/rpm-pydebuginfo.patch b/rpm-pydebuginfo.patch new file mode 100644 index 0000000..1c9eac4 --- /dev/null +++ b/rpm-pydebuginfo.patch @@ -0,0 +1,52 @@ +--- 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 diff --git a/rpm-repackage-wo-lzma.patch b/rpm-repackage-wo-lzma.patch new file mode 100644 index 0000000..5daf06b --- /dev/null +++ b/rpm-repackage-wo-lzma.patch @@ -0,0 +1,42 @@ +--- 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 ++#include + #include + #include + #include +@@ -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")) diff --git a/rpm-rpm5-debugedit.patch b/rpm-rpm5-debugedit.patch new file mode 100644 index 0000000..0401ddf --- /dev/null +++ b/rpm-rpm5-debugedit.patch @@ -0,0 +1,449 @@ +--- 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 , 2002 + Based on code by Jakub Jelinek , 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; + } diff --git a/rpm-rpm5-patchset-10061.patch b/rpm-rpm5-patchset-10061.patch new file mode 100644 index 0000000..04df009 --- /dev/null +++ b/rpm-rpm5-patchset-10061.patch @@ -0,0 +1,42 @@ +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@*/ diff --git a/rpm-rpm5-patchset-8074.patch b/rpm-rpm5-patchset-8074.patch new file mode 100644 index 0000000..687e185 --- /dev/null +++ b/rpm-rpm5-patchset-8074.patch @@ -0,0 +1,45 @@ +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")); diff --git a/rpm-rpm5-patchset-8413.patch b/rpm-rpm5-patchset-8413.patch new file mode 100644 index 0000000..0df6b33 --- /dev/null +++ b/rpm-rpm5-patchset-8413.patch @@ -0,0 +1,158 @@ +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) diff --git a/rpm-rpm5-patchset-8637.patch b/rpm-rpm5-patchset-8637.patch new file mode 100644 index 0000000..09538ec --- /dev/null +++ b/rpm-rpm5-patchset-8637.patch @@ -0,0 +1,12 @@ +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@*/ diff --git a/rpm-rpmpopt.patch b/rpm-rpmpopt.patch new file mode 100644 index 0000000..6c44d0e --- /dev/null +++ b/rpm-rpmpopt.patch @@ -0,0 +1,54 @@ +--- 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