From: Marcin Krol Date: Thu, 29 Oct 2020 21:35:44 +0000 (+0100) Subject: - rpm.org RPM, merged from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=6fce50075952edfa510790ca6be81e6d3fb9e214;p=packages%2Frpm.git - rpm.org RPM, merged from PLD --- diff --git a/aarch64.patch b/aarch64.patch new file mode 100644 index 0000000..8013c2a --- /dev/null +++ b/aarch64.patch @@ -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 + diff --git a/banner.sh b/banner.sh old mode 100644 new mode 100755 index 5c92c5c..e421556 --- a/banner.sh +++ b/banner.sh @@ -1,6 +1,6 @@ #!/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+ # @@ -10,7 +10,7 @@ CONFIG=/etc/sysconfig/banner ####################################################### CONFIG ######## -# default paramaters +# default parameters ########################## BANNERDIR="/var/lib/banner/" @@ -19,7 +19,7 @@ EXCLUDEFILES="(rpmnew$|rpmsave$|~$)" STDOUT="1" # stdout by default #STDOUT="2" # stderr by default -# config paramaeters +# config parameters ########################## if [ -r $CONFIG ]; then @@ -50,53 +50,43 @@ esac #################################################### FUNCTIONS ######## -Usage() -{ +Usage() { cat << EOF -Usage: $(basename $0) [opitions] [banners] +Usage: $(basename $0) [options] [banners] EOF } -Help() -{ + +Help() { Usage cat << EOF --a ---all - all banners ---delete - delete wanted banners --e ---exclude - exclude following banners (useful with -a) --h ---help - show this help --i ---include - cancel effect of -e (EXCLUDED banners will remain excluded) --m ---make - make a brand-new banner named as following parameter [1] (from stdin) --M - same as above, but append if file exists --n ---names - show names of the banners ---newer - all choosen banners should be newer than following parameter in seconds ---older - all choosen banners should be older than following parameter in seconds --s ---show - show wanted banners ---stderr - send banner to stderr instead of stdout (or other) ---stdout - send banner to stdout instead of stderr (or other) --u ---usage - show short help +-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 } -Unknown_para() -{ + +Unknown_para() { cat << EOF Unknown parameter $1 EOF Help } -check_banners_mtime() -{ +check_banners_mtime() { BANNERS="$1" OLDER="$2" NEWER="$3" @@ -112,34 +102,34 @@ check_banners_mtime() echo $BANNER done } -delete_banners() -{ + +delete_banners() { BANNERS="$1" rm -rf $(get_banner_location_list "$BANNER") } -get_all_banner_list() -{ + +get_all_banner_list() { ls "$BANNERDIR" | grep -E -v "$EXCLUDEFILES" } -get_banner_list() -{ + +get_banner_list() { 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 } -get_banner_location_list() -{ + +get_banner_location_list() { BANNERS="$1" for BANNER in $BANNERS; do echo "$BANNERDIR/$BANNER" done } -make_banner() -{ + +make_banner() { BANNER="$1" SHOW="$2" if [ ! -d "${BANNER%/*}" ]; then @@ -151,27 +141,28 @@ make_banner() else echo "$data" >> $BANNER fi - if [ $SHOW -eq 1 ];then + if [ $SHOW -eq 1 ]; then 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 } -######################################################## MAIN ######## -while [ ! -z $1 ]; do - case $1 in + +######################################################### MAIN ######## +while [ -n "$1" ]; do + case "$1" in -a|--all) ALL_BANNERS=1 ;; - --delete) + -d|--delete) NEED_BANNER_LIST=1 ACTION="delete" ;; @@ -187,18 +178,18 @@ while [ ! -z $1 ]; do ;; -m|--make|-M) NEED_BANNER_LIST=0 - if [[ $2 != */* ]]; then + if [[ "$2" != */* ]]; then 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 - if [ -z "$NEW_BANNER" ];then + if [ -z "$NEW_BANNER" ]; then Help exit 2 fi @@ -211,7 +202,7 @@ while [ ! -z $1 ]; do --newer) NEED_MTIME_CHECK=1 CHOOSE_NEWER="$2" - if [ -z "$CHOOSE_NEWER" ];then + if [ -z "$CHOOSE_NEWER" ]; then Help exit 2 fi @@ -220,7 +211,7 @@ while [ ! -z $1 ]; do --older) NEED_MTIME_CHECK=1 CHOOSE_OLDER="$2" - if [ -z "$CHOOSE_OLDER" ];then + if [ -z "$CHOOSE_OLDER" ]; then Help exit 2 fi @@ -246,7 +237,7 @@ while [ ! -z $1 ]; do exit 1 ;; *) - if [ $EXCLUDE_FLAG -eq 0 ];then + if [ $EXCLUDE_FLAG -eq 0 ]; then 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 [ $NEED_BANNER_LIST -ne 0 ];then +if [ $NEED_BANNER_LIST -ne 0 ]; then 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") - delete_banners $BANNER_LIST; + delete_banners $BANNER_LIST ;; "make") - make_banner $NEW_BANNER $NEW_SHOW; + make_banner $NEW_BANNER $NEW_SHOW ;; "names") - echo $BANNER_LIST; + echo $BANNER_LIST ;; "show") - show_banners $BANNER_LIST; + show_banners $BANNER_LIST + ;; + "") + Help ;; esac - - - diff --git a/dbupgrade.sh b/dbupgrade.sh new file mode 100755 index 0000000..a000935 --- /dev/null +++ b/dbupgrade.sh @@ -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 index 6457a7a..0000000 --- a/gem_helper.rb +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/ruby -#-- -# Copyright 2010 Per Øyvind Karlsen -# 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.. - 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 diff --git a/rpm-arch.patch b/ix86-platforms.patch similarity index 52% rename from rpm-arch.patch rename to ix86-platforms.patch index e185db6..9f862e6 100644 --- a/rpm-arch.patch +++ b/ix86-platforms.patch @@ -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: geode: i386 -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 @@ -20,14 +32,3 @@ diff -urN rpm.org/rpmrc.in rpm/rpmrc.in 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 index 0000000..370fc45 --- /dev/null +++ b/macros.lang @@ -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 index 0000000..70b7121 --- /dev/null +++ b/macros.local @@ -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 index 81064f1..0000000 --- a/macros.php +++ /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 index 5f2b92d..0000000 --- a/notrans.patch +++ /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 index 0000000..d4f39e6 --- /dev/null +++ b/pkgconfig.patch @@ -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 index 0000000..ce66a35 --- /dev/null +++ b/python-internal-build.patch @@ -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 index 98f6039..0000000 --- a/pythondeps-speedup.patch +++ /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 index ae05199..0000000 --- a/rpm-am.patch +++ /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 index 11100c0..0000000 --- a/rpm-arch-x86_64.patch +++ /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 index 119831c..0000000 --- a/rpm-as_needed-fix.patch +++ /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 index 17d1a35..0000000 --- a/rpm-automake_1.12.patch +++ /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 diff --git a/rpm-builddir-readlink.patch b/rpm-builddir-readlink.patch index 11afecf..069650f 100644 --- a/rpm-builddir-readlink.patch +++ b/rpm-builddir-readlink.patch @@ -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 -@@ -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. -+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 @@ -21,6 +19,6 @@ + $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 diff --git a/rpm-changelog_order_check_nonfatal.patch b/rpm-changelog_order_check_nonfatal.patch index bf2ef04..ae75fa4 100644 --- a/rpm-changelog_order_check_nonfatal.patch +++ b/rpm-changelog_order_check_nonfatal.patch @@ -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 @@ - return RPMERR_BADSPEC; + trimtime = firstTime - trimage; } if (lastTime && lastTime < time) { -- rpmError(RPMERR_BADSPEC, -+ rpmMessage(RPMMESS_WARNING, +- rpmlog(RPMLOG_ERR, ++ rpmlog(RPMLOG_WARNING, _("%%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 index 472eb6d..0000000 --- a/rpm-chroot-hack.patch +++ /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 index 0000000..800e2c0 --- /dev/null +++ b/rpm-clean-docdir.patch @@ -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 index f8b29ef..0000000 --- a/rpm-cleanbody.patch +++ /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 index e2d6930..0000000 --- a/rpm-cleanlibdirs.patch +++ /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 index 90fa456..0000000 --- a/rpm-compress-doc.patch +++ /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 index 7391551..0000000 --- a/rpm-db-configure.patch +++ /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 index 5ea06e1..0000000 --- a/rpm-db.patch +++ /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 index 41d0c08..0000000 --- a/rpm-db3-configure.patch +++ /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 index ff534f7..0000000 --- a/rpm-debugdir.patch +++ /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 index 66045e9..0000000 --- a/rpm-debugedit-dwarf4.patch +++ /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 index 00facee..0000000 --- a/rpm-debugedit-workaround.patch +++ /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 diff --git a/rpm-debuginfo.patch b/rpm-debuginfo.patch index 537f8bc..aecf32e 100644 --- a/rpm-debuginfo.patch +++ b/rpm-debuginfo.patch @@ -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 index 2cef12d..0000000 --- a/rpm-dirdeps-macro.patch +++ /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 index 7527eec..0000000 --- a/rpm-disable-features-ti.patch +++ /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 index ca42361..0000000 --- a/rpm-disable-hkp.patch +++ /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 index 54775bd..0000000 --- a/rpm-div0.patch +++ /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 index 4654eba..0000000 --- a/rpm-doxygen_hack.patch +++ /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 index cdf2b5f..0000000 --- a/rpm-epoch0.patch +++ /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 index 80cc580..0000000 --- a/rpm-etc_dir.patch +++ /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 index 6eec5b1..0000000 --- a/rpm-gendiff.patch +++ /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 " 1>&2 diff --git a/rpm-gettext-in-header.patch b/rpm-gettext-in-header.patch deleted file mode 100644 index 9e3ff96..0000000 --- a/rpm-gettext-in-header.patch +++ /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 index 765adf0..0000000 --- a/rpm-gid-uucp.patch +++ /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 index ea8240b..0000000 --- a/rpm-glibc.patch +++ /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 index 189c9e5..0000000 --- a/rpm-glob.patch +++ /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 index 15c189a..0000000 --- a/rpm-gstreamer.patch +++ /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 index 05e8902..0000000 --- a/rpm-hack-norpmlibdep.patch +++ /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 index fff4a84..0000000 --- a/rpm-helperEVR-noassert.patch +++ /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 index 4a8bbb1..0000000 --- a/rpm-hirmib-ts.patch +++ /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 index 0000000..b7e7ed0 --- /dev/null +++ b/rpm-ignore-missing-macro-files.patch @@ -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 index 33715cf..0000000 --- a/rpm-installbeforeerase.patch +++ /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 index cc75c1a..0000000 --- a/rpm-installplatform.patch +++ /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 index fbf86d4..0000000 --- a/rpm-ldconfig-always.patch +++ /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 index 29fcc32..0000000 --- a/rpm-libmagic-locale.patch +++ /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"), diff --git a/rpm-libtool-deps.patch b/rpm-libtool-deps.patch index 4dc62f4..443d1fd 100644 --- a/rpm-libtool-deps.patch +++ b/rpm-libtool-deps.patch @@ -15,7 +15,7 @@ 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)" diff --git a/rpm-link-selinux.patch b/rpm-link-selinux.patch deleted file mode 100644 index 7672a19..0000000 --- a/rpm-link-selinux.patch +++ /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 index 3ea978b..0000000 --- a/rpm-link.patch +++ /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 index c71ed1c..0000000 --- a/rpm-lua-exit-chroot-correctly.patch +++ /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 index c77311e..0000000 --- a/rpm-lzma-compress-level.patch +++ /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 index 544c247..0000000 --- a/rpm-lzma-mem.patch +++ /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 index 1f5a0fe..0000000 --- a/rpm-lzma-size_t.patch +++ /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 index c68cb48..0000000 --- a/rpm-lzma-tukaani.patch +++ /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 index e3282af..0000000 --- a/rpm-macros-cpp.patch +++ /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 index 9ddff0b..0000000 --- a/rpm-macros-ti.patch +++ /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 index b9b366b..0000000 --- a/rpm-macros.gstreamer +++ /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 index 30e1539..0000000 --- a/rpm-macros.java +++ /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 index f41a082..0000000 --- a/rpm-macros.patch +++ /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 index f67d01d..0000000 --- a/rpm-makefile-no_myLDADD_deps.patch +++ /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: diff --git a/rpm-man_pl.patch b/rpm-man_pl.patch index db61324..c9e03ea 100644 --- a/rpm-man_pl.patch +++ b/rpm-man_pl.patch @@ -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 diff --git a/rpm-missing-prototypes.patch b/rpm-missing-prototypes.patch deleted file mode 100644 index c4b4cab..0000000 --- a/rpm-missing-prototypes.patch +++ /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 - #include - #include ---- rpm-4.3/tools/convertdb1.c.orig 2004-01-04 02:13:09.000000000 +0000 -+++ rpm-4.3/tools/convertdb1.c 2004-01-12 10:52:04.000000000 +0000 -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include "legacy.h" - - #define FA_MAGIC 0x02050920 - diff --git a/rpm-mono.patch b/rpm-mono.patch deleted file mode 100644 index 25604d3..0000000 --- a/rpm-mono.patch +++ /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 index d7f271b..0000000 --- a/rpm-namespace-probe.patch +++ /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 index 6a3d9e5..0000000 --- a/rpm-new-debuginfo.patch +++ /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 '(|)$' | -+ (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 index bd926d1..0000000 --- a/rpm-no-neon.patch +++ /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 - #endif - --#if USE_INTERNAL_NEON --#include "ne_alloc.h" --#include "ne_auth.h" --#include "ne_basic.h" --#include "ne_dates.h" --#include "ne_locks.h" --#else --#include "neon/ne_alloc.h" --#include "neon/ne_auth.h" --#include "neon/ne_basic.h" --#include "neon/ne_dates.h" --#include "neon/ne_locks.h" --#endif -- --#define NEONBLOWSCHUNKS --#ifndef NEONBLOWSCHUNKS --/* HACK: include ne_private.h to access sess->socket for now. */ --#include "../neon/src/ne_private.h" --#endif -- --#if USE_INTERNAL_NEON --#include "ne_props.h" --#include "ne_request.h" --#include "ne_socket.h" --#include "ne_string.h" --#include "ne_utils.h" --#include "ne_md5.h" /* for version detection only */ --#else --#include "neon/ne_props.h" --#include "neon/ne_request.h" --#include "neon/ne_socket.h" --#include "neon/ne_string.h" --#include "neon/ne_utils.h" --#include "neon/ne_md5.h" /* for version detection only */ --#endif -- --/* poor-man's NEON version determination */ --#if defined(NE_MD5_H) --#define WITH_NEON_MIN_VERSION 0x002700 --#elif defined(NE_FEATURE_I18N) --#define WITH_NEON_MIN_VERSION 0x002600 --#else --#define WITH_NEON_MIN_VERSION 0x002500 --#endif -- --/* XXX API changes for NEON 0.26 */ --#if WITH_NEON_MIN_VERSION >= 0x002600 --#define ne_set_persist(_sess, _flag) --#define ne_propfind_set_private(_pfh, _create_item, NULL) \ -- ne_propfind_set_private(_pfh, _create_item, NULL, NULL) --#endif -- - #include - - #define _RPMDAV_INTERNAL -@@ -74,1469 +22,6 @@ - /*@access FD_t @*/ - /*@access urlinfo @*/ - --#if 0 /* HACK: reasonable value needed. */ --#define TIMEOUT_SECS 60 --#else --#define TIMEOUT_SECS 5 --#endif --/*@unchecked@*/ --static int httpTimeoutSecs = TIMEOUT_SECS; -- --/* =============================================================== */ --int davFree(urlinfo u) -- /*@globals internalState @*/ -- /*@modifies u, internalState @*/ --{ -- if (u != NULL) { -- if (u->sess != NULL) { -- ne_session_destroy(u->sess); -- u->sess = NULL; -- } -- switch (u->urltype) { -- default: -- /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- case URL_IS_HKP: -- u->capabilities = _free(u->capabilities); -- if (u->lockstore != NULL) -- ne_lockstore_destroy(u->lockstore); -- u->lockstore = NULL; -- ne_sock_exit(); -- break; -- } -- } -- return 0; --} -- --static void davProgress(void * userdata, off_t current, off_t total) -- /*@*/ --{ -- urlinfo u = userdata; -- ne_session * sess; -- --assert(u != NULL); -- sess = u->sess; --assert(sess != NULL); --assert(u == ne_get_session_private(sess, "urlinfo")); -- -- u->current = current; -- u->total = total; -- --if (_dav_debug < 0) --fprintf(stderr, "*** davProgress(%p,0x%x:0x%x) sess %p u %p\n", userdata, (unsigned int)current, (unsigned int)total, sess, u); --} -- --#if WITH_NEON_MIN_VERSION >= 0x002700 --static void davNotify(void * userdata, -- ne_session_status connstatus, const ne_session_status_info *info) --#else --static void davNotify(void * userdata, -- ne_conn_status connstatus, const char * info) --#endif -- /*@*/ --{ -- urlinfo u = userdata; -- ne_session * sess; -- /*@observer@*/ -- static const char * connstates[] = { -- "namelookup", -- "connecting", -- "connected", -- "secure", -- "unknown" -- }; -- --assert(u != NULL); -- sess = u->sess; --assert(sess != NULL); --assert(u == ne_get_session_private(sess, "urlinfo")); -- --#ifdef REFERENCE --typedef enum { -- ne_conn_namelookup, /* lookup up hostname (info = hostname) */ -- ne_conn_connecting, /* connecting to host (info = hostname) */ -- ne_conn_connected, /* connected to host (info = hostname) */ -- ne_conn_secure /* connection now secure (info = crypto level) */ --} ne_conn_status; --#endif -- --#if WITH_NEON_MIN_VERSION < 0x002700 -- u->connstatus = connstatus; --#endif -- --/*@-boundsread@*/ --if (_dav_debug < 0) --fprintf(stderr, "*** davNotify(%p,%d,%p) sess %p u %p %s\n", userdata, connstatus, info, sess, u, connstates[ (connstatus < 4 ? connstatus : 4)]); --/*@=boundsread@*/ -- --} -- --static void davCreateRequest(ne_request * req, void * userdata, -- const char * method, const char * uri) -- /*@*/ --{ -- urlinfo u = userdata; -- ne_session * sess; -- void * private = NULL; -- const char * id = "urlinfo"; -- --assert(u != NULL); --assert(u->sess != NULL); --assert(req != NULL); -- sess = ne_get_session(req); --assert(sess == u->sess); --assert(u == ne_get_session_private(sess, "urlinfo")); -- --assert(sess != NULL); -- private = ne_get_session_private(sess, id); --assert(u == private); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davCreateRequest(%p,%p,%s,%s) %s:%p\n", req, userdata, method, uri, id, private); --} -- --static void davPreSend(ne_request * req, void * userdata, ne_buffer * buf) --{ -- urlinfo u = userdata; -- ne_session * sess; -- const char * id = "fd"; -- FD_t fd = NULL; -- --assert(u != NULL); --assert(u->sess != NULL); --assert(req != NULL); -- sess = ne_get_session(req); --assert(sess == u->sess); --assert(u == ne_get_session_private(sess, "urlinfo")); -- -- fd = ne_get_request_private(req, id); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davPreSend(%p,%p,%p) sess %p %s %p\n", req, userdata, buf, sess, id, fd); --if (_dav_debug) --fprintf(stderr, "-> %s\n", buf->data); -- --} -- --static int davPostSend(ne_request * req, void * userdata, const ne_status * status) -- /*@*/ --{ -- urlinfo u = userdata; -- ne_session * sess; -- const char * id = "fd"; -- FD_t fd = NULL; -- --assert(u != NULL); --assert(u->sess != NULL); --assert(req != NULL); -- sess = ne_get_session(req); --assert(sess == u->sess); --assert(u == ne_get_session_private(sess, "urlinfo")); -- -- fd = ne_get_request_private(req, id); -- --/*@-evalorder@*/ --if (_dav_debug < 0) --fprintf(stderr, "*** davPostSend(%p,%p,%p) sess %p %s %p %s\n", req, userdata, status, sess, id, fd, ne_get_error(sess)); --/*@=evalorder@*/ -- return NE_OK; --} -- --static void davDestroyRequest(ne_request * req, void * userdata) -- /*@*/ --{ -- urlinfo u = userdata; -- ne_session * sess; -- const char * id = "fd"; -- FD_t fd = NULL; -- --assert(u != NULL); --assert(u->sess != NULL); --assert(req != NULL); -- sess = ne_get_session(req); --assert(sess == u->sess); --assert(u == ne_get_session_private(sess, "urlinfo")); -- -- fd = ne_get_request_private(req, id); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davDestroyRequest(%p,%p) sess %p %s %p\n", req, userdata, sess, id, fd); --} -- --static void davDestroySession(void * userdata) -- /*@*/ --{ -- urlinfo u = userdata; -- ne_session * sess; -- void * private = NULL; -- const char * id = "urlinfo"; -- --assert(u != NULL); --assert(u->sess != NULL); -- sess = u->sess; --assert(u == ne_get_session_private(sess, "urlinfo")); -- --assert(sess != NULL); -- private = ne_get_session_private(sess, id); --assert(u == private); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davDestroySession(%p) sess %p %s %p\n", userdata, sess, id, private); --} -- --static int --davVerifyCert(void *userdata, int failures, const ne_ssl_certificate *cert) -- /*@*/ --{ -- const char *hostname = userdata; -- --if (_dav_debug < 0) --fprintf(stderr, "*** davVerifyCert(%p,%d,%p) %s\n", userdata, failures, cert, hostname); -- -- return 0; /* HACK: trust all server certificates. */ --} -- --static int davConnect(urlinfo u) -- /*@globals internalState @*/ -- /*@modifies u, internalState @*/ --{ -- const char * path = NULL; -- int rc; -- -- /* HACK: hkp:// has no steenkin' options */ -- if (!(u->urltype == URL_IS_HTTP || u->urltype == URL_IS_HTTPS)) -- return 0; -- -- /* HACK: where should server capabilities be read? */ -- (void) urlPath(u->url, &path); -- /* HACK: perhaps capture Allow: tag, look for PUT permitted. */ -- /* XXX [hdr] Allow: GET,HEAD,POST,OPTIONS,TRACE */ -- rc = ne_options(u->sess, path, u->capabilities); -- switch (rc) { -- case NE_OK: -- { ne_server_capabilities *cap = u->capabilities; -- if (cap->dav_class1) -- u->allow |= RPMURL_SERVER_HASDAVCLASS1; -- else -- u->allow &= ~RPMURL_SERVER_HASDAVCLASS1; -- if (cap->dav_class2) -- u->allow |= RPMURL_SERVER_HASDAVCLASS2; -- else -- u->allow &= ~RPMURL_SERVER_HASDAVCLASS2; -- if (cap->dav_executable) -- u->allow |= RPMURL_SERVER_HASDAVEXEC; -- else -- u->allow &= ~RPMURL_SERVER_HASDAVEXEC; -- } break; -- case NE_ERROR: -- /* HACK: "301 Moved Permanently" on empty subdir. */ -- if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1)) -- break; -- errno = EIO; /* HACK: more precise errno. */ -- goto bottom; -- case NE_LOOKUP: -- errno = ENOENT; /* HACK: errno same as non-existent path. */ -- goto bottom; -- case NE_CONNECT: /* HACK: errno set already? */ -- default: --bottom: --if (_dav_debug) --fprintf(stderr, "*** Connect to %s:%d failed(%d):\n\t%s\n", -- u->host, u->port, rc, ne_get_error(u->sess)); -- break; -- } -- -- /* HACK: sensitive to error returns? */ -- u->httpVersion = (ne_version_pre_http11(u->sess) ? 0 : 1); -- -- return rc; --} -- --static int davInit(const char * url, urlinfo * uret) -- /*@globals internalState @*/ -- /*@modifies *uret, internalState @*/ --{ -- urlinfo u = NULL; -- int rc = 0; -- --/*@-globs@*/ /* FIX: h_errno annoyance. */ -- if (urlSplit(url, &u)) -- return -1; /* XXX error returns needed. */ --/*@=globs@*/ -- -- if (u->url != NULL && u->sess == NULL) -- switch (u->urltype) { -- default: -- assert(u->urltype != u->urltype); -- /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- case URL_IS_HKP: -- { ne_server_capabilities * capabilities; -- -- /* HACK: oneshots should be done Somewhere Else Instead. */ --/*@-noeffect@*/ -- rc = ((_dav_debug < 0) ? NE_DBG_HTTP : 0); -- ne_debug_init(stderr, rc); /* XXX oneshot? */ --/*@=noeffect@*/ -- rc = ne_sock_init(); /* XXX oneshot? */ -- -- u->lockstore = ne_lockstore_create(); /* XXX oneshot? */ -- -- u->capabilities = capabilities = xcalloc(1, sizeof(*capabilities)); -- u->sess = ne_session_create(u->scheme, u->host, u->port); -- -- ne_lockstore_register(u->lockstore, u->sess); -- -- if (u->proxyh != NULL) -- ne_session_proxy(u->sess, u->proxyh, u->proxyp); -- --#if 0 -- { const ne_inet_addr ** addrs; -- unsigned int n; -- ne_set_addrlist(u->sess, addrs, n); -- } --#endif -- -- ne_set_progress(u->sess, davProgress, u); --#if WITH_NEON_MIN_VERSION >= 0x002700 -- ne_set_notifier(u->sess, davNotify, u); --#else -- ne_set_status(u->sess, davNotify, u); --#endif -- -- ne_set_persist(u->sess, 1); -- ne_set_read_timeout(u->sess, httpTimeoutSecs); -- ne_set_useragent(u->sess, PACKAGE "/" PACKAGE_VERSION); -- -- /* XXX check that neon is ssl enabled. */ -- if (!strcasecmp(u->scheme, "https")) -- ne_ssl_set_verify(u->sess, davVerifyCert, (char *)u->host); -- -- ne_set_session_private(u->sess, "urlinfo", u); -- -- ne_hook_destroy_session(u->sess, davDestroySession, u); -- -- ne_hook_create_request(u->sess, davCreateRequest, u); -- ne_hook_pre_send(u->sess, davPreSend, u); -- ne_hook_post_send(u->sess, davPostSend, u); -- ne_hook_destroy_request(u->sess, davDestroyRequest, u); -- -- /* HACK: where should server capabilities be read? */ -- rc = davConnect(u); -- if (rc) -- goto exit; -- } break; -- } -- --exit: --/*@-boundswrite@*/ -- if (uret != NULL) -- *uret = urlLink(u, "davInit"); --/*@=boundswrite@*/ -- u = urlFree(u, "urlSplit (davInit)"); -- -- return rc; --} -- --/* =============================================================== */ --enum fetch_rtype_e { -- resr_normal = 0, -- resr_collection, -- resr_reference, -- resr_error --}; -- --struct fetch_resource_s { --/*@dependent@*/ -- struct fetch_resource_s *next; -- char *uri; --/*@unused@*/ -- char *displayname; -- enum fetch_rtype_e type; -- size_t size; -- time_t modtime; -- int is_executable; -- int is_vcr; /* Is version resource. 0: no vcr, 1 checkin 2 checkout */ -- char *error_reason; /* error string returned for this resource */ -- int error_status; /* error status returned for this resource */ --}; -- --/*@null@*/ --static void *fetch_destroy_item(/*@only@*/ struct fetch_resource_s *res) -- /*@modifies res @*/ --{ -- ne_free(res->uri); -- ne_free(res->error_reason); -- res = _free(res); -- return NULL; --} -- --#ifdef UNUSED --/*@null@*/ --static void *fetch_destroy_list(/*@only@*/ struct fetch_resource_s *res) -- /*@modifies res @*/ --{ -- struct fetch_resource_s *next; --/*@-branchstate@*/ -- for (; res != NULL; res = next) { -- next = res->next; -- res = fetch_destroy_item(res); -- } --/*@=branchstate@*/ -- return NULL; --} --#endif -- --#if WITH_NEON_MIN_VERSION >= 0x002600 --static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const ne_uri *uri) --#else --static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const char *uri) --#endif -- /*@*/ --{ -- struct fetch_resource_s * res = ne_calloc(sizeof(*res)); -- return res; --} -- --/* =============================================================== */ --struct fetch_context_s { --/*@relnull@*/ /*@dependent@*/ -- struct fetch_resource_s **resrock; -- const char *uri; -- unsigned int include_target; /* Include resource at href */ --/*@refcounted@*/ -- urlinfo u; -- int ac; -- int nalloced; -- ARGV_t av; --/*@null@*/ /*@shared@*/ -- struct stat *st; -- mode_t * modes; -- size_t * sizes; -- time_t * mtimes; --}; -- --/*@null@*/ --static void *fetch_destroy_context(/*@only@*/ /*@null@*/ struct fetch_context_s *ctx) -- /*@globals internalState @*/ -- /*@modifies ctx, internalState @*/ --{ -- if (ctx == NULL) -- return NULL; -- if (ctx->av != NULL) -- ctx->av = argvFree(ctx->av); -- ctx->modes = _free(ctx->modes); -- ctx->sizes = _free(ctx->sizes); -- ctx->mtimes = _free(ctx->mtimes); -- ctx->u = urlFree(ctx->u, "fetch_destroy_context"); -- ctx->uri = _free(ctx->uri); --/*@-boundswrite@*/ -- memset(ctx, 0, sizeof(*ctx)); --/*@=boundswrite@*/ -- ctx = _free(ctx); -- return NULL; --} -- --/*@null@*/ --static void *fetch_create_context(const char *uri, /*@null@*/ struct stat *st) -- /*@globals internalState @*/ -- /*@modifies internalState @*/ --{ -- struct fetch_context_s * ctx; -- urlinfo u; -- --/*@-globs@*/ /* FIX: h_errno annoyance. */ -- if (urlSplit(uri, &u)) -- return NULL; --/*@=globs@*/ -- -- ctx = ne_calloc(sizeof(*ctx)); -- ctx->uri = xstrdup(uri); -- ctx->u = urlLink(u, "fetch_create_context"); -- if ((ctx->st = st) != NULL) -- memset(ctx->st, 0, sizeof(*ctx->st)); -- return ctx; --} -- --/*@unchecked@*/ /*@observer@*/ --static const ne_propname fetch_props[] = { -- { "DAV:", "getcontentlength" }, -- { "DAV:", "getlastmodified" }, -- { "http://apache.org/dav/props/", "executable" }, -- { "DAV:", "resourcetype" }, -- { "DAV:", "checked-in" }, -- { "DAV:", "checked-out" }, -- { NULL, NULL } --}; -- --#define ELM_resourcetype (NE_PROPS_STATE_TOP + 1) --#define ELM_collection (NE_PROPS_STATE_TOP + 2) -- --/*@unchecked@*/ /*@observer@*/ --static const struct ne_xml_idmap fetch_idmap[] = { -- { "DAV:", "resourcetype", ELM_resourcetype }, -- { "DAV:", "collection", ELM_collection } --}; -- --static int fetch_startelm(void *userdata, int parent, -- const char *nspace, const char *name, -- /*@unused@*/ const char **atts) -- /*@*/ --{ -- ne_propfind_handler *pfh = userdata; -- struct fetch_resource_s *r = ne_propfind_current_private(pfh); -- int state = ne_xml_mapid(fetch_idmap, NE_XML_MAPLEN(fetch_idmap), -- nspace, name); -- -- if (r == NULL || -- !((parent == NE_207_STATE_PROP && state == ELM_resourcetype) || -- (parent == ELM_resourcetype && state == ELM_collection))) -- return NE_XML_DECLINE; -- -- if (state == ELM_collection) { -- r->type = resr_collection; -- } -- -- return state; --} -- --static int fetch_compare(const struct fetch_resource_s *r1, -- const struct fetch_resource_s *r2) -- /*@*/ --{ -- /* Sort errors first, then collections, then alphabetically */ -- if (r1->type == resr_error) { -- return -1; -- } else if (r2->type == resr_error) { -- return 1; -- } else if (r1->type == resr_collection) { -- if (r2->type != resr_collection) { -- return -1; -- } else { -- return strcmp(r1->uri, r2->uri); -- } -- } else { -- if (r2->type != resr_collection) { -- return strcmp(r1->uri, r2->uri); -- } else { -- return 1; -- } -- } --} -- --#if WITH_NEON_MIN_VERSION >= 0x002600 --static void fetch_results(void *userdata, const ne_uri *uarg, -- const ne_prop_result_set *set) --#else --static void fetch_results(void *userdata, void *uarg, -- const ne_prop_result_set *set) --#endif -- /*@*/ --{ -- struct fetch_context_s *ctx = userdata; -- struct fetch_resource_s *current, *previous, *newres; -- const char *clength, *modtime, *isexec; -- const char *checkin, *checkout; -- const ne_status *status = NULL; -- const char * path = NULL; -- --#if WITH_NEON_MIN_VERSION >= 0x002600 -- const ne_uri * uri = uarg; -- (void) urlPath(uri->path, &path); --#else -- const char * uri = uarg; -- (void) urlPath(uri, &path); --#endif -- if (path == NULL) -- return; -- -- newres = ne_propset_private(set); -- --if (_dav_debug < 0) --fprintf(stderr, "==> %s in uri %s\n", path, ctx->uri); -- -- if (ne_path_compare(ctx->uri, path) == 0 && !ctx->include_target) { -- /* This is the target URI */ --if (_dav_debug < 0) --fprintf(stderr, "==> %s skipping target resource.\n", path); -- /* Free the private structure. */ --/*@-dependenttrans -exposetrans@*/ -- free(newres); --/*@=dependenttrans =exposetrans@*/ -- return; -- } -- -- newres->uri = ne_strdup(path); -- --/*@-boundsread@*/ -- clength = ne_propset_value(set, &fetch_props[0]); -- modtime = ne_propset_value(set, &fetch_props[1]); -- isexec = ne_propset_value(set, &fetch_props[2]); -- checkin = ne_propset_value(set, &fetch_props[4]); -- checkout = ne_propset_value(set, &fetch_props[5]); --/*@=boundsread@*/ -- --/*@-branchstate@*/ -- if (clength == NULL) -- status = ne_propset_status(set, &fetch_props[0]); -- if (modtime == NULL) -- status = ne_propset_status(set, &fetch_props[1]); --/*@=branchstate@*/ -- -- if (newres->type == resr_normal && status != NULL) { -- /* It's an error! */ -- newres->error_status = status->code; -- -- /* Special hack for Apache 1.3/mod_dav */ -- if (strcmp(status->reason_phrase, "status text goes here") == 0) { -- const char *desc; -- if (status->code == 401) { -- desc = _("Authorization Required"); -- } else if (status->klass == 3) { -- desc = _("Redirect"); -- } else if (status->klass == 5) { -- desc = _("Server Error"); -- } else { -- desc = _("Unknown Error"); -- } -- newres->error_reason = ne_strdup(desc); -- } else { -- newres->error_reason = ne_strdup(status->reason_phrase); -- } -- newres->type = resr_error; -- } -- -- if (isexec && strcasecmp(isexec, "T") == 0) { -- newres->is_executable = 1; -- } else { -- newres->is_executable = 0; -- } -- -- if (modtime) -- newres->modtime = ne_httpdate_parse(modtime); -- -- if (clength) -- newres->size = atoi(clength); -- -- /* is vcr */ -- if (checkin) { -- newres->is_vcr = 1; -- } else if (checkout) { -- newres->is_vcr = 2; -- } else { -- newres->is_vcr = 0; -- } -- -- for (current = *ctx->resrock, previous = NULL; current != NULL; -- previous = current, current = current->next) -- { -- if (fetch_compare(current, newres) >= 0) { -- break; -- } -- } -- if (previous) { -- previous->next = newres; -- } else { --/*@-boundswrite -dependenttrans @*/ -- *ctx->resrock = newres; --/*@=boundswrite =dependenttrans @*/ -- } -- newres->next = current; --} -- --static int davFetch(const urlinfo u, struct fetch_context_s * ctx) -- /*@globals internalState @*/ -- /*@modifies ctx, internalState @*/ --{ -- const char * path = NULL; -- int depth = 1; /* XXX passed arg? */ -- unsigned int include_target = 0; /* XXX passed arg? */ -- struct fetch_resource_s * resitem = NULL; -- struct fetch_resource_s ** resrock = &resitem; /* XXX passed arg? */ -- ne_propfind_handler *pfh; -- struct fetch_resource_s *current, *next; -- mode_t st_mode; -- int rc = 0; -- int xx; -- -- (void) urlPath(u->url, &path); -- pfh = ne_propfind_create(u->sess, ctx->uri, depth); -- -- /* HACK: need to set RPMURL_SERVER_HASRANGE in u->allow here. */ -- -- ctx->resrock = resrock; -- ctx->include_target = include_target; -- -- ne_xml_push_handler(ne_propfind_get_parser(pfh), -- fetch_startelm, NULL, NULL, pfh); -- -- ne_propfind_set_private(pfh, fetch_create_item, NULL); -- -- rc = ne_propfind_named(pfh, fetch_props, fetch_results, ctx); -- -- ne_propfind_destroy(pfh); -- -- for (current = resitem; current != NULL; current = next) { -- const char *s, *se; -- char * val; -- -- next = current->next; -- -- /* Collections have trailing '/' that needs trim. */ -- /* The top level collection is returned as well. */ -- se = current->uri + strlen(current->uri); -- if (se[-1] == '/') { -- if (strlen(current->uri) <= strlen(path)) { -- current = fetch_destroy_item(current); -- continue; -- } -- se--; -- } -- s = se; -- while (s > current->uri && s[-1] != '/') -- s--; -- -- val = ne_strndup(s, (se - s)); -- --/*@-nullpass@*/ -- val = ne_path_unescape(val); --/*@=nullpass@*/ -- -- xx = argvAdd(&ctx->av, val); --if (_dav_debug < 0) --fprintf(stderr, "*** argvAdd(%p,\"%s\")\n", &ctx->av, val); -- ne_free(val); -- -- while (ctx->ac >= ctx->nalloced) { -- if (ctx->nalloced <= 0) -- ctx->nalloced = 1; -- ctx->nalloced *= 2; -- ctx->modes = xrealloc(ctx->modes, -- (sizeof(*ctx->modes) * ctx->nalloced)); -- ctx->sizes = xrealloc(ctx->sizes, -- (sizeof(*ctx->sizes) * ctx->nalloced)); -- ctx->mtimes = xrealloc(ctx->mtimes, -- (sizeof(*ctx->mtimes) * ctx->nalloced)); -- } -- -- switch (current->type) { -- case resr_normal: -- st_mode = S_IFREG; -- /*@switchbreak@*/ break; -- case resr_collection: -- st_mode = S_IFDIR; -- /*@switchbreak@*/ break; -- case resr_reference: -- case resr_error: -- default: -- st_mode = 0; -- /*@switchbreak@*/ break; -- } --/*@-boundswrite@*/ -- ctx->modes[ctx->ac] = st_mode; -- ctx->sizes[ctx->ac] = current->size; -- ctx->mtimes[ctx->ac] = current->modtime; --/*@=boundswrite@*/ -- ctx->ac++; -- -- current = fetch_destroy_item(current); -- } -- ctx->resrock = NULL; /* HACK: avoid leaving stack reference. */ -- /* HACK realloc to truncate modes/sizes/mtimes */ -- -- return rc; --} -- --/* HACK this should be rewritten to use davReq/davResp w callbacks. */ --static int davHEAD(urlinfo u, struct stat *st) -- /*@modifies *st @*/ --{ -- ne_request *req; -- const char *htag; -- const char *value = NULL; -- int rc; -- -- st->st_mode = S_IFREG; -- st->st_blksize = 4 * 1024; /* HACK correct for linux ext */ -- st->st_size = -1; -- st->st_atime = -1; -- st->st_mtime = -1; -- st->st_ctime = -1; -- -- req = ne_request_create(u->sess, "HEAD", u->url); -- -- rc = ne_request_dispatch(req); -- switch (rc) { -- default: -- goto exit; -- /*@notreached@*/ -- case NE_OK: -- if (ne_get_status(req)->klass != 2) { -- rc = NE_ERROR; -- goto exit; -- } -- break; -- } -- --#ifdef NOTYET -- htag = "ETag"; -- value = ne_get_response_header(req, htag); -- if (value) { -- /* inode-size-mtime */ -- } --#endif -- -- htag = "Content-Length"; --#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER) -- value = ne_get_response_header(req, htag); --#endif -- if (value) { -- st->st_size = strtoll(value, NULL, 10); -- st->st_blocks = (st->st_size + 511)/512; -- } -- -- htag = "Last-Modified"; --#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER) -- value = ne_get_response_header(req, htag); --#endif -- if (value) { -- st->st_mtime = ne_httpdate_parse(value); -- st->st_atime = st->st_ctime = st->st_mtime; /* HACK */ -- } -- --exit: -- ne_request_destroy(req); -- return rc; --} -- --static int davNLST(struct fetch_context_s * ctx) -- /*@globals internalState @*/ -- /*@modifies ctx, internalState @*/ --{ -- urlinfo u = NULL; -- int rc; -- int xx; -- -- rc = davInit(ctx->uri, &u); -- if (rc || u == NULL) -- goto exit; -- --/* HACK do PROPFIND through davFetch iff enabled, otherwise HEAD Content-length/ETag/Last-Modified */ -- if (u->allow & RPMURL_SERVER_HASDAV) -- rc = davFetch(u, ctx); /* use PROPFIND to get contentLength */ -- else -- rc = davHEAD(u, ctx->st); /* use HEAD to get contentLength */ -- -- switch (rc) { -- case NE_OK: -- break; -- case NE_ERROR: -- /* HACK: "405 Method Not Allowed" for PROPFIND on non-DAV servers. */ -- /* XXX #206066 OPTIONS is ok, but PROPFIND from Stat() fails. */ -- /* rpm -qp --rpmiodebug --davdebug http://people.freedesktop.org/~sandmann/metacity-2.16.0-2.fc6/i386/metacity-2.16.0-2.fc6.i386.rpm */ -- /* HACK: "301 Moved Permanently" on empty subdir. */ -- if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1)) -- break; -- /*@fallthrough@*/ -- default: --if (_dav_debug) --fprintf(stderr, "*** Fetch from %s:%d failed:\n\t%s\n", -- u->host, u->port, ne_get_error(u->sess)); -- break; -- } -- --exit: -- xx = davFree(u); -- return rc; --} -- --/* =============================================================== */ --static int my_result(const char * msg, int ret, /*@null@*/ FILE * fp) -- /*@modifies *fp @*/ --{ -- /* HACK: don't print unless debugging. */ -- if (_dav_debug >= 0) -- return ret; -- if (fp == NULL) -- fp = stderr; -- if (msg != NULL) -- fprintf(fp, "*** %s: ", msg); -- -- /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */ --#ifdef HACK -- fprintf(fp, "%s: %s\n", ftpStrerror(-ret), ne_get_error(sess)); --#else -- fprintf(fp, "%s\n", ftpStrerror(-ret)); --#endif -- return ret; --} -- --#ifdef DYING --static void hexdump(const unsigned char * buf, ssize_t len) -- /*@*/ --{ -- int i; -- if (len <= 0) -- return; -- for (i = 0; i < len; i++) { -- if (i != 0 && (i%16) == 0) -- fprintf(stderr, "\n"); -- fprintf(stderr, " %02X", buf[i]); -- } -- fprintf(stderr, "\n"); --} --#endif -- --/*@-mustmod@*/ --static void davAcceptRanges(void * userdata, /*@null@*/ const char * value) -- /*@modifies userdata @*/ --{ -- urlinfo u = userdata; -- -- if (!(u != NULL && value != NULL)) return; --if (_dav_debug < 0) --fprintf(stderr, "*** u %p Accept-Ranges: %s\n", u, value); -- if (!strcmp(value, "bytes")) -- u->allow |= RPMURL_SERVER_HASRANGE; -- if (!strcmp(value, "none")) -- u->allow &= ~RPMURL_SERVER_HASRANGE; --} --/*@=mustmod@*/ -- --#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER) --static void davAllHeaders(void * userdata, const char * value) --{ -- FD_t ctrl = userdata; -- -- if (!(ctrl != NULL && value != NULL)) return; --if (_dav_debug) --fprintf(stderr, "<- %s\n", value); --} --#endif -- --/*@-mustmod@*/ --static void davContentLength(void * userdata, /*@null@*/ const char * value) -- /*@modifies userdata @*/ --{ -- FD_t ctrl = userdata; -- -- if (!(ctrl != NULL && value != NULL)) return; --if (_dav_debug < 0) --fprintf(stderr, "*** fd %p Content-Length: %s\n", ctrl, value); --/*@-unrecog@*/ -- ctrl->contentLength = strtoll(value, NULL, 10); --/*@=unrecog@*/ --} --/*@=mustmod@*/ -- --/*@-mustmod@*/ --static void davConnection(void * userdata, /*@null@*/ const char * value) -- /*@modifies userdata @*/ --{ -- FD_t ctrl = userdata; -- -- if (!(ctrl != NULL && value != NULL)) return; --if (_dav_debug < 0) --fprintf(stderr, "*** fd %p Connection: %s\n", ctrl, value); -- if (!strcasecmp(value, "close")) -- ctrl->persist = 0; -- else if (!strcasecmp(value, "Keep-Alive")) -- ctrl->persist = 1; --} --/*@=mustmod@*/ -- --/*@-mustmod@*/ /* HACK: stash error in *str. */ --int davResp(urlinfo u, FD_t ctrl, /*@unused@*/ char *const * str) --{ -- int rc = 0; -- -- rc = ne_begin_request(ctrl->req); -- rc = my_result("ne_begin_req(ctrl->req)", rc, NULL); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davResp(%p,%p,%p) sess %p req %p rc %d\n", u, ctrl, str, u->sess, ctrl->req, rc); -- -- /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */ --/*@-observertrans@*/ -- if (rc) -- fdSetSyserrno(ctrl, errno, ftpStrerror(-rc)); --/*@=observertrans@*/ -- -- return rc; --} --/*@=mustmod@*/ -- --int davReq(FD_t ctrl, const char * httpCmd, const char * httpArg) --{ -- urlinfo u; -- int rc = 0; -- --assert(ctrl != NULL); -- u = ctrl->url; -- URLSANE(u); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davReq(%p,%s,\"%s\") entry sess %p req %p\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req); -- -- ctrl->persist = (u->httpVersion > 0 ? 1 : 0); -- ctrl = fdLink(ctrl, "open ctrl (davReq)"); -- --assert(u->sess != NULL); --assert(ctrl->req == NULL); --/*@-nullpass@*/ -- ctrl->req = ne_request_create(u->sess, httpCmd, httpArg); --/*@=nullpass@*/ --assert(ctrl->req != NULL); -- -- ne_set_request_private(ctrl->req, "fd", ctrl); -- --#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER) -- ne_add_response_header_catcher(ctrl->req, davAllHeaders, ctrl); -- -- ne_add_response_header_handler(ctrl->req, "Content-Length", -- davContentLength, ctrl); -- ne_add_response_header_handler(ctrl->req, "Connection", -- davConnection, ctrl); --#endif -- -- if (!strcmp(httpCmd, "PUT")) { --#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) -- ctrl->wr_chunked = 1; -- ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked"); -- ne_set_request_chunked(ctrl->req, 1); -- /* HACK: no retries if/when chunking. */ -- rc = davResp(u, ctrl, NULL); --#else -- rc = FTPERR_SERVER_IO_ERROR; --#endif -- } else { -- /* HACK: possible Last-Modified: Tue, 02 Nov 2004 14:29:36 GMT */ -- /* HACK: possible ETag: "inode-size-mtime" */ --#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER) -- ne_add_response_header_handler(ctrl->req, "Accept-Ranges", -- davAcceptRanges, u); --#endif -- /* HACK: possible Transfer-Encoding: on GET. */ -- -- /* HACK: other errors may need retry too. */ -- /* HACK: neon retries once, gud enuf. */ -- /* HACK: retry counter? */ -- do { -- rc = davResp(u, ctrl, NULL); -- } while (rc == NE_RETRY); -- } -- if (rc) -- goto errxit; -- --if (_dav_debug < 0) --fprintf(stderr, "*** davReq(%p,%s,\"%s\") exit sess %p req %p rc %d\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req, rc); -- --#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER) -- davContentLength(ctrl, -- ne_get_response_header(ctrl->req, "Content-Length")); -- davConnection(ctrl, -- ne_get_response_header(ctrl->req, "Connection")); -- if (strcmp(httpCmd, "PUT")) -- davAcceptRanges(u, -- ne_get_response_header(ctrl->req, "Accept-Ranges")); --#endif -- -- ctrl = fdLink(ctrl, "open data (davReq)"); -- return 0; -- --errxit: --/*@-observertrans@*/ -- fdSetSyserrno(ctrl, errno, ftpStrerror(rc)); --/*@=observertrans@*/ -- -- /* HACK balance fd refs. ne_session_destroy to tear down non-keepalive? */ -- ctrl = fdLink(ctrl, "error data (davReq)"); -- -- return rc; --} -- --FD_t davOpen(const char * url, /*@unused@*/ int flags, -- /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret) --{ -- const char * path = NULL; -- urltype urlType = urlPath(url, &path); -- urlinfo u = NULL; -- FD_t fd = NULL; -- int rc; -- --#if 0 /* XXX makeTempFile() heartburn */ -- assert(!(flags & O_RDWR)); --#endif -- --if (_dav_debug < 0) --fprintf(stderr, "*** davOpen(%s,0x%x,0%o,%p)\n", url, flags, mode, uret); -- rc = davInit(url, &u); -- if (rc || u == NULL || u->sess == NULL) -- goto exit; -- -- if (u->ctrl == NULL) -- u->ctrl = fdNew("persist ctrl (davOpen)"); -- if (u->ctrl->nrefs > 2 && u->data == NULL) -- u->data = fdNew("persist data (davOpen)"); -- -- if (u->ctrl->url == NULL) -- fd = fdLink(u->ctrl, "grab ctrl (davOpen persist ctrl)"); -- else if (u->data->url == NULL) -- fd = fdLink(u->data, "grab ctrl (davOpen persist data)"); -- else -- fd = fdNew("grab ctrl (davOpen)"); -- -- if (fd) { -- fdSetOpen(fd, url, flags, mode); -- fdSetIo(fd, ufdio); -- -- fd->ftpFileDoneNeeded = 0; -- fd->rd_timeoutsecs = httpTimeoutSecs; -- fd->contentLength = fd->bytesRemain = -1; -- fd->url = urlLink(u, "url (davOpen)"); -- fd = fdLink(fd, "grab data (davOpen)"); --assert(urlType == URL_IS_HTTPS || urlType == URL_IS_HTTP || urlType == URL_IS_HKP); -- fd->urlType = urlType; -- } -- --exit: --/*@-boundswrite@*/ -- if (uret) -- *uret = u; --/*@=boundswrite@*/ -- /*@-refcounttrans@*/ -- return fd; -- /*@=refcounttrans@*/ --} -- --ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count) --{ -- FD_t fd = cookie; -- ssize_t rc; -- --#if 0 --assert(count >= 128); /* HACK: see ne_request.h comment */ --#endif -- rc = ne_read_response_block(fd->req, buf, count); -- --if (_dav_debug < 0) { --fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc); --#ifdef DYING --hexdump(buf, rc); --#endif -- } -- -- return rc; --} -- --ssize_t davWrite(void * cookie, const char * buf, size_t count) --{ --#if !defined(NEONBLOWSCHUNKS) || defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__) -- FD_t fd = cookie; --#endif -- ssize_t rc; -- int xx = -1; -- --#if !defined(NEONBLOWSCHUNKS) -- ne_session * sess; -- --assert(fd->req != NULL); -- sess = ne_get_session(fd->req); --assert(sess != NULL); -- -- /* HACK: include ne_private.h to access sess->socket for now. */ -- xx = ne_sock_fullwrite(sess->socket, buf, count); --#else --#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__) --assert(fd->req != NULL); -- xx = ne_send_request_chunk(fd->req, buf, count); --#else -- errno = EIO; /* HACK */ -- return -1; --#endif --#endif -- -- /* HACK: stupid error impedence matching. */ -- rc = (xx == 0 ? count : -1); -- --if (_dav_debug < 0) --fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc); --#ifdef DYING --if (count > 0) --hexdump(buf, count); --#endif -- -- return rc; --} -- --int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence) --{ --if (_dav_debug < 0) --fprintf(stderr, "*** davSeek(%p,pos,%d)\n", cookie, whence); -- return -1; --} -- --/*@-mustmod@*/ /* HACK: fd->req is modified. */ --int davClose(void * cookie) --{ --/*@-onlytrans@*/ -- FD_t fd = cookie; --/*@=onlytrans@*/ -- int rc; -- --assert(fd->req != NULL); -- rc = ne_end_request(fd->req); -- rc = my_result("ne_end_request(req)", rc, NULL); -- -- ne_request_destroy(fd->req); -- fd->req = NULL; -- --if (_dav_debug < 0) --fprintf(stderr, "*** davClose(%p) rc %d\n", fd, rc); -- return rc; --} --/*@=mustmod@*/ -- --/* =============================================================== */ --int davMkdir(const char * path, mode_t mode) --{ -- urlinfo u = NULL; -- const char * src = NULL; -- int rc; -- -- rc = davInit(path, &u); -- if (rc) -- goto exit; -- -- (void) urlPath(path, &src); -- -- rc = ne_mkcol(u->sess, path); -- -- if (rc) rc = -1; /* XXX HACK: errno impedance match */ -- -- /* XXX HACK: verify getrestype(remote) == resr_collection */ -- --exit: --if (_dav_debug) --fprintf(stderr, "*** davMkdir(%s,0%o) rc %d\n", path, mode, rc); -- return rc; --} -- --int davRmdir(const char * path) --{ -- urlinfo u = NULL; -- const char * src = NULL; -- int rc; -- -- rc = davInit(path, &u); -- if (rc) -- goto exit; -- -- (void) urlPath(path, &src); -- -- /* XXX HACK: only getrestype(remote) == resr_collection */ -- -- rc = ne_delete(u->sess, path); -- -- if (rc) rc = -1; /* XXX HACK: errno impedance match */ -- --exit: --if (_dav_debug) --fprintf(stderr, "*** davRmdir(%s) rc %d\n", path, rc); -- return rc; --} -- --int davRename(const char * oldpath, const char * newpath) --{ -- urlinfo u = NULL; -- const char * src = NULL; -- const char * dst = NULL; -- int overwrite = 1; /* HACK: set this correctly. */ -- int rc; -- -- rc = davInit(oldpath, &u); -- if (rc) -- goto exit; -- -- (void) urlPath(oldpath, &src); -- (void) urlPath(newpath, &dst); -- -- /* XXX HACK: only getrestype(remote) != resr_collection */ -- -- rc = ne_move(u->sess, overwrite, src, dst); -- -- if (rc) rc = -1; /* XXX HACK: errno impedance match */ -- --exit: --if (_dav_debug) --fprintf(stderr, "*** davRename(%s,%s) rc %d\n", oldpath, newpath, rc); -- return rc; --} -- --int davUnlink(const char * path) --{ -- urlinfo u = NULL; -- const char * src = NULL; -- int rc; -- -- rc = davInit(path, &u); -- if (rc) -- goto exit; -- -- (void) urlPath(path, &src); -- -- /* XXX HACK: only getrestype(remote) != resr_collection */ -- -- rc = ne_delete(u->sess, src); -- --exit: -- if (rc) rc = -1; /* XXX HACK: errno impedance match */ -- --if (_dav_debug) --fprintf(stderr, "*** davUnlink(%s) rc %d\n", path, rc); -- return rc; --} -- --#ifdef NOTYET --static int davChdir(const char * path) -- /*@globals h_errno, fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/ --{ -- return davCommand("CWD", path, NULL); --} --#endif /* NOTYET */ -- --/* =============================================================== */ -- --static const char * statstr(const struct stat * st, -- /*@returned@*/ /*@out@*/ char * buf) -- /*@modifies *buf @*/ --{ -- sprintf(buf, -- "*** dev %x ino %x mode %0o nlink %d uid %d gid %d rdev %x size %x\n", -- (unsigned)st->st_dev, -- (unsigned)st->st_ino, -- st->st_mode, -- (unsigned)st->st_nlink, -- st->st_uid, -- st->st_gid, -- (unsigned)st->st_rdev, -- (unsigned)st->st_size); -- return buf; --} -- --/*@unchecked@*/ --static unsigned int dav_st_ino = 0xdead0000; -- --/*@-boundswrite@*/ --int davStat(const char * path, /*@out@*/ struct stat *st) -- /*@globals dav_st_ino, fileSystem, internalState @*/ -- /*@modifies *st, dav_st_ino, fileSystem, internalState @*/ --{ -- struct fetch_context_s * ctx = NULL; -- char buf[1024]; -- int rc = -1; -- --/* HACK: neon really wants collections with trailing '/' */ -- ctx = fetch_create_context(path, st); -- if (ctx == NULL) { --fprintf(stderr, "==> %s fetch_create_context ctx %p\n", "davStat", ctx); --/* HACK: errno = ??? */ -- goto exit; -- } -- rc = davNLST(ctx); -- if (rc) { --/* HACK: errno = ??? */ -- goto exit; -- } -- -- if (st->st_mode == 0) -- st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG); -- st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size); -- st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime); -- st->st_atime = st->st_ctime = st->st_mtime; /* HACK */ -- if (S_ISDIR(st->st_mode)) { -- st->st_nlink = 2; -- st->st_mode |= 0755; -- } else -- if (S_ISREG(st->st_mode)) { -- st->st_nlink = 1; -- st->st_mode |= 0644; -- } -- -- /* XXX fts(3) needs/uses st_ino, make something up for now. */ -- if (st->st_ino == 0) -- st->st_ino = dav_st_ino++; -- --exit: --if (_dav_debug < 0) --fprintf(stderr, "*** davStat(%s) rc %d\n%s", path, rc, statstr(st, buf)); -- ctx = fetch_destroy_context(ctx); -- return rc; --} --/*@=boundswrite@*/ -- --/*@-boundswrite@*/ --int davLstat(const char * path, /*@out@*/ struct stat *st) -- /*@globals dav_st_ino, fileSystem, internalState @*/ -- /*@modifies *st, dav_st_ino, fileSystem, internalState @*/ --{ -- struct fetch_context_s * ctx = NULL; -- char buf[1024]; -- int rc = -1; -- --/* HACK: neon really wants collections with trailing '/' */ -- ctx = fetch_create_context(path, st); -- if (ctx == NULL) { --/* HACK: errno = ??? */ -- goto exit; -- } -- rc = davNLST(ctx); -- if (rc) { --/* HACK: errno = ??? */ -- goto exit; -- } -- -- if (st->st_mode == 0) -- st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG); -- st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size); -- st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime); -- st->st_atime = st->st_ctime = st->st_mtime; /* HACK */ -- if (S_ISDIR(st->st_mode)) { -- st->st_nlink = 2; -- st->st_mode |= 0755; -- } else -- if (S_ISREG(st->st_mode)) { -- st->st_nlink = 1; -- st->st_mode |= 0644; -- } -- -- /* XXX fts(3) needs/uses st_ino, make something up for now. */ -- if (st->st_ino == 0) -- st->st_ino = dav_st_ino++; --if (_dav_debug < 0) --fprintf(stderr, "*** davLstat(%s) rc %d\n%s\n", path, rc, statstr(st, buf)); --exit: -- ctx = fetch_destroy_context(ctx); -- return rc; --} --/*@=boundswrite@*/ -- --#ifdef NOTYET --static int davReadlink(const char * path, /*@out@*/ char * buf, size_t bufsiz) -- /*@globals h_errno, fileSystem, internalState @*/ -- /*@modifies *buf, fileSystem, internalState @*/ --{ -- int rc; -- rc = davNLST(path, DO_FTP_READLINK, NULL, buf, bufsiz); --if (_dav_debug < 0) --fprintf(stderr, "*** davReadlink(%s) rc %d\n", path, rc); -- return rc; --} --#endif /* NOTYET */ -- - /* =============================================================== */ - /*@unchecked@*/ - int avmagicdir = 0x3607113; -@@ -1660,179 +145,3 @@ - /*@=kepttrans@*/ - } - /*@=boundswrite@*/ -- --/* =============================================================== */ --/*@unchecked@*/ --int davmagicdir = 0x8440291; -- --int davClosedir(/*@only@*/ DIR * dir) --{ -- DAVDIR avdir = (DAVDIR)dir; -- --if (_dav_debug < 0) --fprintf(stderr, "*** davClosedir(%p)\n", avdir); -- --#if defined(HAVE_PTHREAD_H) --/*@-moduncon -noeffectuncon @*/ -- (void) pthread_mutex_destroy(&avdir->lock); --/*@=moduncon =noeffectuncon @*/ --#endif -- -- avdir = _free(avdir); -- return 0; --} -- --struct dirent * davReaddir(DIR * dir) --{ -- DAVDIR avdir = (DAVDIR)dir; -- struct dirent * dp; -- const char ** av; -- unsigned char * dt; -- int ac; -- int i; -- -- if (avdir == NULL || !ISDAVMAGIC(avdir) || avdir->data == NULL) { -- /* XXX TODO: EBADF errno. */ -- return NULL; -- } -- -- dp = (struct dirent *) avdir->data; -- av = (const char **) (dp + 1); -- ac = avdir->size; -- dt = (unsigned char *) (av + (ac + 1)); -- i = avdir->offset + 1; -- --/*@-boundsread@*/ -- if (i < 0 || i >= ac || av[i] == NULL) -- return NULL; --/*@=boundsread@*/ -- -- avdir->offset = i; -- -- /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */ --/*@-type@*/ -- dp->d_ino = i + 1; /* W2DO? */ -- dp->d_reclen = 0; /* W2DO? */ -- --#if !(defined(hpux) || defined(__hpux) || defined(sun)) --#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__) -- dp->d_off = 0; /* W2DO? */ --#endif --/*@-boundsread@*/ -- dp->d_type = dt[i]; --/*@=boundsread@*/ --#endif --/*@=type@*/ -- -- strncpy(dp->d_name, av[i], sizeof(dp->d_name)); --if (_dav_debug < 0) --fprintf(stderr, "*** davReaddir(%p) %p \"%s\"\n", (void *)avdir, dp, dp->d_name); -- -- return dp; --} -- --/*@-boundswrite@*/ --DIR * davOpendir(const char * path) --{ -- struct fetch_context_s * ctx; -- DAVDIR avdir; -- struct dirent * dp; -- size_t nb; -- const char ** av, ** nav; -- unsigned char * dt; -- char * t; -- int ac, nac; -- int rc; -- -- /* HACK: glob does not pass dirs with trailing '/' */ -- nb = strlen(path)+1; --/*@-branchstate@*/ -- if (path[nb-1] != '/') { -- char * npath = alloca(nb+1); -- *npath = '\0'; -- (void) stpcpy( stpcpy(npath, path), "/"); -- path = npath; -- } --/*@=branchstate@*/ -- --if (_dav_debug < 0) --fprintf(stderr, "*** davOpendir(%s)\n", path); -- -- /* Load DAV collection into argv. */ -- ctx = fetch_create_context(path, NULL); -- if (ctx == NULL) { --/* HACK: errno = ??? */ -- return NULL; -- } -- rc = davNLST(ctx); -- if (rc) { --/* HACK: errno = ??? */ -- return NULL; -- } -- -- nb = 0; -- ac = 0; -- av = ctx->av; -- if (av != NULL) -- while (av[ac] != NULL) -- nb += strlen(av[ac++]) + 1; -- ac += 2; /* for "." and ".." */ -- nb += sizeof(".") + sizeof(".."); -- -- nb += sizeof(*avdir) + sizeof(*dp) + ((ac + 1) * sizeof(*av)) + (ac + 1); -- avdir = xcalloc(1, nb); -- /*@-abstract@*/ -- dp = (struct dirent *) (avdir + 1); -- nav = (const char **) (dp + 1); -- dt = (unsigned char *) (nav + (ac + 1)); -- t = (char *) (dt + ac + 1); -- /*@=abstract@*/ -- -- avdir->fd = davmagicdir; --/*@-usereleased@*/ -- avdir->data = (char *) dp; --/*@=usereleased@*/ -- avdir->allocation = nb; -- avdir->size = ac; -- avdir->offset = -1; -- avdir->filepos = 0; -- --#if defined(HAVE_PTHREAD_H) --/*@-moduncon -noeffectuncon -nullpass @*/ -- (void) pthread_mutex_init(&avdir->lock, NULL); --/*@=moduncon =noeffectuncon =nullpass @*/ --#endif -- -- nac = 0; --/*@-dependenttrans -unrecog@*/ -- dt[nac] = DT_DIR; nav[nac++] = t; t = stpcpy(t, "."); t++; -- dt[nac] = DT_DIR; nav[nac++] = t; t = stpcpy(t, ".."); t++; --/*@=dependenttrans =unrecog@*/ -- -- /* Copy DAV items into DIR elments. */ -- ac = 0; -- if (av != NULL) -- while (av[ac] != NULL) { -- nav[nac] = t; -- dt[nac] = (S_ISDIR(ctx->modes[ac]) ? DT_DIR : DT_REG); -- t = stpcpy(t, av[ac]); -- ac++; -- t++; -- nac++; -- } -- nav[nac] = NULL; -- -- ctx = fetch_destroy_context(ctx); -- --/*@-kepttrans@*/ -- return (DIR *) avdir; --/*@=kepttrans@*/ --} --/*@=modfilesys@*/ -- --char * davRealpath(const char * path, char * resolved_path) --{ --assert(resolved_path == NULL); /* XXX no POSIXly broken realpath(3) here. */ -- /* XXX TODO: handle redirects. For now, just dupe the path. */ -- return xstrdup(path); --} ---- rpm-4.5/rpmio/rpmdav.h 2007-05-25 20:36:36.000000000 +0300 -+++ rpm-4.4.9/rpmio/rpmdav.h 2008-09-04 17:21:50.369579599 +0300 -@@ -46,12 +46,6 @@ - extern int avmagicdir; - #define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir))) - --/** -- */ --/*@unchecked@*/ --extern int davmagicdir; --#define ISDAVMAGIC(_dir) (!memcmp((_dir), &davmagicdir, sizeof(davmagicdir))) -- - #ifdef __cplusplus - extern "C" { - #endif -@@ -85,133 +79,6 @@ - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; - --/** -- * Send a http request. -- * @param ctrl -- * @param httpCmd http command -- * @param httpArg http command argument (NULL if none) -- * @returns 0 on success -- */ --int davReq(FD_t ctrl, const char * httpCmd, /*@null@*/ const char * httpArg) -- /*@globals fileSystem, internalState @*/ -- /*@modifies ctrl, fileSystem, internalState @*/; -- --/** -- * Read a http response. -- * @param u -- * @param cntl -- * @retval *str error msg -- * @returns 0 on success -- */ --/*@-exportlocal@*/ --int davResp(urlinfo u, FD_t ctrl, /*@out@*/ /*@null@*/ char *const * str) -- /*@globals fileSystem, internalState @*/ -- /*@modifies ctrl, *str, fileSystem, internalState @*/; --/*@=exportlocal@*/ -- --/** -- */ --/*@null@*/ --FD_t davOpen(const char * url, /*@unused@*/ int flags, -- /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret) -- /*@globals internalState @*/ -- /*@modifies *uret, internalState @*/; -- --/** -- */ --/*@-incondefs@*/ --ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count) -- /*@globals fileSystem, internalState @*/ -- /*@modifies buf, fileSystem, internalState @*/ -- /*@requires maxSet(buf) >= (count - 1) @*/ -- /*@ensures maxRead(buf) == result @*/; --/*@=incondefs@*/ -- --/** -- */ --ssize_t davWrite(void * cookie, const char * buf, size_t count) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- */ --int davSeek(void * cookie, _libio_pos_t pos, int whence) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- */ --int davClose(void * cookie) -- /*@globals fileSystem, internalState @*/ -- /*@modifies cookie, fileSystem, internalState @*/; -- --/** -- */ --int davMkdir(const char * path, mode_t mode) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- */ --int davRmdir(const char * path) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- */ --int davRename(const char * oldpath, const char * newpath) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- */ --int davUnlink(const char * path) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- * Close a DAV collection. -- * @param dir argv DIR -- * @return 0 always -- */ --int davClosedir(/*@only@*/ DIR * dir) -- /*@globals fileSystem @*/ -- /*@modifies dir, fileSystem @*/; -- --/** -- * Return next entry from a DAV collection. -- * @param dir argv DIR -- * @return next entry -- */ --/*@dependent@*/ /*@null@*/ --struct dirent * davReaddir(DIR * dir) -- /*@globals fileSystem @*/ -- /*@modifies fileSystem @*/; -- --/** -- * Create an argv directory from DAV collection. -- * @param path URL for DAV collection path -- * @return argv DIR -- */ --/*@null@*/ --DIR * davOpendir(const char * path) -- /*@globals fileSystem, internalState @*/ -- /*@modifies fileSystem, internalState @*/; -- --/** -- * stat(2) clone. -- */ --int davStat(const char * path, /*@out@*/ struct stat * st) -- /*@globals fileSystem, internalState @*/ -- /*@modifies *st, fileSystem, internalState @*/; -- --/** -- * lstat(2) clone. -- */ --int davLstat(const char * path, /*@out@*/ struct stat * st) -- /*@globals fileSystem, internalState @*/ -- /*@modifies *st, fileSystem, internalState @*/; -- - #ifdef __cplusplus - } - #endif ---- rpm-4.5/rpmio/rpmio.c 2008-09-04 18:04:37.362241187 +0300 -+++ rpm-4.5/rpmio/rpmio.c 2008-09-04 18:05:08.695569896 +0300 -@@ -155,11 +155,6 @@ - /*@unchecked@*/ - int _ftp_debug = 0; - --/** -- */ --/*@unchecked@*/ --int _dav_debug = 0; -- - /* =============================================================== */ - - /*@-boundswrite@*/ -@@ -386,13 +381,6 @@ - - fdstat_enter(fd, FDSTAT_READ); - /*@-boundswrite@*/ -- /* HACK: flimsy wiring for davRead */ -- if (fd->req != NULL) { -- rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); -- /* XXX Chunked davRead EOF. */ -- if (rc == 0) -- fd->bytesRemain = 0; -- } else - rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); - /*@=boundswrite@*/ - fdstat_exit(fd, FDSTAT_READ, rc); -@@ -420,10 +408,6 @@ - - fdstat_enter(fd, FDSTAT_WRITE); - /*@-boundsread@*/ -- /* HACK: flimsy wiring for davWrite */ -- if (fd->req != NULL) -- rc = davWrite(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); -- else - rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); - /*@=boundsread@*/ - fdstat_exit(fd, FDSTAT_WRITE, rc); -@@ -470,11 +454,6 @@ - fdSetFdno(fd, -1); - - fdstat_enter(fd, FDSTAT_CLOSE); -- /* HACK: flimsy wiring for davClose */ --/*@-branchstate@*/ -- if (fd->req != NULL) -- rc = davClose(fd); -- else - rc = ((fdno >= 0) ? close(fdno) : -2); - /*@=branchstate@*/ - fdstat_exit(fd, FDSTAT_CLOSE, rc); -@@ -544,10 +523,6 @@ - FD_ZERO(&wrfds); - #endif - -- /* HACK: flimsy wiring for davWrite */ -- if (fd->req != NULL) -- return 1; -- - if ((fdno = fdFileno(fd)) < 0) - return -1; /* XXX W2DO? */ - -@@ -599,10 +574,6 @@ - FD_ZERO(&rdfds); - #endif - -- /* HACK: flimsy wiring for davRead */ -- if (fd->req != NULL) -- return 1; -- - if ((fdno = fdFileno(fd)) < 0) - return -1; /* XXX W2DO? */ - -@@ -2265,29 +2236,6 @@ - fd->wr_chunked = 0; - } - break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- case URL_IS_HKP: -- fd = davOpen(url, flags, mode, &u); -- if (fd == NULL || u == NULL) -- break; -- -- cmd = ((flags & O_WRONLY) -- ? ((flags & O_APPEND) ? "PUT" : -- ((flags & O_CREAT) ? "PUT" : "PUT")) -- : "GET"); -- u->openError = davReq(fd, cmd, path); -- if (u->openError < 0) { -- /* XXX make sure that we can exit through ufdClose */ -- fd = fdLink(fd, "error ctrl (ufdOpen HTTP)"); -- fd = fdLink(fd, "error data (ufdOpen HTTP)"); -- } else { -- fd->bytesRemain = ((!strcmp(cmd, "GET")) -- ? fd->contentLength : -1); -- fd->wr_chunked = ((!strcmp(cmd, "PUT")) -- ? fd->wr_chunked : 0); -- } -- break; - case URL_IS_DASH: - assert(!(flags & O_RDWR)); - fd = fdDup( ((flags & O_WRONLY) ? STDOUT_FILENO : STDIN_FILENO) ); -@@ -2911,10 +2859,8 @@ - if (fd->nfps > 0 && fpno == -1 && - fd->fps[fd->nfps-1].io == ufdio && - fd->fps[fd->nfps-1].fp == fp && -- (fd->fps[fd->nfps-1].fdno >= 0 || fd->req != NULL)) -+ (fd->fps[fd->nfps-1].fdno >= 0)) - { -- int hadreqpersist = (fd->req != NULL); -- - if (fp) - rc = fflush(fp); - fd->nfps--; -@@ -2924,26 +2870,9 @@ - /*@-usereleased@*/ - if (fdGetFdno(fd) >= 0) - break; -- if (!fd->persist) -- hadreqpersist = 0; - fdSetFp(fd, NULL); - fd->nfps++; - if (fp) { -- /* HACK: flimsy Keepalive wiring. */ -- if (hadreqpersist) { -- fd->nfps--; --/*@-exposetrans@*/ -- fdSetFp(fd, fp); --/*@=exposetrans@*/ --/*@-refcounttrans@*/ -- (void) fdClose(fd); --/*@=refcounttrans@*/ -- fdSetFp(fd, NULL); -- fd->nfps++; --/*@-refcounttrans@*/ -- (void) fdClose(fd); --/*@=refcounttrans@*/ -- } else - rc = fclose(fp); - } - fdPop(fd); -@@ -3223,7 +3152,7 @@ - if (_rpmio_debug) - fprintf(stderr, "*** Fopen ufdio path %s fmode %s\n", path, fmode); - fd = ufdOpen(path, flags, perms); -- if (fd == NULL || !(fdFileno(fd) >= 0 || fd->req != NULL)) -+ if (fd == NULL || !(fdFileno(fd) >= 0)) - return fd; - break; - default: -@@ -3234,7 +3163,7 @@ - } - - /* XXX persistent HTTP/1.1 returns the previously opened fp */ -- if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0 || fd->req != NULL)) -+ if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0)) - { - /*@+voidabstract@*/ - fdPush(fd, fpio, fp, fileno(fp)); /* Push fpio onto stack */ -@@ -3276,10 +3205,6 @@ - int i, rc = 0; - - if (fd == NULL) return -1; -- if (fd->req != NULL) { -- /* HACK: flimsy wiring for neon errors. */ -- rc = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; -- } else - for (i = fd->nfps; rc == 0 && i >= 0; i--) { - /*@-boundsread@*/ - FDSTACK_t * fps = &fd->fps[i]; -@@ -3317,9 +3242,6 @@ - { - int i, rc = -1; - -- if (fd->req != NULL) -- rc = 123456789; /* HACK: https has no steenkin fileno. */ -- else - for (i = fd->nfps ; rc == -1 && i >= 0; i--) { - /*@-boundsread@*/ - rc = fd->fps[i].fdno; ---- rpm-4.5/rpmio/librpmio.vers~ 2008-07-09 12:38:31.000000000 +0300 -+++ rpm-4.5/rpmio/librpmio.vers 2008-09-04 17:52:56.158976430 +0300 -@@ -29,25 +29,6 @@ - Chmod; - Chown; - Chroot; -- davClose; -- davClosedir; -- _dav_debug; -- davLstat; -- davmagicdir; -- davMkdir; -- davOpen; -- davOpendir; -- davRead; -- davReaddir; -- davRealpath; -- davRename; -- davReq; -- davResp; -- davRmdir; -- davSeek; -- davStat; -- davUnlink; -- davWrite; - delMacro; - expandMacros; - Fclose; ---- rpm-4.5/lib/poptALL.c~ 2007-10-23 18:53:08.000000000 +0300 -+++ rpm-4.5/lib/poptALL.c 2008-09-04 17:53:21.845642132 +0300 -@@ -126,8 +126,6 @@ - extern int _ftp_debug; - /*@unchecked@*/ - extern int _av_debug; --/*@unchecked@*/ --extern int _dav_debug; - - /*@unchecked@*/ - extern int noLibio; -@@ -424,8 +422,6 @@ - N_("debug FTP/HTTP data stream"), NULL}, - { "avdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_av_debug, -1, - N_("debug argv collections"), NULL}, -- { "davdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_dav_debug, -1, -- N_("debug WebDAV data stream"), NULL}, - { "hdrdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_hdr_debug, -1, - NULL, NULL}, - { "miredebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_mire_debug, -1, ---- rpm-4.5/rpmio/rpmrpc.c 2008-09-04 17:56:39.132287618 +0300 -+++ rpm-4.5/rpmio/rpmrpc.c 2008-09-04 17:57:38.618948392 +0300 -@@ -78,10 +78,6 @@ - case URL_IS_FTP: - return ftpMkdir(path, mode); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davMkdir(path, mode); -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -105,15 +101,6 @@ - case URL_IS_FTP: - return ftpChdir(path); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: --#ifdef NOTYET -- return davChdir(path); --#else -- errno = EINVAL; /* XXX W2DO? */ -- return -2; --#endif -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -138,10 +125,6 @@ - case URL_IS_FTP: - return ftpRmdir(path); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davRmdir(path); -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -245,10 +228,6 @@ - - oldut = urlPath(oldpath, &oe); - switch (oldut) { -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davRename(oldpath, newpath); -- /*@notreached@*/ break; - case URL_IS_FTP: /* XXX WRONG WRONG WRONG */ - case URL_IS_PATH: - case URL_IS_UNKNOWN: -@@ -343,10 +322,6 @@ - case URL_IS_FTP: - return ftpUnlink(path); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davUnlink(path); -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -1354,10 +1329,6 @@ - case URL_IS_FTP: - return ftpStat(path, st); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davStat(path, st); -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -1384,10 +1355,6 @@ - case URL_IS_FTP: - return ftpLstat(path, st); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davLstat(path, st); -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -1630,14 +1597,6 @@ - case URL_IS_FTP: - return ftpReadlink(path, buf, bufsiz); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: --#ifdef NOTYET -- return davReadlink(path, buf, bufsiz); --#else -- return -2; --#endif -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -1787,10 +1746,6 @@ - case URL_IS_FTP: - return ftpOpendir(path); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- return davOpendir(path); -- /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; - /*@fallthrough@*/ -@@ -1815,8 +1770,6 @@ - return NULL; - if (ISAVMAGIC(dir)) - return avReaddir(dir); -- if (ISDAVMAGIC(dir)) -- return davReaddir(dir); - return readdir(dir); - } - -@@ -1828,8 +1781,6 @@ - return 0; - if (ISAVMAGIC(dir)) - return avClosedir(dir); -- if (ISDAVMAGIC(dir)) -- return davClosedir(dir); - return closedir(dir); - } - -@@ -1852,14 +1803,6 @@ - case URL_IS_FTP: - return ftpRealpath(path, resolved_path); - /*@notreached@*/ break; -- case URL_IS_HTTPS: -- case URL_IS_HTTP: -- case URL_IS_HKP: --#ifdef WITH_NEON -- return davRealpath(path, resolved_path); -- /*@notreached@*/ break; --#endif -- /*@fallthrough@*/ - default: - return xstrdup(path); - /*@notreached@*/ break; ---- rpm-4.5/./rpmio/rpmio_internal.h~ 2008-06-10 02:19:26.000000000 +0300 -+++ rpm-4.5/./rpmio/rpmio_internal.h 2008-09-04 18:00:31.015598325 +0300 -@@ -182,7 +182,6 @@ - /*@dependent@*/ - void * url; /* ufdio: URL info */ - /*@relnull@*/ -- void * req; /* ufdio: HTTP request */ - - int rd_timeoutsecs; /* ufdRead: per FD_t timer */ - ssize_t bytesRemain; /* ufdio: */ ---- rpm-4.5/rpmio/rpmurl.h~ 2008-06-10 02:19:26.000000000 +0300 -+++ rpm-4.5/rpmio/rpmurl.h 2008-09-04 18:14:00.546141703 +0300 -@@ -54,15 +54,6 @@ - /*@relnull@*/ - FD_t data; /*!< per-xfer data channel */ - --/*@relnull@*/ -- void * capabilities; /*!< neon: ne_server_capabilities ptr */ --/*@relnull@*/ -- void * lockstore; /*!< neon: ne_lock_store ptr */ --/*@relnull@*/ -- void * sess; /*!< neon: ne_session ptr */ -- off_t current; /*!< neon: current body offset. */ -- off_t total; /*!< neon: total body length. */ -- int connstatus; /*!< neon: connection status. */ - #ifdef REFERENCE - typedef enum { - ne_conn_namelookup, /* lookup up hostname (info = hostname) */ ---- rpm-4.5/rpmio/url.c~ 2008-06-10 02:19:26.000000000 +0300 -+++ rpm-4.5/rpmio/url.c 2008-09-04 20:05:19.011716915 +0300 -@@ -134,7 +134,6 @@ - (u->scheme ? u->scheme : "")); - /*@=usereleased@*/ - } -- xx = davFree(u); - u->buf = _free(u->buf); - u->url = _free(u->url); - u->scheme = _free((void *)u->scheme); ---- rpm-4.5/perl/Makefile.PL.in~ 2008-10-05 01:31:09.000000000 +0300 -+++ rpm-4.5/perl/Makefile.PL.in 2008-10-05 01:32:12.688278120 +0300 -@@ -12,7 +12,7 @@ - 'NAME' => 'RPM', - 'VERSION_FROM' => 'RPM.pm', # finds $VERSION - 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 -- 'LIBS' => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@ -lneon'], -+ 'LIBS' => [join(' ', @ldaddp) . ' ' . join(' ', @ldadd) . ' @LIBS@ @WITH_POPT_LIB@ @WITH_BEECRYPT_LIB@'], - 'DEFINE' => join(" ", @defines), # e.g., '-DHAVE_SOMETHING' - 'INC' => join(' ', map { '-I@top_srcdir@/'. $_ } @libdir) . ' @CPPFLAGS@', - 'TYPEMAPS' => [ 'typemap' ], ---- rpm-4.5/configure.ac.orig 2011-02-21 16:29:42.000000000 +0100 -+++ rpm-4.5/configure.ac 2011-02-21 16:31:00.574910173 +0100 -@@ -591,28 +591,7 @@ - WITH_NEON_SUBDIR= - WITH_NEON_INCLUDE= - WITH_NEON_LIB= --AC_CHECK_HEADER([neon/ne_session.h], [ -- AC_CHECK_LIB(neon, ne_session_create, [ -- AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).]) -- AC_CHECK_LIB(neon, ne_get_response_header, [ -- AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.]) -- ]) -- AC_CHECK_LIB(neon, ne_send_request_chunk, [ -- AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.]) -- ]) -- WITH_NEON_INCLUDE="-I${includedir}/neon" -- WITH_NEON_LIB="-lneon" -- ]) --],[ -- if test -d neon ; then -- AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).]) --# XXX HAVE_NEON_NE_GET_RESPONSE_HEADER assumes libneon-0.25 devel internal -- AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.]) -- WITH_NEON_SUBDIR=neon -- WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src" -- WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la" -- fi --]) -+ - AC_SUBST(WITH_NEON_SUBDIR) - AC_SUBST(WITH_NEON_INCLUDE) - AC_SUBST(WITH_NEON_LIB) diff --git a/rpm-no-sqlite.patch b/rpm-no-sqlite.patch deleted file mode 100644 index 5a686a5..0000000 --- a/rpm-no-sqlite.patch +++ /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 header file]) -- WITH_SQLITE3_SUBDIR= -- WITH_SQLITE3_INCLUDE= -- WITH_SQLITE3_LIB="-lsqlite" -- DBLIBSRCS="$DBLIBSRCS sqlite.c" -- ]) --],[ -- if test -d sqlite ; then -- AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the header file]) -- WITH_SQLITE3_SUBDIR=sqlite -- WITH_SQLITE3_INCLUDE="-I\${top_srcdir}/${WITH_SQLITE3_SUBDIR} -I\${top_srcdir}/${WITH_SQLITE3_SUBDIR}/src" -- WITH_SQLITE3_LIB="\${top_builddir}/${WITH_SQLITE3_SUBDIR}/libsqlite3.la" -- DBLIBSRCS="$DBLIBSRCS sqlite.c" -- fi --]) -- - AC_SUBST(WITH_SQLITE3_SUBDIR) - AC_SUBST(WITH_SQLITE3_INCLUDE) - AC_SUBST(WITH_SQLITE3_LIB) diff --git a/rpm-noarch-subpackages.patch b/rpm-noarch-subpackages.patch deleted file mode 100644 index a9d0b0e..0000000 --- a/rpm-noarch-subpackages.patch +++ /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 index 781a54e..0000000 --- a/rpm-noexpand.patch +++ /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 index 84def0d..0000000 --- a/rpm-nopie.patch +++ /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 index 04bcb34..0000000 --- a/rpm-nosmpflags.patch +++ /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 index 17eb68a..0000000 --- a/rpm-notsc.patch +++ /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 index c0697cd..0000000 --- a/rpm-noversiondir.patch +++ /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 index 9869de2..0000000 --- a/rpm-old-fileconflicts-behaviour.patch +++ /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 "), - N_("") }, - -- { "fileconflicts", '\0', POPT_BIT_CLR, &rpmIArgs.probFilter, -- (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES), -- N_("detect file conflicts between packages"), NULL}, - { "force", '\0', 0, NULL, RPMCLI_POPT_FORCE, - N_("short hand for --replacepkgs --replacefiles"), NULL}, - diff --git a/rpm-perl-macros.patch b/rpm-perl-macros.patch index 0744b9f..1d09638 100644 --- a/rpm-perl-macros.patch +++ b/rpm-perl-macros.patch @@ -1,48 +1,124 @@ ---- 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"; - } else { -- print "perl >= 0:5.00$1\n"; ++ } else { + print "perl-base >= 0:5.00$1\n"; - } - } else { -- print "perl >= 1:$ver\n"; ++ } ++ } else { + 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"; - } else { -- print "perl >= 0:5.$1\n"; ++ } else { + 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"; - } - } - 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; + - # 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 index 0000000..1faacf3 --- /dev/null +++ b/rpm-perl-magic.patch @@ -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 index 9387e26..0000000 --- a/rpm-perl-makefile.patch +++ /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 index 0000000..16ad595 --- /dev/null +++ b/rpm-perl-req-perlfile.patch @@ -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 () { + + # 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 index 0000000..f15d401 --- /dev/null +++ b/rpm-perl_req-INC_dirs.patch @@ -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 index 5d7d9f2..0000000 --- a/rpm-perl_req-heredocs_pod.patch +++ /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 () { -- -- # skip the "= <<" block - -- if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) || -- ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) { -- $tag = $2; -- while () { -- ( $_ =~ /^$tag/) && last; -- } -+ # skip the documentation -+ if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) { -+ $_ = until /^=cut/ or eof; -+ next; -+ } -+ -+ # naively strip some comments... will screw m/\#/, m##, q##, qw##, qr##, etc, but these don't really matter for us -+ s/(? until m/^\Q$tag\E\s*$/ or eof; -+ next; - } - - # skip q{} quoted sections - just hope we don't have curly brackets -@@ -157,21 +164,7 @@ - if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) { - $tag = $1; - $tag =~ tr/{([/})]/; -- $_ = until m/\Q$tag\E/; -- } -- -- # skip the documentation -- -- # we should not need to have item in this if statement (it -- # properly belongs in the over/back section) but people do not -- # read the perldoc. -- -- if ( (m/^=(head[1-4]|pod|item)/) .. (m/^=(cut)/) ) { -- next; -- } -- -- if ( (m/^=(over)/) .. (m/^=(back)/) ) { -- next; -+ $_ = until m/\Q$tag\E/ or eof; - } - - # skip the data section diff --git a/rpm-perl_req-skip_multiline.patch b/rpm-perl_req-skip_multiline.patch deleted file mode 100644 index e94feb3..0000000 --- a/rpm-perl_req-skip_multiline.patch +++ /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 () { -- ( $_ =~ m/\}/ ) && last; -- } -+ $tag =~ tr/{([/})]/; -+ $_ = until m/\Q$tag\E/; - } - - # skip the documentation diff --git a/rpm-perl_req-use_base.patch b/rpm-perl_req-use_base.patch deleted file mode 100644 index cdb0a7c..0000000 --- a/rpm-perl_req-use_base.patch +++ /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 index add421a..0000000 --- a/rpm-pkgconfig.patch +++ /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 index 9cc82f5..0000000 --- a/rpm-pkgconfigdeps.patch +++ /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 index 1a3ee0e..0000000 --- a/rpm-pld-autodep.patch +++ /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 - #undef FILE_RCSID - #include "magic.h" - -@@ -44,6 +45,11 @@ - StringBuf sb_python;/*!< concatenated list of python colored files. */ - StringBuf sb_php; /*!< concatenated list of php colored files. */ - -+ int findprov, findreq; -+ regex_t *noautoprov; -+ int noautoprov_c; -+ regex_t *noautoreq; -+ int noautoreq_c; - }; - - /** ---- rpm-4.5/lib/rpmfc.c~ 2008-06-10 14:06:23.000000000 +0300 -+++ rpm-4.5/lib/rpmfc.c 2008-06-10 14:21:53.097663262 +0300 -@@ -15,6 +15,8 @@ - #define _RPMDS_INTERNAL - #include - #include -+#include -+#include - - #include "debug.h" - -@@ -309,14 +311,83 @@ - return buf; - }; - -+static regex_t * rpmfcExpandRegexps(const char * str,int *count){ -+ int i,j,r; -+ const char *s; -+ ARGV_t patterns=NULL; -+ regex_t *compiled=NULL; -+ -+ s=rpmExpand(str,NULL); -+ if (s) { -+ poptParseArgvString(s,count,(const char ***)&patterns); -+ s = _free(s); -+ } -+ if (patterns==NULL){ -+ *count=0; -+ return NULL; -+ } -+ if (*count==0){ -+ _free(patterns); -+ return NULL; -+ } -+ -+ compiled=malloc(sizeof(regex_t)*(*count)); -+ j=0; -+ for(i=0;i<*count;i++){ -+ r=regcomp(&compiled[j],patterns[i],REG_NOSUB); -+ if (r==0) j++; -+ else { -+ rpmMessage(RPMMESS_NORMAL, -+ _("Compilation of regular expresion '%s'" -+ " (expanded from '%s') failed. Skipping it.\n"), -+ patterns[i],str); -+ } -+ } -+ patterns=_free(patterns); -+ if (j==0) { -+ compiled=_free(compiled); -+ *count=0; -+ return NULL; -+ } -+ *count=j; -+ return compiled; -+} -+ -+static int rpmfcMatchRegexps(regex_t *regexps, int count, const char *str, char deptype) -+{ -+ int j; -+ for(j = 0; j < count; j++) { -+ rpmMessage(RPMMESS_DEBUG, -+ _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, j); -+ if (!regexec(®exps[j], str, 0, NULL, 0)) { -+ rpmMessage(RPMMESS_NORMAL, -+ _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, j); -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static regex_t * rpmfcFreeRegexps(regex_t *regexps,int count){ -+ int i; -+ -+ if (regexps) -+ for(i=0;itracked && deptype == 'P' && *EVR != '\0') { -@@ -714,7 +787,7 @@ - *se = '\0'; - se++; - -- if (is_executable) { -+ if (is_executable && fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, s, 'R')) { - /* Add to package requires. */ - ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES); - xx = rpmdsMerge(&fc->requires, ds); -@@ -808,20 +889,26 @@ - default: - break; - case RPMTAG_PROVIDENAME: -+ if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0], 'P')) { - /* Add to package provides. */ - rc = rpmdsMerge(&fc->provides, ds); - - /* Add to file dependencies. */ - buf[0] = '\0'; - rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds)); -+ } else -+ rc = 0; - break; - case RPMTAG_REQUIRENAME: -+ if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0], 'R')) { - /* Add to package requires. */ - rc = rpmdsMerge(&fc->requires, ds); - - /* Add to file dependencies. */ - buf[0] = '\0'; - rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds)); -+ } else -+ rc = 0; - break; - } - return rc; -@@ -862,6 +949,109 @@ - { NULL, 0 } - }; - -+static int rpmfcFindRequiredPackages(rpmfc fc) -+{ -+ rpmts ts=NULL; -+ const char * s; -+ char * se; -+ rpmds ds; -+ const char * N; -+ const char * EVR; -+ int_32 Flags; -+ unsigned char deptype; -+ int nddict; -+ int previx; -+ int ix; -+ int i; -+ int j; -+ int xx; -+ int r; -+ const char * hname; -+ rpmdbMatchIterator it; -+ Header hdr; -+ regex_t *noautoreqdep; -+ int noautoreqdep_c; -+ -+ noautoreqdep=rpmfcExpandRegexps("%{__noautoreqdep}", &noautoreqdep_c); -+ -+ ts = rpmtsCreate(); /* XXX ts created in main() should be used */ -+ -+ rpmMessage(RPMMESS_NORMAL, _("Searching for required packages....\n")); -+ -+ nddict = argvCount(fc->ddict); -+ previx = -1; -+ for (i = 0; i < nddict; i++) { -+ s = fc->ddict[i]; -+ -+ /* Parse out (file#,deptype,N,EVR,Flags) */ -+ ix = strtol(s, &se, 10); -+ assert(se != NULL); -+ deptype = *se++; -+ se++; -+ N = se; -+ while (*se && *se != ' ') -+ se++; -+ *se++ = '\0'; -+ EVR = se; -+ while (*se && *se != ' ') -+ se++; -+ *se++ = '\0'; -+ Flags = strtol(se, NULL, 16); -+ -+ if (deptype!='R') continue; -+ -+ rpmMessage(RPMMESS_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags); -+ if (EVR && EVR[0]) { -+ rpmMessage(RPMMESS_DEBUG, _("skipping #%i require\n")); -+ continue; -+ } -+ for(j=0;j not found\n"),N); -+ continue; -+ } -+ rpmMessage(RPMMESS_DEBUG, _("Iterator: %p\n"),it); -+ if (rpmdbGetIteratorCount(it)>1) { -+ rpmMessage(RPMMESS_DEBUG, _("%s -> multiple (skipping)\n"),N); -+ rpmdbFreeIterator(it); -+ continue; -+ } -+ hdr=rpmdbNextIterator(it); -+ assert(hdr!=NULL); -+ r=headerGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL); -+ assert(r<2); -+ if (!strcmp(hname,N)) { -+ rpmMessage(RPMMESS_DEBUG, _("%s -> %s (skipping)\n"),N,hname); -+ rpmdbFreeIterator(it); -+ continue; -+ } -+ -+ rpmMessage(RPMMESS_DEBUG, "%s -> %s\n",N,hname); -+ -+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, hname, "", RPMSENSE_FIND_REQUIRES); -+ xx = rpmdsMerge(&fc->requires, ds); -+ ds = rpmdsFree(ds); -+ -+ rpmdbFreeIterator(it); -+ } -+ -+ noautoreqdep = rpmfcFreeRegexps(noautoreqdep, noautoreqdep_c); -+ ts = rpmtsFree(ts); -+ return 0; -+} -+ - int rpmfcApply(rpmfc fc) - { - rpmfcApplyTbl fcat; -@@ -880,6 +1070,26 @@ - int i; - int xx; - int skipping; -+ int j; -+ regex_t *noautoprovfiles = NULL; -+ int noautoprovfiles_c; -+ regex_t *noautoreqfiles = NULL; -+ int noautoreqfiles_c; -+ const char *buildroot; -+ int buildroot_l; -+ -+ fc->noautoprov = NULL; -+ fc->noautoreq = NULL; -+ -+ buildroot = rpmExpand("%{buildroot}",NULL); -+ buildroot_l = strlen(buildroot); -+ -+ noautoprovfiles = rpmfcExpandRegexps("%{__noautoprovfiles}", &noautoprovfiles_c); -+ noautoreqfiles = rpmfcExpandRegexps("%{__noautoreqfiles}", &noautoreqfiles_c); -+ fc->noautoprov = rpmfcExpandRegexps("%{__noautoprov}", &fc->noautoprov_c); -+ fc->noautoreq = rpmfcExpandRegexps("%{__noautoreq}", &fc->noautoreq_c); -+ rpmMessage(RPMMESS_DEBUG, _("%i _noautoprov patterns.\n"), fc->noautoprov_c); -+ rpmMessage(RPMMESS_DEBUG, _("%i _noautoreq patterns.\n"), fc->noautoreq_c); - - /* Generate package and per-file dependencies. */ - for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) { -@@ -900,9 +1110,43 @@ - for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) { - if (!(fc->fcolor->vals[fc->ix] & fcat->colormask)) - /*@innercontinue@*/ continue; -+ fc->findprov = 1; -+ fc->findreq = 1; -+ if (strncmp(fc->fn[fc->ix],buildroot,buildroot_l)==0) {/* sanity check */ -+ for(j = 0; j < noautoprovfiles_c; j++) { -+ if (!regexec(&noautoprovfiles[j], -+ fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) { -+ rpmMessage(RPMMESS_NORMAL, -+ _("skipping %s provides detection" -+ " (matches noautoprovfiles pattern #%i)\n"), -+ fc->fn[fc->ix], j); -+ fc->findprov = 0; -+ break; -+ } -+ } -+ for(j = 0; j < noautoreqfiles_c; j++) { -+ if (!regexec(&noautoreqfiles[j], -+ fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) { -+ rpmMessage(RPMMESS_NORMAL, -+ _("skipping %s requires detection" -+ " (matches noautoreqfiles pattern #%i)\n"), -+ fc->fn[fc->ix], j); -+ fc->findreq = 0; -+ break; -+ } -+ } -+ } -+ - xx = (*fcat->func) (fc); - } - } -+ noautoprovfiles = rpmfcFreeRegexps(noautoprovfiles, noautoprovfiles_c); -+ noautoreqfiles = rpmfcFreeRegexps(noautoreqfiles, noautoreqfiles_c); -+ fc->noautoprov = rpmfcFreeRegexps(fc->noautoprov, fc->noautoprov_c); -+ fc->noautoreq = rpmfcFreeRegexps(fc->noautoreq, fc->noautoreq_c); -+#ifdef AUTODEP_PKGNAMES /* define to use package names in R */ -+ rpmfcFindRequiredPackages(fc); -+#endif - - /*@-boundswrite@*/ - /* Generate per-file indices into package dependencies. */ -#--- rpm-4.4.9/po/pl.po.orig 2007-05-22 08:11:40.947724921 +0200 -#+++ rpm-4.4.9/po/pl.po 2007-05-22 08:24:24.091213990 +0200 -#@@ -2937,6 +2937,86 @@ -# msgid "Failed to find %s:\n" -# msgstr "Nie uda³o siê odnale¼æ %s:\n" -# -#+#: lib/rpmfc.c:334 -#+#, c-format -#+msgid "Compilation of regular expresion '%s' (expanded from '%s') failed. Skipping it.\n" -#+msgstr "Kompilacja wyra¿enia regularnego '%s' (powsta³ego z '%s') nie powiod³a siê; pominiêto.\n" -#+ -#+#: lib/rpmfc.c:395 -#+#, c-format -#+msgid "%i _noautoprov patterns.\n" -#+msgstr "%i wzorców _noautoprov.\n" -#+ -#+#: lib/rpmfc.c:405 -#+#, c-format -#+msgid "%i _noautoreq patterns.\n" -#+msgstr "%i wzorców _noautoreq.\n" -#+ -#+#: lib/rpmfc.c:459 -#+#, c-format -#+msgid "Checking %c: '%s' against _noauto expr. #%i\n" -#+msgstr "Sprawdzanie %c: '%s' z wyra¿eniem _noauto #%i\n" -#+ -#+#: lib/rpmfc.c:462 -#+#, c-format -#+msgid "Skipping %c: '%s' as it matches _noauto expr. #%i\n" -#+msgstr "Pominiêto %c: '%s' pasuj±ce do wyra¿enia _noauto #%i\n" -#+ -#+#. XXX ts created in main() should be used -#+#: lib/rpmfc.c:1173 -#+msgid "Searching for required packages....\n" -#+msgstr "Poszukiwanie wymaganych pakietów...\n" -#+ -#+#: lib/rpmfc.c:1197 -#+#, c-format -#+msgid "#%i requires: %s,%s,%i\n" -#+msgstr "#%i wymaga: %s,%s,%i\n" -#+ -#+#: lib/rpmfc.c:1199 -#+#, c-format -#+msgid "skipping #%i require\n" -#+msgstr "pominiêto zale¿no¶æ #%i\n" -#+ -#+#: lib/rpmfc.c:1205 -#+#, c-format -#+msgid "skipping %s requirement processing (matches noautoreqdep pattern #%i)\n" -#+msgstr "pominiêto przetwarzanie zale¿no¶ci %s (pasuje do wzorca noautoreqdep #%i)\n" -#+ -#+#: lib/rpmfc.c:1211 -#+#, c-format -#+msgid "skipping #%i require (is file requirement)\n" -#+msgstr "pominiêto zale¿no¶æ #%i (zale¿no¶æ od pliku)\n" -#+ -#+#: lib/rpmfc.c:1216 -#+#, c-format -#+msgid "%s -> not found\n" -#+msgstr "%s -> nie znaleziono\n" -#+ -#+#: lib/rpmfc.c:1219 -#+#, c-format -#+msgid "Iterator: %p\n" -#+msgstr "Iterator: %p\n" -#+ -#+#: lib/rpmfc.c:1221 -#+#, c-format -#+msgid "%s -> multiple (skipping)\n" -#+msgstr "%s -> wiele (pominiêto)\n" -#+ -#+#: lib/rpmfc.c:1230 -#+#, c-format -#+msgid "%s -> %s (skipping)\n" -#+msgstr "%s -> %s (pominiêto)\n" -#+ -#+#: lib/rpmfc.c:1295 -#+#, c-format -#+msgid "skipping %s provides detection (matches noautoprovfiles pattern #%i)\n" -#+msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoprovfiles #%i)\n" -#+ -#+#: lib/rpmfc.c:1306 -#+#, c-format -#+msgid "skipping %s requires detection (matches noautoreqfiles pattern #%i)\n" -#+msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoreqfiles #%i)\n" -#+ -# #: lib/rpmfi.c:622 -# #, c-format ---- rpm/configure.ac.orig 2004-08-22 13:02:30.000000000 +0200 -+++ rpm/configure.ac 2004-08-22 13:25:37.000000000 +0200 -@@ -971,6 +971,18 @@ - AC_SUBST(__CHGRP_RHF) - - dnl -+dnl enable generating autorequires containing packages names -+dnl -+AC_ARG_ENABLE([adding-packages-names-in-autogenerated-dependancies], -+ [ --enable-adding-packages-names-in-autogenerated-dependancies Add packages names for autogenerated dependancies to requires], -+ -+ AC_MSG_RESULT([Using packages names in autogerated requires is enabled]) -+ AC_DEFINE(AUTODEP_PKGNAMES, 1, "Generating autorequires containing packages names.") -+ -+ ) -+ -+ -+dnl - dnl figure out what root's primary group is - dnl - AC_MSG_CHECKING(root's primary group) ---- rpm-4.5/lib/rpmfc.c~ 2008-06-11 01:02:40.000000000 +0300 -+++ rpm-4.5/lib/rpmfc.c 2008-06-11 01:04:54.048916180 +0300 -@@ -382,12 +382,9 @@ - * @param fc file classifier - * @param deptype 'P' == Provides:, 'R' == Requires:, helper - * @param nsdep class name for interpreter (e.g. "perl") -- * @param noauto _noauto* regexps -- * @param noauto_c # of _noauto* regexps - * @return 0 on success - */ --static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep, -- regex_t * noauto, int noauto_c) -+static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/ - { -@@ -405,6 +402,8 @@ - int pac; - int xx; - int i; -+ regex_t * noauto = fc->noauto; -+ int noauto_c = fc->noauto_c; - - switch (deptype) { - default: ---- rpm-4.5/lib/rpmfc.c~ 2008-06-11 01:04:54.000000000 +0300 -+++ rpm-4.5/lib/rpmfc.c 2008-06-11 01:10:06.222936657 +0300 -@@ -410,7 +410,7 @@ - return -1; - /*@notreached@*/ break; - case 'P': -- if (fc->skipProv) -+ if (fc->skipProv || !fc->findprov) - return 0; - xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep); - depsp = &fc->provides; -@@ -418,7 +418,7 @@ - tagN = RPMTAG_PROVIDENAME; - break; - case 'R': -- if (fc->skipReq) -+ if (fc->skipReq || !fc->findreq) - return 0; - xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep); - depsp = &fc->requires; ---- rpm-4.5/lib/rpmfc.c~ 2008-06-11 01:11:33.000000000 +0300 -+++ rpm-4.5/lib/rpmfc.c 2008-06-11 01:16:17.084344647 +0300 -@@ -402,8 +402,8 @@ - int pac; - int xx; - int i; -- regex_t * noauto = fc->noauto; -- int noauto_c = fc->noauto_c; -+ regex_t * noauto = NULL; -+ int noauto_c = 0; - - switch (deptype) { - default: -@@ -412,6 +412,8 @@ - case 'P': - if (fc->skipProv || !fc->findprov) - return 0; -+ noauto = fc->noautoprov; -+ noauto_c = fc->noautoprov_c; - xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep); - depsp = &fc->provides; - dsContext = RPMSENSE_FIND_PROVIDES; -@@ -420,6 +422,8 @@ - case 'R': - if (fc->skipReq || !fc->findreq) - return 0; -+ noauto = fc->noautoreq; -+ noauto_c = fc->noautoreq_c; - xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep); - depsp = &fc->requires; - dsContext = RPMSENSE_FIND_REQUIRES; -#--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 00:28:21.000000000 +0300 -#+++ rpm-4.5/lib/rpmfc.c 2008-06-11 00:37:51.675282123 +0300 -#@@ -829,7 +829,6 @@ -# } -# } else -# if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) { -#- xx = rpmfcHelper(fc, 'P', "python"); -# if (fc->findprov) -# xx = rpmfcHelper(fc, 'P', "python", fc->noautoprov, fc->noautoprov_c); -# #ifdef NOTYET -#--- rpm-4.5/lib/rpmfc.c~ 2008-06-11 00:37:51.000000000 +0300 -#+++ rpm-4.5/lib/rpmfc.c 2008-06-11 00:39:12.427942547 +0300 -#@@ -876,7 +876,8 @@ -# xx = rpmfcHelper(fc, 'R', "java", fc->noautoreq, fc->noautoreq_c); -# } else -# if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) { -#- xx = rpmfcHelper(fc, 'P', "mimetype"); -#+ if (fc->findprov) -#+ xx = rpmfcHelper(fc, 'P', "mimetype", fc->noautoprov, fc->noautoprov_c); -# } -# -# return 0; ---- rpm-4.4.8/lib/rpmfc.c.orig 2007-02-14 07:31:50.000000000 +0100 -+++ rpm-4.4.8/lib/rpmfc.c 2007-04-08 16:48:00.273560592 +0200 -@@ -773,7 +773,7 @@ - } else - if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { - xx = rpmfcHelper(fc, 'P', "php"); -- if (is_executable) -+ /* not only executable, files run by httpd usually are not */ - xx = rpmfcHelper(fc, 'R', "php"); - } - - diff --git a/rpm-po.patch b/rpm-po.patch deleted file mode 100644 index 38be040..0000000 --- a/rpm-po.patch +++ /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 diff --git a/rpm-popt-aliases.patch b/rpm-popt-aliases.patch index 6ddd2da..a6c5451 100644 --- a/rpm-popt-aliases.patch +++ b/rpm-popt-aliases.patch @@ -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 -@@ -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." + diff --git a/rpm-popt-coreutils.patch b/rpm-popt-coreutils.patch deleted file mode 100644 index 250ae97..0000000 --- a/rpm-popt-coreutils.patch +++ /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 index c08fba2..0000000 --- a/rpm-poptexecpath.patch +++ /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) { diff --git a/rpm-postun-nofail.patch b/rpm-postun-nofail.patch index 12a6406..2ab8817 100644 --- a/rpm-postun-nofail.patch +++ b/rpm-postun-nofail.patch @@ -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 -@@ -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 index 1f09506..0000000 --- a/rpm-provides-dont-obsolete.patch +++ /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 index 0b4a02a..0000000 --- a/rpm-pythondeps.patch +++ /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 -+# -+# 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 index 5daf06b..0000000 --- a/rpm-repackage-wo-lzma.patch +++ /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 -+#include - #include - #include - #include -@@ -1403,6 +1404,19 @@ - return rpmpsmStage(psm, psm->nstage); - } - -+static void replace_lzma_with_gzip(Header h) -+{ -+ indexEntry entry; -+ int i; -+ -+ for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) { -+ if (entry->info.tag == RPMTAG_PAYLOADCOMPRESSOR) { -+ memcpy(entry->data, "gzip", 4); -+ break; -+ } -+ } -+} -+ - /** - * @todo Packages w/o files never get a callback, hence don't get displayed - * on install with -v. -@@ -2151,6 +2165,11 @@ - payload_compressor = "gzip"; - /*@=branchstate@*/ - psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio")); -+ if (psm->goal == PSM_PKGSAVE && !strcmp(payload_compressor, "lzma") && access("/usr/bin/lzma", X_OK)) { -+ /* FIXME: digest is bad. */ -+ payload_compressor = "gzip"; -+ replace_lzma_with_gzip(psm->oh); -+ } - *t = '\0'; - t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r")); - if (!strcmp(payload_compressor, "gzip")) diff --git a/rpm-rpm2cpio-xz.patch b/rpm-rpm2cpio-xz.patch deleted file mode 100644 index 5731907..0000000 --- a/rpm-rpm2cpio-xz.patch +++ /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 index 0401ddf..0000000 --- a/rpm-rpm5-debugedit.patch +++ /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 , 2002 - Based on code by Jakub Jelinek , 2001. - -@@ -77,8 +77,9 @@ - int list_file_fd = -1; - int do_build_id = 0; - --typedef unsigned int uint_32; --typedef unsigned short uint_16; -+typedef unsigned char rpmuint8_t; -+typedef unsigned int rpmuint32_t; -+typedef unsigned short rpmuint16_t; - - typedef struct - { -@@ -93,7 +90,7 @@ - typedef struct - { - unsigned char *ptr; -- uint_32 addend; -+ rpmuint32_t addend; - } REL; - - #define read_uleb128(ptr) ({ \ -@@ -112,31 +109,32 @@ - ret; \ - }) - --static uint_16 (*do_read_16) (unsigned char *ptr); --static uint_32 (*do_read_32) (unsigned char *ptr); -+static rpmuint16_t (*do_read_16) (unsigned char *ptr); -+static rpmuint32_t (*do_read_32) (unsigned char *ptr); - static void (*write_32) (unsigned char *ptr, GElf_Addr val); - - static int ptr_size; -+static int cu_version; - --static inline uint_16 -+static inline rpmuint16_t - buf_read_ule16 (unsigned char *data) - { - return data[0] | (data[1] << 8); - } - --static inline uint_16 -+static inline rpmuint16_t - buf_read_ube16 (unsigned char *data) - { - return data[1] | (data[0] << 8); - } - --static inline uint_32 -+static inline rpmuint32_t - buf_read_ule32 (unsigned char *data) - { - return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); - } - --static inline uint_32 -+static inline rpmuint32_t - buf_read_ube32 (unsigned char *data) - { - return data[3] | (data[2] << 8) | (data[1] << 16) | (data[0] << 24); -@@ -156,7 +154,7 @@ - { - if (data->d_buf - && offset >= data->d_off -- && offset < data->d_off + data->d_size) -+ && offset < data->d_off + (off_t)data->d_size) - return (const char *) data->d_buf + (offset - data->d_off); - } - } -@@ -168,13 +166,13 @@ - #define read_1(ptr) *ptr++ - - #define read_16(ptr) ({ \ -- uint_16 ret = do_read_16 (ptr); \ -+ rpmuint16_t ret = do_read_16 (ptr); \ - ptr += 2; \ - ret; \ - }) - - #define read_32(ptr) ({ \ -- uint_32 ret = do_read_32 (ptr); \ -+ rpmuint32_t ret = do_read_32 (ptr); \ - ptr += 4; \ - ret; \ - }) -@@ -183,7 +181,7 @@ - int reltype; - - #define do_read_32_relocated(ptr) ({ \ -- uint_32 dret = do_read_32 (ptr); \ -+ rpmuint32_t dret = do_read_32 (ptr); \ - if (relptr) \ - { \ - while (relptr < relend && relptr->ptr < ptr) \ -@@ -200,7 +198,7 @@ - }) - - #define read_32_relocated(ptr) ({ \ -- uint_32 ret = do_read_32_relocated (ptr); \ -+ rpmuint32_t ret = do_read_32_relocated (ptr); \ - ptr += 4; \ - ret; \ - }) -@@ -208,7 +206,7 @@ - static void - dwarf2_write_le32 (unsigned char *p, GElf_Addr val) - { -- uint_32 v = (uint_32) val; -+ rpmuint32_t v = (rpmuint32_t) val; - - p[0] = v; - p[1] = v >> 8; -@@ -220,7 +218,7 @@ - static void - dwarf2_write_be32 (unsigned char *p, GElf_Addr val) - { -- uint_32 v = (uint_32) val; -+ rpmuint32_t v = (rpmuint32_t) val; - - p[3] = v; - p[2] = v >> 8; -@@ -242,16 +240,18 @@ - #define DEBUG_LINE 2 - #define DEBUG_ARANGES 3 - #define DEBUG_PUBNAMES 4 --#define DEBUG_MACINFO 5 --#define DEBUG_LOC 6 --#define DEBUG_STR 7 --#define DEBUG_FRAME 8 --#define DEBUG_RANGES 9 -+#define DEBUG_PUBTYPES 5 -+#define DEBUG_MACINFO 6 -+#define DEBUG_LOC 7 -+#define DEBUG_STR 8 -+#define DEBUG_FRAME 9 -+#define DEBUG_RANGES 10 - { ".debug_info", NULL, NULL, 0, 0, 0 }, - { ".debug_abbrev", NULL, NULL, 0, 0, 0 }, - { ".debug_line", NULL, NULL, 0, 0, 0 }, - { ".debug_aranges", NULL, NULL, 0, 0, 0 }, - { ".debug_pubnames", NULL, NULL, 0, 0, 0 }, -+ { ".debug_pubtypes", NULL, NULL, 0, 0, 0 }, - { ".debug_macinfo", NULL, NULL, 0, 0, 0 }, - { ".debug_loc", NULL, NULL, 0, 0, 0 }, - { ".debug_str", NULL, NULL, 0, 0, 0 }, -@@ -331,7 +331,7 @@ - } - if (*slot != NULL) - { -- error (0, 0, "%s: Duplicate DWARF-2 abbreviation %d", dso->filename, -+ error (0, 0, "%s: Duplicate DWARF abbreviation %d", dso->filename, - t->entry); - free (t); - htab_delete (h); -@@ -351,7 +351,7 @@ - form = read_uleb128 (ptr); - if (form == 2 || form > DW_FORM_indirect) - { -- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, form); -+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form); - htab_delete (h); - return NULL; - } -@@ -361,7 +361,7 @@ - } - if (read_uleb128 (ptr) != 0) - { -- error (0, 0, "%s: DWARF-2 abbreviation does not end with 2 zeros", -+ error (0, 0, "%s: DWARF abbreviation does not end with 2 zeros", - dso->filename); - htab_delete (h); - return NULL; -@@ -468,8 +468,8 @@ - has_prefix (const char *str, - const char *prefix) - { -- int str_len; -- int prefix_len; -+ size_t str_len; -+ size_t prefix_len; - - str_len = strlen (str); - prefix_len = strlen (prefix); -@@ -481,14 +481,14 @@ - } - - static int --edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) -+edit_dwarf2_line (DSO *dso, rpmuint32_t off, char *comp_dir, int phase) - { - unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; - unsigned char **dirt; - unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size; - unsigned char *endcu, *endprol; - unsigned char opcode_base; -- uint_32 value, dirt_cnt; -+ rpmuint32_t value, dirt_cnt; - size_t comp_dir_len = strlen (comp_dir); - size_t abs_file_cnt = 0, abs_dir_cnt = 0; - -@@ -513,7 +513,7 @@ - } - - value = read_16 (ptr); -- if (value != 2) -+ if (value != 2 && value != 3) - { - error (0, 0, "%s: DWARF version %d unhandled", dso->filename, - value); -@@ -679,9 +679,12 @@ - if (--shrank == 0) - error (EXIT_FAILURE, 0, - "canonicalization unexpectedly shrank by one character"); -- memset (ptr, 'X', shrank); -- ptr += shrank; -- *ptr++ = '\0'; -+ else -+ { -+ memset (ptr, 'X', shrank); -+ ptr += shrank; -+ *ptr++ = '\0'; -+ } - } - - if (abs_dir_cnt + abs_file_cnt != 0) -@@ -737,7 +740,7 @@ - edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) - { - int i; -- uint_32 list_offs; -+ rpmuint32_t list_offs; - int found_list_offs; - char *comp_dir; - -@@ -746,9 +749,9 @@ - found_list_offs = 0; - for (i = 0; i < t->nattr; ++i) - { -- uint_32 form = t->attr[i].form; -- uint_32 len = 0; -- int base_len, dest_len; -+ rpmuint32_t form = t->attr[i].form; -+ size_t len = 0; -+ size_t base_len, dest_len; - - - while (1) -@@ -791,7 +794,7 @@ - { - char *dir; - -- dir = (char *)debug_sections[DEBUG_STR].data -+ dir = (char *) debug_sections[DEBUG_STR].data - + do_read_32_relocated (ptr); - - free (comp_dir); -@@ -821,7 +824,7 @@ - { - char *name; - -- name = (char *)debug_sections[DEBUG_STR].data -+ name = (char *) debug_sections[DEBUG_STR].data - + do_read_32_relocated (ptr); - if (*name == '/' && comp_dir == NULL) - { -@@ -855,7 +858,12 @@ - - switch (form) - { -- case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */ -+ case DW_FORM_ref_addr: -+ if (cu_version == 2) -+ ptr += ptr_size; -+ else -+ ptr += 4; -+ break; - case DW_FORM_addr: - ptr += ptr_size; - break; -@@ -907,7 +915,7 @@ - assert (len < UINT_MAX); - break; - default: -- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, -+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, - form); - return NULL; - } -@@ -918,6 +926,34 @@ - break; - } - } -+ -+ /* Ensure the CU current directory will exist even if only empty. Source -+ filenames possibly located in its parent directories refer relatively to -+ it and the debugger (GDB) cannot safely optimize out the missing -+ CU current dir subdirectories. */ -+ if (comp_dir && list_file_fd != -1) -+ { -+ char *p; -+ size_t size; -+ -+ if (base_dir && has_prefix (comp_dir, base_dir)) -+ p = comp_dir + strlen (base_dir); -+ else if (dest_dir && has_prefix (comp_dir, dest_dir)) -+ p = comp_dir + strlen (dest_dir); -+ else -+ p = comp_dir; -+ -+ size = strlen (p) + 1; -+ while (size > 0) -+ { -+ ssize_t ret = write (list_file_fd, p, size); -+ if (ret == -1) -+ break; -+ size -= ret; -+ p += ret; -+ } -+ } -+ - if (found_list_offs && comp_dir) - edit_dwarf2_line (dso, list_offs, comp_dir, phase); - -@@ -1034,7 +1070,7 @@ - if (debug_sections[DEBUG_INFO].data != NULL) - { - unsigned char *ptr, *endcu, *endsec; -- uint_32 value; -+ rpmuint32_t value; - htab_t abbrev; - struct abbrev_tag tag, *t; - int phase; -@@ -1176,11 +1212,11 @@ - return 1; - } - -- value = read_16 (ptr); -- if (value != 2) -+ cu_version = read_16 (ptr); -+ if (cu_version != 2 && cu_version != 3) - { - error (0, 0, "%s: DWARF version %d unhandled", dso->filename, -- value); -+ cu_version); - return 1; - } - -@@ -1190,7 +1226,7 @@ - if (debug_sections[DEBUG_ABBREV].data == NULL) - error (0, 0, "%s: .debug_abbrev not present", dso->filename); - else -- error (0, 0, "%s: DWARF-2 CU abbrev offset too large", -+ error (0, 0, "%s: DWARF CU abbrev offset too large", - dso->filename); - return 1; - } -@@ -1200,14 +1236,14 @@ - ptr_size = read_1 (ptr); - if (ptr_size != 4 && ptr_size != 8) - { -- error (0, 0, "%s: Invalid DWARF-2 pointer size %d", -+ error (0, 0, "%s: Invalid DWARF pointer size %d", - dso->filename, ptr_size); - return 1; - } - } - else if (read_1 (ptr) != ptr_size) - { -- error (0, 0, "%s: DWARF-2 pointer size differs between CUs", -+ error (0, 0, "%s: DWARF pointer size differs between CUs", - dso->filename); - return 1; - } -@@ -1225,7 +1261,7 @@ - t = htab_find_with_hash (abbrev, &tag, tag.entry); - if (t == NULL) - { -- error (0, 0, "%s: Could not find DWARF-2 abbreviation %d", -+ error (0, 0, "%s: Could not find DWARF abbreviation %d", - dso->filename, tag.entry); - htab_delete (abbrev); - return 1; -@@ -1374,12 +1410,12 @@ - or Elf64 object, only that we are consistent in what bits feed the - hash so it comes out the same for the same file contents. */ - { -- inline void process (const void *data, size_t size) -+ auto inline void process (const void *data, size_t size); -+ auto inline void process (const void *data, size_t size) - { - memchunk chunk = { .data = (void *) data, .size = size }; - hashFunctionContextUpdateMC (&ctx, &chunk); - } -- - union - { - GElf_Ehdr ehdr; -@@ -1439,11 +1475,11 @@ - - /* Now format the build ID bits in hex to print out. */ - { -- const unsigned char * id = (unsigned char *) build_id->d_buf + build_id_offset; -+ const rpmuint8_t * id = (rpmuint8_t *)build_id->d_buf + build_id_offset; - char hex[build_id_size * 2 + 1]; - int n = snprintf (hex, 3, "%02" PRIx8, id[0]); - assert (n == 2); -- for (i = 1; i < build_id_size; ++i) -+ for (i = 1; i < (int)build_id_size; ++i) - { - n = snprintf (&hex[i * 2], 3, "%02" PRIx8, id[i]); - assert (n == 2); -@@ -1466,8 +1502,7 @@ - Elf_Data *build_id = NULL; - size_t build_id_offset = 0, build_id_size = 0; - -- optCon = poptGetContext("debugedit", argc, (const char **)argv, -- optionsTable, 0); -+ optCon = poptGetContext("debugedit", argc, (const char **)argv, optionsTable, 0); - - while ((nextopt = poptGetNextOpt (optCon)) > 0 || nextopt == POPT_ERROR_BADOPT) - /* do nothing */ ; -@@ -1585,7 +1620,8 @@ - Elf_Data src = dst; - src.d_buf = data->d_buf; - assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr)); -- while ((char *) data->d_buf + data->d_size - (char *) src.d_buf > (int) sizeof nh -+ while ((char *) data->d_buf + data->d_size - -+ (char *) src.d_buf > (int) sizeof nh - && elf32_xlatetom (&dst, &src, dso->ehdr.e_ident[EI_DATA])) - { - Elf32_Word len = sizeof nh + nh.n_namesz; -@@ -1595,7 +1631,8 @@ - && !memcmp ((char *) src.d_buf + sizeof nh, "GNU", sizeof "GNU")) - { - build_id = data; -- build_id_offset = (char *) src.d_buf + len - (char *) data->d_buf; -+ build_id_offset = (char *) src.d_buf + len - -+ (char *) data->d_buf; - build_id_size = nh.n_descsz; - break; - } diff --git a/rpm-rpm5-patchset-10061.patch b/rpm-rpm5-patchset-10061.patch deleted file mode 100644 index 04df009..0000000 --- a/rpm-rpm5-patchset-10061.patch +++ /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 index 687e185..0000000 --- a/rpm-rpm5-patchset-8074.patch +++ /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 index 0df6b33..0000000 --- a/rpm-rpm5-patchset-8413.patch +++ /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 index 09538ec..0000000 --- a/rpm-rpm5-patchset-8637.patch +++ /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 index 7d73d5d..0000000 --- a/rpm-rpmpopt.patch +++ /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