]> TLD Linux GIT Repositories - packages/rpm.git/commitdiff
- rpm.org RPM, merged from PLD
authorMarcin Krol <hawk@tld-linux.org>
Thu, 29 Oct 2020 21:35:44 +0000 (22:35 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 29 Oct 2020 21:35:44 +0000 (22:35 +0100)
140 files changed:
aarch64.patch [new file with mode: 0644]
banner.sh [changed mode: 0644->0755]
dbupgrade.sh [new file with mode: 0755]
gem_helper.rb [deleted file]
ix86-platforms.patch [moved from rpm-arch.patch with 52% similarity]
macros.lang [new file with mode: 0644]
macros.local [new file with mode: 0644]
macros.php [deleted file]
notrans.patch [deleted file]
pkgconfig.patch [new file with mode: 0644]
python-internal-build.patch [new file with mode: 0644]
pythondeps-speedup.patch [deleted file]
rpm-am.patch [deleted file]
rpm-arch-x86_64.patch [deleted file]
rpm-as_needed-fix.patch [deleted file]
rpm-automake_1.12.patch [deleted file]
rpm-builddir-readlink.patch
rpm-changelog_order_check_nonfatal.patch
rpm-chroot-hack.patch [deleted file]
rpm-clean-docdir.patch [new file with mode: 0644]
rpm-cleanbody.patch [deleted file]
rpm-cleanlibdirs.patch [deleted file]
rpm-compress-doc.patch [deleted file]
rpm-db-configure.patch [deleted file]
rpm-db.patch [deleted file]
rpm-db3-configure.patch [deleted file]
rpm-debugdir.patch [deleted file]
rpm-debugedit-dwarf4.patch [deleted file]
rpm-debugedit-workaround.patch [deleted file]
rpm-debuginfo.patch
rpm-dirdeps-macro.patch [deleted file]
rpm-disable-features-ti.patch [deleted file]
rpm-disable-hkp.patch [deleted file]
rpm-div0.patch [deleted file]
rpm-doxygen_hack.patch [deleted file]
rpm-epoch0.patch [deleted file]
rpm-etc_dir.patch [deleted file]
rpm-gendiff.patch [deleted file]
rpm-gettext-in-header.patch [deleted file]
rpm-gid-uucp.patch [deleted file]
rpm-glibc.patch [deleted file]
rpm-glob.patch [deleted file]
rpm-gstreamer.patch [deleted file]
rpm-hack-norpmlibdep.patch [deleted file]
rpm-helperEVR-noassert.patch [deleted file]
rpm-hirmib-ts.patch [deleted file]
rpm-ignore-missing-macro-files.patch [new file with mode: 0644]
rpm-installbeforeerase.patch [deleted file]
rpm-installplatform.patch [deleted file]
rpm-ldconfig-always.patch [deleted file]
rpm-libmagic-locale.patch [deleted file]
rpm-libtool-deps.patch
rpm-link-selinux.patch [deleted file]
rpm-link.patch [deleted file]
rpm-lua-exit-chroot-correctly.patch [deleted file]
rpm-lzma-compress-level.patch [deleted file]
rpm-lzma-mem.patch [deleted file]
rpm-lzma-size_t.patch [deleted file]
rpm-lzma-tukaani.patch [deleted file]
rpm-macros-cpp.patch [deleted file]
rpm-macros-ti.patch [deleted file]
rpm-macros.gstreamer [deleted file]
rpm-macros.java [deleted file]
rpm-macros.patch [deleted file]
rpm-makefile-no_myLDADD_deps.patch [deleted file]
rpm-man_pl.patch
rpm-missing-prototypes.patch [deleted file]
rpm-mono.patch [deleted file]
rpm-namespace-probe.patch [deleted file]
rpm-new-debuginfo.patch [deleted file]
rpm-no-neon.patch [deleted file]
rpm-no-sqlite.patch [deleted file]
rpm-noarch-subpackages.patch [deleted file]
rpm-noexpand.patch [deleted file]
rpm-nopie.patch [deleted file]
rpm-nosmpflags.patch [deleted file]
rpm-notsc.patch [deleted file]
rpm-noversiondir.patch [deleted file]
rpm-old-fileconflicts-behaviour.patch [deleted file]
rpm-perl-macros.patch
rpm-perl-magic.patch [new file with mode: 0644]
rpm-perl-makefile.patch [deleted file]
rpm-perl-req-perlfile.patch [new file with mode: 0644]
rpm-perl_req-INC_dirs.patch [new file with mode: 0644]
rpm-perl_req-heredocs_pod.patch [deleted file]
rpm-perl_req-skip_multiline.patch [deleted file]
rpm-perl_req-use_base.patch [deleted file]
rpm-pkgconfig.patch [deleted file]
rpm-pkgconfigdeps.patch [deleted file]
rpm-pld-autodep.patch [deleted file]
rpm-po.patch [deleted file]
rpm-popt-aliases.patch
rpm-popt-coreutils.patch [deleted file]
rpm-poptexecpath.patch [deleted file]
rpm-postun-nofail.patch
rpm-provides-dont-obsolete.patch [deleted file]
rpm-pythondeps.patch [deleted file]
rpm-repackage-wo-lzma.patch [deleted file]
rpm-rpm2cpio-xz.patch [deleted file]
rpm-rpm5-debugedit.patch [deleted file]
rpm-rpm5-patchset-10061.patch [deleted file]
rpm-rpm5-patchset-8074.patch [deleted file]
rpm-rpm5-patchset-8413.patch [deleted file]
rpm-rpm5-patchset-8637.patch [deleted file]
rpm-rpmpopt.patch [deleted file]
rpm-rpmrc.patch [deleted file]
rpm-rpmte-segv.patch [deleted file]
rpm-rpmv3-support.patch [deleted file]
rpm-ruby-gem-build.patch [deleted file]
rpm-rubyprov.patch [deleted file]
rpm-scripts-closefds.patch
rpm-set-failed-on-reopen.patch [deleted file]
rpm-shescape-memfault.patch [deleted file]
rpm-shrink.patch [deleted file]
rpm-sigpad.patch [deleted file]
rpm-system_libs-more.patch [deleted file]
rpm-system_libs.patch [deleted file]
rpm-tar_as_secondary_source.patch [deleted file]
rpm-tld-macros.patch [deleted file]
rpm-trigger-flags-int-type.patch [deleted file]
rpm-truncate-cvslog.patch [deleted file]
rpm-unglobal.patch [deleted file]
rpm-v3-support.patch [deleted file]
rpm-xz.patch [deleted file]
rpm.groups [changed mode: 0755->0644]
rpm.noautoprov [new file with mode: 0644]
rpm.noautoprovfiles [new file with mode: 0644]
rpm.noautoreq [new file with mode: 0644]
rpm.noautoreqfiles [new file with mode: 0644]
rpm.platform [deleted file]
rpm.spec
rpm.sysconfig
rpm.sysinfo [deleted file]
rpm5-db-compat.patch [new file with mode: 0644]
rpmdb_checkversion.c [new file with mode: 0644]
rpmdb_reset.c [new file with mode: 0644]
rpmversion.patch [new file with mode: 0644]
rubygems.rb [deleted file]
uname-deps.patch [new file with mode: 0644]
x32.patch [new file with mode: 0644]

diff --git a/aarch64.patch b/aarch64.patch
new file mode 100644 (file)
index 0000000..8013c2a
--- /dev/null
@@ -0,0 +1,13 @@
+--- rpm-4.16.0/installplatform.orig    2020-10-24 21:48:07.586493242 +0200
++++ rpm-4.16.0/installplatform 2020-10-24 21:48:23.069703643 +0200
+@@ -207,6 +207,10 @@
+       LIB=${LIB}x32
+   fi
++  if [ "$OS" = "linux" ] && [ "$CANONARCH" = "aarch64" ]; then
++      LIB=${LIB}64
++  fi
++
+   PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
+   [ -d $PPD ] || mkdir -p $PPD
old mode 100644 (file)
new mode 100755 (executable)
index 5c92c5c..e421556
--- a/banner.sh
+++ b/banner.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# bug reports send to pzurowski@pld-linux.org or pld-devel-* lists
+# Please send bug reports to pzurowski@pld-linux.org or pld-devel-* lists
 #
 # 2004, GPL 2+
 #
 #
 # 2004, GPL 2+
 #
@@ -10,7 +10,7 @@ CONFIG=/etc/sysconfig/banner
 
 ####################################################### CONFIG ########
 
 
 ####################################################### CONFIG ########
 
-# default paramaters
+# default parameters
 ##########################
 
 BANNERDIR="/var/lib/banner/"
 ##########################
 
 BANNERDIR="/var/lib/banner/"
@@ -19,7 +19,7 @@ EXCLUDEFILES="(rpmnew$|rpmsave$|~$)"
 STDOUT="1"  # stdout by default
 #STDOUT="2" # stderr by default
 
 STDOUT="1"  # stdout by default
 #STDOUT="2" # stderr by default
 
-# config paramaeters
+# config parameters
 ##########################
 
 if [ -r $CONFIG ]; then
 ##########################
 
 if [ -r $CONFIG ]; then
@@ -50,53 +50,43 @@ esac
 
 #################################################### FUNCTIONS ########
 
 
 #################################################### FUNCTIONS ########
 
-Usage()
-{
+Usage() {
        cat << EOF
        cat << EOF
-Usage: $(basename $0) [opitions] [banners]
+Usage: $(basename $0) [options] [banners]
 EOF
 }
 EOF
 }
-Help()
-{
+
+Help() {
        Usage
        cat << EOF
        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
+-a, --all       - all banners
+-d, --delete    - delete specified 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 specified 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.
+[1] if there is no slash ('/') in the given name default dir ($BANNERDIR) is used,
+    otherwise the one that's specified
 EOF
 }
 EOF
 }
-Unknown_para()
-{
+
+Unknown_para() {
        cat << EOF
 Unknown parameter $1
 EOF
        Help
 }
 
        cat << EOF
 Unknown parameter $1
 EOF
        Help
 }
 
-check_banners_mtime()
-{
+check_banners_mtime() {
        BANNERS="$1"
        OLDER="$2"
        NEWER="$3"
        BANNERS="$1"
        OLDER="$2"
        NEWER="$3"
@@ -112,34 +102,34 @@ check_banners_mtime()
                echo $BANNER
        done
 }
                echo $BANNER
        done
 }
-delete_banners()
-{
+
+delete_banners() {
        BANNERS="$1"
        rm -rf $(get_banner_location_list "$BANNER")
 }
        BANNERS="$1"
        rm -rf $(get_banner_location_list "$BANNER")
 }
-get_all_banner_list()
-{
+
+get_all_banner_list() {
        ls "$BANNERDIR" | grep -E -v "$EXCLUDEFILES"
 }
        ls "$BANNERDIR" | grep -E -v "$EXCLUDEFILES"
 }
-get_banner_list()
-{
+
+get_banner_list() {
        BANNERS="$1"
        NOBANNERS="$2"
        for BANNER in $BANNERS; do
        BANNERS="$1"
        NOBANNERS="$2"
        for BANNER in $BANNERS; do
-               if [ -r "$BANNERDIR/$BANNER" ];then
+               if [ -r "$BANNERDIR/$BANNER" ]; then
                        echo $NOBANNERS | grep -q $BANNER || echo $BANNER
                fi
        done
 }
                        echo $NOBANNERS | grep -q $BANNER || echo $BANNER
                fi
        done
 }
-get_banner_location_list()
-{
+
+get_banner_location_list() {
        BANNERS="$1"
        for BANNER in $BANNERS; do
                echo "$BANNERDIR/$BANNER"
        done
 }
        BANNERS="$1"
        for BANNER in $BANNERS; do
                echo "$BANNERDIR/$BANNER"
        done
 }
-make_banner()
-{
+
+make_banner() {
        BANNER="$1"
        SHOW="$2"
        if [ ! -d "${BANNER%/*}" ]; then
        BANNER="$1"
        SHOW="$2"
        if [ ! -d "${BANNER%/*}" ]; then
@@ -151,27 +141,28 @@ make_banner()
        else
                echo "$data" >> $BANNER
        fi
        else
                echo "$data" >> $BANNER
        fi
-       if [ $SHOW -eq 1 ];then
+       if [ $SHOW -eq 1 ]; then
                echo "$data"
        fi
 }
                echo "$data"
        fi
 }
-show_banner()
-{
-       cat $BANNERDIR/$1 >&$STDOUT
+
+show_banner() {
+       cat "$BANNERDIR/$1" >&$STDOUT
 }
 }
-show_banners()
-{
+
+show_banners() {
        for BANNER in $*; do
                show_banner $BANNER
        done
 }
        for BANNER in $*; do
                show_banner $BANNER
        done
 }
-######################################################## MAIN ########
-while [ ! -z $1 ]; do
-       case $1 in
+
+######################################################### MAIN ########
+while [ -n "$1" ]; do
+       case "$1" in
                -a|--all)
                        ALL_BANNERS=1
                        ;;
                -a|--all)
                        ALL_BANNERS=1
                        ;;
-               --delete)
+               -d|--delete)
                        NEED_BANNER_LIST=1
                        ACTION="delete"
                        ;;
                        NEED_BANNER_LIST=1
                        ACTION="delete"
                        ;;
@@ -187,18 +178,18 @@ while [ ! -z $1 ]; do
                        ;;
                -m|--make|-M)
                        NEED_BANNER_LIST=0
                        ;;
                -m|--make|-M)
                        NEED_BANNER_LIST=0
-                       if [[ $2 != */* ]]; then
+                       if [[ "$2" != */* ]]; then
                                NEW_BANNER="$BANNERDIR/${2##*/}"
                        else
                                NEW_BANNER="$2"
                        fi
                        ACTION="make"
                                NEW_BANNER="$BANNERDIR/${2##*/}"
                        else
                                NEW_BANNER="$2"
                        fi
                        ACTION="make"
-                       if [ "$1" == "-M" ];then
+                       if [ "$1" = "-M" ]; then
                                NEW_APPEND=1
                        else
                                NEW_APPEND=0
                        fi
                                NEW_APPEND=1
                        else
                                NEW_APPEND=0
                        fi
-                       if [ -z "$NEW_BANNER" ];then
+                       if [ -z "$NEW_BANNER" ]; then
                                Help
                                exit 2
                        fi
                                Help
                                exit 2
                        fi
@@ -211,7 +202,7 @@ while [ ! -z $1 ]; do
                --newer)
                        NEED_MTIME_CHECK=1
                        CHOOSE_NEWER="$2"
                --newer)
                        NEED_MTIME_CHECK=1
                        CHOOSE_NEWER="$2"
-                       if [ -z "$CHOOSE_NEWER" ];then
+                       if [ -z "$CHOOSE_NEWER" ]; then
                                Help
                                exit 2
                        fi
                                Help
                                exit 2
                        fi
@@ -220,7 +211,7 @@ while [ ! -z $1 ]; do
                --older)
                        NEED_MTIME_CHECK=1
                        CHOOSE_OLDER="$2"
                --older)
                        NEED_MTIME_CHECK=1
                        CHOOSE_OLDER="$2"
-                       if [ -z "$CHOOSE_OLDER" ];then
+                       if [ -z "$CHOOSE_OLDER" ]; then
                                Help
                                exit 2
                        fi
                                Help
                                exit 2
                        fi
@@ -246,7 +237,7 @@ while [ ! -z $1 ]; do
                        exit 1
                        ;;
                *)
                        exit 1
                        ;;
                *)
-                       if [ $EXCLUDE_FLAG -eq 0 ];then
+                       if [ $EXCLUDE_FLAG -eq 0 ]; then
                                BANNERS="$BANNERS ${1##*/}"
                        else
                                NOBANNERS="$NOBANNERS ${1##*/}"
                                BANNERS="$BANNERS ${1##*/}"
                        else
                                NOBANNERS="$NOBANNERS ${1##*/}"
@@ -259,27 +250,27 @@ done
 if [ $ALL_BANNERS -ne 0 ]; then
        BANNERS=`get_all_banner_list`
 fi
 if [ $ALL_BANNERS -ne 0 ]; then
        BANNERS=`get_all_banner_list`
 fi
-if [ $NEED_BANNER_LIST -ne 0 ];then
+if [ $NEED_BANNER_LIST -ne 0 ]; then
        BANNER_LIST=`get_banner_list "$BANNERS" "$NOBANNERS"`
 fi
        BANNER_LIST=`get_banner_list "$BANNERS" "$NOBANNERS"`
 fi
-if [ $NEED_MTIME_CHECK -ne 0 ];then
+if [ $NEED_MTIME_CHECK -ne 0 ]; then
        BANNER_LIST=`check_banners_mtime "$BANNER_LIST" "$CHOOSE_OLDER" "$CHOOSE_NEWER"`
 fi
 
 case $ACTION in
        "delete")
        BANNER_LIST=`check_banners_mtime "$BANNER_LIST" "$CHOOSE_OLDER" "$CHOOSE_NEWER"`
 fi
 
 case $ACTION in
        "delete")
-               delete_banners $BANNER_LIST;
+               delete_banners $BANNER_LIST
                ;;
        "make")
                ;;
        "make")
-               make_banner $NEW_BANNER $NEW_SHOW;
+               make_banner $NEW_BANNER $NEW_SHOW
                ;;
        "names")
                ;;
        "names")
-               echo $BANNER_LIST;
+               echo $BANNER_LIST
                ;;
        "show")
                ;;
        "show")
-               show_banners $BANNER_LIST;
+               show_banners $BANNER_LIST
+               ;;
+       "")
+               Help
                ;;
 esac
                ;;
 esac
-
-
-
diff --git a/dbupgrade.sh b/dbupgrade.sh
new file mode 100755 (executable)
index 0000000..a000935
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+ROOTDIR=
+if [ "$1" = "-r" ]; then
+       shift
+       ROOTDIR="$1"
+
+       if [ ! -d "$ROOTDIR" ]; then
+               echo "Specified root directory ($ROOTDIR) does not exist!"
+               echo "Bailing out!"
+               exit
+       fi
+fi
+
+if ! /usr/lib/rpm/rpmdb_reset -r lsn "$ROOTDIR"/var/lib/rpm/Packages ; then
+       echo
+       echo "rpm database conversion failed!"
+       echo
+       echo "You have to run:"
+       echo
+       echo "  /usr/lib/rpm/rpmdb_reset -r lsn /var/lib/rpm/Packages"
+       echo "  /bin/rm -f /var/lib/rpm/__db.00*"
+       echo "  /bin/rm -rf /var/lib/rpm/log"
+       echo "  /usr/bin/rpmdb --rebuilddb"
+       echo
+else
+       /bin/rm --interactive=never -f "$ROOTDIR"/var/lib/rpm/__db.00* >/dev/null 2>/dev/null || :
+       /bin/rm --interactive=never -rf "$ROOTDIR"/var/lib/rpm/log >/dev/null 2>/dev/null || :
+       /bin/rm --interactive=never -rf "$ROOTDIR"/var/lib/rpm/tmp >/dev/null 2>/dev/null || :
+
+       if ! /usr/bin/rpmdb --rebuilddb ${ROOTDIR:+--root="$ROOTDIR"}; then
+               echo
+               echo "rpm database conversion failed!"
+               echo "You have to run /usr/bin/rpmdb manually"
+               echo
+       fi
+fi
diff --git a/gem_helper.rb b/gem_helper.rb
deleted file mode 100755 (executable)
index 6457a7a..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-#!/usr/bin/ruby
-#--
-# Copyright 2010 Per Øyvind Karlsen <peroyvind@mandriva.org>
-# This program is free software. It may be redistributed and/or modified under
-# the terms of the LGPL version 2.1 (or later).
-#++
-
-require 'optparse'
-require 'rubygems'
-
-# Write the .gemspec specification (in Ruby)
-def writespec(spec)
-       file_name = spec.full_name.untaint + '.gemspec'
-       File.open(file_name, "w") do |file|
-               file.puts spec.to_ruby_for_cache
-       end
-       print "Wrote: %s\n" % file_name
-end
-
-# make gemspec self-contained
-if ARGV[0] == "spec-dump"
-       spec = eval(File.read(ARGV[1]))
-       writespec(spec)
-       exit(0)
-end
-
-if ARGV[0] == "build" or ARGV[0] == "install" or ARGV[0] == "spec"
-  require 'yaml'
-  require 'zlib'
-
-  filter = nil
-  opts = nil
-  keepcache = false
-  fixperms = false
-  gemdir = nil
-  dry_run = false
-  files = []
-  argv = ARGV[1..-1]
-  # Push this into some environment variables as the modified classes doesn't
-  # seem to be able to access our global variables.. </lameworkaround>
-  ENV['GEM_MODE'] = ARGV[0]
-  if ARGV[0] == "build"
-    opts = OptionParser.new("#{$0} <--filter PATTERN>")
-    opts.on("-f", "--filter PATTERN", "Filter pattern to use for gem files") do |val|
-      filter = val
-    end
-    opts.on("-j", "--jobs JOBS", "Number  of  jobs to run simultaneously.") do |val|
-      ENV['jobs'] = "-j"+val
-    end
-    opts.on("--dry-run", "Only show the files the gem will include") do
-      ARGV.delete("--dry-run")
-      dry_run = true
-    end
-  elsif ARGV[0] == "install"
-    opts = OptionParser.new("#{$0} <--keep-cache>")
-    opts.on("--keep-cache", "Don't delete gem copy from cache") do
-      ARGV.delete("--keep-cache")
-      keepcache = true
-    end
-    opts.on("--fix-permissions", "Force standard permissions for files installed") do
-      ARGV.delete("--fix-permissions")
-      fixperms = true
-    end    
-    opts.on("-i", "--install-dir GEMDIR", "Gem repository directory") do |val|
-      gemdir = val
-    end
-  end
-  while argv.length > 0
-    begin
-      opts.parse!(argv)
-    rescue OptionParser::InvalidOption => e
-      e.recover(argv)
-    end
-    argv.delete_at(0)
-  end
-
-  file_data = Zlib::GzipReader.open("metadata.gz") {|io| io.read}
-  header = YAML::load(file_data)
-  body = {}
-  # I don't know any better.. :/
-  header.instance_variables.each do |iv|
-         body[iv.to_s.sub(/^@/,'')] = header.instance_variable_get(iv)
-  end
-
-  spec = Gem::Specification.from_yaml(YAML.dump(header))
-
-  if ARGV[0] == "spec"
-    writespec(spec)
-    exit(0)
-  end
-
-  if ARGV[0] == "install"
-    system("gem %s %s.gem" % [ARGV.join(' '), spec.full_name])
-    if !keepcache
-      require 'fileutils'
-      FileUtils.rm_rf("%s/cache" % gemdir)
-    end
-    if fixperms
-      chmod = "chmod u+r,u+w,g-w,g+r,o+r -R %s" % gemdir
-      print "\nFixing permissions:\n\n%s\n" % chmod
-      system("%s" % chmod)
-      print "\n"
-    end
-  end
-
-  if body['extensions'].size > 0
-    require 'rubygems/ext'
-    module Gem::Ext
-      class Builder
-       def self.make(dest_path, results)
-         make_program = ENV['make']
-         unless make_program then
-           make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
-         end
-         cmd = make_program
-         if ENV['GEM_MODE'] == "build"
-           cmd += " %s" % ENV['jobs']
-         elsif ENV['GEM_MODE'] == "install"
-           cmd += " DESTDIR='%s' install" % ENV['DESTDIR']
-         end
-         results << cmd
-         results << `#{cmd} #{redirector}`
-
-         raise Gem::ExtensionBuildError, "make failed:\n\n#{results}" unless
-         $?.success?
-       end
-      end
-    end
-
-    require 'rubygems/installer'
-    module Gem
-      class Installer
-       def initialize(spec, options={})
-         @gem_dir = Dir.pwd
-         @spec = spec
-       end
-      end
-      class ConfigFile
-       def really_verbose
-         true
-       end
-      end
-    end
-
-    unless dry_run
-      Gem::Installer.new(spec).build_extensions
-    else
-      for ext in body['extensions']
-       files.push(ext[0..ext.rindex("/")-1]+".so")
-      end
-    end
-
-    body['extensions'].clear()
-  end
-  if ARGV[0] == "build"
-    body['test_files'].clear()
-
-    # We don't want ext/ in require_paths, it will only contain content for
-    # building extensions which needs to be installed in sitearchdir anyways..
-    idx = 0
-    for i in 0..body['require_paths'].size()-1
-      if body['require_paths'][idx].match("^ext(/|$)")
-       body['require_paths'].delete_at(idx)
-      else
-       idx += 1
-      end
-    end
-
-    # We'll get rid of all the files we don't really need to install
-    idx = 0
-    for i in 0..body['files'].size()-1
-      if filter and body['files'][idx].match(filter)
-       match = true
-      else
-       match = false
-       for path in body['require_paths']
-         if body['files'][idx].match("^%s/" % path)
-           match = true
-         end
-       end
-      end
-      if !match
-       body['files'].delete_at(idx)
-      else
-       idx += 1
-      end
-    end
-
-    spec = Gem::Specification.from_yaml(YAML.dump(header))
-    unless dry_run
-      Gem::Builder.new(spec).build
-    else
-      files.concat(spec.files)
-      print "%s\n" % files.join("\n")
-    end
-  end
-end
similarity index 52%
rename from rpm-arch.patch
rename to ix86-platforms.patch
index e185db6ea1543db8b82daff9beace8cee39226ca..9f862e6a7dc8afeb0f2880fa49a12de0f52cd195 100644 (file)
@@ -1,17 +1,29 @@
-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 @@
+--- rpm-4.16.0/installplatform.orig    2020-10-27 00:28:54.592595565 +0100
++++ rpm-4.16.0/installplatform 2020-10-27 00:31:27.676694730 +0100
+@@ -76,7 +76,7 @@
+     i?86|pentium?|athlon|geode)
+       ISANAME=x86
+       ISABITS=32
+-      CANONARCH=i386
++      CANONARCH=${ARCH}
+       CANONCOLOR=0
+       ;;
+     x86_64|amd64|ia32e)
+--- rpm-4.16.0/rpmrc.in~       2020-10-27 22:14:37.000000000 +0100
++++ rpm-4.16.0/rpmrc.in        2020-10-27 22:37:49.273277848 +0100
+@@ -302,13 +302,13 @@
  buildarchtranslate: osfmach3_i486: i386
  buildarchtranslate: osfmach3_i386: i386
  
 -buildarchtranslate: athlon: i386
  buildarchtranslate: osfmach3_i486: i386
  buildarchtranslate: osfmach3_i386: i386
  
 -buildarchtranslate: athlon: i386
+-buildarchtranslate: geode: i386
 -buildarchtranslate: pentium4: i386
 -buildarchtranslate: pentium3: i386
 -buildarchtranslate: i686: i386
 -buildarchtranslate: i586: i386
 -buildarchtranslate: i486: i386
 +buildarchtranslate: athlon: athlon
 -buildarchtranslate: pentium4: i386
 -buildarchtranslate: pentium3: i386
 -buildarchtranslate: i686: i386
 -buildarchtranslate: i586: i386
 -buildarchtranslate: i486: i386
 +buildarchtranslate: athlon: athlon
++buildarchtranslate: geode: geode
 +buildarchtranslate: pentium4: pentium4
 +buildarchtranslate: pentium3: pentium3
 +buildarchtranslate: i686: i686
 +buildarchtranslate: pentium4: pentium4
 +buildarchtranslate: pentium3: pentium3
 +buildarchtranslate: i686: i686
@@ -20,14 +32,3 @@ diff -urN rpm.org/rpmrc.in rpm/rpmrc.in
  buildarchtranslate: i386: i386
  
  buildarchtranslate: alphaev5: alpha
  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/macros.lang b/macros.lang
new file mode 100644 (file)
index 0000000..370fc45
--- /dev/null
@@ -0,0 +1,6 @@
+# Customized rpm macros - global for host
+#
+#      A colon separated list of desired locales to be installed;
+#      "all" means install all locale specific files.
+#
+#%%_install_langs pl_PL:en_US
diff --git a/macros.local b/macros.local
new file mode 100644 (file)
index 0000000..70b7121
--- /dev/null
@@ -0,0 +1,18 @@
+# customized rpm macros - global for host
+#
+# remove or replace with file_contexts path if you want to use custom
+# SELinux file contexts policy instead of one stored in packages payload
+%_install_file_context_path    %{nil}
+%_verify_file_context_path     %{nil}
+
+# If non-zero (default), all erasures will be automagically repackaged.
+#%_repackage_all_erasures      0
+
+# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
+# marked as %doc should be installed.
+#%_excludedocs                 1
+#
+# A colon separated list of paths where files should *not* be installed.
+# Usually, these are (network) file system mount points.
+# For static /dev not to update perms if upgraded and tmpfs mounted
+#%_netsharedpath /dev/shm:/proc:/dev:/sys
diff --git a/macros.php b/macros.php
deleted file mode 100644 (file)
index 81064f1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-%define        __php_provides  /usr/lib/rpm/php.prov
-# define 'php_req_new' in ~/.rpmmacros to use php version of req finder
-%define        __php_requires  env PHP_MIN_VERSION=%{?php_min_version} /usr/lib/rpm/php.req%{?php_req_new:.php}
diff --git a/notrans.patch b/notrans.patch
deleted file mode 100644 (file)
index 5f2b92d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-backport --nopretrans, --noposttrans options
-
---- rpm-4.5/lib/poptI.c~       2016-12-26 23:05:38.000000000 +0200
-+++ rpm-4.5/lib/poptI.c        2016-12-26 23:07:43.315470552 +0200
-@@ -303,6 +303,10 @@
-  { "noscripts", '\0', 0, NULL, RPMCLI_POPT_NOSCRIPTS,
-       N_("do not execute package scriptlet(s)"), NULL },
-+ { "nopretrans", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
-+      &rpmIArgs.transFlags, RPMTRANS_FLAG_NOPRETRANS,
-+      N_("do not execute %%pretrans scriptlet (if any)"), NULL },
-+
-  { "nopre", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.transFlags,
-       RPMTRANS_FLAG_NOPRE,
-       N_("do not execute %%pre scriptlet (if any)"), NULL },
-@@ -315,6 +319,9 @@
-  { "nopostun", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.transFlags,
-       RPMTRANS_FLAG_NOPOSTUN,
-       N_("do not execute %%postun scriptlet (if any)"), NULL },
-+ { "noposttrans", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
-+      &rpmIArgs.transFlags, RPMTRANS_FLAG_NOPOSTTRANS,
-+      N_("do not execute %%postrans scriptlet (if any)"), NULL },
-  { "nodigest", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NODIGEST,
-         N_("don't verify package digest(s)"), NULL },
---- rpm-4.5/lib/rpmlib.h~      2016-12-26 23:24:14.000000000 +0200
-+++ rpm-4.5/lib/rpmlib.h       2016-12-26 23:27:26.960081925 +0200
-@@ -943,7 +943,8 @@
-     /* 26 unused */
-     RPMTRANS_FLAG_NOFDIGESTS  = (1 << 27),    /*!< from --nofdigests */
--    /* 28-29 unused */
-+    RPMTRANS_FLAG_NOPRETRANS  = (1 << 28),    /*!< from --nopretrans */
-+    RPMTRANS_FLAG_NOPOSTTRANS = (1 << 29),    /*!< from --noposttrans */
-     RPMTRANS_FLAG_NOCONFIGS   = (1 << 30),    /*!< from --noconfigs */
-     /* 31 unused */
- } rpmtransFlags;
diff --git a/pkgconfig.patch b/pkgconfig.patch
new file mode 100644 (file)
index 0000000..d4f39e6
--- /dev/null
@@ -0,0 +1,11 @@
+--- rpm-4.16.0/rpm.pc.in.orig  2020-05-28 12:04:25.000000000 +0200
++++ rpm-4.16.0/rpm.pc.in       2020-10-18 23:32:46.339081527 +0200
+@@ -11,6 +11,6 @@
+ URL: http://rpm.org
+ Requires.private: @ZSTD_REQUIRES@
+ # Conflicts:
+-Cflags: -I${includedir}
+-Libs: -L${libdir} -lrpm -lrpmio
++Cflags: -I${includedir}/rpm
++Libs: -L${libdir} -lrpm -lrpmio -lrpmbuild
+ Libs.private: -lpopt -lrt -lpthread @WITH_LZMA_LIB@ @WITH_DB_LIB@ @WITH_BZ2_LIB@ @WITH_ZLIB_LIB@ @WITH_BEECRYPT_LIB@ @WITH_NSS_LIB@ @LUA_LIBS@
diff --git a/python-internal-build.patch b/python-internal-build.patch
new file mode 100644 (file)
index 0000000..ce66a35
--- /dev/null
@@ -0,0 +1,35 @@
+--- rpm-4.15.1/python/setup.py.in.orig 2019-06-26 23:17:31.000000000 +0900
++++ rpm-4.15.1/python/setup.py.in      2020-01-01 01:58:28.121517896 +0900
+@@ -12,17 +12,8 @@
+         out.append(token[2:])
+     return out
+-cflags = ['-std=c99', '-Wno-strict-aliasing']
+-additional_link_args = []
+-
+-# See if we're building in-tree
+-if os.access('Makefile.am', os.F_OK):
+-    cflags.append('-I../include')
+-    additional_link_args.extend(['-Wl,-L../rpmio/.libs',
+-                                 '-Wl,-L../lib/.libs',
+-                                 '-Wl,-L../build/.libs',
+-                                 '-Wl,-L../sign/.libs'])
+-    os.environ['PKG_CONFIG_PATH'] = '..'
++cflags = ['-std=c99', '-Wno-strict-aliasing', '-I../include']
++os.environ['PKG_CONFIG_PATH'] = '..'
+ rpmmod = Extension('rpm._rpm',
+                    sources = ['header-py.c', 'rpmds-py.c', 'rpmfd-py.c',
+@@ -33,11 +24,9 @@
+                               'rpmte-py.c', 'rpmts-py.c', 'rpmver-py.c',
+                               'spec-py.c',
+                               'rpmmodule.c'],
+-                   include_dirs = pkgconfig('--cflags'),
+-                   library_dirs = pkgconfig('--libs-only-L'),
++                   library_dirs = ['../rpmio/.libs', '../lib/.libs', '../build/.libs', '../sign/.libs'],
+                    libraries = pkgconfig('--libs-only-l') + ['rpmbuild', 'rpmsign'],
+                    extra_compile_args = cflags,
+-                   extra_link_args = additional_link_args
+                   )
+ setup(name='@PACKAGE_NAME@',
diff --git a/pythondeps-speedup.patch b/pythondeps-speedup.patch
deleted file mode 100644 (file)
index 98f6039..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- 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-am.patch b/rpm-am.patch
deleted file mode 100644 (file)
index ae05199..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -ur rpm-4.5/Makefile.am rpm-4.5-ac/Makefile.am
---- rpm-4.5/Makefile.am        2012-01-26 22:11:55.875577134 +0100
-+++ rpm-4.5-ac/Makefile.am     2012-01-26 22:10:47.855842412 +0100
-@@ -45,7 +45,8 @@
- bin_PROGRAMS =                rpm rpmbuild
- pkglibdir =           @USRLIBRPM@
--pkglib_DATA = rpmpopt macros
-+pkgdatadir =          @USRLIBRPM@
-+pkgdata_DATA =        rpmpopt macros
- noinst_HEADERS = build.h debug.h system.h
-diff -ur rpm-4.5/scripts/Makefile.am rpm-4.5-ac/scripts/Makefile.am
---- rpm-4.5/scripts/Makefile.am        2012-01-26 22:11:55.752244281 +0100
-+++ rpm-4.5-ac/scripts/Makefile.am     2012-01-26 22:07:08.238669872 +0100
-@@ -27,7 +27,8 @@
- bin_SCRIPTS = gendiff rpm2cpio
- pkglibdir =           @USRLIBRPM@
--pkglib_SCRIPTS = \
-+pkgbindir =           @USRLIBRPM@
-+pkgbin_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 -ur rpm-4.5/tools/Makefile.am rpm-4.5-ac/tools/Makefile.am
---- rpm-4.5/tools/Makefile.am  2012-01-26 22:11:55.748910960 +0100
-+++ rpm-4.5-ac/tools/Makefile.am       2012-01-26 22:11:02.329119298 +0100
-@@ -23,7 +23,8 @@
- bin_PROGRAMS =                rpmdigest rpmmtree rpmrepo
- pkglibdir =           @USRLIBRPM@
--pkglib_PROGRAMS =     rpmdeps @WITH_LIBDWARF_DEBUGEDIT@
-+pkgbindir =           @USRLIBRPM@
-+pkgbin_PROGRAMS =     rpmdeps @WITH_LIBDWARF_DEBUGEDIT@
- convertdb1_SOURCES =  convertdb1.c
diff --git a/rpm-arch-x86_64.patch b/rpm-arch-x86_64.patch
deleted file mode 100644 (file)
index 11100c0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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-as_needed-fix.patch b/rpm-as_needed-fix.patch
deleted file mode 100644 (file)
index 119831c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-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-automake_1.12.patch b/rpm-automake_1.12.patch
deleted file mode 100644 (file)
index 17d1a35..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -dur rpm-4.5.orig/configure.ac rpm-4.5/configure.ac
---- rpm-4.5.orig/configure.ac  2012-06-19 15:52:36.000000000 +0200
-+++ rpm-4.5/configure.ac       2012-06-19 15:54:29.000000000 +0200
-@@ -211,7 +211,6 @@
- dnl This test must precede tests of compiler characteristics like
- dnl that for the inline keyword, since it may change the degree to
- dnl which the compiler supports such features.
--AM_C_PROTOTYPES
- AC_C_INLINE
- AC_C_BIGENDIAN
-Only in rpm-4.5.orig: configure.ac.orig
index 11afecfdd895c9841e3be2f02c7e291e14622e7d..069650f306415ea686caa29243b921aea5d37b13 100644 (file)
@@ -1,18 +1,16 @@
 --- 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
 --- 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
+@@ -385,6 +385,9 @@
+     debug_base_name="$BUILDDIR"
+     debug_dest_name="/usr/src/debug/${unique_debug_src_base}"
+   fi
++# canon debug_base_name, 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.
 +# 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 @@
++  debug_base_name=$(readlink -f "$debug_base_name")
+   no_recompute=
+   if [ "$no_recompute_build_id" = "true" ]; then
+     no_recompute="-n"
+@@ -398,6 +400,11 @@
      $strict && exit 2
    fi
  
      $strict && exit 2
    fi
  
@@ -21,6 +19,6 @@
 +    $strict && exit 2
 +  fi
 +
 +    $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
+   # Add .gdb_index if requested.
+   if $include_gdb_index; then
+     if type gdb-add-index >/dev/null 2>&1; then
index bf2ef0409b45274e5876de8fdf6a9f79d229e0a3..ae75fa4e712177f0aa8da433156f14dbefcf666e 100644 (file)
@@ -1,13 +1,13 @@
 --- rpm-4.5/build/parseChangelog.c.orig        2012-07-24 14:46:12.856158625 +0200
 +++ rpm-4.5/build/parseChangelog.c     2012-07-24 14:47:55.293158624 +0200
 @@ -181,9 +181,8 @@
 --- rpm-4.5/build/parseChangelog.c.orig        2012-07-24 14:46:12.856158625 +0200
 +++ rpm-4.5/build/parseChangelog.c     2012-07-24 14:47:55.293158624 +0200
 @@ -181,9 +181,8 @@
-           return RPMERR_BADSPEC;
+               trimtime = firstTime - trimage;
        }
        if (lastTime && lastTime < time) {
        }
        if (lastTime && lastTime < time) {
--          rpmError(RPMERR_BADSPEC,
-+          rpmMessage(RPMMESS_WARNING,
+-          rpmlog(RPMLOG_ERR,
++          rpmlog(RPMLOG_WARNING,
                     _("%%changelog not in descending chronological order\n"));
                     _("%%changelog not in descending chronological order\n"));
--          return RPMERR_BADSPEC;
+-          goto exit;
        }
        }
-       lastTime = time;
+       for (i = 0; i < date_words; i++) {
+           SKIPSPACE(s);
diff --git a/rpm-chroot-hack.patch b/rpm-chroot-hack.patch
deleted file mode 100644 (file)
index 472eb6d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- 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-clean-docdir.patch b/rpm-clean-docdir.patch
new file mode 100644 (file)
index 0000000..800e2c0
--- /dev/null
@@ -0,0 +1,14 @@
+--- rpm-5.4.10/build/files.c~  2013-01-24 14:24:39.161982722 +0100
++++ rpm-5.4.10/build/files.c   2013-01-24 14:27:50.620325354 +0100
+@@ -2363,6 +2363,11 @@
+     appendLineStringBuf(docScript, "export LC_ALL=C");
+     appendStringBuf(docScript, "export ");
+     appendLineStringBuf(docScript, sdenv);
++    appendStringBuf(docScript, "if test -d \"$");
++    appendStringBuf(docScript, sdenv);
++    appendStringBuf(docScript, "\" ; then rmdir \"$");
++    appendStringBuf(docScript, sdenv);
++    appendLineStringBuf(docScript, "\" ; fi");
+     appendLineStringBuf(docScript, mkdocdir);
+     for (ARGV_const_t fn = sd->files; fn && *fn; fn++) {
diff --git a/rpm-cleanbody.patch b/rpm-cleanbody.patch
deleted file mode 100644 (file)
index f8b29ef..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644 (file)
index e2d6930..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
---- 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.patch b/rpm-compress-doc.patch
deleted file mode 100644 (file)
index 90fa456..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 7391551..0000000
+++ /dev/null
@@ -1,1293 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 5ea06e1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 41d0c08..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
---- 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
deleted file mode 100644 (file)
index ff534f7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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-dwarf4.patch b/rpm-debugedit-dwarf4.patch
deleted file mode 100644 (file)
index 66045e9..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
---- rpm-4.5/tools/debugedit.c.orig     2012-06-23 20:54:51.748542754 +0200
-+++ rpm-4.5/tools/debugedit.c  2012-06-23 20:56:12.045612104 +0200
-@@ -70,6 +70,10 @@
- #include "hashtab.h"
- #define DW_TAG_partial_unit 0x3c
-+#define DW_FORM_sec_offset 0x17
-+#define DW_FORM_exprloc 0x18
-+#define DW_FORM_flag_present 0x19
-+#define DW_FORM_ref_sig8 0x20
- char *base_dir = NULL;
- char *dest_dir = NULL;
-@@ -250,6 +254,7 @@ static struct
- #define DEBUG_STR     8
- #define DEBUG_FRAME   9
- #define DEBUG_RANGES  10
-+#define DEBUG_TYPES   11
-     { ".debug_info", NULL, NULL, 0, 0, 0 },
-     { ".debug_abbrev", NULL, NULL, 0, 0, 0 },
-     { ".debug_line", NULL, NULL, 0, 0, 0 },
-@@ -261,6 +266,7 @@ static struct
-     { ".debug_str", NULL, NULL, 0, 0, 0 },
-     { ".debug_frame", NULL, NULL, 0, 0, 0 },
-     { ".debug_ranges", NULL, NULL, 0, 0, 0 },
-+    { ".debug_types", NULL, NULL, 0, 0, 0 },
-     { NULL, NULL, NULL, 0, 0, 0 }
-   };
-@@ -353,7 +359,8 @@ no_memory:
-               goto no_memory;
-           }
-         form = read_uleb128 (ptr);
--        if (form == 2 || form > DW_FORM_indirect)
-+        if (form == 2
-+            || (form > DW_FORM_flag_present && form != DW_FORM_ref_sig8))
-           {
-             error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form);
-             htab_delete (h);
-@@ -382,7 +389,6 @@ static char *
- canonicalize_path (const char *s, char *d)
- {
-   char *rv = d;
--  const char *sroot;
-   char *droot;
-   if (IS_DIR_SEPARATOR (*s))
-@@ -398,7 +404,6 @@ canonicalize_path (const char *s, char *
-       s++;
-     }
-   droot = d;
--  sroot = s;
-   while (*s)
-     {
-@@ -517,7 +522,7 @@ edit_dwarf2_line (DSO *dso, rpmuint32_t
-     }
-   value = read_16 (ptr);
--  if (value != 2 && value != 3)
-+  if (value != 2 && value != 3 && value != 4)
-     {
-       error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
-            value);
-@@ -533,8 +538,8 @@ edit_dwarf2_line (DSO *dso, rpmuint32_t
-       return 1;
-     }
-   
--  opcode_base = ptr[4];
--  ptr = dir = ptr + 4 + opcode_base;
-+  opcode_base = ptr[4 + (value >= 4)];
-+  ptr = dir = ptr + 4 + (value >= 4) + opcode_base;
-   
-   /* dir table: */
-   value = 1;
-@@ -762,7 +767,8 @@ edit_attributes (DSO *dso, unsigned char
-       {
-         if (t->attr[i].attr == DW_AT_stmt_list)
-           {
--            if (form == DW_FORM_data4)
-+            if (form == DW_FORM_data4
-+                || form == DW_FORM_sec_offset)
-               {
-                 list_offs = do_read_32_relocated (ptr);
-                 found_list_offs = 1;
-@@ -868,6 +874,8 @@ edit_attributes (DSO *dso, unsigned char
-             else
-               ptr += 4;
-             break;
-+          case DW_FORM_flag_present:
-+            break;
-           case DW_FORM_addr:
-             ptr += ptr_size;
-             break;
-@@ -882,10 +890,12 @@ edit_attributes (DSO *dso, unsigned char
-             break;
-           case DW_FORM_ref4:
-           case DW_FORM_data4:
-+          case DW_FORM_sec_offset:
-             ptr += 4;
-             break;
-           case DW_FORM_ref8:
-           case DW_FORM_data8:
-+          case DW_FORM_ref_sig8:
-             ptr += 8;
-             break;
-           case DW_FORM_sdata:
-@@ -914,6 +924,7 @@ edit_attributes (DSO *dso, unsigned char
-             form = DW_FORM_block1;
-             break;
-           case DW_FORM_block:
-+          case DW_FORM_exprloc:
-             len = read_uleb128 (ptr);
-             form = DW_FORM_block1;
-             assert (len < UINT_MAX);
-@@ -1217,7 +1228,7 @@ edit_dwarf2 (DSO *dso)
-               }
-             
-             cu_version = read_16 (ptr);
--            if (cu_version != 2 && cu_version != 3)
-+            if (cu_version != 2 && cu_version != 3 && cu_version != 4)
-               {
-                 error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
-                        cu_version);
diff --git a/rpm-debugedit-workaround.patch b/rpm-debugedit-workaround.patch
deleted file mode 100644 (file)
index 00facee..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-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
index 537f8bcf4cc426f4227f65486be5185c23063a63..aecf32e7bee27a7964a15296d3369ab20a6fb904 100644 (file)
@@ -1,47 +1,14 @@
---- 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}
+--- rpm-5.3.1/scripts/find-debuginfo.sh.wiget  2009-09-10 03:52:13.000000000 +0200
++++ rpm-5.3.1/scripts/find-debuginfo.sh        2010-05-30 16:53:33.275994510 +0200
+@@ -254,7 +254,10 @@ strip_to_debug()
+   $strip_glibs && case "$(file -bi "$2")" in
+     application/x-sharedlib*) g=-g ;;
+   esac
+-  eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit
++  local t=$(mktemp "/tmp/rpm.stripped.XXXXXX")
++  objcopy --compress-debug-sections "$2" || exit
++  eu-strip --remove-comment $r -f "$1" "$2" -o "$t" || exit
++  rm -f "$t"
+   chmod 444 "$1" || exit
+ }
  
  
- %__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
deleted file mode 100644 (file)
index 2cef12d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-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
deleted file mode 100644 (file)
index 7527eec..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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
- # TLD 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
deleted file mode 100644 (file)
index ca42361..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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-div0.patch b/rpm-div0.patch
deleted file mode 100644 (file)
index 54775bd..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ur rpm-4.5.orig/lib/rpmds.c rpm-4.5/lib/rpmds.c
---- rpm-4.5.orig/lib/rpmds.c   2019-06-01 18:55:39.433000000 +0200
-+++ rpm-4.5/lib/rpmds.c        2019-08-16 10:50:36.274000000 +0200
-@@ -3008,6 +3008,8 @@
-       case SHT_DYNAMIC:
-           data = NULL;
-           while ((data = elf_getdata (scn, data)) != NULL) {
-+              if (shdr->sh_entsize == 0)
-+                  continue;
- /*@-boundswrite@*/
-               for (cnt = 0; cnt < (shdr->sh_size / shdr->sh_entsize); ++cnt) {
-                   dyn = gelf_getdyn (data, cnt, &dyn_mem);
-diff -ur rpm-4.5.orig/rpmdb/legacy.c rpm-4.5/rpmdb/legacy.c
---- rpm-4.5.orig/rpmdb/legacy.c        2007-07-30 04:28:13.000000000 +0200
-+++ rpm-4.5/rpmdb/legacy.c     2019-08-16 10:35:01.076000000 +0200
-@@ -99,7 +99,7 @@
-     /*@-branchstate -uniondef @*/
-     while (!bingo && (scn = elf_nextscn(elf, scn)) != NULL) {
-       (void) gelf_getshdr(scn, &shdr);
--      if (shdr.sh_type != SHT_DYNAMIC)
-+      if (shdr.sh_type != SHT_DYNAMIC || shdr.sh_entsize == 0)
-           continue;
-       while (!bingo && (data = elf_getdata (scn, data)) != NULL) {
-           int maxndx = data->d_size / shdr.sh_entsize;
diff --git a/rpm-doxygen_hack.patch b/rpm-doxygen_hack.patch
deleted file mode 100644 (file)
index 4654eba..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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
deleted file mode 100644 (file)
index cdf2b5f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 80cc580..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-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-gendiff.patch b/rpm-gendiff.patch
deleted file mode 100644 (file)
index 6eec5b1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
---- ./scripts/gendiff.org      2008-04-06 10:48:23.000000000 +0200
-+++ ./scripts/gendiff  2009-02-11 15:44:23.070120721 +0100
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- function usage () {
-   echo "usage: $0 <directory> <diff-extension>" 1>&2
diff --git a/rpm-gettext-in-header.patch b/rpm-gettext-in-header.patch
deleted file mode 100644 (file)
index 9e3ff96..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 765adf0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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-glibc.patch b/rpm-glibc.patch
deleted file mode 100644 (file)
index ea8240b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-diff -urp rpm-4.5.orig/rpmio/rpmio.c rpm-4.5/rpmio/rpmio.c
---- rpm-4.5.orig/rpmio/rpmio.c 2018-10-23 10:42:28.780416609 +0000
-+++ rpm-4.5/rpmio/rpmio.c      2018-10-23 10:46:39.497416609 +0000
-@@ -422,7 +422,7 @@ static inline int fdSeek(void * cookie,
-       /*@modifies fileSystem, internalState @*/
- {
- #ifdef USE_COOKIE_SEEK_POINTER
--    _IO_off64_t p = *pos;
-+    off64_t p = *pos;
- #else
-     off_t p = pos;
- #endif
-@@ -2432,7 +2432,7 @@ static inline int gzdSeek(void * cookie,
-       /*@modifies fileSystem, internalState @*/
- {
- #ifdef USE_COOKIE_SEEK_POINTER
--    _IO_off64_t p = *pos;
-+    off64_t p = *pos;
- #else
-     off_t p = pos;
- #endif
-@@ -2804,7 +2804,7 @@ DBGIO(fd, (stderr, "==> Fwrite(%p,%u,%u,
- int Fseek(FD_t fd, _libio_off_t offset, int whence) {
-     fdio_seek_function_t _seek;
- #ifdef USE_COOKIE_SEEK_POINTER
--    _IO_off64_t o64 = offset;
-+    off64_t o64 = offset;
-     _libio_pos_t pos = &o64;
- #else
-     _libio_pos_t pos = offset;
-@@ -2989,13 +2989,6 @@ static inline void cvtfmode (const char
- }
- /*@=boundswrite@*/
--#if _USE_LIBIO
--#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
--/* XXX retrofit glibc-2.1.x typedef on glibc-2.0.x systems */
--typedef _IO_cookie_io_functions_t cookie_io_functions_t;
--#endif
--#endif
--
- /*@-boundswrite@*/
- FD_t Fdopen(FD_t ofd, const char *fmode)
- {
-diff -urp rpm-4.5.orig/rpmio/rpmio.h rpm-4.5/rpmio/rpmio.h
---- rpm-4.5.orig/rpmio/rpmio.h 2018-10-23 10:42:28.788416609 +0000
-+++ rpm-4.5/rpmio/rpmio.h      2018-10-23 10:43:19.413416609 +0000
-@@ -34,7 +34,7 @@ typedef /*@abstract@*/ struct pgpDigPara
- #if !defined(__LCLINT__) && defined(__GLIBC__) && \
-       (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
- #define USE_COOKIE_SEEK_POINTER 1
--typedef _IO_off64_t   _libio_off_t;
-+typedef off64_t       _libio_off_t;
- typedef _libio_off_t *        _libio_pos_t;
- #else
- typedef off_t                 _libio_off_t;
diff --git a/rpm-glob.patch b/rpm-glob.patch
deleted file mode 100644 (file)
index 189c9e5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- 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-gstreamer.patch b/rpm-gstreamer.patch
deleted file mode 100644 (file)
index 15c189a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-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
deleted file mode 100644 (file)
index 05e8902..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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-helperEVR-noassert.patch b/rpm-helperEVR-noassert.patch
deleted file mode 100644 (file)
index fff4a84..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- rpm-4.5/lib/rpmfc.c.orig   2012-02-13 20:28:52.564758176 +0100
-+++ rpm-4.5/lib/rpmfc.c        2012-02-14 19:01:50.810809655 +0100
-@@ -472,7 +472,10 @@
-               }
-               i++;
-               EVR = pav[i];
--assert(EVR != NULL);
-+              if(EVR == NULL) {
-+                      rpmMessage(RPMMESS_ERROR, _("%s helper returned empty version info for %s, omitting\n"), nsdep, N);
-+                      continue;
-+              }
-           }
- /*@=branchstate@*/
diff --git a/rpm-hirmib-ts.patch b/rpm-hirmib-ts.patch
deleted file mode 100644 (file)
index 4a8bbb1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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-ignore-missing-macro-files.patch b/rpm-ignore-missing-macro-files.patch
new file mode 100644 (file)
index 0000000..b7e7ed0
--- /dev/null
@@ -0,0 +1,10 @@
+--- rpm-5.4.15/rpmio/macro.c~  2014-12-07 20:24:53.000000000 +0100
++++ rpm-5.4.15/rpmio/macro.c   2014-12-07 20:44:45.739944044 +0100
+@@ -1795,6 +1795,7 @@
+       for (path = files; *path; path++) {
+           if (rpmFileHasSuffix(*path, ".rpmnew") || 
+               rpmFileHasSuffix(*path, ".rpmsave") ||
++              rpmFileHasSuffix(*path, "~") ||
+               rpmFileHasSuffix(*path, ".rpmorig")) {
+               continue;
+           }
diff --git a/rpm-installbeforeerase.patch b/rpm-installbeforeerase.patch
deleted file mode 100644 (file)
index 33715cf..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
- 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-installplatform.patch b/rpm-installplatform.patch
deleted file mode 100644 (file)
index cc75c1a..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
---- rpm-4.5/installplatform.orig       2013-07-17 10:01:04.000000000 +0000
-+++ rpm-4.5/installplatform    2013-07-17 10:18:26.094178797 +0000
-@@ -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,x86_64, s,x86_64,ia32e, s,x86_64,amd64,' ;;
-+  x86_64|amd64|ia32e) SUBSTS='s|x86_64|x86_64| s|x86_64|amd64|' ;;
-   *) SUBSTS=y___ ;;
- esac
-@@ -50,7 +50,7 @@
-   [ -d $PPD ] || mkdir $PPD
-   RPMRC_OPTFLAGS="`sed -n 's/^optflags: '$ARCH' //p' $RPMRC`"
--  RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's, ,\ ,g'`"
-+  RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's| |\ |g'`"
-   case $RPMRC_OPTFLAGS in
-   *-g*) ;;
-   *) RPMRC_OPTFLAGS="$RPMRC_OPTFLAGS -g" ;;
-@@ -71,45 +71,45 @@
-   esac
-   if [ -n "$MULTILIBNO" ]; then
--    MULTILIBSED='-e /^@MULTILIB/d -e s,@MULTILIBNO@,'$MULTILIBNO,
-+    MULTILIBSED='-e /^@MULTILIB/d -e s|@MULTILIBNO@|'$MULTILIBNO'|'
-   else
-     MULTILIBSED='-e /^@MULTILIBSTART@/,/^@MULTILIBEND@/d'
-   fi
-   case $VENDOR in
-   yellowdog)
--    VENDORSED='-e s,^@yellowdog@,,'
-+    VENDORSED='-e s|^@yellowdog@||'
-     ;;
-   tld)
--    VENDORSED='-e s,^@tld@,,'
-+    VENDORSED='-e s|^@tld@||'
-     RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e "s/ -g/ /"`"
-     ;;
-   mandrake)
--    VENDORSED='-e s,^@mandrake@,,'
-+    VENDORSED='-e s|^@mandrake@||'
-     RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e s/i386/i686/`"
-     ;;
-   conectiva)
--    VENDORSED='-e s,^@conectiva@,,'
-+    VENDORSED='-e s|^@conectiva@||'
-     ;;
-   redhat)
--    VENDORSED='-e s,^@redhat@,,'
-+    VENDORSED='-e s|^@redhat@||'
-     ;;
-   apple)
--    VENDORSED='-e s,^@apple@,,'
-+    VENDORSED='-e s|^@apple@||'
-     ;;
-   crux)
--    VENDORSED='-e s,^@crux@,,'
-+    VENDORSED='-e s|^@crux@||'
-     ;;
-   esac
-   cat $PLATFORM \
--  | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
--      -e "s,@RPMRC_ARCH@,$ARCH," \
--      -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
--      -e "s,@LIB@,$LIB," \
--      -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
--      -e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \
--      -e '/\${\w*:-/!s,\${,%{_,' \
-+  | sed -e "s|@RPMRC_OPTFLAGS@|$RPMRC_OPTFLAGS|" \
-+      -e "s|@RPMRC_ARCH@|$ARCH|" \
-+      -e "s|@RPMRC_GNU@|$RPMRC_GNU|" \
-+      -e "s|@LIB@|$LIB|" \
-+      -e "s|@ARCH_INSTALL_POST@|$ARCH_INSTALL_POST|" \
-+      -e "s|@DEFAULTDOCDIR@|$DEFAULTDOCDIR|" \
-+      -e '/\${\w*:-/!s|\${|%{_|' \
-       $MULTILIBSED \
-       $VENDORSED \
-   | grep -v '^@' \
-@@ -117,19 +117,20 @@
- done
-+
- { cd ${DESTDIR}/${pkglibdir}
-   [ -L noarch-${OS} ] && rm -f noarch-${OS} 2>/dev/null
-   mkdir -p noarch-${OS}
--  sed -e "/^%_arch/s,${arch},noarch," ${arch}-${OS}/macros | grep -v '^%optflags' > noarch-${OS}/macros
-+  sed -e "/^%_arch/s|${arch}|noarch|" ${arch}-${OS}/macros | grep -v '^%optflags' > noarch-${OS}/macros
- #  [ -d ${VENDOR} ] || mkdir ${VENDOR}
- #  for i in brp-* find-lang.sh find-provides find-requires perl.prov perl.req
- #  do
--#    sed -e "s,/usr/lib/rpm,/usr/lib/rpm/${VENDOR},g" < $i > ${VENDOR}/$i
-+#    sed -e "s|/usr/lib/rpm|/usr/lib/rpm/${VENDOR}|g" < $i > ${VENDOR}/$i
- #    chmod +x ${VENDOR}/$i
- #  done
- ##  chmod -x ${VENDOR}/perl.req
- #  echo "macrofiles:     /usr/lib/rpm/macros:/usr/lib/rpm/${VENDOR}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb" > ${VENDOR}/rpmrc
--#  sed -e "s,/usr/lib/rpm,/usr/lib/rpm/${VENDOR},g" < ${arch}-${OS}/macros | grep -v '^%(_arch|optflags)' > ${VENDOR}/macros
-+#  sed -e "s|/usr/lib/rpm|/usr/lib/rpm/${VENDOR}|g" < ${arch}-${OS}/macros | grep -v '^%(_arch|optflags)' > ${VENDOR}/macros
- }
- rm $TEMPRC
diff --git a/rpm-ldconfig-always.patch b/rpm-ldconfig-always.patch
deleted file mode 100644 (file)
index fbf86d4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 29fcc32..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
---- rpm-4.5/lib/rpmfc.c.org    2012-02-29 16:32:05.655058968 +0100
-+++ rpm-4.5/lib/rpmfc.c        2012-02-29 16:36:22.430972834 +0100
-@@ -1114,9 +1114,31 @@
-           /* 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_ctype = setlocale(LC_CTYPE, NULL);
-+              char *old_collate = setlocale(LC_COLLATE, NULL);
-+
-+              if (old_ctype) {
-+                      old_ctype = xstrdup(old_ctype);
-+                      setlocale(LC_CTYPE, "C");
-+              }
-+              if (old_collate) {
-+                      old_collate = xstrdup(old_collate);
-+                      setlocale(LC_COLLATE, "C");
-+              }
-+
-               ftype = magic_file(ms, s);
-+              if (old_ctype) {
-+                      setlocale(LC_CTYPE, old_ctype);
-+                      _free(old_ctype);
-+              }
-+              if (old_collate) {
-+                      setlocale(LC_COLLATE, old_collate);
-+                      _free(old_collate);
-+              }
-+          }
-+
-           if (ftype == NULL) {
-               xx = RPMERR_EXEC;
-               rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"),
index 4dc62f4e7c64f29e57e65c144a33566aaf1ca66a..443d1fde91580080c006bed530f24f6575ee1c19 100644 (file)
@@ -15,7 +15,7 @@
      do
        case "$possible" in
        *.la)
      do
        case "$possible" in
        *.la)
--          if grep -iq '^# Generated by ltmain.sh' "$possible" 2> /dev/null ; then
+-          if grep -Eiq '^# Generated by (libtool|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)"
 +          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)"
diff --git a/rpm-link-selinux.patch b/rpm-link-selinux.patch
deleted file mode 100644 (file)
index 7672a19..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644 (file)
index 3ea978b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644 (file)
index c71ed1c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---- 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
deleted file mode 100644 (file)
index c77311e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 544c247..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 1f5a0fe..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644 (file)
index c68cb48..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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
deleted file mode 100644 (file)
index e3282af..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 9ddff0b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-diff -ur rpm-4.5.orig/macros.in rpm-4.5/macros.in
---- rpm-4.5.orig/macros.in     2013-07-17 11:43:34.000000000 +0000
-+++ rpm-4.5/macros.in  2013-07-17 11:55:15.035117233 +0000
-@@ -277,6 +277,9 @@
- #
- #%distribution
-+# TLD Linux Release for backward compatibility with PLD spec files
-+%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.
-@@ -1478,16 +1481,49 @@
- #-----------------------------------------------------------------
- # CFLAGS and LDFLAGS used to build
--%debuginfocflags      %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
-+%debuginfocflags      %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
-+# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
- %debugcflags  -O0 -g -Wall
-+%debugcppflags        %{nil}
-+%debugldflags %{nil}
-+
-+%optldflags   -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
-+%optcppflags  %{nil}
- # 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}
--  
-+%rpmcflags %(awk 'BEGIN {
-+       split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
-+       split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
-+       %{filter_out}
-+}')
-+%rpmcppflags       %(awk 'BEGIN {
-+       split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
-+       split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
-+       %{filter_out}
-+}')
-+%rpmcxxflags       %(awk 'BEGIN {
-+       split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
-+       split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
-+       %{filter_out}
-+}')
-+%rpmldflags        %(awk 'BEGIN {
-+       split("%{?optldflags}",I);
-+       split("%{?filterout_ld}",F)
-+       %{filter_out}
-+}')
-+
-+# common compilation flags
-+%_fortify_cflags      -Wp,-D_FORTIFY_SOURCE=2
-+
-+# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
-+%Werror_cflags                -Wformat -Werror=format-security
-+
-+%_ssp_cflags          -fstack-protector --param=ssp-buffer-size=4
-+%__common_cflags      -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
-+%__common_cflags_with_ssp     %{__common_cflags} %{?_ssp_cflags}
-+
- #------------------------------------------------------------------------
- # mimetype(...) configuration.
- #
diff --git a/rpm-macros.gstreamer b/rpm-macros.gstreamer
deleted file mode 100644 (file)
index b9b366b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-%define __gstreamer_provides /usr/lib/rpm/gstreamerdeps.sh --provides
diff --git a/rpm-macros.java b/rpm-macros.java
deleted file mode 100644 (file)
index 30e1539..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-%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
deleted file mode 100644 (file)
index f41a082..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
---- 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
-@@ -53,6 +53,7 @@
- %__ditto              @__DITTO@
- %__file                       @__FILE@
- %__find                       @__FIND@
-+%__git                        @__GIT@
- %__gpg                        @__GPG@
- %__grep                       @__GREP@
- %__gzip                       @__GZIP@
-@@ -62,6 +62,7 @@
- %__install_info               @__INSTALL_INFO@
- %__ldconfig           @__LDCONFIG@
- %__lua                        @__LUA@
-+%__ln                 @__LN@
- %__ln_s                       @LN_S@
- %__lzma                       @__LZMA@
- %__lzop                       @__LZOP@
-@@ -77,6 +78,7 @@
- %__php                        @__PHP@
- %__python             @__PYTHON@
- %__rm                 @__RM@
-+%__rmdir              @__RMDIR@
- %__rsh                        @__RSH@
- %__sed                        @__SED@
- %__sh                 @__SH@
-@@ -87,6 +89,7 @@
- %__unzip              @__UNZIP@
- %__wget                       @__WGET@
- %__xar                        @__XAR@
-+%__xz                 @__XZ@
- #==============================================================================
- # ---- Build system path macros.
-@@ -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
-+
-+# TLD rpm macros
-+%_enable_debug_packages 1
-+
-+#-----------------------------------------------------------------
-+# CFLAGS and LDFLAGS used to build
-+
-+%debuginfocflags      %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -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
-@@ -246,6 +246,7 @@
- AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
- AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
- AC_PATH_PROG(__FIND, find, %{_bindir}/find, $MYPATH)
-+AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH)
- AC_PATH_PROG(__GPG, gpg, %{_bindir}/gpg, $MYPATH)
- AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH)
- AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH)
-@@ -265,6 +265,7 @@
- AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
- AC_PATH_PROG(__INSTALL_INFO, install-info, /sbin/install-info, $MYPATH)
-+AC_PATH_PROG(__LN, ln, /bin/ln, $MYPATH)
- AC_PATH_PROG(__LDCONFIG, ldconfig, /sbin/ldconfig, $MYPATH)
- AC_PATH_PROG(__LUA, lua, %{_bindir}/lua, $MYPATH)
- AC_PATH_PROG(__LZMA, lzma, %{_bindir}/lzma, $MYPATH)
-@@ -290,6 +291,7 @@
- AC_PATH_PROG(__PHP, php, %{_bindir}/php, $MYPATH)
- AC_PATH_PROG(__PYTHON, python, %{_bindir}/python, $MYPATH)
- AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
-+AC_PATH_PROG(__RMDIR, rmdir, /bin/rmdir, $MYPATH)
- AC_PATH_PROG(__RSH, rsh, %{_bindir}/rsh, $MYPATH)
- AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
- AC_PATH_PROG(__SH, sh, /bin/sh, $MYPATH)
-@@ -300,6 +302,7 @@
- AC_PATH_PROG(__UNZIP, unzip, %{_bindir}/unzip, $MYPATH)
- AC_PATH_PROG(__WGET, wget, %{_bindir}/wget, $MYPATH)
- AC_PATH_PROG(__XAR, xar, %{_bindir}/xar, $MYPATH)
-+AC_PATH_PROG(__XZ, xz, %{_bindir}/xz, $MYPATH)
- AC_PATH_PROG(__LD, ld, %{_bindir}/ld, $MYPATH)
- AC_PATH_PROG(__NM, nm, %{_bindir}/nm, $MYPATH)
-@@ -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}/macros.d/macros.*:${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
deleted file mode 100644 (file)
index f67d01d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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:
index db61324351d934bf389ffc5cbbd5d3115b1837b6..c9e03eaab88aceaf4e1d7c71695d25d1c4ceb7d1 100644 (file)
@@ -1,7 +1,7 @@
---- 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
+--- rpm-4.16.0/doc/pl/rpm.8.orig       2020-05-28 12:04:25.022136604 +0200
++++ rpm-4.16.0/doc/pl/rpm.8    2020-10-13 08:06:11.442087617 +0200
+@@ -318,6 +318,7 @@
+ Instaluje pakiety nawet jeśli niektóre z nich są już zainstalowane na tym
  systemie.
  .TP
 +\fB--test\fR
  systemie.
  .TP
 +\fB--test\fR
diff --git a/rpm-missing-prototypes.patch b/rpm-missing-prototypes.patch
deleted file mode 100644 (file)
index c4b4cab..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- rpm-4.3/lib/rpmfi.c.orig   2004-01-12 09:39:32.000000000 +0000
-+++ rpm-4.3/lib/rpmfi.c        2004-01-12 10:34:20.000000000 +0000
-@@ -13,6 +13,8 @@
- #include "rpmds.h"
-+#include "legacy.h"
-+
- #define       _RPMFI_INTERNAL
- #include "rpmfi.h"
---- rpm-4.3/lib/rpmrc.c.orig   2004-01-12 09:39:32.000000000 +0000
-+++ rpm-4.3/lib/rpmrc.c        2004-01-12 10:54:42.000000000 +0000
-@@ -14,6 +14,7 @@
- #define __power_pc() 0
- #endif
-+#include "rpmio_internal.h"
- #include <rpmcli.h>
- #include <rpmmacro.h>
- #include <rpmlua.h>
---- rpm-4.3/tools/convertdb1.c.orig    2004-01-04 02:13:09.000000000 +0000
-+++ rpm-4.3/tools/convertdb1.c 2004-01-12 10:52:04.000000000 +0000
-@@ -10,6 +10,7 @@
- #include <rpmdb.h>
- #include <rpmio.h>
- #include <rpmmacro.h>
-+#include "legacy.h"
- #define FA_MAGIC      0x02050920
diff --git a/rpm-mono.patch b/rpm-mono.patch
deleted file mode 100644 (file)
index 25604d3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-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-namespace-probe.patch b/rpm-namespace-probe.patch
deleted file mode 100644 (file)
index d7f271b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-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
deleted file mode 100644 (file)
index 6a3d9e5..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
---- 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,328 @@
--#!/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")
-+  objcopy --compress-debug-sections "$2" || exit
-+  eu-strip --remove-comment -f "$1" "$2" -o "$t" || exit
-+  rm -f "$t"
-+}
-+
-+# Make a relative symlink to $1 called $3$2
-+shopt -s extglob
-+link_relative()
-+{
-+  local t="$1" f="$2" pfx="$3"
-+  local fn="${f#/}" tn="${t#/}"
-+  local fd td d
-+
-+  while fd="${fn%%/*}"; td="${tn%%/*}"; [ "$fd" = "$td" ]; do
-+    fn="${fn#*/}"
-+    tn="${tn#*/}"
-+  done
-+
-+  d="${fn%/*}"
-+  if [ "$d" != "$fn" ]; then
-+    d="${d//+([!\/])/..}"
-+    tn="${d}/${tn}"
-+  fi
-+
-+  mkdir -p "$(dirname "$pfx$f")" && ln -snf "$tn" "$pfx$f"
- }
-+# Make a symlink in /usr/lib/debug/$2 to $1
-+debug_link()
-+{
-+  local l="/usr/lib/debug$2"
-+  local t="$1"
-+  echo >> "$LINKSFILE" "$l $t"
-+  link_relative "$t" "$l" "$RPM_BUILD_ROOT"
-+}
-+
-+# Make a build-id symlink for id $1 with suffix $3 to file $2.
-+make_id_link()
-+{
-+  local id="$1" file="$2"
-+  local idfile=".build-id/${id:0:2}/${id:2}"
-+  [ $# -eq 3 ] && idfile="${idfile}$3"
-+  local root_idfile="$RPM_BUILD_ROOT/usr/lib/debug/$idfile"
-+
-+  if [ ! -L "$root_idfile" ]; then
-+    debug_link "$file" "/$idfile"
-+    return
-+  fi
-+
-+  [ $# -eq 3 ] && return 0
-+
-+  local other=$(readlink -m "$root_idfile")
-+  other=${other#$RPM_BUILD_ROOT}
-+  if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" ||
-+     eu-elfcmp -q "$root_idfile" "$RPM_BUILD_ROOT$file" 2> /dev/null; then
-+    # Two copies.  Maybe one has to be setuid or something.
-+    echo >&2 "*** WARNING: identical binaries are copied, not linked:"
-+    echo >&2 "        $file"
-+    echo >&2 "   and  $other"
-+  else
-+    # This is pathological, break the build.
-+    echo >&2 "*** ERROR: same build ID in nonidentical files!"
-+    echo >&2 "        $file"
-+    echo >&2 "   and  $other"
-+    exit 2
-+  fi
-+}
-+
-+get_debugfn()
-+{
-+  dn=$(dirname "${1#$RPM_BUILD_ROOT}")
-+  bn=$(basename "$1" .debug).debug
-+
-+  debugdn=${debugdir}${dn}
-+  debugfn=${debugdn}/${bn}
-+}
-+
-+set -o pipefail
-+
-+strict_error=ERROR
-+$strict || strict_error=WARNING
-+
- # Strip ELF binaries
--for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
--      sed -n -e 's/^\(.*\):[  ]*.*ELF.*, not stripped/\1/p'`
-+find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
-+                   \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
-+                   -print |
-+file -N -f - | sed -n -e 's/^\(.*\):[         ]*.*ELF.*, not stripped/\1/p' |
-+xargs --no-run-if-empty stat -c '%h %D_%i %n' |
-+while read nlinks inum f; do
-+  get_debugfn "$f"
-+  [ -f "${debugfn}" ] && continue
-+
-+  # If this file has multiple links, keep track and make
-+  # the corresponding .debug files all links to one file too.
-+  if [ $nlinks -gt 1 ]; then
-+    eval linked=\$linked_$inum
-+    if [ -n "$linked" ]; then
-+      link=$debugfn
-+      get_debugfn "$linked"
-+      echo "hard linked $link to $debugfn"
-+      ln -nf "$debugfn" "$link"
-+      continue
-+    else
-+      eval linked_$inum=\$f
-+      echo "file $f has $[$nlinks - 1] other hard links"
-+    fi
-+  fi
-+
-+  echo "extracting debug info from $f"
-+  id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
-+                            -i -l "$SOURCEFILE" "$f") || exit
-+  if [ -z "$id" ]; then
-+    echo >&2 "*** ${strict_error}: No build ID note found in $f"
-+    $strict && exit 2
-+  fi
-+
-+  # A binary already copied into /usr/lib/debug doesn't get stripped,
-+  # just has its file names collected and adjusted.
-+  case "$dn" in
-+  /usr/lib/debug/*)
-+    [ -z "$id" ] || make_id_link "$id" "$dn/$(basename $f)"
-+    continue ;;
-+  esac
-+
-+  mkdir -p "${debugdn}"
-+  if test -w "$f"; then
-+    strip_to_debug "${debugfn}" "$f"
-+  else
-+    chmod u+w "$f"
-+    strip_to_debug "${debugfn}" "$f"
-+    chmod u-w "$f"
-+  fi
-+
-+  if [ -n "$id" ]; then
-+    make_id_link "$id" "$dn/$(basename $f)"
-+    make_id_link "$id" "/usr/lib/debug$dn/$bn" .debug
-+  fi
-+done || exit
-+
-+# For each symlink whose target has a .debug file,
-+# make a .debug symlink to that file.
-+find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print |
-+while read f
- do
--      dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
--      bn=$(basename $f .debug).debug
--
--      debugdn="${debugdir}${dn}"
--      debugfn="${debugdn}/${bn}"
--      [ -f "${debugfn}" ] && continue
--
--      echo extracting debug info from $f
--      /usr/lib/rpm/4.5/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
--
--      # A binary already copied into /usr/lib/debug doesn't get stripped,
--      # just has its file names collected and adjusted.
--      case "$dn" in
--      /usr/lib/debug/*) continue ;;
--      esac
--
--      mkdir -p "${debugdn}"
--      if test -w "$f"; then
--              strip_to_debug "${debugfn}" "$f"
--      else
--              chmod u+w "$f"
--              strip_to_debug "${debugfn}" "$f"
--              chmod u-w "$f"
--      fi
-+  t=$(readlink -m "$f").debug
-+  f=${f#$RPM_BUILD_ROOT}
-+  t=${t#$RPM_BUILD_ROOT}
-+  if [ -f "$debugdir$t" ]; then
-+    echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
-+    debug_link "/usr/lib/debug$t" "${f}.debug"
-+  fi
- done
--mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug
--cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0mL ${RPM_BUILD_ROOT}/usr/src/debug)
--# stupid cpio creates new directories in mode 0700, fixup
--find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx
-+if [ -s "$SOURCEFILE" ]; then
-+  mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug"
-+  LC_ALL=C sort -z -u "$SOURCEFILE" | egrep -v -z '(<internal>|<built-in>)$' |
-+  (cd "$RPM_BUILD_DIR"; cpio -pd0mL "${RPM_BUILD_ROOT}/usr/src/debug")
-+  # stupid cpio creates new directories in mode 0700, fixup
-+  find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 |
-+  xargs --no-run-if-empty -0 chmod a+rx
-+fi
-+
-+if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
-+  ((nout > 0)) ||
-+  test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
-+  (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
-+  sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
-+
-+  (cd "${RPM_BUILD_ROOT}/usr"
-+   test ! -d lib/debug || find lib/debug ! -type d
-+   test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1
-+  ) | sed 's,^,/usr/,' >> "$LISTFILE"
-+fi
-+
-+# Append to $1 only the lines from stdin not already in the file.
-+append_uniq()
-+{
-+  fgrep -f "$1" -x -v >> "$1"
-+}
--find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE
--find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE
-+# Helper to generate list of corresponding .debug files from a file list.
-+filelist_debugfiles()
-+{
-+  local extra="$1"
-+  shift
-+  sed 's/^%[a-z0-9_][a-z0-9_]*([^)]*) *//
-+s/^%[a-z0-9_][a-z0-9_]* *//
-+/^$/d
-+'"$extra" "$@"
-+}
-+
-+# Write an output debuginfo file list based on given input file lists.
-+filtered_list()
-+{
-+  local out="$1"
-+  shift
-+  test $# -gt 0 || return
-+  fgrep -f <(filelist_debugfiles 's,^.*$,/usr/lib/debug&.debug,' "$@") \
-+      -x $LISTFILE >> $out
-+  sed -n -f <(filelist_debugfiles 's/[\\.*+#]/\\&/g
-+h
-+s,^.*$,s# &$##p,p
-+g
-+s,^.*$,s# /usr/lib/debug&.debug$##p,p
-+' "$@") "$LINKSFILE" | append_uniq "$out"
-+}
-+
-+# Write an output debuginfo file list based on an egrep-style regexp.
-+pattern_list()
-+{
-+  local out="$1" ptn="$2"
-+  test -n "$ptn" || return
-+  egrep -x -e "$ptn" "$LISTFILE" >> "$out"
-+  sed -n -r "\#^$ptn #s/ .*\$//p" "$LINKSFILE" | append_uniq "$out"
-+}
-+
-+#
-+# When given multiple -o switches, split up the output as directed.
-+#
-+i=0
-+while ((i < nout)); do
-+  > ${outs[$i]}
-+  filtered_list ${outs[$i]} ${lists[$i]}
-+  pattern_list ${outs[$i]} "${ptns[$i]}"
-+  fgrep -vx -f ${outs[$i]} "$LISTFILE" > "${LISTFILE}.new"
-+  mv "${LISTFILE}.new" "$LISTFILE"
-+  ((++i))
-+done
-+if ((nout > 0)); then
-+  # Now add the right %dir lines to each output list.
-+  (cd "${RPM_BUILD_ROOT}"; find usr/lib/debug -type d) |
-+  sed 's#^.*$#\\@^/&/@{h;s@^.*$@%dir /&@p;g;}#' |
-+  LC_ALL=C sort -ur > "${LISTFILE}.dirs.sed"
-+  i=0
-+  while ((i < nout)); do
-+    sed -n -f "${LISTFILE}.dirs.sed" "${outs[$i]}" | sort -u > "${outs[$i]}.new"
-+    cat "${outs[$i]}" >> "${outs[$i]}.new"
-+    mv -f "${outs[$i]}.new" "${outs[$i]}"
-+    ((++i))
-+  done
-+  sed -n -f "${LISTFILE}.dirs.sed" "${LISTFILE}" | sort -u > "${LISTFILE}.new"
-+  cat "$LISTFILE" >> "${LISTFILE}.new"
-+  mv "${LISTFILE}.new" "$LISTFILE"
-+fi
diff --git a/rpm-no-neon.patch b/rpm-no-neon.patch
deleted file mode 100644 (file)
index bd926d1..0000000
+++ /dev/null
@@ -1,2313 +0,0 @@
---- rpm-4.5/rpmio/rpmdav.c~    2008-07-09 12:38:31.000000000 +0300
-+++ rpm-4.5/rpmio/rpmdav.c     2008-09-04 17:43:50.215697868 +0300
-@@ -9,58 +9,6 @@
- #include <pthread.h>
- #endif
--#if USE_INTERNAL_NEON
--#include "ne_alloc.h"
--#include "ne_auth.h"
--#include "ne_basic.h"
--#include "ne_dates.h"
--#include "ne_locks.h"
--#else
--#include "neon/ne_alloc.h"
--#include "neon/ne_auth.h"
--#include "neon/ne_basic.h"
--#include "neon/ne_dates.h"
--#include "neon/ne_locks.h"
--#endif
--
--#define       NEONBLOWSCHUNKS
--#ifndef       NEONBLOWSCHUNKS
--/* HACK: include ne_private.h to access sess->socket for now. */
--#include "../neon/src/ne_private.h"
--#endif
--
--#if USE_INTERNAL_NEON
--#include "ne_props.h"
--#include "ne_request.h"
--#include "ne_socket.h"
--#include "ne_string.h"
--#include "ne_utils.h"
--#include "ne_md5.h" /* for version detection only */
--#else
--#include "neon/ne_props.h"
--#include "neon/ne_request.h"
--#include "neon/ne_socket.h"
--#include "neon/ne_string.h"
--#include "neon/ne_utils.h"
--#include "neon/ne_md5.h" /* for version detection only */
--#endif
--
--/* poor-man's NEON version determination */
--#if defined(NE_MD5_H)
--#define WITH_NEON_MIN_VERSION 0x002700
--#elif defined(NE_FEATURE_I18N)
--#define WITH_NEON_MIN_VERSION 0x002600
--#else
--#define WITH_NEON_MIN_VERSION 0x002500
--#endif
--
--/* XXX API changes for NEON 0.26 */
--#if WITH_NEON_MIN_VERSION >= 0x002600
--#define       ne_set_persist(_sess, _flag)
--#define       ne_propfind_set_private(_pfh, _create_item, NULL) \
--      ne_propfind_set_private(_pfh, _create_item, NULL, NULL)
--#endif
--
- #include <rpmio_internal.h>
- #define _RPMDAV_INTERNAL
-@@ -74,1469 +22,6 @@
- /*@access FD_t @*/
- /*@access urlinfo @*/
--#if 0 /* HACK: reasonable value needed. */
--#define TIMEOUT_SECS 60
--#else
--#define TIMEOUT_SECS 5
--#endif
--/*@unchecked@*/
--static int httpTimeoutSecs = TIMEOUT_SECS;
--
--/* =============================================================== */
--int davFree(urlinfo u)
--      /*@globals internalState @*/
--      /*@modifies u, internalState @*/
--{
--    if (u != NULL) {
--      if (u->sess != NULL) {
--          ne_session_destroy(u->sess);
--          u->sess = NULL;
--      }
--      switch (u->urltype) {
--      default:
--          /*@notreached@*/ break;
--      case URL_IS_HTTPS:
--      case URL_IS_HTTP:
--      case URL_IS_HKP:
--          u->capabilities = _free(u->capabilities);
--          if (u->lockstore != NULL)
--              ne_lockstore_destroy(u->lockstore);
--          u->lockstore = NULL;
--          ne_sock_exit();
--          break;
--      }
--    }
--    return 0;
--}
--
--static void davProgress(void * userdata, off_t current, off_t total)
--      /*@*/
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--
--assert(u != NULL);
--    sess = u->sess;
--assert(sess != NULL);
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--    u->current = current;
--    u->total = total;
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davProgress(%p,0x%x:0x%x) sess %p u %p\n", userdata, (unsigned int)current, (unsigned int)total, sess, u);
--}
--
--#if WITH_NEON_MIN_VERSION >= 0x002700
--static void davNotify(void * userdata,
--              ne_session_status connstatus, const ne_session_status_info *info)
--#else
--static void davNotify(void * userdata,
--              ne_conn_status connstatus, const char * info)
--#endif
--      /*@*/
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--    /*@observer@*/
--    static const char * connstates[] = {
--      "namelookup",
--      "connecting",
--      "connected",
--      "secure",
--      "unknown"
--    };
--
--assert(u != NULL);
--    sess = u->sess;
--assert(sess != NULL);
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--#ifdef        REFERENCE
--typedef enum {
--    ne_conn_namelookup, /* lookup up hostname (info = hostname) */
--    ne_conn_connecting, /* connecting to host (info = hostname) */
--    ne_conn_connected, /* connected to host (info = hostname) */
--    ne_conn_secure /* connection now secure (info = crypto level) */
--} ne_conn_status;
--#endif
--
--#if WITH_NEON_MIN_VERSION < 0x002700
--    u->connstatus = connstatus;
--#endif
--
--/*@-boundsread@*/
--if (_dav_debug < 0)
--fprintf(stderr, "*** davNotify(%p,%d,%p) sess %p u %p %s\n", userdata, connstatus, info, sess, u, connstates[ (connstatus < 4 ? connstatus : 4)]);
--/*@=boundsread@*/
--
--}
--
--static void davCreateRequest(ne_request * req, void * userdata,
--              const char * method, const char * uri)
--      /*@*/
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--    void * private = NULL;
--    const char * id = "urlinfo";
--
--assert(u != NULL);
--assert(u->sess != NULL);
--assert(req != NULL);
--    sess = ne_get_session(req);
--assert(sess == u->sess);
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--assert(sess != NULL);
--    private = ne_get_session_private(sess, id);
--assert(u == private);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davCreateRequest(%p,%p,%s,%s) %s:%p\n", req, userdata, method, uri, id, private);
--}
--
--static void davPreSend(ne_request * req, void * userdata, ne_buffer * buf)
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--    const char * id = "fd";
--    FD_t fd = NULL;
--
--assert(u != NULL);
--assert(u->sess != NULL);
--assert(req != NULL);
--    sess = ne_get_session(req);
--assert(sess == u->sess);
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--    fd = ne_get_request_private(req, id);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davPreSend(%p,%p,%p) sess %p %s %p\n", req, userdata, buf, sess, id, fd);
--if (_dav_debug)
--fprintf(stderr, "-> %s\n", buf->data);
--
--}
--
--static int davPostSend(ne_request * req, void * userdata, const ne_status * status)
--      /*@*/
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--    const char * id = "fd";
--    FD_t fd = NULL;
--
--assert(u != NULL);
--assert(u->sess != NULL);
--assert(req != NULL);
--    sess = ne_get_session(req);
--assert(sess == u->sess);
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--    fd = ne_get_request_private(req, id);
--
--/*@-evalorder@*/
--if (_dav_debug < 0)
--fprintf(stderr, "*** davPostSend(%p,%p,%p) sess %p %s %p %s\n", req, userdata, status, sess, id, fd, ne_get_error(sess));
--/*@=evalorder@*/
--    return NE_OK;
--}
--
--static void davDestroyRequest(ne_request * req, void * userdata)
--      /*@*/
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--    const char * id = "fd";
--    FD_t fd = NULL;
--
--assert(u != NULL);
--assert(u->sess != NULL);
--assert(req != NULL);
--    sess = ne_get_session(req);
--assert(sess == u->sess);
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--    fd = ne_get_request_private(req, id);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davDestroyRequest(%p,%p) sess %p %s %p\n", req, userdata, sess, id, fd);
--}
--
--static void davDestroySession(void * userdata)
--      /*@*/
--{
--    urlinfo u = userdata;
--    ne_session * sess;
--    void * private = NULL;
--    const char * id = "urlinfo";
--
--assert(u != NULL);
--assert(u->sess != NULL);
--    sess = u->sess;
--assert(u == ne_get_session_private(sess, "urlinfo"));
--
--assert(sess != NULL);
--    private = ne_get_session_private(sess, id);
--assert(u == private);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davDestroySession(%p) sess %p %s %p\n", userdata, sess, id, private);
--}
--
--static int
--davVerifyCert(void *userdata, int failures, const ne_ssl_certificate *cert)
--      /*@*/
--{
--    const char *hostname = userdata;
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davVerifyCert(%p,%d,%p) %s\n", userdata, failures, cert, hostname);
--
--    return 0; /* HACK: trust all server certificates. */
--}
--
--static int davConnect(urlinfo u)
--      /*@globals internalState @*/
--      /*@modifies u, internalState @*/
--{
--    const char * path = NULL;
--    int rc;
--
--    /* HACK: hkp:// has no steenkin' options */
--    if (!(u->urltype == URL_IS_HTTP || u->urltype == URL_IS_HTTPS))
--      return 0;
--
--    /* HACK: where should server capabilities be read? */
--    (void) urlPath(u->url, &path);
--    /* HACK: perhaps capture Allow: tag, look for PUT permitted. */
--    /* XXX [hdr] Allow: GET,HEAD,POST,OPTIONS,TRACE */
--    rc = ne_options(u->sess, path, u->capabilities);
--    switch (rc) {
--    case NE_OK:
--    { ne_server_capabilities *cap = u->capabilities;
--      if (cap->dav_class1)
--          u->allow |= RPMURL_SERVER_HASDAVCLASS1;
--      else
--          u->allow &= ~RPMURL_SERVER_HASDAVCLASS1;
--      if (cap->dav_class2)
--          u->allow |= RPMURL_SERVER_HASDAVCLASS2;
--      else
--          u->allow &= ~RPMURL_SERVER_HASDAVCLASS2;
--      if (cap->dav_executable)
--          u->allow |= RPMURL_SERVER_HASDAVEXEC;
--      else
--          u->allow &= ~RPMURL_SERVER_HASDAVEXEC;
--    } break;
--    case NE_ERROR:
--      /* HACK: "301 Moved Permanently" on empty subdir. */
--      if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
--          break;
--      errno = EIO;            /* HACK: more precise errno. */
--      goto bottom;
--    case NE_LOOKUP:
--      errno = ENOENT;         /* HACK: errno same as non-existent path. */
--      goto bottom;
--    case NE_CONNECT:          /* HACK: errno set already? */
--    default:
--bottom:
--if (_dav_debug)
--fprintf(stderr, "*** Connect to %s:%d failed(%d):\n\t%s\n",
--                 u->host, u->port, rc, ne_get_error(u->sess));
--      break;
--    }
--
--    /* HACK: sensitive to error returns? */
--    u->httpVersion = (ne_version_pre_http11(u->sess) ? 0 : 1);
--
--    return rc;
--}
--
--static int davInit(const char * url, urlinfo * uret)
--      /*@globals internalState @*/
--      /*@modifies *uret, internalState @*/
--{
--    urlinfo u = NULL;
--    int rc = 0;
--
--/*@-globs@*/  /* FIX: h_errno annoyance. */
--    if (urlSplit(url, &u))
--      return -1;      /* XXX error returns needed. */
--/*@=globs@*/
--
--    if (u->url != NULL && u->sess == NULL)
--    switch (u->urltype) {
--    default:
--      assert(u->urltype != u->urltype);
--      /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--    case URL_IS_HKP:
--      {       ne_server_capabilities * capabilities;
--
--      /* HACK: oneshots should be done Somewhere Else Instead. */
--/*@-noeffect@*/
--      rc = ((_dav_debug < 0) ? NE_DBG_HTTP : 0);
--      ne_debug_init(stderr, rc);              /* XXX oneshot? */
--/*@=noeffect@*/
--      rc = ne_sock_init();                    /* XXX oneshot? */
--
--      u->lockstore = ne_lockstore_create();   /* XXX oneshot? */
--
--      u->capabilities = capabilities = xcalloc(1, sizeof(*capabilities));
--      u->sess = ne_session_create(u->scheme, u->host, u->port);
--
--      ne_lockstore_register(u->lockstore, u->sess);
--
--      if (u->proxyh != NULL)
--          ne_session_proxy(u->sess, u->proxyh, u->proxyp);
--
--#if 0
--      {   const ne_inet_addr ** addrs;
--          unsigned int n;
--          ne_set_addrlist(u->sess, addrs, n);
--      }
--#endif
--
--      ne_set_progress(u->sess, davProgress, u);
--#if WITH_NEON_MIN_VERSION >= 0x002700
--      ne_set_notifier(u->sess, davNotify, u);
--#else
--      ne_set_status(u->sess, davNotify, u);
--#endif
--
--      ne_set_persist(u->sess, 1);
--      ne_set_read_timeout(u->sess, httpTimeoutSecs);
--      ne_set_useragent(u->sess, PACKAGE "/" PACKAGE_VERSION);
--
--      /* XXX check that neon is ssl enabled. */
--      if (!strcasecmp(u->scheme, "https"))
--          ne_ssl_set_verify(u->sess, davVerifyCert, (char *)u->host);
--
--      ne_set_session_private(u->sess, "urlinfo", u);
--
--      ne_hook_destroy_session(u->sess, davDestroySession, u);
--
--      ne_hook_create_request(u->sess, davCreateRequest, u);
--      ne_hook_pre_send(u->sess, davPreSend, u);
--      ne_hook_post_send(u->sess, davPostSend, u);
--      ne_hook_destroy_request(u->sess, davDestroyRequest, u);
--
--      /* HACK: where should server capabilities be read? */
--      rc = davConnect(u);
--      if (rc)
--          goto exit;
--      }       break;
--    }
--
--exit:
--/*@-boundswrite@*/
--    if (uret != NULL)
--      *uret = urlLink(u, "davInit");
--/*@=boundswrite@*/
--    u = urlFree(u, "urlSplit (davInit)");
--
--    return rc;
--}
--
--/* =============================================================== */
--enum fetch_rtype_e {
--    resr_normal = 0,
--    resr_collection,
--    resr_reference,
--    resr_error
--};
--
--struct fetch_resource_s {
--/*@dependent@*/
--    struct fetch_resource_s *next;
--    char *uri;
--/*@unused@*/
--    char *displayname;
--    enum fetch_rtype_e type;
--    size_t size;
--    time_t modtime;
--    int is_executable;
--    int is_vcr;    /* Is version resource. 0: no vcr, 1 checkin 2 checkout */
--    char *error_reason; /* error string returned for this resource */
--    int error_status; /* error status returned for this resource */
--};
--
--/*@null@*/
--static void *fetch_destroy_item(/*@only@*/ struct fetch_resource_s *res)
--      /*@modifies res @*/
--{
--    ne_free(res->uri);
--    ne_free(res->error_reason);
--    res = _free(res);
--    return NULL;
--}
--
--#ifdef        UNUSED
--/*@null@*/
--static void *fetch_destroy_list(/*@only@*/ struct fetch_resource_s *res)
--      /*@modifies res @*/
--{
--    struct fetch_resource_s *next;
--/*@-branchstate@*/
--    for (; res != NULL; res = next) {
--      next = res->next;
--      res = fetch_destroy_item(res);
--    }
--/*@=branchstate@*/
--    return NULL;
--}
--#endif
--
--#if WITH_NEON_MIN_VERSION >= 0x002600
--static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const ne_uri *uri)
--#else
--static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const char *uri)
--#endif
--        /*@*/
--{
--    struct fetch_resource_s * res = ne_calloc(sizeof(*res));
--    return res;
--}
--
--/* =============================================================== */
--struct fetch_context_s {
--/*@relnull@*/ /*@dependent@*/
--    struct fetch_resource_s **resrock;
--    const char *uri;
--    unsigned int include_target; /* Include resource at href */
--/*@refcounted@*/
--    urlinfo u;
--    int ac;
--    int nalloced;
--    ARGV_t av;
--/*@null@*/ /*@shared@*/
--    struct stat *st;
--    mode_t * modes;
--    size_t * sizes;
--    time_t * mtimes;
--};
--
--/*@null@*/
--static void *fetch_destroy_context(/*@only@*/ /*@null@*/ struct fetch_context_s *ctx)
--      /*@globals internalState @*/
--      /*@modifies ctx, internalState @*/
--{
--    if (ctx == NULL)
--      return NULL;
--    if (ctx->av != NULL)
--      ctx->av = argvFree(ctx->av);
--    ctx->modes = _free(ctx->modes);
--    ctx->sizes = _free(ctx->sizes);
--    ctx->mtimes = _free(ctx->mtimes);
--    ctx->u = urlFree(ctx->u, "fetch_destroy_context");
--    ctx->uri = _free(ctx->uri);
--/*@-boundswrite@*/
--    memset(ctx, 0, sizeof(*ctx));
--/*@=boundswrite@*/
--    ctx = _free(ctx);
--    return NULL;
--}
--
--/*@null@*/
--static void *fetch_create_context(const char *uri, /*@null@*/ struct stat *st)
--      /*@globals internalState @*/
--      /*@modifies internalState @*/
--{
--    struct fetch_context_s * ctx;
--    urlinfo u;
--
--/*@-globs@*/  /* FIX: h_errno annoyance. */
--    if (urlSplit(uri, &u))
--      return NULL;
--/*@=globs@*/
--
--    ctx = ne_calloc(sizeof(*ctx));
--    ctx->uri = xstrdup(uri);
--    ctx->u = urlLink(u, "fetch_create_context");
--    if ((ctx->st = st) != NULL)
--      memset(ctx->st, 0, sizeof(*ctx->st));
--    return ctx;
--}
--
--/*@unchecked@*/ /*@observer@*/
--static const ne_propname fetch_props[] = {
--    { "DAV:", "getcontentlength" },
--    { "DAV:", "getlastmodified" },
--    { "http://apache.org/dav/props/", "executable" },
--    { "DAV:", "resourcetype" },
--    { "DAV:", "checked-in" },
--    { "DAV:", "checked-out" },
--    { NULL, NULL }
--};
--
--#define ELM_resourcetype (NE_PROPS_STATE_TOP + 1)
--#define ELM_collection (NE_PROPS_STATE_TOP + 2)
--
--/*@unchecked@*/ /*@observer@*/
--static const struct ne_xml_idmap fetch_idmap[] = {
--    { "DAV:", "resourcetype", ELM_resourcetype },
--    { "DAV:", "collection", ELM_collection }
--};
--
--static int fetch_startelm(void *userdata, int parent,
--              const char *nspace, const char *name,
--              /*@unused@*/ const char **atts)
--      /*@*/
--{
--    ne_propfind_handler *pfh = userdata;
--    struct fetch_resource_s *r = ne_propfind_current_private(pfh);
--    int state = ne_xml_mapid(fetch_idmap, NE_XML_MAPLEN(fetch_idmap),
--                             nspace, name);
--
--    if (r == NULL ||
--        !((parent == NE_207_STATE_PROP && state == ELM_resourcetype) ||
--          (parent == ELM_resourcetype && state == ELM_collection)))
--        return NE_XML_DECLINE;
--
--    if (state == ELM_collection) {
--      r->type = resr_collection;
--    }
--
--    return state;
--}
--
--static int fetch_compare(const struct fetch_resource_s *r1,
--                          const struct fetch_resource_s *r2)
--      /*@*/
--{
--    /* Sort errors first, then collections, then alphabetically */
--    if (r1->type == resr_error) {
--      return -1;
--    } else if (r2->type == resr_error) {
--      return 1;
--    } else if (r1->type == resr_collection) {
--      if (r2->type != resr_collection) {
--          return -1;
--      } else {
--          return strcmp(r1->uri, r2->uri);
--      }
--    } else {
--      if (r2->type != resr_collection) {
--          return strcmp(r1->uri, r2->uri);
--      } else {
--          return 1;
--      }
--    }
--}
--
--#if WITH_NEON_MIN_VERSION >= 0x002600
--static void fetch_results(void *userdata, const ne_uri *uarg,
--                  const ne_prop_result_set *set)
--#else
--static void fetch_results(void *userdata, void *uarg,
--                  const ne_prop_result_set *set)
--#endif
--      /*@*/
--{
--    struct fetch_context_s *ctx = userdata;
--    struct fetch_resource_s *current, *previous, *newres;
--    const char *clength, *modtime, *isexec;
--    const char *checkin, *checkout;
--    const ne_status *status = NULL;
--    const char * path = NULL;
--
--#if WITH_NEON_MIN_VERSION >= 0x002600
--    const ne_uri * uri = uarg;
--    (void) urlPath(uri->path, &path);
--#else
--    const char * uri = uarg;
--    (void) urlPath(uri, &path);
--#endif
--    if (path == NULL)
--      return;
--
--    newres = ne_propset_private(set);
--
--if (_dav_debug < 0)
--fprintf(stderr, "==> %s in uri %s\n", path, ctx->uri);
--
--    if (ne_path_compare(ctx->uri, path) == 0 && !ctx->include_target) {
--      /* This is the target URI */
--if (_dav_debug < 0)
--fprintf(stderr, "==> %s skipping target resource.\n", path);
--      /* Free the private structure. */
--/*@-dependenttrans -exposetrans@*/
--      free(newres);
--/*@=dependenttrans =exposetrans@*/
--      return;
--    }
--
--    newres->uri = ne_strdup(path);
--
--/*@-boundsread@*/
--    clength = ne_propset_value(set, &fetch_props[0]);
--    modtime = ne_propset_value(set, &fetch_props[1]);
--    isexec = ne_propset_value(set, &fetch_props[2]);
--    checkin = ne_propset_value(set, &fetch_props[4]);
--    checkout = ne_propset_value(set, &fetch_props[5]);
--/*@=boundsread@*/
--
--/*@-branchstate@*/
--    if (clength == NULL)
--      status = ne_propset_status(set, &fetch_props[0]);
--    if (modtime == NULL)
--      status = ne_propset_status(set, &fetch_props[1]);
--/*@=branchstate@*/
--
--    if (newres->type == resr_normal && status != NULL) {
--      /* It's an error! */
--      newres->error_status = status->code;
--
--      /* Special hack for Apache 1.3/mod_dav */
--      if (strcmp(status->reason_phrase, "status text goes here") == 0) {
--          const char *desc;
--          if (status->code == 401) {
--              desc = _("Authorization Required");
--          } else if (status->klass == 3) {
--              desc = _("Redirect");
--          } else if (status->klass == 5) {
--              desc = _("Server Error");
--          } else {
--              desc = _("Unknown Error");
--          }
--          newres->error_reason = ne_strdup(desc);
--      } else {
--          newres->error_reason = ne_strdup(status->reason_phrase);
--      }
--      newres->type = resr_error;
--    }
--
--    if (isexec && strcasecmp(isexec, "T") == 0) {
--      newres->is_executable = 1;
--    } else {
--      newres->is_executable = 0;
--    }
--
--    if (modtime)
--      newres->modtime = ne_httpdate_parse(modtime);
--
--    if (clength)
--      newres->size = atoi(clength);
--
--    /* is vcr */
--    if (checkin) {
--      newres->is_vcr = 1;
--    } else if (checkout) {
--      newres->is_vcr = 2;
--    } else {
--      newres->is_vcr = 0;
--    }
--
--    for (current = *ctx->resrock, previous = NULL; current != NULL;
--      previous = current, current = current->next)
--    {
--      if (fetch_compare(current, newres) >= 0) {
--          break;
--      }
--    }
--    if (previous) {
--      previous->next = newres;
--    } else {
--/*@-boundswrite -dependenttrans @*/
--      *ctx->resrock = newres;
--/*@=boundswrite =dependenttrans @*/
--    }
--    newres->next = current;
--}
--
--static int davFetch(const urlinfo u, struct fetch_context_s * ctx)
--      /*@globals internalState @*/
--      /*@modifies ctx, internalState @*/
--{
--    const char * path = NULL;
--    int depth = 1;                                    /* XXX passed arg? */
--    unsigned int include_target = 0;                  /* XXX passed arg? */
--    struct fetch_resource_s * resitem = NULL;
--    struct fetch_resource_s ** resrock = &resitem;    /* XXX passed arg? */
--    ne_propfind_handler *pfh;
--    struct fetch_resource_s *current, *next;
--    mode_t st_mode;
--    int rc = 0;
--    int xx;
--
--    (void) urlPath(u->url, &path);
--    pfh = ne_propfind_create(u->sess, ctx->uri, depth);
--
--    /* HACK: need to set RPMURL_SERVER_HASRANGE in u->allow here. */
--
--    ctx->resrock = resrock;
--    ctx->include_target = include_target;
--
--    ne_xml_push_handler(ne_propfind_get_parser(pfh),
--                        fetch_startelm, NULL, NULL, pfh);
--
--    ne_propfind_set_private(pfh, fetch_create_item, NULL);
--
--    rc = ne_propfind_named(pfh, fetch_props, fetch_results, ctx);
--
--    ne_propfind_destroy(pfh);
--
--    for (current = resitem; current != NULL; current = next) {
--      const char *s, *se;
--      char * val;
--
--      next = current->next;
--
--      /* Collections have trailing '/' that needs trim. */
--      /* The top level collection is returned as well. */
--      se = current->uri + strlen(current->uri);
--      if (se[-1] == '/') {
--          if (strlen(current->uri) <= strlen(path)) {
--              current = fetch_destroy_item(current);
--              continue;
--          }
--          se--;
--      }
--      s = se;
--      while (s > current->uri && s[-1] != '/')
--          s--;
--
--      val = ne_strndup(s, (se - s));
--
--/*@-nullpass@*/
--      val = ne_path_unescape(val);
--/*@=nullpass@*/
--
--      xx = argvAdd(&ctx->av, val);
--if (_dav_debug < 0)
--fprintf(stderr, "*** argvAdd(%p,\"%s\")\n", &ctx->av, val);
--      ne_free(val);
--
--      while (ctx->ac >= ctx->nalloced) {
--          if (ctx->nalloced <= 0)
--              ctx->nalloced = 1;
--          ctx->nalloced *= 2;
--          ctx->modes = xrealloc(ctx->modes,
--                              (sizeof(*ctx->modes) * ctx->nalloced));
--          ctx->sizes = xrealloc(ctx->sizes,
--                              (sizeof(*ctx->sizes) * ctx->nalloced));
--          ctx->mtimes = xrealloc(ctx->mtimes,
--                              (sizeof(*ctx->mtimes) * ctx->nalloced));
--      }
--
--      switch (current->type) {
--      case resr_normal:
--          st_mode = S_IFREG;
--          /*@switchbreak@*/ break;
--      case resr_collection:
--          st_mode = S_IFDIR;
--          /*@switchbreak@*/ break;
--      case resr_reference:
--      case resr_error:
--      default:
--          st_mode = 0;
--          /*@switchbreak@*/ break;
--      }
--/*@-boundswrite@*/
--      ctx->modes[ctx->ac] = st_mode;
--      ctx->sizes[ctx->ac] = current->size;
--      ctx->mtimes[ctx->ac] = current->modtime;
--/*@=boundswrite@*/
--      ctx->ac++;
--
--      current = fetch_destroy_item(current);
--    }
--    ctx->resrock = NULL;      /* HACK: avoid leaving stack reference. */
--    /* HACK realloc to truncate modes/sizes/mtimes */
--
--    return rc;
--}
--
--/* HACK this should be rewritten to use davReq/davResp w callbacks. */
--static int davHEAD(urlinfo u, struct stat *st) 
--      /*@modifies *st @*/
--{
--    ne_request *req;
--    const char *htag;
--    const char *value = NULL;
--    int rc;
--
--    st->st_mode = S_IFREG;
--    st->st_blksize = 4 * 1024;        /* HACK correct for linux ext */
--    st->st_size = -1;
--    st->st_atime = -1;
--    st->st_mtime = -1;
--    st->st_ctime = -1;
--
--    req = ne_request_create(u->sess, "HEAD", u->url);
--
--    rc = ne_request_dispatch(req);
--    switch (rc) {
--    default:
--      goto exit;
--      /*@notreached@*/
--    case NE_OK:
--      if (ne_get_status(req)->klass != 2) {
--          rc = NE_ERROR;
--          goto exit;
--      }
--      break;
--    }
--
--#ifdef        NOTYET
--    htag = "ETag";
--    value = ne_get_response_header(req, htag); 
--    if (value) {
--      /* inode-size-mtime */
--    }
--#endif
--
--    htag = "Content-Length";
--#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
--    value = ne_get_response_header(req, htag); 
--#endif
--    if (value) {
--      st->st_size = strtoll(value, NULL, 10);
--      st->st_blocks = (st->st_size + 511)/512;
--    }
--
--    htag = "Last-Modified";
--#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
--    value = ne_get_response_header(req, htag); 
--#endif
--    if (value) {
--      st->st_mtime = ne_httpdate_parse(value);
--      st->st_atime = st->st_ctime = st->st_mtime;     /* HACK */
--    }
--
--exit:
--    ne_request_destroy(req);
--    return rc;
--}
--
--static int davNLST(struct fetch_context_s * ctx)
--      /*@globals internalState @*/
--      /*@modifies ctx, internalState @*/
--{
--    urlinfo u = NULL;
--    int rc;
--    int xx;
--
--    rc = davInit(ctx->uri, &u);
--    if (rc || u == NULL)
--      goto exit;
--
--/* HACK do PROPFIND through davFetch iff enabled, otherwise HEAD Content-length/ETag/Last-Modified */
--    if (u->allow & RPMURL_SERVER_HASDAV)
--         rc = davFetch(u, ctx);       /* use PROPFIND to get contentLength */
--    else
--         rc = davHEAD(u, ctx->st);    /* use HEAD to get contentLength */
--
--    switch (rc) {
--    case NE_OK:
--        break;
--    case NE_ERROR:
--      /* HACK: "405 Method Not Allowed" for PROPFIND on non-DAV servers. */
--      /* XXX #206066 OPTIONS is ok, but PROPFIND from Stat() fails. */
--      /* rpm -qp --rpmiodebug --davdebug http://people.freedesktop.org/~sandmann/metacity-2.16.0-2.fc6/i386/metacity-2.16.0-2.fc6.i386.rpm */
--      /* HACK: "301 Moved Permanently" on empty subdir. */
--      if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
--          break;
--      /*@fallthrough@*/
--    default:
--if (_dav_debug)
--fprintf(stderr, "*** Fetch from %s:%d failed:\n\t%s\n",
--                 u->host, u->port, ne_get_error(u->sess));
--        break;
--    }
--
--exit:
--    xx = davFree(u);
--    return rc;
--}
--
--/* =============================================================== */
--static int my_result(const char * msg, int ret, /*@null@*/ FILE * fp)
--      /*@modifies *fp @*/
--{
--    /* HACK: don't print unless debugging. */
--    if (_dav_debug >= 0)
--      return ret;
--    if (fp == NULL)
--      fp = stderr;
--    if (msg != NULL)
--      fprintf(fp, "*** %s: ", msg);
--
--    /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */
--#ifdef        HACK
--    fprintf(fp, "%s: %s\n", ftpStrerror(-ret), ne_get_error(sess));
--#else
--    fprintf(fp, "%s\n", ftpStrerror(-ret));
--#endif
--    return ret;
--}
--
--#ifdef        DYING
--static void hexdump(const unsigned char * buf, ssize_t len)
--      /*@*/
--{
--    int i;
--    if (len <= 0)
--      return;
--    for (i = 0; i < len; i++) {
--      if (i != 0 && (i%16) == 0)
--          fprintf(stderr, "\n");
--      fprintf(stderr, " %02X", buf[i]);
--    }
--    fprintf(stderr, "\n");
--}
--#endif
--
--/*@-mustmod@*/
--static void davAcceptRanges(void * userdata, /*@null@*/ const char * value)
--      /*@modifies userdata @*/
--{
--    urlinfo u = userdata;
--
--    if (!(u != NULL && value != NULL)) return;
--if (_dav_debug < 0)
--fprintf(stderr, "*** u %p Accept-Ranges: %s\n", u, value);
--    if (!strcmp(value, "bytes"))
--      u->allow |= RPMURL_SERVER_HASRANGE;
--    if (!strcmp(value, "none"))
--      u->allow &= ~RPMURL_SERVER_HASRANGE;
--}
--/*@=mustmod@*/
--
--#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
--static void davAllHeaders(void * userdata, const char * value)
--{
--    FD_t ctrl = userdata;
--
--    if (!(ctrl != NULL && value != NULL)) return;
--if (_dav_debug)
--fprintf(stderr, "<- %s\n", value);
--}
--#endif
--
--/*@-mustmod@*/
--static void davContentLength(void * userdata, /*@null@*/ const char * value)
--      /*@modifies userdata @*/
--{
--    FD_t ctrl = userdata;
--
--    if (!(ctrl != NULL && value != NULL)) return;
--if (_dav_debug < 0)
--fprintf(stderr, "*** fd %p Content-Length: %s\n", ctrl, value);
--/*@-unrecog@*/
--   ctrl->contentLength = strtoll(value, NULL, 10);
--/*@=unrecog@*/
--}
--/*@=mustmod@*/
--
--/*@-mustmod@*/
--static void davConnection(void * userdata, /*@null@*/ const char * value)
--      /*@modifies userdata @*/
--{
--    FD_t ctrl = userdata;
--
--    if (!(ctrl != NULL && value != NULL)) return;
--if (_dav_debug < 0)
--fprintf(stderr, "*** fd %p Connection: %s\n", ctrl, value);
--    if (!strcasecmp(value, "close"))
--      ctrl->persist = 0;
--    else if (!strcasecmp(value, "Keep-Alive"))
--      ctrl->persist = 1;
--}
--/*@=mustmod@*/
--
--/*@-mustmod@*/ /* HACK: stash error in *str. */
--int davResp(urlinfo u, FD_t ctrl, /*@unused@*/ char *const * str)
--{
--    int rc = 0;
--
--    rc = ne_begin_request(ctrl->req);
--    rc = my_result("ne_begin_req(ctrl->req)", rc, NULL);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davResp(%p,%p,%p) sess %p req %p rc %d\n", u, ctrl, str, u->sess, ctrl->req, rc);
--
--    /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */
--/*@-observertrans@*/
--    if (rc)
--      fdSetSyserrno(ctrl, errno, ftpStrerror(-rc));
--/*@=observertrans@*/
--
--    return rc;
--}
--/*@=mustmod@*/
--
--int davReq(FD_t ctrl, const char * httpCmd, const char * httpArg)
--{
--    urlinfo u;
--    int rc = 0;
--
--assert(ctrl != NULL);
--    u = ctrl->url;
--    URLSANE(u);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davReq(%p,%s,\"%s\") entry sess %p req %p\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req);
--
--    ctrl->persist = (u->httpVersion > 0 ? 1 : 0);
--    ctrl = fdLink(ctrl, "open ctrl (davReq)");
--
--assert(u->sess != NULL);
--assert(ctrl->req == NULL);
--/*@-nullpass@*/
--    ctrl->req = ne_request_create(u->sess, httpCmd, httpArg);
--/*@=nullpass@*/
--assert(ctrl->req != NULL);
--
--    ne_set_request_private(ctrl->req, "fd", ctrl);
--
--#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
--    ne_add_response_header_catcher(ctrl->req, davAllHeaders, ctrl);
--
--    ne_add_response_header_handler(ctrl->req, "Content-Length",
--              davContentLength, ctrl);
--    ne_add_response_header_handler(ctrl->req, "Connection",
--              davConnection, ctrl);
--#endif
--
--    if (!strcmp(httpCmd, "PUT")) {
--#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
--      ctrl->wr_chunked = 1;
--      ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
--      ne_set_request_chunked(ctrl->req, 1);
--      /* HACK: no retries if/when chunking. */
--      rc = davResp(u, ctrl, NULL);
--#else
--      rc = FTPERR_SERVER_IO_ERROR;
--#endif
--    } else {
--      /* HACK: possible Last-Modified: Tue, 02 Nov 2004 14:29:36 GMT */
--      /* HACK: possible ETag: "inode-size-mtime" */
--#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
--      ne_add_response_header_handler(ctrl->req, "Accept-Ranges",
--                      davAcceptRanges, u);
--#endif
--      /* HACK: possible Transfer-Encoding: on GET. */
--
--      /* HACK: other errors may need retry too. */
--      /* HACK: neon retries once, gud enuf. */
--      /* HACK: retry counter? */
--      do {
--          rc = davResp(u, ctrl, NULL);
--      } while (rc == NE_RETRY);
--    }
--    if (rc)
--      goto errxit;
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davReq(%p,%s,\"%s\") exit sess %p req %p rc %d\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req, rc);
--
--#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
--    davContentLength(ctrl,
--              ne_get_response_header(ctrl->req, "Content-Length"));
--    davConnection(ctrl,
--              ne_get_response_header(ctrl->req, "Connection"));
--    if (strcmp(httpCmd, "PUT"))
--      davAcceptRanges(u,
--              ne_get_response_header(ctrl->req, "Accept-Ranges"));
--#endif
--
--    ctrl = fdLink(ctrl, "open data (davReq)");
--    return 0;
--
--errxit:
--/*@-observertrans@*/
--    fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
--/*@=observertrans@*/
--
--    /* HACK balance fd refs. ne_session_destroy to tear down non-keepalive? */
--    ctrl = fdLink(ctrl, "error data (davReq)");
--
--    return rc;
--}
--
--FD_t davOpen(const char * url, /*@unused@*/ int flags,
--              /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
--{
--    const char * path = NULL;
--    urltype urlType = urlPath(url, &path);
--    urlinfo u = NULL;
--    FD_t fd = NULL;
--    int rc;
--
--#if 0 /* XXX makeTempFile() heartburn */
--    assert(!(flags & O_RDWR));
--#endif
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davOpen(%s,0x%x,0%o,%p)\n", url, flags, mode, uret);
--    rc = davInit(url, &u);
--    if (rc || u == NULL || u->sess == NULL)
--      goto exit;
--
--    if (u->ctrl == NULL)
--      u->ctrl = fdNew("persist ctrl (davOpen)");
--    if (u->ctrl->nrefs > 2 && u->data == NULL)
--      u->data = fdNew("persist data (davOpen)");
--
--    if (u->ctrl->url == NULL)
--      fd = fdLink(u->ctrl, "grab ctrl (davOpen persist ctrl)");
--    else if (u->data->url == NULL)
--      fd = fdLink(u->data, "grab ctrl (davOpen persist data)");
--    else
--      fd = fdNew("grab ctrl (davOpen)");
--
--    if (fd) {
--      fdSetOpen(fd, url, flags, mode);
--      fdSetIo(fd, ufdio);
--
--      fd->ftpFileDoneNeeded = 0;
--      fd->rd_timeoutsecs = httpTimeoutSecs;
--      fd->contentLength = fd->bytesRemain = -1;
--      fd->url = urlLink(u, "url (davOpen)");
--      fd = fdLink(fd, "grab data (davOpen)");
--assert(urlType == URL_IS_HTTPS || urlType == URL_IS_HTTP || urlType == URL_IS_HKP);
--      fd->urlType = urlType;
--    }
--
--exit:
--/*@-boundswrite@*/
--    if (uret)
--      *uret = u;
--/*@=boundswrite@*/
--    /*@-refcounttrans@*/
--    return fd;
--    /*@=refcounttrans@*/
--}
--
--ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
--{
--    FD_t fd = cookie;
--    ssize_t rc;
--
--#if 0
--assert(count >= 128); /* HACK: see ne_request.h comment */
--#endif
--    rc = ne_read_response_block(fd->req, buf, count);
--
--if (_dav_debug < 0) {
--fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
--#ifdef        DYING
--hexdump(buf, rc);
--#endif
--    }
--
--    return rc;
--}
--
--ssize_t davWrite(void * cookie, const char * buf, size_t count)
--{
--#if !defined(NEONBLOWSCHUNKS) || defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
--    FD_t fd = cookie;
--#endif
--    ssize_t rc;
--    int xx = -1;
--
--#if !defined(NEONBLOWSCHUNKS)
--    ne_session * sess;
--
--assert(fd->req != NULL);
--    sess = ne_get_session(fd->req);
--assert(sess != NULL);
--
--    /* HACK: include ne_private.h to access sess->socket for now. */
--    xx = ne_sock_fullwrite(sess->socket, buf, count);
--#else
--#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
--assert(fd->req != NULL);
--    xx = ne_send_request_chunk(fd->req, buf, count);
--#else
--    errno = EIO;       /* HACK */
--    return -1;
--#endif
--#endif
--
--    /* HACK: stupid error impedence matching. */
--    rc = (xx == 0 ? count : -1);
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
--#ifdef        DYING
--if (count > 0)
--hexdump(buf, count);
--#endif
--
--    return rc;
--}
--
--int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)
--{
--if (_dav_debug < 0)
--fprintf(stderr, "*** davSeek(%p,pos,%d)\n", cookie, whence);
--    return -1;
--}
--
--/*@-mustmod@*/        /* HACK: fd->req is modified. */
--int davClose(void * cookie)
--{
--/*@-onlytrans@*/
--    FD_t fd = cookie;
--/*@=onlytrans@*/
--    int rc;
--
--assert(fd->req != NULL);
--    rc = ne_end_request(fd->req);
--    rc = my_result("ne_end_request(req)", rc, NULL);
--
--    ne_request_destroy(fd->req);
--    fd->req = NULL;
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davClose(%p) rc %d\n", fd, rc);
--    return rc;
--}
--/*@=mustmod@*/
--
--/* =============================================================== */
--int davMkdir(const char * path, mode_t mode)
--{
--    urlinfo u = NULL;
--    const char * src = NULL;
--    int rc;
--
--    rc = davInit(path, &u);
--    if (rc)
--      goto exit;
--
--    (void) urlPath(path, &src);
--
--    rc = ne_mkcol(u->sess, path);
--
--    if (rc) rc = -1;  /* XXX HACK: errno impedance match */
--
--    /* XXX HACK: verify getrestype(remote) == resr_collection */
--
--exit:
--if (_dav_debug)
--fprintf(stderr, "*** davMkdir(%s,0%o) rc %d\n", path, mode, rc);
--    return rc;
--}
--
--int davRmdir(const char * path)
--{
--    urlinfo u = NULL;
--    const char * src = NULL;
--    int rc;
--
--    rc = davInit(path, &u);
--    if (rc)
--      goto exit;
--
--    (void) urlPath(path, &src);
--
--    /* XXX HACK: only getrestype(remote) == resr_collection */
--
--    rc = ne_delete(u->sess, path);
--
--    if (rc) rc = -1;  /* XXX HACK: errno impedance match */
--
--exit:
--if (_dav_debug)
--fprintf(stderr, "*** davRmdir(%s) rc %d\n", path, rc);
--    return rc;
--}
--
--int davRename(const char * oldpath, const char * newpath)
--{
--    urlinfo u = NULL;
--    const char * src = NULL;
--    const char * dst = NULL;
--    int overwrite = 1;                /* HACK: set this correctly. */
--    int rc;
--
--    rc = davInit(oldpath, &u);
--    if (rc)
--      goto exit;
--
--    (void) urlPath(oldpath, &src);
--    (void) urlPath(newpath, &dst);
--
--    /* XXX HACK: only getrestype(remote) != resr_collection */
--
--    rc = ne_move(u->sess, overwrite, src, dst);
--
--    if (rc) rc = -1;  /* XXX HACK: errno impedance match */
--
--exit:
--if (_dav_debug)
--fprintf(stderr, "*** davRename(%s,%s) rc %d\n", oldpath, newpath, rc);
--    return rc;
--}
--
--int davUnlink(const char * path)
--{
--    urlinfo u = NULL;
--    const char * src = NULL;
--    int rc;
--
--    rc = davInit(path, &u);
--    if (rc)
--      goto exit;
--
--    (void) urlPath(path, &src);
--
--    /* XXX HACK: only getrestype(remote) != resr_collection */
--
--    rc = ne_delete(u->sess, src);
--
--exit:
--    if (rc) rc = -1;  /* XXX HACK: errno impedance match */
--
--if (_dav_debug)
--fprintf(stderr, "*** davUnlink(%s) rc %d\n", path, rc);
--    return rc;
--}
--
--#ifdef        NOTYET
--static int davChdir(const char * path)
--      /*@globals h_errno, fileSystem, internalState @*/
--      /*@modifies fileSystem, internalState @*/
--{
--    return davCommand("CWD", path, NULL);
--}
--#endif        /* NOTYET */
--
--/* =============================================================== */
--
--static const char * statstr(const struct stat * st,
--              /*@returned@*/ /*@out@*/ char * buf)
--      /*@modifies *buf @*/
--{
--    sprintf(buf,
--      "*** dev %x ino %x mode %0o nlink %d uid %d gid %d rdev %x size %x\n",
--      (unsigned)st->st_dev,
--      (unsigned)st->st_ino,
--      st->st_mode,
--      (unsigned)st->st_nlink,
--      st->st_uid,
--      st->st_gid,
--      (unsigned)st->st_rdev,
--      (unsigned)st->st_size);
--    return buf;
--}
--
--/*@unchecked@*/
--static unsigned int dav_st_ino = 0xdead0000;
--
--/*@-boundswrite@*/
--int davStat(const char * path, /*@out@*/ struct stat *st)
--      /*@globals dav_st_ino, fileSystem, internalState @*/
--      /*@modifies *st, dav_st_ino, fileSystem, internalState @*/
--{
--    struct fetch_context_s * ctx = NULL;
--    char buf[1024];
--    int rc = -1;
--
--/* HACK: neon really wants collections with trailing '/' */
--    ctx = fetch_create_context(path, st);
--    if (ctx == NULL) {
--fprintf(stderr, "==> %s fetch_create_context ctx %p\n", "davStat", ctx);
--/* HACK: errno = ??? */
--      goto exit;
--    }
--    rc = davNLST(ctx);
--    if (rc) {
--/* HACK: errno = ??? */
--      goto exit;
--    }
--
--    if (st->st_mode == 0)
--      st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG);
--    st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size);
--    st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime);
--    st->st_atime = st->st_ctime = st->st_mtime;       /* HACK */
--    if (S_ISDIR(st->st_mode)) {
--      st->st_nlink = 2;
--      st->st_mode |= 0755;
--    } else
--    if (S_ISREG(st->st_mode)) {
--      st->st_nlink = 1;
--      st->st_mode |= 0644;
--    }
--
--    /* XXX fts(3) needs/uses st_ino, make something up for now. */
--    if (st->st_ino == 0)
--      st->st_ino = dav_st_ino++;
--
--exit:
--if (_dav_debug < 0)
--fprintf(stderr, "*** davStat(%s) rc %d\n%s", path, rc, statstr(st, buf));
--    ctx = fetch_destroy_context(ctx);
--    return rc;
--}
--/*@=boundswrite@*/
--
--/*@-boundswrite@*/
--int davLstat(const char * path, /*@out@*/ struct stat *st)
--      /*@globals dav_st_ino, fileSystem, internalState @*/
--      /*@modifies *st, dav_st_ino, fileSystem, internalState @*/
--{
--    struct fetch_context_s * ctx = NULL;
--    char buf[1024];
--    int rc = -1;
--
--/* HACK: neon really wants collections with trailing '/' */
--    ctx = fetch_create_context(path, st);
--    if (ctx == NULL) {
--/* HACK: errno = ??? */
--      goto exit;
--    }
--    rc = davNLST(ctx);
--    if (rc) {
--/* HACK: errno = ??? */
--      goto exit;
--    }
--
--    if (st->st_mode == 0)
--      st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG);
--    st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size);
--    st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime);
--    st->st_atime = st->st_ctime = st->st_mtime;       /* HACK */
--    if (S_ISDIR(st->st_mode)) {
--      st->st_nlink = 2;
--      st->st_mode |= 0755;
--    } else
--    if (S_ISREG(st->st_mode)) {
--      st->st_nlink = 1;
--      st->st_mode |= 0644;
--    }
--
--    /* XXX fts(3) needs/uses st_ino, make something up for now. */
--    if (st->st_ino == 0)
--      st->st_ino = dav_st_ino++;
--if (_dav_debug < 0)
--fprintf(stderr, "*** davLstat(%s) rc %d\n%s\n", path, rc, statstr(st, buf));
--exit:
--    ctx = fetch_destroy_context(ctx);
--    return rc;
--}
--/*@=boundswrite@*/
--
--#ifdef        NOTYET
--static int davReadlink(const char * path, /*@out@*/ char * buf, size_t bufsiz)
--      /*@globals h_errno, fileSystem, internalState @*/
--      /*@modifies *buf, fileSystem, internalState @*/
--{
--    int rc;
--    rc = davNLST(path, DO_FTP_READLINK, NULL, buf, bufsiz);
--if (_dav_debug < 0)
--fprintf(stderr, "*** davReadlink(%s) rc %d\n", path, rc);
--    return rc;
--}
--#endif        /* NOTYET */
--
- /* =============================================================== */
- /*@unchecked@*/
- int avmagicdir = 0x3607113;
-@@ -1660,179 +145,3 @@
- /*@=kepttrans@*/
- }
- /*@=boundswrite@*/
--
--/* =============================================================== */
--/*@unchecked@*/
--int davmagicdir = 0x8440291;
--
--int davClosedir(/*@only@*/ DIR * dir)
--{
--    DAVDIR avdir = (DAVDIR)dir;
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davClosedir(%p)\n", avdir);
--
--#if defined(HAVE_PTHREAD_H)
--/*@-moduncon -noeffectuncon @*/
--    (void) pthread_mutex_destroy(&avdir->lock);
--/*@=moduncon =noeffectuncon @*/
--#endif
--
--    avdir = _free(avdir);
--    return 0;
--}
--
--struct dirent * davReaddir(DIR * dir)
--{
--    DAVDIR avdir = (DAVDIR)dir;
--    struct dirent * dp;
--    const char ** av;
--    unsigned char * dt;
--    int ac;
--    int i;
--
--    if (avdir == NULL || !ISDAVMAGIC(avdir) || avdir->data == NULL) {
--      /* XXX TODO: EBADF errno. */
--      return NULL;
--    }
--
--    dp = (struct dirent *) avdir->data;
--    av = (const char **) (dp + 1);
--    ac = avdir->size;
--    dt = (unsigned char *) (av + (ac + 1));
--    i = avdir->offset + 1;
--
--/*@-boundsread@*/
--    if (i < 0 || i >= ac || av[i] == NULL)
--      return NULL;
--/*@=boundsread@*/
--
--    avdir->offset = i;
--
--    /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
--/*@-type@*/
--    dp->d_ino = i + 1;                /* W2DO? */
--    dp->d_reclen = 0;         /* W2DO? */
--
--#if !(defined(hpux) || defined(__hpux) || defined(sun))
--#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)
--    dp->d_off = 0;            /* W2DO? */
--#endif
--/*@-boundsread@*/
--    dp->d_type = dt[i];
--/*@=boundsread@*/
--#endif
--/*@=type@*/
--
--    strncpy(dp->d_name, av[i], sizeof(dp->d_name));
--if (_dav_debug < 0)
--fprintf(stderr, "*** davReaddir(%p) %p \"%s\"\n", (void *)avdir, dp, dp->d_name);
--
--    return dp;
--}
--
--/*@-boundswrite@*/
--DIR * davOpendir(const char * path)
--{
--    struct fetch_context_s * ctx;
--    DAVDIR avdir;
--    struct dirent * dp;
--    size_t nb;
--    const char ** av, ** nav;
--    unsigned char * dt;
--    char * t;
--    int ac, nac;
--    int rc;
--
--    /* HACK: glob does not pass dirs with trailing '/' */
--    nb = strlen(path)+1;
--/*@-branchstate@*/
--    if (path[nb-1] != '/') {
--      char * npath = alloca(nb+1);
--      *npath = '\0';
--      (void) stpcpy( stpcpy(npath, path), "/");
--      path = npath;
--    }
--/*@=branchstate@*/
--
--if (_dav_debug < 0)
--fprintf(stderr, "*** davOpendir(%s)\n", path);
--
--    /* Load DAV collection into argv. */
--    ctx = fetch_create_context(path, NULL);
--    if (ctx == NULL) {
--/* HACK: errno = ??? */
--      return NULL;
--    }
--    rc = davNLST(ctx);
--    if (rc) {
--/* HACK: errno = ??? */
--      return NULL;
--    }
--
--    nb = 0;
--    ac = 0;
--    av = ctx->av;
--    if (av != NULL)
--    while (av[ac] != NULL)
--      nb += strlen(av[ac++]) + 1;
--    ac += 2;  /* for "." and ".." */
--    nb += sizeof(".") + sizeof("..");
--
--    nb += sizeof(*avdir) + sizeof(*dp) + ((ac + 1) * sizeof(*av)) + (ac + 1);
--    avdir = xcalloc(1, nb);
--    /*@-abstract@*/
--    dp = (struct dirent *) (avdir + 1);
--    nav = (const char **) (dp + 1);
--    dt = (unsigned char *) (nav + (ac + 1));
--    t = (char *) (dt + ac + 1);
--    /*@=abstract@*/
--
--    avdir->fd = davmagicdir;
--/*@-usereleased@*/
--    avdir->data = (char *) dp;
--/*@=usereleased@*/
--    avdir->allocation = nb;
--    avdir->size = ac;
--    avdir->offset = -1;
--    avdir->filepos = 0;
--
--#if defined(HAVE_PTHREAD_H)
--/*@-moduncon -noeffectuncon -nullpass @*/
--    (void) pthread_mutex_init(&avdir->lock, NULL);
--/*@=moduncon =noeffectuncon =nullpass @*/
--#endif
--
--    nac = 0;
--/*@-dependenttrans -unrecog@*/
--    dt[nac] = DT_DIR; nav[nac++] = t; t = stpcpy(t, ".");     t++;
--    dt[nac] = DT_DIR; nav[nac++] = t; t = stpcpy(t, "..");    t++;
--/*@=dependenttrans =unrecog@*/
--
--    /* Copy DAV items into DIR elments. */
--    ac = 0;
--    if (av != NULL)
--    while (av[ac] != NULL) {
--      nav[nac] = t;
--      dt[nac] = (S_ISDIR(ctx->modes[ac]) ? DT_DIR : DT_REG);
--      t = stpcpy(t, av[ac]);
--      ac++;
--      t++;
--      nac++;
--    }
--    nav[nac] = NULL;
--
--    ctx = fetch_destroy_context(ctx);
--
--/*@-kepttrans@*/
--    return (DIR *) avdir;
--/*@=kepttrans@*/
--}
--/*@=modfilesys@*/
--
--char * davRealpath(const char * path, char * resolved_path)
--{
--assert(resolved_path == NULL);        /* XXX no POSIXly broken realpath(3) here. */
--    /* XXX TODO: handle redirects. For now, just dupe the path. */
--    return xstrdup(path);
--}
---- rpm-4.5/rpmio/rpmdav.h     2007-05-25 20:36:36.000000000 +0300
-+++ rpm-4.4.9/rpmio/rpmdav.h   2008-09-04 17:21:50.369579599 +0300
-@@ -46,12 +46,6 @@
- extern int avmagicdir;
- #define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir)))
--/**
-- */
--/*@unchecked@*/
--extern int davmagicdir;
--#define ISDAVMAGIC(_dir) (!memcmp((_dir), &davmagicdir, sizeof(davmagicdir)))
--
- #ifdef __cplusplus
- extern "C" {
- #endif
-@@ -85,133 +79,6 @@
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fileSystem, internalState @*/;
--/**
-- * Send a http request.
-- * @param ctrl                
-- * @param httpCmd     http command
-- * @param httpArg     http command argument (NULL if none)
-- * @returns           0 on success
-- */
--int davReq(FD_t ctrl, const char * httpCmd, /*@null@*/ const char * httpArg)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies ctrl, fileSystem, internalState @*/;
--
--/**
-- * Read a http response.
-- * @param u
-- * @param cntl                
-- * @retval *str               error msg               
-- * @returns           0 on success
-- */
--/*@-exportlocal@*/
--int davResp(urlinfo u, FD_t ctrl, /*@out@*/ /*@null@*/ char *const * str)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies ctrl, *str, fileSystem, internalState @*/;
--/*@=exportlocal@*/
--
--/**
-- */
--/*@null@*/
--FD_t davOpen(const char * url, /*@unused@*/ int flags,
--              /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
--        /*@globals internalState @*/
--        /*@modifies *uret, internalState @*/;
--
--/**
-- */
--/*@-incondefs@*/
--ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
--        /*@globals fileSystem, internalState @*/
--        /*@modifies buf, fileSystem, internalState @*/
--      /*@requires maxSet(buf) >= (count - 1) @*/
--      /*@ensures maxRead(buf) == result @*/;
--/*@=incondefs@*/
--
--/**
-- */
--ssize_t davWrite(void * cookie, const char * buf, size_t count)
--        /*@globals fileSystem, internalState @*/
--        /*@modifies fileSystem, internalState @*/;
--
--/**
-- */
--int davSeek(void * cookie, _libio_pos_t pos, int whence)
--        /*@globals fileSystem, internalState @*/
--        /*@modifies fileSystem, internalState @*/;
--
--/**
-- */
--int davClose(void * cookie)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies cookie, fileSystem, internalState @*/;
--
--/**
-- */
--int davMkdir(const char * path, mode_t mode)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies fileSystem, internalState @*/;
--
--/**
-- */
--int davRmdir(const char * path)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies fileSystem, internalState @*/;
--
--/**
-- */
--int davRename(const char * oldpath, const char * newpath)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies fileSystem, internalState @*/;
--
--/**
-- */
--int davUnlink(const char * path)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies fileSystem, internalState @*/;
--
--/**
-- * Close a DAV collection.
-- * @param dir         argv DIR
-- * @return            0 always
-- */
--int davClosedir(/*@only@*/ DIR * dir)
--      /*@globals fileSystem @*/
--      /*@modifies dir, fileSystem @*/;
--
--/**
-- * Return next entry from a DAV collection.
-- * @param dir         argv DIR
-- * @return            next entry
-- */
--/*@dependent@*/ /*@null@*/
--struct dirent * davReaddir(DIR * dir)
--      /*@globals fileSystem @*/
--      /*@modifies fileSystem @*/;
--
--/**
-- * Create an argv directory from DAV collection.
-- * @param path                URL for DAV collection path
-- * @return            argv DIR
-- */
--/*@null@*/
--DIR * davOpendir(const char * path)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies fileSystem, internalState @*/;
--
--/**
-- * stat(2) clone.
-- */
--int davStat(const char * path, /*@out@*/ struct stat * st)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies *st, fileSystem, internalState @*/;
--
--/**
-- * lstat(2) clone.
-- */
--int davLstat(const char * path, /*@out@*/ struct stat * st)
--      /*@globals fileSystem, internalState @*/
--      /*@modifies *st, fileSystem, internalState @*/;
--
- #ifdef __cplusplus
- }
- #endif
---- rpm-4.5/rpmio/rpmio.c      2008-09-04 18:04:37.362241187 +0300
-+++ rpm-4.5/rpmio/rpmio.c      2008-09-04 18:05:08.695569896 +0300
-@@ -155,11 +155,6 @@
- /*@unchecked@*/
- int _ftp_debug = 0;
--/**
-- */
--/*@unchecked@*/
--int _dav_debug = 0;
--
- /* =============================================================== */
- /*@-boundswrite@*/
-@@ -386,13 +381,6 @@
-     fdstat_enter(fd, FDSTAT_READ);
- /*@-boundswrite@*/
--    /* HACK: flimsy wiring for davRead */
--    if (fd->req != NULL) {
--      rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
--      /* XXX Chunked davRead EOF. */
--      if (rc == 0)
--          fd->bytesRemain = 0;
--    } else
-       rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
- /*@=boundswrite@*/
-     fdstat_exit(fd, FDSTAT_READ, rc);
-@@ -420,10 +408,6 @@
-     fdstat_enter(fd, FDSTAT_WRITE);
- /*@-boundsread@*/
--    /* HACK: flimsy wiring for davWrite */
--    if (fd->req != NULL)
--      rc = davWrite(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
--    else
-       rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
- /*@=boundsread@*/
-     fdstat_exit(fd, FDSTAT_WRITE, rc);
-@@ -470,11 +454,6 @@
-     fdSetFdno(fd, -1);
-     fdstat_enter(fd, FDSTAT_CLOSE);
--    /* HACK: flimsy wiring for davClose */
--/*@-branchstate@*/
--    if (fd->req != NULL)
--      rc = davClose(fd);
--    else
-       rc = ((fdno >= 0) ? close(fdno) : -2);
- /*@=branchstate@*/
-     fdstat_exit(fd, FDSTAT_CLOSE, rc);
-@@ -544,10 +523,6 @@
-     FD_ZERO(&wrfds);
- #endif
-       
--    /* HACK: flimsy wiring for davWrite */
--    if (fd->req != NULL)
--      return 1;
--
-     if ((fdno = fdFileno(fd)) < 0)
-       return -1;      /* XXX W2DO? */
-       
-@@ -599,10 +574,6 @@
-     FD_ZERO(&rdfds);
- #endif
--    /* HACK: flimsy wiring for davRead */
--    if (fd->req != NULL)
--      return 1;
--
-     if ((fdno = fdFileno(fd)) < 0)
-       return -1;      /* XXX W2DO? */
-       
-@@ -2265,29 +2236,6 @@
-           fd->wr_chunked = 0;
-       }
-       break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--    case URL_IS_HKP:
--      fd = davOpen(url, flags, mode, &u);
--      if (fd == NULL || u == NULL)
--          break;
--
--      cmd = ((flags & O_WRONLY)
--              ?  ((flags & O_APPEND) ? "PUT" :
--                 ((flags & O_CREAT) ? "PUT" : "PUT"))
--              : "GET");
--      u->openError = davReq(fd, cmd, path);
--      if (u->openError < 0) {
--          /* XXX make sure that we can exit through ufdClose */
--          fd = fdLink(fd, "error ctrl (ufdOpen HTTP)");
--          fd = fdLink(fd, "error data (ufdOpen HTTP)");
--      } else {
--          fd->bytesRemain = ((!strcmp(cmd, "GET"))
--              ?  fd->contentLength : -1);
--          fd->wr_chunked = ((!strcmp(cmd, "PUT"))
--              ?  fd->wr_chunked : 0);
--      }
--      break;
-     case URL_IS_DASH:
-       assert(!(flags & O_RDWR));
-       fd = fdDup( ((flags & O_WRONLY) ? STDOUT_FILENO : STDIN_FILENO) );
-@@ -2911,10 +2859,8 @@
-           if (fd->nfps > 0 && fpno == -1 &&
-               fd->fps[fd->nfps-1].io == ufdio &&
-               fd->fps[fd->nfps-1].fp == fp &&
--              (fd->fps[fd->nfps-1].fdno >= 0 || fd->req != NULL))
-+              (fd->fps[fd->nfps-1].fdno >= 0))
-           {
--              int hadreqpersist = (fd->req != NULL);
--
-               if (fp)
-                   rc = fflush(fp);
-               fd->nfps--;
-@@ -2924,26 +2870,9 @@
- /*@-usereleased@*/
-               if (fdGetFdno(fd) >= 0)
-                   break;
--              if (!fd->persist)
--                  hadreqpersist = 0;
-               fdSetFp(fd, NULL);
-               fd->nfps++;
-               if (fp) {
--                  /* HACK: flimsy Keepalive wiring. */
--                  if (hadreqpersist) {
--                      fd->nfps--;
--/*@-exposetrans@*/
--                      fdSetFp(fd, fp);
--/*@=exposetrans@*/
--/*@-refcounttrans@*/
--                      (void) fdClose(fd);
--/*@=refcounttrans@*/
--                      fdSetFp(fd, NULL);
--                      fd->nfps++;
--/*@-refcounttrans@*/
--                      (void) fdClose(fd);
--/*@=refcounttrans@*/
--                  } else
-                       rc = fclose(fp);
-               }
-               fdPop(fd);
-@@ -3223,7 +3152,7 @@
- if (_rpmio_debug)
- fprintf(stderr, "*** Fopen ufdio path %s fmode %s\n", path, fmode);
-           fd = ufdOpen(path, flags, perms);
--          if (fd == NULL || !(fdFileno(fd) >= 0 || fd->req != NULL))
-+          if (fd == NULL || !(fdFileno(fd) >= 0))
-               return fd;
-           break;
-       default:
-@@ -3234,7 +3163,7 @@
-       }
-       /* XXX persistent HTTP/1.1 returns the previously opened fp */
--      if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0 || fd->req != NULL))
-+      if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0))
-       {
-           /*@+voidabstract@*/
-           fdPush(fd, fpio, fp, fileno(fp));   /* Push fpio onto stack */
-@@ -3276,10 +3205,6 @@
-     int i, rc = 0;
-     if (fd == NULL) return -1;
--    if (fd->req != NULL) {
--      /* HACK: flimsy wiring for neon errors. */
--      rc = (fd->syserrno  || fd->errcookie != NULL) ? -1 : 0;
--    } else
-     for (i = fd->nfps; rc == 0 && i >= 0; i--) {
- /*@-boundsread@*/
-       FDSTACK_t * fps = &fd->fps[i];
-@@ -3317,9 +3242,6 @@
- {
-     int i, rc = -1;
--    if (fd->req != NULL)
--      rc = 123456789; /* HACK: https has no steenkin fileno. */
--    else
-     for (i = fd->nfps ; rc == -1 && i >= 0; i--) {
- /*@-boundsread@*/
-       rc = fd->fps[i].fdno;
---- rpm-4.5/rpmio/librpmio.vers~       2008-07-09 12:38:31.000000000 +0300
-+++ rpm-4.5/rpmio/librpmio.vers        2008-09-04 17:52:56.158976430 +0300
-@@ -29,25 +29,6 @@
-     Chmod;
-     Chown;
-     Chroot;
--    davClose;
--    davClosedir;
--    _dav_debug;
--    davLstat;
--    davmagicdir;
--    davMkdir;
--    davOpen;
--    davOpendir;
--    davRead;
--    davReaddir;
--    davRealpath;
--    davRename;
--    davReq;
--    davResp;
--    davRmdir;
--    davSeek;
--    davStat;
--    davUnlink;
--    davWrite;
-     delMacro;
-     expandMacros;
-     Fclose;
---- rpm-4.5/lib/poptALL.c~     2007-10-23 18:53:08.000000000 +0300
-+++ rpm-4.5/lib/poptALL.c      2008-09-04 17:53:21.845642132 +0300
-@@ -126,8 +126,6 @@
- extern int _ftp_debug;
- /*@unchecked@*/
- extern int _av_debug;
--/*@unchecked@*/
--extern int _dav_debug;
- /*@unchecked@*/
- extern int noLibio;
-@@ -424,8 +422,6 @@
-       N_("debug FTP/HTTP data stream"), NULL},
-  { "avdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_av_debug, -1,
-       N_("debug argv collections"), NULL},
-- { "davdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_dav_debug, -1,
--      N_("debug WebDAV data stream"), NULL},
-  { "hdrdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_hdr_debug, -1,
-       NULL, NULL},
-  { "miredebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_mire_debug, -1,
---- rpm-4.5/rpmio/rpmrpc.c     2008-09-04 17:56:39.132287618 +0300
-+++ rpm-4.5/rpmio/rpmrpc.c     2008-09-04 17:57:38.618948392 +0300
-@@ -78,10 +78,6 @@
-     case URL_IS_FTP:
-       return ftpMkdir(path, mode);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--      return davMkdir(path, mode);
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -105,15 +101,6 @@
-     case URL_IS_FTP:
-       return ftpChdir(path);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--#ifdef        NOTYET
--      return davChdir(path);
--#else
--      errno = EINVAL;         /* XXX W2DO? */
--      return -2;
--#endif
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -138,10 +125,6 @@
-     case URL_IS_FTP:
-       return ftpRmdir(path);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--      return davRmdir(path);
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -245,10 +228,6 @@
-     oldut = urlPath(oldpath, &oe);
-     switch (oldut) {
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--      return davRename(oldpath, newpath);
--      /*@notreached@*/ break;
-     case URL_IS_FTP:          /* XXX WRONG WRONG WRONG */
-     case URL_IS_PATH:
-     case URL_IS_UNKNOWN:
-@@ -343,10 +322,6 @@
-     case URL_IS_FTP:
-       return ftpUnlink(path);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--      return davUnlink(path);
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -1354,10 +1329,6 @@
-     case URL_IS_FTP:
-       return ftpStat(path, st);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--      return davStat(path, st);
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -1384,10 +1355,6 @@
-     case URL_IS_FTP:
-       return ftpLstat(path, st);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--      return davLstat(path, st);
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -1630,14 +1597,6 @@
-     case URL_IS_FTP:
-       return ftpReadlink(path, buf, bufsiz);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:
--    case URL_IS_HTTP:
--#ifdef        NOTYET
--      return davReadlink(path, buf, bufsiz);
--#else
--      return -2;
--#endif
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -1787,10 +1746,6 @@
-     case URL_IS_FTP:
-       return ftpOpendir(path);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:        
--    case URL_IS_HTTP:
--      return davOpendir(path);
--      /*@notreached@*/ break;
-     case URL_IS_PATH:
-       path = lpath;
-       /*@fallthrough@*/
-@@ -1815,8 +1770,6 @@
-       return NULL;
-     if (ISAVMAGIC(dir))
-       return avReaddir(dir);
--    if (ISDAVMAGIC(dir))
--      return davReaddir(dir);
-     return readdir(dir);
- }
-@@ -1828,8 +1781,6 @@
-       return 0;
-     if (ISAVMAGIC(dir))
-       return avClosedir(dir);
--    if (ISDAVMAGIC(dir))
--      return davClosedir(dir);
-     return closedir(dir);
- }
-@@ -1852,14 +1803,6 @@
-     case URL_IS_FTP:
-       return ftpRealpath(path, resolved_path);
-       /*@notreached@*/ break;
--    case URL_IS_HTTPS:        
--    case URL_IS_HTTP:
--    case URL_IS_HKP:
--#ifdef WITH_NEON
--      return davRealpath(path, resolved_path);
--      /*@notreached@*/ break;
--#endif
--      /*@fallthrough@*/
-     default:
-       return xstrdup(path);
-       /*@notreached@*/ break;
---- rpm-4.5/./rpmio/rpmio_internal.h~  2008-06-10 02:19:26.000000000 +0300
-+++ rpm-4.5/./rpmio/rpmio_internal.h   2008-09-04 18:00:31.015598325 +0300
-@@ -182,7 +182,6 @@
- /*@dependent@*/
-     void *    url;            /* ufdio: URL info */
- /*@relnull@*/
--    void *    req;            /* ufdio: HTTP request */
-     int               rd_timeoutsecs; /* ufdRead: per FD_t timer */
-     ssize_t   bytesRemain;    /* ufdio: */
---- rpm-4.5/rpmio/rpmurl.h~    2008-06-10 02:19:26.000000000 +0300
-+++ rpm-4.5/rpmio/rpmurl.h     2008-09-04 18:14:00.546141703 +0300
-@@ -54,15 +54,6 @@
- /*@relnull@*/
-     FD_t data;                        /*!< per-xfer data channel */
--/*@relnull@*/
--    void * capabilities;      /*!< neon: ne_server_capabilities ptr */
--/*@relnull@*/
--    void * lockstore;         /*!< neon: ne_lock_store ptr */
--/*@relnull@*/
--    void * sess;              /*!< neon: ne_session ptr */
--    off_t current;            /*!< neon: current body offset. */
--    off_t total;              /*!< neon: total body length. */
--    int connstatus;           /*!< neon: connection status. */
- #ifdef  REFERENCE
- typedef enum {
-     ne_conn_namelookup,       /* lookup up hostname (info = hostname) */
---- rpm-4.5/rpmio/url.c~       2008-06-10 02:19:26.000000000 +0300
-+++ rpm-4.5/rpmio/url.c        2008-09-04 20:05:19.011716915 +0300
-@@ -134,7 +134,6 @@
-                       (u->scheme ? u->scheme : ""));
-       /*@=usereleased@*/
-     }
--    xx = davFree(u);
-     u->buf = _free(u->buf);
-     u->url = _free(u->url);
-     u->scheme = _free((void *)u->scheme);
---- rpm-4.5/perl/Makefile.PL.in~       2008-10-05 01:31:09.000000000 +0300
-+++ rpm-4.5/perl/Makefile.PL.in        2008-10-05 01:32:12.688278120 +0300
-@@ -12,7 +12,7 @@
-     'NAME'            => 'RPM',
-     'VERSION_FROM'    => 'RPM.pm', # finds $VERSION
-     'PREREQ_PM'               => {}, # e.g., Module::Name => 1.1
--    'LIBS'            => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@ -lneon'],
-+    'LIBS'            => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@'],
-     'DEFINE'          => join(" ", @defines), # e.g., '-DHAVE_SOMETHING'
-     'INC' => join(' ', map { '-I@top_srcdir@/'. $_ } @libdir) . ' @CPPFLAGS@',
-     'TYPEMAPS'          => [ 'typemap' ],
---- rpm-4.5/configure.ac.orig  2011-02-21 16:29:42.000000000 +0100
-+++ rpm-4.5/configure.ac       2011-02-21 16:31:00.574910173 +0100
-@@ -591,28 +591,7 @@
- WITH_NEON_SUBDIR=
- WITH_NEON_INCLUDE=
- WITH_NEON_LIB=
--AC_CHECK_HEADER([neon/ne_session.h], [
--  AC_CHECK_LIB(neon, ne_session_create, [
--    AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
--    AC_CHECK_LIB(neon, ne_get_response_header, [
--      AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
--    ])
--    AC_CHECK_LIB(neon, ne_send_request_chunk, [
--      AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
--    ])
--    WITH_NEON_INCLUDE="-I${includedir}/neon"
--    WITH_NEON_LIB="-lneon"
--  ])
--],[
--  if test -d neon ; then
--    AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
--# XXX HAVE_NEON_NE_GET_RESPONSE_HEADER assumes libneon-0.25 devel internal
--    AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
--    WITH_NEON_SUBDIR=neon
--    WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
--    WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
--  fi
--])
-+
- AC_SUBST(WITH_NEON_SUBDIR)
- AC_SUBST(WITH_NEON_INCLUDE)
- AC_SUBST(WITH_NEON_LIB)
diff --git a/rpm-no-sqlite.patch b/rpm-no-sqlite.patch
deleted file mode 100644 (file)
index 5a686a5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- rpm-4.4.9/configure.ac.orig        2005-11-19 01:08:41.529577632 +0100
-+++ rpm-4.4.9/configure.ac     2005-11-19 01:09:44.521001480 +0100
-@@ -618,24 +596,6 @@
- WITH_SQLITE3_INCLUDE=
- WITH_SQLITE3_LIB=
--AC_CHECK_HEADER([sqlite3.h], [
--  AC_CHECK_LIB(sqlite, sqlite3_open, [
--    AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
--    WITH_SQLITE3_SUBDIR=
--    WITH_SQLITE3_INCLUDE=
--    WITH_SQLITE3_LIB="-lsqlite"
--    DBLIBSRCS="$DBLIBSRCS sqlite.c"
--  ])
--],[
--  if test -d sqlite ; then
--    AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
--    WITH_SQLITE3_SUBDIR=sqlite
--    WITH_SQLITE3_INCLUDE="-I\${top_srcdir}/${WITH_SQLITE3_SUBDIR} -I\${top_srcdir}/${WITH_SQLITE3_SUBDIR}/src"
--    WITH_SQLITE3_LIB="\${top_builddir}/${WITH_SQLITE3_SUBDIR}/libsqlite3.la"
--    DBLIBSRCS="$DBLIBSRCS sqlite.c"
--  fi
--])
--
- AC_SUBST(WITH_SQLITE3_SUBDIR)
- AC_SUBST(WITH_SQLITE3_INCLUDE)
- AC_SUBST(WITH_SQLITE3_LIB)
diff --git a/rpm-noarch-subpackages.patch b/rpm-noarch-subpackages.patch
deleted file mode 100644 (file)
index a9d0b0e..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-diff -urpa rpm-4.5.orig/build/parsePreamble.c rpm-4.5/build/parsePreamble.c
---- rpm-4.5.orig/build/parsePreamble.c 2019-06-01 18:55:39.351000000 +0200
-+++ rpm-4.5/build/parsePreamble.c      2019-06-01 19:24:30.398000000 +0200
-@@ -730,19 +730,32 @@ static int handlePreambleTag(Spec spec,
-     case RPMTAG_EXCLUSIVEOS:
-       addOrAppendListEntry(spec->sourceHeader, tag, field);
-       break;
--    case RPMTAG_BUILDARCHS:
--      if ((rc = poptParseArgvString(field,
--                                    &(spec->BACount),
--                                    &(spec->BANames)))) {
-+    case RPMTAG_BUILDARCHS: {
-+      int BACount;
-+      const char **BANames = NULL;
-+      if ((rc = poptParseArgvString(field, &BACount, &BANames))) {
-           rpmError(RPMERR_BADSPEC,
-                    _("line %d: Bad BuildArchitecture format: %s\n"),
-                    spec->lineNum, spec->line);
-           return RPMERR_BADSPEC;
-       }
--      if (!spec->BACount)
-+      if (spec->packages == pkg) {
-+          spec->BACount = BACount;
-+          spec->BANames = BANames;
-+      } else {
-+          if (BACount != 1 || strcmp(BANames[0], "noarch")) {
-+              rpmError(RPMERR_BADSPEC,
-+                      _("line %d: Only noarch subpackages are supported: %s\n"),
-+                      spec->lineNum, spec->line);
-+              BANames = _free(BANames);
-+              return RPMRC_FAIL;
-+          }
-+          headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, "noarch", 1);
-+      }
-+      if (!BACount)
-           spec->BANames = _free(spec->BANames);
-       break;
--
-+    }
-     default:
-       rpmError(RPMERR_INTERNAL, _("Internal error: Bogus tag %d\n"), tag);
-       return RPMERR_INTERNAL;
-diff -urpa rpm-4.5.orig/build/parseSpec.c rpm-4.5/build/parseSpec.c
---- rpm-4.5.orig/build/parseSpec.c     2019-06-01 18:55:39.226000000 +0200
-+++ rpm-4.5/build/parseSpec.c  2019-06-01 19:27:44.338000000 +0200
-@@ -627,8 +627,11 @@ int parseSpec(rpmts ts, const char *spec
-       }
-       (void) headerAddEntry(pkg->header, RPMTAG_OS, RPM_STRING_TYPE, os, 1);
--      (void) headerAddEntry(pkg->header, RPMTAG_ARCH,
--              RPM_STRING_TYPE, arch, 1);
-+      /* noarch subpackages already have arch set here, leave it alone */
-+      if (!headerIsEntry(pkg->header, RPMTAG_ARCH)) {
-+          (void) headerAddEntry(pkg->header, RPMTAG_ARCH,
-+                  RPM_STRING_TYPE, arch, 1);
-+      }
-       (void) headerAddEntry(pkg->header, RPMTAG_PLATFORM,
-               RPM_STRING_TYPE, platform, 1);
diff --git a/rpm-noexpand.patch b/rpm-noexpand.patch
deleted file mode 100644 (file)
index 781a54e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 84def0d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 04bcb34..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 17eb68a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644 (file)
index c0697cd..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 9869de2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- rpm-4.4.4/lib/poptI.c.orig 2005-11-27 13:50:16.000000000 +0000
-+++ rpm-4.4.4/lib/poptI.c      2005-12-28 02:43:01.029574304 +0000
-@@ -16,7 +16,7 @@
- /*@-fullinitblock@*/
- /*@unchecked@*/
- struct rpmQVKArguments_s rpmIArgs = {
--    .probFilter = (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
-+    .probFilter = 0,
- };
- /*@=fullinitblock@*/
-@@ -274,9 +273,6 @@
-       N_("skip files with leading component <path> "),
-       N_("<path>") },
-- { "fileconflicts", '\0', POPT_BIT_CLR, &rpmIArgs.probFilter,
--      (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
--      N_("detect file conflicts between packages"), NULL},
-  { "force", '\0', 0, NULL, RPMCLI_POPT_FORCE,
-       N_("short hand for --replacepkgs --replacefiles"), NULL},
index 0744b9f822d54c69b333e55dc8e415519167b15d..1d09638388873b813cebea16cf0c88c90b1798ad 100644 (file)
---- 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";
+--- rpm-5.3.1/configure.ac.wiget       2010-05-22 17:15:11.000000000 +0200
++++ rpm-5.3.1/configure.ac     2010-05-30 16:37:59.526924459 +0200
+@@ -1100,7 +1100,7 @@ AC_CONFIG_FILES([ po/Makefile.in
+ AC_CONFIG_FILES([Makefile
+       rpmio/Makefile lib/Makefile build/Makefile sign/Makefile
+-      po/Makefile.in scripts/Makefile fileattrs/Makefile
++      po/Makefile.in scripts/Makefile scripts/perl.req scripts/perl.prov fileattrs/Makefile
+       misc/Makefile 
+       doc/Makefile
+       python/Makefile
+--- rpm-5.3.1/scripts/perl.req.wiget   2008-10-26 10:50:53.000000000 +0100
++++ rpm-5.3.1/scripts/perl.req 2010-05-30 16:35:36.999438206 +0200
+@@ -45,7 +45,11 @@
+ if ("@ARGV") {
+   foreach (@ARGV) {
+-    process_file($_);
++    if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
++      if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
++        process_file($_);
++      }
++    }
+   }
+ } else {
+@@ -53,7 +57,11 @@
+   # contents of the file.
+   foreach (<>) {
+-    process_file($_);
++     if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
++       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
++         process_file($_);
++       }
++     }
+   }
+ }
+@@ -261,19 +269,41 @@
+       $module =~ s/\(\s*\)$//;
+-      if ( $module =~ m/^v?([0-9._]+)$/ ) {
++      if ( $module =~ m/^(v?)([0-9._]+)$/ ) {
+       # if module is a number then both require and use interpret that
+       # to mean that a particular version of perl is specified
+-      my $ver = $1;
+-      if ($ver =~ /5.00/) {
+-        $perlreq{"0:$ver"} = 1;
+-        next;
+-      }
+-      else {
+-        $perlreq{"1:$ver"} = 1;
+-        next;
+-      }
++      my $ver=$2;
++      if (($1 eq 'v') or ($ver =~ /[0-9]+\.[0-9]+\.[0-9]+/)) {
++        # $V-style
++        if ($ver =~ m/5\.([0-5])(\.([0-9]+))?$/) {
++          if (defined $3) {
 +            print "perl-base >= 0:5.00$1_$3\n";
 +            print "perl-base >= 0:5.00$1_$3\n";
-           } else {
--            print "perl >= 0:5.00$1\n";
++          } else {
 +            print "perl-base >= 0:5.00$1\n";
 +            print "perl-base >= 0:5.00$1\n";
-           }
-         } else {
--          print "perl >= 1:$ver\n";
++          }
++        } else {
 +          print "perl-base >= 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";
++        }
++      } else {
++        # $]-style
++        if ($ver =~ m/5\.(00[0-5])_?([0-9]+)?$/) {
++          if (defined $2) {
 +            print "perl-base >= 0:5.$1_$2\n";
 +            print "perl-base >= 0:5.$1_$2\n";
-           } else {
--            print "perl >= 0:5.$1\n";
++          } else {
 +            print "perl-base >= 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";
++          }
++        } else {
++          # expand to M.NNN_nnn form
++          $ver =~ s/^([0-9])$/$1./;
++          $ver =~ s/^([0-9]\.[0-9]{0,5}|[0-9]\.[0-9]{3}_[0-9]{0,2})$/${1}000000/;
++          $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-base >= 1:$1.$2.$3\n";
 +          print "perl-base >= 1:$1.$2.$3\n";
-         }
-       }
-       next;
-@@ -326,6 +326,10 @@
++        }
++      }
++      next;
+       };
  
  
-       ($module =~ m/\.(ph|pl|t)$/) && next;
+@@ -290,7 +320,31 @@
+       # will be included with the name sys/systeminfo.ph so only use the
+       # basename of *.ph files
  
  
+-      ($module =~ m/\.ph$/) && next;
++      # ($module  =~ m/\.ph$/) && ($module =~ s!.*/!!g );
++
++      # there is no need to generate dependencies for ph, pl or test files
++      # so let's just skip them.
++
++      ($module =~ m/\.(ph|pl|t)$/) && next;
++
 +      # skip all modules for platforms other than linux.
 +
 +      ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && 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.
++      # if the module name starts in a dot it is not a module name.
++
++      ($module =~ m/^\./) && next;
++
++      # if the module ends with .pm strip it to leave only basename.
++
++      $module =~ s/\.pm$//;
++
++      $module =~ s/\//::/;
++
++      # trim off trailing parenthesis if any.  Sometimes people pass
++      # the module an empty list.
++
++      $module =~ s/\(\s*\)$//;
  
  
-       ($module =~ m/^\./) && next;
+       # use base|parent qw(Foo) dependencies
+       if ($statement eq "use" && ($module eq "base" || $module eq "parent")) {
diff --git a/rpm-perl-magic.patch b/rpm-perl-magic.patch
new file mode 100644 (file)
index 0000000..1faacf3
--- /dev/null
@@ -0,0 +1,10 @@
+--- rpm/build/rpmfc.c.orig     2014-10-07 15:53:03.185631053 +0100
++++ rpm/build/rpmfc.c  2014-10-07 16:02:32.487591097 +0100
+@@ -593,6 +593,7 @@
+   { "GNU Info",                       RPMFC_INCLUDE },
+   { "perl ",                  RPMFC_INCLUDE },
++  { "Perl script",            RPMFC_INCLUDE },
+   { "Perl5 module source text", RPMFC_INCLUDE },
+   { "python ",                        RPMFC_INCLUDE },
diff --git a/rpm-perl-makefile.patch b/rpm-perl-makefile.patch
deleted file mode 100644 (file)
index 9387e26..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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-perlfile.patch b/rpm-perl-req-perlfile.patch
new file mode 100644 (file)
index 0000000..16ad595
--- /dev/null
@@ -0,0 +1,123 @@
+--- rpm-4.2/scripts/perl.req.wigperl   Tue Apr  1 13:33:52 2003
++++ rpm-4.2/scripts/perl.req   Tue Apr  1 13:39:47 2003
+@@ -39,28 +39,19 @@
+ eval { require version; $HAVE_VERSION = 1; };
+-if ("@ARGV") {
+-  foreach (@ARGV) {
++foreach ( @ARGV ? @ARGV : <> ) {
++      chomp;
+     if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
+       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
+-        process_file($_);
++        process_file($_) if -f;
+       }
+     }
+-  }
+-} else {
+-
+-  # notice we are passed a list of filenames NOT as common in unix the
+-  # contents of the file.
+-
+-  foreach (<>) {
+-     if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
+-       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
+-         process_file($_);
+-       }
+-     }
+-  }
+ }
++foreach (sort keys %provide) {
++    delete $require{$_};
++}
++delete $require{the}; # don't count "use the sth" as perl module  
+ foreach $perlver (sort keys %perlreq) {
+   print "perl >= $perlver\n";
+@@ -82,6 +74,53 @@
+   }
+ }
++sub is_perlfile {
++    my $file = shift;
++    my $fh = shift;
++
++    my $fl = <$fh>;
++
++    my $is_perl = 0;
++
++    my $nw = 0;
++
++    if ($file =~ /\.(so|ph|h|html|pod|gz|bz2|png|gif|jpg|xpm|a|patch|o|mo)$/) {
++      $is_perl = 0;
++      
++      # .al, .pl, .pm and .plx (perl-Font-TTF contains *.plx files)
++    } elsif ($file =~ /\.p[lm]x?$/ || $file =~ /\.al$/) {     
++      $is_perl = 1;
++      #print STDERR "$file PERL by ext\n";
++    } elsif ($fl =~ m|bin/perl| or $fl =~ m|env\s+perl| or $fl =~ m|exec\s+perl|) {
++      $is_perl = 1;
++      #print STDERR "$file PERL by perl\n";
++    } elsif ($fl =~ m|bin/sh|) {
++      while (<$fh>) {
++          if (/eval/ && /perl/) {
++              $is_perl = 1;
++              last;
++          }
++          $nw++ if (/^\s*BEGIN/); 
++          $nw++ if (/^\s*sub\s+/);
++          $nw++ if (/^\s*package\s+/);
++          $nw++ if (/^\s*use\s+strict\s+;/);
++          $nw++ if (/^\s*use\s+vars\s*qw/);
++          last if ($. > 30);
++      }
++    }
++
++    seek($fh, 0, 0);
++
++    $is_perl = 1 if ($nw > 1);  # propably perl file
++
++    #if (!$is_perl) {
++    #   print STDERR "NOPERL $file\n";
++    #   return 0;
++    #}        
++    #print STDERR "PERL $file\n" if ($is_perl);
++    return $is_perl;
++}
++
+ sub process_file {
+   my ($file) = @_;
+@@ -90,6 +129,8 @@
+     return;
+   }
++  return if (!is_perlfile($file, \*FILE));
++
+   while (<FILE>) {
+     # skip the "= <<" block
+@@ -111,6 +152,10 @@
+       last;
+     }
++    if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
++      $provide{$1} = 1;
++    }
++
+     # Each keyword can appear multiple times.  Don't
+     #  bother with datastructures to store these strings,
+     #  if we need to print it print it now.
+@@ -236,6 +281,10 @@
+       ($module =~ m/^\./) && next;
++      # name starts in a non alphanumeric character it is not a module 
++      # name.
++      ($module =~ m/^\W/) && next;
++
+       # if the module ends with .pm strip it to leave only basename.
+       $module =~ s/\.pm$//;
diff --git a/rpm-perl_req-INC_dirs.patch b/rpm-perl_req-INC_dirs.patch
new file mode 100644 (file)
index 0000000..f15d401
--- /dev/null
@@ -0,0 +1,34 @@
+--- scripts/perl.req~  2004-04-16 13:27:10.000000000 +0200
++++ scripts/perl.req   2004-04-26 23:54:42.128568344 +0200
+@@ -39,9 +39,18 @@
+ eval { require version; $HAVE_VERSION = 1; };
++# *inc variables are used to track dependencies on directories for modules.
++# These directories (especially arch-dependent) are likely to change some day.
++my @inc = sort { length $b cmp length $a }
++          map { s#/*$##; $_ }
++          grep m#^/.#, @INC;
++my %inc = map { $_ => 0 } @inc;
++my $inc = join '|', map "\Q$_\E", @inc;
++
+ foreach ( @ARGV ? @ARGV : <> ) {
+-      chomp;
+-    if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
++    chomp;
++    $inc{$1}++ if m#($inc)/#;  # can't anchor on ^
++    if (m=/usr/(sbin|bin|lib|lib64|libx32|share|X11R6/(lib|lib64|libx32|bin))/=) {
+       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
+         process_file($_) if -f;
+       }
+@@ -53,7 +64,9 @@
+ foreach $perlver (sort keys %perlreq) {
+   print "perl >= $perlver\n";
+ }
++print "$_\n" for sort grep $inc{$_}, keys %inc;
++
+-foreach $module (sort keys %require) {
++foreach my $module (sort grep length, keys %require) {
+   if (length($require{$module}) == 0) {
+     print "perl($module)\n";
+   } else {
diff --git a/rpm-perl_req-heredocs_pod.patch b/rpm-perl_req-heredocs_pod.patch
deleted file mode 100644 (file)
index 5d7d9f2..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
---- rpm-5.1.4/scripts/perl.req.in.orig 2008-10-26 10:26:43.622757203 +0100
-+++ rpm-5.1.4/scripts/perl.req 2008-10-26 10:26:48.452756609 +0100
-@@ -140,15 +140,22 @@
-   return if (!is_perlfile($file, \*FILE));
-   while (<FILE>) {
--    
--    # skip the "= <<" block
--    if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) ||
--         ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) {
--      $tag = $2;
--      while (<FILE>) {
--        ( $_ =~ /^$tag/) && last;
--      }
-+    # skip the documentation
-+    if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) {
-+        $_ = <FILE> until /^=cut/ or eof;
-+        next;
-+    }
-+
-+    # naively strip some comments... will screw m/\#/, m##, q##, qw##, qr##, etc, but these don't really matter for us 
-+    s/(?<! \\ ) # \b .+ //x;
-+
-+    # skip the "= <<label", "print <<", "warn <<", "foo(<<label) blocks
-+    # note: watch out for the binary << operator and comments
-+    if ( m/ (?: = | \b[a-z][a-z_]+\(? ) \s* << \s* (?: q{0,2}(["']) (.+) \1 | ([a-zA-Z][a-zA-Z\d_]*) ) [\s;\)]* $/x ) {
-+        my $tag = defined $2 ? $2 : $3;
-+        $_ = <FILE> until m/^\Q$tag\E\s*$/ or eof;
-+        next;
-     }
-     # skip q{} quoted sections - just hope we don't have curly brackets
-@@ -157,21 +164,7 @@
-     if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
-       $tag = $1;
-       $tag =~ tr/{([/})]/;
--      $_ = <FILE> until m/\Q$tag\E/;
--    }
--
--    # skip the documentation
--
--    # we should not need to have item in this if statement (it
--    # properly belongs in the over/back section) but people do not
--    # read the perldoc.
--
--    if ( (m/^=(head[1-4]|pod|item)/) .. (m/^=(cut)/) ) {
--      next;
--    }
--
--    if ( (m/^=(over)/) .. (m/^=(back)/) ) {
--      next;
-+      $_ = <FILE> until m/\Q$tag\E/ or eof;
-     }
-     
-     # skip the data section
diff --git a/rpm-perl_req-skip_multiline.patch b/rpm-perl_req-skip_multiline.patch
deleted file mode 100644 (file)
index e94feb3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- rpm-5.1.4/scripts/perl.req~        2008-08-20 21:34:42.000000000 +0200
-+++ rpm-5.1.4/scripts/perl.req 2008-08-28 12:45:14.820174910 +0200
-@@ -156,10 +156,8 @@
-     # marker, such as occurs right here. Draw the line somewhere.
-     if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
-       $tag = $1;
--      $tag =~ tr/{\(\[\#|\//})]#|\//;
--      while (<FILE>) {
--        ( $_ =~ m/\}/ ) && last;
--      }
-+      $tag =~ tr/{([/})]/;
-+      $_ = <FILE> until m/\Q$tag\E/;
-     }
-     # skip the documentation
diff --git a/rpm-perl_req-use_base.patch b/rpm-perl_req-use_base.patch
deleted file mode 100644 (file)
index cdb0a7c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---- 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-pkgconfig.patch b/rpm-pkgconfig.patch
deleted file mode 100644 (file)
index add421a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 9cc82f5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644 (file)
index 1a3ee0e..0000000
+++ /dev/null
@@ -1,563 +0,0 @@
---- rpm-4.4.8/lib/rpmfc.h.orig 2005-11-18 23:08:14.231293000 +0100
-+++ rpm-4.4.8/lib/rpmfc.h      2005-11-18 23:55:16.694214392 +0100
-@@ -1,6 +1,7 @@
- #ifndef _H_RPMFC_
- #define _H_RPMFC_
-+#include <regex.h>
- #undef        FILE_RCSID
- #include "magic.h"
-@@ -44,6 +45,11 @@
-     StringBuf sb_python;/*!< concatenated list of python colored files. */
-     StringBuf sb_php;   /*!< concatenated list of php colored files. */
-+    int findprov, findreq;
-+    regex_t *noautoprov;
-+    int noautoprov_c;
-+    regex_t *noautoreq;
-+    int noautoreq_c;
- };
- /**
---- rpm-4.5/lib/rpmfc.c~       2008-06-10 14:06:23.000000000 +0300
-+++ rpm-4.5/lib/rpmfc.c        2008-06-10 14:21:53.097663262 +0300
-@@ -15,6 +15,8 @@
- #define       _RPMDS_INTERNAL
- #include <rpmds.h>
- #include <rpmfi.h>
-+#include <rpmts.h>
-+#include <rpmdb.h>
- #include "debug.h"
-@@ -309,14 +311,83 @@
-     return buf;
- };
-+static regex_t * rpmfcExpandRegexps(const char * str,int *count){
-+    int i,j,r;
-+    const char *s;
-+    ARGV_t patterns=NULL;
-+    regex_t *compiled=NULL;
-+
-+    s=rpmExpand(str,NULL);
-+    if (s) {
-+      poptParseArgvString(s,count,(const char ***)&patterns);
-+      s = _free(s);
-+    }
-+    if (patterns==NULL){
-+              *count=0;
-+      return NULL;
-+    }
-+    if (*count==0){
-+      _free(patterns);
-+      return NULL;
-+    }
-+
-+    compiled=malloc(sizeof(regex_t)*(*count));
-+    j=0;
-+    for(i=0;i<*count;i++){
-+      r=regcomp(&compiled[j],patterns[i],REG_NOSUB);
-+      if (r==0) j++;
-+      else {
-+              rpmMessage(RPMMESS_NORMAL, 
-+                      _("Compilation of regular expresion '%s'"
-+                      " (expanded from '%s') failed. Skipping it.\n"),
-+                      patterns[i],str);
-+      }
-+    }
-+    patterns=_free(patterns);
-+    if (j==0) {
-+      compiled=_free(compiled);
-+      *count=0;
-+      return NULL;
-+    }
-+    *count=j;
-+    return compiled;
-+}
-+
-+static int rpmfcMatchRegexps(regex_t *regexps, int count, const char *str, char deptype)
-+{
-+    int j;
-+    for(j = 0; j < count; j++) {
-+      rpmMessage(RPMMESS_DEBUG,
-+          _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, j);
-+      if (!regexec(&regexps[j], str, 0, NULL, 0)) {
-+          rpmMessage(RPMMESS_NORMAL,
-+              _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, j);
-+          return 1;
-+      }
-+    }
-+    return 0;
-+}
-+
-+static regex_t * rpmfcFreeRegexps(regex_t *regexps,int count){
-+    int i;
-+      
-+    if (regexps)
-+        for(i=0;i<count;i++)
-+          regfree(&regexps[i]);
-+    return _free(regexps);
-+}
-+
- /**
-  * Run per-interpreter dependency helper.
-  * @param fc          file classifier
-  * @param deptype     'P' == Provides:, 'R' == Requires:, helper
-  * @param nsdep               class name for interpreter (e.g. "perl")
-+ * @param noauto      _noauto* regexps
-+ * @param noauto_c    # of _noauto* regexps
-  * @return            0 on success
-  */
--static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
-+static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep,
-+    regex_t * noauto, int noauto_c)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
- {
-@@ -402,6 +473,8 @@
-           }
- /*@=branchstate@*/
-+          if(rpmfcMatchRegexps(noauto, noauto_c, N, deptype))
-+              continue;
-           /* Add tracking dependency for versioned Provides: */
-           if (!fc->tracked && deptype == 'P' && *EVR != '\0') {
-@@ -714,7 +787,7 @@
-       *se = '\0';
-       se++;
--      if (is_executable) {
-+      if (is_executable && fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, s, 'R')) {
-           /* Add to package requires. */
-           ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES);
-           xx = rpmdsMerge(&fc->requires, ds);
-@@ -808,20 +889,26 @@
-     default:
-       break;
-     case RPMTAG_PROVIDENAME:
-+      if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0], 'P')) {
-       /* Add to package provides. */
-       rc = rpmdsMerge(&fc->provides, ds);
-       /* Add to file dependencies. */
-       buf[0] = '\0';
-       rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
-+      } else
-+              rc = 0;
-       break;
-     case RPMTAG_REQUIRENAME:
-+      if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0], 'R')) {
-       /* Add to package requires. */
-       rc = rpmdsMerge(&fc->requires, ds);
-       /* Add to file dependencies. */
-       buf[0] = '\0';
-       rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
-+      } else
-+              rc = 0;
-       break;
-     }
-     return rc;
-@@ -862,6 +949,109 @@
-     { NULL, 0 }
- };
-+static int rpmfcFindRequiredPackages(rpmfc fc) 
-+{
-+    rpmts ts=NULL;
-+    const char * s;
-+    char * se;
-+    rpmds ds;
-+    const char * N;
-+    const char * EVR;
-+    int_32 Flags;
-+    unsigned char deptype;
-+    int nddict;
-+    int previx;
-+    int ix;
-+    int i;
-+    int j;
-+    int xx;
-+    int r;
-+    const char * hname;
-+    rpmdbMatchIterator it;
-+    Header hdr;
-+    regex_t *noautoreqdep;
-+    int noautoreqdep_c;
-+
-+    noautoreqdep=rpmfcExpandRegexps("%{__noautoreqdep}", &noautoreqdep_c);
-+    
-+    ts = rpmtsCreate(); /* XXX ts created in main() should be used */
-+    
-+    rpmMessage(RPMMESS_NORMAL, _("Searching for required packages....\n"));
-+
-+    nddict = argvCount(fc->ddict);
-+    previx = -1;
-+    for (i = 0; i < nddict; i++) {
-+        s = fc->ddict[i];
-+
-+        /* Parse out (file#,deptype,N,EVR,Flags) */
-+        ix = strtol(s, &se, 10);
-+        assert(se != NULL);
-+        deptype = *se++;
-+        se++;
-+        N = se;
-+        while (*se && *se != ' ')
-+            se++;
-+        *se++ = '\0';
-+        EVR = se;
-+        while (*se && *se != ' ')
-+            se++;
-+        *se++ = '\0';
-+        Flags = strtol(se, NULL, 16);
-+
-+        if (deptype!='R') continue;
-+
-+        rpmMessage(RPMMESS_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags);
-+        if (EVR && EVR[0]) {
-+            rpmMessage(RPMMESS_DEBUG, _("skipping #%i require\n"));
-+            continue;
-+        }
-+        for(j=0;j<noautoreqdep_c;j++) 
-+            if (!regexec(&noautoreqdep[j],N,0,NULL,0)) {
-+                rpmMessage(RPMMESS_NORMAL, 
-+                        _("skipping %s requirement processing"
-+                      " (matches noautoreqdep pattern #%i)\n"),N,j);
-+                break;
-+            }
-+        if (j<noautoreqdep_c) continue;
-+        if (N[0]=='/') {
-+            rpmMessage(RPMMESS_DEBUG, _("skipping #%i require (is file requirement)\n"));
-+            continue;
-+        }
-+        it=rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, N, 0);
-+        if (!it) {
-+            rpmMessage(RPMMESS_DEBUG, _("%s -> not found\n"),N);
-+            continue;
-+        }
-+        rpmMessage(RPMMESS_DEBUG, _("Iterator: %p\n"),it);
-+        if (rpmdbGetIteratorCount(it)>1) {
-+            rpmMessage(RPMMESS_DEBUG, _("%s -> multiple (skipping)\n"),N);
-+            rpmdbFreeIterator(it);
-+            continue;
-+        }
-+        hdr=rpmdbNextIterator(it);
-+        assert(hdr!=NULL);
-+        r=headerGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL);
-+        assert(r<2);
-+        if (!strcmp(hname,N)) {
-+            rpmMessage(RPMMESS_DEBUG, _("%s -> %s (skipping)\n"),N,hname);
-+            rpmdbFreeIterator(it);
-+            continue;
-+        }
-+            
-+        rpmMessage(RPMMESS_DEBUG, "%s -> %s\n",N,hname);
-+        
-+              ds = rpmdsSingle(RPMTAG_REQUIRENAME, hname, "", RPMSENSE_FIND_REQUIRES);
-+              xx = rpmdsMerge(&fc->requires, ds);
-+              ds = rpmdsFree(ds);
-+
-+        rpmdbFreeIterator(it);
-+    }
-+
-+    noautoreqdep = rpmfcFreeRegexps(noautoreqdep, noautoreqdep_c);
-+    ts = rpmtsFree(ts);
-+    return 0;
-+}
-+
- int rpmfcApply(rpmfc fc)
- {
-     rpmfcApplyTbl fcat;
-@@ -880,6 +1070,26 @@
-     int i;
-     int xx;
-     int skipping;
-+    int j;
-+    regex_t *noautoprovfiles = NULL;
-+    int noautoprovfiles_c;
-+    regex_t *noautoreqfiles = NULL;
-+    int noautoreqfiles_c;
-+    const char *buildroot;
-+    int buildroot_l;
-+
-+    fc->noautoprov = NULL;
-+    fc->noautoreq = NULL;
-+
-+    buildroot = rpmExpand("%{buildroot}",NULL);
-+    buildroot_l = strlen(buildroot);
-+    
-+    noautoprovfiles = rpmfcExpandRegexps("%{__noautoprovfiles}", &noautoprovfiles_c);
-+    noautoreqfiles = rpmfcExpandRegexps("%{__noautoreqfiles}", &noautoreqfiles_c);
-+    fc->noautoprov = rpmfcExpandRegexps("%{__noautoprov}", &fc->noautoprov_c);
-+    fc->noautoreq = rpmfcExpandRegexps("%{__noautoreq}", &fc->noautoreq_c);
-+    rpmMessage(RPMMESS_DEBUG, _("%i _noautoprov patterns.\n"), fc->noautoprov_c);
-+    rpmMessage(RPMMESS_DEBUG, _("%i _noautoreq patterns.\n"), fc->noautoreq_c);
-     /* Generate package and per-file dependencies. */
-     for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
-@@ -900,9 +1110,43 @@
-       for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) {
-           if (!(fc->fcolor->vals[fc->ix] & fcat->colormask))
-               /*@innercontinue@*/ continue;
-+          fc->findprov = 1;
-+          fc->findreq = 1;
-+          if (strncmp(fc->fn[fc->ix],buildroot,buildroot_l)==0) {/* sanity check */
-+                  for(j = 0; j < noautoprovfiles_c; j++) {
-+                          if (!regexec(&noautoprovfiles[j],
-+                                                  fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
-+                                  rpmMessage(RPMMESS_NORMAL,
-+                                                  _("skipping %s provides detection"
-+                                                          " (matches noautoprovfiles pattern #%i)\n"),
-+                                                  fc->fn[fc->ix], j);
-+                                  fc->findprov = 0;
-+                                  break;
-+                          }
-+                  }
-+                  for(j = 0; j < noautoreqfiles_c; j++) {
-+                          if (!regexec(&noautoreqfiles[j],
-+                                                  fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
-+                                  rpmMessage(RPMMESS_NORMAL,
-+                                                  _("skipping %s requires detection"
-+                                                          " (matches noautoreqfiles pattern #%i)\n"),
-+                                                  fc->fn[fc->ix], j);
-+                                  fc->findreq = 0;
-+                                  break;
-+                          }
-+                  }
-+          }
-+
-           xx = (*fcat->func) (fc);
-       }
-     }
-+    noautoprovfiles = rpmfcFreeRegexps(noautoprovfiles, noautoprovfiles_c);
-+    noautoreqfiles = rpmfcFreeRegexps(noautoreqfiles, noautoreqfiles_c);
-+    fc->noautoprov = rpmfcFreeRegexps(fc->noautoprov, fc->noautoprov_c);
-+    fc->noautoreq = rpmfcFreeRegexps(fc->noautoreq, fc->noautoreq_c);
-+#ifdef AUTODEP_PKGNAMES /* define to use package names in R */
-+    rpmfcFindRequiredPackages(fc);
-+#endif
- /*@-boundswrite@*/
-     /* Generate per-file indices into package dependencies. */
-#--- rpm-4.4.9/po/pl.po.orig   2007-05-22 08:11:40.947724921 +0200
-#+++ rpm-4.4.9/po/pl.po        2007-05-22 08:24:24.091213990 +0200
-#@@ -2937,6 +2937,86 @@
-# msgid "Failed to find %s:\n"
-# msgstr "Nie uda³o siê odnale¼æ %s:\n"
-# 
-#+#: lib/rpmfc.c:334
-#+#, c-format
-#+msgid "Compilation of regular expresion '%s' (expanded from '%s') failed. Skipping it.\n"
-#+msgstr "Kompilacja wyra¿enia regularnego '%s' (powsta³ego z '%s') nie powiod³a siê; pominiêto.\n"
-#+
-#+#: lib/rpmfc.c:395
-#+#, c-format
-#+msgid "%i _noautoprov patterns.\n"
-#+msgstr "%i wzorców _noautoprov.\n"
-#+
-#+#: lib/rpmfc.c:405
-#+#, c-format
-#+msgid "%i _noautoreq patterns.\n"
-#+msgstr "%i wzorców _noautoreq.\n"
-#+
-#+#: lib/rpmfc.c:459
-#+#, c-format
-#+msgid "Checking %c: '%s' against _noauto expr. #%i\n"
-#+msgstr "Sprawdzanie %c: '%s' z wyra¿eniem _noauto #%i\n"
-#+
-#+#: lib/rpmfc.c:462
-#+#, c-format
-#+msgid "Skipping %c: '%s' as it matches _noauto expr. #%i\n"
-#+msgstr "Pominiêto %c: '%s' pasuj±ce do wyra¿enia _noauto #%i\n"
-#+
-#+#. XXX ts created in main() should be used
-#+#: lib/rpmfc.c:1173
-#+msgid "Searching for required packages....\n"
-#+msgstr "Poszukiwanie wymaganych pakietów...\n"
-#+
-#+#: lib/rpmfc.c:1197
-#+#, c-format
-#+msgid "#%i requires: %s,%s,%i\n"
-#+msgstr "#%i wymaga: %s,%s,%i\n"
-#+
-#+#: lib/rpmfc.c:1199
-#+#, c-format
-#+msgid "skipping #%i require\n"
-#+msgstr "pominiêto zale¿no¶æ #%i\n"
-#+
-#+#: lib/rpmfc.c:1205
-#+#, c-format
-#+msgid "skipping %s requirement processing (matches noautoreqdep pattern #%i)\n"
-#+msgstr "pominiêto przetwarzanie zale¿no¶ci %s (pasuje do wzorca noautoreqdep #%i)\n"
-#+
-#+#: lib/rpmfc.c:1211
-#+#, c-format
-#+msgid "skipping #%i require (is file requirement)\n"
-#+msgstr "pominiêto zale¿no¶æ #%i (zale¿no¶æ od pliku)\n"
-#+
-#+#: lib/rpmfc.c:1216
-#+#, c-format
-#+msgid "%s -> not found\n"
-#+msgstr "%s -> nie znaleziono\n"
-#+
-#+#: lib/rpmfc.c:1219
-#+#, c-format
-#+msgid "Iterator: %p\n"
-#+msgstr "Iterator: %p\n"
-#+
-#+#: lib/rpmfc.c:1221
-#+#, c-format
-#+msgid "%s -> multiple (skipping)\n"
-#+msgstr "%s -> wiele (pominiêto)\n"
-#+
-#+#: lib/rpmfc.c:1230
-#+#, c-format
-#+msgid "%s -> %s (skipping)\n"
-#+msgstr "%s -> %s (pominiêto)\n"
-#+
-#+#: lib/rpmfc.c:1295
-#+#, c-format
-#+msgid "skipping %s provides detection (matches noautoprovfiles pattern #%i)\n"
-#+msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoprovfiles #%i)\n"
-#+
-#+#: lib/rpmfc.c:1306
-#+#, c-format
-#+msgid "skipping %s requires detection (matches noautoreqfiles pattern #%i)\n"
-#+msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoreqfiles #%i)\n"
-#+
-# #: lib/rpmfi.c:622
-# #, c-format
---- rpm/configure.ac.orig      2004-08-22 13:02:30.000000000 +0200
-+++ rpm/configure.ac   2004-08-22 13:25:37.000000000 +0200
-@@ -971,6 +971,18 @@
- AC_SUBST(__CHGRP_RHF)
- dnl
-+dnl enable generating autorequires containing packages names 
-+dnl
-+AC_ARG_ENABLE([adding-packages-names-in-autogenerated-dependancies],
-+            [  --enable-adding-packages-names-in-autogenerated-dependancies   Add packages names for autogenerated dependancies to requires],
-+       
-+              AC_MSG_RESULT([Using packages names in autogerated requires is enabled])
-+              AC_DEFINE(AUTODEP_PKGNAMES, 1, "Generating autorequires containing packages names.") 
-+      
-+            )
-+
-+
-+dnl
- dnl figure out what root's primary group is
- dnl
- AC_MSG_CHECKING(root's primary group)
---- rpm-4.5/lib/rpmfc.c~       2008-06-11 01:02:40.000000000 +0300
-+++ rpm-4.5/lib/rpmfc.c        2008-06-11 01:04:54.048916180 +0300
-@@ -382,12 +382,9 @@
-  * @param fc          file classifier
-  * @param deptype     'P' == Provides:, 'R' == Requires:, helper
-  * @param nsdep               class name for interpreter (e.g. "perl")
-- * @param noauto      _noauto* regexps
-- * @param noauto_c    # of _noauto* regexps
-  * @return            0 on success
-  */
--static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep,
--    regex_t * noauto, int noauto_c)
-+static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
- {
-@@ -405,6 +402,8 @@
-     int pac;
-     int xx;
-     int i;
-+    regex_t * noauto = fc->noauto;
-+    int noauto_c = fc->noauto_c;
-     switch (deptype) {
-     default:
---- rpm-4.5/lib/rpmfc.c~       2008-06-11 01:04:54.000000000 +0300
-+++ rpm-4.5/lib/rpmfc.c        2008-06-11 01:10:06.222936657 +0300
-@@ -410,7 +410,7 @@
-       return -1;
-       /*@notreached@*/ break;
-     case 'P':
--      if (fc->skipProv)
-+      if (fc->skipProv || !fc->findprov)
-           return 0;
-       xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep);
-       depsp = &fc->provides;
-@@ -418,7 +418,7 @@
-       tagN = RPMTAG_PROVIDENAME;
-       break;
-     case 'R':
--      if (fc->skipReq)
-+      if (fc->skipReq || !fc->findreq)
-           return 0;
-       xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep);
-       depsp = &fc->requires;
---- rpm-4.5/lib/rpmfc.c~       2008-06-11 01:11:33.000000000 +0300
-+++ rpm-4.5/lib/rpmfc.c        2008-06-11 01:16:17.084344647 +0300
-@@ -402,8 +402,8 @@
-     int pac;
-     int xx;
-     int i;
--    regex_t * noauto = fc->noauto;
--    int noauto_c = fc->noauto_c;
-+    regex_t * noauto = NULL;
-+    int noauto_c = 0;
-     switch (deptype) {
-     default:
-@@ -412,6 +412,8 @@
-     case 'P':
-       if (fc->skipProv || !fc->findprov)
-           return 0;
-+      noauto = fc->noautoprov;
-+      noauto_c = fc->noautoprov_c;
-       xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep);
-       depsp = &fc->provides;
-       dsContext = RPMSENSE_FIND_PROVIDES;
-@@ -420,6 +422,8 @@
-     case 'R':
-       if (fc->skipReq || !fc->findreq)
-           return 0;
-+      noauto = fc->noautoreq;
-+      noauto_c = fc->noautoreq_c;
-       xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep);
-       depsp = &fc->requires;
-       dsContext = RPMSENSE_FIND_REQUIRES;
-#--- rpm-4.5/lib/rpmfc.c~      2008-06-11 00:28:21.000000000 +0300
-#+++ rpm-4.5/lib/rpmfc.c       2008-06-11 00:37:51.675282123 +0300
-#@@ -829,7 +829,6 @@
-#      }
-#     } else
-#     if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) {
-#-     xx = rpmfcHelper(fc, 'P', "python");
-#      if (fc->findprov)
-#          xx = rpmfcHelper(fc, 'P', "python", fc->noautoprov, fc->noautoprov_c);
-# #ifdef       NOTYET
-#--- rpm-4.5/lib/rpmfc.c~      2008-06-11 00:37:51.000000000 +0300
-#+++ rpm-4.5/lib/rpmfc.c       2008-06-11 00:39:12.427942547 +0300
-#@@ -876,7 +876,8 @@
-#          xx = rpmfcHelper(fc, 'R', "java", fc->noautoreq, fc->noautoreq_c);
-#     } else
-#     if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) {
-#-     xx = rpmfcHelper(fc, 'P', "mimetype");
-#+     if (fc->findprov)
-#+         xx = rpmfcHelper(fc, 'P', "mimetype", fc->noautoprov, fc->noautoprov_c);
-#     }
-# 
-#     return 0;
---- rpm-4.4.8/lib/rpmfc.c.orig 2007-02-14 07:31:50.000000000 +0100
-+++ rpm-4.4.8/lib/rpmfc.c      2007-04-08 16:48:00.273560592 +0200
-@@ -773,7 +773,7 @@
-     } else
-     if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) {
-       xx = rpmfcHelper(fc, 'P', "php");
--      if (is_executable)
-+      /* not only executable, files run by httpd usually are not */
-           xx = rpmfcHelper(fc, 'R', "php");
-     }
-
diff --git a/rpm-po.patch b/rpm-po.patch
deleted file mode 100644 (file)
index 38be040..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
index 6ddd2dacf23933907bc5096bc0953ea874600ea1..a6c54518cdfb54de999e221d9f269c7ac7ed83a5 100644 (file)
@@ -1,8 +1,24 @@
 --- 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
 --- 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 !#:+'
+@@ -240,5 +249,35 @@
+       --POPTdesc=$"trace macro expansion"
+ rpmspec alias --nodebuginfo   --define 'debug_package %{nil}' \
+       --POPTdesc=$"do not generate debuginfo for this package"
++# (PLD-specific) Make RPM build tree
++rpmbuild exec --install-build-tree install-build-tree \
++      --POPTdesc=$"make all needed dirs for building binary rpms"
++
++# (PLD-specific) Compiling with debuginfo may be enabled by --debug
++rpmbuild alias --debug --define 'debug 1' \
++      --POPTdesc=$"build packages with debug information"
++
++# (PLD-specific) Conditional building
++rpmbuild exec  --bcond find-spec-bcond \
++      --POPTdesc=$"find all --with/--without values"
++
++rpm   alias --initdb  -qa --quiet \
++      --POPTdesc=$"Compatibility option with old rpm. Database is created lazily now."
++
 +rpm   alias --downgrade       --oldpackage \
 +      --POPTdesc=$"Allow an upgrade to replace a newer package with an older one."
 +
 +rpm   alias --downgrade       --oldpackage \
 +      --POPTdesc=$"Allow an upgrade to replace a newer package with an older one."
 +
diff --git a/rpm-popt-coreutils.patch b/rpm-popt-coreutils.patch
deleted file mode 100644 (file)
index 250ae97..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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
deleted file mode 100644 (file)
index c08fba2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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) {
index 12a64064a2e2c2a0e87226f8e8ca4ce4f2cf357d..2ab88172ec2ccd41836998af6776b4aaa05399bd 100644 (file)
@@ -1,13 +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
 --- 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;
+@@ -789,8 +789,8 @@
+       }
  
  
-           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_NOPOSTUN)) {
+-          rc = runInstScript(psm, RPMTAG_POSTUN);
+-          if (rc) break;
++          if (runInstScript(psm, RPMTAG_POSTUN))
++              rpmlog(RPMLOG_INFO, _("Ignoring failed %%postun scriptlet\n"));
+       }
  
  
-           if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) {
+       if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) {
diff --git a/rpm-provides-dont-obsolete.patch b/rpm-provides-dont-obsolete.patch
deleted file mode 100644 (file)
index 1f09506..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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 TLD 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-pythondeps.patch b/rpm-pythondeps.patch
deleted file mode 100644 (file)
index 0b4a02a..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-diff -urN rpm-4.5.orig/macros.in rpm-4.5/macros.in
---- rpm-4.5.orig/macros.in     2019-06-01 18:55:39.553000000 +0200
-+++ rpm-4.5/macros.in  2019-11-01 12:11:16.312000000 +0100
-@@ -1404,25 +1404,46 @@
- #
- # Path to scripts to autogenerate python package dependencies,
- #
--# Note: Used iff _use_internal_dependency_generator is non-zero. The
-+# Note: Used if _use_internal_dependency_generator is non-zero. The
- # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--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).
-+%__python_provides      %{_rpmhome}/pythoneggs.py --provides
-+%__python_requires      %{_rpmhome}/pythoneggs.py --requires
- #
--%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
--%python_sitelib       %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
--%python_version       %(%{__python} -c "import sys; print(sys.version[0:3])")
-+%python_sitearch %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(1); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
-+%python_sitelib %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
-+%python_version %(%{__python} -c "import sys; print(sys.version[0:3])")
-+
-+# python main version
-+%py_ver                 %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
-+%py_prefix              %(%{__python} -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
-+%py_platlibdir          %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
-+%py_purelibdir          %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=0)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
-+# backward compatibility
-+%py_libdir              %py_purelibdir
-+
-+%py_platsitedir         %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
-+%py_puresitedir         %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
-+%py_sitedir             %py_puresitedir
-+
-+%py_dyndir              %{py_platlibdir}/lib-dynload
-+
-+%py_incdir              %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND)
- %py_compile(O)  \
--find %1 -name '*.pyc' -name '*.pyo' -exec rm -f {} \\; \
--%{__python} %{?O:-O} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
-+find %1 -name '*.pyc' -exec rm -f {} \\; \
-+%{__python} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
-+%{-O: \
-+find %1 -name '*.pyo' -exec rm -f {} \\; \
-+%{__python} -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
-+}
-+
-+# pure python modules compilation
-+%py_comp        %{__python} -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])"
-+
-+%py_ocomp       %{__python} -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])"
- %py_requires(d) \
--%define maxver %(%{__python} -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \
--BuildRequires: python %{-d:python-devel} \
--PreReq: python >= %{python_version}, python < %{maxver}
-+BuildRequires: %{__python} %{-d:python-devel}
- #------------------------------------------------------------------------
- # php(...) configuration.
-diff -urN rpm-4.5.orig/scripts/Makefile.am rpm-4.5/scripts/Makefile.am
---- rpm-4.5.orig/scripts/Makefile.am   2019-06-01 18:55:39.553000000 +0200
-+++ rpm-4.5/scripts/Makefile.am        2019-11-01 12:03:59.288000000 +0100
-@@ -12,7 +12,8 @@
-       find-requires.perl freshen.sh gendiff getpo.sh http.req \
-       check-java-closure.sh java.prov.sh java.req.sh \
-       javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
--      perldeps.pl perl.prov perl.req pythondeps.sh mimetypedeps.sh \
-+      perldeps.pl perl.prov perl.req pythondeps.sh pythoneggs.py \
-+      mimetypedeps.sh \
-       php.prov php.req rpm2cpio \
-       rpmdb_loadcvt rpmdiff rpmdiff.cgi \
-       rpm.daily rpm.log rpm.xinetd \
-@@ -39,7 +40,8 @@
-       find-provides.perl \
-       find-requires.perl getpo.sh http.req \
-       javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
--      perldeps.pl perl.prov perl.req pythondeps.sh mimetypedeps.sh \
-+      perldeps.pl perl.prov perl.req pythondeps.sh pythoneggs.py \
-+      mimetypedeps.sh \
-       php.prov php.req \
-       rpmdb_loadcvt \
-       rpm.daily rpm.log rpm.xinetd \
-diff -urN rpm-4.5.orig/scripts/pythoneggs.py rpm-4.5/scripts/pythoneggs.py
---- rpm-4.5.orig/scripts/pythoneggs.py 1970-01-01 01:00:00.000000000 +0100
-+++ rpm-4.5/scripts/pythoneggs.py      2019-03-09 02:30:08.000000000 +0100
-@@ -0,0 +1,237 @@
-+#!/usr/bin/python2
-+# -*- coding: utf-8 -*-
-+#
-+# Copyright 2010 Per Øyvind Karlsen <peroyvind@mandriva.org>
-+#
-+# This program is free software. It may be redistributed and/or modified under
-+# the terms of the LGPL version 2.1 (or later).
-+#
-+# RPM5 python (egg) dependency generator.
-+#
-+
-+from getopt import getopt
-+from os.path import basename, dirname, isdir, sep, splitext
-+from sys import argv, stdin, version
-+from pkg_resources import Distribution, FileMetadata, PathMetadata
-+from distutils.sysconfig import get_python_lib
-+from subprocess import Popen, PIPE, STDOUT
-+import os
-+import platform
-+import re
-+
-+opts, args = getopt(argv[1:], 'hPRSCOEb:',
-+        ['help', 'provides', 'requires', 'suggests', 'conflicts', 'obsoletes', 'extras','buildroot='])
-+
-+Provides = False
-+Requires = False
-+Suggests = False
-+Conflicts = False
-+Obsoletes = False
-+Extras = False
-+buildroot = None
-+
-+def make_pldver(raw):
-+    if re.match(r'^[0-9\.]+$', raw) == None:
-+      pldver = re.sub(r'([\d\.]+)(.+)', r'\1-0.\2', raw)
-+    else:
-+      pldver = raw
-+    return pldver
-+
-+for o, a in opts:
-+    if o in ('-h', '--help'):
-+        print '-h, --help\tPrint help'
-+        print '-P, --provides\tPrint Provides'
-+        print '-R, --requires\tPrint Requires'
-+        print '-S, --suggests\tPrint Suggests'
-+        print '-C, --conflicts\tPrint Conflicts'
-+        print '-O, --obsoletes\tPrint Obsoletes (unused)'
-+        print '-E, --extras\tPrint Extras '
-+        print '-b, --buildroot\tBuildroot for package '
-+        exit(1)
-+    elif o in ('-P', '--provides'):
-+        Provides = True
-+    elif o in ('-R', '--requires'):
-+        Requires = True
-+    elif o in ('-S', '--suggests'):
-+        Suggests = True
-+    elif o in ('-C', '--conflicts'):
-+        Conflicts = True
-+    elif o in ('-O', '--obsoletes'):
-+        Obsoletes = True
-+    elif o in ('-E', '--extras'):
-+        Extras = True
-+    elif o in ('-b', '--buildroot'):
-+        buildroot = a
-+
-+def is_exe(fpath):
-+    return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
-+
-+typelib_check = False
-+
-+if is_exe("/usr/lib/rpm/gi-find-deps.sh") and is_exe("/usr/bin/g-ir-dep-tool"):
-+    if not buildroot:
-+        pass
-+    else:
-+        typelib_check = True
-+
-+if Requires:
-+    py_abi = True
-+else:
-+    py_abi = False
-+py_deps = {}
-+if args:
-+    files = args
-+else:
-+    files = stdin.readlines()
-+
-+for f in files:
-+    f = f.strip()
-+    lower = f.lower()
-+    name = 'python(abi)'
-+    # add dependency based on path, versioned if within versioned python directory
-+    if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')):
-+        if not name in py_deps:
-+            py_deps[name] = []
-+        purelib = get_python_lib(standard_lib=1, plat_specific=0).split(version[:3])[0]
-+        platlib = get_python_lib(standard_lib=1, plat_specific=1).split(version[:3])[0]
-+        for lib in (purelib, platlib):
-+            if lib in f:
-+                spec = ('==',f.split(lib)[1].split(sep)[0])
-+                if not spec in py_deps[name]:
-+                    py_deps[name].append(spec)
-+        # Pipe files to find typelib requires 
-+        if typelib_check:
-+            p = Popen(['/usr/lib/rpm/gi-find-deps.sh', '-R',str(buildroot)], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
-+            (stdoutdata, stderrdata) = p.communicate(input=str(f)+"\n")
-+            
-+            if stdoutdata and stdoutdata:
-+                py_deps[stdoutdata.strip()]= ""
-+
-+    # XXX: hack to workaround RPM internal dependency generator not passing directories
-+    dlower = dirname(lower)
-+    if dlower.endswith('.egg') or \
-+            dlower.endswith('.egg-info') or \
-+            dlower.endswith('.egg-link'):
-+        lower = dlower
-+        f = dirname(f)
-+    # Determine provide, requires, conflicts & suggests based on egg metadata
-+    if lower.endswith('.egg') or \
-+            lower.endswith('.egg-info') or \
-+            lower.endswith('.egg-link'):
-+        dist_name = basename(f)
-+        if isdir(f):
-+            path_item = dirname(f)
-+            metadata = PathMetadata(path_item, f)
-+        else:
-+            path_item = f
-+            metadata = FileMetadata(f)
-+        dist = Distribution.from_location(path_item, dist_name, metadata)
-+        if Provides:
-+            # If egg metadata says package name is python, we provide python(abi)
-+            if dist.key == 'python':
-+                name = 'python(abi)'
-+                if not name in py_deps:
-+                    py_deps[name] = []
-+                py_deps[name].append(('==', dist.py_version))
-+            if dist.py_version .split(".")[0] == '3':
-+                name = 'python3egg(%s)' % dist.key
-+            else:
-+                name = 'pythonegg(%s)' % dist.key
-+            if not name in py_deps:
-+                py_deps[name] = []
-+            if dist.version:
-+                spec = ('==', make_pldver(dist.version))
-+                if not spec in py_deps[name]:
-+                    py_deps[name].append(spec)
-+        if Requires or (Suggests and dist.extras):
-+            name = 'python(abi)'
-+            # If egg metadata says package name is python, we don't add dependency on python(abi)
-+            if dist.key == 'python':
-+                py_abi = False
-+                if name in py_deps:
-+                    py_deps.pop(name)
-+            elif py_abi and dist.py_version:
-+                if not name in py_deps:
-+                    py_deps[name] = []
-+                spec = ('==', dist.py_version)
-+                if not spec in py_deps[name]:
-+                    py_deps[name].append(spec)
-+            # fake python version for dist.requires(), so deps like
-+            # [:python_version < '3']
-+            # enum34
-+            # will be handled correctly
-+            old_python_version = platform.python_version
-+            def new_python_version():
-+                return dist.py_version
-+            platform.python_version = new_python_version
-+            deps = dist.requires()
-+            if Suggests:
-+                depsextras = dist.requires(extras=dist.extras)
-+                if not Requires:
-+                    for dep in reversed(depsextras):
-+                        if dep in deps:
-+                            depsextras.remove(dep)
-+                deps = depsextras
-+            platform.python_version = old_python_version
-+            # add requires/suggests based on egg metadata
-+            for dep in deps:
-+                if dist.py_version .split(".")[0] == '3':
-+                    name = 'python3egg(%s)' % dep.key
-+                else:
-+                    name = 'pythonegg(%s)' % dep.key
-+                for spec in dep.specs:
-+                    if spec[0] != '!=':
-+                        if not name in py_deps:
-+                            py_deps[name] = []
-+                        plddep = (spec[0], make_pldver(spec[1]))
-+                        if not plddep in py_deps[name]:
-+                            py_deps[name].append(plddep)
-+                if not dep.specs:
-+                    py_deps[name] = []
-+        # Unused, for automatic sub-package generation based on 'extras' from egg metadata
-+        # TODO: implement in rpm later, or...?
-+        if Extras:
-+            deps = dist.requires()
-+            extras = dist.extras
-+            print extras
-+            for extra in extras:
-+                print '%%package\textras-%s' % extra
-+                print 'Summary:\t%s extra for %s python egg' % (extra, dist.key)
-+                print 'Group:\t\tDevelopment/Python'
-+                depsextras = dist.requires(extras=[extra])
-+                for dep in reversed(depsextras):
-+                    if dep in deps:
-+                        depsextras.remove(dep)
-+                deps = depsextras
-+                for dep in deps:
-+                    for spec in dep.specs:
-+                        if spec[0] == '!=':
-+                            print 'Conflicts:\t%s %s %s' % (dep.key, '==', spec[1])
-+                        else:
-+                            print 'Requires:\t%s %s %s' % (dep.key, spec[0], spec[1])
-+                print '%%description\t%s' % extra
-+                print '%s extra for %s python egg' % (extra, dist.key)
-+                print '%%files\t\textras-%s\n' % extra
-+        if Conflicts:
-+            # Should we really add conflicts for extras?
-+            # Creating a meta package per extra with suggests on, which has
-+            # the requires/conflicts in stead might be a better solution...
-+            for dep in dist.requires(extras=dist.extras):
-+                name = dep.key
-+                for spec in dep.specs:
-+                    if spec[0] == '!=':
-+                        if not name in py_deps:
-+                            py_deps[name] = []
-+                        spec = ('==', spec[1])
-+                        if not spec in py_deps[name]:
-+                            py_deps[name].append(spec)
-+names = py_deps.keys()
-+names.sort()
-+for name in names:
-+    if py_deps[name]:
-+        # Print out versioned provides, requires, suggests, conflicts
-+        for spec in py_deps[name]:
-+            print '%s %s %s' % (name, spec[0], spec[1])
-+    else:
-+        # Print out unversioned provides, requires, suggests, conflicts
-+        print name
diff --git a/rpm-repackage-wo-lzma.patch b/rpm-repackage-wo-lzma.patch
deleted file mode 100644 (file)
index 5daf06b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- rpm-4.4.6/lib/psm.c.old    2006-09-25 17:55:05.000000000 +0200
-+++ rpm-4.4.6/lib/psm.c        2006-09-25 19:40:47.000000000 +0200
-@@ -6,6 +6,7 @@
- #include "system.h"
- #include <rpmio_internal.h>
-+#include <header_internal.h>
- #include <rpmlib.h>
- #include <rpmmacro.h>
- #include <rpmurl.h>
-@@ -1403,6 +1404,19 @@
-     return rpmpsmStage(psm, psm->nstage);
- }
-+static void replace_lzma_with_gzip(Header h)
-+{
-+    indexEntry entry;
-+    int i;
-+
-+    for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) {
-+      if (entry->info.tag == RPMTAG_PAYLOADCOMPRESSOR) {
-+          memcpy(entry->data, "gzip", 4);
-+          break;
-+      }
-+    }
-+}
-+
- /**
-  * @todo Packages w/o files never get a callback, hence don't get displayed
-  * on install with -v.
-@@ -2151,6 +2165,11 @@
-           payload_compressor = "gzip";
-       /*@=branchstate@*/
-       psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio"));
-+      if (psm->goal == PSM_PKGSAVE && !strcmp(payload_compressor, "lzma") && access("/usr/bin/lzma", X_OK)) {
-+          /* FIXME: digest is bad. */
-+          payload_compressor = "gzip";
-+          replace_lzma_with_gzip(psm->oh);
-+      }
-       *t = '\0';
-       t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
-       if (!strcmp(payload_compressor, "gzip"))
diff --git a/rpm-rpm2cpio-xz.patch b/rpm-rpm2cpio-xz.patch
deleted file mode 100644 (file)
index 5731907..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ur rpm-4.5.orig/scripts/rpm2cpio rpm-4.5/scripts/rpm2cpio
---- rpm-4.5.orig/scripts/rpm2cpio      2019-05-09 09:04:23.679000000 +0200
-+++ rpm-4.5/scripts/rpm2cpio   2019-05-09 09:22:11.921000000 +0200
-@@ -27,9 +27,11 @@
-       | dd bs=3 count=1 2> /dev/null)
- gz="$(echo -en '\037\0213')"
-+xz="$(echo -en '\0375\0067\0172')"
- 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 ;;
-+    "$xz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | unxz ;;
-     # 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 -dc - ;;
-     #*)        echo "Unrecognized rpm file: $pkg"; return 1 ;;
diff --git a/rpm-rpm5-debugedit.patch b/rpm-rpm5-debugedit.patch
deleted file mode 100644 (file)
index 0401ddf..0000000
+++ /dev/null
@@ -1,449 +0,0 @@
---- rpm-4.5/tools/debugedit.c  2008-04-06 23:32:15.000000000 +0300
-+++ trunk/tools/debugedit.c    2010-01-27 18:57:49.758813670 +0200
-@@ -1,4 +1,4 @@
--/* Copyright (C) 2001, 2002, 2003, 2005, 2007 Red Hat, Inc.
-+/* Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009 Red Hat, Inc.
-    Written by Alexander Larsson <alexl@redhat.com>, 2002
-    Based on code by Jakub Jelinek <jakub@redhat.com>, 2001.
-@@ -77,8 +77,9 @@
- int list_file_fd = -1;
- int do_build_id = 0;
--typedef unsigned int uint_32;
--typedef unsigned short uint_16;
-+typedef unsigned char rpmuint8_t;
-+typedef unsigned int rpmuint32_t;
-+typedef unsigned short rpmuint16_t;
- typedef struct
- {
-@@ -93,7 +90,7 @@
- typedef struct
- {
-   unsigned char *ptr;
--  uint_32 addend;
-+  rpmuint32_t addend;
- } REL;
- #define read_uleb128(ptr) ({          \
-@@ -112,31 +109,32 @@
-   ret;                                        \
- })
--static uint_16 (*do_read_16) (unsigned char *ptr);
--static uint_32 (*do_read_32) (unsigned char *ptr);
-+static rpmuint16_t (*do_read_16) (unsigned char *ptr);
-+static rpmuint32_t (*do_read_32) (unsigned char *ptr);
- static void (*write_32) (unsigned char *ptr, GElf_Addr val);
- static int ptr_size;
-+static int cu_version;
--static inline uint_16
-+static inline rpmuint16_t
- buf_read_ule16 (unsigned char *data)
- {
-   return data[0] | (data[1] << 8);
- }
--static inline uint_16
-+static inline rpmuint16_t
- buf_read_ube16 (unsigned char *data)
- {
-   return data[1] | (data[0] << 8);
- }
--static inline uint_32
-+static inline rpmuint32_t
- buf_read_ule32 (unsigned char *data)
- {
-   return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
- }
--static inline uint_32
-+static inline rpmuint32_t
- buf_read_ube32 (unsigned char *data)
- {
-   return data[3] | (data[2] << 8) | (data[1] << 16) | (data[0] << 24);
-@@ -156,7 +154,7 @@
-       {
-         if (data->d_buf
-             && offset >= data->d_off
--            && offset < data->d_off + data->d_size)
-+            && offset < data->d_off + (off_t)data->d_size)
-           return (const char *) data->d_buf + (offset - data->d_off);
-       }
-     }
-@@ -168,13 +166,13 @@
- #define read_1(ptr) *ptr++
- #define read_16(ptr) ({                                       \
--  uint_16 ret = do_read_16 (ptr);                     \
-+  rpmuint16_t ret = do_read_16 (ptr);                 \
-   ptr += 2;                                           \
-   ret;                                                        \
- })
- #define read_32(ptr) ({                                       \
--  uint_32 ret = do_read_32 (ptr);                     \
-+  rpmuint32_t ret = do_read_32 (ptr);                 \
-   ptr += 4;                                           \
-   ret;                                                        \
- })
-@@ -183,7 +181,7 @@
- int reltype;
- #define do_read_32_relocated(ptr) ({                  \
--  uint_32 dret = do_read_32 (ptr);                    \
-+  rpmuint32_t dret = do_read_32 (ptr);                        \
-   if (relptr)                                         \
-     {                                                 \
-       while (relptr < relend && relptr->ptr < ptr)    \
-@@ -200,7 +198,7 @@
- })
- #define read_32_relocated(ptr) ({                     \
--  uint_32 ret = do_read_32_relocated (ptr);           \
-+  rpmuint32_t ret = do_read_32_relocated (ptr);               \
-   ptr += 4;                                           \
-   ret;                                                        \
- })
-@@ -208,7 +206,7 @@
- static void
- dwarf2_write_le32 (unsigned char *p, GElf_Addr val)
- {
--  uint_32 v = (uint_32) val;
-+  rpmuint32_t v = (rpmuint32_t) val;
-   p[0] = v;
-   p[1] = v >> 8;
-@@ -220,7 +218,7 @@
- static void
- dwarf2_write_be32 (unsigned char *p, GElf_Addr val)
- {
--  uint_32 v = (uint_32) val;
-+  rpmuint32_t v = (rpmuint32_t) val;
-   p[3] = v;
-   p[2] = v >> 8;
-@@ -242,16 +240,18 @@
- #define DEBUG_LINE    2
- #define DEBUG_ARANGES 3
- #define DEBUG_PUBNAMES        4
--#define DEBUG_MACINFO 5
--#define DEBUG_LOC     6
--#define DEBUG_STR     7
--#define DEBUG_FRAME   8
--#define DEBUG_RANGES  9
-+#define DEBUG_PUBTYPES        5
-+#define DEBUG_MACINFO 6
-+#define DEBUG_LOC     7
-+#define DEBUG_STR     8
-+#define DEBUG_FRAME   9
-+#define DEBUG_RANGES  10
-     { ".debug_info", NULL, NULL, 0, 0, 0 },
-     { ".debug_abbrev", NULL, NULL, 0, 0, 0 },
-     { ".debug_line", NULL, NULL, 0, 0, 0 },
-     { ".debug_aranges", NULL, NULL, 0, 0, 0 },
-     { ".debug_pubnames", NULL, NULL, 0, 0, 0 },
-+    { ".debug_pubtypes", NULL, NULL, 0, 0, 0 },
-     { ".debug_macinfo", NULL, NULL, 0, 0, 0 },
-     { ".debug_loc", NULL, NULL, 0, 0, 0 },
-     { ".debug_str", NULL, NULL, 0, 0, 0 },
-@@ -331,7 +331,7 @@
-         }
-       if (*slot != NULL)
-       {
--        error (0, 0, "%s: Duplicate DWARF-2 abbreviation %d", dso->filename,
-+        error (0, 0, "%s: Duplicate DWARF abbreviation %d", dso->filename,
-                t->entry);
-         free (t);
-         htab_delete (h);
-@@ -351,7 +351,7 @@
-         form = read_uleb128 (ptr);
-         if (form == 2 || form > DW_FORM_indirect)
-           {
--            error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, form);
-+            error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form);
-             htab_delete (h);
-             return NULL;
-           }
-@@ -361,7 +361,7 @@
-         }
-       if (read_uleb128 (ptr) != 0)
-         {
--        error (0, 0, "%s: DWARF-2 abbreviation does not end with 2 zeros",
-+        error (0, 0, "%s: DWARF abbreviation does not end with 2 zeros",
-                dso->filename);
-         htab_delete (h);
-         return NULL;
-@@ -468,8 +468,8 @@
- has_prefix (const char  *str,
-           const char  *prefix)
- {
--  int str_len;
--  int prefix_len;
-+  size_t str_len;
-+  size_t prefix_len;
-   
-   str_len = strlen (str);
-   prefix_len = strlen (prefix);
-@@ -481,14 +481,14 @@
- }
- static int
--edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase)
-+edit_dwarf2_line (DSO *dso, rpmuint32_t off, char *comp_dir, int phase)
- {
-   unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir;
-   unsigned char **dirt;
-   unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size;
-   unsigned char *endcu, *endprol;
-   unsigned char opcode_base;
--  uint_32 value, dirt_cnt;
-+  rpmuint32_t value, dirt_cnt;
-   size_t comp_dir_len = strlen (comp_dir);
-   size_t abs_file_cnt = 0, abs_dir_cnt = 0;
-@@ -513,7 +513,7 @@
-     }
-   value = read_16 (ptr);
--  if (value != 2)
-+  if (value != 2 && value != 3)
-     {
-       error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
-            value);
-@@ -679,9 +679,12 @@
-         if (--shrank == 0)
-           error (EXIT_FAILURE, 0,
-                  "canonicalization unexpectedly shrank by one character");
--        memset (ptr, 'X', shrank);
--        ptr += shrank;
--        *ptr++ = '\0';
-+        else
-+          {       
-+            memset (ptr, 'X', shrank);
-+            ptr += shrank;
-+            *ptr++ = '\0';
-+          }
-       }
-       if (abs_dir_cnt + abs_file_cnt != 0)
-@@ -737,7 +740,7 @@
- edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
- {
-   int i;
--  uint_32 list_offs;
-+  rpmuint32_t list_offs;
-   int found_list_offs;
-   char *comp_dir;
-   
-@@ -746,9 +749,9 @@
-   found_list_offs = 0;
-   for (i = 0; i < t->nattr; ++i)
-     {
--      uint_32 form = t->attr[i].form;
--      uint_32 len = 0;
--      int base_len, dest_len;
-+      rpmuint32_t form = t->attr[i].form;
-+      size_t len = 0;
-+      size_t base_len, dest_len;
-       
-       while (1)
-@@ -791,7 +794,7 @@
-             {
-                 char *dir;
--                dir = (char *)debug_sections[DEBUG_STR].data
-+                dir = (char *) debug_sections[DEBUG_STR].data
-                     + do_read_32_relocated (ptr);
-                 free (comp_dir);
-@@ -821,7 +824,7 @@
-           {
-             char *name;
-             
--            name = (char *)debug_sections[DEBUG_STR].data
-+            name = (char *) debug_sections[DEBUG_STR].data
-                    + do_read_32_relocated (ptr);
-             if (*name == '/' && comp_dir == NULL)
-               {
-@@ -855,7 +858,12 @@
-         switch (form)
-           {
--          case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */
-+          case DW_FORM_ref_addr:
-+            if (cu_version == 2)
-+              ptr += ptr_size;
-+            else
-+              ptr += 4;
-+            break;
-           case DW_FORM_addr:
-             ptr += ptr_size;
-             break;
-@@ -907,7 +915,7 @@
-             assert (len < UINT_MAX);
-             break;
-           default:
--            error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename,
-+            error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename,
-                    form);
-             return NULL;
-           }
-@@ -918,6 +926,34 @@
-         break;
-       }
-     }
-+
-+  /* Ensure the CU current directory will exist even if only empty.  Source
-+     filenames possibly located in its parent directories refer relatively to
-+     it and the debugger (GDB) cannot safely optimize out the missing
-+     CU current dir subdirectories.  */
-+  if (comp_dir && list_file_fd != -1)
-+    {
-+      char *p;
-+      size_t size;
-+
-+      if (base_dir && has_prefix (comp_dir, base_dir))
-+      p = comp_dir + strlen (base_dir);
-+      else if (dest_dir && has_prefix (comp_dir, dest_dir))
-+      p = comp_dir + strlen (dest_dir);
-+      else
-+      p = comp_dir;
-+
-+      size = strlen (p) + 1;
-+      while (size > 0)
-+      {
-+        ssize_t ret = write (list_file_fd, p, size);
-+        if (ret == -1)
-+          break;
-+        size -= ret;
-+        p += ret;
-+      }
-+    }
-+
-   if (found_list_offs && comp_dir)
-     edit_dwarf2_line (dso, list_offs, comp_dir, phase);
-@@ -1034,7 +1070,7 @@
-   if (debug_sections[DEBUG_INFO].data != NULL)
-     {
-       unsigned char *ptr, *endcu, *endsec;
--      uint_32 value;
-+      rpmuint32_t value;
-       htab_t abbrev;
-       struct abbrev_tag tag, *t;
-       int phase;
-@@ -1176,11 +1212,11 @@
-                 return 1;
-               }
-             
--            value = read_16 (ptr);
--            if (value != 2)
-+            cu_version = read_16 (ptr);
-+            if (cu_version != 2 && cu_version != 3)
-               {
-                 error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
--                       value);
-+                       cu_version);
-                 return 1;
-               }
-             
-@@ -1190,7 +1226,7 @@
-                 if (debug_sections[DEBUG_ABBREV].data == NULL)
-                   error (0, 0, "%s: .debug_abbrev not present", dso->filename);
-                 else
--                  error (0, 0, "%s: DWARF-2 CU abbrev offset too large",
-+                  error (0, 0, "%s: DWARF CU abbrev offset too large",
-                          dso->filename);
-                 return 1;
-               }
-@@ -1200,14 +1236,14 @@
-                 ptr_size = read_1 (ptr);
-                 if (ptr_size != 4 && ptr_size != 8)
-                   {
--                    error (0, 0, "%s: Invalid DWARF-2 pointer size %d",
-+                    error (0, 0, "%s: Invalid DWARF pointer size %d",
-                            dso->filename, ptr_size);
-                     return 1;
-                   }
-               }
-             else if (read_1 (ptr) != ptr_size)
-               {
--                error (0, 0, "%s: DWARF-2 pointer size differs between CUs",
-+                error (0, 0, "%s: DWARF pointer size differs between CUs",
-                        dso->filename);
-                 return 1;
-               }
-@@ -1225,7 +1261,7 @@
-                 t = htab_find_with_hash (abbrev, &tag, tag.entry);
-                 if (t == NULL)
-                   {
--                    error (0, 0, "%s: Could not find DWARF-2 abbreviation %d",
-+                    error (0, 0, "%s: Could not find DWARF abbreviation %d",
-                            dso->filename, tag.entry);
-                     htab_delete (abbrev);
-                     return 1;
-@@ -1374,12 +1410,12 @@
-      or Elf64 object, only that we are consistent in what bits feed the
-      hash so it comes out the same for the same file contents.  */
-   {
--    inline void process (const void *data, size_t size)
-+    auto inline void process (const void *data, size_t size);
-+    auto inline void process (const void *data, size_t size)
-     {
-       memchunk chunk = { .data = (void *) data, .size = size };
-       hashFunctionContextUpdateMC (&ctx, &chunk);
-     }
--
-     union
-     {
-       GElf_Ehdr ehdr;
-@@ -1439,11 +1475,11 @@
-   /* Now format the build ID bits in hex to print out.  */
-   {
--    const unsigned char * id = (unsigned char *) build_id->d_buf + build_id_offset;
-+    const rpmuint8_t * id = (rpmuint8_t *)build_id->d_buf + build_id_offset;
-     char hex[build_id_size * 2 + 1];
-     int n = snprintf (hex, 3, "%02" PRIx8, id[0]);
-     assert (n == 2);
--    for (i = 1; i < build_id_size; ++i)
-+    for (i = 1; i < (int)build_id_size; ++i)
-       {
-       n = snprintf (&hex[i * 2], 3, "%02" PRIx8, id[i]);
-       assert (n == 2);
-@@ -1466,8 +1502,7 @@
-   Elf_Data *build_id = NULL;
-   size_t build_id_offset = 0, build_id_size = 0;
--  optCon = poptGetContext("debugedit", argc, (const char **)argv,
--                        optionsTable, 0);
-+  optCon = poptGetContext("debugedit", argc, (const char **)argv, optionsTable, 0);
-   
-   while ((nextopt = poptGetNextOpt (optCon)) > 0 || nextopt == POPT_ERROR_BADOPT)
-     /* do nothing */ ;
-@@ -1585,7 +1620,8 @@
-             Elf_Data src = dst;
-             src.d_buf = data->d_buf;
-             assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr));
--            while ((char *) data->d_buf + data->d_size - (char *) src.d_buf > (int) sizeof nh
-+            while ((char *) data->d_buf + data->d_size - 
-+                   (char *) src.d_buf > (int) sizeof nh
-                    && elf32_xlatetom (&dst, &src, dso->ehdr.e_ident[EI_DATA]))
-               {
-                 Elf32_Word len = sizeof nh + nh.n_namesz;
-@@ -1595,7 +1631,8 @@
-                     && !memcmp ((char *) src.d_buf + sizeof nh, "GNU", sizeof "GNU"))
-                   {
-                     build_id = data;
--                    build_id_offset = (char *) src.d_buf + len - (char *) data->d_buf;
-+                    build_id_offset = (char *) src.d_buf + len - 
-+                                      (char *) data->d_buf;
-                     build_id_size = nh.n_descsz;
-                     break;
-                   }
diff --git a/rpm-rpm5-patchset-10061.patch b/rpm-rpm5-patchset-10061.patch
deleted file mode 100644 (file)
index 04df009..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-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
deleted file mode 100644 (file)
index 687e185..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-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
deleted file mode 100644 (file)
index 0df6b33..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-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
deleted file mode 100644 (file)
index 09538ec..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644 (file)
index 7d73d5d..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
---- rpm-4.4.4/rpmpopt.in.orig  2005-10-30 02:15:44.000000000 +0200
-+++ rpm-4.4.4/rpmpopt.in       2005-11-18 22:43:57.809703712 +0100
-@@ -246,6 +246,15 @@
- rpmb  alias --without         --define "_without_!#:+    --without-!#:+" \
-       --POPTdesc=$"disable configure <option> for build" \
-       --POPTargs=$"<option>"
-+# (TLD-specific) Make RPM build tree
-+rpmb  exec --install-build-tree install-build-tree \
-+      --POPTdesc=$"make all needed dirs for building binary rpms"
-+# (TLD-specific) Compiling with debuginfo may be enabled by --debug
-+rpmb  alias --debug --define 'debug 1' \
-+      --POPTdesc=$"build packages with debug information"
-+# (TLD-specific) Conditional building
-+rpmb  exec  --bcond find-spec-bcond \
-+      --POPTdesc=$"find all --with/--without values"
- #==============================================================================
- rpmbuild      alias --dbpath          --define '_dbpath !#:+' \
-       --POPTdesc=$"use database in DIRECTORY" \
-@@ -248,5 +248,14 @@
- rpmbuild alias --buildroot    --define '.buildroot !#:+' \
-       --POPTdesc=$"override build root" \
-       --POPTargs=$"DIRECTORY"
-+# (TLD-specific) Make RPM build tree
-+rpmbuild exec --install-build-tree install-build-tree \
-+      --POPTdesc=$"make all needed dirs for building binary rpms"
-+# (TLD-specific) Compiling with debuginfo may be enabled by --debug
-+rpmbuild alias --debug --define 'debug 1' \
-+      --POPTdesc=$"build packages with debug information"
-+# (TLD-specific) Conditional building
-+rpmbuild exec  --bcond find-spec-bcond \
-+      --POPTdesc=$"find all --with/--without values"
- # \endverbatim
---- rpm-4.5/po/pl.po~  2008-04-13 03:15:20.000000000 +0300
-+++ rpm-4.5/po/pl.po   2008-04-13 03:16:26.314206092 +0300
-@@ -3964,6 +3964,18 @@
- msgid "check Requires: against Provides: for dependency closure"
- msgstr "sprawd¼ Requires: wzglêdem Provides: dla dope³nienia zale¿no¶ci"
-+#: rpmpopt:251
-+msgid "make all needed dirs for building binary rpms"
-+msgstr "utwórz wszystkie katalogi potrzebne do budowania binarnych RPM-ów"
-+
-+#: rpmpopt:254
-+msgid "build packages with debug information"
-+msgstr "buduj pakiety z informacjami do odpluskwiania"
-+
-+#: rpmpopt:257
-+msgid "find all --with/--without values"
-+msgstr "znajd¼ wszystkie warto¶ci --with/--without"
-+
- #~ msgid "    target platform: %s\n"
- #~ msgstr " platforma docelowa: %s\n"
diff --git a/rpm-rpmrc.patch b/rpm-rpmrc.patch
deleted file mode 100644 (file)
index 6a50134..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
---- rpm-4.4.8/rpmrc.in.orig    2007-02-03 21:02:07.000000000 +0100
-+++ rpm-4.4.8/rpmrc.in 2007-04-08 10:43:32.083363453 +0200
-@@ -13,69 +13,67 @@
- # Values for RPM_OPT_FLAGS for various platforms
- # "fat" binary with both archs, for Darwin
--optflags: fat -O2 -g -arch i386 -arch ppc
-+optflags: fat -O2 -arch i386 -arch ppc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_fat: %{specflags_fat}}}
--optflags: i386 -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
--optflags: i486 -O2 -g -m32 -march=i486 -fasynchronous-unwind-tables
--optflags: i586 -O2 -g -m32 -march=i586 -fasynchronous-unwind-tables
--optflags: i686 -O2 -g -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables
--optflags: pentium3 -O2 -g -m32 -march=pentium3 -fasynchronous-unwind-tables
--optflags: pentium4 -O2 -g -m32 -march=pentium4 -fasynchronous-unwind-tables
--optflags: athlon -O2 -g -m32 -march=athlon -fasynchronous-unwind-tables
--optflags: ia64 -O2 -g
--optflags: x86_64 -O2 -g -m64 -mtune=generic
--optflags: amd64 -O2 -g -m64 -mtune=generic
--optflags: ia32e -O2 -g -m64 -mtune=generic
--
--optflags: alpha -O2 -g -mieee
--optflags: alphaev5 -O2 -g -mieee -mcpu=ev5
--optflags: alphaev56 -O2 -g -mieee -mcpu=ev56
--optflags: alphapca56 -O2 -g -mieee -mcpu=pca56
--optflags: alphaev6 -O2 -g -mieee -mcpu=ev6
--optflags: alphaev67 -O2 -g -mieee -mcpu=ev67
--
--optflags: sparc -O2 -g -m32 -mcpu=v7 -mtune=ultrasparc
--optflags: sparcv8 -O2 -g -m32 -mcpu=v8 -mtune=ultrasparc
--optflags: sparcv9 -O2 -g -m32 -mcpu=ultrasparc
--optflags: sparc64 -O2 -g -m64 -mcpu=ultrasparc
--
--optflags: m68k -O2 -g -fomit-frame-pointer
--
--optflags: ppc -O2 -g -m32
--optflags: ppc8260 -O2 -g -m32
--optflags: ppc8560 -O2 -g -m32
--optflags: ppc32dy4 -O2 -g -m32
--optflags: ppciseries -O2 -g -m32
--optflags: ppcpseries -O2 -g -m32
--optflags: ppc64 -O2 -g -m64 -mminimal-toc
--optflags: ppciseries -O2 -g -m64 -mminimal-toc
--optflags: ppcpseries -O2 -g -m64 -mminimal-toc
--
--optflags: parisc -O2 -g -mpa-risc-1-0
--optflags: hppa1.0 -O2 -g -mpa-risc-1-0
--optflags: hppa1.1 -O2 -g -mpa-risc-1-0
--optflags: hppa1.2 -O2 -g -mpa-risc-1-0
--optflags: hppa2.0 -O2 -g -mpa-risc-1-0
--
--optflags: mips -O2 -g
--optflags: mipsel -O2 -g
--
--optflags: armv3l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv3
--optflags: armv4b -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
--optflags: armv4l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
--optflags: armv5teb -O2 -g -fsigned-char -fomit-frame-pointer -march=armv5te
--optflags: armv5tel -O2 -g -fsigned-char -fomit-frame-pointer -march=armv5te
--
--optflags: atarist -O2 -g -fomit-frame-pointer
--optflags: atariste -O2 -g -fomit-frame-pointer
--optflags: ataritt -O2 -g -fomit-frame-pointer
--optflags: falcon -O2 -g -fomit-frame-pointer
--optflags: atariclone -O2 -g -fomit-frame-pointer
--optflags: milan -O2 -g -fomit-frame-pointer
--optflags: hades -O2 -g -fomit-frame-pointer
-+optflags: i386 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=i386 -mtune=generic -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32:} %{?specflags_i386}}
-+optflags: i486 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=i486 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_i486}}
-+optflags: i586 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer -mtune=generic}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=i586 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_i586}}
-+optflags: i686 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32 -mtune=generic} -march=i686 -fasynchronous-unwind-tables -mtune=pentium4 %{!?nospecflags:%{?specflags_ia32} %{?specflags_i686}}
-+optflags: pentium3 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=pentium3 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_pentium3}}
-+optflags: pentium4 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=pentium4 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_pentium4}}
-+optflags: athlon %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=athlon -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_athlon}}
-+optflags: ia64 %{?__common_cflags:%{__common_cflags}}%{!?__common_cflags:-O2 -g}
-+optflags: x86_64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -m64 -mtune=generic} -march=x86-64 %{!?nospecflags:%{?specflags_x86_64}}
-+optflags: amd64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -m64 -mtune=generic} -march=x86-64 %{!?nospecflags:%{?specflags_x86_64}}
-+optflags: ia32e %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -m64 -mtune=generic} -march=x86-64 %{!?nospecflags:%{?specflags_ia32e}}
-+
-+optflags: alpha -O2 -fno-strict-aliasing -fwrapv -mieee%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}}
-+optflags: alphaev5 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev5%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev5: %{specflags_alphaev5}}}
-+optflags: alphaev56 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev56: %{specflags_alphaev56}}}
-+optflags: alphapca56 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=pca56%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphapca56: %{specflags_alphapca56}}}
-+optflags: alphaev6 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev6%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev6: %{specflags_alphaev6}}}
-+optflags: alphaev67 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev67%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev67: %{specflags_alphaev67}}}
-+
-+optflags: sparc -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=v7 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}}
-+optflags: sparcv8 -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=v8 -mtune=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv8: %{specflags_sparcv8}}}
-+optflags: sparcv9 -O2 -fno-strict-aliasing -fwrapv -m32 -mcpu=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparcv9: %{specflags_sparcv9}}}
-+optflags: sparc64 -O2 -fno-strict-aliasing -fwrapv -mcpu=ultrasparc%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_sparc: %{specflags_sparc}}%{?specflags_sparc64: %{specflags_sparc64}}}
-+
-+optflags: m68k -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_m68k: %{specflags_m68k}}}
-+
-+optflags: ppc -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
-+optflags: ppc8260 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8260: %{specflags_ppc8260}}}
-+optflags: ppc8560 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc8560: %{specflags_ppc8560}}}
-+optflags: ppc32dy4 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc32dy4: %{specflags_ppc32dy4}}}
-+optflags: ppciseries -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppciseries: %{specflags_ppciseries}}}
-+optflags: ppcpseries -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppcpseries: %{specflags_ppcpseries}}}
-+optflags: ppc64 -O2 -fno-strict-aliasing -fwrapv -fsigned-char%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc64: %{specflags_ppc64}}}
-+
-+optflags: parisc -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_parisc: %{specflags_parisc}}}
-+optflags: hppa1.0 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_0: %{specflags_hppa1_0}}}
-+optflags: hppa1.1 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_1: %{specflags_hppa1_1}}}
-+optflags: hppa1.2 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa1_2: %{specflags_hppa1_2}}}
-+optflags: hppa2.0 -O2 -fno-strict-aliasing -fwrapv -mpa-risc-1-0%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hppa2_0: %{specflags_hppa2_0}}}
-+
-+optflags: mips -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}}
-+optflags: mipsel -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_mips: %{specflags_mips}}%{?specflags_mipsel: %{specflags_mipsel}}}
-+
-+optflags: armv3l -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv3l: %{specflags_armv3l}}}
-+optflags: armv4b -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4b: %{specflags_armv4b}}}
-+optflags: armv4l -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv4l: %{specflags_armv4l}}}
-+optflags: armv5teb -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv5te%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv5teb: %{specflags_armv5teb}}}
-+optflags: armv5tel -O2 -fno-strict-aliasing -fwrapv -fsigned-char -fomit-frame-pointer -march=armv5te%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_armv5tel: %{specflags_armv5tel}}}
-+
-+optflags: atarist -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atarist: %{specflags_atarist}}}
-+optflags: atariste -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariste: %{specflags_atariste}}}
-+optflags: ataritt -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ataritt: %{specflags_ataritt}}}
-+optflags: falcon -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_falcon: %{specflags_falcon}}}
-+optflags: atariclone -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_atariclone: %{specflags_atariclone}}}
-+optflags: milan -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_milan: %{specflags_milan}}}
-+optflags: hades -O2 -fno-strict-aliasing -fwrapv -fomit-frame-pointer%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_hades: %{specflags_hades}}}
--optflags: s390 -O2 -g -m31
--optflags: s390x -O2 -g -m64
-+optflags: s390 -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}}
-+optflags: s390x -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_s390: %{specflags_s390}}%{?specflags_s390x: %{specflags_s390x}}}
- #############################################################
- # Canonical arch names and numbers
-@@ -418,7 +416,7 @@
- buildarch_compat: amd64: x86_64
- buildarch_compat: ia32e: x86_64
--macrofiles:   @USRLIBRPM@/macros:@USRLIBRPM@/%{_target}/macros:@SYSCONFIGDIR@/macros.*:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/etc/.rpmmacros:~/.rpmmacros
-+macrofiles:   @USRLIBRPM@/macros:@USRLIBRPM@/macros.build:@USRLIBRPM@/%{_target}/macros:@SYSCONFIGDIR@/macros.*:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/etc/.rpmmacros:~/.rpmmacros
- # \endverbatim
- #*/
diff --git a/rpm-rpmte-segv.patch b/rpm-rpmte-segv.patch
deleted file mode 100644 (file)
index fe2dd86..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: lib/depends.c
-===================================================================
-RCS file: /v/rpm/cvs/rpm/lib/depends.c,v
-retrieving revision 1.327.2.9
-retrieving revision 1.327.2.8
-diff -w -u -r1.327.2.9 -r1.327.2.8
---- lib/depends.c      6 Jun 2008 14:50:46 -0000       1.327.2.9
-+++ lib/depends.c      5 Jun 2008 13:44:41 -0000       1.327.2.8
-@@ -1813,7 +1813,7 @@
-           continue;
-       /*@=abstractcompare@*/
--      requires = rpmteDS((rpmteType(p) == TR_REMOVED ? q : p), tsi->tsi_tagn);
-+      requires = rpmteDS(p, tsi->tsi_tagn);
-       if (requires == NULL) continue;         /* XXX can't happen */
-       (void) rpmdsSetIx(requires, tsi->tsi_reqx);
diff --git a/rpm-rpmv3-support.patch b/rpm-rpmv3-support.patch
deleted file mode 100644 (file)
index b2b8ff0..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
---- ./lib/package.c    2006-07-26 14:45:41.000000000 +0200
-+++ rpm-4.4.9/lib/package.c    2008-10-26 17:56:29.000000000 +0200
-@@ -10,6 +10,7 @@
- #include <rpmlib.h>
- #include "rpmts.h"
-+#include "rpmevr.h"
- #include "misc.h"     /* XXX stripTrailingChar() */
- #include "rpmlead.h"
-@@ -94,6 +95,148 @@
-  */
- #define hdrchkRange(_dl, _off)                ((_off) < 0 || (_off) > (_dl))
-+/*@-boundsread@*/
-+static int dncmp(const void * a, const void * b)
-+       /*@*/
-+{
-+    const char *const * first = a;
-+    const char *const * second = b;
-+    return strcmp(*first, *second);
-+}
-+/*@=boundsread@*/
-+
-+/*@-bounds@*/
-+/**
-+ * Convert absolute path tag to (dirname,basename,dirindex) tags.
-+ * @param h             header
-+ */
-+static void compressFilelist(Header h)
-+      /*@modifies h @*/
-+{
-+    HGE_t hge = (HGE_t)headerGetEntryMinMemory;
-+    HAE_t hae = (HAE_t)headerAddEntry;
-+    HRE_t hre = (HRE_t)headerRemoveEntry;
-+    HFD_t hfd = headerFreeData;
-+    char ** fileNames;
-+    const char ** dirNames;
-+    const char ** baseNames;
-+    int_32 * dirIndexes;
-+    rpmTagType fnt;
-+    int count;
-+    int i, xx;
-+    int dirIndex = -1;
-+
-+    /*
-+     * This assumes the file list is already sorted, and begins with a
-+     * single '/'. That assumption isn't critical, but it makes things go
-+     * a bit faster.
-+     */
-+
-+    if (headerIsEntry(h, RPMTAG_DIRNAMES)) {
-+      xx = hre(h, RPMTAG_OLDFILENAMES);
-+      return;         /* Already converted. */
-+    }
-+
-+    if (!hge(h, RPMTAG_OLDFILENAMES, &fnt, (void **) &fileNames, &count))
-+      return;         /* no file list */
-+    if (fileNames == NULL || count <= 0)
-+      return;
-+
-+    dirNames = alloca(sizeof(*dirNames) * count);     /* worst case */
-+    baseNames = alloca(sizeof(*dirNames) * count);
-+    dirIndexes = alloca(sizeof(*dirIndexes) * count);
-+
-+    if (fileNames[0][0] != '/') {
-+      /* HACK. Source RPM, so just do things differently */
-+      dirIndex = 0;
-+      dirNames[dirIndex] = "";
-+      for (i = 0; i < count; i++) {
-+          dirIndexes[i] = dirIndex;
-+          baseNames[i] = fileNames[i];
-+      }
-+      goto exit;
-+    }
-+
-+    /*@-branchstate@*/
-+    for (i = 0; i < count; i++) {
-+      const char ** needle;
-+      char savechar;
-+      char * baseName;
-+      int len;
-+
-+      if (fileNames[i] == NULL)       /* XXX can't happen */
-+          continue;
-+      baseName = strrchr(fileNames[i], '/') + 1;
-+      len = baseName - fileNames[i];
-+      needle = dirNames;
-+      savechar = *baseName;
-+      *baseName = '\0';
-+/*@-compdef@*/
-+      if (dirIndex < 0 ||
-+          (needle = bsearch(&fileNames[i], dirNames, dirIndex + 1, sizeof(dirNames[0]), dncmp)) == NULL) {
-+          char *s = alloca(len + 1);
-+          memcpy(s, fileNames[i], len + 1);
-+          s[len] = '\0';
-+          dirIndexes[i] = ++dirIndex;
-+          dirNames[dirIndex] = s;
-+      } else
-+          dirIndexes[i] = needle - dirNames;
-+/*@=compdef@*/
-+
-+      *baseName = savechar;
-+      baseNames[i] = baseName;
-+    }
-+    /*@=branchstate@*/
-+
-+exit:
-+    if (count > 0) {
-+      xx = hae(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, dirIndexes, count);
-+      xx = hae(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
-+                      baseNames, count);
-+      xx = hae(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
-+                      dirNames, dirIndex + 1);
-+    }
-+
-+    fileNames = hfd(fileNames, fnt);
-+
-+    xx = hre(h, RPMTAG_OLDFILENAMES);
-+}
-+/*@=bounds@*/
-+
-+/* rpm v3 compatibility */
-+static void rpm3to4(Header h) {
-+    char * rpmversion;
-+    int_32 rpmversion_type;
-+
-+    (void) headerGetEntry(h, RPMTAG_RPMVERSION, NULL, (void **) &rpmversion, &rpmversion_type);
-+
-+    if ((!rpmversion) || rpmversion[0] < '4') {
-+        int *epoch;
-+        const char * name, *version, *release;
-+        const char *pEVR;
-+        char *p;
-+        int_32 pFlags = RPMSENSE_EQUAL;
-+
-+        if (headerNVR(h, &name, &version, &release) == 0) {
-+            pEVR = p = alloca(21 + strlen(version) + 1 + strlen(release) + 1);
-+            *p = '\0';
-+            if (headerGetEntry(h, RPMTAG_EPOCH, NULL, (void **) &epoch, NULL)) {
-+                sprintf(p, "%d:", *epoch);
-+                while (*p != '\0')
-+                p++;
-+            }
-+            (void) stpcpy( stpcpy( stpcpy(p, version) , "-") , release);
-+
-+            headerAddOrAppendEntry(h, RPMTAG_PROVIDENAME, RPM_STRING_ARRAY_TYPE, &name, 1);
-+            headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE, &pFlags, 1);
-+            headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE, &pEVR, 1);
-+        }
-+        compressFilelist(h);
-+    }
-+    headerFreeTag(h, (void *) rpmversion, rpmversion_type);
-+    return;
-+}
-+
- void headerMergeLegacySigs(Header h, const Header sigh)
- {
-     HFD_t hfd = (HFD_t) headerFreeData;
-@@ -1062,6 +1205,8 @@
-       /* Append (and remap) signature tags to the metadata. */
-       headerMergeLegacySigs(h, sigh);
-+    rpm3to4(h);
-+
-       /* Bump reference count for return. */
- /*@-boundswrite@*/
-       *hdrp = headerLink(h);
diff --git a/rpm-ruby-gem-build.patch b/rpm-ruby-gem-build.patch
deleted file mode 100644 (file)
index a0c2006..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-diff -urpa rpm-4.5.orig/build/parsePrep.c rpm-4.5/build/parsePrep.c
---- rpm-4.5.orig/build/parsePrep.c     2007-11-08 00:26:48.000000000 +0000
-+++ rpm-4.5/build/parsePrep.c  2018-02-23 11:51:54.161446282 +0000
-@@ -189,11 +189,13 @@ static const char *doUntar(Spec spec, in
- {
-     const char *fn, *Lurlfn;
-     static char buf[BUFSIZ];
--    char *taropts;
-+    char taropts[8];
-     char *t = NULL;
-     struct Source *sp;
-     rpmCompressedMagic compressed = COMPRESSED_NOT;
-     int urltype;
-+    const char *tar;
-+    int rubygem = 0;
-     for (sp = spec->sources; sp != NULL; sp = sp->next) {
-       if ((sp->flags & RPMFILE_SOURCE) && (sp->num == c)) {
-@@ -205,8 +207,18 @@ static const char *doUntar(Spec spec, in
-       return NULL;
-     }
-+    t = strrchr(sp->source, '.');
-+    if(t && !strcasecmp(t, ".gem"))
-+      rubygem = 1;
-+
-+    t = stpcpy(taropts, "-x");
-     /*@-internalglobs@*/ /* FIX: shrug */
--    taropts = ((rpmIsVerbose() && !quietly) ? "-xvvf" : "-xf");
-+    if(rpmIsVerbose() && !quietly)
-+      t = stpcpy(t, "vv");
-+    if(rubygem)
-+      t = stpcpy(t, "m");
-+
-+    t = stpcpy(t, "f");
-     /*@=internalglobs@*/
-     Lurlfn = rpmGenPath(NULL, "%{_sourcedir}/", sp->source);
-@@ -233,6 +245,12 @@ static const char *doUntar(Spec spec, in
-       /*@notreached@*/ break;
-     }
-+    tar = rpmGetPath("%{?__tar}", NULL);
-+    if (!(tar && *tar != '\0')) {
-+      tar = _free(tar);
-+      tar = xstrdup("tar");
-+    }
-+
-     if (compressed != COMPRESSED_NOT) {
-       const char *zipper;
-       int needtar = 1;
-@@ -267,8 +285,13 @@ static const char *doUntar(Spec spec, in
-       *t++ = '\'';
-       t = stpcpy(t, fn);
-       *t++ = '\'';
--      if (needtar)
--          t = stpcpy( stpcpy( stpcpy(t, " | tar "), taropts), " -");
-+      if (needtar) {
-+          t = stpcpy(t, " | ");
-+          t = stpcpy(t, tar);
-+          t = stpcpy(t, " ");
-+          t = stpcpy(t, taropts);
-+          t = stpcpy(t, " -");
-+      }
-       t = stpcpy(t,
-               "\n"
-               "STATUS=$?\n"
-@@ -277,11 +300,24 @@ static const char *doUntar(Spec spec, in
-               "fi");
-     } else {
-       buf[0] = '\0';
--      t = stpcpy( stpcpy(buf, "tar "), taropts);
-+      t = stpcpy(buf, tar);
-+      t = stpcpy(t, " ");
-+      t = stpcpy(t, taropts);
-       *t++ = ' ';
-       t = stpcpy(t, fn);
-+      if(rubygem) {
-+          t = stpcpy(t,
-+                  "\n"
-+                  "if [ -f data.tar.gz ]; then\n"
-+                  "  tar ");
-+            t = stpcpy(t, taropts);
-+          t = stpcpy(t,
-+                  " data.tar.gz\n"
-+                  "fi");
-+      }
-     }
-+    tar = _free(tar);
-     Lurlfn = _free(Lurlfn);
-     return buf;
- }
-@@ -390,6 +426,20 @@ static int doSetupMacro(Spec spec, char
-       appendLineStringBuf(spec->prep, buf);
-     }
-+    /* check if source is a ruby gem */
-+    {   struct Source *sp;
-+      for (sp = spec->sources; sp != NULL; sp = sp->next) {
-+          if ((sp->flags & RPMFILE_SOURCE) && (sp->num == 0)) {
-+              break;
-+          }
-+      }
-+      if (sp != NULL) {
-+          char *t = strrchr(sp->source, '.');
-+          if(t && !strcasecmp(t, ".gem"))
-+              createDir = 1;
-+      }
-+    }
-+
-     /* if necessary, create and cd into the proper dir */
-     if (createDir) {
-       sprintf(buf, MKDIR_P " '%s'\ncd '%s'",
diff --git a/rpm-rubyprov.patch b/rpm-rubyprov.patch
deleted file mode 100644 (file)
index 264e19a..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-diff -urpa rpm-4.5.orig/configure.ac rpm-4.5/configure.ac
---- rpm-4.5.orig/configure.ac  2011-10-03 01:50:17.000000000 +0000
-+++ rpm-4.5/configure.ac       2018-02-23 13:52:54.438364538 +0000
-@@ -291,6 +291,7 @@ AC_PATH_PROG(__PHP, php, %{_bindir}/php,
- AC_PATH_PROG(__PYTHON, python, %{_bindir}/python, $MYPATH)
- AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
- AC_PATH_PROG(__RSH, rsh, %{_bindir}/rsh, $MYPATH)
-+AC_PATH_PROG(__RUBY, ruby, %{_bindir}/ruby, $MYPATH)
- AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
- AC_PATH_PROG(__SH, sh, /bin/sh, $MYPATH)
- AC_PATH_PROG(__SSH, ssh, %{_bindir}/ssh, $MYPATH)
-diff -urpa rpm-4.5.orig/lib/rpmfc.c rpm-4.5/lib/rpmfc.c
---- rpm-4.5.orig/lib/rpmfc.c   2008-06-10 22:13:27.000000000 +0000
-+++ rpm-4.5/lib/rpmfc.c        2018-02-23 14:04:42.056356571 +0000
-@@ -478,6 +478,9 @@ static struct rpmfcTokens_s rpmfcTokens[
-   { "Java ",                  RPMFC_JAVA|RPMFC_INCLUDE },
-+  { "ruby script text",               RPMFC_RUBY|RPMFC_INCLUDE },
-+  { "Ruby script text",               RPMFC_RUBY|RPMFC_INCLUDE },
-+
-   /* .NET executables and libraries. file(1) cannot differ it from native win32 executables unfortunatelly */
-   { "PE executable",          RPMFC_MONO|RPMFC_INCLUDE },
-   { "executable PE",          RPMFC_MONO|RPMFC_INCLUDE },
-@@ -740,6 +743,8 @@ static int rpmfcSCRIPT(rpmfc fc)
-           fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
-       else if (!strncmp(bn, "php", sizeof("php")-1))
-           fc->fcolor->vals[fc->ix] |= RPMFC_PHP;
-+      else if (!strncmp(bn, "ruby", sizeof("ruby")-1))
-+          fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
-       break;
-     }
-@@ -788,6 +793,13 @@ static int rpmfcSCRIPT(rpmfc fc)
-       if (is_executable)
-           xx = rpmfcHelper(fc, 'R', "php");
-     } else
-+    if (fc->fcolor->vals[fc->ix] & RPMFC_RUBY) {
-+      xx = rpmfcHelper(fc, 'P', "ruby");
-+#ifdef  NOTYET
-+      if (is_executable)
-+#endif
-+          xx = rpmfcHelper(fc, 'R', "ruby");
-+    } else
-     if (fc->fcolor->vals[fc->ix] & RPMFC_JAVA) {
-       xx = rpmfcHelper(fc, 'P', "java");
-       xx = rpmfcHelper(fc, 'R', "java");
-@@ -898,7 +910,7 @@ typedef struct rpmfcApplyTbl_s {
- /*@unchecked@*/
- static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
-     { rpmfcELF,               RPMFC_ELF },
--    { rpmfcSCRIPT,    (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_DESKTOP_FILE) },
-+    { rpmfcSCRIPT,    (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_RUBY|RPMFC_DESKTOP_FILE) },
-     { rpmfcMONO,      RPMFC_MONO },
-     { NULL, 0 }
- };
-@@ -925,7 +937,7 @@ int rpmfcApply(rpmfc fc)
-     /* Generate package and per-file dependencies. */
-     for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
--      /* XXX Insure that /usr/lib{,64}/python files are marked RPMFC_PYTHON */
-+      /* XXX Insure that /usr/{share,lib{,64}}/python files are marked RPMFC_PYTHON */
-       /* XXX HACK: classification by path is intrinsically stupid. */
-       {   const char *fn = strstr(fc->fn[fc->ix], "/usr/lib");
-           if (fn) {
-@@ -934,6 +946,36 @@ int rpmfcApply(rpmfc fc)
-                   fn += 2;
-               if (!strncmp(fn, "/python", sizeof("/python")-1))
-                   fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
-+              else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
-+                  fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
-+                  if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
-+                      miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
-+                      if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
-+                          if (mireRegexec(mire, fc->fn[fc->ix]))
-+                              fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
-+                      mire = mireFree(mire);
-+                  }
-+              }
-+              /* XXX: lacking better, more generic classifier... */
-+              else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
-+                      fc->fcolor->vals[fc->ix] & RPMFC_LIBRARY)
-+                  fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
-+          }
-+          fn = strstr(fc->fn[fc->ix], "/usr/share");
-+          if (fn) {
-+              fn += sizeof("/usr/share")-1;
-+              if (!strncmp(fn, "/python", sizeof("/python")-1))
-+                  fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
-+              else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1) || !strncmp(fn, "/gems/specifications", sizeof("/gems/specifications")-1)) {
-+                  fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
-+                  if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
-+                      miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
-+                      if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
-+                          if (mireRegexec(mire, fc->fn[fc->ix]))
-+                              fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
-+                      mire = mireFree(mire);
-+                  }
-+              }
-           }
-       }
-diff -urpa rpm-4.5.orig/lib/rpmfc.h rpm-4.5/lib/rpmfc.h
---- rpm-4.5.orig/lib/rpmfc.h   2008-06-10 21:21:57.000000000 +0000
-+++ rpm-4.5/lib/rpmfc.h        2018-02-23 13:52:54.438364538 +0000
-@@ -31,8 +31,9 @@ enum FCOLOR_e {
- #define       RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
-       /* bits 4-7 unused */
--    RPMFC_DESKTOP_FILE                = (1 << 7),     /* XXX */
-+    RPMFC_DESKTOP_FILE                = (1 << 6),     /* XXX */
-+    RPMFC_RUBY                        = (1 << 7),
-     RPMFC_PKGCONFIG           = (1 <<  8),
-     RPMFC_LIBTOOL             = (1 <<  9),
-     RPMFC_BOURNE              = (1 << 10),
-diff -urpa rpm-4.5.orig/macros.in rpm-4.5/macros.in
---- rpm-4.5.orig/macros.in     2008-06-10 22:00:43.000000000 +0000
-+++ rpm-4.5/macros.in  2018-02-23 13:52:54.439364538 +0000
-@@ -78,6 +78,7 @@
- %__python             @__PYTHON@
- %__rm                 @__RM@
- %__rsh                        @__RSH@
-+%__ruby                       @__RUBY@
- %__sed                        @__SED@
- %__sh                 @__SH@
- %__ssh                        @__SSH@
-@@ -1421,6 +1422,44 @@ PreReq: python >= %{python_version}, pyt
- #%__java_requires     %{_rpmhome}/javadeps.sh --requires
- #------------------------------------------------------------------------
-+# ruby(...) configuration.
-+#
-+# Path to scripts to autogenerate ruby package dependencies,
-+
-+# Note: Used if _use_internal_dependency_generator is non-zero. The
-+# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
-+%__ruby_provides      %{_rpmhome}/rubygems.rb --provides
-+%__ruby_requires      %{_rpmhome}/rubygems.rb --requires
-+
-+%ruby_version         %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["ruby_version"]')
-+
-+%ruby_archdir         %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["archdir"]')
-+%ruby_libdir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"]')
-+%ruby_sitedir         %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitedir"]')
-+%ruby_sitearchdir     %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
-+%ruby_sitelibdir      %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')
-+%ruby_vendordir               %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendordir"]')
-+%ruby_vendorarchdir   %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')
-+%ruby_vendorlibdir    %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]')
-+%ruby_gemdir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], "gems/#{RbConfig::CONFIG["ruby_version"]}")')
-+%ruby_ridir           %(%{__ruby} -rrbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", RbConfig::CONFIG["ruby_version"])')
-+
-+%__gem_helper %{_usrlibrpm}/gem_helper.rb
-+
-+%gem_build(f:j:) \
-+      %__gem_helper build \\\
-+      %{-f:-f%{-f*}} \\\
-+      %{!-j:%{_smp_mflags}}%{-j:-j%{-j*}}
-+
-+%gem_install(i:n:C) \
-+      DESTDIR=${DESTDIR:-%{buildroot}} \\\
-+      %__gem_helper install \\\
-+      --env-shebang --rdoc --ri --force --ignore-dependencies \\\
-+      %{!-i:--install-dir %{buildroot}%{ruby_gemdir}}%{-i:--install-dir %{-i*}} \\\
-+      %{!-n:--bindir %{buildroot}%{_bindir}}%{-n:--bindir%{-n*}} \\\
-+      %{!-C:--fix-permissions}
-+
-+#------------------------------------------------------------------------
- # libtool(...) configuration.
- #
- # Path to scripts to autogenerate libtool package dependencies,
index 98a95cc9f054dfcb6f732eb022068153e867f24b..6be392ec7792856753674b5bbf1d6909a4e4d0dd 100644 (file)
@@ -1,19 +1,28 @@
---- rpm-4.1/lib/rpminstall.c.wiget     Mon Sep 16 21:06:08 2002
-+++ rpm-4.1/lib/rpminstall.c   Thu Sep 19 00:03:36 2002
-@@ -126,8 +126,15 @@
-               xx = Fclose(fd);
+--- rpm-4.16.0/lib/rpminstall.c.orig   2020-05-28 12:04:25.040136702 +0200
++++ rpm-4.16.0/lib/rpminstall.c        2020-10-03 09:46:49.369707250 +0200
+@@ -4,6 +4,8 @@
+ #include "system.h"
++#include <fcntl.h>
++
+ #include <rpm/rpmcli.h>
+ #include <rpm/rpmtag.h>
+ #include <rpm/rpmlib.h>               /* rpmReadPackageFile, vercmp etc */
+@@ -114,8 +116,15 @@
+               Fclose(fd);
                fd = NULL;
            }
 -      } else
 +      } else {
 +          long oldfl;
                fd = NULL;
            }
 -      } else
 +      } else {
 +          long oldfl;
-           fd = fdLink(fd, "persist (showProgress)");
+           fd = fdLink(fd);
 +          oldfl=Fcntl(fd, F_GETFD, 0);
 +          if(oldfl >= 0) {
 +              oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
 +              Fcntl(fd, F_SETFD, (void*)oldfl);
 +          }
 +      }
 +          oldfl=Fcntl(fd, F_GETFD, 0);
 +          if(oldfl >= 0) {
 +              oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
 +              Fcntl(fd, F_SETFD, (void*)oldfl);
 +          }
 +      }
-       /*@=type@*/
-       return fd;
-       /*@notreached@*/ break;
+       return (void *)fd;
+       break;
diff --git a/rpm-set-failed-on-reopen.patch b/rpm-set-failed-on-reopen.patch
deleted file mode 100644 (file)
index 40fd649..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- rpm-4.4.9/lib/transaction.c~       2009-03-03 20:03:31.000000000 +0200
-+++ rpm-4.4.9/lib/transaction.c        2009-03-03 20:15:17.337085230 +0200
-@@ -1775,6 +1775,9 @@
-                       /*@innerbreak@*/ break;
-                   }
-                   if (rpmteFd(p) != NULL) gotfd = 1;
-+              } else {
-+                  ourrc++;
-+                  xx = markLinkedFailed(ts, p);
-               }
-           }
-           /*@=type@*/
diff --git a/rpm-shescape-memfault.patch b/rpm-shescape-memfault.patch
deleted file mode 100644 (file)
index fb46592..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
---- rpm-4.5/rpmdb/header.c~    2009-05-13 18:25:56.000000000 +0300
-+++ rpm-4.5/rpmdb/header.c     2009-05-13 18:26:01.729564093 +0300
-@@ -2977,7 +2977,6 @@
- static char * shescapeFormat(HE_t he, /*@null@*/ const char ** av)
-       /*@*/
- {
--    rpmTagData data = { .ptr = he->p.ptr };
-     char * val;
-     size_t nb;
-@@ -2985,34 +2984,37 @@
-     if (he->t == RPM_INT32_TYPE) {
-       nb = 20;
-       val = xmalloc(nb);
--      snprintf(val, nb, "%d", data.i32p[0]);
-+      snprintf(val, nb, "%d", he->p.i32p[0]);
-       val[nb-1] = '\0';
-     } else if (he->t == RPM_INT64_TYPE) {
-       nb = 40;
-       val = xmalloc(40);
--      snprintf(val, nb, "%lld", data.i64p[0]);
-+      snprintf(val, nb, "%lld", he->p.i64p[0]);
-       val[nb-1] = '\0';
-     } else if (he->t == RPM_STRING_TYPE) {
--      const char * s = data.str;
-+      const char * s = he->p.str;
-       char * t;
-       int c;
--      nb = strlen(data.str) + 1;
--      /* XXX count no. of escapes instead. */
--      t = xmalloc(4 * nb + 3);
-+      nb = 0;
-+      for (s = he->p.str; (c = (int)*s) != 0; s++)  {
-+          nb++;
-+          if (c == (int)'\'')
-+              nb += 3;
-+      }
-+      nb += 3;
-+      t = val = xmalloc(nb);
-       *t++ = '\'';
--      while ((c = *s++) != 0) {
--          if (c == '\'') {
-+      for (s = he->p.str; (c = (int)*s) != 0; s++)  {
-+          if (c == (int)'\'') {
-               *t++ = '\'';
-               *t++ = '\\';
-               *t++ = '\'';
-           }
--          *t++ = c;
-+          *t++ = (char) c;
-       }
-       *t++ = '\'';
-       *t = '\0';
--      nb = strlen(t) + 1;
--      val = xrealloc(t, nb);
-     } else
-       val = xstrdup(_("invalid type"));
diff --git a/rpm-shrink.patch b/rpm-shrink.patch
deleted file mode 100644 (file)
index 4c02b61..0000000
+++ /dev/null
@@ -1,623 +0,0 @@
-diff -urNp rpm-4.5.orig/rpmio/macro.c rpm-4.5/rpmio/macro.c
---- rpm-4.5.orig/rpmio/macro.c 2017-10-19 22:48:49.000000000 +0000
-+++ rpm-4.5/rpmio/macro.c      2017-10-19 23:16:34.301644733 +0000
-@@ -71,6 +71,7 @@ const char * rpmMacrofiles = MACROFILES;
- #endif
- #include <rpmmacro.h>
-+#include <rpmstring.h>
- #include "debug.h"
-@@ -1200,6 +1201,28 @@ doFoo(MacroBuf mb, int negate, const cha
-       if ((b = strrchr(buf, '/')) != NULL)
-           *b = '\0';
-       b = buf;
-+    } else if (STREQ("shrink", f, fn)) {
-+      /*
-+       * shrink body by removing all leading and trailing whitespaces and
-+       * reducing intermediate whitespaces to a single space character.
-+       */
-+      size_t i = 0, j = 0;
-+      size_t buflen = strlen(buf);
-+      int was_space = 0;
-+      while (i < buflen) {
-+          if (risspace(buf[i])) {
-+              was_space = 1;
-+              i++;
-+              continue;
-+          } else if (was_space) {
-+              was_space = 0;
-+              if (j > 0) /* remove leading blanks at all */
-+                  buf[j++] = ' ';
-+          }
-+          buf[j++] = buf[i++];
-+      }
-+      buf[j] = '\0';
-+      b = buf;
-     } else if (STREQ("suffix", f, fn)) {
-       if ((b = strrchr(buf, '.')) != NULL)
-           b++;
-@@ -1549,6 +1572,7 @@ expandMacro(MacroBuf mb)
-       /* XXX necessary but clunky */
-       if (STREQ("basename", f, fn) ||
-           STREQ("dirname", f, fn) ||
-+          STREQ("shrink", f, fn) ||
-           STREQ("suffix", f, fn) ||
-           STREQ("expand", f, fn) ||
-           STREQ("verbose", f, fn) ||
-diff -urNp rpm-4.5.orig/rpmio/Makefile.am rpm-4.5/rpmio/Makefile.am
---- rpm-4.5.orig/rpmio/Makefile.am     2017-10-19 22:48:49.000000000 +0000
-+++ rpm-4.5/rpmio/Makefile.am  2017-10-19 23:16:15.212645871 +0000
-@@ -37,7 +37,7 @@ librpmio_la_SOURCES = \
-       md2.c md4.c rmd128.c rmd160.c rmd256.c rmd320.c sha224.c \
-       salsa10.c salsa20.c tiger.c \
-       rpmdav.c rpmhash.c rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \
--      rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c strtolocale.c \
-+      rpmpgp.c rpmrpc.c rpmsq.c rpmstring.c rpmsw.c strcasecmp.c strtolocale.c \
-       stubs.c url.c ugid.c rpmuuid.c
- librpmio_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS) \
-       @WITH_BEECRYPT_LIB@ \
-diff -urNp rpm-4.5.orig/rpmio/Makefile.in rpm-4.5/rpmio/Makefile.in
---- rpm-4.5.orig/rpmio/Makefile.in     2008-07-09 09:41:32.000000000 +0000
-+++ rpm-4.5/rpmio/Makefile.in  2017-10-19 23:16:15.212645871 +0000
-@@ -68,7 +68,7 @@ am_librpmio_la_OBJECTS = argv.lo digest.
-       macro.lo mire.lo md2.lo md4.lo rmd128.lo rmd160.lo rmd256.lo \
-       rmd320.lo sha224.lo salsa10.lo salsa20.lo tiger.lo rpmdav.lo \
-       rpmhash.lo rpmhook.lo rpmio.lo rpmlog.lo rpmlua.lo \
--      rpmmalloc.lo rpmpgp.lo rpmrpc.lo rpmsq.lo rpmsw.lo \
-+      rpmmalloc.lo rpmpgp.lo rpmrpc.lo rpmsq.lo rpmstring.lo rpmsw.lo \
-       strcasecmp.lo strtolocale.lo stubs.lo url.lo ugid.lo \
-       rpmuuid.lo
- librpmio_la_OBJECTS = $(am_librpmio_la_OBJECTS)
-diff -urNp rpm-4.5.orig/rpmio/rpmstring.c rpm-4.5/rpmio/rpmstring.c
---- rpm-4.5.orig/rpmio/rpmstring.c     1970-01-01 00:00:00.000000000 +0000
-+++ rpm-4.5/rpmio/rpmstring.c  2017-10-19 23:16:15.212645871 +0000
-@@ -0,0 +1,192 @@
-+/**
-+ * \file rpmio/rpmstring.c
-+ */
-+
-+#include "system.h"
-+
-+#include <stdarg.h>
-+#include <stdio.h>
-+
-+#include <rpmio/rpmstring.h>
-+#include "debug.h"
-+
-+
-+int rstrcasecmp(const char * s1, const char * s2)
-+{
-+  const char * p1 = s1;
-+  const char * p2 = s2;
-+  char c1, c2;
-+
-+  if (p1 == p2)
-+    return 0;
-+
-+  do
-+    {
-+      c1 = rtolower (*p1++);
-+      c2 = rtolower (*p2++);
-+      if (c1 == '\0')
-+        break;
-+    }
-+  while (c1 == c2);
-+
-+  return (int)(c1 - c2);
-+}
-+
-+int rstrncasecmp(const char *s1, const char *s2, size_t n)
-+{
-+  const char * p1 = s1;
-+  const char * p2 = s2;
-+  char c1, c2;
-+
-+  if (p1 == p2 || n == 0)
-+    return 0;
-+
-+  do
-+    {
-+      c1 = rtolower (*p1++);
-+      c2 = rtolower (*p2++);
-+      if (c1 == '\0' || c1 != c2)
-+      break;
-+    } while (--n > 0);
-+
-+  return (int)(c1 - c2);
-+}
-+
-+/* 
-+ * Simple and stupid asprintf() clone.
-+ * FIXME: write to work with non-C99 vsnprintf or check for one in configure.
-+ */
-+int rasprintf(char **strp, const char *fmt, ...)
-+{
-+    int n;
-+    va_list ap;
-+    char * p = NULL;
-+  
-+    if (strp == NULL) 
-+      return -1;
-+
-+    va_start(ap, fmt);
-+    n = vsnprintf(NULL, 0, fmt, ap);
-+    va_end(ap);
-+
-+    if (n >= -1) {
-+      size_t nb = n + 1;
-+      p = xmalloc(nb);
-+      va_start(ap, fmt);
-+        n = vsnprintf(p, nb, fmt, ap);
-+      va_end(ap);
-+    } 
-+    *strp = p;
-+    return n;
-+}
-+
-+/*
-+ * Concatenate two strings with dynamically (re)allocated
-+ * memory what prevents static buffer overflows by design.
-+ * *dest is reallocated to the size of strings to concatenate.
-+ *
-+ * Note:
-+ * 1) char *buf = rstrcat(NULL,"string"); is the same like rstrcat(&buf,"string");
-+ * 2) rstrcat(&buf,NULL) returns buf
-+ * 3) rstrcat(NULL,NULL) returns NULL
-+ * 4) *dest and src can overlap
-+ */
-+char *rstrcat(char **dest, const char *src)
-+{
-+    if ( src == NULL ) {
-+      return dest != NULL ? *dest : NULL;
-+    }
-+
-+    if ( dest == NULL ) {
-+      return xstrdup(src);
-+    }
-+
-+    {
-+      size_t dest_size = *dest != NULL ? strlen(*dest) : 0;
-+      size_t src_size = strlen(src);
-+
-+      *dest = xrealloc(*dest, dest_size+src_size+1);          /* include '\0' */
-+      memmove(&(*dest)[dest_size], src, src_size+1);
-+    }
-+
-+    return *dest;
-+}
-+
-+/*
-+ * Concatenate strings with dynamically (re)allocated
-+ * memory what prevents static buffer overflows by design.
-+ * *dest is reallocated to the size of strings to concatenate.
-+ * List of strings has to be NULL terminated.
-+ *
-+ * Note:
-+ * 1) char *buf = rstrscat(NULL,"string",NULL); is the same like rstrscat(&buf,"string",NULL);
-+ * 2) rstrscat(&buf,NULL) returns buf
-+ * 3) rstrscat(NULL,NULL) returns NULL
-+ * 4) *dest and argument strings can overlap
-+ */
-+char *rstrscat(char **dest, const char *arg, ...)
-+{
-+    va_list ap;
-+    size_t arg_size, dst_size;
-+    const char *s;
-+    char *dst, *p;
-+
-+    dst = dest ? *dest : NULL;
-+
-+    if ( arg == NULL ) {
-+        return dst;
-+    }
-+
-+    va_start(ap, arg);
-+    for (arg_size=0, s=arg; s; s = va_arg(ap, const char *))
-+        arg_size += strlen(s);
-+    va_end(ap);
-+
-+    dst_size = dst ? strlen(dst) : 0;
-+    dst = xrealloc(dst, dst_size+arg_size+1);    /* include '\0' */
-+    p = &dst[dst_size];
-+
-+    va_start(ap, arg);
-+    for (s = arg; s; s = va_arg(ap, const char *)) {
-+        size_t size = strlen(s);
-+        memmove(p, s, size);
-+        p += size;
-+    }
-+    va_end(ap);
-+    *p = '\0';
-+
-+    if ( dest ) {
-+        *dest = dst;
-+    }
-+
-+    return dst;
-+}
-+
-+/*
-+ * Adapted from OpenBSD, strlcpy() originally developed by
-+ * Todd C. Miller <Todd.Miller@courtesan.com>
-+ */
-+size_t rstrlcpy(char *dest, const char *src, size_t n)
-+{
-+    char *d = dest;
-+    const char *s = src;
-+    size_t len = n;
-+
-+    /* Copy as many bytes as will fit */
-+    if (len != 0) {
-+      while (--len != 0) {
-+          if ((*d++ = *s++) == '\0')
-+              break;
-+      }
-+    }
-+
-+    /* Not enough room in dst, add NUL and traverse rest of src */
-+    if (len == 0) {
-+      if (n != 0)
-+          *d = '\0'; /* NUL-terminate dst */
-+      while (*s++)
-+          ;
-+    }
-+
-+    return s - src - 1; /* count does not include NUL */
-+}
-diff -urNp rpm-4.5.orig/rpmio/rpmstring.h rpm-4.5/rpmio/rpmstring.h
---- rpm-4.5.orig/rpmio/rpmstring.h     1970-01-01 00:00:00.000000000 +0000
-+++ rpm-4.5/rpmio/rpmstring.h  2017-10-19 23:16:15.212645871 +0000
-@@ -0,0 +1,187 @@
-+#ifndef _RPMSTRING_H_
-+#define _RPMSTRING_H_
-+
-+/** \ingroup rpmstring
-+ * \file rpmio/rpmstring.h
-+ * String manipulation helper functions
-+ */
-+
-+#include <stddef.h>
-+#include <string.h>
-+
-+#include <rpmio/rpmutil.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive islower(3) 
-+ */
-+RPM_GNUC_CONST
-+static inline int rislower(int c)  {
-+    return (c >= 'a' && c <= 'z');
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive isupper(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int risupper(int c)  {
-+    return (c >= 'A' && c <= 'Z');
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive isalpha(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int risalpha(int c)  {
-+    return (rislower(c) || risupper(c));
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive isdigit(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int risdigit(int c)  {
-+    return (c >= '0' && c <= '9');
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive isalnum(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int risalnum(int c)  {
-+    return (risalpha(c) || risdigit(c));
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive isblank(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int risblank(int c)  {
-+    return (c == ' ' || c == '\t');
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive isspace(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int risspace(int c)  {
-+    return (risblank(c) || c == '\n' || c == '\r' || c == '\f' || c == '\v');
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive tolower(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int rtolower(int c)  {
-+    return ((risupper(c)) ? (c | ('a' - 'A')) : c);
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive toupper(3)
-+ */
-+RPM_GNUC_CONST
-+static inline int rtoupper(int c)  {
-+    return ((rislower(c)) ? (c & ~('a' - 'A')) : c);
-+}
-+
-+/**
-+ * Convert hex to binary nibble.
-+ * @param c            hex character
-+ * @return             binary nibble
-+ */
-+RPM_GNUC_CONST
-+static inline unsigned char rnibble(char c)
-+{
-+    if (c >= '0' && c <= '9')
-+      return (c - '0');
-+    if (c >= 'a' && c <= 'f')
-+      return (c - 'a') + 10;
-+    if (c >= 'A' && c <= 'F')
-+      return (c - 'A') + 10;
-+    return 0;
-+}
-+
-+/**
-+ * Test for string equality
-+ * @param s1          string 1
-+ * @param s2          string 2
-+ * @return            0 if strings differ, 1 if equal
-+ */
-+static inline int rstreq(const char *s1, const char *s2)
-+{
-+    return (strcmp(s1, s2) == 0);
-+}
-+
-+/**
-+ * Test for string equality
-+ * @param s1          string 1
-+ * @param s2          string 2
-+ * @param n           compare at most n characters
-+ * @return            0 if strings differ, 1 if equal
-+ */
-+static inline int rstreqn(const char *s1, const char *s2, size_t n)
-+{
-+    return (strncmp(s1, s2, n) == 0);
-+}
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive strcasecmp(3).
-+ */
-+RPM_GNUC_PURE
-+int rstrcasecmp(const char * s1, const char * s2)             ;
-+
-+/** \ingroup rpmstring
-+ * Locale insensitive strncasecmp(3).
-+ */
-+RPM_GNUC_PURE
-+int rstrncasecmp(const char *s1, const char * s2, size_t n)   ;
-+
-+/** \ingroup rpmstring
-+ * asprintf() clone
-+ */
-+int rasprintf(char **strp, const char *fmt, ...) RPM_GNUC_PRINTF(2, 3);
-+
-+/** \ingroup rpmstring
-+ * Concatenate two strings with dynamically (re)allocated memory.
-+ * @param dest                pointer to destination string
-+ * @param src         source string
-+ * @return            realloc'd dest with src appended
-+ */
-+char *rstrcat(char **dest, const char *src);
-+
-+/** \ingroup rpmstring
-+ * Concatenate multiple strings with dynamically (re)allocated memory.
-+ * @param dest                pointer to destination string
-+ * @param arg         NULL terminated list of strings to concatenate
-+ * @return            realloc'd dest with strings appended
-+ */
-+char *rstrscat(char **dest, const char *arg, ...) RPM_GNUC_NULL_TERMINATED;
-+
-+/** \ingroup rpmstring
-+ * strlcpy() clone: 
-+ * Copy src to string dest of size n. At most n-1 characters
-+ * will be copied.  Always zero-terminates (unless n == 0).
-+ * Length of src is returned; if retval >= n, truncation occurred.
-+ * @param dest                destination buffer
-+ * @param src         string to copy
-+ * @param n           destination buffer size
-+ * @return            length of src string
-+ */
-+size_t rstrlcpy(char *dest, const char *src, size_t n);
-+
-+/** \ingroup rpmstring
-+ * String hashing function
-+ * @param string      string to hash
-+ * @return            hash id
-+ */
-+RPM_GNUC_PURE
-+unsigned int rstrhash(const char * string);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif        /* _RPMSTRING_H_ */
-diff -urNp rpm-4.5.orig/rpmio/rpmutil.h rpm-4.5/rpmio/rpmutil.h
---- rpm-4.5.orig/rpmio/rpmutil.h       1970-01-01 00:00:00.000000000 +0000
-+++ rpm-4.5/rpmio/rpmutil.h    2017-10-19 23:16:15.213645871 +0000
-@@ -0,0 +1,160 @@
-+#ifndef _RPMUTIL_H
-+#define _RPMUTIL_H
-+
-+#include <unistd.h>
-+
-+/** \file rpmio/rpmutil.h
-+ *
-+ * Miscellaneous utility macros:
-+ * - portability wrappers for various gcc extensions like __attribute__()
-+ * - ...
-+ *
-+ * Copied from glib, names replaced to avoid clashing with glib.
-+ *
-+ */
-+
-+/* Here we provide RPM_GNUC_EXTENSION as an alias for __extension__,
-+ * where this is valid. This allows for warningless compilation of
-+ * "long long" types even in the presence of '-ansi -pedantic'. 
-+ */
-+#if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
-+#  define RPM_GNUC_EXTENSION __extension__
-+#else
-+#  define RPM_GNUC_EXTENSION
-+#endif
-+
-+/* Provide macros to feature the GCC function attribute.
-+ */
-+#if    __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-+#define RPM_GNUC_PURE                            \
-+  __attribute__((__pure__))
-+#define RPM_GNUC_MALLOC                       \
-+  __attribute__((__malloc__))
-+#else
-+#define RPM_GNUC_PURE
-+#define RPM_GNUC_MALLOC
-+#endif
-+
-+#if     (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-+#define RPM_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
-+#define RPM_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
-+#else
-+#define RPM_GNUC_ALLOC_SIZE(x)
-+#define RPM_GNUC_ALLOC_SIZE2(x,y)
-+#endif
-+
-+#if     __GNUC__ >= 4
-+#define RPM_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
-+#else
-+#define RPM_GNUC_NULL_TERMINATED
-+#endif
-+
-+#if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-+#define RPM_GNUC_PRINTF( format_idx, arg_idx )    \
-+  __attribute__((__format__ (__printf__, format_idx, arg_idx)))
-+#define RPM_GNUC_SCANF( format_idx, arg_idx )     \
-+  __attribute__((__format__ (__scanf__, format_idx, arg_idx)))
-+#define RPM_GNUC_FORMAT( arg_idx )                \
-+  __attribute__((__format_arg__ (arg_idx)))
-+#define RPM_GNUC_NORETURN                         \
-+  __attribute__((__noreturn__))
-+#define RPM_GNUC_CONST                            \
-+  __attribute__((__const__))
-+#define RPM_GNUC_UNUSED                           \
-+  __attribute__((__unused__))
-+#define RPM_GNUC_NO_INSTRUMENT                        \
-+  __attribute__((__no_instrument_function__))
-+#else   /* !__GNUC__ */
-+#define RPM_GNUC_PRINTF( format_idx, arg_idx )
-+#define RPM_GNUC_SCANF( format_idx, arg_idx )
-+#define RPM_GNUC_FORMAT( arg_idx )
-+#define RPM_GNUC_NORETURN
-+#define RPM_GNUC_CONST
-+#define RPM_GNUC_UNUSED
-+#define RPM_GNUC_NO_INSTRUMENT
-+#endif  /* !__GNUC__ */
-+
-+#if    __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
-+#define RPM_GNUC_DEPRECATED                            \
-+  __attribute__((__deprecated__))
-+#else
-+#define RPM_GNUC_DEPRECATED
-+#endif /* __GNUC__ */
-+
-+#if     __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-+#define RPM_GNUC_MAY_ALIAS __attribute__((may_alias))
-+#define RPM_GNUC_NONNULL( ... )       \
-+  __attribute__((__nonnull__ (__VA_ARGS__)))
-+#else
-+#define RPM_GNUC_MAY_ALIAS
-+#define RPM_GNUC_NONNULL( ... )
-+#endif
-+
-+#if    __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-+#define RPM_GNUC_WARN_UNUSED_RESULT           \
-+  __attribute__((warn_unused_result))
-+#else
-+#define RPM_GNUC_WARN_UNUSED_RESULT
-+#endif /* __GNUC__ */
-+
-+#if    __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-+#  define RPM_GNUC_INTERNAL __attribute__((visibility("hidden")))
-+#else
-+#  define RPM_GNUC_INTERNAL
-+#endif
-+
-+
-+/* Guard C code in headers, while including them from C++ */
-+#ifdef  __cplusplus
-+# define RPM_BEGIN_DECLS  extern "C" {
-+# define RPM_END_DECLS    }
-+#else
-+# define RPM_BEGIN_DECLS
-+# define RPM_END_DECLS
-+#endif
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/* Rpm specific allocators which never return NULL but terminate on failure */
-+RPM_GNUC_MALLOC RPM_GNUC_ALLOC_SIZE(1)
-+void * rmalloc(size_t size);
-+
-+RPM_GNUC_MALLOC RPM_GNUC_ALLOC_SIZE2(1,2)
-+void * rcalloc(size_t nmemb, size_t size);
-+
-+RPM_GNUC_ALLOC_SIZE(2)
-+void * rrealloc(void *ptr, size_t size);
-+
-+char * rstrdup(const char *str);
-+
-+/* Rpm specific free() which returns NULL */
-+void * rfree(void *ptr);
-+
-+/** \ingroup rpmutil
-+ * Memory allocation failure callback prototype. When registered through
-+ * rpmSetMemFail(), this gets called if memory allocation through rmalloc()
-+ * and friends fails. If the application can somehow recover memory here,
-+ * it can return a newly allocated memory block of requested size, otherwise
-+ * it must return NULL after performing it's own shutdown deeds or 
-+ * terminate itself.
-+ * @param size                Size of allocation request in bytes
-+ * @param data                User data (or NULL)
-+ * @return            Allocated memory block of requested size or NULL
-+ */
-+typedef void * (*rpmMemFailFunc) (size_t size, void *data);
-+
-+/** \ingroup rpmutil
-+ * Set memory allocation failure callback.
-+ * @param func                Allocation failure callback function
-+ * @param data                User data (or NULL)
-+ * @return            Previous callback function
-+ */
-+rpmMemFailFunc rpmSetMemFail(rpmMemFailFunc func, void *data);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _RPMUTIL_H */
diff --git a/rpm-sigpad.patch b/rpm-sigpad.patch
deleted file mode 100644 (file)
index 13da67d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-       - jbj: reserve ~1K in  RPMSIGTAG_PADDING for now.
-       - jbj: add RPMSIGTAG_PADDING to force metadata header alignment in file.
---- rpm-4.5/build/pack.c       2007-12-17 00:28:09.000000000 +0200
-+++ rpm-4.5-sigpad/build/pack.c        2009-06-08 12:29:50.225343621 +0300
-@@ -702,6 +702,22 @@
-       goto exit;
-     }
-+    /* Pad the signature header to put the metadata header at known offset. */
-+    { size_t slen = headerSizeof(sig, HEADER_MAGIC_YES);
-+      void * uh = headerUnload(sig);
-+      static const size_t align = 1024;
-+      size_t nb = align - 96 - 16 - 8;
-+      unsigned char * b;
-+
-+      uh = _free(uh);
-+assert(slen < nb);
-+      nb -= slen;
-+      b = memset(alloca(nb), 0, nb);
-+      (void) headerAddEntry(sig, RPMSIGTAG_PADDING, RPM_BIN_TYPE, b, nb);
-+      sig = headerReload(sig, RPMTAG_HEADERSIGNATURES);
-+assert(sig != NULL);
-+    }
-+
-     /* Open the output file */
-     fd = Fopen(fileName, "w");
-     if (fd == NULL || Ferror(fd)) {
---- rpm-4.5/lib/rpmlib.h       2008-06-10 02:19:16.000000000 +0300
-+++ rpm-4.5-sigpad/lib/rpmlib.h        2009-06-08 12:29:50.225343621 +0300
-@@ -1058,7 +1058,8 @@
-     RPMSIGTAG_BADSHA1_2       = RPMTAG_BADSHA1_2,     /*!< internal Broken SHA1, take 2. */
-     RPMSIGTAG_SHA1    = RPMTAG_SHA1HEADER,    /*!< internal sha1 header digest. */
-     RPMSIGTAG_DSA     = RPMTAG_DSAHEADER,     /*!< internal DSA header signature. */
--    RPMSIGTAG_RSA     = RPMTAG_RSAHEADER      /*!< internal RSA header signature. */
-+    RPMSIGTAG_RSA     = RPMTAG_RSAHEADER,     /*!< internal RSA header signature. */
-+    RPMSIGTAG_PADDING = 0x3fffffff            /*!< signature header padding */
- };
- /** \ingroup signature
diff --git a/rpm-system_libs-more.patch b/rpm-system_libs-more.patch
deleted file mode 100644 (file)
index 9fda9b5..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
---- rpm-4.4.8/configure.ac.orig        2007-04-08 16:26:29.303992000 +0200
-+++ rpm-4.4.8/configure.ac     2007-04-08 16:35:11.461748504 +0200
-@@ -662,7 +662,7 @@
- dnl ------------------ with    internal db
- AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
--WITH_DB_SUBDIR=db3
-+WITH_DB_SUBDIR=
- WITH_INTERNAL_DB=1
- DBLIBSRCS="db3.c"
---- rpm-4.5/configure.ac~      2008-04-13 03:20:07.000000000 +0300
-+++ rpm-4.5/configure.ac       2008-04-13 03:23:45.011443406 +0300
-@@ -1203,7 +1215,7 @@
- dnl # XXX Propagate -lucb to popt ...
- dnl export LIBS INCPATH CONFIG_SITE
--AC_CONFIG_SUBDIRS(file db3)
-+AC_CONFIG_SUBDIRS(file)
- AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
-       scripts/perl.req scripts/perl.prov
---- rpm-4.5/rpmdb/Makefile.am~ 2008-04-13 03:28:19.000000000 +0300
-+++ rpm-4.5/rpmdb/Makefile.am  2008-04-13 13:49:10.122086563 +0300
-@@ -25,25 +25,18 @@
- tjfn_LDADD = librpmdb.la
- pkgincdir = $(pkgincludedir)
--pkginc_HEADERS = db.h header.h hdrinline.h rpmdb.h
-+pkginc_HEADERS = header.h hdrinline.h rpmdb.h
- noinst_HEADERS = fprint.h header_internal.h legacy.h
- pkglibdir =           @USRLIBRPM@
- versionlibdir =       $(pkglibdir)/@VERSION@
--versionlib_PROGRAMS = \
--      db_archive db_checkpoint db_deadlock db_dump \
--      db_hotbackup db_load db_printlog db_recover \
--      db_stat db_upgrade db_verify 
--if WITH_DB_RPC
--versionlib_PROGRAMS += db_svc
--endif
- mylibs = librpmdb.la
- LIBS =
- # XXX watchout, ../db3/libdb.la created by this Makefile may surprise
--libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la
-+libdb_la = 
- # XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
- LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
diff --git a/rpm-system_libs.patch b/rpm-system_libs.patch
deleted file mode 100644 (file)
index 7711302..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
---- rpm-4.5/configure.ac~      2008-04-13 03:20:07.000000000 +0300
-+++ rpm-4.5/configure.ac       2008-04-13 03:23:45.011443406 +0300
-@@ -1203,7 +1215,7 @@
- dnl # XXX Propagate -lucb to popt ...
- dnl export LIBS INCPATH CONFIG_SITE
--AC_CONFIG_SUBDIRS(popt zlib file sqlite db3)
-+AC_CONFIG_SUBDIRS(file db3)
- AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
-       scripts/perl.req scripts/perl.prov
-@@ -1534,7 +1534,6 @@
-       lua/Makefile
-   ])
- AC_CONFIG_COMMANDS([default],[[
--      [ -d popt ] && echo timestamp > popt/stamp-h.in
-       echo timestamp > stamp-h.in
-       [ -d perl ] && cd perl && perl Makefile.PL INSTALLDIRS=vendor
-   
---- rpm-4.5/Makefile.am~       2008-04-13 03:20:07.000000000 +0300
-+++ rpm-4.5/Makefile.am        2008-04-13 03:24:33.962259478 +0300
-@@ -72,7 +72,6 @@
-           -load lib/rpmlib.lcd \
-           -load rpmdb/rpmdb.lcd \
-           -load rpmio/rpmio.lcd \
--          -load popt/popt.lcd \
-               $(DEFS) $(INCLUDES) rpmqv.c $(rpmbuild_SOURCES)
- .PHONY:       lint
---- rpm.org/rpmio/Makefile.am.org      2004-11-18 17:42:53.756263795 +0100
-+++ rpm.org/rpmio/Makefile.am  2004-11-18 17:43:09.526885309 +0100
-@@ -82,39 +82,39 @@
- tdir_SOURCES = tdir.c
- tdir_LDFLAGS = @LDFLAGS_STATIC@
--tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tdir_LDADD = librpmio.la -lpopt
- tfts_SOURCES = tfts.c
- tfts_LDFLAGS = @LDFLAGS_STATIC@
--tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tfts_LDADD = librpmio.la -lpopt
- tget_SOURCES = tget.c
- tget_LDFLAGS = @LDFLAGS_STATIC@
--tget_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tget_LDADD = librpmio.la -lpopt
- thkp_SOURCES = thkp.c
- thkp_LDFLAGS = @LDFLAGS_STATIC@
--thkp_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+thkp_LDADD = librpmio.la -lpopt
- tput_SOURCES = tput.c
- tput_LDFLAGS = @LDFLAGS_STATIC@
--tput_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tput_LDADD = librpmio.la -lpopt
- tglob_SOURCES = tglob.c
- tglob_LDFLAGS = @LDFLAGS_STATIC@
--tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tglob_LDADD = librpmio.la -lpopt
- tinv_SOURCES = tinv.c
- tinv_LDFLAGS = @LDFLAGS_STATIC@
--tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tinv_LDADD = librpmio.la -lpopt
- tkey_SOURCES = tkey.c
- tkey_LDFLAGS = @LDFLAGS_STATIC@
--tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+tkey_LDADD = librpmio.la -lpopt
- trpmio_SOURCES = trpmio.c
--trpmio_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
-+trpmio_LDADD = librpmio.la -lpopt
- tsw_SOURCES = tsw.c
- tsw_LDFLAGS = librpmio.la
-
diff --git a/rpm-tar_as_secondary_source.patch b/rpm-tar_as_secondary_source.patch
deleted file mode 100644 (file)
index 3783b2d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- rpm-4.5/rpmio/macro.c~     2008-06-10 02:08:37.000000000 +0300
-+++ rpm-4.5/rpmio/macro.c      2008-06-10 02:08:59.476044991 +0300
-@@ -22,6 +22,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <strings.h>
- #include <ctype.h>
- #define rpmError fprintf
- #define       rpmIsVerbose()  (0)
-@@ -2106,6 +2107,7 @@ int isCompressed(const char * file, rpmC
-     ssize_t nb;
-     int rc = -1;
-     unsigned char magic[13];
-+    char *end, *ext;
-     *compressed = COMPRESSED_NOT;
-@@ -2131,6 +2133,11 @@ int isCompressed(const char * file, rpmC
-     rc = 0;
-+    /* Tar archives will be recognized by filename. */
-+    end = strchr(file, '\0');
-+    ext = end - 4;
-+    if (ext > file && !strcasecmp(ext, ".tar")) return rc;
-+ 
-     if (magic[0] == 'B' && magic[1] == 'Z')
-       *compressed = COMPRESSED_BZIP2;
-     else
diff --git a/rpm-tld-macros.patch b/rpm-tld-macros.patch
deleted file mode 100644 (file)
index e0f4949..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-diff -ur rpm-4.5.orig/macros.in rpm-4.5/macros.in
---- rpm-4.5.orig/macros.in     2020-04-19 16:30:03.450641000 +0200
-+++ rpm-4.5/macros.in  2020-04-29 16:30:36.671641000 +0200
-@@ -328,12 +328,6 @@
- #     
- #%_javaclasspath      all
--#     Import packaging conventions from jpackage.org (prefixed with _
--#     to avoid name collisions).
--#     
--%_javadir      %{_datadir}/java
--%_javadocdir   %{_datadir}/javadoc
--
- #
- #     Deprecated.
- #
-@@ -1361,44 +1355,9 @@
- #
- # Note: Used iff _use_internal_dependency_generator is non-zero. The
- # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
--#%__perl_provides     %{_rpmhome}/perldeps.pl --provides
--#%__perl_requires     %{_rpmhome}/perldeps.pl --requires
- %__perl_provides      %{_rpmhome}/perl.prov
- %__perl_requires      %{_rpmhome}/perl.req
--# Useful macros for building *.rpm perl packages.
--#     (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
--#
--# For example, these can be used as (from ImageMagick.spec from PLD site)
--#     [...]
--#     BuildPrereq: perl
--#     [...]
--#     %package perl
--#     Summary: libraries and modules for access to ImageMagick from perl
--#     Group: Development/Languages/Perl
--#     Requires: %{name} = %{version}
--#     %requires_eq    perl
--#     [...]
--#     %install
--#     rm -fr $RPM_BUILD_ROOT
--#     install -d $RPM_BUILD_ROOT/%{perl_sitearch}
--#     [...]
--#     %files perl
--#     %defattr(644,root,root,755)
--#     %{perl_sitearch}/Image
--#     %dir %{perl_sitearch}/auto/Image
--#
--
--%requires_eq()        %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
--
--%perl_sitearch        %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
--%perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
--%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
--%perl_vendorlib  %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
--%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
--%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
--%perl_version %(eval "`%{__perl} -V:version`"; echo $version)
--
- #------------------------------------------------------------------------
- # python(...) configuration.
- #
-@@ -1408,107 +1367,11 @@
- # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
- %__python_provides      %{_rpmhome}/pythoneggs.py --provides
- %__python_requires      %{_rpmhome}/pythoneggs.py --requires
--#
--%python_sitearch %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(1); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
--%python_sitelib %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
--%python_version %(%{__python} -c "import sys; print(sys.version[0:3])")
--
--# python main version
--%py_ver                 %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
--%py_prefix              %(%{__python} -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
--%py_platlibdir          %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
--%py_purelibdir          %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=0)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
--# backward compatibility
--%py_libdir              %py_purelibdir
--
--%py_platsitedir         %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
--%py_puresitedir         %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
--%py_sitedir             %py_puresitedir
--
--%py_dyndir              %{py_platlibdir}/lib-dynload
--
--%py_incdir              %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND)
--
--%py_compile(O)  \
--find %1 -name '*.pyc' -exec rm -f {} \\; \
--%{__python} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
--%{-O: \
--find %1 -name '*.pyo' -exec rm -f {} \\; \
--%{__python} -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
--}
--
--# pure python modules compilation
--%py_comp        %{__python} -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])"
--
--%py_ocomp       %{__python} -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])"
--
--%py_requires(d) \
--BuildRequires: %{__python} %{-d:python-devel}
--
--#------------------------------------------------------------------------
--# php(...) configuration.
--#
--# Path to scripts to autogenerate php package dependencies,
--#
--# Note: Used iff _use_internal_dependency_generator is non-zero. The
--# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
--#%__php_provides      %{_rpmhome}/phpdeps.sh --provides
--#%__php_requires      %{_rpmhome}/phpdeps.sh --requires
--#%__php_provides              %{_rpmhome}/php.prov
--#%__php_requires              %{_rpmhome}/php.req
- %__mono_provides      %{nil}
- %__mono_requires      %{nil}
- #------------------------------------------------------------------------
--# java(...) configuration.
--#
--# Path to scripts to autogenerate java package dependencies,
--#
--# Note: Used iff _use_internal_dependency_generator is non-zero. The
--# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
--#%__java_provides     %{_rpmhome}/javadeps.sh --provides
--#%__java_requires     %{_rpmhome}/javadeps.sh --requires
--
--#------------------------------------------------------------------------
--# ruby(...) configuration.
--#
--# Path to scripts to autogenerate ruby package dependencies,
--
--# Note: Used if _use_internal_dependency_generator is non-zero. The
--# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
--%__ruby_provides      %{_rpmhome}/rubygems.rb --provides
--%__ruby_requires      %{_rpmhome}/rubygems.rb --requires
--
--%ruby_version         %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["ruby_version"]')
--
--%ruby_archdir         %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["archdir"]')
--%ruby_libdir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"]')
--%ruby_sitedir         %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitedir"]')
--%ruby_sitearchdir     %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
--%ruby_sitelibdir      %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')
--%ruby_vendordir               %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendordir"]')
--%ruby_vendorarchdir   %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')
--%ruby_vendorlibdir    %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]')
--%ruby_gemdir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], "gems/#{RbConfig::CONFIG["ruby_version"]}")')
--%ruby_ridir           %(%{__ruby} -rrbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", RbConfig::CONFIG["ruby_version"])')
--
--%__gem_helper %{_usrlibrpm}/gem_helper.rb
--
--%gem_build(f:j:) \
--      %__gem_helper build \\\
--      %{-f:-f%{-f*}} \\\
--      %{!-j:%{_smp_mflags}}%{-j:-j%{-j*}}
--
--%gem_install(i:n:C) \
--      DESTDIR=${DESTDIR:-%{buildroot}} \\\
--      %__gem_helper install \\\
--      --env-shebang --rdoc --ri --force --ignore-dependencies \\\
--      %{!-i:--install-dir %{buildroot}%{ruby_gemdir}}%{-i:--install-dir %{-i*}} \\\
--      %{!-n:--bindir %{buildroot}%{_bindir}}%{-n:--bindir%{-n*}} \\\
--      %{!-C:--fix-permissions}
--
--#------------------------------------------------------------------------
- # libtool(...) configuration.
- #
- # Path to scripts to autogenerate libtool package dependencies,
-@@ -1588,15 +1451,7 @@
- %__common_cflags      -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
- %__common_cflags_with_ssp     %{__common_cflags} %{?_ssp_cflags}
--#------------------------------------------------------------------------
--# mimetype(...) configuration.
--#
--# Path to script to autogenerate mimetype(foo) provides, based on MimeType
--# key from desktop files.
--#
--# 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
-+%requires_eq()        %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
- %__gstreamer_provides %{nil}
-diff -ur rpm-4.5.orig/scripts/Makefile.am rpm-4.5/scripts/Makefile.am
---- rpm-4.5.orig/scripts/Makefile.am   2020-04-19 16:30:03.450641000 +0200
-+++ rpm-4.5/scripts/Makefile.am        2020-04-29 15:41:49.787641000 +0200
-@@ -11,11 +11,9 @@
-       cpanflute cpanflute2 Specfile.pm find-provides.perl \
-       find-requires.perl freshen.sh gendiff getpo.sh http.req \
-       check-java-closure.sh java.prov.sh java.req.sh \
--      javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
-+      libtooldeps.sh pkgconfigdeps.sh \
-       perldeps.pl perl.prov perl.req pythondeps.sh pythoneggs.py \
--      mimetypedeps.sh \
--      php.prov php.req rpm2cpio \
--      rpmdb_loadcvt rpmdiff rpmdiff.cgi \
-+      rpm2cpio rpmdb_loadcvt rpmdiff rpmdiff.cgi \
-       rpm.daily rpm.log rpm.xinetd \
-       sql.prov sql.req symclash.py symclash.sh tcl.req tgpg trpm u_pkg.sh \
-       vpkg-provides.sh vpkg-provides2.sh \
-@@ -39,10 +37,8 @@
-       find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
-       find-provides.perl \
-       find-requires.perl getpo.sh http.req \
--      javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
-+      libtooldeps.sh pkgconfigdeps.sh \
-       perldeps.pl perl.prov perl.req pythondeps.sh pythoneggs.py \
--      mimetypedeps.sh \
--      php.prov php.req \
-       rpmdb_loadcvt \
-       rpm.daily rpm.log rpm.xinetd \
-       symclash.py symclash.sh tgpg u_pkg.sh \
-diff -ur rpm-4.5.orig/scripts/Makefile.in rpm-4.5/scripts/Makefile.in
---- rpm-4.5.orig/scripts/Makefile.in   2008-07-09 11:41:32.000000000 +0200
-+++ rpm-4.5/scripts/Makefile.in        2020-04-29 15:41:01.972641000 +0200
-@@ -339,9 +339,9 @@
-       cpanflute cpanflute2 Specfile.pm find-provides.perl \
-       find-requires.perl freshen.sh gendiff getpo.sh http.req \
-       check-java-closure.sh java.prov.sh java.req.sh \
--      javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
--      perldeps.pl perl.prov perl.req pythondeps.sh mimetypedeps.sh \
--      php.prov php.req rpm2cpio \
-+      libtooldeps.sh pkgconfigdeps.sh \
-+      perldeps.pl perl.prov perl.req pythondeps.sh \
-+      rpm2cpio \
-       rpmdb_loadcvt rpmdiff rpmdiff.cgi \
-       rpm.daily rpm.log rpm.xinetd \
-       sql.prov sql.req symclash.py symclash.sh tcl.req tgpg trpm u_pkg.sh \
-@@ -360,9 +360,8 @@
-       find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
-       find-provides.perl \
-       find-requires.perl getpo.sh http.req \
--      javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
--      perldeps.pl perl.prov perl.req pythondeps.sh mimetypedeps.sh \
--      php.prov php.req \
-+      libtooldeps.sh pkgconfigdeps.sh \
-+      perldeps.pl perl.prov perl.req pythondeps.sh \
-       rpmdb_loadcvt \
-       rpm.daily rpm.log rpm.xinetd \
-       symclash.py symclash.sh tgpg u_pkg.sh \
diff --git a/rpm-trigger-flags-int-type.patch b/rpm-trigger-flags-int-type.patch
deleted file mode 100644 (file)
index b3ed60a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur rpm-4.5.orig/lib/formats.c rpm-4.5/lib/formats.c
---- rpm-4.5.orig/lib/formats.c 2008-06-10 01:19:16.000000000 +0200
-+++ rpm-4.5/lib/formats.c      2019-01-24 21:42:07.736000000 +0100
-@@ -900,7 +900,7 @@
-     char * val;
- assert(ix == 0);
--    if (he->t != RPM_INT64_TYPE) {
-+    if (he->t != RPM_INT32_TYPE) {
-       val = xstrdup(_("(invalid type)"));
-     } else {
-       int anint = data.i64p[ix];
diff --git a/rpm-truncate-cvslog.patch b/rpm-truncate-cvslog.patch
deleted file mode 100644 (file)
index 5d9e977..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# vim:ts=8:sw=4
---- rpm-4.4.6/build/parseChangelog.c~  2006-04-30 17:34:40.334393487 +0300
-+++ rpm-4.4.6/build/parseChangelog.c   2006-05-02 19:46:06.357193264 +0300
-@@ -8,6 +8,9 @@
- #include "rpmbuild.h"
- #include "debug.h"
-+#define CVS_RCSID "$""Log: "
-+#define CVS_REVISION "Revision "
-+
- void addChangelogEntry(Header h, time_t time, const char *name, const char *text)
- {
-     int_32 mytime = time;     /* XXX convert to header representation */
-@@ -123,6 +123,7 @@
-     int nentries = 0;
-     static time_t last = 0;
-     static int oneshot = 0;
-+    int numchangelog = rpmExpandNumeric("%{?_buildchangelogtruncate}");
-     /* Determine changelog truncation criteria. */
-     if (!oneshot++) {
-@@ -222,6 +223,42 @@
-       /* backup to end of description */
-       while ((s > text) && xisspace(*s))
-           *s-- = '\0';
-+
-+      if (numchangelog && (s = strstr(text, CVS_RCSID))) {
-+          /* find end of line */
-+          while(*s && *s != '\n') s++;
-+          if (!*s) {
-+              goto out;
-+          }
-+          s++;
-+          if (!*s) {
-+              goto out;
-+          }
-+
-+          /* we reached place where first Revisions should be */
-+          i = 0;
-+          while (1) {
-+              if (strncmp(s, CVS_REVISION, sizeof(CVS_REVISION) - 1) == 0) {
-+                  if (i++ == numchangelog) {
-+                      break;
-+                  }
-+              }
-+              while(*s && *s != '\n') s++;
-+              if (!*s) {
-+                  break;
-+              }
-+              s++;
-+          }
-+
-+          if (*s) {
-+              s--;
-+              /* backup to the beginning of line */
-+              while ((s > text) && (*s == '\n' || xisspace(*s))) {
-+                  *s-- = '\0';
-+              }
-+          }
-+      }
-+out:
-       
-       /* Add entry if not truncated. */
-       nentries++;
diff --git a/rpm-unglobal.patch b/rpm-unglobal.patch
deleted file mode 100644 (file)
index 965e983..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
---- rpm-4.5/rpmio/macro.c      2009-08-08 15:47:20.495455961 +0200
-+++ rpm-4.5/rpmio/macro.c      2012-11-08 06:37:45.082618600 +0200
-@@ -807,6 +807,42 @@
-     return se;
- }
-+void delMacroAll(MacroContext mc, const char * n);
-+/**
-+ * Parse (and execute) macro undefinition.
-+ * @param mc          macro context
-+ * @param se          macro name to undefine
-+ * @return            address to continue parsing
-+ */
-+/*@dependent@*/ static const char *
-+doUnglobal(MacroContext mc, /*@returned@*/ const char * se)
-+      /*@globals rpmGlobalMacroContext @*/
-+      /*@modifies mc, rpmGlobalMacroContext @*/
-+{
-+    const char *s = se;
-+    char *buf = alloca(_macro_BUFSIZ);
-+    char *n = buf, *ne = n;
-+    int c;
-+
-+    COPYNAME(ne, s, c);
-+
-+    /* Move scan over body */
-+    while (iseol(*s))
-+      s++;
-+    se = s;
-+
-+    /* Names must start with alphabetic or _ and be at least 3 chars */
-+    if (!((c = *n) && (xisalpha(c) || c == '_') && (ne - n) > 2)) {
-+      rpmError(RPMERR_BADSPEC,
-+              _("Macro %%%s has illegal name (%%unglobal)\n"), n);
-+      return se;
-+    }
-+
-+    delMacroAll(mc, n);
-+
-+    return se;
-+}
-+
- #ifdef        DYING
- static void
- dumpME(const char * msg, MacroEntry me)
-@@ -1430,6 +1466,10 @@
-               s = doUndefine(mb->mc, se);
-               continue;
-       }
-+      if (STREQ("unglobal", f, fn)) {
-+              s = doUnglobal(mb->mc, se);
-+              continue;
-+      }
-       if (STREQ("echo", f, fn) ||
-           STREQ("warn", f, fn) ||
-@@ -1984,6 +2024,18 @@
-     }
- }
-+void
-+delMacroAll(MacroContext mc, const char * n)
-+{
-+      MacroEntry * mep;
-+
-+      if (mc == NULL) mc = rpmGlobalMacroContext;
-+      /* If name exists, pop entry */
-+      while ((mep = findEntry(mc, n, 0)) != NULL) {
-+              delMacro(mc, n);
-+      }
-+}
-+
- /*@-mustmod@*/ /* LCL: mc is modified through mb->mc, mb is abstract */
- int
- rpmDefineMacro(MacroContext mc, const char * macro, int level)
diff --git a/rpm-v3-support.patch b/rpm-v3-support.patch
deleted file mode 100644 (file)
index 33486db..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/lib/rpmds.c      10 Jun 2007 17:12:25 -0000      2.55.2.4
-+++ b/lib/rpmds.c      6 Oct 2007 01:09:19 -0000
-@@ -253,6 +255,7 @@
-     const char ** N;
-     rpmTagType Nt;
-     int_32 Count;
-+int rpmv3 = headerIsEntry(h, RPMTAG_OLDFILENAMES);
- assert(scareMem == 0);                /* XXX always allocate memory */
-     if (tagN == RPMTAG_PROVIDENAME) {
-@@ -280,12 +283,12 @@
-       tagEVR = RPMTAG_TRIGGERVERSION;
-       tagF = RPMTAG_TRIGGERFLAGS;
-     } else
--    if (tagN == RPMTAG_DIRNAMES) {
-+    if (!rpmv3 && tagN == RPMTAG_DIRNAMES) {
-       Type = "Dirnames";
-       tagEVR = 0;
-       tagF = 0;
-     } else
--    if (tagN == RPMTAG_FILELINKTOS) {
-+    if (!rpmv3 && tagN == RPMTAG_FILELINKTOS) {
-       Type = "Filelinktos";
-       tagEVR = RPMTAG_DIRNAMES;
-       tagF = RPMTAG_DIRINDEXES;
diff --git a/rpm-xz.patch b/rpm-xz.patch
deleted file mode 100644 (file)
index b94af11..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -ur rpm-4.5.orig/build/parsePrep.c rpm-4.5/build/parsePrep.c
---- rpm-4.5.orig/build/parsePrep.c     2014-07-29 17:12:39.000000000 +0000
-+++ rpm-4.5/build/parsePrep.c  2014-07-29 17:14:38.749000000 +0000
-@@ -148,6 +148,9 @@
-       case COMPRESSED_LZMA:
-           zipper = "%{__lzma}";
-           break;
-+      case COMPRESSED_XZ:
-+          zipper = "%{__xz}";
-+          break;
-       }
-       zipper = rpmGetPath(zipper, NULL);
-@@ -251,6 +254,9 @@
-       case COMPRESSED_LZMA:
-           t = "%{__lzma} -dc";
-           break;
-+      case COMPRESSED_XZ:
-+          t = "%{__xz} -dc";
-+          break;
-       case COMPRESSED_ZIP:
-           if (rpmIsVerbose() && !quietly)
-               t = "%{__unzip}";
-diff -ur rpm-4.5.orig/rpmio/macro.c rpm-4.5/rpmio/macro.c
---- rpm-4.5.orig/rpmio/macro.c 2014-07-29 17:12:39.000000000 +0000
-+++ rpm-4.5/rpmio/macro.c      2014-07-29 17:13:17.613000000 +0000
-@@ -1241,10 +1241,13 @@
-           sprintf(be, "%%__unzip -qq %s", b);
-           break;
-       case 4: /* COMPRESSED_LZOP */
--          sprintf(be, "%%__lzop %s", b);
-+          sprintf(be, "%%__lzop -dc %s", b);
-           break;
-       case 5: /* COMPRESSED_LZMA */
--          sprintf(be, "%%__lzma %s", b);
-+          sprintf(be, "%%__lzma -dc %s", b);
-+          break;
-+      case 6: /* COMPRESSED_XZ */
-+          sprintf(be, "%%__xz -dc %s", b);
-           break;
-       }
-       b = be;
-@@ -2257,6 +2260,13 @@
-       magic[11] == 0x00 && magic[12] == 0x00) /* lzmash */
-       *compressed = COMPRESSED_LZMA;
-     else
-+    if (magic[0] == 0135 && magic[1] == 0 && magic[2] == 0)   /* lzma */
-+      *compressed = COMPRESSED_LZMA;
-+    else
-+    if (magic[0] == 0xFD && magic[1] == 0x37 && magic[2] == 0x7A
-+     && magic[3] == 0x58 && magic[4] == 0x5A && magic[5] == 0x00)     /* xz */
-+      *compressed = COMPRESSED_XZ;
-+    else
-     if ((magic[0] == 0037 && magic[1] == 0213)        /* gzip */
-      ||       (magic[0] == 0037 && magic[1] == 0236)  /* old gzip */
-      ||       (magic[0] == 0037 && magic[1] == 0036)  /* pack */
-diff -ur rpm-4.5.orig/rpmio/rpmmacro.h rpm-4.5/rpmio/rpmmacro.h
---- rpm-4.5.orig/rpmio/rpmmacro.h      2014-07-29 17:12:39.000000000 +0000
-+++ rpm-4.5/rpmio/rpmmacro.h   2014-07-29 17:13:17.613000000 +0000
-@@ -170,7 +170,8 @@
-     COMPRESSED_BZIP2          = 2,    /*!< bzip2 can handle */
-     COMPRESSED_ZIP            = 3,    /*!< unzip can handle */
-     COMPRESSED_LZOP           = 4,    /*!< lzop can handle */
--    COMPRESSED_LZMA           = 5     /*!< lzma can handle */
-+    COMPRESSED_LZMA           = 5,    /*!< lzma can handle */
-+    COMPRESSED_XZ             = 6     /*!< xz can handle */
- } rpmCompressedMagic;
- /**
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/rpm.noautoprov b/rpm.noautoprov
new file mode 100644 (file)
index 0000000..440359e
--- /dev/null
@@ -0,0 +1 @@
+# global list of script capabilities (regexps) not to be used in Provides
diff --git a/rpm.noautoprovfiles b/rpm.noautoprovfiles
new file mode 100644 (file)
index 0000000..c6e1ee5
--- /dev/null
@@ -0,0 +1 @@
+# global list of files (regexps) which don't generate Provides
diff --git a/rpm.noautoreq b/rpm.noautoreq
new file mode 100644 (file)
index 0000000..ec8fb4f
--- /dev/null
@@ -0,0 +1 @@
+# global list of script capabilities (regexps) not to be used in Requires
diff --git a/rpm.noautoreqfiles b/rpm.noautoreqfiles
new file mode 100644 (file)
index 0000000..9a885c3
--- /dev/null
@@ -0,0 +1,3 @@
+# global list of files (regexps) which don't generate Requires
+^/usr/src/examples/
+^/usr/share/doc/
diff --git a/rpm.platform b/rpm.platform
deleted file mode 100644 (file)
index 15b2c81..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# TLD rpm macros
-
-%__id          /bin/id
-%__id_u                %{__id} -u
-%__chown_Rhf           %{__chown} -Rhf
-%__chgrp_Rhf           %{__chgrp} -Rhf
-
-%_fixowner       [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root:root
-%_fixgroup       true
-%_fixperms       %{__chmod} -Rf -Rf a+rX,u+w,g-w,o-w
-
-%_exec_prefix    %{_prefix}
-%_bindir         %{_exec_prefix}/bin
-%_sbindir        %{_exec_prefix}/sbin
-%_datadir        %{_prefix}/share
-%_sharedstatedir /var/lib
-%_lib            @LIB@
-%_libdir         %{_exec_prefix}/%{_lib}
-%_libexecdir     %{_exec_prefix}/%{_lib}
-%_includedir     %{_prefix}/include
-%_oldincludedir  /usr/include
-%_sysconfdir     /etc
-%_localstatedir  /var
-%_infodir        /usr/share/info
-%_mandir         %{_prefix}/share/man
-%_defaultdocdir  /usr/share/doc
-
-%__os_install_post \
-%{__spec_install_post_strip}\
-%{__spec_install_post_chrpath}\
-%{__spec_install_post_check_so}\
-%{__spec_install_post_check_tmpfiles}\
-%{__spec_install_post_compress_docs}\
-%{__spec_install_post_compress_modules}\
-%{__spec_install_post_py_hardlink}\
-%{__spec_install_post_perl_clean}\
-%{__arch_install_post}\
-%{nil}
-
index 04249f9903ac6de11a3bdd940f773f05d8cdfa5b..16f360382494b6894363192ae3c7fd515283deba 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -1,21 +1,21 @@
+#
+# TODO:
+# - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
+#
 # Conditional build:
 # Conditional build:
-%bcond_with    static          # build static rpm+rpmi
-%bcond_with    apidocs         # don't generate documentation with doxygen
-%bcond_with    internal_db     # internal db (db 4.5.20)
-%bcond_with    autoreqdep      # autogenerate package name deps in addition to sonames/perl(X)
-%bcond_without nptl            # internal db: don't use process-shared POSIX mutexes (NPTL provides full interface)
-%bcond_without python          # don't build python bindings
-%bcond_without selinux         # build without selinux support
-%bcond_without system_libmagic # don't use system libmagic
-%bcond_without suggest_tags    # build without Suggest tag (bootstrapping)
-%bcond_with    neon            # build with HTTP/WebDAV support (neon library). NOTE: neon libs are in /usr!
-
-# versions of required libraries
-%define        reqdb_pkg       db4.7
-%define        reqdb_ver       4.7.25
-%define        reqpopt_ver     1.10.8
-%define        beecrypt_ver    2:4.1.2-4
-%define        sover           4.5
+%bcond_without apidocs         # don't generate documentation with doxygen
+%bcond_without python3         # don't build python bindings
+%bcond_without plugins         # build plugins
+%bcond_with    recommends_tags # build without Recommends tag (bootstrapping)
+%bcond_with    imaevm          # build with IMA/EVM support (requires libimaevm from ima-evm-utils)
+
+%define                db_ver          5.3.28.0
+%define                popt_ver        1.15
+%define                sover           9.1.0
+
+%if "%{_rpmversion}" >= "4.12" && "%{_rpmversion}" < "5"
+%define        with_recommends_tags    1
+%endif
 
 Summary:       RPM Package Manager
 Summary(de.UTF-8):     RPM Packet-Manager
 
 Summary:       RPM Package Manager
 Summary(de.UTF-8):     RPM Packet-Manager
@@ -25,210 +25,128 @@ Summary(pt_BR.UTF-8):     Gerenciador de pacotes RPM
 Summary(ru.UTF-8):     Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Summary(ru.UTF-8):     Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
-Version:       4.5
-Release:       90
-License:       LGPL
+Version:       4.16.0
+Release:       0.4
+Epoch:         1
+License:       GPL v2 / LGPL v2.1
 Group:         Base
 Group:         Base
-Source0:       %{name}-%{version}.tar.gz
-# Source0-md5: 4e69ab971f682c87625dc0f65d9e16bc
-Source1:       %{name}.groups
-Source2:       %{name}.platform
-Source3:       %{name}-install-tree
-Source5:       %{name}-hrmib-cache
+Source0:       http://ftp.rpm.org/releases/rpm-4.16.x/%{name}-%{version}.tar.bz2
+# Source0-md5: 434e166a812e35ef181f6dd176326920
+Source2:       macros.local
+Source3:       macros.lang
+Source4:       %{name}.sysconfig
+Source5:       %{name}.groups
 Source6:       %{name}-groups-po.awk
 Source6:       %{name}-groups-po.awk
-Source12:      %{name}.sysinfo
-Source13:      perl.prov
-Source14:      %{name}-user_group.sh
-Source15:      %{name}.sysconfig
+Source7:       %{name}-install-tree
+Source8:       %{name}-hrmib-cache
+Source9:       %{name}-user_group.sh
 # http://svn.pld-linux.org/banner.sh/
 # http://svn.pld-linux.org/banner.sh/
-Source18:      banner.sh
-Source19:      %{name}-macros.gstreamer
-Patch1000:     %{name}-new-debuginfo.patch
-Patch1:                %{name}-rpmrc.patch
-Patch2:                %{name}-arch.patch
-Patch3:                %{name}-rpmpopt.patch
-Patch4:                %{name}-perl-macros.patch
-Patch6:                %{name}-noexpand.patch
-Patch7:                %{name}-scripts-closefds.patch
-Patch8:                %{name}-db.patch
-Patch9:                %{name}-gettext-in-header.patch
-Patch10:       %{name}-compress-doc.patch
-Patch11:       %{name}-rpm5-patchset-8074.patch
-Patch12:       %{name}-system_libs.patch
-Patch13:       %{name}-unglobal.patch
-Patch14:       %{name}-etc_dir.patch
-Patch15:       %{name}-system_libs-more.patch
-Patch16:       %{name}-libmagic-locale.patch
-Patch17:       %{name}-ldconfig-always.patch
-Patch20:       %{name}-macros-ti.patch
-Patch21:       %{name}-perl_req-skip_multiline.patch
-Patch22:       %{name}-provides-dont-obsolete.patch
-Patch23:       %{name}-pkgconfigdeps.patch
-Patch24:       %{name}-po.patch
-Patch25:       %{name}-link.patch
-Patch26:       %{name}-notsc.patch
-Patch27:       %{name}-hack-norpmlibdep.patch
-Patch28:       %{name}-makefile-no_myLDADD_deps.patch
-Patch29:       %{name}-perl_req-use_base.patch
-Patch31:       %{name}-missing-prototypes.patch
-Patch32:       %{name}-pld-autodep.patch
-Patch33:       %{name}-arch-x86_64.patch
-Patch34:       %{name}-epoch0.patch
-Patch35:       %{name}-disable-features-ti.patch
-Patch36:       %{name}-debuginfo.patch
-Patch37:       %{name}-doxygen_hack.patch
-Patch39:       %{name}-popt-coreutils.patch
-Patch40:       %{name}-helperEVR-noassert.patch
-Patch42:       %{name}-old-fileconflicts-behaviour.patch
-Patch43:       %{name}-rpm5-patchset-8637.patch
-Patch44:       %{name}-no-neon.patch
-Patch45:       %{name}-no-sqlite.patch
-Patch48:       %{name}-nopie.patch
-Patch50:       %{name}-macros.patch
-Patch51:       %{name}-cleanlibdirs.patch
-Patch53:       %{name}-chroot-hack.patch
-Patch55:       %{name}-truncate-cvslog.patch
-Patch56:       %{name}-rpm5-patchset-8413.patch
-Patch57:       %{name}-as_needed-fix.patch
-Patch58:       %{name}-repackage-wo-lzma.patch
-Patch59:       %{name}-libtool-deps.patch
-Patch61:       %{name}-lzma-mem.patch
-Patch62:       %{name}-lzma-size_t.patch
-Patch63:       %{name}-tar_as_secondary_source.patch
-Patch64:       %{name}-man_pl.patch
-Patch65:       %{name}-lzma-tukaani.patch
-Patch66:       %{name}-v3-support.patch
-Patch67:       %{name}-cleanbody.patch
-Patch69:       %{name}-popt-aliases.patch
-# reverse arrows patch
-Patch70:       %{name}-rpm5-patchset-10061.patch
-Patch71:       %{name}-installbeforeerase.patch
-Patch72:       %{name}-postun-nofail.patch
-Patch73:       %{name}-namespace-probe.patch
-Patch74:       %{name}-noversiondir.patch
-Patch75:       %{name}-rpmte-segv.patch
-Patch77:       %{name}-dirdeps-macro.patch
-Patch78:       %{name}-db3-configure.patch
-Patch79:       %{name}-macros-cpp.patch
-Patch80:       %{name}-link-selinux.patch
-Patch81:       %{name}-db-configure.patch
-Patch82:       %{name}-perl-makefile.patch
-Patch83:       %{name}-nosmpflags.patch
-Patch84:       %{name}-hirmib-ts.patch
-Patch85:       %{name}-perl_req-heredocs_pod.patch
-Patch86:       %{name}-rpmv3-support.patch
-Patch87:       %{name}-mono.patch
-Patch88:       %{name}-poptexecpath.patch
-Patch89:       %{name}-lzma-compress-level.patch
-Patch90:       %{name}-gstreamer.patch
-Patch91:       %{name}-gendiff.patch
-Patch92:       %{name}-set-failed-on-reopen.patch
-Patch93:       %{name}-debugedit-workaround.patch
-Patch94:       %{name}-shescape-memfault.patch
-Patch95:       %{name}-gid-uucp.patch
-Patch96:       %{name}-disable-hkp.patch
-Patch97:       %{name}-sigpad.patch
-Patch98:       %{name}-debugdir.patch
-Patch99:       %{name}-pkgconfig.patch
-Patch100:      %{name}-rpm5-debugedit.patch
-Patch101:      %{name}-builddir-readlink.patch
-Patch102:      pythondeps-speedup.patch
-Patch103:      %{name}-lua-exit-chroot-correctly.patch
-Patch104:      %{name}-glob.patch
-Patch105:      %{name}-am.patch
-Patch106:      %{name}-automake_1.12.patch
-Patch107:      %{name}-debugedit-dwarf4.patch
-Patch108:      %{name}-changelog_order_check_nonfatal.patch
-Patch109:      %{name}-installplatform.patch
-Patch110:      %{name}-xz.patch
-Patch111:      %{name}-shrink.patch
-Patch112:      notrans.patch
-Patch113:      %{name}-rubyprov.patch
-Patch114:      %{name}-ruby-gem-build.patch
-Patch115:      %{name}-glibc.patch
-Patch116:      %{name}-trigger-flags-int-type.patch
-Patch117:      %{name}-rpm2cpio-xz.patch
-Patch118:      %{name}-noarch-subpackages.patch
-Patch119:      %{name}-div0.patch
-Patch120:      %{name}-pythondeps.patch
-Patch121:      %{name}-tld-macros.patch
-URL:           http://rpm5.org/
-BuildRequires: autoconf >= 2.57
+Source10:      banner.sh
+Source11:      %{name}.noautoprov
+Source12:      %{name}.noautoprovfiles
+Source13:      %{name}.noautoreq
+Source14:      %{name}.noautoreqfiles
+Source15:      perl.prov
+Source16:      %{name}db_checkversion.c
+Source17:      %{name}db_reset.c
+Source18:      dbupgrade.sh
+Patch0:                %{name}-man_pl.patch
+Patch1:                %{name}-popt-aliases.patch
+Patch2:                %{name}-perl-macros.patch
+Patch3:                %{name}-perl-req-perlfile.patch
+Patch4:                %{name}-scripts-closefds.patch
+Patch6:                %{name}-perl_req-INC_dirs.patch
+Patch7:                %{name}-debuginfo.patch
+Patch8:                %{name}-libtool-deps.patch
+Patch9:                %{name}-builddir-readlink.patch
+Patch10:       %{name}-changelog_order_check_nonfatal.patch
+Patch11:       %{name}-postun-nofail.patch
+Patch12:       %{name}-clean-docdir.patch
+Patch13:       %{name}-perl-magic.patch
+Patch14:       %{name}-ignore-missing-macro-files.patch
+Patch15:       x32.patch
+Patch16:       rpm5-db-compat.patch
+Patch17:       python-internal-build.patch
+Patch18:       rpmversion.patch
+Patch19:       pkgconfig.patch
+Patch20:       uname-deps.patch
+Patch21:       aarch64.patch
+Patch22:       ix86-platforms.patch
+URL:           https://rpm.org/
+BuildRequires: acl-devel
+BuildRequires: db-devel >= %{db_ver}
+BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1.4
 BuildRequires: automake >= 1.4
-BuildRequires: beecrypt-devel >= %{beecrypt_ver}
 BuildRequires: bzip2-devel >= 1.0.2-17
 BuildRequires: bzip2-devel >= 1.0.2-17
-%{!?with_internal_db:BuildRequires:    %{reqdb_pkg}-devel >= %{reqdb_ver}}
 BuildRequires: elfutils-devel >= 0.108
 BuildRequires: elfutils-devel >= 0.108
-BuildRequires: gettext-devel >= 0.11.4-2
-BuildRequires: keyutils-devel
-%{?with_system_libmagic:BuildRequires: libmagic-devel}
-%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
+BuildRequires: gettext-tools >= 0.19.2
+BuildRequires: libarchive-devel
+BuildRequires: libcap-devel
+BuildRequires: libmagic-devel
+BuildRequires: libgcrypt-devel
+%if %{with plugins}
+BuildRequires: audit-libs-devel
+BuildRequires: dbus-devel
+%{?with_imaevm:BuildRequires:  libimaevm-devel >= 1.0}
+BuildRequires: libselinux-devel >= 2.1.0
+%endif
 # needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
 BuildRequires: libstdc++-devel
 BuildRequires: libtool >= 1:1.4.2-9
 # needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
 BuildRequires: libstdc++-devel
 BuildRequires: libtool >= 1:1.4.2-9
-%if %{with neon}
-BuildRequires: libxml2-devel
-BuildRequires: neon-devel >= 0.25.5
-%endif
-BuildRequires: ossp-uuid-devel >= 1.6.2-8
+BuildRequires: ossp-uuid-devel
 BuildRequires: patch >= 2.2
 BuildRequires: patch >= 2.2
-BuildRequires: popt-devel >= %{reqpopt_ver}
-%{?with_python:BuildRequires:  python-devel >= 1:2.3}
-BuildRequires: python-modules >= 1:2.3
-BuildRequires: rpm-perlprov
-%{?with_python:BuildRequires:  rpm-pythonprov}
-BuildRequires: rpmbuild(macros) >= 1.351
-BuildRequires: tar >= 1:1.15.1
-BuildRequires: zlib-devel >= 1.2.3.3
+BuildRequires: pkgconfig(lua) >= 5.1
+BuildRequires: popt-devel >= %{popt_ver}
+BuildRequires: python3-modules
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.750
+%endif
+BuildRequires: sqlite3-devel >= 3.22.0
+BuildRequires: tcl
+BuildRequires: xz-devel
+BuildRequires: zlib-devel
+BuildRequires: zstd-devel
 %if %{with apidocs}
 BuildRequires: doxygen
 BuildRequires: ghostscript
 BuildRequires: graphviz
 BuildRequires: tetex-pdftex
 %endif
 %if %{with apidocs}
 BuildRequires: doxygen
 BuildRequires: ghostscript
 BuildRequires: graphviz
 BuildRequires: tetex-pdftex
 %endif
-%if %{with static}
-# Require static library only for static build
-BuildRequires: beecrypt-static >= %{beecrypt_ver}
-BuildRequires: bzip2-static >= 1.0.2-17
-%{!?with_internal_db:BuildRequires:    %{reqdb_pkg}-static >= %{reqdb_ver}}
-BuildRequires: elfutils-static
-BuildRequires: glibc-static >= 2.2.94
-%{?with_system_libmagic:BuildRequires: libmagic-static}
-%{?with_selinux:BuildRequires: libselinux-static >= 1.18}
-BuildRequires: ossp-uuid-static >= 1.6.2-8
-BuildRequires: popt-static >= %{reqpopt_ver}
-BuildRequires: zlib-static >= 1.2.3.3
-%endif
-Requires:      %{name}-base = %{version}-%{release}
-Requires:      %{name}-lib = %{version}-%{release}
-Requires:      beecrypt >= %{beecrypt_ver}
-Requires:      popt >= %{reqpopt_ver}
-Provides:      rpm-db-ver = %{reqdb_ver}
-Obsoletes:     rpm-getdeps
-%{!?with_static:Obsoletes:     rpm-utils-static}
-Obsoletes:     tmpwatch-rpmrepackage
+Requires(posttrans):   coreutils
+Requires:      %{name}-base = %{epoch}:%{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+Requires:      rpm-tld-macros >= 1.744
+Requires:      FHS >= 3.0-2
+Requires:      libgcrypt
+Requires:      popt >= %{popt_ver}
+#%if %{with recommends_tags}
+#Recommends:   rpm-plugin-audit
+#Recommends:   rpm-plugin-prioreset
+#Recommends:   rpm-plugin-syslog
+#Recommends:   rpm-plugin-systemd-inhibit
+#%endif
+Obsoletes:     rpm-utils-perl
+Obsoletes:     rpm-utils-static
 Conflicts:     glibc < 2.2.92
 Conflicts:     glibc < 2.2.92
-Conflicts:     poldek < 0.21-0.20070703.00.11
+# db4.6 poldek needed
+Conflicts:     poldek < 0.21-0.20070703.00.3
+# segfaults with lzma 0.42.2
+Conflicts:     lzma-libs < 4.999.3
+Conflicts:     util-vserver < 0.30.216-1.pre3034.7
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _binary_payload         w9.gzdio
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _binary_payload         w9.gzdio
-%define                _noPayloadPrefix        1
 
 # don't require very fresh rpm.macros to build
 
 # don't require very fresh rpm.macros to build
-%define                __gettextize gettextize --copy --force --no-changelog; [ -f po/Makevars ] || cp -f po/Makevars{.template,}
 %define                find_lang sh ./scripts/find-lang.sh $RPM_BUILD_ROOT
 %define                find_lang sh ./scripts/find-lang.sh $RPM_BUILD_ROOT
-%define                ix86    i386 i486 i586 i686
-%define                x8664   amd64 x86_64
-
-# stabilize new build environment
-%define                __newcc %{?force_cc}%{!?force_cc:%{_target_cpu}-tld-linux-gcc}
-%define                __newcxx %{?force_cxx}%{!?force_cxx:%{_target_cpu}-tld-linux-g++}
-%define                __newcpp %{?force_cpp}%{!?force_cpp:%{_target_cpu}-tld-linux-gcc -E}
+%define                ix86    i386 i486 i586 i686 athlon geode pentium3 pentium4
+%define                ppc     ppc ppc7400 ppc7450
+%define                x8664   amd64 ia32e x86_64
 
 %define                _rpmlibdir /usr/lib/rpm
 
 
 %define                _rpmlibdir /usr/lib/rpm
 
-%define                specflags       -fno-strict-aliasing
-
 %description
 RPM is a powerful package manager, which can be used to build,
 install, query, verify, update, and uninstall individual software
 %description
 RPM is a powerful package manager, which can be used to build,
 install, query, verify, update, and uninstall individual software
@@ -284,6 +202,7 @@ Summary(pl.UTF-8):  Podstawowy pakiet RPM - skrypty używane przez same pakiety r
 Group:         Base
 Requires:      filesystem
 Obsoletes:     rpm-scripts
 Group:         Base
 Requires:      filesystem
 Obsoletes:     rpm-scripts
+Obsoletes:     vserver-rpm
 
 %description base
 The RPM base package contains scripts used by rpm packages themselves.
 
 %description base
 The RPM base package contains scripts used by rpm packages themselves.
@@ -302,19 +221,10 @@ Zawiera on:
 Summary:       RPMs library
 Summary(pl.UTF-8):     Biblioteki RPM-a
 Group:         Libraries
 Summary:       RPMs library
 Summary(pl.UTF-8):     Biblioteki RPM-a
 Group:         Libraries
-Requires:      beecrypt >= %{beecrypt_ver}
-%{!?with_internal_db:Requires: %{reqdb_pkg} >= %{reqdb_ver}}
-%{?with_system_libmagic:Requires:      libmagic >= 1.15-2}
-%{?with_selinux:Requires:      libselinux >= 1.18}
-Requires:      ossp-uuid >= 1.6.2-4
-Requires:      popt >= %{reqpopt_ver}
-%{?with_internal_db:%{?with_nptl:Requires:     uname(release) >= 2.6.0}}
-Requires:      zlib >= 1.2.3.3
-%{?with_suggest_tags:Suggests: xz}
+Requires:      db >= %{db_ver}
+Requires:      libmagic >= 1.15-2
+Requires:      popt >= %{popt_ver}
 Obsoletes:     rpm-libs
 Obsoletes:     rpm-libs
-# avoid installing with incompatible (non-tukaani) lzma
-# avoid incompatible (-M0 not supported) lzma
-Conflicts:     lzma < 1:4.999.5-0.alpha.2
 # avoid SEGV caused by mixed db versions
 Conflicts:     poldek < 0.18.1-16
 
 # avoid SEGV caused by mixed db versions
 Conflicts:     poldek < 0.18.1-16
 
@@ -333,17 +243,19 @@ Summary(pt_BR.UTF-8):     Arquivos de inclusão e bibliotecas para programas de mani
 Summary(ru.UTF-8):     Хедеры и библиотеки для программ, работающих с rpm-пакетами
 Summary(uk.UTF-8):     Хедери та бібліотеки для програм, що працюють з пакетами rpm
 Group:         Development/Libraries
 Summary(ru.UTF-8):     Хедеры и библиотеки для программ, работающих с rpm-пакетами
 Summary(uk.UTF-8):     Хедери та бібліотеки для програм, що працюють з пакетами rpm
 Group:         Development/Libraries
-Requires:      %{name}-lib = %{version}-%{release}
-Requires:      beecrypt-devel >= %{beecrypt_ver}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 Requires:      bzip2-devel
 Requires:      bzip2-devel
-%{!?with_internal_db:Requires: %{reqdb_pkg}-devel >= %{reqdb_ver}}
+Requires:      db-devel >= %{db_ver}
 Requires:      elfutils-devel
 Requires:      elfutils-devel
-Requires:      keyutils-devel
-%{?with_system_libmagic:Requires:      libmagic-devel}
-%{?with_selinux:Requires:      libselinux-devel}
-Requires:      ossp-uuid-devel >= 1.6.2-6
-Requires:      popt-devel >= %{reqpopt_ver}
-Requires:      zlib-devel >= 1.2.3.3
+Requires:      libmagic-devel
+Requires:      libgcrypt-devel
+%if %{with selinux}
+Requires:      libselinux-devel
+Requires:      libsemanage-devel
+Requires:      libsepol-devel
+%endif
+Requires:      popt-devel >= %{popt_ver}
+Requires:      zlib-devel
 
 %description devel
 The RPM packaging system includes C libraries that make it easy to
 
 %description devel
 The RPM packaging system includes C libraries that make it easy to
@@ -390,53 +302,17 @@ ferramentas que precisem de conhecimento profundo de pacotes RPM.
 призначена для полегшення створення графічних пакетних менеджерів та
 інших утиліт, що працюють з пакетами RPM.
 
 призначена для полегшення створення графічних пакетних менеджерів та
 інших утиліт, що працюють з пакетами RPM.
 
-%package static
-Summary:       RPM static libraries
-Summary(de.UTF-8):     RPMs statische Libraries
-Summary(pl.UTF-8):     Biblioteki statyczne RPM-a
-Summary(pt_BR.UTF-8):  Bibliotecas estáticas para o desenvolvimento de aplicações RPM
-Summary(ru.UTF-8):     Статическая библиотека для программ, работающих с rpm-пакетами
-Summary(uk.UTF-8):     Статична бібліотека для програм, що працюють з пакетами rpm
-Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}-%{release}
-Requires:      beecrypt-static >= %{beecrypt_ver}
-Requires:      bzip2-static
-%{!?with_internal_db:Requires: %{reqdb_pkg}-static >= %{reqdb_ver}}
-Requires:      elfutils-static
-Requires:      keyutils-static
-%{?with_system_libmagic:Requires:      libmagic-static}
-Requires:      popt-static >= %{reqpopt_ver}
-Requires:      zlib-static >= 1.2.3.3
-
-%description static
-RPM static libraries.
-
-%description static -l de.UTF-8
-RPMs statische Libraries.
-
-%description static -l pl.UTF-8
-Biblioteki statyczne RPM-a.
-
-%description static -l pt_BR.UTF-8
-Bibliotecas estáticas para desenvolvimento.
-
-%description static -l ru.UTF-8
-Система управления пакетами RPM содержит библиотеку C, которая
-упрощает манипуляцию пакетами RPM и соответствующими базами данных.
-Это статическая библиотека RPM.
-
-%description static -l uk.UTF-8
-Система керування пакетами RPM містить бібліотеку C, котра спрощує
-роботу з пакетами RPM та відповідними базами даних. Це статична
-бібліотека RPM.
-
 %package utils
 Summary:       Additional utilities for managing RPM packages and database
 Summary(de.UTF-8):     Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
 Summary(pl.UTF-8):     Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
 Group:         Applications/File
 %package utils
 Summary:       Additional utilities for managing RPM packages and database
 Summary(de.UTF-8):     Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
 Summary(pl.UTF-8):     Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
-Requires:      popt >= %{reqpopt_ver}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      popt >= %{popt_ver}
+#%if %{with recommends_tags}
+#Recommends:   bzip2
+#Recommends:   gzip
+#%endif
 Conflicts:     filesystem-debuginfo < 3.0-16
 
 %description utils
 Conflicts:     filesystem-debuginfo < 3.0-16
 
 %description utils
@@ -448,42 +324,6 @@ Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken.
 %description utils -l pl.UTF-8
 Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami.
 
 %description utils -l pl.UTF-8
 Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami.
 
-%package utils-perl
-Summary:       Additional utilities for managing RPM packages and database
-Summary(de.UTF-8):     Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
-Summary(pl.UTF-8):     Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
-Group:         Applications/File
-Requires:      %{name}-utils = %{version}-%{release}
-Requires:      popt >= %{reqpopt_ver}
-
-%description utils-perl
-Additional utilities for managing RPM packages and database.
-
-%description utils-perl -l de.UTF-8
-Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken.
-
-%description utils-perl -l pl.UTF-8
-Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami.
-
-%package utils-static
-Summary:       Static rpm utilities
-Summary(pl.UTF-8):     Statyczne narzędzia rpm
-Group:         Applications/System
-Requires:      %{name} = %{version}-%{release}
-
-%description utils-static
-Static rpm utilities for repairing system in case something with
-shared libraries used by rpm become broken. Currently it contains rpmi
-binary, which can be used to install/upgrade/remove packages without
-using shared libraries (well, in fact with exception of NSS modules).
-
-%description utils-static -l pl.UTF-8
-Statyczne narzędzia rpm do naprawy systemu w przypadku zepsucia czegoś
-związanego z bibliotekami współdzielonymi używanymi przez rpm-a.
-Aktualnie pakiet zawiera binarkę rpmi, którą można użyć do instalacji,
-uaktualniania lub usuwania pakietów bez udziału bibliotek statycznych
-(z wyjątkiem modułów NSS).
-
 %package build
 Summary:       Scripts for building binary RPM packages
 Summary(de.UTF-8):     Scripts fürs Bauen binärer RPM-Pakete
 %package build
 Summary:       Scripts for building binary RPM packages
 Summary(de.UTF-8):     Scripts fürs Bauen binärer RPM-Pakete
@@ -492,9 +332,10 @@ Summary(pt_BR.UTF-8):      Scripts e programas executáveis usados para construir pac
 Summary(ru.UTF-8):     Скрипты и утилиты, необходимые для сборки пакетов
 Summary(uk.UTF-8):     Скрипти та утиліти, необхідні для побудови пакетів
 Group:         Applications/File
 Summary(ru.UTF-8):     Скрипты и утилиты, необходимые для сборки пакетов
 Summary(uk.UTF-8):     Скрипти та утиліти, необхідні для побудови пакетів
 Group:         Applications/File
+Requires(pretrans):    coreutils
 Requires(pretrans):    findutils
 Requires(pretrans):    findutils
-Requires:      %{name}-tld-macros-build >= 1.744-3
-Requires:      %{name}-utils = %{version}-%{release}
+Requires:      %{name}-utils = %{epoch}:%{version}-%{release}
+Requires:      rpm-tld-macros-build >= 1.744
 Requires:      /bin/id
 Requires:      awk
 Requires:      bzip2
 Requires:      /bin/id
 Requires:      awk
 Requires:      bzip2
@@ -505,19 +346,22 @@ Requires: elfutils
 Requires:      file >= 4.17
 Requires:      fileutils
 Requires:      findutils
 Requires:      file >= 4.17
 Requires:      fileutils
 Requires:      findutils
-# rpmrc patch adds flags specific to gcc >= 4.7
-Requires:      gcc >= 6:4.7.0
+%ifarch athlon
+Requires:      gcc >= 3.0.3
+%else
+Requires:      gcc
+%endif
 Requires:      glibc-devel
 Requires:      grep
 Requires:      gzip
 Requires:      make
 Requires:      patch
 Requires:      glibc-devel
 Requires:      grep
 Requires:      gzip
 Requires:      make
 Requires:      patch
-Requires:      sed
+Requires:      sed >= 4.0
 Requires:      sh-utils
 Requires:      sh-utils
-Requires:      tar
+Requires:      tar >= 1:1.22
 Requires:      textutils
 Requires:      textutils
+Requires:      which
 Requires:      xz
 Requires:      xz
-Provides:      rpmbuild(monoautodeps)
 Provides:      rpmbuild(noauto) = 3
 %ifarch %{x8664}
 Conflicts:     automake < 1:1.7.9-2
 Provides:      rpmbuild(noauto) = 3
 %ifarch %{x8664}
 Conflicts:     automake < 1:1.7.9-2
@@ -550,7 +394,8 @@ Summary:    Additional utilities for checking Perl provides/requires in RPM package
 Summary(de.UTF-8):     Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
 Summary(pl.UTF-8):     Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w pakietach RPM
 Group:         Applications/File
 Summary(de.UTF-8):     Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
 Summary(pl.UTF-8):     Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w pakietach RPM
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      perl-Encode
 Requires:      perl-devel
 Requires:      perl-modules
 
 Requires:      perl-devel
 Requires:      perl-modules
 
@@ -569,9 +414,10 @@ pakietach RPM.
 Summary:       Python macros, which simplifies creation of RPM packages with Python software
 Summary(pl.UTF-8):     Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Pythonie
 Group:         Applications/File
 Summary:       Python macros, which simplifies creation of RPM packages with Python software
 Summary(pl.UTF-8):     Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Pythonie
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
-Requires:      python
-Requires:      python-modules
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      python3
+Requires:      python3-modules
+Requires:      python3-setuptools
 
 %description pythonprov
 Python macros, which simplifies creation of RPM packages with Python
 
 %description pythonprov
 Python macros, which simplifies creation of RPM packages with Python
@@ -581,42 +427,106 @@ software.
 Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w
 Pythonie.
 
 Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w
 Pythonie.
 
-%package -n python-rpm
-Summary:       Python interface to RPM library
-Summary(pl.UTF-8):     Pythonowy interfejs do biblioteki RPM-a
-Summary(pt_BR.UTF-8):  Módulo Python para aplicativos que manipulam pacotes RPM
+%package -n python3-rpm
+Summary:       Python interface to RPM library
+Summary(pl.UTF-8):     Interfejs Pythona 3 do biblioteki RPM-a
+Summary(pt_BR.UTF-8):  Módulo Python para aplicativos que manipulam pacotes RPM
 Group:         Development/Languages/Python
 Group:         Development/Languages/Python
-Requires:      %{name} = %{version}-%{release}
-%pyrequires_eq python
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      python3
+Obsoletes:     python-rpm < 1:4.16.0
 Obsoletes:     rpm-python
 
 Obsoletes:     rpm-python
 
-%description -n python-rpm
-The rpm-python package contains a module which permits applications
-written in the Python programming language to use the interface
+%description -n python3-rpm
+The python3-rpm package contains a module which permits applications
+written in the Python programming language to use the interface
 supplied by RPM (RPM Package Manager) libraries.
 
 supplied by RPM (RPM Package Manager) libraries.
 
-This package should be installed if you want to develop Python
+This package should be installed if you want to develop Python 3
 programs that will manipulate RPM packages and databases.
 
 programs that will manipulate RPM packages and databases.
 
-%description -n python-rpm -l pl.UTF-8
-Pakiet rpm-python zawiera moduł, który pozwala aplikacjom napisanym w
-Pythonie na używanie interfejsu dostarczanego przez biblioteki RPM-a.
+%description -n python3-rpm -l pl.UTF-8
+Pakiet python3-rpm zawiera moduł, który pozwala aplikacjom napisanym w
+Pythonie 3 na używanie interfejsu dostarczanego przez biblioteki
+RPM-a.
 
 Pakiet ten powinien zostać zainstalowany, jeśli chcesz pisać w
 
 Pakiet ten powinien zostać zainstalowany, jeśli chcesz pisać w
-Pythonie programy manipulujące pakietami i bazami danych rpm.
+Pythonie programy manipulujące pakietami i bazami danych rpm.
 
 
-%description -n python-rpm -l pt_BR.UTF-8
-O pacote rpm-python contém um módulo que permite que aplicações
-escritas em Python utilizem a interface fornecida pelas bibliotecas
+%description -n python3-rpm -l pt_BR.UTF-8
+O pacote python3-rpm contém um módulo que permite que aplicações
+escritas em Python utilizem a interface fornecida pelas bibliotecas
 RPM (RPM Package Manager).
 
 Esse pacote deve ser instalado se você quiser desenvolver programas em
 RPM (RPM Package Manager).
 
 Esse pacote deve ser instalado se você quiser desenvolver programas em
-Python para manipular pacotes e bancos de dados RPM.
+Python 3 para manipular pacotes e bancos de dados RPM.
+
+%package plugin-audit
+Summary:       Plugin for logging audit events on package operations
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-audit
+Plugin for libaudit support
+
+%package plugin-syslog
+Summary:       Plugin for syslog functionality
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-syslog
+This plugin exports RPM actions to the system log.
+
+%package plugin-systemd-inhibit
+Summary:       Plugin for systemd inhibit functionality
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-systemd-inhibit
+This plugin blocks systemd from entering idle, sleep or shutdown while
+an rpm transaction is running using the systemd-inhibit mechanism.
+
+%package plugin-ima
+Summary:       Plugin for IMA file signatures
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-ima
+This plugin adds support for enforcing and verifying IMA file
+signatures in an rpm.
+
+%package plugin-prioreset
+Summary:       Plugin for resetting scriptlet priorities for SysV init
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-prioreset
+This plugin is useful on legacy SysV init systems if you run rpm
+transactions with nice/ionice priorities. Should not be used on
+systemd systems.
+
+%package plugin-selinux
+Summary:       Plugin for SELinux functionality
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+Requires:      libselinux >= 2.1.0
+
+%description plugin-selinux
+Plugin for SELinux functionality.
+
+%package sign
+Summary:       Package signing support
+Group:         Base
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description sign
+This package contains support for digitally signing RPM packages.
 
 %package apidocs
 Summary:       RPM API documentation and guides
 Summary(pl.UTF-8):     Documentacja API RPM-a i przewodniki
 Group:         Documentation
 
 %package apidocs
 Summary:       RPM API documentation and guides
 Summary(pl.UTF-8):     Documentacja API RPM-a i przewodniki
 Group:         Documentation
+BuildArch:     noarch
 
 %description apidocs
 Documentation for RPM API and guides in HTML format generated from rpm
 
 %description apidocs
 Documentation for RPM API and guides in HTML format generated from rpm
@@ -627,175 +537,48 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 źrodeł RPM-a przez doxygen.
 
 %prep
 źrodeł RPM-a przez doxygen.
 
 %prep
-%setup -q
-cp -p %{SOURCE15} .
-%patch1000 -p1
-%patch2 -p1
+%setup -q -n %{name}-%{version}%{?subver}
+%patch0 -p1
 %patch1 -p1
 %patch1 -p1
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch3 -p1
 %patch4 -p1
-%patch6 -p1
+%patch6 -p0
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
-%patch11 -p1 -R
+%patch11 -p1
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 %patch16 -p1
 %patch17 -p1
 %patch16 -p1
 %patch17 -p1
-sed -e 's/^/@tld@/' %{SOURCE2} >>platform.in
-echo '%%define __mono_provides /usr/lib/rpm/mono-find-provides' > macros.mono
-echo '%%define __mono_requires /usr/lib/rpm/mono-find-requires' >> macros.mono
-install %{SOURCE13} scripts/perl.prov
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
 %patch21 -p1
 %patch22 -p1
 %patch21 -p1
 %patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch27 -p1
-%patch28 -p1
-%patch29 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch36 -p1
-%patch37 -p1
-%patch39 -p1
-%patch40 -p1
-%patch42 -p1
-%patch43 -p1
-%patch82 -p1
-%{!?with_neon:%patch44 -p1}
-%patch45 -p1
-%patch48 -p1
-%patch50 -p1
-%patch20 -p1
-%patch35 -p1
-%patch51 -p1
-%patch55 -p1
-%patch56 -p1
-%patch57 -p1
-%patch58 -p1
-%patch59 -p1
-%patch61 -p1
-%patch62 -p1
-%patch63 -p1
-%patch64 -p1
-%patch65 -p1
-%patch66 -p1
-%patch67 -p1
-%patch69 -p1
-%patch71 -p1
-%patch72 -p1
-%patch73 -p1
-%patch74 -p1
-%patch75 -p0
-%patch77 -p0
-%patch79 -p1
-%patch80 -p1
-%patch83 -p1
-%patch84 -p1
-%patch85 -p1
-%patch86 -p1
-%patch70 -p0
-%patch87 -p1
-%patch88 -p1
-%patch89 -p1
-%patch90 -p1
-%patch91 -p1
-%patch92 -p1
-%patch93 -p1
-%patch94 -p1
-%patch95 -p1
-%patch96 -p1
-%patch97 -p1
-%patch98 -p1
-%patch99 -p1
-%patch53 -p1
-%patch100 -p1
-%patch101 -p1
-%patch102 -p1
-%patch103 -p1
-%patch104 -p1
-%patch105 -p1
-%patch106 -p1
-%patch107 -p1
-%patch108 -p1
-%patch109 -p1
-%patch110 -p1
-%patch111 -p1
-%patch112 -p1
-%patch113 -p1
-%patch114 -p1
-%patch115 -p1
-%patch116 -p1
-%patch117 -p1
-%patch118 -p1
-%patch119 -p1
-%patch120 -p1
-%patch121 -p1
-
-mv -f po/{sr,sr@Latn}.po
-rm -rf sqlite zlib popt
-
-%if %{with internal_db}
-%if %{without nptl}
-sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' db/dist/aclocal/mutex.ac
-%endif
-%patch78 -p1
-%patch81 -p1
-%else
-%patch15 -p1
-rm -rf db3 db rpmdb/db.h
-%endif
+
+install %{SOURCE15} scripts/perl.prov.in
+
+%{__mv} -f scripts/perl.req{,.in}
 
 # generate Group translations to *.po
 
 # generate Group translations to *.po
-awk -f %{SOURCE6} %{SOURCE1}
+awk -f %{SOURCE6} %{SOURCE5}
 
 
-# update macros paths
-for f in doc{,/ja,/pl}/rpm.8 doc{,/ja,/pl}/rpmbuild.8 ; do
-       sed -e 's@lib/rpm/redhat@lib/rpm/tld@g' $f > ${f}.tmp
-       mv -f ${f}.tmp $f
-done
+install %{SOURCE16} tools/rpmdb_checkversion.c
+install %{SOURCE17} tools/rpmdb_reset.c
 
 
-%build
-%if %{with system_libmagic}
-rm -rf file
-%else
-cd file
-%{__libtoolize}
-%{__aclocal}
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-cd ..
-%endif
+%{__sed} -i -e '1s,/usr/bin/python,%{__python3},' scripts/pythondistdeps.py
 
 
+%build
 %{__libtoolize}
 %{__libtoolize}
-%{__gettextize}
 %{__aclocal}
 %{__autoheader}
 %{__autoconf}
 %{__automake}
 %{__aclocal}
 %{__autoheader}
 %{__autoconf}
 %{__automake}
-%if %{with internal_db}
-cd db3
-echo -e 'AC_CONFIG_AUX_DIR(.)\nAC_PROG_LIBTOOL'> configure.ac
-%{__libtoolize}
-rm -f configure.ac
-cd ../db
-cp -f /usr/share/aclocal/libtool.m4 dist/aclocal/libtool.ac
-cp -f /usr/share/automake/config.sub dist
-if [ -f /usr/share/libtool/config/ltmain.sh ]; then
-       cp -f /usr/share/libtool/config/ltmain.sh dist
-else
-       cp -f /usr/share/libtool/ltmain.sh dist
-fi
-cd ..
-%endif
 
 # rpm checks for CPU type at runtime, but it looks better
 sed -i \
 
 # rpm checks for CPU type at runtime, but it looks better
 sed -i \
@@ -804,267 +587,177 @@ sed -i \
        -e 's|@host_os@|%{_target_os}|' \
        macros.in
 
        -e 's|@host_os@|%{_target_os}|' \
        macros.in
 
-# pass CC and CXX too in case of building with some older configure macro
-# disable perl-RPM2 build, we have it in separate spec
-CPPFLAGS="%{rpmcppflags} -I/usr/include/ossp-uuid -I/usr/include/%{reqdb_pkg}"
 %configure \
 %configure \
-       CC="%{__newcc}" \
-       CXX="%{__newcxx}" \
-       CPP="%{__newcpp}" \
        WITH_PERL_VERSION=no \
        WITH_PERL_VERSION=no \
-       %{?with_autoreqdep:--enable-adding-packages-names-in-autogenerated-dependancies} \
+       __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \
+       __GPG=%{_bindir}/gpg \
+%if %{with python3}
+       PYTHON=python3 \
+       --enable-python \
+%endif
+       --disable-silent-rules \
        --enable-shared \
        --enable-shared \
-       --enable-static \
-       %{!?with_apidocs:--without-apidocs} \
-       %{?with_python:--with-python=%{py_ver}} \
-       %{!?with_python:--without-python} \
-       %{!?with_selinux:--without-selinux} \
-       %{?with_internal_db:--%{?with_nptl:en}%{!?with_nptl:dis}able-posixmutexes} \
-       --without-db
-
-%{__make} \
-       CC="%{__cc}" \
-       CXX="%{__cxx}" \
-       CPP="%{__cpp}" \
-       libdb_la=%{_libdir}/libdb-%(echo %{reqdb_pkg} | sed -e 's/^db//').la \
-       pylibdir=%{py_libdir} \
-       myLDFLAGS="%{rpmldflags}" \
-       staticLDFLAGS=%{?with_static:-all-static}
+       --enable-bdb \
+       --enable-ndb \
+       --enable-sqlite \
+       --enable-zstd \
+       --with-lua \
+       %{?with_imaevm:--with-imaevm} \
+       --with-cap \
+       --with-acl \
+       --with-audit \
+       --with-archive \
+       --with-selinux=%{!?with_plugins:no}%{?with_plugins:yes} \
+       %{!?with_plugins:--disable-plugins} \
+       --with-vendor=tld
+
+%{__make}
+
+%{__cc} %{rpmcflags} tools/rpmdb_checkversion.c -o tools/rpmdb_checkversion -ldb
+%{__cc} %{rpmcflags} tools/rpmdb_reset.c -o tools/rpmdb_reset -ldb
+
+if tools/rpmdb_checkversion -V 2>&1 | grep "t match library version"; then
+       echo "Error linking rpmdb tools!"
+       exit 1
+fi
+if tools/rpmdb_reset -V 2>&1 | grep "t match library version"; then
+       echo "Error linking rpmdb tools!"
+       exit 1
+fi
+
+%if %{with python3}
+cd python
+%py3_build
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/%{_lib},/etc/{sysconfig,tmpwatch},%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
-install -d $RPM_BUILD_ROOT%{_rpmlibdir}/macros.d
+install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/{rpm,pki/rpm-gpg}} \
+       $RPM_BUILD_ROOT{/var/lib/{banner,rpm},/var/cache/hrmib}
 
 %{__make} install \
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT \
-       staticLDFLAGS=%{?with_static:-all-static} \
-       pylibdir=%{py_libdir}
-
-cat <<'EOF' > $RPM_BUILD_ROOT/etc/tmpwatch/rpm.conf
-# Cleanup 90-days old repackage files.
-/var/spool/repackage 2160
-EOF
-
-cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
-# first platform file entry can't contain regexps
-%{_target_cpu}-%{_target_vendor}-linux
-
-%ifarch %{x8664}
-amd64-[^-]*-[Ll]inux(-gnu)?
-x86_64-[^-]*-[Ll]inux(-gnu)?
+       pkgconfigdir=%{_pkgconfigdir} \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# cleanup
+%ifnarch %{ix86} %{x8664} x32
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/geode-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i386-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i486-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i586-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i686-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium3-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium4-linux/macros
 %endif
 %endif
-%ifarch i686 %{x8664}
-i686-[^-]*-[Ll]inux(-gnu)?
-%endif
-%ifarch i586 i686 %{x8664}
-i586-[^-]*-[Ll]inux(-gnu)?
+
+%ifnarch %{x8664} x32
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/amd64-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia32e-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x32-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64-linux/macros
 %endif
 %endif
-%ifarch i486 i586 i686 %{x8664}
-i486-[^-]*-[Ll]inux(-gnu)?
+
+%ifnarch %{ppc}
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/m68k-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc32dy4-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc64*-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8260-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8560-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc*series-linux/macros
 %endif
 %endif
-%ifarch %{ix86} %{x8664}
-i386-[^-]*-[Ll]inux(-gnu)?
+
+%ifnarch aarch64
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/aarch64-linux/macros
 %endif
 
 %endif
 
-# noarch
-noarch-[^-]*-.*
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/alpha*-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/arm*-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia64-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/mips*-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/riscv64-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/s390*-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sh*-linux/macros
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros
+
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
+%ifarch x32
+%{_target_cpu}-%{_target_vendor}-linux-gnux32
+%else
+%{_target_cpu}-%{_target_vendor}-linux
+%endif
 EOF
 
 EOF
 
-rm $RPM_BUILD_ROOT%{_rpmlibdir}/vpkg-provides*
-rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{prov,req}.pl
-rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{provides,requires}.perl
-rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
-
-# not installed since 4.4.8 (-tools-perl subpackage)
-install -p scripts/rpmdiff scripts/rpmdiff.cgi $RPM_BUILD_ROOT%{_rpmlibdir}
-
-cp -a macros.mono      $RPM_BUILD_ROOT%{_rpmlibdir}/macros.mono
-cp -a %{SOURCE19}      $RPM_BUILD_ROOT%{_rpmlibdir}/macros.gstreamer
-
-install -p %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
-install -p %{SOURCE14} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
-install -p %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache
-install -p %{SOURCE18} $RPM_BUILD_ROOT%{_bindir}/banner.sh
-cp -p %{name}.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/rpm
-
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo
-touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Conflictname
-touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Dirnames
-cp -a %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Filelinktos
-touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Obsoletename
-touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Providename
-touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Requirename
-
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <<EOF
-# customized rpm macros - global for host
-#
-%%distribution TLD
-#
-# remove or replace with file_contexts path if you want to use custom
-# SELinux file contexts policy instead of one stored in packages payload
-%%_install_file_context_path   %%{nil}
-%%_verify_file_context_path    %%{nil}
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
 
 
-# If non-zero, all erasures will be automagically repackaged.
-#%%_repackage_all_erasures     0
+install -d $RPM_BUILD_ROOT%{_rpmlibdir}/tld
 
 
-# If non-zero, create debuginfo packages
-#%%_enable_debug_packages      0
+cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
+cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
+cp -p %{SOURCE8} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rpm
 
 
-# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
-# marked as %doc should be installed.
-#%%_excludedocs   1
+cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/banner.sh
 
 
-# For static /dev not to update perms if upgraded and tmpfs mounted
-#%%_netsharedpath /dev/shm
-EOF
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.lang
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprov
+cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles
+cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreq
+cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles
 
 
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.lang <<EOF
-# Customized rpm macros - global for host
-#      A colon separated list of desired locales to be installed;
-#      "all" means install all locale specific files.
-#
-#%%_install_langs pl_PL:en_US
-EOF
-
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles <<EOF
-# global list of files (regexps) which don't generate Provides
-EOF
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprov <<EOF
-# global list of script capabilities (regexps) not to be used in Provides
-EOF
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles <<EOF
-# global list of files (regexps) which don't generate Requires
-^%{_examplesdir}/
-^%{_docdir}/
-EOF
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreq <<EOF
-# global list of script capabilities (regexps) not to be used in Requires
-EOF
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqdep <<EOF
-# global list of capabilities (SONAME, perl(module), php(module) regexps)
-# which don't generate dependencies on package NAMES
-# -- OpenGL implementation
-^libGL.so.1
-^libGLU.so.1
-^libOSMesa.so
-# -- Glide
-^libglide3.so.3
-# -- mozilla
-^libgtkmozembed.so
-^libgtksuperwin.so
-^libxpcom.so
-# -- X11 implementation
-^libFS.so
-^libI810XvMC.so
-^libICE.so
-^libSM.so
-^libX11.so
-^libXRes.so
-^libXTrap.so
-^libXaw.so
-^libXcomposite.so
-^libXcursor.so
-^libXdamage.so
-^libXdmcp.so
-^libXevie.so
-^libXext.so
-^libXfixes.so
-^libXfont.so
-^libXfontcache.so
-^libXft.so
-^libXi.so
-^libXinerama.so
-^libXmu.so
-^libXmuu.so
-^libXp.so
-^libXpm.so
-^libXrandr.so
-^libXrender.so
-^libXss.so
-^libXt.so
-^libXtst.so
-^libXv.so
-^libXvMC.so
-^libXxf86dga.so
-^libXxf86misc.so
-^libXxf86rush.so
-^libXxf86vm.so
-^libdps.so
-^libdpstk.so
-^libfontenc.so
-^libpsres.so
-^libxkbfile.so
-^libxkbui.so
-# -- fam / gamin
-^libfam.so.0
-# -- mdns-bonjour: mDNSResponder-libs / avahi-compat-libdns_sd
-^libdns_sd.so.1
-EOF
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautocompressdoc <<EOF
-# global list of file masks not to be compressed in DOCDIR
-EOF
-
-# for rpm -e|-U --repackage
-install -d $RPM_BUILD_ROOT/var/{spool/repackage,lock/rpm}
-touch $RPM_BUILD_ROOT/var/lock/rpm/transaction
+cp -p tools/rpmdb_checkversion $RPM_BUILD_ROOT%{_rpmlibdir}/
+cp -p tools/rpmdb_reset $RPM_BUILD_ROOT%{_rpmlibdir}/
+cp -p %{SOURCE18} $RPM_BUILD_ROOT%{_rpmlibdir}/dbupgrade.sh
 
 # move rpm to /bin
 
 # move rpm to /bin
-install -d $RPM_BUILD_ROOT/bin
-mv $RPM_BUILD_ROOT%{_bindir}/rpm $RPM_BUILD_ROOT/bin
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/rpm $RPM_BUILD_ROOT/bin
+ln -sf /bin/rpm $RPM_BUILD_ROOT%{_bindir}/rpmquery
+ln -sf /bin/rpm $RPM_BUILD_ROOT%{_bindir}/rpmverify
+
 # move essential libs to /lib (libs that /bin/rpm links to)
 # move essential libs to /lib (libs that /bin/rpm links to)
-for a in librpm-%{sover}.so librpmdb-%{sover}.so librpmio-%{sover}.so ; do
-       mv -f $RPM_BUILD_ROOT%{_libdir}/$a $RPM_BUILD_ROOT/%{_lib}
-       ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
+for a in librpm.so librpmbuild.so librpmio.so librpmsign.so; do
+       mv -f $RPM_BUILD_ROOT%{_libdir}/${a}.* $RPM_BUILD_ROOT/%{_lib}
+       ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${a}.*.*.*) $RPM_BUILD_ROOT%{_libdir}/${a}
 done
 
 done
 
-# remove arch dependant macros which have no use on noarch
-%{__sed} -i -e '
-/{__spec_install_post_strip}/d
-/{__spec_install_post_chrpath}/d
-/{__spec_install_post_compress_modules}/d
-' $RPM_BUILD_ROOT%{_rpmlibdir}/noarch-linux/macros
+# Make sure we have bdb set a default backend
+grep -qE "db_backend[[:blank:]]+bdb" $RPM_BUILD_ROOT%{_rpmlibdir}/macros
 
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%if %{with python3}
+# Remove anything that rpm make install might put there
+%{__rm} -rf $RPM_BUILD_ROOT%{py3_sitedir}
+cd python
+%py3_install
+cd ..
+%endif
 
 
-rm -f $RPM_BUILD_ROOT%{py_sitedir}/rpm/*.{la,a,py}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la
 
 
-# (currently) not used or supported in TLD
-%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/{http.req,perldeps.pl}
 # wrong location, not used anyway
 # wrong location, not used anyway
-%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log,xinetd}
-
-# unpackaged in 4.4.9, reasons unknown
-%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/symclash.{sh,py}
-%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/RPM.pm
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RPM/.packlist
-%{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RPM/RPM.bs
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RPM/RPM.so
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/RPM.3pm
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/{,ja,pl}/man8/rpm{cache,graph}.8
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log}
 
 %find_lang %{name}
 
 
 %find_lang %{name}
 
-rm -rf manual
-cp -a doc/manual manual
-cp -a %{SOURCE1} manual/groups
-rm -f manual/Makefile*
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%triggerpostun lib -- %{name}-lib < %{version}
-echo >&2 "rpm-lib upgrade: Removing /var/lib/rpm/__db* from older rpmdb version"
-rm -f /var/lib/rpm/__db*
-echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
-
-%triggerpostun lib -- db4.7 < %{reqdb_ver}
-echo >&2 "db4.7 upgrade: Removing /var/lib/rpm/__db* from older rpmdb version"
-rm -f /var/lib/rpm/__db*
-echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
+%posttrans
+if [ -e /var/lib/rpm/Packages ] && \
+               ! %{_rpmlibdir}/rpmdb_checkversion -h /var/lib/rpm -d /var/lib/rpm; then
+       if [ ! -e /var/lib/rpm.rpmbackup-%{version}-%{release} ] && \
+                       /bin/cp -a /var/lib/rpm /var/lib/rpm.rpmbackup-%{version}-%{release}; then
+               echo
+               echo "Backup of the rpm database has been created in /var/lib/rpm.rpmbackup-%{version}-%{release}"
+               echo
+       fi
+       echo
+       echo 'If poldek aborts after migration with rpmdb error, this is expected behaviour,'
+       echo 'you should ignore it and restart poldek'
+       echo
+       %{_rpmlibdir}/dbupgrade.sh
+fi
 
 %triggerpostun -- %{name} < 4.4.9-44
 %{_rpmlibdir}/hrmib-cache
 
 %triggerpostun -- %{name} < 4.4.9-44
 %{_rpmlibdir}/hrmib-cache
@@ -1077,20 +770,24 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc CHANGES CREDITS README manual/*
+%doc ChangeLog CREDITS README
 
 %attr(755,root,root) /bin/rpm
 
 %attr(755,root,root) /bin/rpm
+%attr(755,root,root) %{_bindir}/rpmdb
+%attr(755,root,root) %{_bindir}/rpmkeys
+%attr(755,root,root) %{_bindir}/rpmquery
+%attr(755,root,root) %{_bindir}/rpmverify
 
 
-%config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/rpm.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
-%dir %{_sysconfdir}/rpm/sysinfo
-# these are ok to be replaced
-%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/sysinfo/*
+# this is ok to be replaced
 %config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform
 
 %config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform
 
-
 %{_mandir}/man8/rpm.8*
 %{_mandir}/man8/rpm.8*
+%{_mandir}/man8/rpmdb.8*
+%{_mandir}/man8/rpmkeys.8*
+%{_mandir}/man8/rpm-misc.8*
+%{?with_plugins:%{_mandir}/man8/rpm-plugins.8*}
 %lang(fr) %{_mandir}/fr/man8/rpm.8*
 %lang(ja) %{_mandir}/ja/man8/rpm.8*
 %lang(ko) %{_mandir}/ko/man8/rpm.8*
 %lang(fr) %{_mandir}/fr/man8/rpm.8*
 %lang(ja) %{_mandir}/ja/man8/rpm.8*
 %lang(ko) %{_mandir}/ko/man8/rpm.8*
@@ -1099,20 +796,61 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %lang(sk) %{_mandir}/sk/man8/rpm.8*
 
 %dir /var/lib/rpm
 %lang(sk) %{_mandir}/sk/man8/rpm.8*
 
 %dir /var/lib/rpm
-%dir %attr(700,root,root) /var/spool/repackage
-%dir /var/lock/rpm
-/var/lock/rpm/transaction
 
 # exported package NVRA (stamped with install tid)
 # net-snmp hrSWInstalledName queries, bash-completions
 %dir /var/cache/hrmib
 
 %{_rpmlibdir}/rpmpopt*
 
 # exported package NVRA (stamped with install tid)
 # net-snmp hrSWInstalledName queries, bash-completions
 %dir /var/cache/hrmib
 
 %{_rpmlibdir}/rpmpopt*
+%{_rpmlibdir}/rpmrc
 %{_rpmlibdir}/macros
 %dir %{_rpmlibdir}/macros.d
 %{_rpmlibdir}/macros
 %dir %{_rpmlibdir}/macros.d
+%dir %{_rpmlibdir}/platform
+%{_rpmlibdir}/platform/noarch-*
+%ifarch %{ix86} %{x8664} x32
+%{_rpmlibdir}/platform/athlon*
+%{_rpmlibdir}/platform/geode*
+%{_rpmlibdir}/platform/i?86*
+%{_rpmlibdir}/platform/pentium*
+%endif
+%ifarch %{x8664} x32
+%{_rpmlibdir}/platform/amd64*
+%{_rpmlibdir}/platform/ia32e*
+%{_rpmlibdir}/platform/x86_64*
+%{_rpmlibdir}/platform/x32*
+%endif
+%ifarch alpha
+%{_rpmlibdir}/platform/alpha*
+%endif
+%ifarch aarch64
+%{_rpmlibdir}/platform/aarch64*
+%endif
+%ifarch ia64
+%{_rpmlibdir}/platform/ia64*
+%endif
+%ifarch mips mipsel mips64 mips64el
+%{_rpmlibdir}/platform/mips*
+%endif
+%ifarch %{ppc}
+%{_rpmlibdir}/platform/ppc*
+%endif
+%ifarch sparc sparc64
+%{_rpmlibdir}/platform/sparc*
+%endif
+
+%dir %{_rpmlibdir}/tld
 
 %attr(755,root,root) %{_rpmlibdir}/hrmib-cache
 
 
 %attr(755,root,root) %{_rpmlibdir}/hrmib-cache
 
+%attr(755,root,root) %{_rpmlibdir}/dbupgrade.sh
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_checkversion
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_reset
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_dump
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_load
+
+# valgrind suppression file for rpm
+%{_rpmlibdir}/rpm.supp
+
 %files base
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/rpm
 %files base
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/rpm
@@ -1124,97 +862,107 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %files lib
 %defattr(644,root,root,755)
 
 %files lib
 %defattr(644,root,root,755)
-%attr(755,root,root) /%{_lib}/librpm-%{sover}.so
-%attr(755,root,root) /%{_lib}/librpmdb-%{sover}.so
-%attr(755,root,root) /%{_lib}/librpmio-%{sover}.so
-%attr(755,root,root) %{_libdir}/librpmbuild-%{sover}.so
+%attr(755,root,root) /%{_lib}/librpm.so.9
+%attr(755,root,root) /%{_lib}/librpm.so.%{sover}
+%attr(755,root,root) /%{_lib}/librpmbuild.so.9
+%attr(755,root,root) /%{_lib}/librpmbuild.so.%{sover}
+%attr(755,root,root) /%{_lib}/librpmio.so.9
+%attr(755,root,root) /%{_lib}/librpmio.so.%{sover}
+%attr(755,root,root) /%{_lib}/librpmsign.so.9
+%attr(755,root,root) /%{_lib}/librpmsign.so.%{sover}
+%{?with_plugins:%dir %{_libdir}/rpm-plugins}
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/librpm.so
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/librpm.so
-%attr(755,root,root) %{_libdir}/librpm-%{sover}.so
-%attr(755,root,root) %{_libdir}/librpmio.so
-%attr(755,root,root) %{_libdir}/librpmio-%{sover}.so
-%attr(755,root,root) %{_libdir}/librpmdb.so
-%attr(755,root,root) %{_libdir}/librpmdb-%{sover}.so
 %attr(755,root,root) %{_libdir}/librpmbuild.so
 %attr(755,root,root) %{_libdir}/librpmbuild.so
-%{_libdir}/librpm.la
-%{_libdir}/librpmbuild.la
-%{_libdir}/librpmdb.la
-%{_libdir}/librpmio.la
+%attr(755,root,root) %{_libdir}/librpmio.so
+%attr(755,root,root) %{_libdir}/librpmsign.so
+%{_libdir}/librpm*.la
 %{_includedir}/rpm
 %{_includedir}/rpm
-%{_pkgconfigdir}/rpm.pc
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/librpm.a
-%{_libdir}/librpmbuild.a
-%{_libdir}/librpmdb.a
-%{_libdir}/librpmio.a
+%{_pkgconfigdir}/*.pc
 
 %files utils
 %defattr(644,root,root,755)
 
 %files utils
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rpm2archive
 %attr(755,root,root) %{_bindir}/rpm2cpio
 %attr(755,root,root) %{_bindir}/rpm2cpio
-%attr(755,root,root) %{_bindir}/rpmdigest
-%attr(755,root,root) %{_bindir}/rpmmtree
-%attr(755,root,root) %{_bindir}/rpmrepo
-%{!?with_system_libmagic:%attr(755,root,root) %{_bindir}/rpmfile}
-%attr(755,root,root) %{_rpmlibdir}/debugedit
+%attr(755,root,root) %{_bindir}/rpmgraph
+%attr(755,root,root) %{_rpmlibdir}/rpm2cpio.sh
 %attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
 %attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
-%attr(755,root,root) %{_rpmlibdir}/rpmdb_loadcvt
-%attr(755,root,root) %{_rpmlibdir}/rpmdeps
 %attr(755,root,root) %{_rpmlibdir}/tgpg
 %attr(755,root,root) %{_rpmlibdir}/tgpg
+%attr(755,root,root) %{_rpmlibdir}/debugedit
+%attr(755,root,root) %{_rpmlibdir}/rpmdeps
+%{_mandir}/man8/rpm2archive.8*
 %{_mandir}/man8/rpm2cpio.8*
 %{_mandir}/man8/rpmdeps.8*
 %{_mandir}/man8/rpm2cpio.8*
 %{_mandir}/man8/rpmdeps.8*
+%{_mandir}/man8/rpmgraph.8*
 %lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
 %lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
 %lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
 %lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
 %lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
 %lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
-%lang(pl) %{_mandir}/pl/man8/rpmdeps.8*
 %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
 %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
-
-%files utils-perl
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_rpmlibdir}/rpmdiff*
-
-%if %{with static}
-%files utils-static
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/rpm[ieu]
-%attr(755,root,root) %{_rpmlibdir}/rpm[ieu]
-%endif
+%lang(pl) %{_mandir}/pl/man8/rpmdeps.8*
+%lang(ja) %{_mandir}/ja/man8/rpmgraph.8*
+%lang(pl) %{_mandir}/pl/man8/rpmgraph.8*
 
 %files build
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/noauto*
 %attr(755,root,root) %{_rpmlibdir}/brp-*
 %attr(755,root,root) %{_rpmlibdir}/check-files
 
 %files build
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/noauto*
 %attr(755,root,root) %{_rpmlibdir}/brp-*
 %attr(755,root,root) %{_rpmlibdir}/check-files
-%attr(755,root,root) %{_rpmlibdir}/cross-build
-%attr(755,root,root) %{_rpmlibdir}/getpo.sh
 %attr(755,root,root) %{_rpmlibdir}/install-build-tree
 %attr(755,root,root) %{_rpmlibdir}/install-build-tree
-%attr(755,root,root) %{_rpmlibdir}/u_pkg.sh
-%attr(755,root,root) %{_rpmlibdir}/executabledeps.sh
+%attr(755,root,root) %{_rpmlibdir}/elfdeps
 %attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
 %attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
+# needs hacked pkg-config to return anything
 %attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
 %attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
-%{_rpmlibdir}/noarch-*
-%ifarch %{ix86}
-%{_rpmlibdir}/i?86*
-%endif
-%ifarch %{x8664}
-%{_rpmlibdir}/amd64*
-%{_rpmlibdir}/x86_64*
-%endif
+%attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
+
+%attr(755,root,root) %{_rpmlibdir}/fontconfig.prov
 # must be here for "Requires: rpm-*prov" to work
 # must be here for "Requires: rpm-*prov" to work
-%{_rpmlibdir}/macros.gstreamer
-%{_rpmlibdir}/macros.mono
+#%{_rpmlibdir}/macros.d/cmake
+#%{_rpmlibdir}/macros.d/gstreamer
+#%{_rpmlibdir}/macros.d/libtool
+#%{_rpmlibdir}/macros.d/perl
+#%{_rpmlibdir}/macros.d/pkgconfig
+#%{_rpmlibdir}/macros.d/python
+#%{_rpmlibdir}/macros.d/selinux
+#%{_rpmlibdir}/macros.d/tcl
+#%{_rpmlibdir}/macros.rpmbuild
+
+%attr(755,root,root) %{_rpmlibdir}/check-buildroot
+%attr(755,root,root) %{_rpmlibdir}/check-prereqs
+%attr(755,root,root) %{_rpmlibdir}/check-rpaths
+%attr(755,root,root) %{_rpmlibdir}/check-rpaths-worker
+%attr(755,root,root) %{_rpmlibdir}/find-provides
+%attr(755,root,root) %{_rpmlibdir}/find-requires
+%attr(755,root,root) %{_rpmlibdir}/ocamldeps.sh
+%attr(755,root,root) %{_rpmlibdir}/script.req
+%attr(755,root,root) %{_rpmlibdir}/sepdebugcrcfix
+
+%dir %{_rpmlibdir}/fileattrs
+%{_rpmlibdir}/fileattrs/debuginfo.attr
+%{_rpmlibdir}/fileattrs/desktop.attr
+%{_rpmlibdir}/fileattrs/elf.attr
+%{_rpmlibdir}/fileattrs/font.attr
+%{_rpmlibdir}/fileattrs/libtool.attr
+%{_rpmlibdir}/fileattrs/metainfo.attr
+%{_rpmlibdir}/fileattrs/ocaml.attr
+%{_rpmlibdir}/fileattrs/perl.attr
+%{_rpmlibdir}/fileattrs/perllib.attr
+%{_rpmlibdir}/fileattrs/pkgconfig.attr
+%{_rpmlibdir}/fileattrs/python.attr
+%{_rpmlibdir}/fileattrs/pythondist.attr
+%{_rpmlibdir}/fileattrs/script.attr
 
 %attr(755,root,root) %{_bindir}/gendiff
 %attr(755,root,root) %{_bindir}/rpmbuild
 
 %attr(755,root,root) %{_bindir}/gendiff
 %attr(755,root,root) %{_bindir}/rpmbuild
+%attr(755,root,root) %{_bindir}/rpmspec
 
 %{_mandir}/man1/gendiff.1*
 
 %{_mandir}/man1/gendiff.1*
+%lang(pl) %{_mandir}/pl/man1/gendiff.1*
 %{_mandir}/man8/rpmbuild.8*
 %lang(ja) %{_mandir}/ja/man8/rpmbuild.8*
 %{_mandir}/man8/rpmbuild.8*
 %lang(ja) %{_mandir}/ja/man8/rpmbuild.8*
-%lang(pl) %{_mandir}/pl/man1/gendiff.1*
 %lang(pl) %{_mandir}/pl/man8/rpmbuild.8*
 %lang(pl) %{_mandir}/pl/man8/rpmbuild.8*
+%{_mandir}/man8/rpmspec.8*
 
 %files perlprov
 %defattr(644,root,root,755)
 
 %files perlprov
 %defattr(644,root,root,755)
@@ -1222,19 +970,57 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %files pythonprov
 %defattr(644,root,root,755)
 
 %files pythonprov
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_rpmlibdir}/pythondeps.sh
-%attr(755,root,root) %{_rpmlibdir}/pythoneggs.py
+%attr(755,root,root) %{_rpmlibdir}/pythondistdeps.py
 
 
-%if %{with python}
-%files -n python-rpm
+%if %{with python3}
+%files -n python3-rpm
 %defattr(644,root,root,755)
 %defattr(644,root,root,755)
-%dir %{py_sitedir}/rpm
-%attr(755,root,root) %{py_sitedir}/rpm/*.so
-%{py_sitedir}/rpm/*.py[co]
+%dir %{py3_sitedir}/rpm
+%attr(755,root,root) %{py3_sitedir}/rpm/*.so
+%{py3_sitedir}/rpm/*.py
+%{py3_sitedir}/rpm-%{version}-py*.egg-info
+%{py3_sitedir}/rpm/__pycache__
 %endif
 
 %endif
 
+%if %{with plugins}
+%files plugin-audit
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/audit.so
+%{_mandir}/man8/rpm-plugin-audit.8*
+
+%files plugin-syslog
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/syslog.so
+%{_mandir}/man8/rpm-plugin-syslog.8*
+
+%files plugin-systemd-inhibit
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/systemd_inhibit.so
+%{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
+
+%files plugin-ima
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/ima.so
+%{_mandir}/man8/rpm-plugin-ima.8*
+
+%files plugin-prioreset
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/prioreset.so
+%{_mandir}/man8/rpm-plugin-prioreset.8*
+
+%files plugin-selinux
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/selinux.so
+%{_mandir}/man8/rpm-plugin-selinux.8*
+%endif
+
+%files sign
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rpmsign
+%{_mandir}/man8/rpmsign.8*
+
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
-%doc apidocs
+%doc doc/librpm/html/*
 %endif
 %endif
index d370d97edb870e148af0d0ea2a2b54fba7e8bfe1..9ba62a953cfec1205ea3dde7d3391f8896d48a48 100644 (file)
@@ -11,16 +11,21 @@ RPM_USERDEL=yes
 # Should automatic restarts from rpm upgrades be skipped?
 # You can also disable this per service, if service supports it from
 # /etc/sysconfig/SERVICE
 # Should automatic restarts from rpm upgrades be skipped?
 # You can also disable this per service, if service supports it from
 # /etc/sysconfig/SERVICE
+# This is NOT used by %systemd_service_{restart,reload}. %systemd_post
+# issues try-restart unless package itself contains NORESTART or
+# %service macro before exists (maps value below to NORESTART). I.e.
+# %systemd_post honours this setting only after %service, while
+# %service-less packages would try-restart anyway.
 #RPM_SKIP_AUTO_RESTART=yes
 
 #RPM_SKIP_AUTO_RESTART=yes
 
-# Should package upgrades enable SysV service?
-# You don't want to disable this unless you're planning to fully
-# migrate to systemd or want serviceless system.
-RPM_ENABLE_SYSV_SERVICE=yes
-
 # Should package upgrades enable systemd service?
 # This means migrating init scripts from SysV to systemd.
 # If you disable this, systemd units will not be enabled for
 # Should package upgrades enable systemd service?
 # This means migrating init scripts from SysV to systemd.
 # If you disable this, systemd units will not be enabled for
-# upgraded services. Newly installed packages will still have
-# systemd services enabled.
+# *upgraded* services. Newly installed packages will follow
+# systemd presets.
+# This is used:
+# - if set to "no" while upgrading from systemd-units < 1:187-3,
+#   sets default.preset to "disable *" (one-time configuration:
+#   for newly installed packages),
+# - by %systemd_trigger (upgrade) disobeying systemd presets.
 RPM_ENABLE_SYSTEMD_SERVICE=yes
 RPM_ENABLE_SYSTEMD_SERVICE=yes
diff --git a/rpm.sysinfo b/rpm.sysinfo
deleted file mode 100644 (file)
index 71bed23..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/proc/self/fd
-/dev/fd/0
-/dev/fd/1
-/dev/fd/2
diff --git a/rpm5-db-compat.patch b/rpm5-db-compat.patch
new file mode 100644 (file)
index 0000000..6d8ec64
--- /dev/null
@@ -0,0 +1,15 @@
+--- rpm-4.15.1/lib/header.c~   2019-11-04 21:13:13.000000000 +0900
++++ rpm-4.15.1/lib/header.c    2019-12-31 19:48:06.709777565 +0900
+@@ -277,6 +277,12 @@
+     for (i = 0; i < il; i++) {
+       ei2h(&pe[i], &info);
++      /* XXX rpm5 compat: convert RPMTAG_FILESTATE to RPM_CHAR_TYPE. */
++      if (info.tag == RPMTAG_FILESTATES && info.type == RPM_INT8_TYPE) {
++          info.type = RPM_CHAR_TYPE;
++          pe[i].type = htonl(info.type);
++      }
++
+       /* Previous data must not overlap */
+       if (end > info.offset)
+           goto err;
diff --git a/rpmdb_checkversion.c b/rpmdb_checkversion.c
new file mode 100644 (file)
index 0000000..58a169c
--- /dev/null
@@ -0,0 +1,121 @@
+#include <sys/types.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <db.h>
+
+int    version_check __P((void));
+
+const char *progname = "rpmdb_checkversion";           /* Program name. */
+
+/*
+ * A very simple program to check for a Berkeley DB environment mismatch.
+ */
+int
+main(int argc, char *argv[])
+{
+       extern char *optarg;
+       extern int optind;
+       const char *data_dir, *home;
+       int ch, quiet;
+       DB_ENV *dbenv;
+       int ret;
+
+       if ((ret = version_check()) != 0)
+               return (EXIT_FAILURE);
+
+       /*
+        * All of the shared database files live in home, but
+        * data files will live in data_dir.
+        */
+       quiet = 0;
+       home = "/var/lib/rpm";
+       data_dir = "/var/lib/rpm";
+       while ((ch = getopt(argc, argv, "h:d:qV")) != EOF)
+               switch (ch) {
+               case 'h':
+                       home = optarg;
+                       break;
+               case 'd':
+                       data_dir = optarg;
+                       break;
+               case 'q':
+                       quiet = 1;
+                       break;
+               case 'V':
+                       printf("%s\n", db_version(NULL, NULL, NULL));
+                       return (EXIT_SUCCESS);
+               case '?':
+               default:
+                       (void)fprintf(stderr, "usage: %s [-h home] [-d data_dir]\n", progname);
+                       return (1);
+               }
+       argc -= optind;
+       argv += optind;
+
+       if (argc != 0) {
+               (void)fprintf(stderr, "usage: %s [-h home] [-d data_dir]\n", progname);
+               return (1);
+       }
+
+       /*
+        * Create an environment object and initialize it for error
+        * reporting.
+        */
+       if ((ret = db_env_create(&dbenv, 0)) != 0) {
+               if (!quiet)
+                       fprintf(stderr, "%s: %s\n", progname, db_strerror(ret));
+               return (1);
+       }
+       if (quiet) {
+               dbenv->set_errfile(dbenv, NULL);
+       } else {
+               dbenv->set_errfile(dbenv, stderr);
+       }
+       dbenv->set_errpfx(dbenv, progname);
+
+       /*
+        * We want to specify the shared memory buffer pool cachesize,
+        * but everything else is the default.
+        */
+       if ((ret = dbenv->set_cachesize(dbenv, 0, 64 * 1024, 0)) != 0) {
+               dbenv->err(dbenv, ret, "set_cachesize");
+               dbenv->close(dbenv, 0);
+               return (1);
+       }
+
+       /* Databases are in a subdirectory. */
+       (void)dbenv->set_data_dir(dbenv, data_dir);
+
+       /* Open the environment with full transactional support. */
+       ret = dbenv->open(dbenv, home, DB_INIT_MPOOL, 0644);
+       /* Close the environment handle. */
+       dbenv->close(dbenv, 0);
+#if 0
+       if (ret == DB_VERSION_MISMATCH) {
+#else
+       if (ret != 0) {
+#endif
+               return (1);
+       }
+
+       return (0);
+}
+
+int
+version_check()
+{
+       int v_major, v_minor, v_patch;
+
+       /* Make sure we're loaded with the right version of the DB library. */
+       (void)db_version(&v_major, &v_minor, &v_patch);
+       if (v_major != DB_VERSION_MAJOR || v_minor != DB_VERSION_MINOR) {
+               fprintf(stderr,
+                   "%s: version %d.%d doesn't match library version %d.%d\n",
+                   progname, DB_VERSION_MAJOR,
+                   DB_VERSION_MINOR, v_major, v_minor);
+               return (EXIT_FAILURE);
+       }
+       return (0);
+}
diff --git a/rpmdb_reset.c b/rpmdb_reset.c
new file mode 100644 (file)
index 0000000..431d7cb
--- /dev/null
@@ -0,0 +1,248 @@
+#include <sys/types.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <db.h>
+
+typedef struct {                       /* XXX: Globals. */
+       const char *progname;           /* Program name. */
+       char    *hdrbuf;                /* Input file header. */
+       u_long  lineno;                 /* Input file line number. */
+       u_long  origline;               /* Original file line number. */
+       int     endodata;               /* Reached the end of a database. */
+       int     endofile;               /* Reached the end of the input. */
+       int     version;                /* Input version. */
+       char    *home;                  /* Env home. */
+       char    *passwd;                /* Env passwd. */
+       int     private;                /* Private env. */
+       u_int32_t cache;                /* Env cache size. */
+} LDG;
+
+int    db_init __P((DB_ENV *, char *, u_int32_t, int *));
+int    env_create __P((DB_ENV **, LDG *));
+int    main __P((int, char *[]));
+int    usage __P((void));
+int    version_check __P((void));
+
+const char *progname = "rpmdb_reset";
+
+int
+main(argc, argv)
+       int argc;
+       char *argv[];
+{
+       enum { NOTSET, FILEID_RESET, LSN_RESET, STANDARD_LOAD } mode;
+       extern char *optarg;
+       extern int optind;
+       DBTYPE dbtype;
+       DB_ENV  *dbenv;
+       LDG ldg;
+       u_int ldf;
+       int ch, exitval, ret;
+
+       if ((exitval = version_check()) != 0)
+               goto done;
+
+       ldg.progname = progname;
+       ldg.lineno = 0;
+       ldg.endodata = ldg.endofile = 0;
+       ldg.version = 1;
+       ldg.cache = (1024 * 1024);
+       ldg.hdrbuf = NULL;
+       ldg.home = NULL;
+       ldg.passwd = NULL;
+
+       mode = NOTSET;
+       ldf = 0;
+       exitval = 0;
+       dbtype = DB_UNKNOWN;
+
+       /*
+        * There are two modes for db_load: -r and everything else.  The -r
+        * option zeroes out the database LSN's or resets the file ID, it
+        * doesn't really "load" a new database.  The functionality is in
+        * db_load because we don't have a better place to put it, and we
+        * don't want to create a new utility for just that functionality.
+        */
+       while ((ch = getopt(argc, argv, "h:r:V")) != EOF)
+               switch (ch) {
+               case 'h':
+                       ldg.home = optarg;
+                       break;
+               case 'r':
+                       if (strcmp(optarg, "lsn") == 0)
+                               mode = LSN_RESET;
+                       else if (strcmp(optarg, "fileid") == 0)
+                               mode = FILEID_RESET;
+                       else {
+                               exitval = usage();
+                               goto done;
+                       }
+                       break;
+               case 'V':
+                       printf("%s\n", db_version(NULL, NULL, NULL));
+                       return (EXIT_SUCCESS);
+               case '?':
+               default:
+                       exitval = usage();
+                       goto done;
+               }
+       argc -= optind;
+       argv += optind;
+
+       if (argc != 1 || mode == NOTSET) {
+               exitval = usage();
+               goto done;
+       }
+
+       /*
+        * Create an environment object initialized for error reporting, and
+        * then open it.
+        */
+       if (env_create(&dbenv, &ldg) != 0)
+               goto err;
+
+       /* If we're resetting the LSNs, that's an entirely separate path. */
+       switch (mode) {
+       case FILEID_RESET:
+               exitval = dbenv->fileid_reset(dbenv, argv[0], 0);
+               break;
+       case LSN_RESET:
+               exitval = dbenv->lsn_reset(dbenv, argv[0], 0);
+               break;
+       case NOTSET:
+               break;
+       }
+
+       if (0) {
+err:           exitval = 1;
+       }
+       if ((ret = dbenv->close(dbenv, 0)) != 0) {
+               exitval = 1;
+               fprintf(stderr,
+                   "%s: dbenv->close: %s\n", ldg.progname, db_strerror(ret));
+       }
+
+       if (ldg.passwd != NULL)
+               free(ldg.passwd);
+
+done:
+       return (exitval);
+}
+
+/*
+ * env_create --
+ *     Create the environment and initialize it for error reporting.
+ */
+int
+env_create(dbenvp, ldg)
+       DB_ENV **dbenvp;
+       LDG *ldg;
+{
+       DB_ENV *dbenv;
+       int ret;
+
+       if ((ret = db_env_create(dbenvp, 0)) != 0) {
+               fprintf(stderr, "%s: db_env_create: %s\n",
+                   ldg->progname, db_strerror(ret));
+               return (ret);
+       }
+       dbenv = *dbenvp;
+       dbenv->set_errfile(dbenv, stderr);
+       dbenv->set_errpfx(dbenv, ldg->progname);
+       if (ldg->passwd != NULL && (ret = dbenv->set_encrypt(dbenv,
+           ldg->passwd, DB_ENCRYPT_AES)) != 0) {
+               dbenv->err(dbenv, ret, "set_passwd");
+               return (ret);
+       }
+       if ((ret = db_init(dbenv, ldg->home, ldg->cache, &ldg->private)) != 0)
+               return (ret);
+       dbenv->app_private = ldg;
+
+       return (0);
+}
+
+/*
+ * db_init --
+ *     Initialize the environment.
+ */
+int
+db_init(dbenv, home, cache, is_private)
+       DB_ENV *dbenv;
+       char *home;
+       u_int32_t cache;
+       int *is_private;
+{
+       u_int32_t flags;
+       int ret;
+
+       *is_private = 0;
+       /* We may be loading into a live environment.  Try and join. */
+       flags = DB_USE_ENVIRON |
+           DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN;
+       if ((ret = dbenv->open(dbenv, home, flags, 0)) == 0)
+               return (0);
+       if (ret == DB_VERSION_MISMATCH)
+               goto err;
+
+       /*
+        * We're trying to load a database.
+        *
+        * An environment is required because we may be trying to look at
+        * databases in directories other than the current one.  We could
+        * avoid using an environment iff the -h option wasn't specified,
+        * but that seems like more work than it's worth.
+        *
+        * No environment exists (or, at least no environment that includes
+        * an mpool region exists).  Create one, but make it private so that
+        * no files are actually created.
+        */
+#define        LF_SET(f)       ((flags) |= (f))
+#define        LF_CLR(f)       ((flags) &= ~(f))
+       LF_CLR(DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN);
+       LF_SET(DB_CREATE | DB_PRIVATE);
+       *is_private = 1;
+       if ((ret = dbenv->set_cachesize(dbenv, 0, cache, 1)) != 0) {
+               dbenv->err(dbenv, ret, "set_cachesize");
+               return (1);
+       }
+       if ((ret = dbenv->open(dbenv, home, flags, 0)) == 0)
+               return (0);
+
+       /* An environment is required. */
+err:   dbenv->err(dbenv, ret, "DB_ENV->open");
+       return (1);
+}
+
+/*
+ * usage --
+ *     Display the usage message.
+ */
+int
+usage()
+{
+       (void)fprintf(stderr, "usage: %s %s\n\t%s %s\n",
+           progname, "[-V]",
+           progname, "-r lsn | fileid [-h home] db_file");
+       return (EXIT_FAILURE);
+}
+
+int
+version_check()
+{
+       int v_major, v_minor, v_patch;
+
+       /* Make sure we're loaded with the right version of the DB library. */
+       (void)db_version(&v_major, &v_minor, &v_patch);
+       if (v_major != DB_VERSION_MAJOR || v_minor != DB_VERSION_MINOR) {
+               fprintf(stderr,
+                   "%s: version %d.%d doesn't match library version %d.%d\n",
+                   progname, DB_VERSION_MAJOR,
+                   DB_VERSION_MINOR, v_major, v_minor);
+               return (EXIT_FAILURE);
+       }
+       return (0);
+}
diff --git a/rpmversion.patch b/rpmversion.patch
new file mode 100644 (file)
index 0000000..1dd7d49
--- /dev/null
@@ -0,0 +1,10 @@
+--- rpm-4.16.0/macros.in~      2020-09-30 09:48:01.000000000 +0200
++++ rpm-4.16.0/macros.in       2020-10-18 17:23:24.762186901 +0200
+@@ -6,6 +6,7 @@
+ # should be added to /etc/rpm/macros, while per-user configuration should
+ # be added to ~/.rpmmacros.
+ #
++%_rpmversion          @VERSION@
+ #==============================================================================
+ # ---- A macro that expands to nothing.
diff --git a/rubygems.rb b/rubygems.rb
deleted file mode 100755 (executable)
index faeeae0..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/ruby
-#--
-# Copyright 2010 Per Øyvind Karlsen <peroyvind@mandriva.org>
-# This program is free software. It may be redistributed and/or modified under
-# the terms of the LGPL version 2.1 (or later).
-#
-# FIXME: Someone with actual ruby skills should really clean up and sanitize
-#       this! fugliness obvious...
-#++
-
-require 'optparse'
-require 'rbconfig'
-
-provides = false
-requires = false
-
-opts = OptionParser.new("#{$0} <--provides|--requires>")
-opts.on("-P", "--provides", "Print provides") do |val|
-  provides = true
-end
-opts.on("-R", "--requires", "Print requires") do |val|
-  requires= true
-end
-
-rest = opts.permute(ARGV)
-
-if rest.size != 0 or (!provides and !requires) or (provides and requires)
-  $stderr.puts "Use either --provides OR --requires"
-  $stderr.puts opts
-  exit(1)
-end
-
-require 'rubygems'
-gem_dir = Gem.respond_to?(:default_dirs) ? Gem.default_dirs[:system][:gem_dir] : Gem.path.first
-specpatt = "#{gem_dir}/specifications/.*\.gemspec$"
-gems = []
-ruby_versioned = false
-abi_provide = false
-# as ruby_version may be empty, take version from basename of archdir
-ruby_version = RbConfig::CONFIG["ruby_version"].empty? ? File.basename(RbConfig::CONFIG["archdir"]) : RbConfig::CONFIG["ruby_version"]
-
-for path in $stdin.readlines
-  # way fugly, but we make the assumption that if the package has
-  # this file, the package is the current ruby version, and should
-  # therefore provide ruby(abi) = version
-  if provides and path.match(RbConfig::CONFIG["archdir"] + "/rbconfig.rb")
-     abi_provide = true
-     ruby_versioned = true
-  elsif path.match(specpatt)
-    gems.push(path.chomp)
-  # this is quite ugly and lame, but the assumption made is that if any files
-  # found in any of these directories specific to this ruby version, the
-  # package is dependent on this specific version.
-  # FIXME: only supports current ruby version
-  elsif not ruby_versioned
-    if path.match(RbConfig::CONFIG["rubylibdir"])
-      ruby_versioned = true
-    elsif path.match(RbConfig::CONFIG["archdir"])
-      ruby_versioned = true
-    elsif path.match(RbConfig::CONFIG["sitelibdir"])
-      ruby_versioned = !RbConfig::CONFIG["ruby_version"].empty?
-    elsif path.match(RbConfig::CONFIG["sitearchdir"])
-      ruby_versioned = true
-    elsif path.match(RbConfig::CONFIG["vendorlibdir"])
-      ruby_versioned = !RbConfig::CONFIG["ruby_version"].empty?
-    elsif path.match(RbConfig::CONFIG["vendorarchdir"])
-      ruby_versioned = true
-    end
-  end
-end
-
-if requires or abi_provide
-  abidep = "ruby(abi)"
-  if ruby_versioned
-    abidep += " = %s" % ruby_version
-  end
-  print abidep + "\n"
-end
-
-if gems.length > 0
-  require 'rubygems'
-
-  if requires
-
-    module Gem
-      class Requirement
-        def rpm_dependency_transform(name, version)
-          pessimistic = ""
-          if version == "> 0.0.0" or version == ">= 0"
-            version = ""
-          else
-            if version[0..1] == "~>"
-              pessimistic = "rubygem(%s) < %s\n" % [name, Gem::Version.create(version[3..-1]).bump]
-              version = version.gsub(/\~>/, '=>')
-            end
-            if version[0..1] == "!="
-              version = version.gsub(/\!=/, '>')
-            end
-            version = version.sub(/^/, ' ')
-          end
-          version = "rubygem(%s)%s\n%s" % [name, version, pessimistic]
-        end
-
-        def to_rpm(name)
-          result = as_list
-          return result.map { |version| rpm_dependency_transform(name, version) }
-        end
-
-      end
-    end
-  end
-
-  for gem in gems
-    data = File.read(gem)
-    spec = eval(data)
-    if provides
-      print "rubygem(%s) = %s\n" % [spec.name, spec.version]
-    end
-    if requires
-      for d in spec.dependencies
-        print d.requirement.to_rpm(d.name)[0] unless d.type != :runtime
-      end
-      for d in spec.required_rubygems_version.to_rpm("rubygems")
-        print d.gsub(/(rubygem\()|(\))/, "")
-      end
-    end
-  end
-end
diff --git a/uname-deps.patch b/uname-deps.patch
new file mode 100644 (file)
index 0000000..4863617
--- /dev/null
@@ -0,0 +1,131 @@
+diff --git a/lib/depends.c b/lib/depends.c
+index 28a4a784d..1d8ce1f8a 100644
+--- a/lib/depends.c
++++ b/lib/depends.c
+@@ -690,6 +690,17 @@ retry:
+       goto unsatisfied;
+     }
++    char * N = rpmdsN(dep);
++    if (strstr(N, "uname") == N) {
++      if (tsmem->uname == NULL)
++          rpmdsUnamePool(rpmtsPool(ts), &(tsmem->uname));
++      
++      if (tsmem->uname != NULL && rpmdsSearch(tsmem->uname, dep) >= 0) {
++          rpmdsNotify(dep, "(uname provides)", rc);
++          goto exit;
++      }
++    }
++
+     /* Dont look at pre-requisites of already installed packages */
+     if (!adding && isTransientReq(dsflags))
+       goto exit;
+diff --git a/lib/rpmds.c b/lib/rpmds.c
+index f7ee76392..754969e39 100644
+--- a/lib/rpmds.c
++++ b/lib/rpmds.c
+@@ -2,6 +2,7 @@
+  * \file lib/rpmds.c
+  */
+ #include "system.h"
++#include <sys/utsname.h>
+ #include <rpm/rpmtypes.h>
+ #include <rpm/rpmlib.h>               /* rpmvercmp */
+@@ -1596,3 +1597,51 @@ rpmRC rpmdsParseRichDep(rpmds dep, rpmds *leftds, rpmds *rightds, rpmrichOp *op,
+     return rc;
+ }
++int rpmdsUnamePool(rpmstrPool pool, rpmds * dsp)
++{
++    int rc = -1;
++    static const char * NS = "uname";
++    struct utsname un;
++    rpmds ds;
++
++    if (uname(&un) < 0)
++      goto exit;
++
++    ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME, "uname(sysname)", un.sysname, RPMSENSE_EQUAL);
++    rc = rpmdsMerge(dsp, ds);
++    rpmdsFree(ds);
++    if (rc < 0)
++      goto exit;
++    ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME, "uname(nodename)", un.nodename, RPMSENSE_EQUAL);
++    rc = rpmdsMerge(dsp, ds);
++    rpmdsFree(ds);
++    if (rc < 0)
++      goto exit;
++    ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME, "uname(release)", un.release, RPMSENSE_EQUAL);
++    rc = rpmdsMerge(dsp, ds);
++    rpmdsFree(ds);
++    if (rc < 0)
++      goto exit;
++    ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME, "uname(machine)", un.machine, RPMSENSE_EQUAL);
++    rc = rpmdsMerge(dsp, ds);
++    rpmdsFree(ds);
++    if (rc < 0)
++      goto exit;
++#if defined(__linux__)
++    ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME, "uname(domainname)", un.domainname, RPMSENSE_EQUAL);
++    rc = rpmdsMerge(dsp, ds);
++    rpmdsFree(ds);
++    if (rc < 0)
++      goto exit;
++#endif
++exit:
++    /* freeze the pool to save memory, but only if private pool */
++    if (*dsp && (*dsp)->pool != pool)
++      rpmstrPoolFreeze((*dsp)->pool, 0);
++    return (rc < 0) ? -1 : 0;
++}
++
++int rpmdsUname(rpmds * dsp)
++{
++    return rpmdsUnamePool(NULL, dsp);
++}
+diff --git a/lib/rpmds.h b/lib/rpmds.h
+index 90d54aa27..558252c04 100644
+--- a/lib/rpmds.h
++++ b/lib/rpmds.h
+@@ -412,6 +412,13 @@ int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote);
+  */
+ int rpmdsRpmlib(rpmds * dsp, const void * tblp);
++/**
++ * Load uname provides into a dependency set.
++ * @retval *dsp               (loaded) dependency set
++ * @return            0 on success
++ */
++int rpmdsUname(rpmds * dsp);
++
+ /** \ingroup rpmds
+  * Create and load a dependency set.
+  * @param pool                shared string pool (or NULL for private pool)
+@@ -468,6 +475,14 @@ rpmds rpmdsSinglePoolTix(rpmstrPool pool, rpmTagVal tagN,
+  */
+ int rpmdsRpmlibPool(rpmstrPool pool, rpmds * dsp, const void * tblp);
++/**
++ * Load uname provides into a dependency set.
++ * @param pool                shared string pool (or NULL for private pool)
++ * @retval *dsp               (loaded) dependency set
++ * @return            0 on success
++ */
++int rpmdsUnamePool(rpmstrPool pool, rpmds * dsp);
++
+ typedef enum rpmrichOp_e {
+     RPMRICHOP_SINGLE  = 1,
+diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h
+index e69ef2584..ecdb12f0c 100644
+--- a/lib/rpmts_internal.h
++++ b/lib/rpmts_internal.h
+@@ -21,6 +21,7 @@ typedef struct tsMembers_s {
+     rpmal addedPackages;      /*!< Set of packages being installed. */
+     rpmds rpmlib;             /*!< rpmlib() dependency set. */
++    rpmds uname;              /*!< uname() dependency set. */
+     rpmte * order;            /*!< Packages sorted by dependencies. */
+     int orderCount;           /*!< No. of transaction elements. */
+     int orderAlloced;         /*!< No. of allocated transaction elements. */
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..2afb1fd
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,235 @@
+diff -ur rpm-4.15.1.orig/build/rpmfc.c rpm-4.15.1/build/rpmfc.c
+--- rpm-4.15.1.orig/build/rpmfc.c      2019-12-29 14:07:19.877313873 +0100
++++ rpm-4.15.1/build/rpmfc.c   2019-12-29 13:47:23.183804165 +0100
+@@ -595,6 +595,7 @@
+   { "ELF 32-bit",             RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",             RPMFC_ELF64|RPMFC_INCLUDE },
++//  { "ELF 32-bit",           RPMFC_ELFX32|RPMFC_INCLUDE },
+   { "troff or preprocessor input",    RPMFC_INCLUDE },
+   { "GNU Info",                       RPMFC_INCLUDE },
+@@ -696,7 +697,11 @@
+       if (strstr(fmstr, fct->token) == NULL)
+           continue;
+-      fcolor |= fct->colors;
++      // This is a nasty hack, but will have to do for now
++      if ((fct->colors & RPMFC_ELF32) && (strstr(fmstr, "x86-64") != NULL))
++          fcolor |= RPMFC_ELFX32|RPMFC_INCLUDE;
++      else
++          fcolor |= fct->colors;
+       if (fcolor & RPMFC_INCLUDE)
+           break;
+     }
+@@ -1152,7 +1152,10 @@
+               color = RPMFC_ELF64;
+               break;
+           case ELFCLASS32:
+-              color = RPMFC_ELF32;
++              if (ehdr.e_machine == EM_X86_64)
++                  color = RPMFC_ELFX32;
++              else
++                  color = RPMFC_ELF32;
+               break;
+           }
+           elf_end(elf);
+diff -ur rpm-4.15.1.orig/build/rpmfc.h rpm-4.15.1/build/rpmfc.h
+--- rpm-4.15.1.orig/build/rpmfc.h      2019-06-26 16:17:31.397985717 +0200
++++ rpm-4.15.1/build/rpmfc.h   2019-12-29 13:45:05.936980833 +0100
+@@ -26,8 +26,9 @@
+     RPMFC_BLACK                       = 0,
+     RPMFC_ELF32                       = (1 <<  0),
+     RPMFC_ELF64                       = (1 <<  1),
++    RPMFC_ELFX32              = (1 <<  2),
+     RPMFC_ELFMIPSN32          = (1 <<  2),
+-#define       RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
++#define       RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFX32|RPMFC_ELFMIPSN32)
+       /* (1 << 3) leaks into package headers, reserved */
+     RPMFC_WHITE                       = (1 << 29),
+diff -ur rpm-4.15.1.orig/configure.ac rpm-4.15.1/configure.ac
+--- rpm-4.15.1.orig/configure.ac       2019-12-29 14:07:19.813977936 +0100
++++ rpm-4.15.1/configure.ac    2019-12-29 14:27:41.381850928 +0100
+@@ -1050,6 +1050,9 @@
+       host_os=`echo "${host_os}" | sed 's/-gnueabi$//'`
+       host_os_gnu=-gnueabi
+ fi
++if echo "$host_os" | grep '.*-gnux32' > /dev/null ; then
++      host_os=`echo "${host_os}" | sed 's/-gnux32$//'`
++fi
+ if echo "$host_os" | grep '.*-gnu' > /dev/null ; then
+       host_os=`echo "${host_os}" | sed 's/-gnu$//'`
+ fi
+diff -ur rpm-4.15.1.orig/installplatform rpm-4.15.1/installplatform
+--- rpm-4.15.1.orig/installplatform    2019-06-26 16:17:31.404985707 +0200
++++ rpm-4.15.1/installplatform 2019-12-29 14:52:09.331085139 +0100
+@@ -21,6 +21,7 @@
+   ARCH_INSTALL_POST='%{nil}'
+   LIB=lib
++  TARGETCPU="%{_target_cpu}"
+   # XXX FIXME: incomplete and quite likely wrong too in places,
+   # consult various arch folks for correct names etc.
+@@ -82,7 +83,15 @@
+       ISANAME=x86
+       ISABITS=64
+       CANONARCH=x86_64
+-      CANONCOLOR=3
++      CANONCOLOR=7
++      ;;
++    x32)
++      ISANAME=x86
++      ISABITS=32
++      CANONARCH=x32
++      CANONCOLOR=4
++      FORCE_RPMRC_GNU="${RPMRC_GNU}x32"
++      TARGETCPU="x86_64"
+       ;;
+     ia64)
+       ISANAME=ia
+@@ -190,10 +199,14 @@
+   # skip architectures for which we dont have full config parameters
+   [ -z "$CANONARCH" ] && continue
+-  if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then
++  if [ "$OS" = "linux" ] && [ "$CANONARCH" = "x86_64" ]; then
+       LIB=${LIB}64
+   fi
++  if [ "$OS" = "linux" ] && [ "$CANONARCH" = "x32" ]; then
++      LIB=${LIB}x32
++  fi
++
+   PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
+   [ -d $PPD ] || mkdir -p $PPD
+@@ -201,7 +214,8 @@
+   | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
+       -e "s,@RPMCANONARCH@,$CANONARCH,g" \
+       -e "s,@RPMCANONCOLOR@,$CANONCOLOR," \
+-      -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
++      -e "s,@RPMRC_GNU@,${FORCE_RPMRC_GNU:-$RPMRC_GNU}," \
++      -e "s,@TARGETCPU@,$TARGETCPU," \
+       -e "s,@LIB@,$LIB," \
+       -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
+       -e '/\${\w*:-/!s,\${,%{_,' \
+@@ -212,6 +226,8 @@
+   | ${FILTER} \
+   > ${PPD}/macros
++  FORCE_RPMRC_GNU=
++
+ done
+ # gently adjust undefined autoconf variables to rpm macros...
+diff -ur rpm-4.15.1.orig/platform.in rpm-4.15.1/platform.in
+--- rpm-4.15.1.orig/platform.in        2019-11-13 10:19:29.371710954 +0100
++++ rpm-4.15.1/platform.in     2019-12-29 14:47:30.886959421 +0100
+@@ -8,7 +8,7 @@
+ %_vendor              @RPMCANONVENDOR@
+ %_os                  @RPMCANONOS@
+ %_gnu                 @RPMRC_GNU@
+-%_target_platform     %{_target_cpu}-%{_vendor}-%{_target_os}
++%_target_platform     @TARGETCPU@-%{_vendor}-%{_target_os}%{?_gnu}
+ %optflags             @RPMRC_OPTFLAGS@
+ %__isa_name           @ISANAME@
+diff -ur rpm-4.15.1.orig/rpmrc.in rpm-4.15.1/rpmrc.in
+--- rpm-4.15.1.orig/rpmrc.in   2019-11-13 10:19:29.418711227 +0100
++++ rpm-4.15.1/rpmrc.in        2019-12-29 14:51:20.293119352 +0100
+@@ -24,6 +24,7 @@
+ optflags: x86_64 -O2 -g
+ optflags: amd64 -O2 -g
+ optflags: ia32e -O2 -g
++optflags: x32 -O2 -g -mtune=generic -march=x86-64
+ optflags: alpha -O2 -g -mieee
+ optflags: alphaev5 -O2 -g -mieee -mtune=ev5
+@@ -155,6 +156,8 @@
+ archcolor: riscv64 2
++archcolor: x32 4
++
+ #############################################################
+ # Canonical arch names and numbers
+@@ -170,6 +173,7 @@
+ arch_canon:   amd64:  amd64   1
+ arch_canon:   ia32e:  ia32e   1
+ arch_canon:   em64t:  em64t   1
++arch_canon:   x32: x32        1
+ arch_canon:   alpha:  alpha   2
+ arch_canon:   alphaev5: alphaev5      2
+@@ -379,6 +383,8 @@
+ buildarchtranslate: amd64: x86_64
+ buildarchtranslate: ia32e: x86_64
++buildarchtranslate: x32: x32
++
+ buildarchtranslate: sh3: sh3
+ buildarchtranslate: sh4: sh4
+ buildarchtranslate: sh4a: sh4
+@@ -490,6 +496,8 @@
+ arch_compat: amd64: x86_64 em64t athlon noarch
+ arch_compat: ia32e: x86_64 em64t athlon noarch
++arch_compat: x32: x32 noarch
++
+ arch_compat: sh3: noarch
+ arch_compat: sh4: noarch
+ arch_compat: sh4a: sh4
+@@ -628,6 +636,8 @@
+ buildarch_compat: amd64: x86_64
+ buildarch_compat: ia32e: x86_64
++buildarch_compat: x32: noarch
++
+ buildarch_compat: sh3: noarch
+ buildarch_compat: sh4: noarch
+ buildarch_compat: sh4a: sh4
+diff -ur rpm-4.15.1.orig/tools/elfdeps.c rpm-4.15.1/tools/elfdeps.c
+--- rpm-4.15.1.orig/tools/elfdeps.c    2019-06-26 16:17:31.462985619 +0200
++++ rpm-4.15.1/tools/elfdeps.c 2019-12-29 14:22:05.339471071 +0100
+@@ -94,6 +94,9 @@
+           break;
+       }
+     }
++    if ((ehdr->e_ident[EI_CLASS] == ELFCLASS32) && (ehdr->e_machine == EM_X86_64)) {
++      marker = "(x32bit)";
++    }
+     return marker;
+ }
+--- rpm-4.15.1/fileattrs/pythondist.attr~      2019-06-26 23:17:31.000000000 +0900
++++ rpm-4.15.1/fileattrs/pythondist.attr       2020-01-04 23:34:05.680366882 +0900
+@@ -1,3 +1,3 @@
+ %__pythondist_provides        %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
+ %__pythondist_requires        %{_rpmconfigdir}/pythondistdeps.py --requires
+-%__pythondist_path            /lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
++%__pythondist_path            /lib(64|x32)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
+--- rpm-4.16.0/fileattrs/python.attr.orig      2020-08-31 11:14:07.991087349 +0200
++++ rpm-4.16.0/fileattrs/python.attr   2020-10-03 10:47:16.560360859 +0200
+@@ -14,14 +14,15 @@
+ %__python_requires() %{lua:
+     -- Match buildroot paths of the form
+     --    /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/  and
+-    --    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
++    --    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ and
++    --    /PATH/OF/BUILDROOT/usr/libx32/pythonMAJOR.MINOR/
+     -- generating a line of the form:
+     --    python(abi) = MAJOR.MINOR
+     local path = rpm.expand('%1')
+-    if path:match('/usr/lib%d*/python%d+%.%d+/.*') then
+-        local requires = path:gsub('.*/usr/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1')
++    if path:match('/usr/lib%w*/python%d+%.%d+/.*') then
++        local requires = path:gsub('.*/usr/lib%w*/python(%d+%.%d+)/.*', 'python(abi) = %1')
+         print(requires)
+     end
+ }
+-%__python_path ^((%{_prefix}/lib(64)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$
++%__python_path ^((%{_prefix}/lib(64|x32)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$