Remove overlooked sources remaining after upstream resynchronization.

Wed, 01 Aug 2012 13:51:09 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 01 Aug 2012 13:51:09 +0200
changeset 430
9b4bbbae3a98
parent 429
b363f8ef6dcb
child 431
127559aa0c5e

Remove overlooked sources remaining after upstream resynchronization.

openpkg/HISTORY file | annotate | diff | comparison | revisions
openpkg/aux.prereq.sh file | annotate | diff | comparison | revisions
openpkg/aux.usrgrp.sh file | annotate | diff | comparison | revisions
openpkg/aux.wrapbin.sh file | annotate | diff | comparison | revisions
openpkg/aux.wrapsrc.sh file | annotate | diff | comparison | revisions
openpkg/install.sh file | annotate | diff | comparison | revisions
openpkg/pod2man.sh file | annotate | diff | comparison | revisions
openpkg/rplstrnlen.c file | annotate | diff | comparison | revisions
openpkg/rpm.patch.bugfix file | annotate | diff | comparison | revisions
openpkg/rpm.patch.feature file | annotate | diff | comparison | revisions
openpkg/rpm.patch.porting file | annotate | diff | comparison | revisions
openpkg/rpm.patch.regen file | annotate | diff | comparison | revisions
openpkg/rpmrc file | annotate | diff | comparison | revisions
     1.1 --- a/openpkg/HISTORY	Tue Jul 31 12:27:54 2012 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,701 +0,0 @@
     1.4 -2009
     1.5 -====
     1.6 -
     1.7 -20090106 port miniperl and rpmio to Solaris 11
     1.8 -
     1.9 -2008
    1.10 -====
    1.11 -
    1.12 -20080101 closedpkg
    1.13 -
    1.14 -2007
    1.15 -====
    1.16 -
    1.17 -20071227 remove support for ancient FreeBSD 4
    1.18 -20071222 upgrade to Perl 5.10.0
    1.19 -20071030 upgrade to cURL 7.17.1
    1.20 -20071019 upgrade to OpenSSL 0.9.8g
    1.21 -20071018 upgrade to latest Tar patch
    1.22 -20071017 try to port Tar and OpenSSL to AIX 5 and Solaris 8 again
    1.23 -20071015 avoid calling of autoconf while building GNU bash
    1.24 -20071014 fix OpenSSL patch (some important portability related hunks were lost)
    1.25 -20071011 upgrade to OpenSSL 0.9.8f
    1.26 -20071011 add support for FreeBSD 8.0-CURRENT
    1.27 -20071010 upgrade to GNU tar 1.19
    1.28 -20070914 upgrade to cURL 7.17.0
    1.29 -20070909 print entire list of all %NoSource files instead of bailing out on the first missing file encountered
    1.30 -20070321 upgrade to openpkg-registry 1.1.3 remove legacy code which had the side effect of the REGISTRY_UUID file being touched hourly
    1.31 -20070718 "diff reduction" to RPM 5 development version (no functional change)
    1.32 -20070717 fix a very long-standing cruel implementation bug in the platform detection
    1.33 -20070711 upgrade to cURL 7.16.4
    1.34 -20070630 upgrade to GNU tar 1.18
    1.35 -20070625 upgrade to cURL 7.16.3
    1.36 -20070624 upgrade to openpkg-tools 1.4.5
    1.37 -20070623 apply a workaround to GNU gzip for resolving potential futimens() conflict (fixes built under Fedora 7)
    1.38 -20070620 more consistently use "shtool platform" for building OpenSSL
    1.39 -20070616 teach OpenSSL config to identify cc being a disguised gcc (pass -gcc to Configure but run cc)
    1.40 -20070614 synchronize 64bit -fPIC option and ./config usage from "openssl" package
    1.41 -20070608 upgrade to GNU tar 1.17
    1.42 -20070608 fix tracking of gzip
    1.43 -20070607 use path /etc/rc.d/init.d/ instead of non-standard /etc/init.d/ under AIX
    1.44 -20070606 under MacOS X do not add -Wl,-search_paths_first if -c or -E is present on the cc command line
    1.45 -20070605 upgrade to GNU gzip 1.3.12
    1.46 -20070605 upgrade to latest GNU shtool snapshot for final Mac OS X identification and some small improvements for CentOS
    1.47 -20070604 improve Mac OS X support by providing gcc/cc/ld override scripts to pass option "-search_paths_first" to ld(1)
    1.48 -20070604 improve Mac OS X support by upgrading to an improved GNU shtool snapshot
    1.49 -20070603 disable shared library building in Perl for better supporting Mac OS X
    1.50 -20070603 synchronize openssl.patch with latest version from "openssl" package
    1.51 -20070520 fix building Perl under GCC 4.2 world order
    1.52 -20070519 upgrade to OSSP uuid 1.6.0
    1.53 -20070519 upgrade to official GNU shtool 2.0.7
    1.54 -20070514 upgrade to newer GNU shtool snapshot which fixes "shtool mkln" and "shtool install" commands
    1.55 -20070511 upgrade to "openpkg" executable version 2.0.1-C, do not rise privileges for "openpkg rpm" when given -[bt]* options
    1.56 -20070507 workaround PIC/DSO related problems under FreeBSD on sparc64 by enforcing -fPIC
    1.57 -20070419 meticulously obey order when creating user, group, login shell relationships
    1.58 -20070418 use bootstrapped bash to prevent problems when /bin/sh is not a bourne shell
    1.59 -20070417 support %l_as macro and --use_as bootstrap option to complement ar, ld, strip handling
    1.60 -20070411 upgrade to cURL 7.16.2
    1.61 -20070329 add variables to expand uuid(8) information in the "openpkg release" format
    1.62 -20070322 cosmetic: align code variable name with documentation
    1.63 -20070321 upgrade to openpkg-registry 1.1.2 replace HOSTNAME with FQDN when creating OPENPKG_DESC default
    1.64 -20070320 automatic (re-)registration if previous registration, community series or release set to openpkg URLs
    1.65 -20070320 improve generation of UUID_PLATFORM by using a better (no longer IP based) "discriminator" value
    1.66 -20070320 remove old support for never finished rcng
    1.67 -20070320 remove old backward compatibility from rc.func for OpenPKG 1.2's opXXX functions
    1.68 -20070319 change "rc" to not check permissions for --print operations
    1.69 -20070319 fix eval "rc" in rc.func which relies on PATH and conflicts with Plan 9 shell
    1.70 -
    1.71 -20070319 **** RELEASE AS PART OF OPENPKG 2.20070319 ****
    1.72 -20070305 invalidate passwd and group tables from Name Service Cache Daemon after pwconv
    1.73 -20070305 upgrade to rpmtool 1.1.0 remove dormant code for system user/group addition/removal
    1.74 -
    1.75 -20070303 **** RELEASE AS PART OF OPENPKG 2.20070303 ****
    1.76 -20070302 upgrade to openpkg-registry 1.1.1 upgrade safety
    1.77 -20070302 upgrade to openpkg-tools 1.4.3 direct access relative path names (identified by leading "./"); minor re fix in 1.4.4
    1.78 -20070226 upgrade to openpkg-tools 1.4.2 direct access absolut path names (identified by leading "/"), download from URLs (including "file://")
    1.79 -20070223 upgrade to OpenSSL 0.9.8e
    1.80 -20070222 upgrade to openpkg-tools 1.4.1 avoid "openpkg curl" to emit confusing "error trying read config" messages
    1.81 -
    1.82 -20070221 **** RELEASE AS PART OF OPENPKG 2.20070221 ****
    1.83 -20070221 autoregister for community series; always reregister
    1.84 -20070221 backout capability to seed registry user/link information to avoid register.conf file conflict
    1.85 -20070221 upgrade to openpkg-tools 1.4.0 ("openpkg curl"), upgrade to openpkg-registry 1.1.0 (autoregister)
    1.86 -20070207 upgrade to openpkg-tools 1.3.2
    1.87 -20070206 upgrade to GNU gzip 1.3.11
    1.88 -20070204 rpmtool cflags tool detection must handle relative pathes (no gcc) and absolute pathes (with gcc)
    1.89 -20070204 unbreak rpmtool cflags tool detection
    1.90 -20070130 minor fixes in rpmtool and the corresponding man page
    1.91 -20070130 upgrade to cURL 7.16.1
    1.92 -
    1.93 -20070105 **** RELEASE AS PART OF OPENPKG 2.20070105 ****
    1.94 -20070105 upgrade to GNU bzip2 1.0.4
    1.95 -20070102 upgrade to openpkg-tools 1.3.1
    1.96 -20070101 upgrade to GNU gzip 1.3.10
    1.97 -20070101 adjust copyright year in all messages to cover new year 2007
    1.98 -
    1.99 -2006
   1.100 -====
   1.101 -
   1.102 -20061223 upgrade to openpkg-tools 1.3.0
   1.103 -20061210 upgrade to GNU tar 1.16.1
   1.104 -20061210 upgrade to GNU gzip 1.3.8
   1.105 -20061208 upgrade to GNU gzip 1.3.7
   1.106 -
   1.107 -20061207 **** RELEASE AS PART OF OPENPKG 2.20061207 ****
   1.108 -20061207 remove obsolete references to openpkg-bugdb@openpkg.org and rt.openpkg.org
   1.109 -20061207 fix incorrect double-import of OpenPGP keys by first fixating the RPM DB
   1.110 -20061207 fix Solaris build issues with the newer GNU gzip 1.3.6
   1.111 -20061207 upgrade to "openpkg" executable version 2.0.0-C
   1.112 -20061206 apply the GNU Bash 3.2 upstream patches 001-005
   1.113 -20061206 switch GNU gzip from pre-patched OpenPKG tarball to pristine upstream tarball plus OpenPKG "update" tarball
   1.114 -20061206 enhance "openpkg release" robustness when config file defines same value repeatedly
   1.115 -20061205 skip build of irrelevant parts of the GNU tar distribution
   1.116 -20061129 upgrade to GNU gzip 1.3.6
   1.117 -20061129 adjust wordings in package class hints according to current classification
   1.118 -20061114 upgrade to openpkg-tools 1.1.1
   1.119 -20061114 provide %{l_miniperl} and %{l_openssl} macros
   1.120 -20061112 install zlib's zconf.h header as it is required by zlib.h
   1.121 -20061030 upgrade to cURL 7.16.0
   1.122 -
   1.123 -20061030 **** RELEASE AS PART OF OPENPKG 2.20061030 ****
   1.124 -20061030 upgrade to openpkg-tools 1.1.0
   1.125 -20061030 switch from a single OpenPGP key openpkg.pgp (.org) to three openpkg.{org,com,net}.pgp keys
   1.126 -20061026 fix number of CPU detection in rpmtool to support recent FreeBSDs & NetBSDs
   1.127 -
   1.128 -20061024 **** RELEASE AS PART OF OPENPKG 2.20061024 ****
   1.129 -20061024 try to workaround GNU tar build problems
   1.130 -
   1.131 -20061023 **** RELEASE AS PART OF OPENPKG 2.20061023 ****
   1.132 -20061023 upgrade to openpkg-tools 1.0.1
   1.133 -20061022 upgrade to openpkg-registry 1.0.1
   1.134 -20061022 upgrade to GNU tar 1.16
   1.135 -20061022 fix License header of "openpkg" package
   1.136 -
   1.137 -20061018 **** RELEASE AS PART OF OPENPKG 2.20061018 ****
   1.138 -20061016 upgrade to openpkg-tools 1.0.0 with no functional change to 0.8.80
   1.139 -20061008 upgrade to openpkg-registry 1.0.0 with no functional change to 0.7.2
   1.140 -20061016 upgrade to openpkg-tools 0.8.80
   1.141 -20061013 allow %{l_cc} and %{l_cxx} to be set in ~/.rpmmacros to values containing spaces
   1.142 -20061013 new world order for "Packager" and "Distribution" headers
   1.143 -20061012 remove Alpha and add PPC and AMD64 to rpmrc
   1.144 -20061011 upgrade to GNU Bash 3.2.0
   1.145 -20060930 upgrade to openpkg-tools 0.8.76
   1.146 -20060929 fix error message in openpkg setuid wrapper
   1.147 -20060929 make passwd/group lookups more efficient by performing key-based lookups instead of full dumps when possible
   1.148 -20060929 upgrade to openpkg-tools 0.8.75
   1.149 -20060928 upgrade to OpenSSL 0.9.8d
   1.150 -20060926 upgrade to openpkg-tools 0.8.74
   1.151 -20060923 upgrade to GNU config 20060923
   1.152 -20060923 upgrade to openpkg-tools 0.8.73
   1.153 -
   1.154 -20060913 **** RELEASE AS PART OF OPENPKG 2.20060913 ****
   1.155 -20060913 if CWD is NO LONGER accessible, try to switch to home of target identity to prevent failures in e.g. GNU bash
   1.156 -20060913 unpack source RPM package files as management user if called by super user ("openpkg rpm -Uvh *.src.rpm")
   1.157 -20060913 do not rise privileges for "openpkg rc" when given --eval or --print options
   1.158 -20060910 OpenPKG supports all major Unix platforms - remove explicit and unmaintained platform support determination
   1.159 -20060905 upgrade to OpenSSL 0.9.8c
   1.160 -20060826 try to allow Perl to build under RHEL4/amd64 (attempt 2)
   1.161 -20060826 upgrade to openpkg-tools 0.8.71
   1.162 -20060825 cleanup build procedure of Perl to allow it to build under RHEL4/amd64 (attempt 1)
   1.163 -20060825 cleanup and bring up-to-date the source tree documentation
   1.164 -
   1.165 -20060824 **** RELEASE AS PART OF OPENPKG 2.20060824 ****
   1.166 -20060823 upgrade to openpkg-tools 0.8.70
   1.167 -20060823 create fallback/override directories with owner/group musr/mgrp
   1.168 -20060823 make <prefix>/bin/openpkg "set-uid" for allowing it to downgrade/upgrade privileges automatically
   1.169 -20060823 upgrade to openpkg-tools 0.8.69 (no longer uses "curl -q" in "openpkg build")
   1.170 -20060823 fix "openpkg release" with workaround for Solaris sed(1) which ignores lines without trailing newlines
   1.171 -
   1.172 -20060818 **** RELEASE AS PART OF OPENPKG 2.20060818 ****
   1.173 -20060818 upgrade to openpkg-tools 0.8.68
   1.174 -20060818 try to workaround "grep -e" Autoconf issues on Solaris with OSSP uuid.
   1.175 -
   1.176 -20060815 **** RELEASE AS PART OF OPENPKG 2.20060815 ****
   1.177 -20060815 upgrade to openpkg-tools 0.8.67 (finally allows "openpkg build" to really run under miniperl)
   1.178 -
   1.179 -20060812 **** RELEASE AS PART OF OPENPKG 2.20060812 ****
   1.180 -20060811 let old "openpkg install" command use the "openpkg build" command
   1.181 -20060811 replace "openpkg build" wrapper with a copy of the real "openpkg build" command
   1.182 -20060808 make "openpkg uuid update" processing more robust by detecting empty UUID_REGISTRY
   1.183 -20060808 upgrade to openpkg-registry 0.7.2 improve user visible error handling
   1.184 -20060808 upgrade to openpkg-registry 0.7.1 (server changes only)
   1.185 -20060808 upgrade to openpkg-registry 0.7.0 link feature
   1.186 -20060807 upgrade to cURL 7.15.5
   1.187 -20060803 upgrade to openpkg-registry 0.6.4, 0.6.5 (server changes only)
   1.188 -20060801 upgrade to OSSP uuid 1.5.1
   1.189 -20060728 upgrade to OSSP uuid 1.5.0
   1.190 -
   1.191 -20060726 **** RELEASE AS PART OF OPENPKG 2.20060726 ****
   1.192 -20060725 upgrade to openpkg-registry 0.6.3 which comes with prerendered manual page
   1.193 -20060725 upgrade to openpkg-registry 0.6.2 fixes broken URL rewriting code and
   1.194 -20060725 upgrade to openpkg-registry 0.6.1 remove gpg-pubkey and similar improper data from preparation step
   1.195 -20060714 upgrade to openpkg-registry 0.6.0 to capture package and provides data
   1.196 -20060710 upgrade to openpkg-registry 0.5.2 which comes with embedded manual page
   1.197 -20060628 allow "openpkg build" emulation script to gracefully handle platform changes
   1.198 -20060625 align configure call of GNU make with the "make" package
   1.199 -20060625 upgrade to cURL 7.15.4 by using the GREP=grep workaround.
   1.200 -
   1.201 -20060622 **** RELEASE AS PART OF OPENPKG 2.20060622 ****
   1.202 -20060622 replace release tag fiddling in openpkg.boot with "openpkg release" functionality, too.
   1.203 -20060622 do not rely on RPM's smartness to not expand "%x" when we actually meant "%%x"
   1.204 -20060621 use new "openpkg release" for "openpkg install" and "openpkg build" commands
   1.205 -20060621 use new "openpkg release" for %{l_openpkg_release} macro
   1.206 -20060621 added "openpkg release" command for more precise OpenPKG distribution tag and URL determination
   1.207 -20060621 complain also about .rpmsave/.rpmnew files if it is a symbolic link (usually created manually)
   1.208 -20060619 downgrade to cURL 7.15.3 til a suitable solution for long line-capable 'grep -e' is found
   1.209 -20060619 backout SMF and revert to classic System V init style on Solaris 10 due to complete brokenness
   1.210 -20060618 support bootstrap "Release:" tags for N-STABLE branches ("N.YYYMMDD")
   1.211 -20060618 support bootstrap "Release:" tags like YYYYMMDDxxxx for variants of external parties
   1.212 -20060612 upgrade to cURL 7.15.4
   1.213 -20060523 force OpenSSL to build with just platform "cc" for maximum portability
   1.214 -20060517 make "openpkg uuid update" processing more robust to prevent problems
   1.215 -20060517 fix output of "openpkg build" wrapper script
   1.216 -20060515 fix building of OpenSSL by reducing used Perl features (integer.pm, Cwd.pm)
   1.217 -20060514 fix building of OpenSSL by reducing used Perl features (find.pl, strict.pm)
   1.218 -20060513 build cURL with SSL support to allow it to fetch from HTTPS URLs
   1.219 -20060513 major change: build and install OpenSSL 0.9.8b (for adding SSL support to cURL)
   1.220 -20060513 major change: build and install Perl 5.8.8 miniperl (for building OpenSSL, rpmtool files, etc)
   1.221 -
   1.222 -20060512 **** RELEASE AS PART OF OPENPKG 2.5.2 ****
   1.223 -20060512 upgrade to OpenPKG Registry 0.4.0
   1.224 -20060512 add a bootstrap wrapper for "openpkg build" command similar to "openpkg install"
   1.225 -20060512 fix "openpkg install" command under OpenPKG Registry world order by using RDF index files
   1.226 -20060512 include a copy of the OpenPKG Registry client ("openpkg register")
   1.227 -20060419 upgrade to GNU shtool 2.0.6
   1.228 -20060417 increase Solaris SMF timeout from 60 to 180 seconds
   1.229 -20060417 upgrade to GNU make 3.81 (excluded in 2.5.2)
   1.230 -20060320 upgrade to cURL 7.15.3
   1.231 -20060313 upgrade to OSSP uuid 1.4.2
   1.232 -20060311 upgrade to GNU config 20060310 (excluded in 2.5.2)
   1.233 -20060307 fixed Solaris 10 svc manifest
   1.234 -20060307 cleanup building of GNU Bash
   1.235 -20060306 fixed building of GNU Bash by reducing dependency to Bison/Yacc
   1.236 -20060227 upgrade to cURL 7.15.2
   1.237 -20060207 upgrade to OSSP uuid 1.4.1
   1.238 -20060207 upgrade to GNU shtool 2.0.5
   1.239 -20060206 upgrade to GNU config 20060206
   1.240 -20060204 upgrade to GNU shtool 2.0.4
   1.241 -20060204 apply Bash 3.1 vendor patches 001 to 007
   1.242 -20060115 upgrade to OSSP uuid 1.4.0
   1.243 -20060101 upgrade to GNU config 20051231
   1.244 -20060101 adjust copyright year in all messages to cover new year 2005
   1.245 -
   1.246 -2005
   1.247 -====
   1.248 -
   1.249 -20051210 **** RELEASE AS PART OF OPENPKG 2.5.1 ****
   1.250 -20051209 upgrade to GNU Bash 3.1 (excluded in 2.5.2)
   1.251 -20051207 upgrade to cURL 7.15.1
   1.252 -20051206 upgrade to OSSP uuid 1.3.2
   1.253 -20051017 cleanup the source tree by removing trailing blanks from HISTORY
   1.254 -
   1.255 -20051016 **** RELEASE AS PART OF OPENPKG 2.5.0 ****
   1.256 -20051016 adjust aux.prereq.sh for the official set of platforms in OpenPKG 2.5
   1.257 -20051016 be pendantic and add /lib also to LD_LIBRARY_PATH under NetBSD & FreeBSD
   1.258 -20051014 upgrade to cURL 7.15.0
   1.259 -20051007 on Solaris 10 switch from legacy rcX.d init scripts to SMF manifest
   1.260 -20051002 upgrade to GNU shtool 2.0.3
   1.261 -20051002 upgrade to GNU config.* scripts as of 20050102
   1.262 -20050924 more IRIX 6.x support
   1.263 -20050924 upgrade to OSSP uuid 1.3.1
   1.264 -20050923 fix rpm/configure not detecting inet_aton, causing rpmio.c fail with gcc4
   1.265 -20050920 fix init script for Gentoo Linux to ensure startup as very last service
   1.266 -20050902 upgrade to OSSP uuid 1.3.0
   1.267 -20050902 upgrade to cURL 7.14.1
   1.268 -20050830 upgrade to OSSP uuid 1.2.1
   1.269 -20050815 move tool determination back into .spec to unbreak upgrades
   1.270 -20050815 backout --fallback option (has to be replaced by a more general solution)
   1.271 -20050815 unbreak *.sh --help command (was broken by cut & paste bugs)
   1.272 -20050815 fix Fedora Core 4 compile problems with a more clean and permanent patch
   1.273 -20050813 add --fallback and related options, enabling use of "foreign" dev tools
   1.274 -20050812 use ls(1) as a better strip(1) replacement as both fail when a file is missing
   1.275 -20050812 store l_ar, l_ld and l_strip in .buildenv, reorder rpmmacros and introduce l_strip
   1.276 -20050808 make sure strip(1) logic does not break shell script execution
   1.277 -20050804 temporary workaround defeating problems with Fedora Core 4 vendor compiler
   1.278 -20050727 remove dependency to binutils tools size(1) and strip(1)
   1.279 -20050727 added to rpmtool the detection for "number of CPUs" under AIX for "make -j"
   1.280 -
   1.281 -20050726 **** RELEASE AS PART OF OPENPKG 2.4.2 ****
   1.282 -20050726 Cosmetics in "openpkg rpm --help" output
   1.283 -20050726 Add %{l_ar} and %{l_ld} macros for easier bootstrapping
   1.284 -20050724 "better" patch for GNU gzip, OpenPKG-SA-2005.009 (CAN-2005-1228)
   1.285 -20050722 Upgraded to Zlib 1.2.3
   1.286 -
   1.287 -20050706 **** RELEASE AS PART OF OPENPKG 2.4.1 ****
   1.288 -20050706 Fixed zlib security issue (OpenPKG-SA-2005.013, CAN-2005-2096)
   1.289 -20050706 upgrade to latest version 20050606 of GNU config.* scripts
   1.290 -20050706 upgrade to latest CVS snapshot of GNU shtool to correctly detect FreeBSD/amd64 on ix86+EM64T
   1.291 -
   1.292 -20050615 **** RELEASE AS PART OF OPENPKG 2.4.0 ****
   1.293 -20050615 update the platform support list (aux.prereq.sh) for OpenPKG 2.4
   1.294 -20050615 upgrade to GNU shtool 2.0.2 (fixing CAN-2005-1751 and CAN-2005-1759)
   1.295 -20050613 part 4 of AIX port: cleanups and fixes for system hooks
   1.296 -20050611 upgrade to latest CVS snapshot of GNU shtool to correctly detect Mandriva Linux
   1.297 -20050610 patch GNU gzip, OpenPKG-SA-2005.009 (CAN-2005-1228)
   1.298 -20050609 part 3 of AIX port: cleanups and fixes for system hooks
   1.299 -20050608 part 2 of AIX port: RPM patches, system hooks
   1.300 -20050607 part 1 of AIX port: RPM patches
   1.301 -20050606 fix and enhance various vendor file trackings
   1.302 -20050606 upgrade to latest version 20050606 of GNU config.* scripts
   1.303 -20050606 upgrade to GNU bzip2, OpenPKG-SA-2005.008 (CAN-2005-0953, CAN-2005-1260)
   1.304 -20050527 upgrade to latest CVS snapshot of GNU shtool to correctly support IBM AIX
   1.305 -20050523 search 'rpmmacros' file (not hidden) in '.openpkg' directory
   1.306 -20050521 upgrade to latest version 20050521 of GNU config.* scripts
   1.307 -20050518 add feature to search '.rpmmacros' file in '.openpkg' directory
   1.308 -20050516 upgrade to cURL 7.14.0
   1.309 -20050513 upgrade to latest CVS snapshot of GNU shtool to support IBM OS/400 PASE
   1.310 -20050513 upgrade to latest version 20050513 of GNU config.* scripts
   1.311 -20050405 upgrade to cURL 7.13.2
   1.312 -
   1.313 -20050323 **** RELEASE AS PART OF OPENPKG 2.3.1 ****
   1.314 -20050323 give a more precise hint at the end of the .src.sh bootstrap procedure
   1.315 -20050314 fix rc env processing: do not assign to the variable "_" (which is read-only in some shells like zsh)
   1.316 -20050308 remove GNU gcc specific and unused stuff from <beecrypt/gnu.h>, because it breaks under non-GCC
   1.317 -20050305 upgrade to latest version of GNU config.* scripts
   1.318 -20050304 upgrade to cURL 7.13.1
   1.319 -20050224 upgrade to GNU shtool 2.0.1
   1.320 -20050224 update aux.prereq.sh for OpenPKG 2.3's list of platforms
   1.321 -
   1.322 -20050223 **** RELEASE AS PART OF OPENPKG 2.3.0 ****
   1.323 -20050223 fix %clean procedure to correctly remove build area
   1.324 -20050223 apply cURL 7.13.0 security fixes
   1.325 -20050221 upgrade to ZLib 1.2.2 (excluded in 2.2.3)
   1.326 -20050209 workaround PIC/DSO related problems under FreeBSD on amd64/ia64 by enforcing -fPIC (excluded in 2.2.3)
   1.327 -20050203 fix the basename(3) issues the correct way by including <libgen.h>
   1.328 -20050202 fix DESTDIR not being passed to subdir make
   1.329 -20050202 update platform support to match current state of buildfarm
   1.330 -20050201 remove cast in RPM source to workaround FreeBSD/ia64 segfault
   1.331 -20050201 upgrade to cURL 7.13.0 (excluded in 2.2.3)
   1.332 -20050131 apply three vendor bugfixes for GNU tar 1.15.1 (excluded in 2.2.3)
   1.333 -20050124 upgrade from old config.guess/config.sub to newer versioned ones (excluded in 2.2.3)
   1.334 -20050123 upgrade to OSSP uuid 1.2.0 (excluded in 2.2.3)
   1.335 -20050120 add support for Slackware 10.0 (excluded in 2.2.3)
   1.336 -20050120 adjust copyright year in all messages to cover new year 2005
   1.337 -20050113 add %{l_nil} macro (excluded in 2.2.3)
   1.338 -20050113 upgrade to OSSP uuid 1.1.2 (excluded in 2.2.3)
   1.339 -
   1.340 -2004
   1.341 -====
   1.342 -
   1.343 -20041225 upgrade to BeeCrypt 4.1.2 (excluded in 2.2.3)
   1.344 -20041222 upgrade to GNU tar 1.15.1 (excluded in 2.2.3)
   1.345 -20041220 upgrade to cURL 7.12.3 (excluded in 2.2.3)
   1.346 -20041220 add "tool override" support for Debian-based Ubuntu Linux distribution
   1.347 -
   1.348 -20041211 **** RELEASE AS PART OF OPENPKG 2.2.2 ****
   1.349 -20041211 fix system start/stop transfer script for FreeBSD 5 (II)
   1.350 -20041210 fix system start/stop transfer script for FreeBSD 5
   1.351 -20041125 port RPM to NetBSD 2.0 (pre-release)
   1.352 -20041119 upgrade to BeeCrypt 4.1.1 (excluded in 2.2.2)
   1.353 -20041118 upgrade to BeeCrypt 4.1.0 (excluded in 2.2.2)
   1.354 -20041118 upgrade to OSSP uuid 1.1.1 (excluded in 2.2.2)
   1.355 -20041118 fix rc(1) command processing for "%cmd -u foo" situations under umask 027 and similar
   1.356 -20041008 port to MacOS X 10.3.6 by disabling assembly code in gzip
   1.357 -
   1.358 -20041004 **** RELEASE AS PART OF OPENPKG 2.2.1 ****
   1.359 -20041104 apply GNU bash patch for brain-dead Linux platforms with broken WCONTINUE
   1.360 -20041103 upgrade to OSSP uuid 1.1.0 (excluded in 2.2.1)
   1.361 -20041024 synchronize GNU bash patches with OpenPKG "bash" package
   1.362 -20041018 upgrade to cURL 1.12.2 (excluded in 2.2.1)
   1.363 -20041018 upgrade to OSSP uuid 1.0.4 (excluded in 2.2.1)
   1.364 -20041015 upgrade to OSSP uuid 1.0.3 (excluded in 2.2.1)
   1.365 -
   1.366 -20041002 **** RELEASE AS PART OF OPENPKG 2.2.0 ****
   1.367 -20041002 cleanup more shtool usages
   1.368 -20040928 fix broken shtool usage introduced in 20040924
   1.369 -20040924 remove the beecrypt C++ preprocessor configure test
   1.370 -20040923 fix building of cURL under at least FreeBSD 5.3.
   1.371 -20040922 correct usage text of openpkg.boot (matching aux.wrapsrc.sh exactly)
   1.372 -20040920 use the older "test -h" instead of the modern "test -L" in "rpm --setperms" for portability reasons
   1.373 -20040920 remove <prefix>/lib/openpkg/override directory and its files on deinstallation
   1.374 -20040912 upgrade to OSSP uuid 1.0.2
   1.375 -
   1.376 -20040825 **** RELEASE AS PART OF OPENPKG 2.1.2 ****
   1.377 -20040825 applied security bugfixes for ZLIB 1.2.1
   1.378 -
   1.379 -20040811 **** RELEASE AS PART OF OPENPKG 2.1.1 ****
   1.380 -20040811 upgrade to cURL 7.12.1
   1.381 -20040811 apply more fixes for GNU Bash 3.0
   1.382 -20040810 fix uid/gid determination loops by not being confused by multiple query results
   1.383 -20040804 upgrade to BeeCrypt 4.0.0 and GNU Bash 3.0
   1.384 -20040725 fix a few typos in rc(8) manual page
   1.385 -20040725 remove useless "Provides" for the corresponding RELEASE version
   1.386 -20040721 disable special RedHat NPTL handling for portability reasons
   1.387 -20040721 fixed paths in manual pages
   1.388 -20040716 upgrade to OSSP uuid 1.0.1
   1.389 -
   1.390 -20040712 **** RELEASE AS PART OF OPENPKG 2.1.0 ****
   1.391 -20040712 make --prefix optional in aux.wrapsrc.sh and default to /openpkg
   1.392 -20040712 let the --susr/--sgrp default to "root" only if --user/--group was specified
   1.393 -20040712 emulate GNU libtool environment for bzip2 to make sure RPM picks it up before a vendor version
   1.394 -20040712 fix final install detection in "openpkg install" command
   1.395 -20040702 reorder and split building of tools in order to already unpack problematic cURL tarball with GNU tar
   1.396 -20040702 make sure $PATH contains at least "/bin:/sbin:/usr/bin:/usr/sbin" for bootstrapping
   1.397 -20040702 upgrade to GNU shtool 2.0.0
   1.398 -20040702 update platform prerequisite checks for OpenPKG 2.1 platform set
   1.399 -20040701 add support for openpkg-audit package
   1.400 -20040609 add support for recognizing package class in old 1.3 Distribution headers during building
   1.401 -20040609 start rc.openpkg jobs in background and as soon as possible (priority 0)
   1.402 -20040607 workaround NetBSD gcc 2.95 optimization problems by not using -O2 there
   1.403 -20040607 upgrade to latest GNU shtool snapshot to fix platform detection under NetBSD 1.6.2-STABLE
   1.404 -20040604 revise the stderr processing of run-command processor in case of -d/--debug
   1.405 -20040604 add -k/--keep option to run-command processor for debug purposes
   1.406 -20040604 add GNU bash 2.05b vendor patches 001-007
   1.407 -20040604 port to HP-UX 11.11 platform
   1.408 -20040602 upgrade to cURL 7.12.0
   1.409 -20040602 add evil hack to workaround Debian 3.1 install-info(8) conflicts
   1.410 -20040602 remove unused code from run-command processor
   1.411 -20040602 prevent gcc 2.95 from optimizing RPM DB's sha1.c and run into a virtual memory exhaustion situation
   1.412 -20040601 fixate path to GnuPG, because RPM 4.2 passes argument directly to execve(2)
   1.413 -20040601 enable pure-C builds by patching out useless C++ checks from cURL configure
   1.414 -20040601 finally disable ulimits for FreeBSD, Solaris and Linux
   1.415 -20040601 add path defaults for HP/UX, Tru64/OSF1 and UnixWare
   1.416 -20040601 removed OS compatibility mapping list in rpmrc to avoid any magic
   1.417 -20040515 initial port to Tru64/OSF1 4.0F and IRIX 6.5.21m
   1.418 -20040512 remove RPM's "lib64" hack to port to NetBSD/sparc64
   1.419 -20040510 fix GNU tar patch
   1.420 -20040508 upgraded to GNU shtool 2.0b3
   1.421 -
   1.422 -20040507 **** RELEASE AS PART OF OPENPKG 2.0.3 ****
   1.423 -20040507 synchronize aux.prereq.sh platform checks with official list as of OpenPKG 2.0
   1.424 -20040507 fix disk space detection in aux.prereq.sh script
   1.425 -20040506 finally remove <prefix>/bin/{rpm,rpm2cpio} wrappers in preparation to OpenPKG 2.1 (excluded in 2.0.3)
   1.426 -20040505 rc: skip .snap (FreeBSD 5) and .snapshot (NetApp) directories in *.rpmxxx checking
   1.427 -20040501 use better GCC detection in "rpmtool cflags" (taken over from "gcc" package)
   1.428 -20040429 make sure <prefix>/etc/rc does not complain in cronjobs of non-privileged setups
   1.429 -20040429 port to NetBSD 1.6.2 (excluded in 2.0.3)
   1.430 -20040428 fix "openpkg man" command now that OPENPKG_TOOLS_CMDPATH is not provided
   1.431 -20040428 let rc point out that it searches subdirectories for unresolved file conflicts
   1.432 -20040427 fixed rpmpopt: replace hard-coded bash path and do not use reserved shell keywords
   1.433 -20040426 upgrade to cURL 7.11.2 (excluded in 2.0.3)
   1.434 -20040422 backout added hack to "rpmtool cflags -O" processing because it was incorrect (excluded in 2.0.3)
   1.435 -20040421 add hack to "rpmtool cflags -O" processing because Tru64 doesn't know plain "-O" option (excluded in 2.0.3)
   1.436 -20040421 POSIX compliance: replace "head -1" with "sed -e 'q'" and "tail -1" with "sed -n -e '$p'"
   1.437 -
   1.438 -20040418 **** RELEASE AS PART OF OPENPKG 2.0.2 ****
   1.439 -20040418 port RPM to Tru64 5.1 (again) (excluded in 2.0.2)
   1.440 -20040418 remove left-over object files from RPM distribution tarball before building
   1.441 -20040418 use "openpkg lsync" consistently in lsync manual page (excluded in 2.0.2)
   1.442 -20040414 fix "rpm --help" output related to option "--with"
   1.443 -20040414 fix building of GNU tar by applying more "no iconv here" enforcement (excluded in 2.0.2)
   1.444 -20040409 removed old RPM extensions (now part of "openpkg-tools") (excluded in 2.0.2)
   1.445 -20040409 worked-off <prefix>/bin/openpkg frontend in order to provide better tool chain processing
   1.446 -20040408 fixed internal OPENPKG_TOOLS variable processing in <prefix>/bin/openpkg frontend
   1.447 -20040408 added workaround to BeeCrypt build to make sure /dev/audio and /dev/dsp are not used
   1.448 -20040407 upgraded to GNU shtool 2.0b2
   1.449 -20040406 upgraded to GNU tar 1.13.94 (excluded in 2.0.2)
   1.450 -
   1.451 -20040405 **** RELEASE AS PART OF OPENPKG 2.0.1 ****
   1.452 -20040405 fix "openpkg man" command for embedded POD manual page rendering
   1.453 -20040403 fix tracking of GNU tar
   1.454 -20040401 fix "openpkg install openpkg-tool" bootstrapping command
   1.455 -20040324 fix %l_check_nosource: the output went directly into the shell scripts
   1.456 -20040320 upgrade to cURL 7.11.1 (excluded in 2.0.1)
   1.457 -20040320 bump provide for 2.0.0-2.0.0
   1.458 -
   1.459 -20040224 **** RELEASE AS PART OF OPENPKG 2.0.0 ****
   1.460 -20040224 use ~/.openpkg/warning instead of ~/.openpkg/timestamp for warning timestamp file
   1.461 -20040223 change BeeCrypt building to use no assembly code at all
   1.462 -20040223 use a more smart rpm/rpm2cpio execution wrapper warning
   1.463 -20040221 written manual page for "openpkg uuid"
   1.464 -20040221 implemented "openpkg man" command for reading tool chain command manual pages
   1.465 -20040220 fix "openpkg rpm-config --version" output
   1.466 -20040220 cleanup displayed messages and do not display error message on failed commands
   1.467 -20040218 upgraded to GNU shtool 2.0b1
   1.468 -20040217 added -t|--tar option to *.sh scripts for convenient extracting embedded tarball
   1.469 -20040217 provide <prefix>/bin/rpm2cpio for convenience reasons
   1.470 -20040216 change filesystem layout for final OpenPKG 2.0 namespace clean layout
   1.471 -20040216 config.{guess,sub} scripts are no longer installed
   1.472 -20040216 fixed --tag processing in bootstrapping situation
   1.473 -20040216 upgraded to OSSP uuid 1.0.0
   1.474 -20040214 use sane build environment already in pre-expanded sanity checking macros
   1.475 -20040213 upgraded to OSSP uuid 0.9.7
   1.476 -20040212 added support to RPM's %patch macro for passing through patch(1) "-d" option
   1.477 -20040212 upgraded to the latest GNU shtool 2.0b0 snapshot version
   1.478 -20040211 upgraded to OSSP uuid 0.9.6
   1.479 -20040210 use "<compat>" for "%l_tag_fmt" on upgrades to be more OpenPKG 1.3 compatible
   1.480 -20040210 we more smart and accept not-existing "Class:" headers for compatibility.
   1.481 -20040209 cleanup "rpmmacros" for consistent "%l_prefix" usage and fix "rpmtool not found" issue
   1.482 -20040208 added version tracking for OSSP uuid
   1.483 -20040206 upgraded to OSSP uuid 0.9.5
   1.484 -20040206 disable %prep checks under --track-dump and cleanup its output
   1.485 -20040205 activate only the %env of "openpkg" in the "musr" run-time environment
   1.486 -20040205 add --tack-dump and make sure --track/-bt do not require dependencies and sources
   1.487 -20040205 make sure -bs no longer requires dependencies
   1.488 -20040204 fix class checking macro l_check_class.
   1.489 -20040203 actually use new Class: header and %track section
   1.490 -20040130 add support to RPM for new "%track" section which will become the new vcheck(1) source
   1.491 -20040130 add support to RPM for new "%test" section which will allow run-time testing
   1.492 -20040130 add support to RPM for new "Class" header which will become the new package class source
   1.493 -20040127 fix typos and remove trailing whitespaces from source files
   1.494 -20040124 add parallel build support in %{l_mflags} for HP/UX
   1.495 -20040123 adjust copyright year in all messages to cover new year 2004
   1.496 -20040123 upgrade to cURL 7.11.0
   1.497 -20040122 add "rpm --tag <string>" support for tagging binary RPMs with arbitrary strings
   1.498 -20040122 upgrade to latest GNU shtool snapshot for better RHL/RHEL detection and naming
   1.499 -20040121 cleanup openpkg.spec by sorting SourceX headers
   1.500 -20040120 add OSSP uuid and companion uuid.sh frontend to provide new <prefix>/etc/openpkg/uuid
   1.501 -20040120 embed %post section from openpkg.spec into bootstrap script *.src.sh
   1.502 -20040120 adjust widths in "rpm -qplv" output to allow longer owner/group
   1.503 -20040120 regenerate rpm.patch.* files with latest CVS 1.12.x
   1.504 -20040113 add %status to rc.openpkg; this prevents warnings when no package provides a status
   1.505 -20040112 settings from [smrn]gid options get lost; fix by introducing a temporary variable
   1.506 -20040112 fix RPM internal handling of %_excludedocs macro
   1.507 -20040107 fix config.cache file handling in building of GNU tar and GNU patch
   1.508 -20040107 downgrade to GNU tar 1.13.25 again because --no-recursion is broken in <= 1.13.92
   1.509 -20040105 exclude %doc flagged files by default.
   1.510 -20040102 make sure rpmtool exists (important on bootstrapping with openpkg.boot)
   1.511 -20040101 start using the global file /etc/openpkg to register all OpenPKG instances on a system
   1.512 -
   1.513 -2003
   1.514 -====
   1.515 -
   1.516 -20031212 upgrade to GNU tar 1.13.92 (second attempt)
   1.517 -20031213 replaced unreleased OSSP platform script with latest GNU shtool (which includes OSSP platform)
   1.518 -20031211 add support for RedHat WS/ES/AS and Fedora to %{l_platform} via latest OSSP platform
   1.519 -20031211 uprade to GNU tar 1.13.91 (backed out again, because 1.13.91 is partly broken)
   1.520 -20031205 fix rpmtool run-time under openpkg.boot environment
   1.521 -20031129 do not enforce uudecode availability as raw tarballs introduced a month ago do no longer require it
   1.522 -20031127 only allow exact section command matches in rc
   1.523 -20031124 upgrade to zlib 1.2.1
   1.524 -20031121 rc manual page additions
   1.525 -20031117 automatically check for %NoSource/%NoPatch integrity and package class in %prep
   1.526 -20031113 stop processing if we cannot create the necessary user accounts
   1.527 -20031107 fix usage of %pre in aux.wrapbin.sh -- was broken after recent work-offs
   1.528 -20031102 upgrade to cURL 7.10.8
   1.529 -20031031 upgrade to latest OSSP platform script version
   1.530 -20031031 work-off aux.wrap{src,bin}.sh scripts and internal documentation in README
   1.531 -20031029 switch from uncompressed binary tarball to compressed tarball in tarball encapsulation
   1.532 -20031029 switch from uuencoded to raw tarballs for source/binary .sh files (30% space reduction)
   1.533 -20031028 remove problematic INCPATH stuff in RPM configure which picks up external stuff
   1.534 -20031028 upgrade to latest OSSP platform script for Darwin 6.6 and Solaris 10 support
   1.535 -20031027 port RPM to OpenDarwin 6.6.2
   1.536 -20031027 try to cleanup glob(3) replacement hacks in RPM
   1.537 -20031021 fix RPM GCC building on Unixware by using Linux i386 assembly specific stuff on Linux only.
   1.538 -20031020 include "trigger argument passing patch" from RPM BugDB
   1.539 -20031020 make "rpm --setperms" and "rpm --setugids" more portable by using Bash
   1.540 -20031020 finish porting to SCO UnixWare 7.1.3
   1.541 -20031019 port mostly to SCO UnixWare 7.1.3 (only some libtool issues remaining)
   1.542 -20031019 provide %{l_cppflags -i} for platform identification defines
   1.543 -20031019 use <prefix>/lib/openpkg/bash for rpmtool and lsync for better portability
   1.544 -20031015 fix RPM for building without GCC again
   1.545 -20031014 port to Solaris 8 with Forte C compiler
   1.546 -20031014 fix filesystem space checking (aux.prereq.sh)
   1.547 -20031014 get rid of TEMPDIR (we use more canonical TMPDIR now only)
   1.548 -20031010 provide %{_rpmdb_private} macro and --db-private for operating the RPM DB in DB_PRIVATE mode.
   1.549 -20031010 working off the aux.prereq.sh script for adjusted platform checks and additional disk space checks
   1.550 -20031008 make sure RPM does not pick up headers of a vendor BeeCrypt package under RedHat Linux
   1.551 -20031008 fix --makeproxy command after recent OpenPKG branding in "rpm --version" output
   1.552 -20031006 add 'Provides: openpkg = 1.3.1-1.3.1' for easier mixing with OpenPKG 1.3 release packages
   1.553 -20031006 add OpenPKG branding to "rpm --version" output
   1.554 -20031005 check availability of unpacking tools in .src.sh script
   1.555 -20030929 upgrade to latest OSSP platform script to recognize even more platforms
   1.556 -20030928 add partial UnixWare 7.1.x support to bootstrap; add IRIX, UnixWare and QNX support to "platform"
   1.557 -20030927 make %{error:<msg>} really stop SPEC processing
   1.558 -20030927 add new macro %{l_openpkg_release} for expanding the release id
   1.559 -20030922 remove stale temporary files in /etc
   1.560 -20030918 use assembly code in BeeCrypt only for platform where it is known to work
   1.561 -20030918 add RPM internal %{_force_oldpackage} option for enforcing --oldpackage on upgrades
   1.562 -20030918 introduce new rpmdb utility for administrating the RPM database on the lower level
   1.563 -20030916 RPM database mutex workaround for Solaris plus the passing of option -b to patch(1)
   1.564 -20030915 remove the librpmmisc.a library because its contents RPM includes in librpmio.a
   1.565 -20030915 Berkeley-DB fixes for fcntl(2) usage and Linux O_DIRECT issue
   1.566 -20030913 update to latest OSSP platform for even more accurate Linux product recognition
   1.567 -20030913 fix ordering of libraries in "rpm-config --libs"
   1.568 -20030912 add -pipe to %{l_cflags} only if %{l_cc} is GCC and as(1) is GNU as
   1.569 -20030912 remove per-package %{_sourcedir} and %{_specdir} directories on --rebuild
   1.570 -20030912 allow "-bb --short-circuit" for continuing building a binary package
   1.571 -20030912 unconditionally remove temporary files of generated/executed scripts
   1.572 -20030912 do not remove the builded sources in %clean to be consistent with other OpenPKG packages
   1.573 -20030912 include all essential RPM C API headers in <prefix>/include/rpm/
   1.574 -20030912 add file(1) magic* files to <prefix>/lib/openpkg/
   1.575 -20030911 disable RPM internal support for unzip(1)'ing .zip files
   1.576 -20030911 improve Linux detection in "platform" script
   1.577 -20030909 remove one more GCC extensional feature (in RPM's file/file.h)
   1.578 -20030908 upgrade "platform" script to new "OSSP platform" implementation and provide %{l_platform}
   1.579 -20030907 add rpm-config(8) utility and add librpmbeecrypt.a to installation tree
   1.580 -20030904 apply new BeeCrypt and Bash patch files
   1.581 -20030904 remove obsoleted patch files from CVS
   1.582 -20030904 fix cut & paste typo in openpkg.spec related to VERBOSE function
   1.583 -20030904 fix logic in previous owner/group patch
   1.584 -20030903 patch RPM 4.2.1 so it does again (as 4.0.2) ignore file owner/group on .src.rpm installation.
   1.585 -20030901 port RPM 4.2.1 to Solaris 2.6 (no "uintX_t") and non-GCC platforms (no "inline")
   1.586 -20030901 port RPM 4.2.1 to OpenBSD/NetBSD, too.
   1.587 -20030830 replace Bash variable exporting constructs with compatible Bourne-Shell constructs
   1.588 -20030828 fix unpacking of non-compressed tarballs
   1.589 -20030827 enhance and fix %post script to correctly rebuild RPM DB and import OpenPGP public key
   1.590 -
   1.591 -20030826 **** MAJOR UPGRADE FROM RPM 4.0.2 TO RPM 4.2.1 ****
   1.592 -20030820 name internal bootstrapping tarball just .tar instead of .tar.Z -- it is no longer compressed.
   1.593 -20030806 fix "rcTmp -f" functionality
   1.594 -20030805 trick cURL to skip some useless F77 autoconf checks to get it working under NetBSD again
   1.595 -20030805 allow variables with other characters than A-Z (e.g. LD_LIBRARY_PATH) to be set in %env, too.
   1.596 -
   1.597 -20030802 **** RELEASE AS PART OF OPENPKG 1.3.0 ****
   1.598 -20030730 add entry to /etc/shells only if /etc/shells already exists at all
   1.599 -20030729 aux.wrap{src,bin}.sh: exit immediately if uudecode cannot be found
   1.600 -20030729 rc: fixed processing of $openpkg_rc_def (requires pre-inclusion of rc.conf)
   1.601 -20030729 fixed nasty filedescriptor leakage in RPM on script execution
   1.602 -20030728 upgraded to cURL 7.10.6
   1.603 -20030728 rc: stop processing 'start' and 'restart' scripts if .rpmsave files exists
   1.604 -20030727 rc: do not export TMPDIR at all, it causes problems for applications once the directory is gone
   1.605 -20030721 rc: do not use TMPDIR -- instead use hard-coded /tmp
   1.606 -20030719 openpkg.boot: try to make build environment more sane by setting umask and unsetting some strange aliases
   1.607 -20030718 rc.func: opXXX replaced by rcXXX; add rc(8) manual page; add pod2man.sh; fix perl/ warnings under building
   1.608 -20030717 rc.func: add opService, switch to Bash; rc: rewrite --eval to use Bash; rpmmacros: add l_tmp{dir,file}
   1.609 -20030716 cleaned and enhanced "rc" again; added %{l_value} killer macro
   1.610 -20030715 work-off "rc" again: add -o/--output options, better cleanup, global return code
   1.611 -20030715 add to "rc" the -v/--verbose option again and provide terminal-detection
   1.612 -20030714 reduce run-time of "rc" --eval/--print operations by parsing %config sections just once
   1.613 -20030714 add convenience macros %l_rc and %l_rpm; resolve conflict with openpkg-rc package
   1.614 -20030714 bugfix verbose output; add "rc" command to search path for run-command sections
   1.615 -20030710 rename openpkg_runall to openpkg_rc_all, support new openpkg_rc_def.
   1.616 -20030709 fully work-off rc script
   1.617 -20030709 make sure l_fsl_{ldflags,libs} do not produce an error if fsl-config is not existing
   1.618 -20030709 change syntax of append/prepend feature for %{l_cppflags} and %{l_ldflags} macros; fix DB autoconf checks
   1.619 -20030708 provide append/prepend feature for %{l_cppflags} and %{l_ldflags} macros
   1.620 -20030707 remove now officially deprecated usage of %{name} macro
   1.621 -20030606 correctly support "use_cxx" for setting the "c++" path
   1.622 -20030604 fix "{s,m,r,r}{u,g}id" handling on initial bootstrapping via .src.sh.
   1.623 -20030604 better support SuSE
   1.624 -20030603 make sure 'shtool install -e ...' does not fail if file is not writeable due to permissions
   1.625 -20030530 add HISTORY file to package
   1.626 -20030519 upgrade to cURL 7.10.5
   1.627 -20030516 make sure 'shtool subst' does not fail if file is not writeable due to permissions
   1.628 -20030509 fix 'shtool mkln' command
   1.629 -20030429 Gentoo Linux support
   1.630 -20030429 RedHat 8 support (avoid problems due to alias rm='rm -i'), clean up temp dir
   1.631 -20030429 some cosmetics
   1.632 -20030429 switch to new shtool which now has a working 'shtool rotate' for SuSE
   1.633 -20030428 add bzip2 library/header to package because it is references by librpmio
   1.634 -20030425 allow only 'use_<toolname>' instead of 'with_<toolname>' for overriding 'l_<toolname>' to reduce conflict with regular package options
   1.635 -20030422 teach --fetch to honor proxy settings
   1.636 -20030417 force RPM to no longer build itself statically
   1.637 -20030416 Fix dev ticket 23 by finally implementing {m,r,n,s}uid and {m,r,n,s}gid params
   1.638 -20030416 Fix removal of group entries, which never worked from day one?!?!
   1.639 -20030415 Add l_fsl_ldflags and l_fsl_libs macros
   1.640 -20030414 fix cache file usage
   1.641 -20030410 do not leave dot files on deinstallation
   1.642 -20030404 upgrade to latest shtool snapshot in order to fix rotate command if a filename contains whitespaces
   1.643 -20030403 (unknown change)
   1.644 -20030324 speclint police
   1.645 -20030319 fix shell syntax error
   1.646 -20030317 Support for MacOS X (at least 10.0.4)
   1.647 -20030310 fix substitution of noreplace attribute
   1.648 -20030305 mega-commit: speclint police changes which were not picked up by openpkg-dev before
   1.649 -20030305 speclint police
   1.650 -20030223 add more 'getent' support
   1.651 -20030222 add Solaris/Linux 'getent' based support for passwd/group fiddling, too.
   1.652 -20030221 enhance user/group name/id fiddling in all bootstrap places to favorize POSIX id
   1.653 -20030211 Aaaaannnd risk: GNU shtool 2.0b0 (developer snapshot)
   1.654 -20030205 move bash environment setup into .bash_login; use %config(noreplace) for them plus rc.conf
   1.655 -20030204 make sure that the prefix/root directory has correct permissions and owner/group
   1.656 -20030203 try to fix temporary filename issues
   1.657 -20030202 workaround problem of missing PATH for scripts executed under different users
   1.658 -20030130 fix rpmtool PATH fiddling
   1.659 -20030128 fix typo
   1.660 -
   1.661 -20030121 **** RELEASE AS PART OF OPENPKG 1.2.0 ****
   1.662 -20030114 upgrade to cURL 7.10.3
   1.663 -20030113 make sure we stop on errors
   1.664 -20030110 some vendor tar complain about setuid bits and other flags, but work fine
   1.665 -20030109 ops, not needed actually, was my fault in not cleaning up the system
   1.666 -20030109 add FreeBSD 5.0-CURRENT support
   1.667 -20030108 add no-source support
   1.668 -20030103 switch to new %option implementation
   1.669 -20030103 remove '%options' hack, it will be replaced soon with a more elegant solution based on RPM 'Provides' headers
   1.670 -
   1.671 -2002
   1.672 -====
   1.673 -
   1.674 -20021230 bump of Copyright messages for forthcoming years 2003
   1.675 -20021230 switch to %option(s), but intentionally WITHOUT dep increase and WITHOUT FTP server updates
   1.676 -20021230 provide brand-new extensions: %option and %options macros
   1.677 -20021220 consistently use 'Options: none' to indicate no options to 'openpkg build'
   1.678 -20021218 finally fix the mkdir issues
   1.679 -20021217 make sure RPM does not hard-code an absolute path to 'mkdir'
   1.680 -20021204 add l_cxxflags for consistency; support gcc 3.2.x
   1.681 -20021127 and also the bigger hammer for bash included in the bootstrap package
   1.682 -20021122 provide a more convenient definition for cppflags and ldflags
   1.683 -20021120 make all %config sections visible for any package
   1.684 -20021119 upgrade to cURL 7.10.2 (required zlib)
   1.685 -20021118 add 'rpm --makeproxy --prefix=<master>' feature
   1.686 -20021030 get rid of unneccessary semicolon
   1.687 -20021028 fix building under NetBSD
   1.688 -20021023 try to fix cURL building
   1.689 -20021011 upgrade to cURL 7.10.1
   1.690 -20021009 fix unpacking
   1.691 -20021005 upgrading package: openpkg 20021004 -> 20021005
   1.692 -20021004 upgrading package: openpkg 20021002 -> 20021004
   1.693 -20021002 Added support for IRIX.
   1.694 -20021001 upgrade to cURL 7.10
   1.695 -20021001 upgrading package: openpkg 20020926 -> 20021001
   1.696 -20020926 upgrade to gzip 1.3.4
   1.697 -20020909 Fixed a subtle login name bug by rearranging user name assignment in rc.
   1.698 -20020904 Add unofficial support for Darwin OS.
   1.699 -20020829 fix for more modern SuSE
   1.700 -20020826 also add sbin directory to $PATH
   1.701 -
   1.702 -20020826 **** RELEASE AS PART OF OPENPKG 1.1.0 ****
   1.703 -...
   1.704 -
     2.1 --- a/openpkg/aux.prereq.sh	Tue Jul 31 12:27:54 2012 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,87 +0,0 @@
     2.4 -#!/bin/sh
     2.5 -##
     2.6 -##  aux.prereq.sh -- Platform Pre-Requisite Checks
     2.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     2.9 -##
    2.10 -##  Permission to use, copy, modify, and distribute this software for
    2.11 -##  any purpose with or without fee is hereby granted, provided that
    2.12 -##  the above copyright notice and this permission notice appear in all
    2.13 -##  copies.
    2.14 -##
    2.15 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.16 -##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.17 -##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.18 -##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.19 -##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.20 -##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.21 -##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.22 -##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.23 -##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.24 -##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.25 -##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.26 -##  SUCH DAMAGE.
    2.27 -##
    2.28 -##  Usage: aux.prereq.sh source|binary
    2.29 -##
    2.30 -
    2.31 -mode="$1"
    2.32 -
    2.33 -#   CHECK: determine platform ids
    2.34 -platform_prod=`sh ./shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"`
    2.35 -platform_tech=`sh ./shtool platform -n -L -S "" -C "+" -F "%<at>-%<st>"`
    2.36 -echo "++ platform product:    $platform_prod"
    2.37 -echo "++ platform technology: $platform_tech"
    2.38 -
    2.39 -#
    2.40 -#   CHECK: diskspace requirement
    2.41 -#
    2.42 -if [ ".$mode" = .source ]; then
    2.43 -    fs_path="${TMPDIR-/tmp}"
    2.44 -    fs_need=150000
    2.45 -else
    2.46 -    fs_path="" # FIXME
    2.47 -    fs_need=0  # FIXME
    2.48 -fi
    2.49 -fs_free=""
    2.50 -case "$platform_tech" in
    2.51 -    *-freebsd* | *-linux* | *-sunos* )
    2.52 -       fs_free=`cd $fs_path && /bin/df -k . | sed -n -e '$p' | sed -e 's;^[^ ]*;;' -e 's; *;;' | awk '{ print $3; }'`
    2.53 -       ;;
    2.54 -esac
    2.55 -if [ ".$fs_free" != . ]; then
    2.56 -    if [ $fs_free -lt $fs_need ]; then
    2.57 -        if [ ".$mode" = .source ]; then
    2.58 -            echo "ERROR: temporary directory \"$fs_path\" has to reside on a partition" 1>&2
    2.59 -            echo "       with at least $fs_need KB of free disk space. Set \$TMPDIR to" 1>&2
    2.60 -            echo "       a directory on a partition with enough free disk space, please." 1>&2
    2.61 -        else
    2.62 -            echo "ERROR: installation directory \"$fs_path\" has to reside on a partition" 1>&2
    2.63 -            echo "       with at least $fs_need KB of free disk space. Make \"$fs_path\" a" 1>&2
    2.64 -            echo "       symbolic link to a directory on a partition with enough free" 1>&2
    2.65 -            echo "       disk space, please." 1>&2
    2.66 -        fi
    2.67 -        exit 1
    2.68 -    fi
    2.69 -fi
    2.70 -
    2.71 -#
    2.72 -#   CHECK: available vendor packages
    2.73 -#
    2.74 -#   ...FIXME...
    2.75 -
    2.76 -#
    2.77 -#   CHECK: available tools in $PATH
    2.78 -#
    2.79 -#   ...FIXME...
    2.80 -
    2.81 -#
    2.82 -#   CHECK: available devices /dev/random, etc.
    2.83 -#
    2.84 -#   ...FIXME...
    2.85 -
    2.86 -#
    2.87 -#   CHECK: consistency check for /prefix (symlink!)
    2.88 -#
    2.89 -#   ...FIXME...
    2.90 -
     3.1 --- a/openpkg/aux.usrgrp.sh	Tue Jul 31 12:27:54 2012 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,222 +0,0 @@
     3.4 -#!/bin/sh
     3.5 -##
     3.6 -##  usrgrp.sh -- user/group name/id determination
     3.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     3.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     3.9 -##
    3.10 -##  Permission to use, copy, modify, and distribute this software for
    3.11 -##  any purpose with or without fee is hereby granted, provided that
    3.12 -##  the above copyright notice and this permission notice appear in all
    3.13 -##  copies.
    3.14 -##
    3.15 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    3.16 -##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    3.17 -##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    3.18 -##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    3.19 -##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    3.20 -##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    3.21 -##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    3.22 -##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    3.23 -##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    3.24 -##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    3.25 -##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    3.26 -##  SUCH DAMAGE.
    3.27 -##
    3.28 -
    3.29 -#   command line parameters (defaults)
    3.30 -help=0
    3.31 -usr='';  grp=''
    3.32 -susr=''; sgrp=''
    3.33 -musr=''; mgrp=''
    3.34 -rusr=''; rgrp=''
    3.35 -nusr=''; ngrp=''
    3.36 -suid=''; sgid=''
    3.37 -muid=''; mgid=''
    3.38 -ruid=''; rgid=''
    3.39 -nuid=''; ngid=''
    3.40 -
    3.41 -#   parse command line options
    3.42 -for opt
    3.43 -do
    3.44 -    case $opt in
    3.45 -        -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;;
    3.46 -           *) arg='' ;;
    3.47 -    esac
    3.48 -    case $opt in
    3.49 -        -h | --help          ) help=1      ;;
    3.50 -        --usr=* | --user=*   ) usr=$arg    ;;
    3.51 -        --grp=* | --group=*  ) grp=$arg    ;;
    3.52 -        --susr=*             ) susr=$arg   ;;
    3.53 -        --sgrp=*             ) sgrp=$arg   ;;
    3.54 -        --musr=*             ) musr=$arg   ;;
    3.55 -        --mgrp=*             ) mgrp=$arg   ;;
    3.56 -        --rusr=*             ) rusr=$arg   ;;
    3.57 -        --rgrp=*             ) rgrp=$arg   ;;
    3.58 -        --nusr=*             ) nusr=$arg   ;;
    3.59 -        --ngrp=*             ) ngrp=$arg   ;;
    3.60 -        --suid=*             ) suid=$arg   ;;
    3.61 -        --sgid=*             ) sgid=$arg   ;;
    3.62 -        --muid=*             ) muid=$arg   ;;
    3.63 -        --mgid=*             ) mgid=$arg   ;;
    3.64 -        --ruid=*             ) ruid=$arg   ;;
    3.65 -        --rgid=*             ) rgid=$arg   ;;
    3.66 -        --nuid=*             ) nuid=$arg   ;;
    3.67 -        --ngid=*             ) ngid=$arg   ;;
    3.68 -        *                    ) help=1      ;;
    3.69 -    esac
    3.70 -done
    3.71 -if [ ".$help" = .1 ]; then
    3.72 -    echo "Usage: sh $0 [-h|--help]" 2>&1
    3.73 -    echo "             [--[smrn]?usr=<usr>] [--[smrn]?grp=<usr>]" 2>&1
    3.74 -    echo "             [--[smrn]uid=<uid>] [--[smrn]gid=<gid>]" 2>&1
    3.75 -    exit 1
    3.76 -fi
    3.77 -
    3.78 -#   determine cusr/cgrp
    3.79 -cusr=`(id -un) 2>/dev/null ||\
    3.80 -      (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\
    3.81 -      (whoami) 2>/dev/null ||\
    3.82 -      (who am i | cut "-d " -f1) 2>/dev/null ||\
    3.83 -      echo $LOGNAME`
    3.84 -cgid=`(id -g $cusr) 2>/dev/null ||\
    3.85 -      ((getent passwd "${cusr}"; grep "^${cusr}:" /etc/passwd; ypmatch "${cusr}" passwd; nismatch "${cusr}" passwd; nidump passwd . | grep "^${cusr}:") 2>/dev/null |\
    3.86 -       sed -n -e '1p' | awk -F: '{ print $4; }')`
    3.87 -cgrp=`(id -gn $cusr) 2>/dev/null ||\
    3.88 -      ((getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null | grep "^[^:]*:[^:]*:${cgid}:" |\
    3.89 -       sed -n -e '1p' | awk -F: '{ print $1; }')`
    3.90 -[ ".$cgrp" = . ] && cgrp="$cusr"
    3.91 -
    3.92 -#   determine OpenPKG susr/sgrp
    3.93 -if [ ".$susr" = . ]; then
    3.94 -    if [ ".$usr" = . ]; then
    3.95 -        susr="$cusr"
    3.96 -    else
    3.97 -        susr="root"
    3.98 -    fi
    3.99 -fi
   3.100 -if [ ".$sgrp" = . ]; then
   3.101 -    sgrp=`(id -gn $susr) 2>/dev/null`
   3.102 -    if [ ".$sgrp" = . ]; then
   3.103 -        tgid=`(getent passwd "${susr}"; grep "^${susr}:" /etc/passwd; ypmatch "${susr}" passwd; nismatch "${susr}" passwd; nidump passwd . | grep "^${susr}:") 2>/dev/null |\
   3.104 -              sed -n -e '1p' | awk -F: '{ print $4; }'`
   3.105 -        if [ ".$tgid" != . ]; then
   3.106 -            sgid="${tgid}"
   3.107 -            sgrp=`(getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null |\
   3.108 -                  grep "^[^:]*:[^:]*:${sgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'`
   3.109 -        fi
   3.110 -        if [ ".$sgrp" = . ]; then
   3.111 -            sgrp="wheel"
   3.112 -        fi
   3.113 -    fi
   3.114 -fi
   3.115 -
   3.116 -#   determine OpenPKG musr/mgrp
   3.117 -if [ ".$musr" = . ]; then
   3.118 -    musr="$usr"
   3.119 -fi
   3.120 -if [ ".$musr" = . ]; then
   3.121 -    musr="$cusr"
   3.122 -fi
   3.123 -if [ ".$mgrp" = . ]; then
   3.124 -    mgrp=`(id -gn $musr) 2>/dev/null`
   3.125 -    if [ ".$mgrp" = . ]; then
   3.126 -        tgid=`(getent passwd "${musr}"; grep "^${musr}:" /etc/passwd; ypmatch "${musr}" passwd; nismatch "${musr}" passwd; nidump passwd . | grep "^${musr}:") 2>/dev/null |\
   3.127 -              sed -n -e '1p' | awk -F: '{ print $4; }'`
   3.128 -        if [ ".$tgid" != . ]; then
   3.129 -            mgid="${tgid}"
   3.130 -            mgrp=`(getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null |\
   3.131 -                  grep "^[^:]*:[^:]*:${mgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'`
   3.132 -        fi
   3.133 -        if [ ".$mgrp" = . ]; then
   3.134 -            mgrp="$grp"
   3.135 -        fi
   3.136 -        if [ ".$mgrp" = . ]; then
   3.137 -            mgrp="$cgrp"
   3.138 -        fi
   3.139 -    fi
   3.140 -fi
   3.141 -
   3.142 -#   determine OpenPKG rusr/rgrp
   3.143 -if [ ".$rusr" = . ]; then
   3.144 -    rusr="${usr}-r"
   3.145 -fi
   3.146 -if [ ".$rusr" = ".-r" ]; then
   3.147 -    rusr="$cusr"
   3.148 -fi
   3.149 -if [ ".$rgrp" = . ]; then
   3.150 -    rgrp=`(id -gn $rusr) 2>/dev/null`
   3.151 -    if [ ".$rgrp" = . ]; then
   3.152 -        tgid=`(getent passwd "${rusr}"; grep "^${rusr}:" /etc/passwd; ypmatch "${rusr}" passwd; nismatch "${rusr}" passwd; nidump passwd . | grep "^${rusr}:") 2>/dev/null |\
   3.153 -              sed -n -e '1p' | awk -F: '{ print $4; }'`
   3.154 -        if [ ".$tgid" != . ]; then
   3.155 -            rgid="${tgid}"
   3.156 -            rgrp=`(getent group; cat /etc/group; ypcat group; nismatch group; nidump group .) 2>/dev/null |\
   3.157 -                  grep "^[^:]*:[^:]*:${rgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'`
   3.158 -        fi
   3.159 -        if [ ".$rgrp" = . ]; then
   3.160 -            rgrp="${grp}-r"
   3.161 -        fi
   3.162 -        if [ ".$rgrp" = ".-r" ]; then
   3.163 -            rgrp="$cgrp"
   3.164 -        fi
   3.165 -    fi
   3.166 -fi
   3.167 -
   3.168 -#   determine OpenPKG nusr/ngrp
   3.169 -if [ ".$nusr" = . ]; then
   3.170 -    nusr="${usr}-n"
   3.171 -fi
   3.172 -if [ ".$nusr" = ".-n" ]; then
   3.173 -    nusr="$cusr"
   3.174 -fi
   3.175 -if [ ".$ngrp" = . ]; then
   3.176 -    ngrp=`(id -gn $nusr) 2>/dev/null`
   3.177 -    if [ ".$ngrp" = . ]; then
   3.178 -        tgid=`(getent passwd "${nusr}"; grep "^${nusr}:" /etc/passwd; ypmatch "${nusr}" passwd; nismatch "${nusr}" passwd; nidump passwd . | grep "^${nusr}:") 2>/dev/null |\
   3.179 -              sed -n -e '1p' | awk -F: '{ print $4; }'`
   3.180 -        if [ ".$tgid" != . ]; then
   3.181 -            ngid="${tgid}"
   3.182 -            ngrp=`(getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null |\
   3.183 -                  grep "^[^:]*:[^:]*:${ngid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'`
   3.184 -        fi
   3.185 -        if [ ".$ngrp" = . ]; then
   3.186 -            ngrp="${grp}-n"
   3.187 -        fi
   3.188 -        if [ ".$ngrp" = ".-n" ]; then
   3.189 -            ngrp="$cgrp"
   3.190 -        fi
   3.191 -    fi
   3.192 -fi
   3.193 -
   3.194 -#   determine OpenPKG suid/sgid
   3.195 -#   (currently not necessary)
   3.196 -
   3.197 -#   determine OpenPKG muid/mgid
   3.198 -#   (currently not necessary)
   3.199 -
   3.200 -#   determine OpenPKG ruid/rgid
   3.201 -#   (currently not necessary)
   3.202 -
   3.203 -#   determine OpenPKG nuid/ngid
   3.204 -#   (currently not necessary)
   3.205 -
   3.206 -#   print results
   3.207 -output=""
   3.208 -for var in \
   3.209 -    susr sgrp \
   3.210 -    musr mgrp \
   3.211 -    rusr rgrp \
   3.212 -    nusr ngrp \
   3.213 -    suid sgid \
   3.214 -    muid mgid \
   3.215 -    ruid rgid \
   3.216 -    nuid ngid; do
   3.217 -    eval "val=\"\$$var\""
   3.218 -    if [ ".$output" = . ]; then
   3.219 -        output="$var=\"$val\""
   3.220 -    else
   3.221 -        output="$output; $var=\"$val\""
   3.222 -    fi
   3.223 -done
   3.224 -echo $output
   3.225 -
     4.1 --- a/openpkg/aux.wrapbin.sh	Tue Jul 31 12:27:54 2012 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,252 +0,0 @@
     4.4 -#!/bin/sh
     4.5 -##
     4.6 -##  OpenPKG Binary Bootstrap Package (self-extracting shell script)
     4.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     4.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     4.9 -##
    4.10 -##  Permission to use, copy, modify, and distribute this software for
    4.11 -##  any purpose with or without fee is hereby granted, provided that
    4.12 -##  the above copyright notice and this permission notice appear in all
    4.13 -##  copies.
    4.14 -##
    4.15 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    4.16 -##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    4.17 -##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    4.18 -##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    4.19 -##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    4.20 -##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    4.21 -##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    4.22 -##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    4.23 -##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    4.24 -##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    4.25 -##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    4.26 -##  SUCH DAMAGE.
    4.27 -##
    4.28 -
    4.29 -#   configuration
    4.30 -l_me="$0"
    4.31 -o_help=no
    4.32 -o_version=no
    4.33 -o_tar=no
    4.34 -l_prefix='@l_prefix@'
    4.35 -l_musr='@MUSR@'
    4.36 -l_mgrp='@MGRP@'
    4.37 -l_platform="@l_platform@"
    4.38 -l_release="@l_release@"
    4.39 -l_version="@l_version@"
    4.40 -
    4.41 -#   establish standard environment
    4.42 -PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin"
    4.43 -LC_CTYPE=C
    4.44 -export LC_CTYPE
    4.45 -umask 022
    4.46 -
    4.47 -#   parse command line options
    4.48 -for opt
    4.49 -do
    4.50 -    case $opt in
    4.51 -        -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;;
    4.52 -           *) arg='' ;;
    4.53 -    esac
    4.54 -    case $opt in
    4.55 -        -h | --help    ) o_help=yes     ;;
    4.56 -        -v | --version ) o_version=yes  ;;
    4.57 -        -t | --tar     ) o_tar=yes      ;;
    4.58 -        --prefix=*     ) l_prefix=$arg  ;;
    4.59 -        *              ) o_help=yes     ;;
    4.60 -    esac
    4.61 -done
    4.62 -if [ ".$o_version" = .no -a ".$l_prefix" = . ]; then
    4.63 -    o_help=yes
    4.64 -fi
    4.65 -if [ ".$o_help" = .yes ]; then
    4.66 -    echo "Usage: sh $l_me" 2>&1
    4.67 -    echo "       [--prefix=<prefix>] [-t|--tar]" 2>&1
    4.68 -    echo "       [-h|--help] [-v|--version]" 2>&1
    4.69 -    exit 1
    4.70 -fi
    4.71 -
    4.72 -#   make sure all essential installation tools are available
    4.73 -for tool in sed mkdir dd tar chown chgrp; do
    4.74 -    found=no
    4.75 -    case $tool in
    4.76 -        /* )
    4.77 -            if [ -f $tool ]; then
    4.78 -                found=yes
    4.79 -            fi
    4.80 -            ;;
    4.81 -        * )
    4.82 -            for p in `IFS=:; echo $PATH`; do
    4.83 -                if [ -f "$p/$tool" ]; then
    4.84 -                    found=yes
    4.85 -                    break
    4.86 -                fi
    4.87 -            done
    4.88 -            ;;
    4.89 -    esac
    4.90 -    if [ ".$found" = .no ]; then
    4.91 -        echo "$l_me:ERROR: unable to find installation tool \"$tool\"" 1>&2
    4.92 -        exit 1
    4.93 -    fi
    4.94 -done
    4.95 -
    4.96 -#   optionally extract the embedded tarball only
    4.97 -if [ ".$o_tar" = .yes ]; then
    4.98 -    tmpdir="${TMPDIR-/tmp}/openpkg.$$"
    4.99 -    ( umask 077 && mkdir $tmpdir) || exit 1
   4.100 -    dd if=$l_me bs=8192 skip=8 2>/dev/null |\
   4.101 -    ( cd $tmpdir || exit 1
   4.102 -      tar xf - 2>/dev/null || exit 1
   4.103 -      ./openpkg.bzip2 -d -c openpkg.tar.bz2
   4.104 -    ) || exit 1
   4.105 -    rm -rf $tmpdir
   4.106 -    exit 0
   4.107 -fi
   4.108 -
   4.109 -#   display version and copyright header
   4.110 -echo "OpenPKG ${l_release} Binary Bootstrap Package, version ${l_version}"
   4.111 -echo "Built for prefix ${l_prefix} on target platform ${l_platform}"
   4.112 -if [ ".$o_version" = .yes ]; then
   4.113 -    exit 0
   4.114 -fi
   4.115 -
   4.116 -#   determine current username
   4.117 -cusr=`(id -un) 2>/dev/null ||\
   4.118 -      (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\
   4.119 -      (whoami) 2>/dev/null ||\
   4.120 -      (who am i | cut "-d " -f1) 2>/dev/null ||\
   4.121 -      echo ${LOGNAME-"NN"}`
   4.122 -
   4.123 -#   running the embedded %pre script for hooking into the system environment
   4.124 -echo "++ hooking OpenPKG instance into system environment"
   4.125 -prefix="$l_prefix"
   4.126 -susr='@SUSR@'; sgrp='@SGRP@'
   4.127 -musr='@MUSR@'; mgrp='@MGRP@'
   4.128 -rusr='@RUSR@'; rgrp='@RGRP@'
   4.129 -nusr='@NUSR@'; ngrp='@NGRP@'
   4.130 -suid='@SUID@'; sgid='@SGID@'
   4.131 -muid='@MUID@'; mgid='@MGID@'
   4.132 -ruid='@RUID@'; rgid='@RGID@'
   4.133 -nuid='@NUID@'; ngid='@NGID@'
   4.134 -set -- 1 # emulate RPM's $1 when executing scripts
   4.135 -#   ---- BEGIN EMBEDDED %pre SCRIPT ----
   4.136 -@PRE@
   4.137 -#   ---- END EMBEDDED %pre SCRIPT ----
   4.138 -
   4.139 -#   make sure prefix/root directory exists
   4.140 -#   and has correct permissions and owner/group
   4.141 -if [ ! -d $l_prefix ]; then
   4.142 -    #   create prefix/root directory from scratch
   4.143 -    echo "++ creating OpenPKG instance root directory \"$l_prefix\""
   4.144 -    d=''
   4.145 -    for c in `IFS=/; echo $l_prefix`; do
   4.146 -        d="$d/$c"
   4.147 -        if [ ! -d $d ]; then
   4.148 -            mkdir $d || exit 1
   4.149 -            chmod 755 $d || exit 1
   4.150 -            if [ ".$cusr" = .root ]; then
   4.151 -                chown $musr $d >/dev/null 2>&1 || true
   4.152 -                chgrp $mgrp $d >/dev/null 2>&1 || true
   4.153 -            fi
   4.154 -        fi
   4.155 -    done
   4.156 -else
   4.157 -    #   adjust already existing prefix/root directory
   4.158 -    echo "++ fixating OpenPKG instance root directory \"$l_prefix\""
   4.159 -    ( cd $l_prefix || exit 1
   4.160 -      chmod 755 . || exit 1
   4.161 -      if [ ".$cusr" = .root ]; then
   4.162 -          chown $musr . >/dev/null 2>&1 || true
   4.163 -          chgrp $mgrp . >/dev/null 2>&1 || true
   4.164 -      fi
   4.165 -    ) || exit 1
   4.166 -fi
   4.167 -
   4.168 -#   extract and install binary distribution files
   4.169 -echo "++ extracting OpenPKG binary distribution"
   4.170 -dd if=$l_me bs=8192 skip=8 2>/dev/null |\
   4.171 -    (cd $l_prefix; tar xf - 2>/dev/null)
   4.172 -echo "++ installing OpenPKG binary distribution"
   4.173 -( cd $l_prefix || exit 1
   4.174 -  ./openpkg.bzip2 -d -c openpkg.tar.bz2 | ./openpkg.tar xf - 2>/dev/null
   4.175 -  rm -f openpkg.tar openpkg.bzip2 openpkg.tar.bz2 >/dev/null 2>&1 || true
   4.176 -) || exit 1
   4.177 -
   4.178 -#   fixate installation files
   4.179 -#   (ATTENTION: order of chgrp/chown and chmod is important because of "set-UID" bits)
   4.180 -echo "++ fixating OpenPKG instance filesystem hierarchy"
   4.181 -( echo 'fixate () {'
   4.182 -  echo '    chgrp "$3" "$4"'
   4.183 -  echo '    chown "$2" "$4"'
   4.184 -  echo '    chmod "$1" "$4"'
   4.185 -  echo '}'
   4.186 -  $l_prefix/bin/openpkg --keep-privileges rpm -q openpkg \
   4.187 -      --qf '[fixate %7.7{FILEMODES:octal} %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} ::%{FILENAMES:shescape}\n]' |\
   4.188 -      grep -v '(none)' | sed 's/^fixate .../fixate /' | sed -e "s; ::\\(.\\)@l_prefix@; \\1$l_prefix;"
   4.189 -) | sh 2>/dev/null || true
   4.190 -
   4.191 -#   running the embedded %post script
   4.192 -echo "++ post-processing OpenPKG bootstrap installation"
   4.193 -prefix="$l_prefix"
   4.194 -susr='@SUSR@'; sgrp='@SGRP@'
   4.195 -musr='@MUSR@'; mgrp='@MGRP@'
   4.196 -rusr='@RUSR@'; rgrp='@RGRP@'
   4.197 -nusr='@NUSR@'; ngrp='@NGRP@'
   4.198 -suid='@SUID@'; sgid='@SGID@'
   4.199 -muid='@MUID@'; mgid='@MGID@'
   4.200 -ruid='@RUID@'; rgid='@RGID@'
   4.201 -nuid='@NUID@'; ngid='@NGID@'
   4.202 -set -- 1 # emulate RPM's $1 when executing scripts
   4.203 -#   ---- BEGIN EMBEDDED %post SCRIPT ----
   4.204 -@POST@
   4.205 -#   ---- END EMBEDDED %post SCRIPT ----
   4.206 -
   4.207 -#   display final information
   4.208 -( echo "Congratulations!"
   4.209 -  echo ""
   4.210 -  echo "You have successfully installed an OpenPKG ${l_release} instance"
   4.211 -  echo "under prefix ${l_prefix} on target platform ${l_platform}."
   4.212 -  echo ""
   4.213 -  echo "For details about this OpenPKG instance, run any of the"
   4.214 -  echo "following typical OpenPKG RPM query commands:"
   4.215 -  echo ""
   4.216 -  echo "    \$ ${l_prefix}/bin/openpkg rpm -qa"
   4.217 -  echo "    \$ ${l_prefix}/bin/openpkg rpm -qi  openpkg"
   4.218 -  echo "    \$ ${l_prefix}/bin/openpkg rpm -qlv openpkg"
   4.219 -  echo ""
   4.220 -  echo "To check the integrity of the entire OpenPKG instance,"
   4.221 -  echo "run the following OpenPKG RPM verify command:"
   4.222 -  echo ""
   4.223 -  echo "    \$ ${l_prefix}/bin/openpkg rpm -Va"
   4.224 -  echo ""
   4.225 -  echo "To install software packages into this OpenPKG instance, run"
   4.226 -  echo "the following two OpenPKG RPM build commands for each package:"
   4.227 -  echo ""
   4.228 -  echo "    \$ ${l_prefix}/bin/openpkg rpm --rebuild /path/to/foo-*.src.rpm"
   4.229 -  echo "    \$ ${l_prefix}/bin/openpkg rpm -Uvh ${l_prefix}/RPM/PKG/foo-*.rpm"
   4.230 -  echo ""
   4.231 -  echo "To remove a software package later, just run:"
   4.232 -  echo ""
   4.233 -  echo "    \$ ${l_prefix}/bin/openpkg rpm -e foo"
   4.234 -  echo ""
   4.235 -  echo "To remove the whole OpenPKG instance under prefix ${l_prefix},"
   4.236 -  echo "just remove every package as shown above. As you finally"
   4.237 -  echo "remove the package \"openpkg\", the OpenPKG instance itself"
   4.238 -  echo "will be unlinked from the system and removed as well."
   4.239 -  echo ""
   4.240 -  echo "Thank you for flying OpenPKG..."
   4.241 -  echo "                                        Ralf S. Engelschall"
   4.242 -  echo "                                        The OpenPKG Project"
   4.243 -  echo "                                        openpkg@openpkg.org"
   4.244 -) | $l_prefix/lib/openpkg/rpmtool msg -b -t info
   4.245 -
   4.246 -#   die explicitly just before the shell would discover
   4.247 -#   that we carry mega-bytes of data with us... ;-)
   4.248 -exit 0
   4.249 -
   4.250 -#   the distribution tarball is appended in raw format directly to the
   4.251 -#   end of this script, just leaded by padding whitespaces which make
   4.252 -#   sure that the tarball data starts at the pre-defined offset of 64KB.
   4.253 -#   This allows us to unpack the tarball by just skipping the leading
   4.254 -#   64KB (= 8192*8, see above).
   4.255 -
     5.1 --- a/openpkg/aux.wrapsrc.sh	Tue Jul 31 12:27:54 2012 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,156 +0,0 @@
     5.4 -#!/bin/sh
     5.5 -##
     5.6 -##  OpenPKG Source Bootstrap Package (self-extracting shell script)
     5.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     5.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     5.9 -##
    5.10 -##  Permission to use, copy, modify, and distribute this software for
    5.11 -##  any purpose with or without fee is hereby granted, provided that
    5.12 -##  the above copyright notice and this permission notice appear in all
    5.13 -##  copies.
    5.14 -##
    5.15 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    5.16 -##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    5.17 -##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    5.18 -##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    5.19 -##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    5.20 -##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    5.21 -##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    5.22 -##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    5.23 -##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    5.24 -##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    5.25 -##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    5.26 -##  SUCH DAMAGE.
    5.27 -##
    5.28 -
    5.29 -#   configuration
    5.30 -l_me="$0"
    5.31 -o_help=no
    5.32 -o_version=no
    5.33 -o_tar=no
    5.34 -l_prefix='/openpkg'
    5.35 -l_dir='@l_dir@'
    5.36 -l_release="@l_release@"
    5.37 -l_version="@l_version@"
    5.38 -
    5.39 -#   establish standard environment
    5.40 -PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin"
    5.41 -LC_CTYPE=C
    5.42 -export LC_CTYPE
    5.43 -umask 022
    5.44 -
    5.45 -#   pre-parse command line options
    5.46 -for opt
    5.47 -do
    5.48 -    case $opt in
    5.49 -        -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;;
    5.50 -           *) arg='' ;;
    5.51 -    esac
    5.52 -    case $opt in
    5.53 -        -h | --help     ) o_help=yes    ;;
    5.54 -        -v | --version  ) o_version=yes ;;
    5.55 -        -t | --tar      ) o_tar=yes     ;;
    5.56 -        --prefix=*      ) l_prefix=$arg ;;
    5.57 -    esac
    5.58 -done
    5.59 -if [ ".$o_help" = .yes ]; then
    5.60 -    echo "Usage: sh $l_me" 2>&1
    5.61 -    echo "       [--prefix=<prefix>] [--tag=<str>]" 2>&1
    5.62 -    echo "       [--user=<usr>] [--group=<grp>]" 2>&1
    5.63 -    echo "       [--{s,m,r,n}usr=<usr>] [--{s,m,r,n}grp=<grp>]" 2>&1
    5.64 -    echo "       [--{s,m,r,n}uid=<uid>] [--{s,m,r,n}gid=<gid>]" 2>&1
    5.65 -    echo "       [--use_tar=<tar>] [--use_make=<make>] [--use_cc=<cc>]" 2>&1
    5.66 -    echo "       [--use_ar=<ar>] [--use_ld=<ld>] [--use_as=<as>] [--use_strip=<strip>]" 2>&1
    5.67 -    echo "       [-t|--tar] [-h|--help] [-v|--version]" 2>&1
    5.68 -    exit 1
    5.69 -fi
    5.70 -
    5.71 -#   make sure all essential unpacking tools are available
    5.72 -#   (the build tools are checked later from within openpkg.spec)
    5.73 -for tool in /bin/sh mkdir cat tar rm chown chgrp sed dd; do
    5.74 -    found=no
    5.75 -    case $tool in
    5.76 -        /* )
    5.77 -            if [ -f $tool ]; then
    5.78 -                found=yes
    5.79 -            fi
    5.80 -            ;;
    5.81 -        * )
    5.82 -            for p in `IFS=:; echo $PATH`; do
    5.83 -                if [ -f "$p/$tool" ]; then
    5.84 -                    found=yes
    5.85 -                    break
    5.86 -                fi
    5.87 -            done
    5.88 -            ;;
    5.89 -    esac
    5.90 -    if [ ".$found" = .no ]; then
    5.91 -        echo "$l_me:ERROR: unable to find bootstrap tool \"$tool\"" 1>&2
    5.92 -        exit 1
    5.93 -    fi
    5.94 -done
    5.95 -
    5.96 -#   optionally extract the embedded tarball only
    5.97 -if [ ".$o_tar" = .yes ]; then
    5.98 -    dd if=$l_me bs=8192 skip=8 2>/dev/null
    5.99 -    exit 0
   5.100 -fi
   5.101 -
   5.102 -#   display version and copyright header
   5.103 -echo "OpenPKG ${l_release} Source Bootstrap Package, version ${l_version}"
   5.104 -if [ ".$o_version" = .yes ]; then
   5.105 -    exit 0
   5.106 -fi
   5.107 -echo "Building for prefix ${l_prefix} on current platform"
   5.108 -
   5.109 -#   determine current user/group
   5.110 -cusr=`(id -un) 2>/dev/null ||\
   5.111 -      (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\
   5.112 -      (whoami) 2>/dev/null ||\
   5.113 -      (who am i | cut "-d " -f1) 2>/dev/null ||\
   5.114 -      echo $LOGNAME`
   5.115 -cgid=`(id -g $cusr) 2>/dev/null ||\
   5.116 -      ((getent passwd "${cusr}"; grep "^${cusr}:" /etc/passwd; ypmatch "${cusr}" passwd; nismatch "${cusr}" passwd; nidump passwd . | grep "^${cusr}:") 2>/dev/null |\
   5.117 -      sed -e 'q' | awk -F: '{ print $4; }')`
   5.118 -cgrp=`(id -gn $cusr) 2>/dev/null ||\
   5.119 -      ((getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null | grep "^[^:]*:[^:]*:${cgid}:" |\
   5.120 -      sed -e 'q' | awk -F: '{ print $1; }')`
   5.121 -if [ ".$cgrp" = . ]; then
   5.122 -    cgrp="$cusr"
   5.123 -fi
   5.124 -
   5.125 -#   extract the source distribution files
   5.126 -echo "++ extracting OpenPKG source distribution"
   5.127 -rm -rf $l_dir >/dev/null 2>&1
   5.128 -mkdir $l_dir || exit 1
   5.129 -dd if=$l_me bs=8192 skip=8 2>/dev/null | (cd $l_dir; tar xf - 2>/dev/null)
   5.130 -if [ ".$cusr" = .root ]; then
   5.131 -    ( cd $l_dir || exit 1
   5.132 -      chown -R -h $cusr . >/dev/null 2>&1 || true
   5.133 -      chgrp -R -h $cgrp . >/dev/null 2>&1 || true
   5.134 -    ) || exit 1
   5.135 -fi
   5.136 -if [ ! -f $l_dir/openpkg.boot ]; then
   5.137 -    echo "$l_me:ERROR: failed to unpack into directory \"$l_dir\"" 1>&2
   5.138 -    exit 1
   5.139 -fi
   5.140 -
   5.141 -#   perform bootstrap procedure
   5.142 -echo "++ building OpenPKG binary distribution"
   5.143 -( cd $l_dir || exit 1
   5.144 -  ./openpkg.boot ${1+"$@"} || exit 1
   5.145 -) || exit 1
   5.146 -
   5.147 -#   cleanup
   5.148 -rm -rf $l_dir >/dev/null 2>&1
   5.149 -
   5.150 -#   die explicitly just before the shell would discover
   5.151 -#   that we carry mega-bytes of data with us...
   5.152 -exit 0
   5.153 -
   5.154 -#   the distribution tarball is appended in raw format directly to the
   5.155 -#   end of this script, just leaded by padding whitespaces which make
   5.156 -#   sure that the tarball data starts at the pre-defined offset of 64KB.
   5.157 -#   This allows us to unpack the tarball by just skipping the leading
   5.158 -#   64KB (= 8192*8, see above).
   5.159 -
     6.1 --- a/openpkg/install.sh	Tue Jul 31 12:27:54 2012 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,45 +0,0 @@
     6.4 -#!@l_prefix@/lib/openpkg/bash
     6.5 -##
     6.6 -##  install -- OpenPKG Tool Chain "install" command (BOOSTRAP VERSION ONLY)
     6.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     6.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     6.9 -##
    6.10 -##  Permission to use, copy, modify, and distribute this software for
    6.11 -##  any purpose with or without fee is hereby granted, provided that
    6.12 -##  the above copyright notice and this permission notice appear in all
    6.13 -##  copies.
    6.14 -##
    6.15 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    6.16 -##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    6.17 -##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    6.18 -##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    6.19 -##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    6.20 -##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    6.21 -##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    6.22 -##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    6.23 -##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    6.24 -##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    6.25 -##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    6.26 -##  SUCH DAMAGE.
    6.27 -##
    6.28 -
    6.29 -##
    6.30 -##  This command emulates the "openpkg install openpkg-tools" command
    6.31 -##  in order to bootstrap the installation of the OpenPKG Tool Chain.
    6.32 -##
    6.33 -
    6.34 -#   sanity check usage
    6.35 -if [ $# -eq 1 -a ".$1" = ".openpkg-tools" ]; then
    6.36 -    :
    6.37 -else
    6.38 -    echo "openpkg:ERROR: still not available functionality \"install $*\""                        1>&2
    6.39 -    echo "openpkg:INFO: This functionality is provided by the \"openpkg-tools\" package only!"    1>&2
    6.40 -    echo "openpkg:INFO: Run the command \"$OPENPKG_PREFIX/bin/openpkg install openpkg-tools\" to" 1>&2
    6.41 -    echo "openpkg:INFO: bootstrap the \"openpkg-tools\" package for additional functionality."    1>&2
    6.42 -    echo "openpkg:INFO: This bootstrap version only supports this particular install command."    1>&2
    6.43 -    exit 1
    6.44 -fi
    6.45 -
    6.46 -#   pass-through operation to "openpkg build" tool
    6.47 -$OPENPKG_PREFIX/bin/openpkg build openpkg-tools | sh
    6.48 -
     7.1 --- a/openpkg/pod2man.sh	Tue Jul 31 12:27:54 2012 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,8 +0,0 @@
     7.4 -#!/bin/sh
     7.5 -pod2man --section=1 --center="OpenPKG" --release="OPENPKG(8)"    --date="OpenPKG" --quotes=none openpkg.pod    >openpkg.1
     7.6 -pod2man --section=8 --center="OpenPKG" --release="RC(8)"         --date="OpenPKG" --quotes=none rc.pod         >rc.8
     7.7 -pod2man --section=8 --center="OpenPKG" --release="RPMTOOL(8)"    --date="OpenPKG" --quotes=none rpmtool.pod    >rpmtool.8
     7.8 -pod2man --section=8 --center="OpenPKG" --release="LSYNC(8)"      --date="OpenPKG" --quotes=none lsync.pod      >lsync.8
     7.9 -pod2man --section=8 --center="OpenPKG" --release="RPM-CONFIG(8)" --date="OpenPKG" --quotes=none rpm-config.pod >rpm-config.8
    7.10 -pod2man --section=8 --center="OpenPKG" --release="UUID(8)"       --date="OpenPKG" --quotes=none uuid.pod       >uuid.8
    7.11 -pod2man --section=8 --center="OpenPKG" --release="RELEASE(8)"    --date="OpenPKG" --quotes=none release.pod    >release.8
     8.1 --- a/openpkg/rplstrnlen.c	Tue Jul 31 12:27:54 2012 +0200
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,39 +0,0 @@
     8.4 -//
     8.5 -//  Stubfunc - Stubs to replace missing functions in third party projects
     8.6 -//  Copyright © 2012 Michael Schloh von Bennewitz <michael@schloh.com>
     8.7 -//
     8.8 -//  Stubfunc is free software: you can redistribute it and/or modify
     8.9 -//  it under the terms of the GNU General Public License as published
    8.10 -//  by the Free Software Foundation, either version 3 of the License,
    8.11 -//  or (at your option) any later version.
    8.12 -//
    8.13 -//  Stubfunc is distributed in the hope that it will be useful,
    8.14 -//  but WITHOUT ANY WARRANTY; without even the implied warranty
    8.15 -//  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
    8.16 -//  the GNU General Public License for more details.
    8.17 -//
    8.18 -//  You should have received a copy of the GNU General Public License
    8.19 -//  along with Stubfunc. If not, see <http://www.gnu.org/licenses/>.
    8.20 -//
    8.21 -//  This file implements a stub function and is part of a larger project,
    8.22 -//  explanations of which can be found at http://dev.europalab.com/.
    8.23 -//
    8.24 -//  rplstrnlen.c: ISO C99 implementation
    8.25 -//
    8.26 -
    8.27 -#include <stdio.h>
    8.28 -
    8.29 -
    8.30 -///* replacement for strnlen(3), missing in some POSIX distributions */
    8.31 -//status size_t strnlen(const char *pckInstring, size_t Maxsize) {
    8.32 -//    register const char *prckIdx;
    8.33 -//    for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx);
    8.34 -//    return(prckIdx - pckInstring);
    8.35 -//}
    8.36 -
    8.37 -/* replacement for strnlen(3), missing in some POSIX distributions */
    8.38 -extern size_t rpl_strnlen(const char *pckInstring, size_t Maxsize) {
    8.39 -    register const char *prckIdx;
    8.40 -    for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx);
    8.41 -    return(prckIdx - pckInstring);
    8.42 -}
     9.1 --- a/openpkg/rpm.patch.bugfix	Tue Jul 31 12:27:54 2012 +0200
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,369 +0,0 @@
     9.4 -##
     9.5 -##  rpm.patch.bugfix -- Annotated OpenPKG RPM Patch file
     9.6 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     9.7 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     9.8 -##
     9.9 -##  This file assembles changes to existing RPM source files between
    9.10 -##  the original RedHat RPM and the OpenPKG RPM variant. It can be
    9.11 -##  automatically applied to a vanilla RedHat RPM source tree with the
    9.12 -##  'patch' tool to upgrade those files. Each patch snippet is annotated
    9.13 -##  with a short description.
    9.14 -##
    9.15 -##  Created on: 13-Sep-2006
    9.16 -##
    9.17 -##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
    9.18 -##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
    9.19 -##
    9.20 -
    9.21 -+---------------------------------------------------------------------------
    9.22 -| %setup and %patch macros are treated very special internally, but
    9.23 -| make sure they at least optically can be used like any other macro
    9.24 -| and especially can have leading whitespaces.
    9.25 -+---------------------------------------------------------------------------
    9.26 -Index: build/parsePrep.c
    9.27 ---- build/parsePrep.c	7 Aug 2002 14:20:45 -0000	1.1.1.10
    9.28 -+++ build/parsePrep.c	6 Jun 2005 15:53:04 -0000	1.4
    9.29 -@@ -584,12 +584,15 @@
    9.30 -     saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n');
    9.31 -     /*@-usereleased@*/
    9.32 -     for (lines = saveLines; *lines; lines++) {
    9.33 -+        char *cp;
    9.34 -+        for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++)
    9.35 -+            ;
    9.36 - 	res = 0;
    9.37 - /*@-boundsread@*/
    9.38 --	if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) {
    9.39 --	    res = doSetupMacro(spec, *lines);
    9.40 --	} else if (! strncmp(*lines, "%patch", sizeof("%patch")-1)) {
    9.41 --	    res = doPatchMacro(spec, *lines);
    9.42 -+	if (! strncmp(cp, "%setup", sizeof("%setup")-1)) {
    9.43 -+	    res = doSetupMacro(spec, cp);
    9.44 -+	} else if (! strncmp(cp, "%patch", sizeof("%patch")-1)) {
    9.45 -+	    res = doPatchMacro(spec, cp);
    9.46 - 	} else {
    9.47 - 	    appendLineStringBuf(spec->prep, *lines);
    9.48 - 	}
    9.49 -
    9.50 -+---------------------------------------------------------------------------
    9.51 -| Do not pick of the vendor BeeCrypt package on RedHat Linux.
    9.52 -+---------------------------------------------------------------------------
    9.53 -Index: configure.ac
    9.54 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
    9.55 -+++ configure.ac	13 Sep 2006 13:38:23 -0000
    9.56 -@@ -416,7 +416,7 @@
    9.57 - AC_CHECK_HEADER([beecrypt/beecrypt.h], [
    9.58 - 	AC_CHECK_LIB(beecrypt, mpfprintln, [
    9.59 - 	    AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
    9.60 --	    WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt"
    9.61 -+	    WITH_BEECRYPT_INCLUDE=""
    9.62 - 	    WITH_BEECRYPT_LIB="-lbeecrypt"
    9.63 - 	])
    9.64 -     ], [
    9.65 -
    9.66 -+---------------------------------------------------------------------------
    9.67 -| Remove access to not-existing beecrypt/ subdirectory
    9.68 -| to avoid the configure script to break building.
    9.69 -+---------------------------------------------------------------------------
    9.70 -Index: configure.ac
    9.71 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
    9.72 -+++ configure.ac	13 Sep 2006 13:38:26 -0000
    9.73 -@@ -1274,7 +1274,6 @@
    9.74 - 	python/rpmdb/Makefile
    9.75 - 	python/test/Makefile
    9.76 -   ], [	echo timestamp > popt/stamp-h.in
    9.77 --	echo timestamp > beecrypt/stamp-h.in
    9.78 - 	echo timestamp > stamp-h.in
    9.79 -   ]
    9.80 - )
    9.81 -
    9.82 -+---------------------------------------------------------------------------
    9.83 -| Fix filedescriptor leakage.
    9.84 -+---------------------------------------------------------------------------
    9.85 -Index: lib/psm.c
    9.86 ---- lib/psm.c	5 Jun 2003 12:43:18 -0000	1.1.1.6
    9.87 -+++ lib/psm.c	13 Sep 2006 13:38:27 -0000
    9.88 -@@ -940,6 +940,8 @@
    9.89 - 	    if (sfdno > STDERR_FILENO) {
    9.90 - 		xx = Fclose (scriptFd);
    9.91 - 	    }
    9.92 -+	} else {
    9.93 -+	    xx = Fclose(out);
    9.94 - 	}
    9.95 - 
    9.96 - 	{   const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
    9.97 -
    9.98 -+---------------------------------------------------------------------------
    9.99 -| Fix trigger argument passing. For more details see RPM BugDB under:
   9.100 -| http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100509
   9.101 -+---------------------------------------------------------------------------
   9.102 -Index: lib/psm.c
   9.103 ---- lib/psm.c	5 Jun 2003 12:43:18 -0000	1.1.1.6
   9.104 -+++ lib/psm.c	13 Sep 2006 13:38:29 -0000
   9.105 -@@ -1108,11 +1108,13 @@
   9.106 -     const char ** triggerProgs;
   9.107 -     int_32 * triggerIndices;
   9.108 -     const char * sourceName;
   9.109 -+    const char * triggerName;
   9.110 -     rpmRC rc = RPMRC_OK;
   9.111 -     int xx;
   9.112 -     int i;
   9.113 - 
   9.114 -     xx = headerNVR(sourceH, &sourceName, NULL, NULL);
   9.115 -+    xx = headerNVR(triggeredH, &triggerName, NULL, NULL);
   9.116 - 
   9.117 -     trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem));
   9.118 -     if (trigger == NULL)
   9.119 -@@ -1151,7 +1153,7 @@
   9.120 - 	{   int arg1;
   9.121 - 	    int index;
   9.122 - 
   9.123 --	    arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), Name);
   9.124 -+	    arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), triggerName);
   9.125 - 	    if (arg1 < 0) {
   9.126 - 		/* XXX W2DO? fails as "execution of script failed" */
   9.127 - 		rc = RPMRC_FAIL;
   9.128 -
   9.129 -+---------------------------------------------------------------------------
   9.130 -| Make sure RPM does not try to set file owner/group on files during
   9.131 -| installation of _source_ RPMs. Instead, let it use the current
   9.132 -| run-time owner/group, because most of the time the owner/group in
   9.133 -| the source RPM (which is the owner/group of the files as staying on
   9.134 -| the package author system) is not existing on the target system, of
   9.135 -| course.
   9.136 -+---------------------------------------------------------------------------
   9.137 -Index: lib/psm.c
   9.138 ---- lib/psm.c	5 Jun 2003 12:43:18 -0000	1.1.1.6
   9.139 -+++ lib/psm.c	13 Sep 2006 13:38:32 -0000
   9.140 -@@ -1714,6 +1714,7 @@
   9.141 - 
   9.142 - 		uid = fi->uid;
   9.143 - 		gid = fi->gid;
   9.144 -+		if (!headerIsEntry(fi->h, RPMTAG_SOURCEPACKAGE)) {
   9.145 - 		if (fi->fuser && unameToUid(fi->fuser[i], &uid)) {
   9.146 - 		    rpmMessage(RPMMESS_WARNING,
   9.147 - 			_("user %s does not exist - using root\n"),
   9.148 -@@ -1731,6 +1732,7 @@
   9.149 - 		    /* XXX this diddles header memory. */
   9.150 - 		    fi->fmodes[i] &= ~S_ISGID;	/* turn off the sgid bit */
   9.151 - 		}
   9.152 -+		}
   9.153 - 		if (fi->fuids) fi->fuids[i] = uid;
   9.154 - 		if (fi->fgids) fi->fgids[i] = gid;
   9.155 - 	    }
   9.156 -
   9.157 -+---------------------------------------------------------------------------
   9.158 -| Fix --justdb operation by consistently use the same rootDir checks
   9.159 -| RPM uses everywhere else, too.
   9.160 -+---------------------------------------------------------------------------
   9.161 -Index: lib/psm.c
   9.162 ---- lib/psm.c	5 Jun 2003 12:43:18 -0000	1.1.1.6
   9.163 -+++ lib/psm.c	13 Sep 2006 13:38:33 -0000
   9.164 -@@ -2033,7 +2033,8 @@
   9.165 -     case PSM_CHROOT_IN:
   9.166 -     {	const char * rootDir = rpmtsRootDir(ts);
   9.167 - 	/* Change root directory if requested and not already done. */
   9.168 --	if (rootDir != NULL && !rpmtsChrootDone(ts) && !psm->chrootDone) {
   9.169 -+	if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0')
   9.170 -+        && !rpmtsChrootDone(ts) && !psm->chrootDone) {
   9.171 - 	    static int _loaded = 0;
   9.172 - 
   9.173 - 	    /*
   9.174 -
   9.175 -+---------------------------------------------------------------------------
   9.176 -| First, remove incorrectly introduced buffer assignment. Second, fix
   9.177 -| second and subsequent "%{foo -x}" constructs for non-Linux systems
   9.178 -| (without resetting the option index only the first construct would
   9.179 -| work). Third, bugfix the handling of macros inside macro arguments
   9.180 -| as in "%{foo bar%{quux}baz}": RPM correctly determined the pointer
   9.181 -| to the terminating second closing brace, but instead of passing
   9.182 -| this pointer to the subroutine which handles the macro argument
   9.183 -| construction, it passed the underlying character. This in turn
   9.184 -| obviously leaded to an incorrect determination of the argument end
   9.185 -| (it then though the first closing brace is the end). We fix this by
   9.186 -| passing the pointer and not the underlying character.
   9.187 -+---------------------------------------------------------------------------
   9.188 -Index: rpmio/macro.c
   9.189 ---- rpmio/macro.c	15 May 2003 13:42:01 -0000	1.1.1.7
   9.190 -+++ rpmio/macro.c	22 Jan 2004 21:42:32 -0000	1.2
   9.191 -@@ -879,7 +879,7 @@
   9.192 -  */
   9.193 - /*@-bounds@*/
   9.194 - /*@dependent@*/ static const char *
   9.195 --grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char lastc)
   9.196 -+grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char *lastc)
   9.197 - 	/*@globals rpmGlobalMacroContext @*/
   9.198 - 	/*@modifies mb, rpmGlobalMacroContext @*/
   9.199 - {
   9.200 -@@ -900,7 +900,7 @@
   9.201 - 
   9.202 -     /* Copy args into buf until lastc */
   9.203 -     *be++ = ' ';
   9.204 --    while ((c = *se++) != '\0' && c != lastc) {
   9.205 -+    while ((c = *se++) != '\0' && (se-1) != lastc) {
   9.206 - /*@-globs@*/
   9.207 - 	if (!isblank(c)) {
   9.208 - 	    *be++ = c;
   9.209 -@@ -968,6 +968,8 @@
   9.210 -     /*@-mods@*/
   9.211 -     optind = 0;		/* XXX but posix != glibc */
   9.212 -     /*@=mods@*/
   9.213 -+#else
   9.214 -+    optind = 1;
   9.215 - #endif
   9.216 - 
   9.217 -     opts = me->opts;
   9.218 -@@ -1168,7 +1170,7 @@
   9.219 -     int c;
   9.220 -     int rc = 0;
   9.221 -     int negate;
   9.222 --    char grab;
   9.223 -+    char *grab;
   9.224 -     int chkexist;
   9.225 - 
   9.226 -     if (++mb->depth > max_macro_depth) {
   9.227 -@@ -1202,7 +1204,7 @@
   9.228 - 	if (mb->depth > 1)	/* XXX full expansion for outermost level */
   9.229 - 		t = mb->t;	/* save expansion pointer for printExpand */
   9.230 - 	negate = 0;
   9.231 --	grab = '\0';
   9.232 -+	grab = NULL;
   9.233 - 	chkexist = 0;
   9.234 - 	switch ((c = *s)) {
   9.235 - 	default:		/* %name substitution */
   9.236 -@@ -1237,7 +1239,8 @@
   9.237 - 		/* For "%name " macros ... */
   9.238 - /*@-globs@*/
   9.239 - 		if ((c = *fe) && isblank(c))
   9.240 --			grab = '\n';
   9.241 -+			if ((grab = strchr(fe,'\n')) == NULL)
   9.242 -+                grab = strchr(fe, '\0');
   9.243 - /*@=globs@*/
   9.244 - 		/*@switchbreak@*/ break;
   9.245 - 	case '(':		/* %(...) shell escape */
   9.246 -@@ -1284,7 +1287,7 @@
   9.247 - 			ge = se - 1;
   9.248 - 			/*@innerbreak@*/ break;
   9.249 - 		case ' ':
   9.250 --			grab = se[-1];
   9.251 -+			grab = se-1;
   9.252 - 			/*@innerbreak@*/ break;
   9.253 - 		default:
   9.254 - 			/*@innerbreak@*/ break;
   9.255 -@@ -1438,7 +1441,7 @@
   9.256 - 
   9.257 - 	/* Setup args for "%name " macros with opts */
   9.258 - 	if (me && me->opts != NULL) {
   9.259 --		if (grab != '\0') {
   9.260 -+		if (grab != NULL) {
   9.261 - 			se = grabArgs(mb, me, fe, grab);
   9.262 - 		} else {
   9.263 - 			addMacro(mb->mc, "**", NULL, "", mb->depth);
   9.264 -
   9.265 -+---------------------------------------------------------------------------
   9.266 -| Backported RPM vendor patch:
   9.267 -| "fix: packages w/o file colors segfault"
   9.268 -| (cvs diff -r2.41.2.6 -r2.41.2.7 lib/rpmfi.c)
   9.269 -+---------------------------------------------------------------------------
   9.270 -Index: lib/rpmfi.c
   9.271 ---- lib/rpmfi.c	17 Jul 2003 22:44:28 -0000	1.1.1.3
   9.272 -+++ lib/rpmfi.c	22 Jan 2004 21:42:24 -0000	1.2
   9.273 -@@ -866,6 +866,7 @@
   9.274 - 	*fn = '\0';
   9.275 - 	fnlen = stpcpy( stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn;
   9.276 - 
   9.277 -+if (fColors != NULL)
   9.278 - dColors[dirIndexes[i]] |= fColors[i];
   9.279 - 	/*
   9.280 - 	 * See if this file path needs relocating.
   9.281 -
   9.282 -+---------------------------------------------------------------------------
   9.283 -| The "%_excludedocs" macro is intended to set the _default_ if
   9.284 -| both --excludedocs and --includedocs are not specified and it is
   9.285 -| evaluated already before. So, do not override it here again, because
   9.286 -| it would not allow us to make "%_excludedocs 1" the default.
   9.287 -+---------------------------------------------------------------------------
   9.288 -Index: lib/transaction.c
   9.289 ---- lib/transaction.c	15 Jul 2003 15:15:47 -0000	1.1.1.15
   9.290 -+++ lib/transaction.c	22 Jan 2004 21:42:26 -0000	1.2
   9.291 -@@ -702,8 +702,10 @@
   9.292 -     int dc;
   9.293 -     int i, j;
   9.294 - 
   9.295 -+#if 0
   9.296 -     if (!noDocs)
   9.297 - 	noDocs = rpmExpandNumeric("%{_excludedocs}");
   9.298 -+#endif
   9.299 - 
   9.300 -     {	const char *tmpPath = rpmExpand("%{_netsharedpath}", NULL);
   9.301 - 	/*@-branchstate@*/
   9.302 -
   9.303 -+---------------------------------------------------------------------------
   9.304 -| Bugfix: POSIX/SUSv3 clearly expresses that fcntl(2) returns "value
   9.305 -| other than -1" on success, so check for equality to -1 instead of
   9.306 -| non-equality to 0. In practice this does not harm on most platforms,
   9.307 -| because they fortunately (by conincidence and common practice)
   9.308 -| return 0.
   9.309 -| Additionally, at least Solaris may reject (see fcntl(2) manpage) the
   9.310 -| (partial) locking, because DB mmap(2)'ed the file (or vice versa).
   9.311 -| The workaround is to lock the entire(!) file.
   9.312 -+---------------------------------------------------------------------------
   9.313 -Index: db/mutex/mut_fcntl.c
   9.314 ---- db/mutex/mut_fcntl.c	18 Jan 2003 14:05:03 -0000	1.1.1.5
   9.315 -+++ db/mutex/mut_fcntl.c	22 Jan 2004 21:42:18 -0000	1.2
   9.316 -@@ -84,8 +84,13 @@
   9.317 - 
   9.318 - 	/* Initialize the lock. */
   9.319 - 	k_lock.l_whence = SEEK_SET;
   9.320 -+#if 0
   9.321 - 	k_lock.l_start = mutexp->off;
   9.322 - 	k_lock.l_len = 1;
   9.323 -+#else
   9.324 -+	k_lock.l_start = 0;
   9.325 -+	k_lock.l_len = 0;
   9.326 -+#endif
   9.327 - 
   9.328 - 	for (locked = waited = 0;;) {
   9.329 - 		/*
   9.330 -@@ -101,7 +106,7 @@
   9.331 - 
   9.332 - 		/* Acquire an exclusive kernel lock. */
   9.333 - 		k_lock.l_type = F_WRLCK;
   9.334 --		if (fcntl(dbenv->lockfhp->fd, F_SETLKW, &k_lock))
   9.335 -+		if (fcntl(dbenv->lockfhp->fd, F_SETLKW, &k_lock) == -1)
   9.336 - 			return (__os_get_errno());
   9.337 - 
   9.338 - 		/* If the resource is still available, it's ours. */
   9.339 -@@ -112,7 +117,7 @@
   9.340 - 
   9.341 - 		/* Release the kernel lock. */
   9.342 - 		k_lock.l_type = F_UNLCK;
   9.343 --		if (fcntl(dbenv->lockfhp->fd, F_SETLK, &k_lock))
   9.344 -+		if (fcntl(dbenv->lockfhp->fd, F_SETLK, &k_lock) == -1)
   9.345 - 			return (__os_get_errno());
   9.346 - 
   9.347 - 		/*
   9.348 -
   9.349 -+---------------------------------------------------------------------------
   9.350 -| The O_DIRECT feature is fully broken under at least Linux 2.2 and
   9.351 -| 2.4. It is sometimes accepted by open(2) without error and later
   9.352 -| causes a write(2) to fail with EINVAL -- all depending on the
   9.353 -| underlying filesystem (usually works on tmpfs and fails on ext3).
   9.354 -| Sometimes it also causes open(2) to fail with EINVAL. In general,
   9.355 -| it does especially no "graceful degradation" and so is useless for
   9.356 -| use mostly all platforms except for those where we know it works
   9.357 -| (currently FreeBSD only). Interestingly, RPM works on RedHat, just
   9.358 -| because RedHat's "kernel" package contains a patch which masks out
   9.359 -| O_DIRECT usage... ;-)
   9.360 -+---------------------------------------------------------------------------
   9.361 -Index: db/os/os_open.c
   9.362 ---- db/os/os_open.c	18 Jan 2003 14:05:03 -0000	1.1.1.5
   9.363 -+++ db/os/os_open.c	22 Jan 2004 21:42:19 -0000	1.2
   9.364 -@@ -93,7 +93,7 @@
   9.365 - 	if (LF_ISSET(DB_OSO_TRUNC))
   9.366 - 		oflags |= O_TRUNC;
   9.367 - 
   9.368 --#ifdef HAVE_O_DIRECT
   9.369 -+#if defined(HAVE_O_DIRECT) && defined(__FreeBSD__)
   9.370 - 	if (LF_ISSET(DB_OSO_DIRECT))
   9.371 - 		oflags |= O_DIRECT;
   9.372 - #endif
    10.1 --- a/openpkg/rpm.patch.feature	Tue Jul 31 12:27:54 2012 +0200
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,2227 +0,0 @@
    10.4 -##
    10.5 -##  rpm.patch.feature -- Annotated OpenPKG RPM Patch file
    10.6 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
    10.7 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
    10.8 -##
    10.9 -##  This file assembles changes to existing RPM source files between
   10.10 -##  the original RedHat RPM and the OpenPKG RPM variant. It can be
   10.11 -##  automatically applied to a vanilla RedHat RPM source tree with the
   10.12 -##  'patch' tool to upgrade those files. Each patch snippet is annotated
   10.13 -##  with a short description.
   10.14 -##
   10.15 -##  Created on: 13-Sep-2006
   10.16 -##
   10.17 -##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
   10.18 -##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
   10.19 -##
   10.20 -
   10.21 -+---------------------------------------------------------------------------
   10.22 -| Remove "tools" directory from sub-directory list because it contains
   10.23 -| things we are not interested in and which cause some build trouble
   10.24 -| anyway.
   10.25 -| Use a plain "rpmpopt" file without any trailing version.
   10.26 -| Adjust paths to conform to OpenPKG filesystem layout.
   10.27 -| Do not run the "installplatform" script, because not needed for OpenPKG.
   10.28 -+---------------------------------------------------------------------------
   10.29 -Index: Makefile.am
   10.30 ---- Makefile.am	29 May 2003 18:20:28 -0000	1.1.1.17
   10.31 -+++ Makefile.am	22 Jan 2004 21:42:02 -0000	1.2
   10.32 -@@ -12,9 +12,9 @@
   10.33 - 	xmlspec/examples/*.sh xmlspec/examples/*.lst \
   10.34 - 	xmlspec/examples/*.xmlspec \
   10.35 - 	po/*.in po/*.po po/rpm.pot \
   10.36 --	rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
   10.37 -+	rpm.magic rpmpopt rpmqv.c rpm.c
   10.38 - 
   10.39 --SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@ popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
   10.40 -+SUBDIRS = intl @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@ popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ scripts tests doc .
   10.41 - 
   10.42 - INCLUDES = \
   10.43 - 	-I$(top_srcdir)/build \
   10.44 -@@ -47,13 +47,10 @@
   10.45 - 
   10.46 - pkglibdir =		@RPMCONFIGDIR@
   10.47 - pkglib_PROGRAMS =	rpmb rpmd rpmi rpmk rpmq
   10.48 --pkglib_DATA =		rpmrc rpmpopt-$(VERSION) macros
   10.49 -+pkglib_DATA =		rpmrc rpmpopt macros
   10.50 - pkglib_SCRIPTS =	find-provides find-requires mkinstalldirs \
   10.51 - 			config.guess config.sub config.site
   10.52 - 
   10.53 --rpmpopt-$(VERSION): rpmpopt
   10.54 --	cp rpmpopt $@
   10.55 --
   10.56 - noinst_HEADERS = build.h debug.h system.h
   10.57 - 
   10.58 - rpm_SOURCES =
   10.59 -@@ -124,32 +121,32 @@
   10.60 - pkgsrcdir = $(prefix)/src/$(RPMCANONVENDOR)
   10.61 - 
   10.62 - install-data-local:
   10.63 --	@$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
   10.64 -+	@$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg
   10.65 - 	@rm -f $(DESTDIR)$(libdir)/rpmrc
   10.66 - 	@@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc
   10.67 - 	@rm -f $(DESTDIR)$(libdir)/rpmpopt
   10.68 - 	@@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt
   10.69 - 	@rm -f $(DESTDIR)$(libdir)/rpm/rpmt
   10.70 --	@@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt
   10.71 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpme
   10.72 --	@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpme
   10.73 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpmu
   10.74 --	@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpmu
   10.75 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpmv
   10.76 --	@@LN_S@ rpmq $(DESTDIR)$(libdir)/rpm/rpmv
   10.77 -+	@@LN_S@ rpmb $(DESTDIR)$(libdir)/openpkg/rpmt
   10.78 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpme
   10.79 -+	@@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpme
   10.80 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpmu
   10.81 -+	@@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpmu
   10.82 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpmv
   10.83 -+	@@LN_S@ rpmq $(DESTDIR)$(libdir)/openpkg/rpmv
   10.84 - 	rm -f $(DESTDIR)$(bindir)/rpmbuild
   10.85 --	@LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild
   10.86 -+	@LN_S@ ../lib/openpkg/rpmb $(DESTDIR)$(bindir)/rpmbuild
   10.87 - 	rm -f $(DESTDIR)$(bindir)/rpmquery
   10.88 --	@LN_S@ ../lib/rpm/rpmq $(DESTDIR)$(bindir)/rpmquery
   10.89 -+	@LN_S@ ../lib/openpkg/rpmq $(DESTDIR)$(bindir)/rpmquery
   10.90 - 	rm -f $(DESTDIR)$(bindir)/rpmverify
   10.91 --	@LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify
   10.92 -+	@LN_S@ ../lib/openpkg/rpmv $(DESTDIR)$(bindir)/rpmverify
   10.93 - 	rm -f $(DESTDIR)$(bindir)/rpmsign
   10.94 --	@LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign
   10.95 -+	@LN_S@ ../lib/openpkg/rpmk $(DESTDIR)$(bindir)/rpmsign
   10.96 - 	rm -f $(DESTDIR)$(bindir)/rpmdb ; \
   10.97 --	@LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \
   10.98 -+	@LN_S@ ../lib/openpkg/rpmd $(DESTDIR)$(bindir)/rpmdb ; \
   10.99 - 	for bf in e i u ; do \
  10.100 - 	    rm -f $(DESTDIR)$(bindir)/rpm$$bf ; \
  10.101 --	    @LN_S@ ../lib/rpm/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \
  10.102 -+	    @LN_S@ ../lib/openpkg/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \
  10.103 - 	done
  10.104 - 	@for dir in BUILD RPMS SOURCES SPECS SRPMS ; do\
  10.105 - 	    $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/$$dir;\
  10.106 -@@ -174,11 +171,6 @@
  10.107 - 	*)	$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@host_cpu@ ;;\
  10.108 - 	esac
  10.109 - 	$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch
  10.110 --	@case "@host_os@" in \
  10.111 --	mint) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/m68kmint ;;\
  10.112 --	solaris*|linux*) \
  10.113 --	   chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ;; \
  10.114 --	esac
  10.115 - 	@$(mkinstalldirs) $(DESTDIR)/var/tmp
  10.116 - 
  10.117 - .PHONY:	setperms
  10.118 -@@ -198,10 +190,10 @@
  10.119 - 	    $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\
  10.120 - 	done
  10.121 - 	@$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)
  10.122 --	@$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/rpm
  10.123 --	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/[A-Z]*
  10.124 --	-@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/rpm
  10.125 --	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/__db.*
  10.126 -+	@$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/openpkg
  10.127 -+	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/[A-Z]*
  10.128 -+	-@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/openpkg
  10.129 -+	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/__db.*
  10.130 - 
  10.131 - .PHONY:	unsetgid
  10.132 - unsetgid:
  10.133 -@@ -244,7 +236,7 @@
  10.134 - 	@sudo ./rpm -ta rpm-$(VERSION).tar.gz
  10.135 - 
  10.136 - .PHONY:	doxygen
  10.137 --doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt-@VERSION@
  10.138 -+doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt
  10.139 - 	rm -rf $@
  10.140 - 	mkdir -p $@
  10.141 - 	- [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@
  10.142 -
  10.143 -+---------------------------------------------------------------------------
  10.144 -| Remove "tools" directory from sub-directory list because it contains
  10.145 -| things we are not interested in and which cause some build trouble
  10.146 -| anyway.
  10.147 -| Use a plain "rpmpopt" file without any trailing version.
  10.148 -| Adjust paths to conform to OpenPKG filesystem layout.
  10.149 -| Do not run the "installplatform" script, because not needed for OpenPKG.
  10.150 -+---------------------------------------------------------------------------
  10.151 -Index: Makefile.in
  10.152 ---- Makefile.in	16 Jul 2003 17:05:42 -0000	1.1.1.23
  10.153 -+++ Makefile.in	22 Jan 2004 21:42:03 -0000	1.2
  10.154 -@@ -265,10 +265,10 @@
  10.155 - 	xmlspec/examples/*.sh xmlspec/examples/*.lst \
  10.156 - 	xmlspec/examples/*.xmlspec \
  10.157 - 	po/*.in po/*.po po/rpm.pot \
  10.158 --	rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
  10.159 -+	rpm.magic rpmpopt rpmqv.c rpm.c
  10.160 - 
  10.161 - 
  10.162 --SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@ popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
  10.163 -+SUBDIRS = intl @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@ popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ scripts tests doc .
  10.164 - 
  10.165 - INCLUDES = \
  10.166 - 	-I$(top_srcdir)/build \
  10.167 -@@ -301,7 +301,7 @@
  10.168 - bin_PROGRAMS = rpm2cpio
  10.169 - bin_SCRIPTS = gendiff
  10.170 - pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq
  10.171 --pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros
  10.172 -+pkglib_DATA = rpmrc rpmpopt macros
  10.173 - pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
  10.174 - 			config.guess config.sub config.site
  10.175 - 
  10.176 -@@ -1058,8 +1058,6 @@
  10.177 - 	uninstall-rpmbinPROGRAMS
  10.178 - 
  10.179 - 
  10.180 --rpmpopt-$(VERSION): rpmpopt
  10.181 --	cp rpmpopt $@
  10.182 - rpm.o:	rpmqv.c
  10.183 - 	$(COMPILE) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.c
  10.184 - rpmb.o:	rpmqv.c
  10.185 -@@ -1097,32 +1095,32 @@
  10.186 - 		`make -s sources -C popt`
  10.187 - 
  10.188 - install-data-local:
  10.189 --	@$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
  10.190 -+	@$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg
  10.191 - 	@rm -f $(DESTDIR)$(libdir)/rpmrc
  10.192 - 	@@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc
  10.193 - 	@rm -f $(DESTDIR)$(libdir)/rpmpopt
  10.194 - 	@@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt
  10.195 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpmt
  10.196 --	@@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt
  10.197 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpme
  10.198 --	@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpme
  10.199 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpmu
  10.200 --	@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpmu
  10.201 --	@rm -f $(DESTDIR)$(libdir)/rpm/rpmv
  10.202 --	@@LN_S@ rpmq $(DESTDIR)$(libdir)/rpm/rpmv
  10.203 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpmt
  10.204 -+	@@LN_S@ rpmb $(DESTDIR)$(libdir)/openpkg/rpmt
  10.205 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpme
  10.206 -+	@@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpme
  10.207 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpmu
  10.208 -+	@@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpmu
  10.209 -+	@rm -f $(DESTDIR)$(libdir)/openpkg/rpmv
  10.210 -+	@@LN_S@ rpmq $(DESTDIR)$(libdir)/openpkg/rpmv
  10.211 - 	rm -f $(DESTDIR)$(bindir)/rpmbuild
  10.212 --	@LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild
  10.213 -+	@LN_S@ ../lib/openpkg/rpmb $(DESTDIR)$(bindir)/rpmbuild
  10.214 - 	rm -f $(DESTDIR)$(bindir)/rpmquery
  10.215 --	@LN_S@ ../lib/rpm/rpmq $(DESTDIR)$(bindir)/rpmquery
  10.216 -+	@LN_S@ ../lib/openpkg/rpmq $(DESTDIR)$(bindir)/rpmquery
  10.217 - 	rm -f $(DESTDIR)$(bindir)/rpmverify
  10.218 --	@LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify
  10.219 -+	@LN_S@ ../lib/openpkg/rpmv $(DESTDIR)$(bindir)/rpmverify
  10.220 - 	rm -f $(DESTDIR)$(bindir)/rpmsign
  10.221 --	@LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign
  10.222 -+	@LN_S@ ../lib/openpkg/rpmk $(DESTDIR)$(bindir)/rpmsign
  10.223 - 	rm -f $(DESTDIR)$(bindir)/rpmdb ; \
  10.224 --	@LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \
  10.225 -+	@LN_S@ ../lib/openpkg/rpmd $(DESTDIR)$(bindir)/rpmdb ; \
  10.226 - 	for bf in e i u ; do \
  10.227 - 	    rm -f $(DESTDIR)$(bindir)/rpm$$bf ; \
  10.228 --	    @LN_S@ ../lib/rpm/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \
  10.229 -+	    @LN_S@ ../lib/openpkg/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \
  10.230 - 	done
  10.231 - 	@for dir in BUILD RPMS SOURCES SPECS SRPMS ; do\
  10.232 - 	    $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/$$dir;\
  10.233 -@@ -1147,11 +1145,6 @@
  10.234 - 	*)	$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@host_cpu@ ;;\
  10.235 - 	esac
  10.236 - 	$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch
  10.237 --	@case "@host_os@" in \
  10.238 --	mint) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/m68kmint ;;\
  10.239 --	solaris*|linux*) \
  10.240 --	   chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ;; \
  10.241 --	esac
  10.242 - 	@$(mkinstalldirs) $(DESTDIR)/var/tmp
  10.243 - 
  10.244 - .PHONY:	setperms
  10.245 -@@ -1171,10 +1164,10 @@
  10.246 - 	    $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\
  10.247 - 	done
  10.248 - 	@$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)
  10.249 --	@$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/rpm
  10.250 --	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/[A-Z]*
  10.251 --	-@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/rpm
  10.252 --	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/__db.*
  10.253 -+	@$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/openpkg
  10.254 -+	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/[A-Z]*
  10.255 -+	-@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/openpkg
  10.256 -+	-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/__db.*
  10.257 - 
  10.258 - .PHONY:	unsetgid
  10.259 - unsetgid:
  10.260 -@@ -1217,7 +1210,7 @@
  10.261 - 	@sudo ./rpm -ta rpm-$(VERSION).tar.gz
  10.262 - 
  10.263 - .PHONY:	doxygen
  10.264 --doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt-@VERSION@
  10.265 -+doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt
  10.266 - 	rm -rf $@
  10.267 - 	mkdir -p $@
  10.268 - 	- [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@
  10.269 -
  10.270 -+---------------------------------------------------------------------------
  10.271 -| Add support for splitted source directories, i.e., source files
  10.272 -| alternatively can be placed into the .spec directory and are picked
  10.273 -| up there, too.
  10.274 -+---------------------------------------------------------------------------
  10.275 -Index: build/build.c
  10.276 ---- build/build.c	4 Mar 2003 15:27:33 -0000	1.1.1.20
  10.277 -+++ build/build.c	6 Feb 2004 15:37:57 -0000	1.4
  10.278 -@@ -33,7 +33,15 @@
  10.279 - 
  10.280 -     for (p = spec->sources; p != NULL; p = p->next) {
  10.281 - 	if (! (p->flags & RPMBUILD_ISNO)) {
  10.282 -+#ifndef OPENPKG
  10.283 - 	    const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
  10.284 -+#else
  10.285 -+	    const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL);
  10.286 -+        if (access(fn, F_OK) == -1) {
  10.287 -+            fn = _free(fn);
  10.288 -+	        fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
  10.289 -+        }
  10.290 -+#endif
  10.291 - 	    rc = Unlink(fn);
  10.292 - 	    fn = _free(fn);
  10.293 - 	}
  10.294 -@@ -42,7 +50,15 @@
  10.295 -     for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
  10.296 - 	for (p = pkg->icon; p != NULL; p = p->next) {
  10.297 - 	    if (! (p->flags & RPMBUILD_ISNO)) {
  10.298 -+#ifndef OPENPKG
  10.299 - 		const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
  10.300 -+#else
  10.301 -+		const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL);
  10.302 -+        if (access(fn, F_OK) == -1) {
  10.303 -+            fn = _free(fn);
  10.304 -+		    fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
  10.305 -+        }
  10.306 -+#endif
  10.307 - 		rc = Unlink(fn);
  10.308 - 		fn = _free(fn);
  10.309 - 	    }
  10.310 -
  10.311 -+---------------------------------------------------------------------------
  10.312 -| Add support for the OpenPKG custom .spec file sections %track
  10.313 -| (package build-time feature for performing vendor source tracking)
  10.314 -| and %test (package install-time feature for performing package
  10.315 -| run-time tests).
  10.316 -+---------------------------------------------------------------------------
  10.317 -Index: build/build.c
  10.318 ---- build/build.c	4 Mar 2003 15:27:33 -0000	1.1.1.20
  10.319 -+++ build/build.c	6 Feb 2004 15:37:57 -0000	1.4
  10.320 -@@ -129,6 +129,14 @@
  10.321 - 	mTemplate = "%{__spec_clean_template}";
  10.322 - 	mPost = "%{__spec_clean_post}";
  10.323 - 	break;
  10.324 -+#ifdef OPENPKG
  10.325 -+    case RPMBUILD_TRACK:
  10.326 -+	name = "%track";
  10.327 -+	sb = spec->track;
  10.328 -+	mTemplate = "%{__spec_track_template}";
  10.329 -+	mPost = "%{__spec_track_post}";
  10.330 -+	break;
  10.331 -+#endif
  10.332 -     case RPMBUILD_STRINGBUF:
  10.333 -     default:
  10.334 - 	mTemplate = "%{___build_template}";
  10.335 -@@ -185,7 +193,11 @@
  10.336 - 
  10.337 -     (void) fputs(buildTemplate, fp);
  10.338 - 
  10.339 -+#ifdef OPENPKG
  10.340 -+    if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir && what != RPMBUILD_TRACK)
  10.341 -+#else
  10.342 -     if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir)
  10.343 -+#endif
  10.344 - 	fprintf(fp, "cd %s\n", spec->buildSubdir);
  10.345 - 
  10.346 -     if (what == RPMBUILD_RMBUILD) {
  10.347 -@@ -231,6 +243,9 @@
  10.348 -     buildCmd = rpmExpand("%{___build_cmd}", " ", buildScript, NULL);
  10.349 -     (void) poptParseArgvString(buildCmd, &argc, &argv);
  10.350 - 
  10.351 -+#ifdef OPENPKG
  10.352 -+    if (what != RPMBUILD_TRACK)
  10.353 -+#endif
  10.354 -     rpmMessage(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd);
  10.355 -     if (!(child = fork())) {
  10.356 - 
  10.357 -@@ -306,6 +323,12 @@
  10.358 - /*@=boundsread@*/
  10.359 - 	}
  10.360 -     } else {
  10.361 -+#ifdef OPENPKG
  10.362 -+	if ((what & RPMBUILD_TRACK) &&
  10.363 -+	    (rc = doScript(spec, RPMBUILD_TRACK, NULL, NULL, test)))
  10.364 -+		goto exit;
  10.365 -+#endif
  10.366 -+
  10.367 - 	if ((what & RPMBUILD_PREP) &&
  10.368 - 	    (rc = doScript(spec, RPMBUILD_PREP, NULL, NULL, test)))
  10.369 - 		goto exit;
  10.370 -
  10.371 -+---------------------------------------------------------------------------
  10.372 -| Unconditionally remove temporary files ("rpm-tmp.XXXXX") which
  10.373 -| were generated for the executed scripts. In OpenPKG we run the
  10.374 -| scripts in debug mode ("set -x") anyway, so we never need to
  10.375 -| see the whole generated script -- not even if it breaks.  Instead
  10.376 -| we would just have temporary files staying around forever.
  10.377 -+---------------------------------------------------------------------------
  10.378 -Index: build/build.c
  10.379 ---- build/build.c	4 Mar 2003 15:27:33 -0000	1.1.1.20
  10.380 -+++ build/build.c	6 Feb 2004 15:37:57 -0000	1.4
  10.381 -@@ -273,7 +273,9 @@
  10.382 -     
  10.383 - exit:
  10.384 -     if (scriptName) {
  10.385 -+#ifndef OPENPKG
  10.386 - 	if (!rc)
  10.387 -+#endif
  10.388 - 	    (void) Unlink(scriptName);
  10.389 - 	scriptName = _free(scriptName);
  10.390 -     }
  10.391 -
  10.392 -+---------------------------------------------------------------------------
  10.393 -| In OpenPKG we use per-package %{_sourcedir} and %{_specdir}
  10.394 -| definitions (macros have trailing ".../%{name}"). On removal
  10.395 -| of source(s) and .spec file, this per-package directory would
  10.396 -| be kept (usually <prefix>/RPM/SRC/<name>/), because RPM does
  10.397 -| not know about this OpenPKG convention.  So, let RPM try(!) to
  10.398 -| remove the two directories (if they are empty) and just ignore
  10.399 -| removal failures (if they are still not empty).
  10.400 -+---------------------------------------------------------------------------
  10.401 -Index: build/build.c
  10.402 ---- build/build.c	4 Mar 2003 15:27:33 -0000	1.1.1.20
  10.403 -+++ build/build.c	6 Feb 2004 15:37:57 -0000	1.4
  10.404 -@@ -377,6 +377,21 @@
  10.405 -     if (what & RPMBUILD_RMSPEC)
  10.406 - 	(void) Unlink(spec->specFile);
  10.407 - 
  10.408 -+#ifdef OPENPKG
  10.409 -+    if (what & RPMBUILD_RMSOURCE) {
  10.410 -+        const char *pn;
  10.411 -+        pn = rpmGetPath("%{_sourcedir}", NULL);
  10.412 -+        Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY) */
  10.413 -+        pn = _free(pn);
  10.414 -+    }
  10.415 -+    if (what & RPMBUILD_RMSPEC) {
  10.416 -+        const char *pn;
  10.417 -+        pn = rpmGetPath("%{_specdir}", NULL);
  10.418 -+        Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY) */
  10.419 -+        pn = _free(pn);
  10.420 -+    }
  10.421 -+#endif
  10.422 -+
  10.423 - exit:
  10.424 -     if (rc && rpmlogGetNrecs() > 0) {
  10.425 - 	rpmMessage(RPMMESS_NORMAL, _("\n\nRPM build errors:\n"));
  10.426 -
  10.427 -+---------------------------------------------------------------------------
  10.428 -| Do not declare any files as %doc files by default.
  10.429 -+---------------------------------------------------------------------------
  10.430 -Index: build/files.c
  10.431 ---- build/files.c	4 Mar 2003 17:04:13 -0000	1.1.1.20
  10.432 -+++ build/files.c	6 Feb 2004 15:37:57 -0000	1.3
  10.433 -@@ -1971,6 +1971,7 @@
  10.434 -     fl.defSpecdFlags = 0;
  10.435 - 
  10.436 -     fl.docDirCount = 0;
  10.437 -+#if 0
  10.438 -     fl.docDirs[fl.docDirCount++] = xstrdup("/usr/doc");
  10.439 -     fl.docDirs[fl.docDirCount++] = xstrdup("/usr/man");
  10.440 -     fl.docDirs[fl.docDirCount++] = xstrdup("/usr/info");
  10.441 -@@ -1981,6 +1982,7 @@
  10.442 -     fl.docDirs[fl.docDirCount++] = rpmGetPath("%{_docdir}", NULL);
  10.443 -     fl.docDirs[fl.docDirCount++] = rpmGetPath("%{_mandir}", NULL);
  10.444 -     fl.docDirs[fl.docDirCount++] = rpmGetPath("%{_infodir}", NULL);
  10.445 -+#endif
  10.446 -     
  10.447 -     fl.fileList = NULL;
  10.448 -     fl.fileListRecsAlloced = 0;
  10.449 -
  10.450 -+---------------------------------------------------------------------------
  10.451 -| Make sure the "Provides" headers are available for querying from the
  10.452 -| .src.rpm files.
  10.453 -+---------------------------------------------------------------------------
  10.454 -Index: build/files.c
  10.455 ---- build/files.c	4 Mar 2003 17:04:13 -0000	1.1.1.20
  10.456 -+++ build/files.c	6 Feb 2004 15:37:57 -0000	1.3
  10.457 -@@ -2185,6 +2185,12 @@
  10.458 - 	case RPMTAG_CHANGELOGTEXT:
  10.459 - 	case RPMTAG_URL:
  10.460 - 	case HEADER_I18NTABLE:
  10.461 -+#ifdef OPENPKG
  10.462 -+	case RPMTAG_PROVIDENAME:
  10.463 -+	case RPMTAG_PROVIDEVERSION:
  10.464 -+	case RPMTAG_PROVIDEFLAGS:
  10.465 -+	case RPMTAG_CLASS:
  10.466 -+#endif
  10.467 - 	    if (ptr)
  10.468 - 		(void)headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
  10.469 - 	    /*@switchbreak@*/ break;
  10.470 -
  10.471 -+---------------------------------------------------------------------------
  10.472 -| Add support for splitted source directories, i.e., source files
  10.473 -| alternatively can be placed into the .spec directory and are picked
  10.474 -| up there, too.
  10.475 -+---------------------------------------------------------------------------
  10.476 -Index: build/files.c
  10.477 ---- build/files.c	4 Mar 2003 17:04:13 -0000	1.1.1.20
  10.478 -+++ build/files.c	6 Feb 2004 15:37:57 -0000	1.3
  10.479 -@@ -2261,8 +2261,20 @@
  10.480 - 	}
  10.481 - 
  10.482 -       {	const char * sfn;
  10.483 -+#ifndef OPENPKG
  10.484 - 	sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
  10.485 - 		"%{_sourcedir}/", srcPtr->source, NULL);
  10.486 -+#else
  10.487 -+        const char *sfn2;
  10.488 -+	sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL);
  10.489 -+        if (access(sfn2, F_OK) == 0)
  10.490 -+	    sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
  10.491 -+                "%{_specdir}/", srcPtr->source, NULL);
  10.492 -+        else
  10.493 -+	    sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
  10.494 -+                "%{_sourcedir}/", srcPtr->source, NULL);
  10.495 -+        sfn2 = _free(sfn2);
  10.496 -+#endif
  10.497 - 	appendLineStringBuf(sourceFiles, sfn);
  10.498 - 	sfn = _free(sfn);
  10.499 -       }
  10.500 -@@ -2271,8 +2283,20 @@
  10.501 -     for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
  10.502 - 	for (srcPtr = pkg->icon; srcPtr != NULL; srcPtr = srcPtr->next) {
  10.503 - 	    const char * sfn;
  10.504 -+#ifndef OPENPKG
  10.505 - 	    sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
  10.506 - 		"%{_sourcedir}/", srcPtr->source, NULL);
  10.507 -+#else
  10.508 -+            const char *sfn2;
  10.509 -+	    sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL);
  10.510 -+        if (access(sfn2, F_OK) == 0)
  10.511 -+	    sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
  10.512 -+                "%{_specdir}/", srcPtr->source, NULL);
  10.513 -+        else
  10.514 -+	    sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
  10.515 -+                "%{_sourcedir}/", srcPtr->source, NULL);
  10.516 -+        sfn2 = _free(sfn2);
  10.517 -+#endif
  10.518 - 	    appendLineStringBuf(sourceFiles, sfn);
  10.519 - 	    sfn = _free(sfn);
  10.520 - 	}
  10.521 -
  10.522 -+---------------------------------------------------------------------------
  10.523 -| Add support for splitted source directories, i.e., source files
  10.524 -| alternatively can be placed into the .spec directory and are picked
  10.525 -| up there, too.
  10.526 -+---------------------------------------------------------------------------
  10.527 -Index: build/parsePreamble.c
  10.528 ---- build/parsePreamble.c	3 Mar 2003 20:46:34 -0000	1.1.1.13
  10.529 -+++ build/parsePreamble.c	6 Feb 2004 15:37:58 -0000	1.3
  10.530 -@@ -366,7 +368,15 @@
  10.531 -     size_t nb, iconsize;
  10.532 - 
  10.533 -     /* XXX use rpmGenPath(rootdir, "%{_sourcedir}/", file) for icon path. */
  10.534 -+#ifndef OPENPKG
  10.535 -     fn = rpmGetPath("%{_sourcedir}/", file, NULL);
  10.536 -+#else
  10.537 -+    fn = rpmGetPath("%{_specdir}/", file, NULL);
  10.538 -+    if (access(fn, F_OK) == -1) {
  10.539 -+        fn = _free(fn);
  10.540 -+        fn = rpmGetPath("%{_sourcedir}/", file, NULL);
  10.541 -+    }
  10.542 -+#endif
  10.543 - 
  10.544 -     fd = Fopen(fn, "r.ufdio");
  10.545 -     if (fd == NULL || Ferror(fd)) {
  10.546 -
  10.547 -+---------------------------------------------------------------------------
  10.548 -| In OpenPKG, the RPM package contains own local versions of the
  10.549 -| "patch" and "tar" tools, so we cannot accept hard-coded names here.
  10.550 -| Instead we expand a variable to allow us to direct RPM to our tools.
  10.551 -| Additionally, pass option "-b" to patch(1) so it creates original
  10.552 -| files not only if a non-standard (not ".orig") suffix is used.
  10.553 -| Finally, add support for the GNU patch "-d" option for convenient
  10.554 -| changing into a subdirectory.
  10.555 -| Remove "unzip" support, because in OpenPKG there are less than
  10.556 -| a dozend packages requiring unpacking of .zip files. For these
  10.557 -| it is fully sufficient to explicitly require the "infozip"
  10.558 -| package (containing "unzip") and leaving the less portable
  10.559 -| "unzip" out of the bootstrap package.
  10.560 -+---------------------------------------------------------------------------
  10.561 -Index: build/parsePrep.c
  10.562 ---- build/parsePrep.c	7 Aug 2002 14:20:45 -0000	1.1.1.10
  10.563 -+++ build/parsePrep.c	6 Jun 2005 15:53:04 -0000	1.4
  10.564 -@@ -66,7 +66,7 @@
  10.565 -  */
  10.566 - /*@-boundswrite@*/
  10.567 - /*@observer@*/ static char *doPatch(Spec spec, int c, int strip, const char *db,
  10.568 --		     int reverse, int removeEmpties)
  10.569 -+		     int reverse, int removeEmpties, const char *subdir)
  10.570 - 	/*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
  10.571 - 	/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
  10.572 - {
  10.573 -@@ -76,6 +76,7 @@
  10.574 -     struct Source *sp;
  10.575 -     rpmCompressedMagic compressed = COMPRESSED_NOT;
  10.576 -     int urltype;
  10.577 -+    const char *patcher;
  10.578 - 
  10.579 -     for (sp = spec->sources; sp != NULL; sp = sp->next) {
  10.580 - 	if ((sp->flags & RPMBUILD_ISPATCH) && (sp->num == c)) {
  10.581 -@@ -97,6 +106,10 @@
  10.582 - 	strcat(args, "--suffix ");
  10.583 - 	strcat(args, db);
  10.584 -     }
  10.585 -+    if (subdir) {
  10.586 -+	strcat(args, "-d ");
  10.587 -+	strcat(args, subdir);
  10.588 -+    }
  10.589 -     if (reverse) {
  10.590 - 	strcat(args, " -R");
  10.591 -     }
  10.592 -@@ -124,6 +137,10 @@
  10.593 - 	/*@notreached@*/ break;
  10.594 -     }
  10.595 - 
  10.596 -+    patcher = rpmGetPath("%{_patchbin}", NULL);
  10.597 -+    if (strcmp(patcher, "%{_patchbin}") == 0)
  10.598 -+        patcher = "patch";
  10.599 -+
  10.600 -     if (compressed) {
  10.601 - 	const char *zipper = rpmGetPath(
  10.602 - 	    (compressed == COMPRESSED_BZIP2 ? "%{_bzip2bin}" : "%{_gzipbin}"),
  10.603 -@@ -131,22 +148,23 @@
  10.604 - 
  10.605 - 	sprintf(buf,
  10.606 - 		"echo \"Patch #%d (%s):\"\n"
  10.607 --		"%s -d < %s | patch -p%d %s -s\n"
  10.608 -+		"%s -d <%s | %s -p%d %s -s -b\n"
  10.609 - 		"STATUS=$?\n"
  10.610 - 		"if [ $STATUS -ne 0 ]; then\n"
  10.611 - 		"  exit $STATUS\n"
  10.612 - 		"fi",
  10.613 --		c, /*@-unrecog@*/ (const char *) basename(fn), /*@=unrecog@*/
  10.614 -+		c, /*@-unrecog@*/ basename(fn), /*@=unrecog@*/
  10.615 - 		zipper,
  10.616 --		fn, strip, args);
  10.617 -+		fn, patcher, strip, args);
  10.618 - 	zipper = _free(zipper);
  10.619 -     } else {
  10.620 - 	sprintf(buf,
  10.621 - 		"echo \"Patch #%d (%s):\"\n"
  10.622 --		"patch -p%d %s -s < %s", c, (const char *) basename(fn),
  10.623 --		strip, args, fn);
  10.624 -+		"%s -p%d %s -s -b <%s", c, basename(fn),
  10.625 -+		patcher, strip, args, fn);
  10.626 -     }
  10.627 - 
  10.628 -+    patcher = _free(patcher);
  10.629 -     urlfn = _free(urlfn);
  10.630 -     return buf;
  10.631 - }
  10.632 -@@ -171,6 +189,7 @@
  10.633 -     struct Source *sp;
  10.634 -     rpmCompressedMagic compressed = COMPRESSED_NOT;
  10.635 -     int urltype;
  10.636 -+    const char *tar;
  10.637 - 
  10.638 -     for (sp = spec->sources; sp != NULL; sp = sp->next) {
  10.639 - 	if ((sp->flags & RPMBUILD_ISSOURCE) && (sp->num == c)) {
  10.640 -@@ -228,6 +255,10 @@
  10.641 - 	/*@notreached@*/ break;
  10.642 -     }
  10.643 - 
  10.644 -+    tar = rpmGetPath("%{_tarbin}", NULL);
  10.645 -+    if (strcmp(tar, "%{_tarbin}") == 0)
  10.646 -+        tar = "tar";
  10.647 -+
  10.648 -     if (compressed != COMPRESSED_NOT) {
  10.649 - 	const char *zipper;
  10.650 - 	int needtar = 1;
  10.651 -@@ -240,6 +271,7 @@
  10.652 - 	case COMPRESSED_BZIP2:
  10.653 - 	    t = "%{_bzip2bin} -dc";
  10.654 - 	    break;
  10.655 -+#if 0
  10.656 - 	case COMPRESSED_ZIP:
  10.657 - 	    if (rpmIsVerbose() && !quietly)
  10.658 - 		t = "%{_unzipbin}";
  10.659 -@@ -247,6 +279,7 @@
  10.660 - 		t = "%{_unzipbin} -qq";
  10.661 - 	    needtar = 0;
  10.662 - 	    break;
  10.663 -+#endif
  10.664 - 	}
  10.665 - 	zipper = rpmGetPath(t, NULL);
  10.666 - 	buf[0] = '\0';
  10.667 -@@ -254,8 +287,13 @@
  10.668 - 	zipper = _free(zipper);
  10.669 - 	*t++ = ' ';
  10.670 - 	t = stpcpy(t, fn);
  10.671 --	if (needtar)
  10.672 --	    t = stpcpy( stpcpy( stpcpy(t, " | tar "), taropts), " -");
  10.673 -+	if (needtar) {
  10.674 -+	    t = stpcpy(t, " | ");
  10.675 -+            t = stpcpy(t, tar);
  10.676 -+            t = stpcpy(t, " ");
  10.677 -+            t = stpcpy(t, taropts);
  10.678 -+            t = stpcpy(t, " -");
  10.679 -+        }
  10.680 - 	t = stpcpy(t,
  10.681 - 		"\n"
  10.682 - 		"STATUS=$?\n"
  10.683 -@@ -264,11 +302,14 @@
  10.684 - 		"fi");
  10.685 -     } else {
  10.686 - 	buf[0] = '\0';
  10.687 --	t = stpcpy( stpcpy(buf, "tar "), taropts);
  10.688 --	*t++ = ' ';
  10.689 -+	t = stpcpy(buf, tar);
  10.690 -+	t = stpcpy(t, " ");
  10.691 -+	t = stpcpy(t, taropts);
  10.692 -+	t = stpcpy(t, " ");
  10.693 - 	t = stpcpy(t, fn);
  10.694 -     }
  10.695 - 
  10.696 -+    tar = _free(tar);
  10.697 -     urlfn = _free(urlfn);
  10.698 -     return buf;
  10.699 - }
  10.700 -@@ -443,7 +484,7 @@
  10.701 - 	/*@modifies spec->prep, rpmGlobalMacroContext,
  10.702 - 		fileSystem, internalState  @*/
  10.703 - {
  10.704 --    char *opt_b;
  10.705 -+    char *opt_b, *opt_d;
  10.706 -     int opt_P, opt_p, opt_R, opt_E;
  10.707 -     char *s;
  10.708 -     char buf[BUFSIZ], *bp;
  10.709 -@@ -453,6 +494,7 @@
  10.710 -     memset(patch_nums, 0, sizeof(patch_nums));
  10.711 -     opt_P = opt_p = opt_R = opt_E = 0;
  10.712 -     opt_b = NULL;
  10.713 -+    opt_d = NULL;
  10.714 -     patch_index = 0;
  10.715 - 
  10.716 -     if (! strchr(" \t\n", line[6])) {
  10.717 -@@ -492,6 +534,15 @@
  10.718 - 			spec->lineNum, spec->line);
  10.719 - 		return RPMERR_BADSPEC;
  10.720 - 	    }
  10.721 -+	} else if (!strcmp(s, "-d")) {
  10.722 -+	    /* orig suffix */
  10.723 -+	    opt_d = strtok(NULL, " \t\n");
  10.724 -+	    if (! opt_d) {
  10.725 -+		rpmError(RPMERR_BADSPEC,
  10.726 -+			_("line %d: Need arg to %%patch -d: %s\n"),
  10.727 -+			spec->lineNum, spec->line);
  10.728 -+		return RPMERR_BADSPEC;
  10.729 -+	    }
  10.730 - 	} else if (!strncmp(s, "-p", sizeof("-p")-1)) {
  10.731 - 	    /* unfortunately, we must support -pX */
  10.732 - 	    if (! strchr(" \t\n", s[2])) {
  10.733 -@@ -530,14 +581,14 @@
  10.734 -     /* All args processed */
  10.735 - 
  10.736 -     if (! opt_P) {
  10.737 --	s = doPatch(spec, 0, opt_p, opt_b, opt_R, opt_E);
  10.738 -+	s = doPatch(spec, 0, opt_p, opt_b, opt_R, opt_E, opt_d);
  10.739 - 	if (s == NULL)
  10.740 - 	    return RPMERR_BADSPEC;
  10.741 - 	appendLineStringBuf(spec->prep, s);
  10.742 -     }
  10.743 - 
  10.744 -     for (x = 0; x < patch_index; x++) {
  10.745 --	s = doPatch(spec, patch_nums[x], opt_p, opt_b, opt_R, opt_E);
  10.746 -+	s = doPatch(spec, patch_nums[x], opt_p, opt_b, opt_R, opt_E, opt_d);
  10.747 - 	if (s == NULL)
  10.748 - 	    return RPMERR_BADSPEC;
  10.749 - 	appendLineStringBuf(spec->prep, s);
  10.750 -
  10.751 -+---------------------------------------------------------------------------
  10.752 -| Add support for splitted source directories, i.e., source files
  10.753 -| alternatively can be placed into the .spec directory and are picked
  10.754 -| up there, too.
  10.755 -+---------------------------------------------------------------------------
  10.756 -Index: build/parsePrep.c
  10.757 ---- build/parsePrep.c	7 Aug 2002 14:20:45 -0000	1.1.1.10
  10.758 -+++ build/parsePrep.c	6 Jun 2005 15:53:04 -0000	1.4
  10.759 -@@ -88,7 +88,15 @@
  10.760 - 	return NULL;
  10.761 -     }
  10.762 - 
  10.763 -+#ifndef OPENPKG
  10.764 -     urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
  10.765 -+#else
  10.766 -+    urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL);
  10.767 -+    if (access(urlfn, F_OK) == -1) {
  10.768 -+        urlfn = _free(urlfn);
  10.769 -+        urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
  10.770 -+    }
  10.771 -+#endif
  10.772 - 
  10.773 -     args[0] = '\0';
  10.774 -     if (db) {
  10.775 -@@ -193,7 +201,15 @@
  10.776 - 	return NULL;
  10.777 -     }
  10.778 - 
  10.779 -+#ifndef OPENPKG
  10.780 -     urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
  10.781 -+#else
  10.782 -+    urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL);
  10.783 -+    if (access(urlfn, F_OK) == -1) {
  10.784 -+        urlfn = _free(urlfn);
  10.785 -+        urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
  10.786 -+    }
  10.787 -+#endif
  10.788 - 
  10.789 -     /*@-internalglobs@*/ /* FIX: shrug */
  10.790 -     taropts = ((rpmIsVerbose() && !quietly) ? "-xvvf" : "-xf");
  10.791 -
  10.792 -+---------------------------------------------------------------------------
  10.793 -| Not everything on a system is RPM based (for instance OpenPKG is
  10.794 -| just an add-on to the system), so do not assume we can just require
  10.795 -| a package to provide "/bin/sh".
  10.796 -+---------------------------------------------------------------------------
  10.797 -Index: build/parseScript.c
  10.798 ---- build/parseScript.c	23 Jun 2002 19:47:12 -0000	1.1.1.12
  10.799 -+++ build/parseScript.c	30 Jan 2004 17:06:29 -0000	1.3
  10.800 -@@ -261,6 +269,7 @@
  10.801 -     stripTrailingBlanksStringBuf(sb);
  10.802 -     p = getStringBuf(sb);
  10.803 - 
  10.804 -+    if (progArgv[0] != NULL && strcmp(progArgv[0], "/bin/sh") != 0)
  10.805 -     (void) addReqProv(spec, pkg->header, (tagflags | RPMSENSE_INTERP), progArgv[0], NULL, 0);
  10.806 - 
  10.807 -     /* Trigger script insertion is always delayed in order to */
  10.808 -
  10.809 -+---------------------------------------------------------------------------
  10.810 -| Add support for splitted source directories, i.e., source files
  10.811 -| alternatively can be placed into the spec directory and are picked
  10.812 -| up there, too.
  10.813 -+---------------------------------------------------------------------------
  10.814 -Index: build/spec.c
  10.815 ---- build/spec.c	4 Mar 2003 15:25:51 -0000	1.1.1.21
  10.816 -+++ build/spec.c	30 Jan 2004 17:06:31 -0000	1.3
  10.817 -@@ -334,7 +337,15 @@
  10.818 - 
  10.819 -     if (tag != RPMTAG_ICON) {
  10.820 - 	/*@-nullpass@*/		/* LCL: varargs needs null annotate. */
  10.821 -+#ifndef OPENPKG
  10.822 - 	const char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
  10.823 -+#else
  10.824 -+	const char *body = rpmGetPath("%{_specdir}/", p->source, NULL);
  10.825 -+    if (access(body, F_OK) == -1) {
  10.826 -+        body = _free(body);
  10.827 -+	    body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
  10.828 -+    }
  10.829 -+#endif
  10.830 - 	/*@=nullpass@*/
  10.831 - 
  10.832 - 	sprintf(buf, "%s%d",
  10.833 -
  10.834 -+---------------------------------------------------------------------------
  10.835 -| Do not build with warnings on, because we do no RPM development
  10.836 -| (so warnings are useless here), they cause some confusion inside
  10.837 -| Berkeley-DB and also slow down building. Instead, increase the
  10.838 -| optimization level. Additionally, disable static linking of RPM
  10.839 -| tools. Finally, use "shtool mkdir" as the "mkdir -p" fallback.
  10.840 -+---------------------------------------------------------------------------
  10.841 -Index: configure.ac
  10.842 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
  10.843 -+++ configure.ac	13 Sep 2006 13:39:07 -0000
  10.844 -@@ -53,7 +53,7 @@
  10.845 - AS=${AS-as}
  10.846 - AC_SUBST(AS)
  10.847 - if test "$ac_cv_prog_gcc" = yes; then
  10.848 --    CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
  10.849 -+    CFLAGS="$CFLAGS -O2 -D_GNU_SOURCE -D_REENTRANT"
  10.850 - fi
  10.851 - export CFLAGS
  10.852 - 
  10.853 -@@ -142,6 +142,7 @@
  10.854 - 	# just link it dynamically
  10.855 - 	LDFLAGS_STATIC=""
  10.856 - fi
  10.857 -+LDFLAGS_STATIC="" # OpenPKG wants dynamically linked RPM tools
  10.858 - LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}"	# libtool format
  10.859 - AC_MSG_RESULT($LDFLAGS_STATIC)
  10.860 - AC_SUBST(LDFLAGS_STATIC)
  10.861 -@@ -201,7 +202,7 @@
  10.862 - 
  10.863 - if test X"$MKDIR_P" = X0 ; then
  10.864 - 	AC_MSG_RESULT(no)
  10.865 --	MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
  10.866 -+	MKDIR_P="@l_prefix@/lib/openpkg/shtool mkdir -f -p -m 755"
  10.867 - else
  10.868 - 	AC_MSG_RESULT(yes)
  10.869 - fi
  10.870 -
  10.871 -+---------------------------------------------------------------------------
  10.872 -| Disable the use of the internal zlib library, because
  10.873 -| we build against an external one.
  10.874 -+---------------------------------------------------------------------------
  10.875 -Index: configure.ac
  10.876 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
  10.877 -+++ configure.ac	13 Sep 2006 13:39:09 -0000
  10.878 -@@ -311,7 +311,7 @@
  10.879 - WITH_ZLIB_SUBDIR=
  10.880 - WITH_ZLIB_INCLUDE=
  10.881 - WITH_ZLIB_LIB=
  10.882 --if test -d zlib ; then
  10.883 -+if false; then
  10.884 -   WITH_ZLIB_SUBDIR=zlib
  10.885 -   addlib \${top_builddir}/zlib
  10.886 -   WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
  10.887 -
  10.888 -+---------------------------------------------------------------------------
  10.889 -| Disable unnecessary INCPATH checks, because in OpenPKG the
  10.890 -| externally used libraries are all explicitly given. And they just
  10.891 -| would make RPM pick up things which we do not want to be picked up.
  10.892 -+---------------------------------------------------------------------------
  10.893 -Index: configure.ac
  10.894 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
  10.895 -+++ configure.ac	13 Sep 2006 13:39:11 -0000
  10.896 -@@ -325,38 +325,38 @@
  10.897 - 
  10.898 - localdone=
  10.899 - 
  10.900 --dirs=$prefix
  10.901 --if test "$cross_compiling" != "yes"; then
  10.902 --  dirs="$dirs /usr/local"
  10.903 --fi
  10.904 --for dir in $dirs
  10.905 --do
  10.906 --	case $dir in
  10.907 --	NONE|/usr)	continue;;
  10.908 --	/usr/local)
  10.909 --		if test X$localdone != X ; then continue; fi
  10.910 --		localdone="$dir"
  10.911 --		;;
  10.912 --	esac
  10.913 --
  10.914 --	AC_MSG_CHECKING(for $dir/lib in LIBS)
  10.915 --	if test -d $dir/lib 2> /dev/null ; then
  10.916 --		addlib $dir/lib
  10.917 --		AC_MSG_RESULT(yes)
  10.918 --	else
  10.919 --		AC_MSG_RESULT(no)
  10.920 --	fi
  10.921 --
  10.922 --	AC_MSG_CHECKING(for $dir/include in INCPATH)
  10.923 --	if test -d $dir/include 2>/dev/null ; then
  10.924 --		if [ "$dir" != "/usr/local" ] ; then
  10.925 --		    INCPATH="$INCPATH -I$dir/include"
  10.926 --		fi
  10.927 --		AC_MSG_RESULT(yes)
  10.928 --	else
  10.929 --		AC_MSG_RESULT(no)
  10.930 --	fi
  10.931 --done
  10.932 -+dnl dirs=$prefix
  10.933 -+dnl if test "$cross_compiling" != "yes"; then
  10.934 -+dnl   dirs="$dirs /usr/local"
  10.935 -+dnl fi
  10.936 -+dnl for dir in $dirs
  10.937 -+dnl do
  10.938 -+dnl 	case $dir in
  10.939 -+dnl 	NONE|/usr)	continue;;
  10.940 -+dnl 	/usr/local)
  10.941 -+dnl 		if test X$localdone != X ; then continue; fi
  10.942 -+dnl 		localdone="$dir"
  10.943 -+dnl 		;;
  10.944 -+dnl 	esac
  10.945 -+dnl 
  10.946 -+dnl 	AC_MSG_CHECKING(for $dir/lib in LIBS)
  10.947 -+dnl 	if test -d $dir/lib 2> /dev/null ; then
  10.948 -+dnl 		addlib $dir/lib
  10.949 -+dnl 		AC_MSG_RESULT(yes)
  10.950 -+dnl 	else
  10.951 -+dnl 		AC_MSG_RESULT(no)
  10.952 -+dnl 	fi
  10.953 -+dnl 
  10.954 -+dnl 	AC_MSG_CHECKING(for $dir/include in INCPATH)
  10.955 -+dnl 	if test -d $dir/include 2>/dev/null ; then
  10.956 -+dnl 		if test "$dir" != "/usr/local"; then
  10.957 -+dnl 		    INCPATH="$INCPATH -I$dir/include"
  10.958 -+dnl 		fi
  10.959 -+dnl 		AC_MSG_RESULT(yes)
  10.960 -+dnl 	else
  10.961 -+dnl 		AC_MSG_RESULT(no)
  10.962 -+dnl 	fi
  10.963 -+dnl done
  10.964 - 
  10.965 - AC_MSG_CHECKING(for /usr/ucblib in LIBS)
  10.966 - if test -d /usr/ucblib ; then
  10.967 -
  10.968 -+---------------------------------------------------------------------------
  10.969 -| Adjust paths for OpenPKG filesystem layout.
  10.970 -+---------------------------------------------------------------------------
  10.971 -Index: configure.ac
  10.972 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
  10.973 -+++ configure.ac	13 Sep 2006 13:39:12 -0000
  10.974 -@@ -1201,12 +1201,12 @@
  10.975 - AC_SUBST(LOCALEDIR)
  10.976 - LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
  10.977 - AC_SUBST(LIBDIR)
  10.978 --RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
  10.979 -+RPMCONFIGDIR="@l_prefix@/lib/openpkg"
  10.980 - AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR",
  10.981 - 	[Full path to rpm global configuration directory (usually /usr/lib/rpm)])
  10.982 - AC_SUBST(RPMCONFIGDIR)
  10.983 - 
  10.984 --SYSCONFIGDIR="`echo /etc/rpm`"
  10.985 -+SYSCONFIGDIR="@l_prefix@/etc/openpkg"
  10.986 - AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR",
  10.987 - 	[Full path to rpm system configuration directory (usually /etc/rpm)])
  10.988 - AC_SUBST(SYSCONFIGDIR)
  10.989 -@@ -1216,17 +1216,17 @@
  10.990 - 	[Colon separated paths of macro files to read.])
  10.991 - AC_SUBST(MACROFILES)
  10.992 - 
  10.993 --LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
  10.994 -+LIBRPMRC_FILENAME="${SYSCONFIGDIR}/rpmrc"
  10.995 - AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME",
  10.996 - 	[Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)])
  10.997 - AC_SUBST(LIBRPMRC_FILENAME)
  10.998 - 
  10.999 --VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
 10.1000 -+VENDORRPMRC_FILENAME="${SYSCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
 10.1001 - AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME",
 10.1002 -        [Full path to vendor rpmrc configuration file (usually /usr/lib/rpm/vendor/rpmrc)])
 10.1003 - AC_SUBST(VENDORRPMRC_FILENAME)
 10.1004 - 
 10.1005 --LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}"
 10.1006 -+LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt"
 10.1007 - AC_DEFINE_UNQUOTED(LIBRPMALIAS_FILENAME, "$LIBRPMALIAS_FILENAME",
 10.1008 - 	[Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)])
 10.1009 - AC_SUBST(LIBRPMALIAS_FILENAME)
 10.1010 -
 10.1011 -+---------------------------------------------------------------------------
 10.1012 -| If running as "susr", do not unpack source RPM packages with "susr"
 10.1013 -| file ownerships as the OpenPKG Set-UID wrapper switches from "musr"
 10.1014 -| to "susr" on "openpkg rpm -Uvh *.src.rpm". As a result the installed
 10.1015 -| files could be never removed again by "musr". It is more consistent
 10.1016 -| to always unpack as "musr" if possible.
 10.1017 -+---------------------------------------------------------------------------
 10.1018 -Index: lib/psm.c
 10.1019 ---- lib/psm.c	5 Jun 2003 12:43:18 -0000	1.1.1.6
 10.1020 -+++ lib/psm.c	13 Sep 2006 13:39:15 -0000
 10.1021 -@@ -314,6 +314,20 @@
 10.1022 - 
 10.1023 -     fi->uid = getuid();
 10.1024 -     fi->gid = getgid();
 10.1025 -+#ifdef OPENPKG
 10.1026 -+    if (fi->uid == 0) {
 10.1027 -+        char *muid_str;
 10.1028 -+        char *mgid_str;
 10.1029 -+        uid_t *muid;
 10.1030 -+        gid_t *mgid;
 10.1031 -+        if ((muid_str = rpmExpand("%{l_muid}", NULL)) != NULL)
 10.1032 -+            if ((muid = (uid_t)strtol(muid_str, (char **)NULL, 10)) > 0)
 10.1033 -+                fi->uid = muid;
 10.1034 -+        if ((mgid_str = rpmExpand("%{l_mgid}", NULL)) != NULL)
 10.1035 -+            if ((mgid = (gid_t)strtol(mgid_str, (char **)NULL, 10)) > 0)
 10.1036 -+                fi->gid = mgid;
 10.1037 -+    }
 10.1038 -+#endif
 10.1039 -     fi->astriplen = 0;
 10.1040 -     fi->striplen = 0;
 10.1041 - 
 10.1042 -@@ -352,6 +366,9 @@
 10.1043 - 	rpmrc = RPMRC_FAIL;
 10.1044 - 	goto exit;
 10.1045 -     }
 10.1046 -+#ifdef OPENPKG
 10.1047 -+    chown(_sourcedir, fi->uid, fi->gid);
 10.1048 -+#endif
 10.1049 - 
 10.1050 -     _specdir = rpmGenPath(rpmtsRootDir(ts), "%{_specdir}", "");
 10.1051 -     rpmrc = rpmMkdirPath(_specdir, "specdir");
 10.1052 -@@ -359,6 +376,9 @@
 10.1053 - 	rpmrc = RPMRC_FAIL;
 10.1054 - 	goto exit;
 10.1055 -     }
 10.1056 -+#ifdef OPENPKG
 10.1057 -+    chown(_specdir, fi->uid, fi->gid);
 10.1058 -+#endif
 10.1059 - 
 10.1060 -     /* Build dnl/dil with {_sourcedir, _specdir} as values. */
 10.1061 -     if (i < fi->fc) {
 10.1062 -
 10.1063 -+---------------------------------------------------------------------------
 10.1064 -| RPM has two platform id canonicalizations: hard-coded ones in
 10.1065 -| the "rpm" program and defined ones in the rpmrc files. The
 10.1066 -| hard-coded ones make the defined ones inconsistent. Additionally,
 10.1067 -| in OpenPKG we know exactly what we do. So, disable the hard-coded
 10.1068 -| canonicalizations and use only the defined ones. The only thing we
 10.1069 -| do inside RPM is to reduce the platform version to major and minor
 10.1070 -| version numbers in order to simplify the "rpmrc" files. Then, RPM
 10.1071 -| allows to read the platform from an external program. Adjust the
 10.1072 -| hard-coded path to this program and allow it to be overridden with
 10.1073 -| the macro %{__platform}. Finally, change the default definition of
 10.1074 -| %{_host} to not contain the vendor stuff to more conform to what
 10.1075 -| %{_target} usually is defined to and what we are using throughout
 10.1076 -| OpenPKG, too.
 10.1077 -+---------------------------------------------------------------------------
 10.1078 -Index: lib/rpmrc.c
 10.1079 ---- lib/rpmrc.c	4 Jun 2003 18:18:45 -0000	1.1.1.25
 10.1080 -+++ lib/rpmrc.c	6 Jun 2005 15:53:06 -0000	1.3
 10.1081 -@@ -27,7 +27,7 @@
 10.1082 - const char * macrofiles = MACROFILES;
 10.1083 - 
 10.1084 - /*@observer@*/ /*@unchecked@*/
 10.1085 --static const char * platform = "/etc/rpm/platform";
 10.1086 -+static const char * platform = "@l_prefix@/etc/openpkg/platform";
 10.1087 - /*@only@*/ /*@relnull@*/ /*@unchecked@*/
 10.1088 - static const char ** platpat = NULL;
 10.1089 - /*@unchecked@*/
 10.1090 -@@ -861,7 +861,11 @@
 10.1091 - 
 10.1092 - 	platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
 10.1093 - /*@-onlyunqglobaltrans@*/
 10.1094 -+#ifdef OPENPKG
 10.1095 -+	platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
 10.1096 -+#else
 10.1097 - 	platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}", (gnu && *gnu ? "-" : NULL), gnu, NULL);
 10.1098 -+#endif
 10.1099 - 	nplatpat++;
 10.1100 - 	platpat[nplatpat] = NULL;
 10.1101 - /*@=onlyunqglobaltrans@*/
 10.1102 -@@ -1055,14 +1059,35 @@
 10.1103 - 	/*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
 10.1104 - 	/*@modifies *arch, *os, rpmGlobalMacroContext, fileSystem, internalState @*/
 10.1105 - {
 10.1106 -+#ifdef OPENPKG
 10.1107 -+    static struct utsname un_real;
 10.1108 -+    /* utsname fields on some platforms (like HP-UX) are very small
 10.1109 -+       (about 8 characters). This is too small for OpenPKG, so cheat! */
 10.1110 -+    static struct {
 10.1111 -+        char sysname[32];
 10.1112 -+        char nodename[32];
 10.1113 -+        char release[32];
 10.1114 -+        char version[32];
 10.1115 -+        char machine[32];
 10.1116 -+    } un;
 10.1117 -+#else
 10.1118 -     static struct utsname un;
 10.1119 -+#endif
 10.1120 -     static int gotDefaults = 0;
 10.1121 -     char * chptr;
 10.1122 -     canonEntry canon;
 10.1123 -     int rc;
 10.1124 - 
 10.1125 -     while (!gotDefaults) {
 10.1126 -+#ifdef OPENPKG
 10.1127 -+	const char *cp;
 10.1128 -+	cp = rpmExpand("%{?__platform}", NULL);
 10.1129 -+    if (cp == NULL || cp[0] == '\0')
 10.1130 -+	    cp = platform;
 10.1131 -+	if (!rpmPlatform(cp)) {
 10.1132 -+#else
 10.1133 - 	if (!rpmPlatform(platform)) {
 10.1134 -+#endif
 10.1135 - 	    const char * s;
 10.1136 - 	    s = rpmExpand("%{_host_cpu}", NULL);
 10.1137 - 	    if (s) {
 10.1138 -@@ -1079,9 +1104,44 @@
 10.1139 - 	    gotDefaults = 1;
 10.1140 - 	    break;
 10.1141 - 	}
 10.1142 -+#ifdef OPENPKG
 10.1143 -+	rc = uname(&un_real);
 10.1144 -+        strncpy(un.sysname,  un_real.sysname,  sizeof(un.sysname));  un.sysname [sizeof(un.sysname)-1]  = '\0';
 10.1145 -+        strncpy(un.nodename, un_real.nodename, sizeof(un.nodename)); un.nodename[sizeof(un.nodename)-1] = '\0';
 10.1146 -+        strncpy(un.release,  un_real.release,  sizeof(un.release));  un.release [sizeof(un.release)-1]  = '\0';
 10.1147 -+        strncpy(un.version,  un_real.version,  sizeof(un.version));  un.version [sizeof(un.version)-1]  = '\0';
 10.1148 -+        strncpy(un.machine,  un_real.machine,  sizeof(un.machine));  un.machine [sizeof(un.machine)-1]  = '\0';
 10.1149 -+#else
 10.1150 - 	rc = uname(&un);
 10.1151 -+#endif
 10.1152 - 	if (rc < 0) return;
 10.1153 - 
 10.1154 -+#ifdef OPENPKG
 10.1155 -+    {
 10.1156 -+        char *cp;
 10.1157 -+        char *cpR;
 10.1158 -+        int n;
 10.1159 -+        cpR = un.release;
 10.1160 -+        if ((n = strcspn(cpR, "0123456789")) > 0)
 10.1161 -+            cpR += n;
 10.1162 -+        if ((n = strspn(cpR, "0123456789.")) > 0) {
 10.1163 -+            /* terminate after "N.N.N...." prefix */
 10.1164 -+            cpR[n] = '\0';
 10.1165 -+            /* shorten to "N.N" if longer */
 10.1166 -+            if ((cp = strchr(cpR, '.')) != NULL) {
 10.1167 -+                if ((cp = strchr(cp+1, '.')) != NULL)
 10.1168 -+                    *cp = '\0';
 10.1169 -+            }
 10.1170 -+            strcat(un.sysname, cpR);
 10.1171 -+        }
 10.1172 -+        /* fix up machine hardware name containing white-space as it
 10.1173 -+         * happens to be on Power Macs running MacOS X
 10.1174 -+         */
 10.1175 -+        if (!strncmp(un.machine, "Power Macintosh", 15)) {
 10.1176 -+            sprintf(un.machine, "powerpc");
 10.1177 -+        }
 10.1178 -+    }
 10.1179 -+#else /* OPENPKG */
 10.1180 - #if !defined(__linux__)
 10.1181 - #ifdef SNI
 10.1182 - 	/* USUALLY un.sysname on sinix does start with the word "SINIX"
 10.1183 -@@ -1298,6 +1358,7 @@
 10.1184 - 	    }
 10.1185 - 	}
 10.1186 - #	endif
 10.1187 -+#endif /* OPENPKG */
 10.1188 - 
 10.1189 - 	/* the uname() result goes through the arch_canon table */
 10.1190 - 	canon = lookupInCanonTable(un.machine,
 10.1191 -
 10.1192 -+---------------------------------------------------------------------------
 10.1193 -| In verbose file listing output, give the owner and group fields more
 10.1194 -| width and at the same time reduce the nlink and size fields to more
 10.1195 -| typical sizes within OpenPKG.
 10.1196 -+---------------------------------------------------------------------------
 10.1197 -Index: lib/query.c
 10.1198 ---- lib/query.c	4 Jun 2003 18:24:14 -0000	1.1.1.13
 10.1199 -+++ lib/query.c	22 Jan 2004 21:42:24 -0000	1.2
 10.1200 -@@ -33,7 +33,11 @@
 10.1201 - 	/*@modifies *te @*/
 10.1202 - {
 10.1203 -     char sizefield[15];
 10.1204 -+#ifdef OPENPKG
 10.1205 -+    char ownerfield[13+1], groupfield[13+1];
 10.1206 -+#else
 10.1207 -     char ownerfield[8+1], groupfield[8+1];
 10.1208 -+#endif
 10.1209 -     char timefield[100];
 10.1210 -     time_t when = mtime;  /* important if sizeof(int_32) ! sizeof(time_t) */
 10.1211 -     struct tm * tm;
 10.1212 -@@ -58,7 +62,11 @@
 10.1213 -     groupfield[sizeof(groupfield)-1] = '\0';
 10.1214 - 
 10.1215 -     /* this is normally right */
 10.1216 -+#ifdef OPENPKG
 10.1217 -+    sprintf(sizefield, "%8u", size);
 10.1218 -+#else
 10.1219 -     sprintf(sizefield, "%12u", size);
 10.1220 -+#endif
 10.1221 - 
 10.1222 -     /* this knows too much about dev_t */
 10.1223 - 
 10.1224 -@@ -98,7 +106,11 @@
 10.1225 - 	(void)strftime(timefield, sizeof(timefield) - 1, fmt, tm);
 10.1226 -     }
 10.1227 - 
 10.1228 -+#ifdef OPENPKG
 10.1229 -+    sprintf(te, "%s %d %-13s %-13s %8s %s %s", perms,
 10.1230 -+#else
 10.1231 -     sprintf(te, "%s %4d %-8s%-8s %10s %s %s", perms,
 10.1232 -+#endif
 10.1233 - 	(int)nlink, ownerfield, groupfield, sizefield, timefield, namefield);
 10.1234 -     perms = _free(perms);
 10.1235 - }
 10.1236 -
 10.1237 -+---------------------------------------------------------------------------
 10.1238 -| Enable the exlusion of "%doc" files by default.
 10.1239 -| Disable "check-files" feature, because it is useless in OpenPKG
 10.1240 -| (we consistently use BuildRoot and our %files lists are fully
 10.1241 -| autogenerated) and just makes problems on bootstrapping.
 10.1242 -| Provide the possibility to optionally re-enable the old
 10.1243 -| RPM 4.0.2 way of RPM database operation by defining the
 10.1244 -| macro %{_rpmdb_private}. This is important for easily fixing
 10.1245 -| corrupted/hanging RPM database (on upgrades, etc) or if you
 10.1246 -| permanently have to operate RPM on a NFS filesystem where no
 10.1247 -| rpc.lockd(8) support is available.
 10.1248 -| Additionally, do not override the "_host_xx" macros because their
 10.1249 -| value (derived from <prefix>/etc/openpkg/platform) is already
 10.1250 -| correctly set internally.
 10.1251 -| Additionally, provide default macros for the %track and %test
 10.1252 -| section expansion.
 10.1253 -| Finally, provide default for introduced variable
 10.1254 -| %{_force_oldpackage}, which, if non-zero, automatically enforces
 10.1255 -| --oldpackage on all upgrade operations (this is useful on
 10.1256 -| mass-upgrades from OpenPKG-CURRENT to OpenPKG-RELEASE).
 10.1257 -+---------------------------------------------------------------------------
 10.1258 -Index: macros.in
 10.1259 ---- macros.in	2 Jul 2003 19:20:52 -0000	1.1.1.14
 10.1260 -+++ macros.in	30 Jan 2004 17:06:27 -0000	1.3
 10.1261 -@@ -1,7 +1,7 @@
 10.1262 - #/*! \page config_macros Default configuration: @RPMCONFIGDIR@/macros
 10.1263 - # \verbatim
 10.1264 - #
 10.1265 --# $Id: macros.in,v 1.138.2.1 2003/07/02 19:14:06 jbj Exp $
 10.1266 -+# $Id: macros.in,v 1.2 2004/01/22 21:42:09 rse Exp $
 10.1267 - #
 10.1268 - # This is a global RPM configuration file. All changes made here will
 10.1269 - # be lost when the rpm package is upgraded. Any per-system configuration
 10.1270 -@@ -206,7 +206,7 @@
 10.1271 - 
 10.1272 - #	Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
 10.1273 - #	marked as %doc should be installed.
 10.1274 --#%_excludedocs
 10.1275 -+%_excludedocs 1
 10.1276 - 
 10.1277 - #	The port and machine name of a FTP proxy host running TIS firewall.
 10.1278 - #
 10.1279 -@@ -305,7 +305,7 @@
 10.1280 - # Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.
 10.1281 - #
 10.1282 - # Note: Disable (by commenting out) for legacy compatibility.
 10.1283 --%__check_files         @RPMCONFIGDIR@/check-files %{buildroot}
 10.1284 -+#%__check_files         @RPMCONFIGDIR@/check-files %{buildroot}
 10.1285 - 
 10.1286 - #
 10.1287 - # Should unpackaged files in a build root terminate a build?
 10.1288 -@@ -449,7 +449,7 @@
 10.1289 - 
 10.1290 - # Use a CDB database model for concurrent access.
 10.1291 - # XXX Add "private" here for legacy interoperation transiting to glibc+nptl.
 10.1292 --%__dbi_cdb			create cdb mpool mp_mmapsize=16Mb mp_size=1Mb
 10.1293 -+%__dbi_cdb			create cdb mpool mp_mmapsize=16Mb mp_size=1Mb %{?_rpmdb_private:private}
 10.1294 - 
 10.1295 - %__dbi_other			%{?_tmppath:tmpdir=%{_tmppath}} %{?__dbi_cdb}
 10.1296 - 
 10.1297 -@@ -618,6 +618,10 @@
 10.1298 - #	If non-zero, all erasures will be automagically repackaged.
 10.1299 - %_repackage_all_erasures	0
 10.1300 - 
 10.1301 -+#   If non-zero, automatically enforce --oldpackage for all upgrade operations
 10.1302 -+#   (useful on mass-upgrades from OpenPKG-CURRENT to OpenPKG-RELEASE)
 10.1303 -+%_force_oldpackage          0
 10.1304 -+
 10.1305 - #	Verify digest/signature flags for various rpm modes:
 10.1306 - #	     1	--nohdrchk	if set, don't check rpmdb headers
 10.1307 - #
 10.1308 -@@ -870,6 +874,26 @@
 10.1309 - #%{__spec_clean_post}\
 10.1310 - #%{nil}
 10.1311 - 
 10.1312 -+%__spec_track_shell    %{___build_shell}
 10.1313 -+%__spec_track_args     %{___build_args}
 10.1314 -+%__spec_track_cmd      %{___build_cmd}
 10.1315 -+%__spec_track_pre      %{___build_pre}
 10.1316 -+%__spec_track_body     %{___build_body}
 10.1317 -+%__spec_track_post     %{___build_post}
 10.1318 -+%__spec_track_template #!%{__spec_track_shell}\
 10.1319 -+%{__spec_track_pre}\
 10.1320 -+%{nil}
 10.1321 -+
 10.1322 -+%__spec_test_shell    %{___build_shell}
 10.1323 -+%__spec_test_args     %{___build_args}
 10.1324 -+%__spec_test_cmd      %{___build_cmd}
 10.1325 -+%__spec_test_pre      %{___build_pre}
 10.1326 -+%__spec_test_body     %{___build_body}
 10.1327 -+%__spec_test_post     %{___build_post}
 10.1328 -+%__spec_test_template #!%{__spec_test_shell}\
 10.1329 -+%{__spec_test_pre}\
 10.1330 -+%{nil}
 10.1331 -+
 10.1332 - %__spec_rmbuild_shell	%{___build_shell}
 10.1333 - %__spec_rmbuild_args	%{___build_args}
 10.1334 - %__spec_rmbuild_cmd	%{___build_cmd}
 10.1335 -@@ -929,11 +953,11 @@
 10.1336 - %_build_cpu		%{_host_cpu}
 10.1337 - %_build_vendor		%{_host_vendor}
 10.1338 - %_build_os		%{_host_os}
 10.1339 --%_host			@host@
 10.1340 --%_host_alias		@host_alias@%{nil}
 10.1341 --%_host_cpu		@host_cpu@
 10.1342 --%_host_vendor		@host_vendor@
 10.1343 --%_host_os		@host_os@
 10.1344 -+#%_host			@host@
 10.1345 -+#%_host_alias		@host_alias@%{nil}
 10.1346 -+#%_host_cpu		@host_cpu@
 10.1347 -+#%_host_vendor		@host_vendor@
 10.1348 -+#%_host_os		@host_os@
 10.1349 - %_target		%{_host}
 10.1350 - %_target_alias		%{_host_alias}
 10.1351 - %_target_cpu		%{_host_cpu}
 10.1352 -
 10.1353 -+---------------------------------------------------------------------------
 10.1354 -| Adjust path for OpenPKG filesystem layout.
 10.1355 -+---------------------------------------------------------------------------
 10.1356 -Index: scripts/Makefile.am
 10.1357 ---- scripts/Makefile.am	20 Jun 2003 19:04:49 -0000	1.1.1.11
 10.1358 -+++ scripts/Makefile.am	22 Jan 2004 21:42:34 -0000	1.2
 10.1359 -@@ -22,7 +22,7 @@
 10.1360 - 
 10.1361 - all:
 10.1362 - 
 10.1363 --configdir = ${prefix}/lib/rpm
 10.1364 -+configdir = ${prefix}/lib/openpkg
 10.1365 - config_SCRIPTS = \
 10.1366 - 	brp-compress brp-python-bytecompile brp-redhat \
 10.1367 - 	brp-strip brp-strip-comment-note \
 10.1368 -
 10.1369 -+---------------------------------------------------------------------------
 10.1370 -| Adjust path for OpenPKG filesystem layout.
 10.1371 -+---------------------------------------------------------------------------
 10.1372 -Index: scripts/Makefile.in
 10.1373 ---- scripts/Makefile.in	16 Jul 2003 17:05:49 -0000	1.1.1.14
 10.1374 -+++ scripts/Makefile.in	22 Jan 2004 21:42:34 -0000	1.2
 10.1375 -@@ -273,7 +273,7 @@
 10.1376 - 
 10.1377 - installprefix = $(DESTDIR)
 10.1378 - 
 10.1379 --configdir = ${prefix}/lib/rpm
 10.1380 -+configdir = ${prefix}/lib/openpkg
 10.1381 - config_SCRIPTS = \
 10.1382 - 	brp-compress brp-python-bytecompile brp-redhat \
 10.1383 - 	brp-strip brp-strip-comment-note \
 10.1384 -
 10.1385 -+---------------------------------------------------------------------------
 10.1386 -| Use GNU libtool's weaker -static (link with own static libraries)
 10.1387 -| instead of the strong -all-static (link even with static libc, etc),
 10.1388 -| because OpenPKG does not need to be fully static.
 10.1389 -| Additionally, adjust the path to file(1)'s "magic" file.
 10.1390 -+---------------------------------------------------------------------------
 10.1391 -Index: file/Makefile.am
 10.1392 ---- file/Makefile.am	24 Jan 2003 19:41:56 -0000	1.1.1.1
 10.1393 -+++ file/Makefile.am	22 Jan 2004 21:42:21 -0000	1.2
 10.1394 -@@ -36,7 +36,7 @@
 10.1395 - #MAGIC	 = @datadir@/magic
 10.1396 - #data_DATA = magic magic.mime magic.mgc magic.mime.mgc
 10.1397 - 
 10.1398 --pkglibdir =  @prefix@/lib/rpm
 10.1399 -+pkglibdir =  @prefix@/lib/openpkg
 10.1400 - pkglib_DATA = magic magic.mime magic.mgc magic.mime.mgc
 10.1401 - MAGIC	 = $(pkglibdir)/magic
 10.1402 - CPPFLAGS = -DMAGIC='"$(MAGIC)"'
 10.1403 -
 10.1404 -+---------------------------------------------------------------------------
 10.1405 -| Use GNU libtool's weaker -static (link with own static libraries)
 10.1406 -| instead of the strong -all-static (link even with static libc, etc),
 10.1407 -| because OpenPKG does not need to be fully static.
 10.1408 -| Additionally, adjust the path to file(1)'s "magic" file.
 10.1409 -+---------------------------------------------------------------------------
 10.1410 -Index: file/Makefile.in
 10.1411 ---- file/Makefile.in	16 Jul 2003 17:05:23 -0000	1.1.1.2
 10.1412 -+++ file/Makefile.in	22 Jan 2004 21:42:22 -0000	1.2
 10.1413 -@@ -39,7 +39,7 @@
 10.1414 - 
 10.1415 - #MAGIC	 = @datadir@/magic
 10.1416 - #data_DATA = magic magic.mime magic.mgc magic.mime.mgc
 10.1417 --pkglibdir = @prefix@/lib/rpm
 10.1418 -+pkglibdir = @prefix@/lib/openpkg
 10.1419 - ACLOCAL = @ACLOCAL@
 10.1420 - AMDEP_FALSE = @AMDEP_FALSE@
 10.1421 - AMDEP_TRUE = @AMDEP_TRUE@
 10.1422 -@@ -159,7 +159,7 @@
 10.1423 - noinst_PROGRAMS = file
 10.1424 - 
 10.1425 - file_SOURCES = file.c
 10.1426 --file_LDFLAGS = -all-static
 10.1427 -+file_LDFLAGS = -static
 10.1428 - file_LDADD = libfmagic.la
 10.1429 - 
 10.1430 - man_MAGIC = magic.@fsect@
 10.1431 -
 10.1432 -+---------------------------------------------------------------------------
 10.1433 -| Use GNU libtool's weaker -static (link with own static libraries)
 10.1434 -| instead of the strong -all-static (link even with static libc, etc),
 10.1435 -| because OpenPKG does not need to be fully static.
 10.1436 -| Additionally, disable the building of gettext stuff we don't need.
 10.1437 -+---------------------------------------------------------------------------
 10.1438 -Index: popt/Makefile.am
 10.1439 ---- popt/Makefile.am	6 Mar 2003 23:16:43 -0000	1.1.1.9
 10.1440 -+++ popt/Makefile.am	22 Jan 2004 21:42:28 -0000	1.2
 10.1441 -@@ -9,7 +9,7 @@
 10.1442 - 	po/*.in po/*.po po/popt.pot \
 10.1443 - 	popt.ps
 10.1444 - 
 10.1445 --SUBDIRS = intl po
 10.1446 -+SUBDIRS = intl
 10.1447 - 
 10.1448 - INCLUDES = -I. -I$(top_srcdir)
 10.1449 - 
 10.1450 -@@ -17,13 +17,13 @@
 10.1451 - 
 10.1452 - noinst_PROGRAMS = test1 test2 test3
 10.1453 - test1_SOURCES = test1.c
 10.1454 --test1_LDFLAGS = -all-static
 10.1455 -+test1_LDFLAGS = -static
 10.1456 - test1_LDADD = $(usrlib_LTLIBRARIES)
 10.1457 - test2_SOURCES = test2.c
 10.1458 --test2_LDFLAGS = -all-static
 10.1459 -+test2_LDFLAGS = -static
 10.1460 - test2_LDADD = $(usrlib_LTLIBRARIES)
 10.1461 - test3_SOURCES = test3.c
 10.1462 --test3_LDFLAGS = -all-static
 10.1463 -+test3_LDFLAGS = -static
 10.1464 - test3_LDADD = $(usrlib_LTLIBRARIES)
 10.1465 - 
 10.1466 - noinst_SCRIPTS = testit.sh
 10.1467 -
 10.1468 -+---------------------------------------------------------------------------
 10.1469 -| Use GNU libtool's weaker -static (link with own static libraries)
 10.1470 -| instead of the strong -all-static (link even with static libc, etc),
 10.1471 -| because OpenPKG does not need to be fully static.
 10.1472 -| Additionally, disable the building of gettext stuff we don't need.
 10.1473 -+---------------------------------------------------------------------------
 10.1474 -Index: popt/Makefile.in
 10.1475 ---- popt/Makefile.in	16 Jul 2003 17:04:49 -0000	1.1.1.14
 10.1476 -+++ popt/Makefile.in	22 Jan 2004 21:42:28 -0000	1.2
 10.1477 -@@ -163,7 +163,7 @@
 10.1478 - 	popt.ps
 10.1479 - 
 10.1480 - 
 10.1481 --SUBDIRS = intl po
 10.1482 -+SUBDIRS = intl
 10.1483 - 
 10.1484 - INCLUDES = -I. -I$(top_srcdir)
 10.1485 - 
 10.1486 -@@ -171,13 +171,13 @@
 10.1487 - 
 10.1488 - noinst_PROGRAMS = test1 test2 test3
 10.1489 - test1_SOURCES = test1.c
 10.1490 --test1_LDFLAGS = -all-static
 10.1491 -+test1_LDFLAGS = -static
 10.1492 - test1_LDADD = $(usrlib_LTLIBRARIES)
 10.1493 - test2_SOURCES = test2.c
 10.1494 --test2_LDFLAGS = -all-static
 10.1495 -+test2_LDFLAGS = -static
 10.1496 - test2_LDADD = $(usrlib_LTLIBRARIES)
 10.1497 - test3_SOURCES = test3.c
 10.1498 --test3_LDFLAGS = -all-static
 10.1499 -+test3_LDFLAGS = -static
 10.1500 - test3_LDADD = $(usrlib_LTLIBRARIES)
 10.1501 - 
 10.1502 - noinst_SCRIPTS = testit.sh
 10.1503 -
 10.1504 -+---------------------------------------------------------------------------
 10.1505 -| Revert back to the old behaviour of passing to "exec" programs an
 10.1506 -| extra "--" argument to separate options and arguments. Additionally,
 10.1507 -| allow the "!#:+" constructs to be used multiple times and then each
 10.1508 -| time eat another argument (instead of just eating an argument once
 10.1509 -| and expanding this multiple times).
 10.1510 -+---------------------------------------------------------------------------
 10.1511 -Index: popt/popt.c
 10.1512 ---- popt/popt.c	22 Aug 2002 14:17:44 -0000	1.1.1.12
 10.1513 -+++ popt/popt.c	22 Jan 2004 21:42:28 -0000	1.2
 10.1514 -@@ -400,9 +400,7 @@
 10.1515 -     }
 10.1516 - 
 10.1517 -     if (con->leftovers != NULL && con->numLeftovers > 0) {
 10.1518 --#if 0
 10.1519 - 	argv[argc++] = "--";
 10.1520 --#endif
 10.1521 - 	memcpy(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers);
 10.1522 - 	argc += con->numLeftovers;
 10.1523 -     }
 10.1524 -@@ -580,10 +578,8 @@
 10.1525 - 	    if (!(s[0] == '#' && s[1] == ':' && s[2] == '+'))
 10.1526 - 		/*@switchbreak@*/ break;
 10.1527 - 	    /* XXX Make sure that findNextArg deletes only next arg. */
 10.1528 --	    if (a == NULL) {
 10.1529 - 		if ((a = findNextArg(con, 1, 1)) == NULL)
 10.1530 - 		    /*@switchbreak@*/ break;
 10.1531 --	    }
 10.1532 - 	    s += 3;
 10.1533 - 
 10.1534 - 	    alen = strlen(a);
 10.1535 -
 10.1536 -+---------------------------------------------------------------------------
 10.1537 -| Dedefine the stdio variable BUFSIZ because it is usually just 1024
 10.1538 -| on some platforms (on Linux it is 8192) and unfortunately RPM uses
 10.1539 -| it here for the macro expansion buffer. For OpenPKG the size 1024 is
 10.1540 -| definetely too small. So increase this to a 16KB buffer.
 10.1541 -+---------------------------------------------------------------------------
 10.1542 -Index: rpmio/macro.c
 10.1543 ---- rpmio/macro.c	15 May 2003 13:42:01 -0000	1.1.1.7
 10.1544 -+++ rpmio/macro.c	22 Jan 2004 21:42:32 -0000	1.2
 10.1545 -@@ -50,6 +50,9 @@
 10.1546 - 
 10.1547 - #include "debug.h"
 10.1548 - 
 10.1549 -+#undef  BUFSIZ
 10.1550 -+#define BUFSIZ 16384
 10.1551 -+
 10.1552 - #if defined(__LCLINT__)
 10.1553 - /*@-exportheader@*/
 10.1554 - extern const unsigned short int **__ctype_b_loc (void) /*@*/;
 10.1555 -
 10.1556 -+---------------------------------------------------------------------------
 10.1557 -| Remove "unzip" support, because in OpenPKG there are less than
 10.1558 -| a dozend packages requiring unpacking of .zip files. For these
 10.1559 -| it is fully sufficient to explicitly require the "infozip"
 10.1560 -| package (containing "unzip") and leaving the less portable
 10.1561 -| "unzip" out of the bootstrap package.
 10.1562 -+---------------------------------------------------------------------------
 10.1563 -Index: rpmio/macro.c
 10.1564 ---- rpmio/macro.c	15 May 2003 13:42:01 -0000	1.1.1.7
 10.1565 -+++ rpmio/macro.c	22 Jan 2004 21:42:32 -0000	1.2
 10.1566 -@@ -1119,9 +1119,11 @@
 10.1567 - 	case 2:	/* COMPRESSED_BZIP2 */
 10.1568 - 	    sprintf(be, "%%_bzip2 %s", b);
 10.1569 - 	    break;
 10.1570 -+#if 0
 10.1571 - 	case 3:	/* COMPRESSED_ZIP */
 10.1572 - 	    sprintf(be, "%%_unzip %s", b);
 10.1573 - 	    break;
 10.1574 -+#endif
 10.1575 - 	}
 10.1576 - 	b = be;
 10.1577 -     } else if (STREQ("S", f, fn)) {
 10.1578 -@@ -1723,9 +1725,11 @@
 10.1579 - 
 10.1580 -     if ((magic[0] == 'B') && (magic[1] == 'Z')) {
 10.1581 - 	*compressed = COMPRESSED_BZIP2;
 10.1582 -+#if 0
 10.1583 -     } else if ((magic[0] == 0120) && (magic[1] == 0113) &&
 10.1584 - 	 (magic[2] == 0003) && (magic[3] == 0004)) {	/* pkzip */
 10.1585 - 	*compressed = COMPRESSED_ZIP;
 10.1586 -+#endif
 10.1587 -     } else if (((magic[0] == 0037) && (magic[1] == 0213)) || /* gzip */
 10.1588 - 	((magic[0] == 0037) && (magic[1] == 0236)) ||	/* old gzip */
 10.1589 - 	((magic[0] == 0037) && (magic[1] == 0036)) ||	/* pack */
 10.1590 -
 10.1591 -+---------------------------------------------------------------------------
 10.1592 -| Make sure that an %{error:<msg>} macro really stops further
 10.1593 -| processing. Else it would be nothing more than a %{warn:<msg>}.
 10.1594 -+---------------------------------------------------------------------------
 10.1595 -Index: rpmio/macro.c
 10.1596 ---- rpmio/macro.c	15 May 2003 13:42:01 -0000	1.1.1.7
 10.1597 -+++ rpmio/macro.c	22 Jan 2004 21:42:32 -0000	1.2
 10.1598 -@@ -1337,7 +1337,7 @@
 10.1599 - 	    STREQ("error", f, fn)) {
 10.1600 - 		int waserror = 0;
 10.1601 - 		if (STREQ("error", f, fn))
 10.1602 --			waserror = 1;
 10.1603 -+			waserror = 1, rc = 1;
 10.1604 - 		if (g < ge)
 10.1605 - 			doOutput(mb, waserror, g, gn);
 10.1606 - 		else
 10.1607 -
 10.1608 -+---------------------------------------------------------------------------
 10.1609 -| Reactivate build mode aliases which were removed in rpm-4.1 
 10.1610 -| (and now should be available through "rpmbuild" only).
 10.1611 -+---------------------------------------------------------------------------
 10.1612 -Index: rpmpopt.in
 10.1613 ---- rpmpopt.in	24 Jan 2003 14:56:30 -0000	1.1.1.7
 10.1614 -+++ rpmpopt.in	22 Jan 2004 21:42:11 -0000	1.2
 10.1615 -@@ -147,28 +147,28 @@
 10.1616 - # Popt glue to preserve legacy CLI behavior.
 10.1617 - #
 10.1618 - # XXX popt exec parsing doesn't honor POPT_ARGFLAG_ONEDASH
 10.1619 --# XXX Build mode aliases, removed in rpm-4.1.
 10.1620 --#rpm	exec --bp		rpmb -bp
 10.1621 --#rpm	exec --bc		rpmb -bc
 10.1622 --#rpm	exec --bi		rpmb -bi
 10.1623 --#rpm	exec --bl		rpmb -bl
 10.1624 --#rpm	exec --ba		rpmb -ba
 10.1625 --#rpm	exec --bb		rpmb -bb
 10.1626 --#rpm	exec --bs		rpmb -bs
 10.1627 --#rpm	exec --tp		rpmb -tp
 10.1628 --#rpm	exec --tc		rpmb -tc
 10.1629 --#rpm	exec --ti		rpmb -ti
 10.1630 --#rpm	exec --tl		rpmb -tl
 10.1631 --#rpm	exec --ta		rpmb -ta
 10.1632 --#rpm	exec --tb		rpmb -tb
 10.1633 --#rpm	exec --ts		rpmb -ts
 10.1634 --#rpm	exec --rebuild		rpmb --rebuild
 10.1635 --#rpm	exec --recompile	rpmb --recompile
 10.1636 --#rpm	exec --clean		rpmb --clean
 10.1637 --#rpm	exec --rmsource		rpmb --rmsource
 10.1638 --#rpm	exec --rmspec		rpmb --rmspec
 10.1639 --#rpm	exec --target		rpmb --target
 10.1640 --#rpm	exec --short-circuit	rpmb --short-circuit
 10.1641 -+rpm	exec --bp		rpmb -bp
 10.1642 -+rpm	exec --bc		rpmb -bc
 10.1643 -+rpm	exec --bi		rpmb -bi
 10.1644 -+rpm	exec --bl		rpmb -bl
 10.1645 -+rpm	exec --ba		rpmb -ba
 10.1646 -+rpm	exec --bb		rpmb -bb
 10.1647 -+rpm	exec --bs		rpmb -bs
 10.1648 -+rpm	exec --bt		rpmb -bt
 10.1649 -+rpm	exec --tp		rpmb -tp
 10.1650 -+rpm	exec --tc		rpmb -tc
 10.1651 -+rpm	exec --ti		rpmb -ti
 10.1652 -+rpm	exec --tl		rpmb -tl
 10.1653 -+rpm	exec --ta		rpmb -ta
 10.1654 -+rpm	exec --tb		rpmb -tb
 10.1655 -+rpm	exec --ts		rpmb -ts
 10.1656 -+rpm	exec --rebuild		rpmb --rebuild
 10.1657 -+rpm	exec --recompile	rpmb --recompile
 10.1658 -+rpm	exec --clean		rpmb --clean
 10.1659 -+rpm	exec --rmsource		rpmb --rmsource
 10.1660 -+rpm	exec --rmspec		rpmb --rmspec
 10.1661 -+rpm	exec --target		rpmb --target
 10.1662 -+rpm	exec --short-circuit	rpmb --short-circuit
 10.1663 - 
 10.1664 - rpm	exec --initdb		rpmd --initdb
 10.1665 - rpm	exec --rebuilddb	rpmd --rebuilddb
 10.1666 -
 10.1667 -+---------------------------------------------------------------------------
 10.1668 -| Allow "-bb --short-circuit" for continuing building a binary package
 10.1669 -| after the %install step (usually previously fixed and repeated with
 10.1670 -| "-bi --short-circuit".
 10.1671 -+---------------------------------------------------------------------------
 10.1672 -Index: rpmqv.c
 10.1673 ---- rpmqv.c	4 Mar 2003 15:32:57 -0000	1.1.1.8
 10.1674 -+++ rpmqv.c	6 Feb 2004 15:37:56 -0000	1.4
 10.1675 -@@ -682,6 +682,10 @@
 10.1676 - 	case 'b':
 10.1677 - 	    ba->buildAmount |= RPMBUILD_PACKAGEBINARY;
 10.1678 - 	    ba->buildAmount |= RPMBUILD_CLEAN;
 10.1679 -+#ifdef OPENPKG
 10.1680 -+	    if ((ba->buildChar == 'b') && ba->shortCircuit)
 10.1681 -+		/*@innerbreak@*/ break;
 10.1682 -+#endif
 10.1683 - 	    /*@fallthrough@*/
 10.1684 - 	case 'i':
 10.1685 - 	    ba->buildAmount |= RPMBUILD_INSTALL;
 10.1686 -
 10.1687 -+---------------------------------------------------------------------------
 10.1688 -| Because permissions and ownership on Berkeley-DB region files
 10.1689 -| __db.XXX have to be already fixed in advance and those files cannot
 10.1690 -| be created in advance on the command line with some reasonable
 10.1691 -| default (as it is the case for the other files which are created
 10.1692 -| with [rpm]db_load), so force Berkeley-DB to accept zero-sized files
 10.1693 -| and create them (instead of thinking another process is currently
 10.1694 -| creating them).
 10.1695 -+---------------------------------------------------------------------------
 10.1696 -Index: db/env/env_region.c
 10.1697 ---- db/env/env_region.c	18 Jan 2003 14:05:01 -0000	1.1.1.5
 10.1698 -+++ db/env/env_region.c	22 Jan 2004 21:42:17 -0000	1.2
 10.1699 -@@ -184,6 +184,24 @@
 10.1700 - 	}
 10.1701 - 
 10.1702 - 	/*
 10.1703 -+	 * OpenPKG hack: because permissions and ownership on Berkeley-DB
 10.1704 -+	 * region files __db.XXX have to be already fixed in advance and
 10.1705 -+	 * those files cannot be created in advance on the command line
 10.1706 -+	 * with some reasonable default (as it is the case for the other
 10.1707 -+	 * files which are created with [rpm]db_load), so force Berkeley-DB
 10.1708 -+	 * to accept zero-sized files and create them (instead of thinking
 10.1709 -+	 * another process is currently creating them).
 10.1710 -+	 */
 10.1711 -+	if (mbytes == 0 && bytes == 0) {
 10.1712 -+		if (F_ISSET(dbenv, DB_ENV_CREATE))
 10.1713 -+			goto creation;
 10.1714 -+		else {
 10.1715 -+			ret = ENOENT;
 10.1716 -+			goto err;
 10.1717 -+		}
 10.1718 -+	}
 10.1719 -+
 10.1720 -+	/*
 10.1721 - 	 * !!!
 10.1722 - 	 * A size_t is OK -- regions get mapped into memory, and so can't
 10.1723 - 	 * be larger than a size_t.
 10.1724 -
 10.1725 -+---------------------------------------------------------------------------
 10.1726 -| Make sure RPM passes DB_CREATE to Berkeley-DB also if file exists,
 10.1727 -| but is (still) zero-sized.
 10.1728 -+---------------------------------------------------------------------------
 10.1729 -Index: rpmdb/db3.c
 10.1730 ---- rpmdb/db3.c	3 Mar 2003 16:18:29 -0000	1.1.1.5
 10.1731 -+++ rpmdb/db3.c	22 Jan 2004 21:42:29 -0000	1.2
 10.1732 -@@ -1019,9 +1019,13 @@
 10.1733 - 	} else {	/* dbhome is writable, check for persistent dbenv. */
 10.1734 - 	    /*@-mods@*/
 10.1735 - 	    const char * dbf = rpmGetPath(dbhome, "/__db.001", NULL);
 10.1736 -+            struct stat sb;
 10.1737 -+            long size = -1;
 10.1738 - 	    /*@=mods@*/
 10.1739 - 
 10.1740 --	    if (access(dbf, F_OK) == -1) {
 10.1741 -+            if (stat(dbf, &sb) == 0)
 10.1742 -+                size = (long)sb.st_size;
 10.1743 -+	    if (access(dbf, F_OK) == -1 || size == 0) {
 10.1744 - 		/* ... non-existent (or unwritable) DBENV, will create ... */
 10.1745 - 		dbi->dbi_oeflags |= DB_CREATE;
 10.1746 - 		dbi->dbi_eflags &= ~DB_JOINENV;
 10.1747 -
 10.1748 -+---------------------------------------------------------------------------
 10.1749 -| Add internal feature variable %{_force_oldpackage} which, if
 10.1750 -| non-zero, automatically enforces --oldpackage on all upgrade
 10.1751 -| operations (this is useful on mass-upgrades from OpenPKG-CURRENT to
 10.1752 -| OpenPKG-RELEASE).
 10.1753 -+---------------------------------------------------------------------------
 10.1754 -Index: rpm.c
 10.1755 ---- rpm.c	16 May 2002 16:55:25 -0000	1.1.1.23
 10.1756 -+++ rpm.c	22 Jan 2004 21:42:10 -0000	1.2
 10.1757 -@@ -1016,6 +1016,10 @@
 10.1758 - 
 10.1759 -     if (oldPackage && !upgrade)
 10.1760 - 	argerror(_("--oldpackage may only be used during upgrades"));
 10.1761 -+#ifdef OPENPKG
 10.1762 -+    if (upgrade && rpmExpandNumeric("%{?_force_oldpackage}"))
 10.1763 -+        probFilter |= RPMPROB_FILTER_OLDPACKAGE;
 10.1764 -+#endif
 10.1765 - 
 10.1766 -     if (noPgp && bigMode != MODE_CHECKSIG)
 10.1767 - 	argerror(_("--nopgp may only be used during signature checking"));
 10.1768 -
 10.1769 -+---------------------------------------------------------------------------
 10.1770 -| Add OpenPKG branding to make sure people do not intermix
 10.1771 -| this RPM version with the stock RPM version.
 10.1772 -+---------------------------------------------------------------------------
 10.1773 -Index: lib/poptALL.c
 10.1774 ---- lib/poptALL.c	25 Jun 2003 19:10:01 -0000	1.1.1.3
 10.1775 -+++ lib/poptALL.c	22 Jan 2004 21:42:23 -0000	1.2
 10.1776 -@@ -102,7 +102,7 @@
 10.1777 - 	/*@globals rpmEVR, fileSystem @*/
 10.1778 - 	/*@modifies *fp, fileSystem @*/
 10.1779 - {
 10.1780 --    fprintf(fp, _("RPM version %s\n"), rpmEVR);
 10.1781 -+    fprintf(fp, _("OpenPKG RPM %s\n"), rpmEVR);
 10.1782 - }
 10.1783 - 
 10.1784 - /**
 10.1785 -
 10.1786 -+---------------------------------------------------------------------------
 10.1787 -| Add OpenPKG branding to make sure people do not intermix
 10.1788 -| this RPM version with the stock RPM version.
 10.1789 -+---------------------------------------------------------------------------
 10.1790 -Index: rpm.c
 10.1791 ---- rpm.c	16 May 2002 16:55:25 -0000	1.1.1.23
 10.1792 -+++ rpm.c	22 Jan 2004 21:42:10 -0000	1.2
 10.1793 -@@ -235,7 +235,7 @@
 10.1794 - static void printHelpLine(char * prefix, char * help);
 10.1795 - 
 10.1796 - static void printVersion(void) {
 10.1797 --    fprintf(stdout, _("RPM version %s\n"), rpmEVR);
 10.1798 -+    fprintf(stdout, _("OpenPKG RPM %s\n"), rpmEVR);
 10.1799 - }
 10.1800 - 
 10.1801 - static void printBanner(void) {
 10.1802 -
 10.1803 -+---------------------------------------------------------------------------
 10.1804 -| Add OpenPKG branding to make sure people do not intermix
 10.1805 -| this RPM version with the stock RPM version.
 10.1806 -+---------------------------------------------------------------------------
 10.1807 -Index: rpmqv.c
 10.1808 ---- rpmqv.c	4 Mar 2003 15:32:57 -0000	1.1.1.8
 10.1809 -+++ rpmqv.c	6 Feb 2004 15:37:56 -0000	1.4
 10.1810 -@@ -126,7 +126,7 @@
 10.1811 - 	/*@globals rpmEVR, fileSystem @*/
 10.1812 - 	/*@modifies *fp, fileSystem @*/
 10.1813 - {
 10.1814 --    fprintf(fp, _("RPM version %s\n"), rpmEVR);
 10.1815 -+    fprintf(fp, _("OpenPKG RPM %s\n"), rpmEVR);
 10.1816 - }
 10.1817 - 
 10.1818 - static void printBanner(FILE * fp)
 10.1819 -
 10.1820 -+---------------------------------------------------------------------------
 10.1821 -| Add support for the OpenPKG custom .spec file sections %track
 10.1822 -| (package build-time feature for performing vendor source tracking)
 10.1823 -| and %test (package install-time feature for performing package
 10.1824 -| run-time tests).
 10.1825 -+---------------------------------------------------------------------------
 10.1826 -Index: rpmqv.c
 10.1827 ---- rpmqv.c	4 Mar 2003 15:32:57 -0000	1.1.1.8
 10.1828 -+++ rpmqv.c	6 Feb 2004 15:37:56 -0000	1.4
 10.1829 -@@ -707,7 +707,19 @@
 10.1830 - 	    /*@innerbreak@*/ break;
 10.1831 - 	case 's':
 10.1832 - 	    ba->buildAmount |= RPMBUILD_PACKAGESOURCE;
 10.1833 -+	    /* enforce no dependency checking */
 10.1834 -+	    ba->noDeps = 1;
 10.1835 - 	    /*@innerbreak@*/ break;
 10.1836 -+#ifdef OPENPKG
 10.1837 -+	case 't':
 10.1838 -+	    ba->buildAmount |= RPMBUILD_TRACK;
 10.1839 -+	    /* enforce no dependency checking and expansion of %setup, %patch and %prep macros */
 10.1840 -+	    ba->noDeps = 1;
 10.1841 -+	    rpmDefineMacro(NULL, "setup #", RMIL_CMDLINE);
 10.1842 -+	    rpmDefineMacro(NULL, "patch #", RMIL_CMDLINE);
 10.1843 -+	    rpmDefineMacro(NULL, "prep %%prep", RMIL_CMDLINE);
 10.1844 -+	    /*@innerbreak@*/ break;
 10.1845 -+#endif
 10.1846 - 	}
 10.1847 - 
 10.1848 - 	if (!poptPeekArg(optCon)) {
 10.1849 -
 10.1850 -+---------------------------------------------------------------------------
 10.1851 -| Add support for the OpenPKG custom .spec file sections %track
 10.1852 -| (package build-time feature for performing vendor source tracking)
 10.1853 -| and %test (package install-time feature for performing package
 10.1854 -| run-time tests).
 10.1855 -+---------------------------------------------------------------------------
 10.1856 -Index: build/pack.c
 10.1857 ---- build/pack.c	4 Mar 2003 17:03:17 -0000	1.1.1.20
 10.1858 -+++ build/pack.c	30 Jan 2004 17:06:29 -0000	1.2
 10.1859 -@@ -252,6 +252,15 @@
 10.1860 - 	    return RPMERR_BADFILENAME;
 10.1861 - 	}
 10.1862 -     }
 10.1863 -+#ifdef OPENPKG
 10.1864 -+    if (pkg->testFile) {
 10.1865 -+	if (addFileToTag(spec, pkg->testFile, pkg->header, RPMTAG_TEST)) {
 10.1866 -+	    rpmError(RPMERR_BADFILENAME,
 10.1867 -+		     _("Could not open Test file: %s\n"), pkg->testFile);
 10.1868 -+	    return RPMERR_BADFILENAME;
 10.1869 -+	}
 10.1870 -+    }
 10.1871 -+#endif
 10.1872 - 
 10.1873 -     for (p = pkg->triggerFiles; p != NULL; p = p->next) {
 10.1874 - 	(void) headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTPROG,
 10.1875 -
 10.1876 -+---------------------------------------------------------------------------
 10.1877 -| Add support for the OpenPKG custom .spec file sections %track
 10.1878 -| (package build-time feature for performing vendor source tracking)
 10.1879 -| and %test (package install-time feature for performing package
 10.1880 -| run-time tests).
 10.1881 -+---------------------------------------------------------------------------
 10.1882 -Index: build/parseBuildInstallClean.c
 10.1883 ---- build/parseBuildInstallClean.c	3 Mar 2003 20:43:30 -0000	1.1.1.9
 10.1884 -+++ build/parseBuildInstallClean.c	30 Jan 2004 17:06:29 -0000	1.2
 10.1885 -@@ -29,6 +29,11 @@
 10.1886 -     } else if (parsePart == PART_CLEAN) {
 10.1887 - 	sbp = &(spec->clean);
 10.1888 - 	name = "%clean";
 10.1889 -+#ifdef OPENPKG
 10.1890 -+    } else if (parsePart == PART_TRACK) {
 10.1891 -+	sbp = &(spec->track);
 10.1892 -+	name = "%track";
 10.1893 -+#endif
 10.1894 -     }
 10.1895 -     /*@=branchstate@*/
 10.1896 -     
 10.1897 -
 10.1898 -+---------------------------------------------------------------------------
 10.1899 -| Add support for the OpenPKG custom .spec file sections %track
 10.1900 -| (package build-time feature for performing vendor source tracking)
 10.1901 -| and %test (package install-time feature for performing package
 10.1902 -| run-time tests).
 10.1903 -+---------------------------------------------------------------------------
 10.1904 -Index: build/parseScript.c
 10.1905 ---- build/parseScript.c	23 Jun 2002 19:47:12 -0000	1.1.1.12
 10.1906 -+++ build/parseScript.c	30 Jan 2004 17:06:29 -0000	1.3
 10.1907 -@@ -156,6 +156,14 @@
 10.1908 - 	progtag = RPMTAG_TRIGGERSCRIPTPROG;
 10.1909 - 	partname = "%triggerpostun";
 10.1910 - 	break;
 10.1911 -+#ifdef OPENPKG
 10.1912 -+      case PART_TEST:
 10.1913 -+	tag = RPMTAG_TEST;
 10.1914 -+	tagflags = RPMSENSE_SCRIPT_TEST;
 10.1915 -+	progtag = RPMTAG_TESTPROG;
 10.1916 -+	partname = "%test";
 10.1917 -+	break;
 10.1918 -+#endif
 10.1919 -     }
 10.1920 -     /*@=branchstate@*/
 10.1921 - 
 10.1922 -@@ -304,6 +313,11 @@
 10.1923 - 	      case PART_VERIFYSCRIPT:
 10.1924 - 		pkg->verifyFile = xstrdup(file);
 10.1925 - 		break;
 10.1926 -+#ifdef OPENPKG
 10.1927 -+	      case PART_TEST:
 10.1928 -+		pkg->testFile = xstrdup(file);
 10.1929 -+		break;
 10.1930 -+#endif
 10.1931 - 	    }
 10.1932 - 	}
 10.1933 -     }
 10.1934 -
 10.1935 -+---------------------------------------------------------------------------
 10.1936 -| Add support for the OpenPKG custom .spec file sections %track
 10.1937 -| (package build-time feature for performing vendor source tracking)
 10.1938 -| and %test (package install-time feature for performing package
 10.1939 -| run-time tests).
 10.1940 -|
 10.1941 -| MSvB: Additionally provide a default %clean section, removing buildroot.
 10.1942 -+---------------------------------------------------------------------------
 10.1943 -Index: build/parseSpec.c
 10.1944 ---- build/parseSpec.c	15 May 2003 13:38:57 -0000	1.1.1.15
 10.1945 -+++ build/parseSpec.c	30 Jan 2004 17:06:30 -0000	1.2
 10.1946 -@@ -43,6 +43,10 @@
 10.1947 -     { PART_TRIGGERIN,     0, "%triggerin"},
 10.1948 -     { PART_TRIGGERIN,     0, "%trigger"},
 10.1949 -     { PART_VERIFYSCRIPT,  0, "%verifyscript"},
 10.1950 -+#ifdef OPENPKG
 10.1951 -+    { PART_TRACK,         0, "%track"},
 10.1952 -+    { PART_TEST,          0, "%test"},
 10.1953 -+#endif
 10.1954 -     {0, 0, 0}
 10.1955 - };
 10.1956 - 
 10.1957 -@@ -489,6 +493,15 @@
 10.1958 - 	    parsePart = parseFiles(spec);
 10.1959 - 	    /*@switchbreak@*/ break;
 10.1960 - 
 10.1961 -+#ifdef OPENPKG
 10.1962 -+	case PART_TRACK:
 10.1963 -+	    parsePart = parseBuildInstallClean(spec, parsePart);
 10.1964 -+	    /*@switchbreak@*/ break;
 10.1965 -+	case PART_TEST:
 10.1966 -+	    parsePart = parseScript(spec, parsePart);
 10.1967 -+	    /*@switchbreak@*/ break;
 10.1968 -+#endif
 10.1969 -+
 10.1970 - 	case PART_NONE:		/* XXX avoid gcc whining */
 10.1971 - 	case PART_LAST:
 10.1972 - 	case PART_BUILDARCHITECTURES:
 10.1973 -@@ -576,6 +589,13 @@
 10.1974 -     }
 10.1975 -     /*@=infloops@*/	/* LCL: parsePart is modified @*/
 10.1976 - 
 10.1977 -+    if (spec->clean == NULL) {
 10.1978 -+       char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL);
 10.1979 -+       spec->clean = newStringBuf();
 10.1980 -+       appendLineStringBuf(spec->clean, body);
 10.1981 -+       free(body);
 10.1982 -+    }
 10.1983 -+
 10.1984 -     /* Check for description in each package and add arch and os */
 10.1985 -   {
 10.1986 - #ifdef	DYING
 10.1987 -
 10.1988 -+---------------------------------------------------------------------------
 10.1989 -| Add support for the OpenPKG custom .spec file sections %track
 10.1990 -| (package build-time feature for performing vendor source tracking)
 10.1991 -| and %test (package install-time feature for performing package
 10.1992 -| run-time tests).
 10.1993 -+---------------------------------------------------------------------------
 10.1994 -Index: build/poptBT.c
 10.1995 ---- build/poptBT.c	3 Mar 2003 20:04:12 -0000	1.1.1.3
 10.1996 -+++ build/poptBT.c	30 Jan 2004 17:06:30 -0000	1.2
 10.1997 -@@ -35,6 +35,9 @@
 10.1998 - #define	POPT_BL			0x626c
 10.1999 - #define	POPT_BP			0x6270
 10.2000 - #define	POPT_BS			0x6273
 10.2001 -+#ifdef OPENPKG
 10.2002 -+#define	POPT_BT			0x6274
 10.2003 -+#endif
 10.2004 - #define	POPT_TA			0x7461
 10.2005 - #define	POPT_TB			0x7462
 10.2006 - #define	POPT_TC			0x7463
 10.2007 -@@ -82,6 +85,9 @@
 10.2008 -     case POPT_BL:
 10.2009 -     case POPT_BP:
 10.2010 -     case POPT_BS:
 10.2011 -+#ifdef OPENPKG
 10.2012 -+    case POPT_BT:
 10.2013 -+#endif
 10.2014 -     case POPT_TA:
 10.2015 -     case POPT_TB:
 10.2016 -     case POPT_TC:
 10.2017 -@@ -177,6 +183,11 @@
 10.2018 -  { "bs", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BS,
 10.2019 - 	N_("build source package only from <specfile>"),
 10.2020 - 	N_("<specfile>") },
 10.2021 -+#ifdef OPENPKG
 10.2022 -+ { "bt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT,
 10.2023 -+	N_("track versions of sources from <specfile>"),
 10.2024 -+	N_("<specfile>") },
 10.2025 -+#endif
 10.2026 - 
 10.2027 -  { "tp", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_TP,
 10.2028 - 	N_("build through %prep (unpack sources and apply patches) from <tarball>"),
 10.2029 -
 10.2030 -+---------------------------------------------------------------------------
 10.2031 -| Add support for the OpenPKG custom .spec file sections %track
 10.2032 -| (package build-time feature for performing vendor source tracking)
 10.2033 -| and %test (package install-time feature for performing package
 10.2034 -| run-time tests).
 10.2035 -+---------------------------------------------------------------------------
 10.2036 -Index: build/rpmbuild.h
 10.2037 ---- build/rpmbuild.h	4 Mar 2003 17:03:07 -0000	1.1.1.13
 10.2038 -+++ build/rpmbuild.h	30 Jan 2004 17:06:30 -0000	1.2
 10.2039 -@@ -34,6 +34,9 @@
 10.2040 -     RPMBUILD_RMSOURCE	= (1 <<  8),	/*!< Remove source(s) and patch(s). */
 10.2041 -     RPMBUILD_RMBUILD	= (1 <<  9),	/*!< Remove build sub-tree. */
 10.2042 -     RPMBUILD_STRINGBUF	= (1 << 10),	/*!< only for doScript() */
 10.2043 -+#ifdef OPENPKG
 10.2044 -+    RPMBUILD_TRACK	= (1 << 12),	/*!< Execute %%track. */
 10.2045 -+#endif
 10.2046 -     RPMBUILD_RMSPEC	= (1 << 11)	/*!< Remove spec file. */
 10.2047 - } rpmBuildFlags;
 10.2048 - /*@=typeuse@*/
 10.2049 -@@ -69,7 +72,13 @@
 10.2050 -     PART_VERIFYSCRIPT	= 16,	/*!< */
 10.2051 -     PART_BUILDARCHITECTURES= 17,/*!< */
 10.2052 -     PART_TRIGGERPOSTUN	= 18,	/*!< */
 10.2053 -+#ifdef OPENPKG
 10.2054 -+    PART_TRACK	        = 19,	/*!< */
 10.2055 -+    PART_TEST	        = 20,	/*!< */
 10.2056 -+    PART_LAST		= 21	/*!< */
 10.2057 -+#else
 10.2058 -     PART_LAST		= 19	/*!< */
 10.2059 -+#endif
 10.2060 - } rpmParseState;
 10.2061 - 
 10.2062 - #define STRIP_NOTHING             0
 10.2063 -
 10.2064 -+---------------------------------------------------------------------------
 10.2065 -| Add support for the OpenPKG custom .spec file sections %track
 10.2066 -| (package build-time feature for performing vendor source tracking)
 10.2067 -| and %test (package install-time feature for performing package
 10.2068 -| run-time tests).
 10.2069 -+---------------------------------------------------------------------------
 10.2070 -Index: build/rpmspec.h
 10.2071 ---- build/rpmspec.h	4 Mar 2003 15:30:23 -0000	1.1.1.11
 10.2072 -+++ build/rpmspec.h	30 Jan 2004 17:06:30 -0000	1.2
 10.2073 -@@ -164,6 +164,10 @@
 10.2074 -     StringBuf check;		/*!< %check scriptlet. */
 10.2075 - /*@only@*/
 10.2076 -     StringBuf clean;		/*!< %clean scriptlet. */
 10.2077 -+#ifdef OPENPKG
 10.2078 -+/*@only@*/
 10.2079 -+    StringBuf track;		/*!< %track scriptlet. */
 10.2080 -+#endif
 10.2081 - 
 10.2082 - /*@owned@*/
 10.2083 -     Package packages;		/*!< Package list. */
 10.2084 -@@ -196,6 +200,10 @@
 10.2085 -     const char * postUnFile;	/*!< %postun scriptlet. */
 10.2086 - /*@only@*/
 10.2087 -     const char * verifyFile;	/*!< %verifyscript scriptlet. */
 10.2088 -+#ifdef OPENPKG
 10.2089 -+/*@only@*/
 10.2090 -+    const char * testFile;	/*!< %test scriptlet. */
 10.2091 -+#endif
 10.2092 - 
 10.2093 - /*@only@*/
 10.2094 -     StringBuf specialDoc;
 10.2095 -
 10.2096 -+---------------------------------------------------------------------------
 10.2097 -| Add support for the OpenPKG custom .spec file sections %track
 10.2098 -| (package build-time feature for performing vendor source tracking)
 10.2099 -| and %test (package install-time feature for performing package
 10.2100 -| run-time tests).
 10.2101 -+---------------------------------------------------------------------------
 10.2102 -Index: build/spec.c
 10.2103 ---- build/spec.c	4 Mar 2003 15:25:51 -0000	1.1.1.21
 10.2104 -+++ build/spec.c	30 Jan 2004 17:06:31 -0000	1.3
 10.2105 -@@ -138,6 +138,9 @@
 10.2106 -     p->preUnFile = NULL;
 10.2107 -     p->postUnFile = NULL;
 10.2108 -     p->verifyFile = NULL;
 10.2109 -+#ifdef OPENPKG
 10.2110 -+    p->testFile = NULL;
 10.2111 -+#endif
 10.2112 - 
 10.2113 -     p->specialDoc = NULL;
 10.2114 - 
 10.2115 -@@ -452,6 +463,9 @@
 10.2116 -     spec->install = NULL;
 10.2117 -     spec->check = NULL;
 10.2118 -     spec->clean = NULL;
 10.2119 -+#ifdef OPENPKG
 10.2120 -+    spec->track = NULL;
 10.2121 -+#endif
 10.2122 - 
 10.2123 -     spec->sources = NULL;
 10.2124 -     spec->packages = NULL;
 10.2125 -@@ -499,6 +513,9 @@
 10.2126 -     spec->install = freeStringBuf(spec->install);
 10.2127 -     spec->check = freeStringBuf(spec->check);
 10.2128 -     spec->clean = freeStringBuf(spec->clean);
 10.2129 -+#ifdef OPENPKG
 10.2130 -+    spec->track = freeStringBuf(spec->track);
 10.2131 -+#endif
 10.2132 - 
 10.2133 -     spec->buildRootURL = _free(spec->buildRootURL);
 10.2134 -     spec->buildSubdir = _free(spec->buildSubdir);
 10.2135 -
 10.2136 -+---------------------------------------------------------------------------
 10.2137 -| Add support for the OpenPKG custom .spec file sections %track
 10.2138 -| (package build-time feature for performing vendor source tracking)
 10.2139 -| and %test (package install-time feature for performing package
 10.2140 -| run-time tests).
 10.2141 -+---------------------------------------------------------------------------
 10.2142 -Index: lib/rpmlib.h
 10.2143 ---- lib/rpmlib.h	19 Jun 2003 17:39:35 -0000	1.1.1.26
 10.2144 -+++ lib/rpmlib.h	30 Jan 2004 17:06:31 -0000	1.2
 10.2145 -@@ -414,6 +414,12 @@
 10.2146 -     RPMTAG_FILEDEPENDSN		= 1144,
 10.2147 -     RPMTAG_DEPENDSDICT		= 1145,
 10.2148 -     RPMTAG_SOURCEPKGID		= 1146,
 10.2149 -+#ifdef OPENPKG
 10.2150 -+    RPMTAG_TRACK 		= 1200,
 10.2151 -+    RPMTAG_TEST 		= 1201,
 10.2152 -+    RPMTAG_TESTPROG		= 1202,
 10.2153 -+    RPMTAG_CLASS		= 1203,
 10.2154 -+#endif
 10.2155 - /*@-enummemuse@*/
 10.2156 -     RPMTAG_FIRSTFREE_TAG	/*!< internal */
 10.2157 - /*@=enummemuse@*/
 10.2158 -@@ -488,6 +494,9 @@
 10.2159 -     RPMSENSE_SCRIPT_BUILD = (1 << 21),	/*!< %build build dependency. */
 10.2160 -     RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
 10.2161 -     RPMSENSE_SCRIPT_CLEAN = (1 << 23),	/*!< %clean build dependency. */
 10.2162 -+#ifdef OPENPKG
 10.2163 -+    RPMSENSE_SCRIPT_TEST = (1 << 29),	/*!< %test build dependency. */
 10.2164 -+#endif
 10.2165 -     RPMSENSE_RPMLIB	= ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
 10.2166 - /*@-enummemuse@*/
 10.2167 -     RPMSENSE_TRIGGERPREIN = (1 << 25),	/*!< @todo Implement %triggerprein. */
 10.2168 -
 10.2169 -+---------------------------------------------------------------------------
 10.2170 -| Add support for the OpenPKG custom .spec file sections %track
 10.2171 -| (package build-time feature for performing vendor source tracking)
 10.2172 -| and %test (package install-time feature for performing package
 10.2173 -| run-time tests).
 10.2174 -| Additionally, add support for "Class" header.
 10.2175 -+---------------------------------------------------------------------------
 10.2176 -Index: rpmdb/tagtbl.c
 10.2177 ---- rpmdb/tagtbl.c	2 Jul 2003 20:20:27 -0000	1.1.1.4
 10.2178 -+++ rpmdb/tagtbl.c	30 Jan 2004 17:06:32 -0000	1.2
 10.2179 -@@ -135,6 +135,12 @@
 10.2180 - 	{ "RPMTAG_FILEDEPENDSN", 1144, },
 10.2181 - 	{ "RPMTAG_DEPENDSDICT", 1145, },
 10.2182 - 	{ "RPMTAG_SOURCEPKGID", 1146, },
 10.2183 -+#ifdef OPENPKG
 10.2184 -+	{ "RPMTAG_TRACK", 1200, },
 10.2185 -+	{ "RPMTAG_TEST", 1201, },
 10.2186 -+	{ "RPMTAG_TESTPROG", 1202, },
 10.2187 -+	{ "RPMTAG_CLASS", 1203, },
 10.2188 -+#endif
 10.2189 - 	{ NULL, 0 }
 10.2190 - };
 10.2191 - 
 10.2192 -
 10.2193 -+---------------------------------------------------------------------------
 10.2194 -| Add support for "Class" header.
 10.2195 -+---------------------------------------------------------------------------
 10.2196 -Index: build/parsePreamble.c
 10.2197 ---- build/parsePreamble.c	3 Mar 2003 20:46:34 -0000	1.1.1.13
 10.2198 -+++ build/parsePreamble.c	6 Feb 2004 15:37:58 -0000	1.3
 10.2199 -@@ -21,6 +21,7 @@
 10.2200 -     RPMTAG_LICENSE,
 10.2201 -     RPMTAG_PACKAGER,
 10.2202 -     RPMTAG_DISTRIBUTION,
 10.2203 -+    RPMTAG_CLASS,
 10.2204 -     RPMTAG_DISTURL,
 10.2205 -     RPMTAG_VENDOR,
 10.2206 -     RPMTAG_ICON,
 10.2207 -@@ -327,6 +328,7 @@
 10.2208 -     { RPMTAG_VENDOR,		"%{vendor}" },
 10.2209 -     { RPMTAG_PACKAGER,		"%{packager}" },
 10.2210 -     { RPMTAG_DISTRIBUTION,	"%{distribution}" },
 10.2211 -+    { RPMTAG_CLASS,		"%{class}" },
 10.2212 -     { RPMTAG_DISTURL,		"%{disturl}" },
 10.2213 -     { -1, NULL }
 10.2214 - };
 10.2215 -@@ -545,6 +547,7 @@
 10.2216 - 	(void) stashSt(spec, pkg->header, tag, lang);
 10.2217 - 	/*@fallthrough@*/
 10.2218 -     case RPMTAG_DISTRIBUTION:
 10.2219 -+    case RPMTAG_CLASS:
 10.2220 -     case RPMTAG_VENDOR:
 10.2221 -     case RPMTAG_LICENSE:
 10.2222 -     case RPMTAG_PACKAGER:
 10.2223 -@@ -751,6 +754,7 @@
 10.2224 -     {RPMTAG_LICENSE,		0, 0, "copyright"},
 10.2225 -     {RPMTAG_LICENSE,		0, 0, "license"},
 10.2226 -     {RPMTAG_DISTRIBUTION,	0, 0, "distribution"},
 10.2227 -+    {RPMTAG_CLASS,		0, 0, "class"},
 10.2228 -     {RPMTAG_DISTURL,		0, 0, "disturl"},
 10.2229 -     {RPMTAG_VENDOR,		0, 0, "vendor"},
 10.2230 -     {RPMTAG_GROUP,		0, 1, "group"},
    11.1 --- a/openpkg/rpm.patch.porting	Tue Jul 31 12:27:54 2012 +0200
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,1539 +0,0 @@
    11.4 -##
    11.5 -##  rpm.patch.porting -- Annotated OpenPKG RPM Patch file
    11.6 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
    11.7 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
    11.8 -##
    11.9 -##  This file assembles changes to existing RPM source files between
   11.10 -##  the original RedHat RPM and the OpenPKG RPM variant. It can be
   11.11 -##  automatically applied to a vanilla RedHat RPM source tree with the
   11.12 -##  'patch' tool to upgrade those files. Each patch snippet is annotated
   11.13 -##  with a short description.
   11.14 -##
   11.15 -##  Created on: 13-Sep-2006
   11.16 -##
   11.17 -##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
   11.18 -##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
   11.19 -##
   11.20 -
   11.21 -+---------------------------------------------------------------------------
   11.22 -| Evil hack to get GNU libtool working under NetBSD 1.6
   11.23 -| with the ugly way RPM currently has to use it.
   11.24 -+---------------------------------------------------------------------------
   11.25 -Index: ltconfig
   11.26 ---- ltconfig	17 Jan 2001 16:22:58 -0000	1.1.1.7
   11.27 -+++ ltconfig	29 Apr 2004 13:07:28 -0000	1.4
   11.28 -@@ -2017,6 +2017,7 @@
   11.29 -     dynamic_linker='NetBSD ld.elf_so'
   11.30 -   fi
   11.31 -   shlibpath_var=LD_LIBRARY_PATH
   11.32 -+  deplibs_check_method=pass_all
   11.33 -   ;;
   11.34 - 
   11.35 - openbsd*)
   11.36 -
   11.37 -+---------------------------------------------------------------------------
   11.38 -| Disable special RedHat NPTL handling.
   11.39 -+---------------------------------------------------------------------------
   11.40 -Index: configure.ac
   11.41 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
   11.42 -+++ configure.ac	13 Sep 2006 13:40:20 -0000
   11.43 -@@ -151,10 +151,10 @@
   11.44 - dnl XXX Test for libpthread.a that is NPTL aware (static link only).
   11.45 - dnl
   11.46 - LDFLAGS_NPTL=
   11.47 --if test -f /usr/lib/nptl/libpthread.a ; then
   11.48 --    LDFLAGS_NPTL="-L/usr/lib/nptl"
   11.49 --#    INCPATH="$INCPATH -I/usr/include/nptl"
   11.50 --fi
   11.51 -+dnl if test -f /usr/lib/nptl/libpthread.a ; then
   11.52 -+dnl     LDFLAGS_NPTL="-L/usr/lib/nptl"
   11.53 -+dnl #    INCPATH="$INCPATH -I/usr/include/nptl"
   11.54 -+dnl fi
   11.55 - AC_SUBST(LDFLAGS_NPTL)
   11.56 - 
   11.57 - dnl
   11.58 -
   11.59 -+---------------------------------------------------------------------------
   11.60 -| Disable any POSIX Pthread stuff because in OpenPKG we use
   11.61 -| non-Pthread mutexes in Berkeley-DB.
   11.62 -+---------------------------------------------------------------------------
   11.63 -Index: configure.ac
   11.64 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
   11.65 -+++ configure.ac	13 Sep 2006 13:40:21 -0000
   11.66 -@@ -447,14 +447,17 @@
   11.67 -     AC_CHECK_LIB(socket, socket)
   11.68 - ])
   11.69 - 
   11.70 --AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
   11.71 -+dnl # required for HP-UX because of RPC stuff in DB
   11.72 -+AC_CHECK_LIB(nsl, svc_run)
   11.73 - 
   11.74 --AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
   11.75 --  dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
   11.76 --  AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
   11.77 --    AC_CHECK_LIB(thread, mutex_lock)
   11.78 --  ])
   11.79 --])
   11.80 -+dnl AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
   11.81 -+dnl 
   11.82 -+dnl AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
   11.83 -+dnl   dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
   11.84 -+dnl   AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
   11.85 -+dnl     AC_CHECK_LIB(thread, mutex_lock)
   11.86 -+dnl   ])
   11.87 -+dnl ])
   11.88 - 
   11.89 - AC_CHECK_HEADERS(aio.h)
   11.90 - AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
   11.91 -
   11.92 -+---------------------------------------------------------------------------
   11.93 -| Add support for BSD getmntinfo(3).
   11.94 -+---------------------------------------------------------------------------
   11.95 -Index: configure.ac
   11.96 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
   11.97 -+++ configure.ac	13 Sep 2006 13:40:23 -0000
   11.98 -@@ -967,12 +967,13 @@
   11.99 - AC_CHECK_FUNCS(getpassphrase)
  11.100 - 
  11.101 - AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
  11.102 -+ AC_CHECK_FUNC(getmntinfo, AC_DEFINE(HAVE_GETMNTINFO, 1, [Define as 1 if you have the getmntinfo() function]), [
  11.103 -   AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[
  11.104 -     AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)]), [
  11.105 -       AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r"; 
  11.106 - 					AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)])], [
  11.107 - 		 AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is used])
  11.108 --                 AC_LIBOBJ(getmntent)])])])])
  11.109 -+                 AC_LIBOBJ(getmntent)])])])])])
  11.110 - 
  11.111 - AC_CHECK_FUNC(lchown,
  11.112 -    [__CHOWN_RHF="%{__chown} -Rhf"
  11.113 -
  11.114 -+---------------------------------------------------------------------------
  11.115 -| Remove RPM's "lib64" hack because we do not install
  11.116 -| into any system locations at all.
  11.117 -+---------------------------------------------------------------------------
  11.118 -Index: configure.ac
  11.119 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
  11.120 -+++ configure.ac	13 Sep 2006 13:40:25 -0000
  11.121 -@@ -1146,9 +1146,6 @@
  11.122 - 
  11.123 - dnl XXX Choose /usr/lib or /usr/lib64 for library installs.
  11.124 - MARK64=
  11.125 --case "${target_cpu}" in
  11.126 --x86_64*|ppc64*|powerpc64*|sparc64*|s390x*)	MARK64=64 ;;
  11.127 --esac
  11.128 - AC_SUBST(MARK64)
  11.129 - 
  11.130 - dnl Determine the canonical arch-vendor-os for the build machine
  11.131 -
  11.132 -+---------------------------------------------------------------------------
  11.133 -| Provide fallback definitions for uintX_t stuff, which is used by
  11.134 -| build/rpmfile.h and not available on all platforms. We do this by
  11.135 -| adding the same Autoconf checks file/configure already used for its
  11.136 -| original file.h.
  11.137 -| Additionally, do not try to configure in an internal
  11.138 -| beecrypt subdirectory.
  11.139 -+---------------------------------------------------------------------------
  11.140 -Index: configure.ac
  11.141 ---- configure.ac	2 Jul 2003 19:20:52 -0000	1.1.1.4
  11.142 -+++ configure.ac	13 Sep 2006 13:40:29 -0000
  11.143 -@@ -1251,11 +1251,40 @@
  11.144 - 
  11.145 - AC_SUBST(OBJDUMP)
  11.146 - 
  11.147 -+dnl OpenPKG: rpmfile.h (used in RPM) from file(1) needs additional checks
  11.148 -+dnl for its use of uintXX_t (which are available in file/config.h, but which
  11.149 -+dnl we cannot include into RPM because of conflicts with RPM's config.h)
  11.150 -+AC_DEFUN([AC_CHECK_TYPE_STDC],
  11.151 -+[AC_REQUIRE([AC_HEADER_STDC])dnl
  11.152 -+AC_MSG_CHECKING(for $1)
  11.153 -+AC_CACHE_VAL(ac_cv_type_$1,
  11.154 -+[AC_EGREP_CPP(dnl
  11.155 -+[(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
  11.156 -+[#if HAVE_STDINT_H
  11.157 -+#include <stdint.h>
  11.158 -+#endif
  11.159 -+#include <sys/types.h>
  11.160 -+#if STDC_HEADERS
  11.161 -+#include <stdlib.h>
  11.162 -+#include <stddef.h>
  11.163 -+#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
  11.164 -+AC_MSG_RESULT($ac_cv_type_$1)
  11.165 -+if test $ac_cv_type_$1 = no; then
  11.166 -+  AC_DEFINE($1, $2, $1)
  11.167 -+fi])
  11.168 -+AC_CHECK_TYPE_STDC(uint8_t,  unsigned char)
  11.169 -+AC_CHECK_TYPE_STDC(uint16_t, unsigned short)
  11.170 -+AC_CHECK_TYPE_STDC(uint32_t, unsigned int)
  11.171 -+
  11.172 -+dnl OpenPKG: some strange platforms (like Unixware) really have MADV_XXX
  11.173 -+dnl but no madvise(2) function itself, so check for madvise explicitly.
  11.174 -+AC_CHECK_FUNC(madvise)
  11.175 -+
  11.176 - dnl XXX this causes popt to depend on zlib et al
  11.177 - dnl # XXX Propagate -lucb to popt ...
  11.178 - dnl export LIBS INCPATH CONFIG_SITE
  11.179 - 
  11.180 --AC_CONFIG_SUBDIRS(popt beecrypt zlib elfutils file db3)
  11.181 -+AC_CONFIG_SUBDIRS(popt zlib elfutils file db3)
  11.182 - 
  11.183 - AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
  11.184 - 	rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
  11.185 -
  11.186 -+---------------------------------------------------------------------------
  11.187 -| Remove RPM's "lib64" hack because we do not install
  11.188 -| into any system locations at all.
  11.189 -+---------------------------------------------------------------------------
  11.190 -Index: popt/configure.ac
  11.191 ---- popt/configure.ac	27 Mar 2003 17:23:18 -0000	1.1.1.3
  11.192 -+++ popt/configure.ac	12 May 2004 14:34:35 -0000	1.2
  11.193 -@@ -53,9 +53,6 @@
  11.194 - 
  11.195 - dnl XXX Choose /usr/lib or /usr/lib64 for library installs.
  11.196 - MARK64=
  11.197 --case "${target_cpu}" in
  11.198 --x86_64*|powerpc64*|ppc64*|sparc64*|s390x*)        MARK64=64 ;;
  11.199 --esac
  11.200 - AC_SUBST(MARK64)
  11.201 - 
  11.202 - AC_CHECK_HEADERS(alloca.h float.h libintl.h mcheck.h unistd.h)
  11.203 -
  11.204 -+---------------------------------------------------------------------------
  11.205 -| Prevent (at least NetBSD's) gcc 2.95 from optimizing (at least sha1.c)
  11.206 -| and this way run into a resource (virtual memory) exhaustion situation.
  11.207 -| Not all Bourne-Shells support embedded TAB characters in
  11.208 -| here-document style constructs. Insert the TAB character indirectly
  11.209 -| to workaround problems.
  11.210 -| Additionally, there is no need to build a shared library version of
  11.211 -| Berkeley-DB.
  11.212 -| Finally, enforce the use of the standard UNIX/fcntl mutex type for
  11.213 -| full portability and to get rid of Pthread library dependencies
  11.214 -| (which especially are nasty for the external RPM API users).
  11.215 -+---------------------------------------------------------------------------
  11.216 -Index: db3/configure
  11.217 ---- db3/configure	18 Jan 2003 14:04:22 -0000	1.1.1.4
  11.218 -+++ db3/configure	6 Jun 2005 15:53:05 -0000	1.3
  11.219 -@@ -7,19 +7,29 @@
  11.220 - # XXX edit CFLAGS= ... out of invocation args ???
  11.221 - ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`"
  11.222 - 
  11.223 -+# prevent gcc 2.95 from optimizing (at least sha1.c)
  11.224 -+# and this way get into a resource exhaustion situation
  11.225 -+if [ ".`($CC -v; $CC --version) </dev/null 2>&1 | grep -i 'gcc'`" != . ]; then
  11.226 -+    case "`$CC -dumpversion 2>/dev/null`" in
  11.227 -+        3.* ) ;;
  11.228 -+        *   ) CFLAGS=`echo " $CFLAGS -O0" | sed -e 's; -O[0-9]* ; ;g' -e 's;^  *;;'` ;;
  11.229 -+    esac
  11.230 -+fi
  11.231 -+
  11.232 - CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
  11.233 --	--enable-shared --enable-static --enable-rpc \
  11.234 --	--with-uniquename=_rpmdb --srcdir=$db_dist
  11.235 -+	--disable-shared --enable-static --enable-rpc \
  11.236 -+	--with-uniquename=_rpmdb --srcdir=$db_dist \
  11.237 -+	--with-mutex="UNIX/fcntl" --disable-largefile
  11.238 - 
  11.239 - mv Makefile Makefile.orig
  11.240 - cat Makefile.orig | sed -e '/^install[:-]/c\
  11.241 - .PHONY: listobjs\
  11.242 - listobjs:\
  11.243 --	@echo $(OBJS) $(C_OBJS) \
  11.244 -+~@echo $(OBJS) $(C_OBJS) \
  11.245 - \
  11.246 - distdir install check:\
  11.247 - \
  11.248 --db4_install: all install_setip' > Makefile
  11.249 -+db4_install: all install_setip' | tr '~' '	' > Makefile
  11.250 - 
  11.251 - mv db.h db.h.orig
  11.252 - cat db.h.orig | sed \
  11.253 -
  11.254 -+---------------------------------------------------------------------------
  11.255 -| Add support for BSD getmntinfo(3).
  11.256 -+---------------------------------------------------------------------------
  11.257 -Index: lib/fs.c
  11.258 ---- lib/fs.c	4 Jun 2003 18:09:43 -0000	1.1.1.13
  11.259 -+++ lib/fs.c	25 Nov 2004 09:32:16 -0000	1.3
  11.260 -@@ -164,6 +164,15 @@
  11.261 -     int nextMount = 0;
  11.262 - 
  11.263 - 	getmntinfo_r(&mounts, flags, &mntCount, &bufSize);
  11.264 -+#   elif HAVE_GETMNTINFO
  11.265 -+#   if defined(__NetBSD__) && (__NetBSD_Version__ > 200030000)
  11.266 -+#   define statfs statvfs
  11.267 -+#   endif
  11.268 -+    struct statfs * mounts = NULL;
  11.269 -+    int mntCount, flags = MNT_NOWAIT;
  11.270 -+    int nextMount = 0;
  11.271 -+
  11.272 -+	mntCount = getmntinfo(&mounts, flags);
  11.273 - #   endif
  11.274 - 
  11.275 -     filesystems = xcalloc((numAlloced + 1), sizeof(*filesystems));	/* XXX memory leak */
  11.276 -@@ -193,6 +202,9 @@
  11.277 - #	elif HAVE_GETMNTINFO_R
  11.278 - 	    if (nextMount == mntCount) break;
  11.279 - 	    mntdir = mounts[nextMount++].f_mntonname;
  11.280 -+#	elif HAVE_GETMNTINFO
  11.281 -+	    if (nextMount == mntCount) break;
  11.282 -+	    mntdir = mounts[nextMount++].f_mntonname;
  11.283 - #	endif
  11.284 - 
  11.285 - 	if (stat(mntdir, &sb)) {
  11.286 -
  11.287 -+---------------------------------------------------------------------------
  11.288 -| Add support for Compaq/HP OSF1/Tru64.
  11.289 -+---------------------------------------------------------------------------
  11.290 -Index: misc/fnmatch.h
  11.291 ---- misc/fnmatch.h	22 Feb 2002 17:12:15 -0000	1.1.1.3
  11.292 -+++ misc/fnmatch.h	22 Jan 2004 21:42:26 -0000	1.2
  11.293 -@@ -55,7 +55,7 @@
  11.294 - #define	FNM_NOESCAPE	(1 << 1) /* Backslashes don't quote special chars.  */
  11.295 - #define	FNM_PERIOD	(1 << 2) /* Leading `.' is matched only explicitly.  */
  11.296 - 
  11.297 --#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
  11.298 -+#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE || defined __osf__
  11.299 - # define FNM_FILE_NAME	 FNM_PATHNAME	/* Preferred GNU name.  */
  11.300 - # define FNM_LEADING_DIR (1 << 3)	/* Ignore `/...' after a match.  */
  11.301 - # define FNM_CASEFOLD	 (1 << 4)	/* Compare without regard to case.  */
  11.302 -
  11.303 -+---------------------------------------------------------------------------
  11.304 -| Use more correct Autoconf based size_t check.
  11.305 -| Add support for Compaq/HP OSF1/Tru64 and SCO UnixWare.
  11.306 -+---------------------------------------------------------------------------
  11.307 -Index: misc/glob.h
  11.308 ---- misc/glob.h	11 Mar 2000 20:59:30 -0000	1.1.1.3
  11.309 -+++ misc/glob.h	22 Jan 2004 21:42:27 -0000	1.2
  11.310 -@@ -46,7 +46,7 @@
  11.311 - #endif /* C++ or ANSI C.  */
  11.312 - 
  11.313 - /* We need `size_t' for the following definitions.  */
  11.314 --#ifndef __size_t
  11.315 -+#if !defined(__size_t) && !defined(_SIZE_T_DECLARED)
  11.316 - # if defined __GNUC__ && __GNUC__ >= 2
  11.317 - typedef __SIZE_TYPE__ __size_t;
  11.318 - #  ifdef _XOPEN_SOURCE
  11.319 -@@ -74,7 +74,7 @@
  11.320 - #define	GLOB_PERIOD	(1 << 7)/* Leading `.' can be matched by metachars.  */
  11.321 - 
  11.322 - #if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE \
  11.323 --     || defined _GNU_SOURCE)
  11.324 -+     || defined _GNU_SOURCE || defined __osf__ )
  11.325 - # define GLOB_MAGCHAR	 (1 << 8)/* Set in gl_flags if any metachars seen.  */
  11.326 - # define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions.  */
  11.327 - # define GLOB_BRACE	 (1 << 10)/* Expand "{a,b}" to "a" "b".  */
  11.328 -@@ -151,7 +151,8 @@
  11.329 -    `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
  11.330 -    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
  11.331 -    Otherwise, `glob' returns zero.  */
  11.332 --#if _FILE_OFFSET_BITS != 64
  11.333 -+/* #if _FILE_OFFSET_BITS != 64 || defined(OPENPKG_UNIXWARE) */
  11.334 -+#if !defined(__linux__)
  11.335 - extern int glob __P ((__const char *__pattern, int __flags,
  11.336 - 		      int (*__errfunc) (__const char *, int),
  11.337 - 		      glob_t *__pglob));
  11.338 -
  11.339 -+---------------------------------------------------------------------------
  11.340 -| Better portability.
  11.341 -+---------------------------------------------------------------------------
  11.342 -Index: misc/glob.c
  11.343 ---- misc/glob.c	11 Mar 2000 21:13:18 -0000	1.1.1.4
  11.344 -+++ misc/glob.c	22 Jan 2004 21:42:26 -0000	1.2
  11.345 -@@ -813,6 +813,7 @@
  11.346 - 
  11.347 - 
  11.348 - /* Free storage allocated in PGLOB by a previous `glob' call.  */
  11.349 -+#if !defined(__linux__) || (defined(__linux__) && (_FILE_OFFSET_BITS != 64) || (__GNUC__ >= 2))
  11.350 - void
  11.351 - globfree (pglob)
  11.352 -      register glob_t *pglob;
  11.353 -@@ -826,7 +827,7 @@
  11.354 -       free ((__ptr_t) pglob->gl_pathv);
  11.355 -     }
  11.356 - }
  11.357 --
  11.358 -+#endif
  11.359 - 
  11.360 - /* Do a collated comparison of A and B.  */
  11.361 - static int
  11.362 -
  11.363 -+---------------------------------------------------------------------------
  11.364 -| Add libmisc.a for platform portability.
  11.365 -+---------------------------------------------------------------------------
  11.366 -Index: tools/Makefile.am
  11.367 ---- tools/Makefile.am	29 May 2003 17:40:17 -0000	1.1.1.14
  11.368 -+++ tools/Makefile.am	22 Jan 2004 21:42:34 -0000	1.2
  11.369 -@@ -22,7 +22,7 @@
  11.370 - 
  11.371 - LDADD = \
  11.372 - 	$(top_builddir)/lib/librpm.la \
  11.373 --	@INTLLIBS@
  11.374 -+	@INTLLIBS@ @LIBMISC@
  11.375 - 
  11.376 - staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@
  11.377 - 
  11.378 -
  11.379 -+---------------------------------------------------------------------------
  11.380 -| Add libmisc.a for platform portability.
  11.381 -+---------------------------------------------------------------------------
  11.382 -Index: tools/Makefile.in
  11.383 ---- tools/Makefile.in	16 Jul 2003 17:05:51 -0000	1.1.1.20
  11.384 -+++ tools/Makefile.in	22 Jan 2004 21:42:35 -0000	1.2
  11.385 -@@ -275,7 +275,7 @@
  11.386 - 
  11.387 - LDADD = \
  11.388 - 	$(top_builddir)/lib/librpm.la \
  11.389 --	@INTLLIBS@
  11.390 -+	@INTLLIBS@ @LIBMISC@
  11.391 - 
  11.392 - 
  11.393 - staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@
  11.394 -
  11.395 -+---------------------------------------------------------------------------
  11.396 -| Drop GCC "inline" attribute if not compiling with GCC.
  11.397 -| Workaround some other GCC'isms, too.
  11.398 -| Do not take over "const" replacements from Zlib.
  11.399 -+---------------------------------------------------------------------------
  11.400 -Index: file/system.h
  11.401 ---- file/system.h	24 Jan 2003 19:41:56 -0000	1.1.1.1
  11.402 -+++ file/system.h	6 Jun 2005 15:53:05 -0000	1.4
  11.403 -@@ -13,6 +13,9 @@
  11.404 - #endif
  11.405 - 
  11.406 - #include <sys/types.h>
  11.407 -+#ifdef HAVE_INTTYPES_H
  11.408 -+#include <inttypes.h>
  11.409 -+#endif
  11.410 - 
  11.411 - #include <sys/stat.h>
  11.412 - #include <stdio.h>
  11.413 -@@ -53,6 +56,8 @@
  11.414 - #else
  11.415 - #if HAVE_ERROR && HAVE_ERROR_H
  11.416 - #include <error.h>
  11.417 -+#else
  11.418 -+extern void error(int status, int errnum, const char *format, ...);
  11.419 - #endif
  11.420 - #endif
  11.421 - 
  11.422 -@@ -194,6 +199,7 @@
  11.423 - 
  11.424 - #ifdef HAVE_LIBZ
  11.425 - #include <zlib.h>
  11.426 -+#undef const
  11.427 - #endif
  11.428 - 
  11.429 - #ifndef HAVE_STRERROR
  11.430 -@@ -246,7 +252,11 @@
  11.431 -  */
  11.432 - /*@-shadow@*/
  11.433 - /*@unused@*/ /*@exits@*/ /*@only@*/
  11.434 -+#if defined(__GNUC__)
  11.435 - static inline void * vmefail(/*@unused@*/ size_t nb)
  11.436 -+#else
  11.437 -+static void * vmefail(/*@unused@*/ size_t nb)
  11.438 -+#endif
  11.439 - 	/*@globals fileSystem @*/
  11.440 - 	/*@modifies fileSystem @*/
  11.441 - {
  11.442 -@@ -286,9 +296,33 @@
  11.443 - 
  11.444 - #if !defined(__LCLINT__)
  11.445 - /* Memory allocation via macro defs to get meaningful locations from mtrace() */
  11.446 -+#if defined(__GNUC__)
  11.447 - #define	xmalloc(_size) 		(malloc(_size) ? : vmefail(0))
  11.448 - #define	xcalloc(_nmemb, _size)	(calloc((_nmemb), (_size)) ? : vmefail(0))
  11.449 - #define	xrealloc(_ptr, _size)	(realloc((_ptr), (_size)) ? : vmefail(0))
  11.450 -+#else
  11.451 -+static void *xmalloc(size_t size)
  11.452 -+{
  11.453 -+    void *vp = malloc(size);
  11.454 -+    if (vp == NULL)
  11.455 -+        vmefail(0);
  11.456 -+    return vp;
  11.457 -+}
  11.458 -+static void *xcalloc(size_t number, size_t size)
  11.459 -+{
  11.460 -+    void *vp = calloc(number, size);
  11.461 -+    if (vp == NULL)
  11.462 -+        vmefail(0);
  11.463 -+    return vp;
  11.464 -+}
  11.465 -+static void *xrealloc(void *ptr, size_t size)
  11.466 -+{
  11.467 -+    void *vp = realloc(ptr, size);
  11.468 -+    if (vp == NULL)
  11.469 -+        vmefail(0);
  11.470 -+    return vp;
  11.471 -+}
  11.472 -+#endif
  11.473 - #define	xstrdup(_str)	(strcpy(xmalloc(strlen(_str)+1), (_str)))
  11.474 - #endif
  11.475 - 
  11.476 -@@ -314,9 +348,14 @@
  11.477 - 
  11.478 - #if defined(__LCLINT__)
  11.479 - #define FILE_RCSID(id)
  11.480 --#else
  11.481 -+#elif defined(__GNUC__)
  11.482 - #define FILE_RCSID(id) \
  11.483 - static inline const char *rcsid(const char *p) { \
  11.484 -+        return rcsid(p = id); \
  11.485 -+}
  11.486 -+#else
  11.487 -+#define FILE_RCSID(id) \
  11.488 -+static const char *rcsid(const char *p) { \
  11.489 - 	return rcsid(p = id); \
  11.490 - }
  11.491 - #endif
  11.492 -
  11.493 -+---------------------------------------------------------------------------
  11.494 -| Use GCC extensional features only if compiled with GCC.
  11.495 -+---------------------------------------------------------------------------
  11.496 -Index: file/file.h
  11.497 ---- file/file.h	24 Jan 2003 19:41:56 -0000	1.1.1.1
  11.498 -+++ file/file.h	22 Jan 2004 21:42:22 -0000	1.2
  11.499 -@@ -95,7 +95,11 @@
  11.500 - 	} value;		/* either number or string */
  11.501 - 	uint32_t mask;	/* mask before comparison with value */
  11.502 - 	char desc[MAXDESC];	/* description */
  11.503 -+#if defined(__GNUC__)
  11.504 - } __attribute__((__packed__));
  11.505 -+#else
  11.506 -+};
  11.507 -+#endif
  11.508 - 
  11.509 - #define BIT(A)   (1 << (A))
  11.510 - #define STRING_IGNORE_LOWERCASE		BIT(0)
  11.511 -
  11.512 -+---------------------------------------------------------------------------
  11.513 -| Add int32_t detection and automatic fallback support.
  11.514 -+---------------------------------------------------------------------------
  11.515 -Index: file/config.h.in
  11.516 ---- file/config.h.in	7 Mar 2003 19:39:18 -0000	1.1.1.1
  11.517 -+++ file/config.h.in	13 Sep 2006 13:40:49 -0000
  11.518 -@@ -106,6 +106,9 @@
  11.519 - /* Define to 1 if you have the <unistd.h> header file. */
  11.520 - #undef HAVE_UNISTD_H
  11.521 - 
  11.522 -+/* Define to 1 if you have the `vsnprintf' function. */
  11.523 -+#undef HAVE_VSNPRINTF
  11.524 -+
  11.525 - /* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
  11.526 -    */
  11.527 - #undef MAJOR_IN_MKDEV
  11.528 -@@ -162,12 +165,16 @@
  11.529 - /* Define to empty if `const' does not conform to ANSI C. */
  11.530 - #undef const
  11.531 - 
  11.532 -+/* int32_t */
  11.533 -+#undef int32_t
  11.534 -+
  11.535 - /* Define to `long' if <sys/types.h> does not define. */
  11.536 - #undef off_t
  11.537 - 
  11.538 - /* Define to `unsigned' if <sys/types.h> does not define. */
  11.539 - #undef size_t
  11.540 - 
  11.541 -+#ifndef HAVE_STDINT_H
  11.542 - /* uint16_t */
  11.543 - #undef uint16_t
  11.544 - 
  11.545 -@@ -179,3 +186,4 @@
  11.546 - 
  11.547 - /* uint8_t */
  11.548 - #undef uint8_t
  11.549 -+#endif
  11.550 -
  11.551 -+---------------------------------------------------------------------------
  11.552 -| Add int32_t detection and automatic fallback support.
  11.553 -+---------------------------------------------------------------------------
  11.554 -Index: file/configure.ac
  11.555 ---- file/configure.ac	1 Dec 2002 21:34:06 -0000	1.1.1.1
  11.556 -+++ file/configure.ac	6 Jun 2005 15:53:05 -0000	1.2
  11.557 -@@ -92,6 +92,7 @@
  11.558 - AC_CHECK_TYPE_STDC(uint8_t, unsigned char)
  11.559 - AC_CHECK_TYPE_STDC(uint16_t, unsigned short)
  11.560 - AC_CHECK_TYPE_STDC(uint32_t, unsigned int)
  11.561 -+AC_CHECK_TYPE_STDC(int32_t, int)
  11.562 - AC_C_LONG_LONG
  11.563 - if test $ac_cv_c_long_long = yes; then
  11.564 -   long64='unsigned long long';
  11.565 -@@ -107,7 +108,7 @@
  11.566 - AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0)
  11.567 - 
  11.568 - dnl Checks for functions
  11.569 --AC_CHECK_FUNCS(error mtrace mkstemp mmap strdup strerror strtoul)
  11.570 -+AC_CHECK_FUNCS(error mtrace mkstemp mmap strdup strerror strtoul vsnprintf)
  11.571 - 
  11.572 - dnl Checks for libraries
  11.573 - AC_CHECK_LIB(z, gzopen)
  11.574 -
  11.575 -+---------------------------------------------------------------------------
  11.576 -| Add int32_t detection and automatic fallback support.
  11.577 -+---------------------------------------------------------------------------
  11.578 -Index: file/configure
  11.579 ---- file/configure	16 Jul 2003 17:05:25 -0000	1.1.1.2
  11.580 -+++ file/configure	6 Jun 2005 15:53:05 -0000	1.2
  11.581 -@@ -10847,6 +10847,46 @@
  11.582 - 
  11.583 - fi
  11.584 - 
  11.585 -+echo "$as_me:$LINENO: checking for int32_t" >&5
  11.586 -+echo $ECHO_N "checking for int32_t... $ECHO_C" >&6
  11.587 -+if test "${ac_cv_type_int32_t+set}" = set; then
  11.588 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  11.589 -+else
  11.590 -+  cat >conftest.$ac_ext <<_ACEOF
  11.591 -+#line $LINENO "configure"
  11.592 -+/* confdefs.h.  */
  11.593 -+_ACEOF
  11.594 -+cat confdefs.h >>conftest.$ac_ext
  11.595 -+cat >>conftest.$ac_ext <<_ACEOF
  11.596 -+/* end confdefs.h.  */
  11.597 -+#if HAVE_STDINT_H
  11.598 -+#include <stdint.h>
  11.599 -+#endif
  11.600 -+#include <sys/types.h>
  11.601 -+#if STDC_HEADERS
  11.602 -+#include <stdlib.h>
  11.603 -+#include <stddef.h>
  11.604 -+#endif
  11.605 -+_ACEOF
  11.606 -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  11.607 -+  $EGREP "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  11.608 -+  ac_cv_type_int32_t=yes
  11.609 -+else
  11.610 -+  ac_cv_type_int32_t=no
  11.611 -+fi
  11.612 -+rm -f conftest*
  11.613 -+
  11.614 -+fi
  11.615 -+echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
  11.616 -+echo "${ECHO_T}$ac_cv_type_int32_t" >&6
  11.617 -+if test $ac_cv_type_int32_t = no; then
  11.618 -+
  11.619 -+cat >>confdefs.h <<\_ACEOF
  11.620 -+#define int32_t int
  11.621 -+_ACEOF
  11.622 -+
  11.623 -+fi
  11.624 -+
  11.625 - echo "$as_me:$LINENO: checking for long long" >&5
  11.626 - echo $ECHO_N "checking for long long... $ECHO_C" >&6
  11.627 - if test "${ac_cv_c_long_long+set}" = set; then
  11.628 -@@ -11220,7 +11260,8 @@
  11.629 - 
  11.630 - 
  11.631 - 
  11.632 --for ac_func in error mtrace mkstemp mmap strdup strerror strtoul
  11.633 -+
  11.634 -+for ac_func in error mtrace mkstemp mmap strdup strerror strtoul vsnprintf
  11.635 - do
  11.636 - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
  11.637 - echo "$as_me:$LINENO: checking for $ac_func" >&5
  11.638 -
  11.639 -+---------------------------------------------------------------------------
  11.640 -| Fallback to vsprintf(3) if vsnprintf(3) does not exist.
  11.641 -+---------------------------------------------------------------------------
  11.642 -Index: file/print.c
  11.643 ---- file/print.c	24 Jan 2003 19:41:56 -0000	1.1.1.1
  11.644 -+++ file/print.c	6 Jun 2005 15:53:05 -0000	1.2
  11.645 -@@ -187,7 +187,11 @@
  11.646 - 
  11.647 - 	va_start(va, f);
  11.648 - /*@-boundswrite@*/
  11.649 -+#ifdef HAVE_VSNPRINTF
  11.650 - 	rc = vsnprintf(fm->obp, fm->nob, f, va);
  11.651 -+#else
  11.652 -+	rc = vsprintf(fm->obp, f, va);
  11.653 -+#endif
  11.654 - /*@=boundswrite@*/
  11.655 - 	va_end(va);
  11.656 - 
  11.657 -
  11.658 -+---------------------------------------------------------------------------
  11.659 -| Use GNU libtool's weaker -static (link with own static libraries)
  11.660 -| instead of the strong -all-static (link even with static libc, etc),
  11.661 -| because OpenPKG does not need to be fully static.
  11.662 -+---------------------------------------------------------------------------
  11.663 -Index: rpmdb/Makefile.am
  11.664 ---- rpmdb/Makefile.am	2 Jul 2003 20:14:07 -0000	1.1.1.7
  11.665 -+++ rpmdb/Makefile.am	22 Jan 2004 21:42:29 -0000	1.2
  11.666 -@@ -18,7 +18,7 @@
  11.667 - EXTRA_PROGRAMS = tjfn
  11.668 - 
  11.669 - tjfn_SOURCES = tjfn.c
  11.670 --tjfn_LDFLAGS = -all-static
  11.671 -+tjfn_LDFLAGS = -static
  11.672 - tjfn_LDADD = librpmdb.la
  11.673 - 
  11.674 - pkgincdir = $(pkgincludedir)
  11.675 -@@ -180,4 +180,4 @@
  11.676 - 	$(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES)
  11.677 - 
  11.678 - tdbi: librpmdb.la tdbi.o
  11.679 --	$(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
  11.680 -+	$(LINK) -static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
  11.681 -
  11.682 -+---------------------------------------------------------------------------
  11.683 -| Use GNU libtool's weaker -static (link with own static libraries)
  11.684 -| instead of the strong -all-static (link even with static libc, etc),
  11.685 -| because OpenPKG does not need to be fully static.
  11.686 -+---------------------------------------------------------------------------
  11.687 -Index: rpmdb/Makefile.in
  11.688 ---- rpmdb/Makefile.in	16 Jul 2003 17:05:48 -0000	1.1.1.7
  11.689 -+++ rpmdb/Makefile.in	22 Jan 2004 21:42:29 -0000	1.2
  11.690 -@@ -273,7 +273,7 @@
  11.691 - EXTRA_PROGRAMS = tjfn
  11.692 - 
  11.693 - tjfn_SOURCES = tjfn.c
  11.694 --tjfn_LDFLAGS = -all-static
  11.695 -+tjfn_LDFLAGS = -static
  11.696 - tjfn_LDADD = librpmdb.la
  11.697 - 
  11.698 - pkgincdir = $(pkgincludedir)
  11.699 -@@ -952,7 +952,7 @@
  11.700 - 	$(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES)
  11.701 - 
  11.702 - tdbi: librpmdb.la tdbi.o
  11.703 --	$(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
  11.704 -+	$(LINK) -static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
  11.705 - # Tell versions [3.59,3.63) of GNU make to not export all variables.
  11.706 - # Otherwise a system limit (for SysV at least) may be exceeded.
  11.707 - .NOEXPORT:
  11.708 -
  11.709 -+---------------------------------------------------------------------------
  11.710 -| Use GNU libtool's weaker -static (link with own static libraries)
  11.711 -| instead of the strong -all-static (link even with static libc, etc),
  11.712 -| because OpenPKG does not need to be fully static.
  11.713 -+---------------------------------------------------------------------------
  11.714 -Index: rpmio/Makefile.am
  11.715 ---- rpmio/Makefile.am	5 Jun 2003 12:05:23 -0000	1.1.1.9
  11.716 -+++ rpmio/Makefile.am	22 Jan 2004 21:42:31 -0000	1.2
  11.717 -@@ -68,27 +68,27 @@
  11.718 - tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.719 - 
  11.720 - tdir_SOURCES = tdir.c
  11.721 --tdir_LDFLAGS = -all-static
  11.722 -+tdir_LDFLAGS = -static
  11.723 - tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.724 - 
  11.725 - tfts_SOURCES = tfts.c
  11.726 --tfts_LDFLAGS = -all-static
  11.727 -+tfts_LDFLAGS = -static
  11.728 - tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.729 - 
  11.730 - tglob_SOURCES = tglob.c
  11.731 --tglob_LDFLAGS = -all-static
  11.732 -+tglob_LDFLAGS = -static
  11.733 - tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.734 - 
  11.735 - tinv_SOURCES = tinv.c
  11.736 --tinv_LDFLAGS = -all-static
  11.737 -+tinv_LDFLAGS = -static
  11.738 - tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.739 - 
  11.740 - tkey_SOURCES = tkey.c
  11.741 --tkey_LDFLAGS = -all-static
  11.742 -+tkey_LDFLAGS = -static
  11.743 - tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.744 - 
  11.745 - tring_SOURCES = tring.c
  11.746 --tring_LDFLAGS = -all-static
  11.747 -+tring_LDFLAGS = -static
  11.748 - tring_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.749 - 
  11.750 - trpmio_SOURCES = trpmio.c
  11.751 -
  11.752 -+---------------------------------------------------------------------------
  11.753 -| Use GNU libtool's weaker -static (link with own static libraries)
  11.754 -| instead of the strong -all-static (link even with static libc, etc),
  11.755 -| because OpenPKG does not need to be fully static.
  11.756 -| Additionally, remove hard-coded Linux'ism of linking against POSIX
  11.757 -| rt/pthread libraries (is not needed even under Linux itself) and
  11.758 -| make sure the build does not break by an empty argument list when
  11.759 -| iterating over (the not existing) BeeCrypt objects.
  11.760 -+---------------------------------------------------------------------------
  11.761 -Index: rpmio/Makefile.in
  11.762 ---- rpmio/Makefile.in	16 Jul 2003 17:05:49 -0000	1.1.1.9
  11.763 -+++ rpmio/Makefile.in	22 Jan 2004 21:42:31 -0000	1.2
  11.764 -@@ -288,8 +288,7 @@
  11.765 - librpmio_la_LDFLAGS = -release 4.2 \
  11.766 - 	@WITH_BEECRYPT_LIB@ \
  11.767 - 	$(top_builddir)/file/libfmagic.la \
  11.768 --	@WITH_ZLIB_LIB@ \
  11.769 --	-lrt -lpthread
  11.770 -+	@WITH_ZLIB_LIB@
  11.771 - 
  11.772 - librpmio_la_LIBADD = $(BEECRYPTLOBJS)
  11.773 - librpmio_la_DEPENDENCIES = .created
  11.774 -@@ -298,27 +297,27 @@
  11.775 - tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.776 - 
  11.777 - tdir_SOURCES = tdir.c
  11.778 --tdir_LDFLAGS = -all-static
  11.779 -+tdir_LDFLAGS = -static
  11.780 - tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.781 - 
  11.782 - tfts_SOURCES = tfts.c
  11.783 --tfts_LDFLAGS = -all-static
  11.784 -+tfts_LDFLAGS = -static
  11.785 - tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.786 - 
  11.787 - tglob_SOURCES = tglob.c
  11.788 --tglob_LDFLAGS = -all-static
  11.789 -+tglob_LDFLAGS = -static
  11.790 - tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.791 - 
  11.792 - tinv_SOURCES = tinv.c
  11.793 --tinv_LDFLAGS = -all-static
  11.794 -+tinv_LDFLAGS = -static
  11.795 - tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.796 - 
  11.797 - tkey_SOURCES = tkey.c
  11.798 --tkey_LDFLAGS = -all-static
  11.799 -+tkey_LDFLAGS = -static
  11.800 - tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.801 - 
  11.802 - tring_SOURCES = tring.c
  11.803 --tring_LDFLAGS = -all-static
  11.804 -+tring_LDFLAGS = -static
  11.805 - tring_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la
  11.806 - 
  11.807 - trpmio_SOURCES = trpmio.c
  11.808 -@@ -743,8 +742,8 @@
  11.809 - .created:
  11.810 - 	if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \
  11.811 - 	${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \
  11.812 --	for lo in $(BEECRYPTLOBJS); do \
  11.813 --	  [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
  11.814 -+	for lo in $(BEECRYPTLOBJS) ''; do \
  11.815 -+	  [ ".$$lo" = . ] || [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
  11.816 - 	done \
  11.817 - 	fi
  11.818 - 	touch $@
  11.819 -
  11.820 -+---------------------------------------------------------------------------
  11.821 -| Add Unixware support.
  11.822 -+---------------------------------------------------------------------------
  11.823 -Index: rpmio/fts.h
  11.824 ---- rpmio/fts.h	18 Jan 2003 16:13:17 -0000	1.1.1.3
  11.825 -+++ rpmio/fts.h	22 Jan 2004 21:42:32 -0000	1.2
  11.826 -@@ -51,7 +51,7 @@
  11.827 - # define	_LARGEFILE64_SOURCE
  11.828 - #endif
  11.829 - 
  11.830 --#if defined(sun)
  11.831 -+#if defined(sun) || defined(OPENPKG_UNIXWARE)
  11.832 - # define _D_EXACT_NAMLEN(d) ((d)->d_reclen)
  11.833 - #endif
  11.834 - 
  11.835 -
  11.836 -+---------------------------------------------------------------------------
  11.837 -| Add FreeBSD/NetBSD/OpenBSD support.
  11.838 -| Workaround some GCC'isms.
  11.839 -+---------------------------------------------------------------------------
  11.840 -Index: rpmio/fts.c
  11.841 ---- rpmio/fts.c	18 Jan 2003 16:13:17 -0000	1.1.1.3
  11.842 -+++ rpmio/fts.c	8 Jun 2005 13:16:25 -0000	1.5
  11.843 -@@ -34,6 +34,8 @@
  11.844 - static char sccsid[] = "@(#)fts.c	8.6 (Berkeley) 8/14/94";
  11.845 - #endif /* LIBC_SCCS and not lint */
  11.846 - 
  11.847 -+#include <limits.h>
  11.848 -+
  11.849 - #if defined(_LIBC)
  11.850 - #include <sys/param.h>
  11.851 - #include <include/sys/stat.h>
  11.852 -@@ -45,20 +47,52 @@
  11.853 - #include <string.h>
  11.854 - #include <unistd.h>
  11.855 - #else
  11.856 --#if defined(hpux)
  11.857 -+#if defined(OPENPKG_HPUX)
  11.858 - # define        _INCLUDE_POSIX_SOURCE
  11.859 - #   define __errno_location() 	(&errno)
  11.860 --#   define dirfd(dirp)		-1
  11.861 -+#   define locdirfd(dirp)		-1
  11.862 - #   define stat64		stat
  11.863 - #   define _STAT_VER		0
  11.864 - #   define __fxstat64(_stat_ver, _fd, _sbp)	fstat((_fd), (_sbp))
  11.865 -+#   define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
  11.866 - #endif
  11.867 --#if defined(sun)
  11.868 -+#if defined(sun) || defined(OPENPKG_UNIXWARE)
  11.869 - #   define __errno_location()	(&errno)
  11.870 --#   define dirfd(dirp)		-1
  11.871 -+#   define locdirfd(dirp)		-1
  11.872 - #   define _STAT_VER		0
  11.873 - #   define __fxstat64(_stat_ver, _fd, _sbp)	fstat((_fd), (_sbp))
  11.874 - #endif
  11.875 -+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENPKG_DARWIN)
  11.876 -+#   define __errno_location()	(&errno)
  11.877 -+#   define stat64 stat
  11.878 -+#   define _STAT_VER		0
  11.879 -+#   define __fxstat64(_stat_ver, _fd, _sbp)	fstat((_fd), (_sbp))
  11.880 -+#   define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
  11.881 -+#endif
  11.882 -+#if defined(__osf__)
  11.883 -+#   define __errno_location()   (&errno)
  11.884 -+#   define locdirfd(dirp)       -1
  11.885 -+#   define stat64               stat
  11.886 -+#   define _STAT_VER            0
  11.887 -+#   define __fxstat64(_stat_ver, _fd, _sbp)     fstat((_fd), (_sbp))
  11.888 -+#   define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
  11.889 -+#endif
  11.890 -+#if defined(OPENPKG_IRIX64)
  11.891 -+#   define __errno_location()   (&errno)
  11.892 -+#   define locdirfd(dirp)       -1
  11.893 -+#   define __fxstat64(_stat_ver, _fd, _sbp)     fstat((_fd), (_sbp))
  11.894 -+#   define _D_EXACT_NAMLEN(d) ((d)->d_reclen)
  11.895 -+#endif
  11.896 -+#if defined(OPENPKG_AIX)
  11.897 -+#   define __errno_location()   (&errno)
  11.898 -+#   define _STAT_VER            0
  11.899 -+#   define locdirfd(dirp)       ((dirp)->dd_fd)
  11.900 -+#   define __fxstat64(_stat_ver, _fd, _sbp)     fstat((_fd), (_sbp))
  11.901 -+#   define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
  11.902 -+#endif
  11.903 -+#if !defined(locdirfd)
  11.904 -+#   define locdirfd(dirp)  dirfd(dirp)
  11.905 -+#endif
  11.906 - #include "system.h"
  11.907 - #include "fts.h"
  11.908 - #include "rpmio.h"
  11.909 -@@ -73,7 +107,12 @@
  11.910 - /* Largest alignment size needed, minus one.
  11.911 -    Usually long double is the worst case.  */
  11.912 - #ifndef ALIGNBYTES
  11.913 -+#if defined(__GNUC__)
  11.914 - #define ALIGNBYTES	(__alignof__ (long double) - 1)
  11.915 -+#else
  11.916 -+/* not accurate enough (usually too large), but sufficient (and this way equal safe) */
  11.917 -+#define ALIGNBYTES	(sizeof (long double) - 1)
  11.918 -+#endif
  11.919 - #endif
  11.920 - /* Align P to that size.  */
  11.921 - #ifndef ALIGN
  11.922 -@@ -107,9 +146,13 @@
  11.923 - 	/*@modifies fileSystem, internalState @*/;
  11.924 - 
  11.925 - #ifndef MAX
  11.926 -+#if defined(__GNUC__)
  11.927 - #define MAX(a, b)	({ __typeof__ (a) _a = (a); \
  11.928 - 			   __typeof__ (b) _b = (b); \
  11.929 - 			   _a > _b ? _a : _b; })
  11.930 -+#else
  11.931 -+#define MAX(a, b)   ((a) > (b) ? (a) : (b))
  11.932 -+#endif
  11.933 - #endif
  11.934 - 
  11.935 - #define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
  11.936 -@@ -719,7 +762,7 @@
  11.937 - 	 */
  11.938 - 	cderrno = 0;
  11.939 - 	if (nlinks || type == BREAD) {
  11.940 --		if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
  11.941 -+		if (fts_safe_changedir(sp, cur, locdirfd(dirp), NULL)) {
  11.942 - 			if (nlinks && type == BREAD)
  11.943 - 				cur->fts_errno = errno;
  11.944 - 			cur->fts_flags |= FTS_DONTCHDIR;
  11.945 -
  11.946 -+---------------------------------------------------------------------------
  11.947 -| Remove inclusion of system <glob.h> because RPM uses its own glob(3)
  11.948 -| implementation and this can conflict with the system one.
  11.949 -+---------------------------------------------------------------------------
  11.950 -Index: rpmio/rpmio.h
  11.951 ---- rpmio/rpmio.h	12 Jun 2003 18:22:18 -0000	1.1.1.7
  11.952 -+++ rpmio/rpmio.h	22 Jan 2004 21:42:33 -0000	1.2
  11.953 -@@ -9,9 +9,6 @@
  11.954 - #include <sys/types.h>
  11.955 - #include <sys/stat.h>
  11.956 - #include <dirent.h>
  11.957 --/*@-noparams@*/
  11.958 --#include <glob.h>
  11.959 --/*@=noparams@*/
  11.960 - #include <stdio.h>
  11.961 - #include <stdlib.h>
  11.962 - #include <unistd.h>
  11.963 -
  11.964 -+---------------------------------------------------------------------------
  11.965 -| Make this whole "dirent" fiddling at least working on
  11.966 -| FreeBSD/NetBSD/OpenBSD, Solaris, HPUX and Unixware. This certainly
  11.967 -| is a bad corner of RPM which inherently leads to portability
  11.968 -| problems.
  11.969 -+---------------------------------------------------------------------------
  11.970 -Index: rpmio/rpmrpc.c
  11.971 ---- rpmio/rpmrpc.c	29 May 2003 22:14:04 -0000	1.1.1.8
  11.972 -+++ rpmio/rpmrpc.c	8 Jun 2005 13:16:26 -0000	1.5
  11.973 -@@ -1079,6 +1079,8 @@
  11.974 -     return rc;
  11.975 - }
  11.976 - 
  11.977 -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(sun) && !defined(OPENPKG_DARWIN)
  11.978 -+
  11.979 - struct __dirstream {
  11.980 -     int fd;			/* File descriptor.  */
  11.981 -     char * data;		/* Directory block.  */
  11.982 -@@ -1091,6 +1093,8 @@
  11.983 - #endif
  11.984 - };
  11.985 - 
  11.986 -+#endif
  11.987 -+
  11.988 - #if !defined(DT_DIR)
  11.989 - # define DT_UNKNOWN	0
  11.990 - # define DT_FIFO	1
  11.991 -@@ -1101,14 +1105,30 @@
  11.992 - # define DT_LNK		10
  11.993 - # define DT_SOCK	12
  11.994 - # define DT_WHT		14
  11.995 --typedef struct __dirstream *	FTPDIR;
  11.996 --#else
  11.997 --typedef DIR *			FTPDIR;
  11.998 - #endif
  11.999 - 
 11.1000 -+struct mydirstreament {
 11.1001 -+    unsigned char type;
 11.1002 -+    char *name;
 11.1003 -+};
 11.1004 -+struct mydirstream {
 11.1005 -+    DIR dir;
 11.1006 -+    struct dirent ent;
 11.1007 -+    unsigned int offset;
 11.1008 -+    unsigned int size;
 11.1009 -+    struct mydirstreament av[1];
 11.1010 -+};
 11.1011 -+typedef struct mydirstream *FTPDIR;
 11.1012 -+
 11.1013 - /*@unchecked@*/
 11.1014 - static int ftpmagicdir = 0x8440291;
 11.1015 --#define	ISFTPMAGIC(_dir) (!memcmp((_dir), &ftpmagicdir, sizeof(ftpmagicdir)))
 11.1016 -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(sun) && !defined(OPENPKG_UNIXWARE) && !defined(OPENPKG_DARWIN) && !defined(__osf__) && !defined(OPENPKG_IRIX64) && !defined(OPENPKG_HPUX) && !defined(OPENPKG_AIX)
 11.1017 -+#define SETFTPMAGIC(_dir) ((_dir)->fd) = ftpmagicdir
 11.1018 -+#define ISFTPMAGIC(_dir) ((_dir)->fd == ftpmagicdir)
 11.1019 -+#else
 11.1020 -+#define SETFTPMAGIC(_dir) ((_dir)->dd_fd) = ftpmagicdir
 11.1021 -+#define ISFTPMAGIC(_dir) ((_dir)->dd_fd == ftpmagicdir)
 11.1022 -+#endif
 11.1023 - 
 11.1024 - /*@-boundswrite@*/
 11.1025 - /*@-type@*/ /* FIX: abstract DIR */
 11.1026 -@@ -1121,8 +1141,7 @@
 11.1027 -     struct dirent * dp;
 11.1028 -     size_t nb;
 11.1029 -     const char * s, * sb, * se;
 11.1030 --    const char ** av;
 11.1031 --    unsigned char * dt;
 11.1032 -+    struct mydirstreament * av;
 11.1033 -     char * t;
 11.1034 -     int ac;
 11.1035 -     int c;
 11.1036 -@@ -1165,28 +1184,22 @@
 11.1037 - 	}
 11.1038 -     }
 11.1039 - 
 11.1040 --    nb += sizeof(*mydir) + sizeof(*dp) + ((ac + 1) * sizeof(*av)) + (ac + 1);
 11.1041 -+    nb = sizeof(*mydir) + (ac * sizeof(*av)) + nb;
 11.1042 -     mydir = xcalloc(1, nb);
 11.1043 -     /*@-abstract@*/
 11.1044 --    dp = (struct dirent *) (mydir + 1);
 11.1045 --    av = (const char **) (dp + 1);
 11.1046 --    dt = (char *) (av + (ac + 1));
 11.1047 --    t = (char *) (dt + ac + 1);
 11.1048 -+    dp = &mydir->ent;
 11.1049 -+    av = &mydir->av[0];
 11.1050 -+    t  = (char *)&mydir->av[ac+1];
 11.1051 -     /*@=abstract@*/
 11.1052 - 
 11.1053 --    mydir->fd = ftpmagicdir;
 11.1054 --/*@-usereleased@*/
 11.1055 --    mydir->data = (char *) dp;
 11.1056 --/*@=usereleased@*/
 11.1057 --    mydir->allocation = nb;
 11.1058 --    mydir->size = ac;
 11.1059 --    mydir->offset = -1;
 11.1060 --    mydir->filepos = 0;
 11.1061 -+    SETFTPMAGIC((DIR *)mydir);
 11.1062 -+    mydir->size   = ac;
 11.1063 -+    mydir->offset = 0;
 11.1064 - 
 11.1065 -     ac = 0;
 11.1066 -     /*@-dependenttrans -unrecog@*/
 11.1067 --    dt[ac] = DT_DIR;	av[ac++] = t;	t = stpcpy(t, ".");	t++;
 11.1068 --    dt[ac] = DT_DIR;	av[ac++] = t;	t = stpcpy(t, "..");	t++;
 11.1069 -+    av[ac].type = DT_DIR; av[ac].name = t; t = stpcpy(t, ".");  ++ac;
 11.1070 -+    av[ac].type = DT_DIR; av[ac].name = t; t = stpcpy(t, ".."); ++ac;
 11.1071 -     /*@=dependenttrans =unrecog@*/
 11.1072 -     sb = NULL;
 11.1073 -     s = se = ftpBuf;
 11.1074 -@@ -1198,34 +1211,34 @@
 11.1075 - 	    /*@switchbreak@*/ break;
 11.1076 - 	case '\r':
 11.1077 - 	    /*@-dependenttrans@*/
 11.1078 --	    av[ac] = t;
 11.1079 -+	    av[ac].name = t;
 11.1080 - 	    /*@=dependenttrans@*/
 11.1081 - 	    if (sb == NULL) {
 11.1082 - 		/*@-unrecog@*/
 11.1083 - 		switch(*s) {
 11.1084 - 		case 'p':
 11.1085 --		    dt[ac] = DT_FIFO;
 11.1086 -+		    av[ac].type = DT_FIFO;
 11.1087 - 		    /*@innerbreak@*/ break;
 11.1088 - 		case 'c':
 11.1089 --		    dt[ac] = DT_CHR;
 11.1090 -+		    av[ac].type = DT_CHR;
 11.1091 - 		    /*@innerbreak@*/ break;
 11.1092 - 		case 'd':
 11.1093 --		    dt[ac] = DT_DIR;
 11.1094 -+		    av[ac].type = DT_DIR;
 11.1095 - 		    /*@innerbreak@*/ break;
 11.1096 - 		case 'b':
 11.1097 --		    dt[ac] = DT_BLK;
 11.1098 -+		    av[ac].type = DT_BLK;
 11.1099 - 		    /*@innerbreak@*/ break;
 11.1100 - 		case '-':
 11.1101 --		    dt[ac] = DT_REG;
 11.1102 -+		    av[ac].type = DT_REG;
 11.1103 - 		    /*@innerbreak@*/ break;
 11.1104 - 		case 'l':
 11.1105 --		    dt[ac] = DT_LNK;
 11.1106 -+		    av[ac].type = DT_LNK;
 11.1107 - 		    /*@innerbreak@*/ break;
 11.1108 - 		case 's':
 11.1109 --		    dt[ac] = DT_SOCK;
 11.1110 -+		    av[ac].type = DT_SOCK;
 11.1111 - 		    /*@innerbreak@*/ break;
 11.1112 - 		default:
 11.1113 --		    dt[ac] = DT_UNKNOWN;
 11.1114 -+		    av[ac].type = DT_UNKNOWN;
 11.1115 - 		    /*@innerbreak@*/ break;
 11.1116 - 		}
 11.1117 - 		/*@=unrecog@*/
 11.1118 -@@ -1243,7 +1256,7 @@
 11.1119 - 	    /*@switchbreak@*/ break;
 11.1120 - 	}
 11.1121 -     }
 11.1122 --    av[ac] = NULL;
 11.1123 -+    av[ac].name = NULL;
 11.1124 - 
 11.1125 - /*@-kepttrans@*/
 11.1126 -     return (DIR *) mydir;
 11.1127 -@@ -1258,43 +1271,50 @@
 11.1128 - {
 11.1129 -     FTPDIR mydir = (FTPDIR)dir;
 11.1130 -     struct dirent * dp;
 11.1131 --    const char ** av;
 11.1132 --    unsigned char * dt;
 11.1133 -+    struct mydirstreament * av;
 11.1134 -     int ac;
 11.1135 -     int i;
 11.1136 - 
 11.1137 -     /*@+voidabstract@*/
 11.1138 --    if (mydir == NULL || !ISFTPMAGIC(mydir) || mydir->data == NULL) {
 11.1139 -+    if (dir == NULL || !ISFTPMAGIC(dir)) {
 11.1140 - 	/* XXX TODO: EBADF errno. */
 11.1141 - 	return NULL;
 11.1142 -     }
 11.1143 -     /*@=voidabstract@*/
 11.1144 - 
 11.1145 --    dp = (struct dirent *) mydir->data;
 11.1146 --    av = (const char **) (dp + 1);
 11.1147 -+    dp = &mydir->ent;
 11.1148 -+    av = &mydir->av[0];
 11.1149 -     ac = mydir->size;
 11.1150 --    dt = (char *) (av + (ac + 1));
 11.1151 --    i = mydir->offset + 1;
 11.1152 -+    i  = mydir->offset + 1;
 11.1153 - 
 11.1154 - /*@-boundsread@*/
 11.1155 --    if (i < 0 || i >= ac || av[i] == NULL)
 11.1156 -+    if (i < 0 || i >= ac || av[i].name == NULL)
 11.1157 - 	return NULL;
 11.1158 - /*@=boundsread@*/
 11.1159 - 
 11.1160 -     mydir->offset = i;
 11.1161 - 
 11.1162 -+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENPKG_DARWIN)
 11.1163 -+    dp->d_ino = i + 1;
 11.1164 -+    dp->d_reclen = 0;
 11.1165 -+    dp->d_type = av[i].type;
 11.1166 -+    strncpy(dp->d_name, av[i].name, sizeof(dp->d_name) - 1);
 11.1167 -+    dp->d_name[sizeof(dp->d_name)-1] = '\0';
 11.1168 -+    dp->d_namlen = strlen(dp->d_name);
 11.1169 -+#elif defined(OPENPKG_HPUX) || defined(sun) || defined(OPENPKG_UNIXWARE) || defined(__osf__) || defined(OPENPKG_IRIX64) || defined(OPENPKG_AIX)
 11.1170 -+    /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
 11.1171 -+    dp->d_ino = i + 1;		/* W2DO? */
 11.1172 -+    dp->d_reclen = 0;		/* W2DO? */
 11.1173 -+    strncpy(dp->d_name, av[i].name, sizeof(dp->d_name));
 11.1174 -+#else
 11.1175 -     /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
 11.1176 -     dp->d_ino = i + 1;		/* W2DO? */
 11.1177 -     dp->d_reclen = 0;		/* W2DO? */
 11.1178 --
 11.1179 --#if !defined(hpux) && !defined(sun)
 11.1180 -     dp->d_off = 0;		/* W2DO? */
 11.1181 --/*@-boundsread@*/
 11.1182 --    dp->d_type = dt[i];
 11.1183 --/*@=boundsread@*/
 11.1184 -+    dp->d_type = av[i].type;
 11.1185 -+    strncpy(dp->d_name, av[i].name, sizeof(dp->d_name));
 11.1186 - #endif
 11.1187 - 
 11.1188 --    strncpy(dp->d_name, av[i], sizeof(dp->d_name));
 11.1189 - /*@+voidabstract@*/
 11.1190 - if (_ftp_debug)
 11.1191 - fprintf(stderr, "*** ftpReaddir(%p) %p \"%s\"\n", (void *)mydir, dp, dp->d_name);
 11.1192 -@@ -1313,7 +1333,7 @@
 11.1193 -     /*@+voidabstract@*/
 11.1194 - if (_ftp_debug)
 11.1195 - fprintf(stderr, "*** ftpClosedir(%p)\n", (void *)mydir);
 11.1196 --    if (mydir == NULL || !ISFTPMAGIC(mydir)) {
 11.1197 -+    if (dir == NULL || !ISFTPMAGIC(dir)) {
 11.1198 - 	/* XXX TODO: EBADF errno. */
 11.1199 - 	return -1;
 11.1200 -     }
 11.1201 -
 11.1202 -+---------------------------------------------------------------------------
 11.1203 -| Remove inclusion of ancient (and since years deprecated) <malloc.h>
 11.1204 -| header. This especially makes sure RPM build does not break on
 11.1205 -| strict platforms like FreeBSD 5.
 11.1206 -+---------------------------------------------------------------------------
 11.1207 -Index: system.h
 11.1208 ---- system.h	1 Mar 2003 19:53:08 -0000	1.1.1.10
 11.1209 -+++ system.h	8 Jun 2005 13:15:16 -0000	1.4
 11.1210 -@@ -256,10 +256,6 @@
 11.1211 - #include <err.h>
 11.1212 - #endif
 11.1213 - 
 11.1214 --#if HAVE_MALLOC_H && !defined(__LCLINT__)
 11.1215 --#include <malloc.h>
 11.1216 --#endif
 11.1217 --
 11.1218 - /*@-declundef -incondefs @*/ /* FIX: these are macros */
 11.1219 - /**
 11.1220 -  */
 11.1221 -
 11.1222 -+---------------------------------------------------------------------------
 11.1223 -| Add support for BSD getmntinfo(3).
 11.1224 -+---------------------------------------------------------------------------
 11.1225 -Index: system.h
 11.1226 ---- system.h	1 Mar 2003 19:53:08 -0000	1.1.1.10
 11.1227 -+++ system.h	8 Jun 2005 13:15:16 -0000	1.4
 11.1228 -@@ -546,7 +546,7 @@
 11.1229 - #define lchown chown
 11.1230 - #endif
 11.1231 - 
 11.1232 --#if HAVE_GETMNTINFO_R || HAVE_MNTCTL
 11.1233 -+#if HAVE_GETMNTINFO_R || HAVE_GETMNTINFO || HAVE_MNTCTL
 11.1234 - # define GETMNTENT_ONE 0
 11.1235 - # define GETMNTENT_TWO 0
 11.1236 - # if HAVE_SYS_MNTCTL_H
 11.1237 -
 11.1238 -+---------------------------------------------------------------------------
 11.1239 -| Drop GCC "inline" attribute if not compiling with GCC.
 11.1240 -+---------------------------------------------------------------------------
 11.1241 -Index: system.h
 11.1242 ---- system.h	1 Mar 2003 19:53:08 -0000	1.1.1.10
 11.1243 -+++ system.h	8 Jun 2005 13:15:16 -0000	1.4
 11.1244 -@@ -599,11 +599,24 @@
 11.1245 - 
 11.1246 - #if defined(__LCLINT__)
 11.1247 - #define FILE_RCSID(id)
 11.1248 --#else
 11.1249 -+#elif defined(__GNUC__)
 11.1250 - #define FILE_RCSID(id) \
 11.1251 - static inline const char *rcsid(const char *p) { \
 11.1252 -         return rcsid(p = id); \
 11.1253 - }
 11.1254 -+#else
 11.1255 -+#define FILE_RCSID(id) \
 11.1256 -+static const char *rcsid(const char *p) { \
 11.1257 -+        return rcsid(p = id); \
 11.1258 -+}
 11.1259 -+#endif
 11.1260 -+
 11.1261 -+/* for basename(3) and dirname(3) */
 11.1262 -+#if !defined(OPENPKG_AIX)
 11.1263 -+#include <libgen.h>
 11.1264 -+#endif
 11.1265 -+#if defined(OPENPKG_AIX)
 11.1266 -+#define unsetenv(x) /* unsetenv() is used in RPM just for malloc debugging purposes */
 11.1267 - #endif
 11.1268 - 
 11.1269 - #endif	/* H_SYSTEM */
 11.1270 -
 11.1271 -+---------------------------------------------------------------------------
 11.1272 -| Remove GCC'ism.
 11.1273 -+---------------------------------------------------------------------------
 11.1274 -Index: build/rpmfile.h
 11.1275 ---- build/rpmfile.h	24 Jan 2003 19:41:56 -0000	1.1.1.1
 11.1276 -+++ build/rpmfile.h	22 Jan 2004 21:42:14 -0000	1.2
 11.1277 -@@ -95,7 +95,11 @@
 11.1278 - 	} value;		/* either number or string */
 11.1279 - 	uint32_t mask;	/* mask before comparison with value */
 11.1280 - 	char desc[MAXDESC];	/* description */
 11.1281 -+#if defined(__GNUC__)
 11.1282 - } __attribute__((__packed__));
 11.1283 -+#else
 11.1284 -+};
 11.1285 -+#endif
 11.1286 - 
 11.1287 - #define BIT(A)   (1 << (A))
 11.1288 - #define STRING_IGNORE_LOWERCASE		BIT(0)
 11.1289 -
 11.1290 -+---------------------------------------------------------------------------
 11.1291 -| Better portability for madvise(2) usage.
 11.1292 -+---------------------------------------------------------------------------
 11.1293 -Index: rpmdb/legacy.c
 11.1294 ---- rpmdb/legacy.c	18 Dec 2002 22:40:19 -0000	1.1.1.4
 11.1295 -+++ rpmdb/legacy.c	22 Jan 2004 21:42:30 -0000	1.2
 11.1296 -@@ -182,7 +182,7 @@
 11.1297 - 	    break;
 11.1298 - 	}
 11.1299 - 
 11.1300 --#ifdef	MADV_SEQUENTIAL
 11.1301 -+#if defined(HAVE_MADVISE) && defined(MADV_SEQUENTIAL)
 11.1302 -         xx = madvise(mapped, fsize, MADV_SEQUENTIAL);
 11.1303 - #endif
 11.1304 - 
 11.1305 -
 11.1306 -+---------------------------------------------------------------------------
 11.1307 -| Better portability for madvise(2) usage.
 11.1308 -+---------------------------------------------------------------------------
 11.1309 -Index: lib/fsm.c
 11.1310 ---- lib/fsm.c	3 Mar 2003 21:28:12 -0000	1.1.1.5
 11.1311 -+++ lib/fsm.c	22 Jan 2004 21:42:23 -0000	1.2
 11.1312 -@@ -879,7 +879,7 @@
 11.1313 - 	    rdbuf = fsm->rdbuf;
 11.1314 - 	    fsm->rdbuf = (char *) mapped;
 11.1315 - 	    fsm->rdlen = nmapped = st->st_size;
 11.1316 --#if defined(MADV_DONTNEED)
 11.1317 -+#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED)
 11.1318 - 	    xx = madvise(mapped, nmapped, MADV_DONTNEED);
 11.1319 - #endif
 11.1320 - 	}
 11.1321 -@@ -909,7 +909,7 @@
 11.1322 - #if HAVE_MMAP
 11.1323 - 	if (mapped != (void *)-1) {
 11.1324 - 	    xx = msync(mapped, nmapped, MS_ASYNC);
 11.1325 --#if defined(MADV_DONTNEED)
 11.1326 -+#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED)
 11.1327 - 	    xx = madvise(mapped, nmapped, MADV_DONTNEED);
 11.1328 - #endif
 11.1329 - 	    /*@-noeffect@*/ xx = munmap(mapped, nmapped) /*@=noeffect@*/;
 11.1330 -
 11.1331 -+---------------------------------------------------------------------------
 11.1332 -| Support UnixWare 7.1.3 and OpenDarwin 6.6.2, too.
 11.1333 -+---------------------------------------------------------------------------
 11.1334 -Index: aclocal.m4
 11.1335 ---- aclocal.m4	16 Jul 2003 17:05:28 -0000	1.1.1.10
 11.1336 -+++ aclocal.m4	6 Jun 2005 15:53:03 -0000	1.4
 11.1337 -@@ -2838,7 +2838,7 @@
 11.1338 -     runpath_var=LD_RUN_PATH
 11.1339 -     ;;
 11.1340 - 
 11.1341 --  sysv5uw7* | unixware7*)
 11.1342 -+  sysv5uw7* | unixware7* | sysv5UnixWare7* )
 11.1343 -     no_undefined_flag='${wl}-z ${wl}text'
 11.1344 -     if test "$GCC" = yes; then
 11.1345 -       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 11.1346 -@@ -4311,6 +4311,7 @@
 11.1347 -     ;;
 11.1348 -   *) # Darwin 1.3 on
 11.1349 -     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
 11.1350 -+    lt_cv_deplibs_check_method=pass_all
 11.1351 -     ;;
 11.1352 -   esac
 11.1353 -   ;;
 11.1354 -@@ -4336,7 +4337,7 @@
 11.1355 -   ;;
 11.1356 - 
 11.1357 - hpux10.20*|hpux11*)
 11.1358 --  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 11.1359 -+  lt_cv_deplibs_check_method='pass_all'
 11.1360 -   lt_cv_file_magic_cmd=/usr/bin/file
 11.1361 -   lt_cv_file_magic_test_file=/usr/lib/libc.sl
 11.1362 -   ;;
 11.1363 -@@ -4375,11 +4376,7 @@
 11.1364 -   ;;
 11.1365 - 
 11.1366 - netbsd*)
 11.1367 --  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 11.1368 --    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
 11.1369 --  else
 11.1370 --    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
 11.1371 --  fi
 11.1372 -+  lt_cv_deplibs_check_method='pass_all'
 11.1373 -   ;;
 11.1374 - 
 11.1375 - newos6*)
 11.1376 -@@ -4414,7 +4411,7 @@
 11.1377 -   lt_cv_file_magic_test_file=/lib/libc.so
 11.1378 -   ;;
 11.1379 - 
 11.1380 --sysv5uw[[78]]* | sysv4*uw2*)
 11.1381 -+sysv5uw[[78]]* | sysv4*uw2* | sysv5UnixWare7* )
 11.1382 -   lt_cv_deplibs_check_method=pass_all
 11.1383 -   ;;
 11.1384 - 
 11.1385 -
 11.1386 -+---------------------------------------------------------------------------
 11.1387 -| Use Linux i386 assembly specific stuff on Linux only.
 11.1388 -+---------------------------------------------------------------------------
 11.1389 -Index: rpmio/rpmsw.c
 11.1390 ---- rpmio/rpmsw.c	5 Jun 2003 12:04:05 -0000	1.1.1.1
 11.1391 -+++ rpmio/rpmsw.c	22 Jan 2004 21:42:33 -0000	1.2
 11.1392 -@@ -27,7 +27,7 @@
 11.1393 - /*@unchecked@*/
 11.1394 - static int rpmsw_initialized = 0;
 11.1395 - 
 11.1396 --#if defined(__i386__)
 11.1397 -+#if defined(__linux__) && defined(__i386__)
 11.1398 - /* Swiped from glibc-2.3.2 sysdeps/i386/i686/hp-timing.h */
 11.1399 - 
 11.1400 - #define	HP_TIMING_ZERO(Var)	(Var) = (0)
 11.1401 -
 11.1402 -+---------------------------------------------------------------------------
 11.1403 -| Fix "environ" declaration.
 11.1404 -+---------------------------------------------------------------------------
 11.1405 -Index: lib/signature.c
 11.1406 ---- lib/signature.c	29 May 2003 18:42:23 -0000	1.1.1.23
 11.1407 -+++ lib/signature.c	22 Jan 2004 21:42:25 -0000	1.2
 11.1408 -@@ -27,7 +27,7 @@
 11.1409 - /*@access pgpDigParams@*/
 11.1410 - 
 11.1411 - #if !defined(__GLIBC__)
 11.1412 --char ** environ = NULL;
 11.1413 -+extern char ** environ;
 11.1414 - #endif
 11.1415 - 
 11.1416 - int rpmLookupSignatureType(int action)
 11.1417 -
 11.1418 -+---------------------------------------------------------------------------
 11.1419 -| Rename own mergesort(3) implementation to avoid conflicts
 11.1420 -| with a possibly existing vendor version.
 11.1421 -+---------------------------------------------------------------------------
 11.1422 -Index: rpmdb/merge.c
 11.1423 ---- rpmdb/merge.c	22 Jun 2002 18:51:58 -0000	1.1.1.2
 11.1424 -+++ rpmdb/merge.c	22 Jan 2004 21:42:30 -0000	1.2
 11.1425 -@@ -204,7 +204,7 @@
 11.1426 -  * Arguments are as for qsort.
 11.1427 -  */
 11.1428 - int
 11.1429 --mergesort(void *base, size_t nmemb, size_t size,
 11.1430 -+rpmdb_mergesort(void *base, size_t nmemb, size_t size,
 11.1431 - 		int (*cmp) (const void *, const void *))
 11.1432 - {
 11.1433 - 	register int i, sense;
 11.1434 -
 11.1435 -+---------------------------------------------------------------------------
 11.1436 -| Rename own mergesort(3) implementation to avoid conflicts
 11.1437 -| with a possibly existing vendor version.
 11.1438 -+---------------------------------------------------------------------------
 11.1439 -Index: rpmdb/rpmdb.h
 11.1440 ---- rpmdb/rpmdb.h	18 Jan 2003 14:04:35 -0000	1.1.1.5
 11.1441 -+++ rpmdb/rpmdb.h	22 Jan 2004 21:42:31 -0000	1.2
 11.1442 -@@ -1080,7 +1080,7 @@
 11.1443 -  * Mergesort, same arguments as qsort(2).
 11.1444 -  */
 11.1445 - /*@unused@*/
 11.1446 --int mergesort(void *base, size_t nmemb, size_t size,
 11.1447 -+int rpmdb_mergesort(void *base, size_t nmemb, size_t size,
 11.1448 -                 int (*cmp) (const void *, const void *))
 11.1449 - 	/*@globals errno @*/
 11.1450 - 	/*@modifies base, errno @*/;
 11.1451 -
 11.1452 -+---------------------------------------------------------------------------
 11.1453 -| Rename own mergesort(3) implementation to avoid conflicts
 11.1454 -| with a possibly existing vendor version.
 11.1455 -+---------------------------------------------------------------------------
 11.1456 -Index: rpmdb/rpmdb.c
 11.1457 ---- rpmdb/rpmdb.c	2 Jul 2003 19:21:54 -0000	1.1.1.6
 11.1458 -+++ rpmdb/rpmdb.c	22 Jan 2004 21:42:30 -0000	1.2
 11.1459 -@@ -2361,7 +2361,7 @@
 11.1460 - 		sizeof(*mi->mi_set->recs), hdrNumCmp);
 11.1461 - /*@=boundsread@*/
 11.1462 - #else
 11.1463 --	mergesort(mi->mi_set->recs, mi->mi_set->count,
 11.1464 -+	rpmdb_mergesort(mi->mi_set->recs, mi->mi_set->count,
 11.1465 - 		sizeof(*mi->mi_set->recs), hdrNumCmp);
 11.1466 - #endif
 11.1467 - 	mi->mi_sorted = 1;
 11.1468 -
 11.1469 -+---------------------------------------------------------------------------
 11.1470 -| Workaround a double-inclusion problem under AIX.
 11.1471 -+---------------------------------------------------------------------------
 11.1472 -Index: lib/getdate.y
 11.1473 ---- lib/getdate.y	24 Sep 2001 21:53:15 -0000	1.1.1.2
 11.1474 -+++ lib/getdate.y	8 Jun 2005 13:16:22 -0000	1.2
 11.1475 -@@ -30,7 +30,9 @@
 11.1476 - #undef static
 11.1477 - #endif
 11.1478 - 
 11.1479 -+#ifndef OPENPKG_AIX
 11.1480 - #include <stdio.h>
 11.1481 -+#endif
 11.1482 - #include <ctype.h>
 11.1483 - 
 11.1484 - /* The code at the top of get_date which figures out the offset of the
 11.1485 -
 11.1486 -+---------------------------------------------------------------------------
 11.1487 -| Workaround a double-inclusion problem under AIX.
 11.1488 -+---------------------------------------------------------------------------
 11.1489 -Index: lib/getdate.c
 11.1490 ---- lib/getdate.c	2 Jul 2003 19:21:45 -0000	1.1.1.4
 11.1491 -+++ lib/getdate.c	8 Jun 2005 13:16:21 -0000	1.2
 11.1492 -@@ -50,7 +50,9 @@
 11.1493 - #undef static
 11.1494 - #endif
 11.1495 - 
 11.1496 -+#ifndef OPENPKG_AIX
 11.1497 - #include <stdio.h>
 11.1498 -+#endif
 11.1499 - #include <ctype.h>
 11.1500 - 
 11.1501 - /* The code at the top of get_date which figures out the offset of the
 11.1502 -
 11.1503 -+---------------------------------------------------------------------------
 11.1504 -| The following patch works around a general failure of RPM to
 11.1505 -| adhere to the ISO C standard, for which newer GCC releases claim
 11.1506 -| compile errors and fail.
 11.1507 -+---------------------------------------------------------------------------
 11.1508 -Index: misc/err.h
 11.1509 ---- misc/err.h	2009-01-06 22:48:16.104430941 +0100
 11.1510 -+++ misc/err.h	2009-01-06 22:47:55.944312482 +0100
 11.1511 -@@ -29,31 +29,4 @@
 11.1512 - # define __gnuc_va_list	__ptr_t
 11.1513 - #endif
 11.1514 - 
 11.1515 --__BEGIN_DECLS
 11.1516 --
 11.1517 --/* Print "program: ", FORMAT, ": ", the standard error string for errno,
 11.1518 --   and a newline, on stderr.  */
 11.1519 --extern void warn __P ((__const char *__format, ...))
 11.1520 --     __attribute__ ((__format__ (__printf__, 1, 2)));
 11.1521 --extern void vwarn __P ((__const char *__format, __gnuc_va_list))
 11.1522 --     __attribute__ ((__format__ (__printf__, 1, 0)));
 11.1523 --
 11.1524 --/* Likewise, but without ": " and the standard error string.  */
 11.1525 --extern void warnx __P ((__const char *__format, ...))
 11.1526 --     __attribute__ ((__format__ (__printf__, 1, 2)));
 11.1527 --extern void vwarnx __P ((__const char *__format, __gnuc_va_list))
 11.1528 --     __attribute__ ((__format__ (__printf__, 1, 0)));
 11.1529 --
 11.1530 --/* Likewise, and then exit with STATUS.  */
 11.1531 --extern void err __P ((int __status, __const char *__format, ...))
 11.1532 --     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
 11.1533 --extern void verr __P ((int __status, __const char *__format, __gnuc_va_list))
 11.1534 --     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
 11.1535 --extern void errx __P ((int __status, __const char *__format, ...))
 11.1536 --     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
 11.1537 --extern void verrx __P ((int __status, __const char *, __gnuc_va_list))
 11.1538 --     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
 11.1539 --
 11.1540 --__END_DECLS
 11.1541 --
 11.1542 - #endif	/* err.h */
    12.1 --- a/openpkg/rpm.patch.regen	Tue Jul 31 12:27:54 2012 +0200
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,1038 +0,0 @@
    12.4 -##
    12.5 -##  rpm.patch.regen -- Annotated OpenPKG RPM Patch file
    12.6 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
    12.7 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
    12.8 -##
    12.9 -##  This file assembles changes to existing RPM source files between
   12.10 -##  the original RedHat RPM and the OpenPKG RPM variant. It can be
   12.11 -##  automatically applied to a vanilla RedHat RPM source tree with the
   12.12 -##  'patch' tool to upgrade those files. Each patch snippet is annotated
   12.13 -##  with a short description.
   12.14 -##
   12.15 -##  Created on: 13-Sep-2006
   12.16 -##
   12.17 -##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
   12.18 -##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
   12.19 -##
   12.20 -
   12.21 -+---------------------------------------------------------------------------
   12.22 -| Corresponding patches in "config.h.in" script after regeneration from
   12.23 -| patched "configure.ac" with "autoheader".
   12.24 -+---------------------------------------------------------------------------
   12.25 -Index: config.h.in
   12.26 ---- config.h.in	16 Jul 2003 17:17:13 -0000	1.1.1.18
   12.27 -+++ config.h.in	13 Sep 2006 13:41:41 -0000
   12.28 -@@ -108,6 +108,9 @@
   12.29 - /* Define if you have the getmntent() function */
   12.30 - #undef HAVE_GETMNTENT
   12.31 - 
   12.32 -+/* Define as 1 if you have the getmntinfo() function */
   12.33 -+#undef HAVE_GETMNTINFO
   12.34 -+
   12.35 - /* Define as 1 if you have getmntinfo_r() (only osf?) */
   12.36 - #undef HAVE_GETMNTINFO_R
   12.37 - 
   12.38 -@@ -181,18 +184,12 @@
   12.39 - /* Define to 1 if you have the `port' library (-lport). */
   12.40 - #undef HAVE_LIBPORT
   12.41 - 
   12.42 --/* Define to 1 if you have the `pthread' library (-lpthread). */
   12.43 --#undef HAVE_LIBPTHREAD
   12.44 --
   12.45 - /* Define to 1 if you have the `rand' library (-lrand). */
   12.46 - #undef HAVE_LIBRAND
   12.47 - 
   12.48 - /* Define to 1 if you have the `socket' library (-lsocket). */
   12.49 - #undef HAVE_LIBSOCKET
   12.50 - 
   12.51 --/* Define to 1 if you have the `thread' library (-lthread). */
   12.52 --#undef HAVE_LIBTHREAD
   12.53 --
   12.54 - /* Define to 1 if you have the <limits.h> header file. */
   12.55 - #undef HAVE_LIMITS_H
   12.56 - 
   12.57 -@@ -259,9 +256,6 @@
   12.58 - /* Define to 1 if you have the `regcomp' function. */
   12.59 - #undef HAVE_REGCOMP
   12.60 - 
   12.61 --/* Define to 1 if you have the <semaphore.h> header file. */
   12.62 --#undef HAVE_SEMAPHORE_H
   12.63 --
   12.64 - /* Define to 1 if you have the `setenv' function. */
   12.65 - #undef HAVE_SETENV
   12.66 - 
   12.67 -@@ -323,9 +317,6 @@
   12.68 - /* Define as 1 if you have "struct mnttab" (only sco?) */
   12.69 - #undef HAVE_STRUCT_MNTTAB
   12.70 - 
   12.71 --/* Define to 1 if you have the <synch.h> header file. */
   12.72 --#undef HAVE_SYNCH_H
   12.73 --
   12.74 - /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
   12.75 -    */
   12.76 - #undef HAVE_SYS_DIR_H
   12.77 -@@ -391,9 +382,6 @@
   12.78 - /* Define as 1 if <sys/stat.h> defines S_ISSOCK */
   12.79 - #undef HAVE_S_ISSOCK
   12.80 - 
   12.81 --/* Define to 1 if you have the <thread.h> header file. */
   12.82 --#undef HAVE_THREAD_H
   12.83 --
   12.84 - /* Define to 1 if you have the `tsearch' function. */
   12.85 - #undef HAVE_TSEARCH
   12.86 - 
   12.87 -@@ -586,6 +574,17 @@
   12.88 - /* Define to `unsigned' if <sys/types.h> does not define. */
   12.89 - #undef size_t
   12.90 - 
   12.91 -+#ifndef HAVE_STDINT_H
   12.92 -+/* uint16_t */
   12.93 -+#undef uint16_t
   12.94 -+
   12.95 -+/* uint32_t */
   12.96 -+#undef uint32_t
   12.97 -+
   12.98 -+/* uint8_t */
   12.99 -+#undef uint8_t
  12.100 -+#endif
  12.101 -+
  12.102 - /* Define to unsigned long or unsigned long long if <inttypes.h> and
  12.103 -    <stdint.h> don't define. */
  12.104 - #undef uintmax_t
  12.105 -
  12.106 -+---------------------------------------------------------------------------
  12.107 -| Corresponding patches in "configure" script after regeneration from
  12.108 -| patched "configure.ac" with "autoconf".
  12.109 -+---------------------------------------------------------------------------
  12.110 -Index: configure
  12.111 ---- configure	16 Jul 2003 17:05:55 -0000	1.1.1.23
  12.112 -+++ configure	13 Sep 2006 13:41:43 -0000
  12.113 -@@ -467,7 +467,7 @@
  12.114 - # include <unistd.h>
  12.115 - #endif"
  12.116 - 
  12.117 --ac_subdirs_all="$ac_subdirs_all popt beecrypt zlib elfutils file db3"
  12.118 -+ac_subdirs_all="$ac_subdirs_all popt zlib elfutils file db3"
  12.119 - ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS RPMUSER RPMUID RPMGROUP RPMGID CTAGS CSCOPE LDFLAGS_STATIC LDFLAGS_NPTL FIXPERMS MKDIR MKDIR_P U ANSI2KNR LN_S ECHO RANLIB ac_ct_RANLIB LIBTOOL AR ac_ct_AR BZIP2BIN __CAT __CHGRP __CHMOD __CHOWN __CP __CPIO __FILE __GPG __GREP GZIPBIN UNZIPBIN __ID __ID_U __INSTALL __MAKE __MKDIR __MV __PATCH __PERL PGPBIN __PYTHON __RM __RSH __SED __SSH __TAR __LD __NM __OBJCOPY __OBJDUMP __STRIP WITH_ZLIB_SUBDIR WITH_ZLIB_INCLUDE WITH_ZLIB_LIB WITH_ELFUTILS_SUBDIR WITH_LIBELF_INCLUDE WITH_LIBELF_LIB WITH_LIBDWARF_INCLUDE WITH_BEECRYPT_SUBDIR WITH_BEECRYPT_INCLUDE WITH_BEECRYPT_LIB WITH_DB_SUBDIR WITH_INTERNAL_DB DBLIBSRCS DBLIBOBJS libdb3 libdb3a WITH_BZIP2 MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS WITH_PYTHON_SUBDIR WITH_PYTHON_SUBPACKAGE WITH_PYTHON_VERSION __DOXYGEN WITH_APIDOCS_TARGET WITH_APIDOCS __CHOWN_RHF __CHGRP_RHF ROOT_GROUP varprefix tmpdir MARK64 RPMCANONCOLOR autorelocate_path RPMCANONARCH RPMCANONVENDOR RPMCANONOS LOCALEDIR LIBDIR RPMCONFIGDIR SYSCONFIGDIR MACROFILES LIBRPMRC_FILENAME VENDORRPMRC_FILENAME LIBRPMALIAS_FILENAME FINDREQUIRES FINDPROVIDES testdir INCPATH LIBMISC RPM OBJDUMP subdirs LTLIBOBJS'
  12.120 - ac_subst_files=''
  12.121 - 
  12.122 -@@ -4040,7 +4040,7 @@
  12.123 - AS=${AS-as}
  12.124 - 
  12.125 - if test "$ac_cv_c_compiler_gnu" = yes; then
  12.126 --    CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
  12.127 -+    CFLAGS="$CFLAGS -O2 -D_GNU_SOURCE -D_REENTRANT"
  12.128 - fi
  12.129 - export CFLAGS
  12.130 - 
  12.131 -@@ -4837,16 +4837,13 @@
  12.132 - 	# just link it dynamically
  12.133 - 	LDFLAGS_STATIC=""
  12.134 - fi
  12.135 -+LDFLAGS_STATIC="" # OpenPKG wants dynamically linked RPM tools
  12.136 - LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}"	# libtool format
  12.137 - echo "$as_me:$LINENO: result: $LDFLAGS_STATIC" >&5
  12.138 - echo "${ECHO_T}$LDFLAGS_STATIC" >&6
  12.139 - 
  12.140 - 
  12.141 - LDFLAGS_NPTL=
  12.142 --if test -f /usr/lib/nptl/libpthread.a ; then
  12.143 --    LDFLAGS_NPTL="-L/usr/lib/nptl"
  12.144 --#    INCPATH="$INCPATH -I/usr/include/nptl"
  12.145 --fi
  12.146 - 
  12.147 - 
  12.148 - echo "$as_me:$LINENO: checking POSIX chmod" >&5
  12.149 -@@ -4937,7 +4934,7 @@
  12.150 - if test X"$MKDIR_P" = X0 ; then
  12.151 - 	echo "$as_me:$LINENO: result: no" >&5
  12.152 - echo "${ECHO_T}no" >&6
  12.153 --	MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
  12.154 -+	MKDIR_P="@l_prefix@/lib/openpkg/shtool mkdir -f -p -m 755"
  12.155 - else
  12.156 - 	echo "$as_me:$LINENO: result: yes" >&5
  12.157 - echo "${ECHO_T}yes" >&6
  12.158 -@@ -5878,6 +5875,7 @@
  12.159 -     ;;
  12.160 -   *) # Darwin 1.3 on
  12.161 -     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
  12.162 -+    lt_cv_deplibs_check_method=pass_all
  12.163 -     ;;
  12.164 -   esac
  12.165 -   ;;
  12.166 -@@ -5903,7 +5901,7 @@
  12.167 -   ;;
  12.168 - 
  12.169 - hpux10.20*|hpux11*)
  12.170 --  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
  12.171 -+  lt_cv_deplibs_check_method='pass_all'
  12.172 -   lt_cv_file_magic_cmd=/usr/bin/file
  12.173 -   lt_cv_file_magic_test_file=/usr/lib/libc.sl
  12.174 -   ;;
  12.175 -@@ -5942,11 +5940,7 @@
  12.176 -   ;;
  12.177 - 
  12.178 - netbsd*)
  12.179 --  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  12.180 --    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  12.181 --  else
  12.182 --    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
  12.183 --  fi
  12.184 -+  lt_cv_deplibs_check_method='pass_all'
  12.185 -   ;;
  12.186 - 
  12.187 - newos6*)
  12.188 -@@ -5981,7 +5975,7 @@
  12.189 -   lt_cv_file_magic_test_file=/lib/libc.so
  12.190 -   ;;
  12.191 - 
  12.192 --sysv5uw[78]* | sysv4*uw2*)
  12.193 -+sysv5uw[78]* | sysv4*uw2* | sysv5UnixWare7* )
  12.194 -   lt_cv_deplibs_check_method=pass_all
  12.195 -   ;;
  12.196 - 
  12.197 -@@ -6682,7 +6676,7 @@
  12.198 - case $host in
  12.199 - *-*-irix6*)
  12.200 -   # Find out which ABI we are using.
  12.201 --  echo '#line 6685 "configure"' > conftest.$ac_ext
  12.202 -+  echo '#line 6679 "configure"' > conftest.$ac_ext
  12.203 -   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  12.204 -   (eval $ac_compile) 2>&5
  12.205 -   ac_status=$?
  12.206 -@@ -7211,7 +7205,7 @@
  12.207 - save_CFLAGS="$CFLAGS"
  12.208 - CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
  12.209 - compiler_c_o=no
  12.210 --if { (eval echo configure:7214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
  12.211 -+if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
  12.212 -   # The compiler can only warn and ignore the option if not recognized
  12.213 -   # So say no if there are warnings
  12.214 -   if test -s out/conftest.err; then
  12.215 -@@ -8069,7 +8063,7 @@
  12.216 -     runpath_var=LD_RUN_PATH
  12.217 -     ;;
  12.218 - 
  12.219 --  sysv5uw7* | unixware7*)
  12.220 -+  sysv5uw7* | unixware7* | sysv5UnixWare7* )
  12.221 -     no_undefined_flag='${wl}-z ${wl}text'
  12.222 -     if test "$GCC" = yes; then
  12.223 -       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  12.224 -@@ -8395,7 +8389,7 @@
  12.225 -   libsuff=
  12.226 -   case "$host_cpu" in
  12.227 -   x86_64*|s390x*)
  12.228 --    echo '#line 8398 "configure"' > conftest.$ac_ext
  12.229 -+    echo '#line 8392 "configure"' > conftest.$ac_ext
  12.230 -     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  12.231 -   (eval $ac_compile) 2>&5
  12.232 -   ac_status=$?
  12.233 -@@ -9067,7 +9061,7 @@
  12.234 -     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  12.235 -   lt_status=$lt_dlunknown
  12.236 -   cat > conftest.$ac_ext <<EOF
  12.237 --#line 9070 "configure"
  12.238 -+#line 9064 "configure"
  12.239 - #include "confdefs.h"
  12.240 - 
  12.241 - #if HAVE_DLFCN_H
  12.242 -@@ -9165,7 +9159,7 @@
  12.243 -     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  12.244 -   lt_status=$lt_dlunknown
  12.245 -   cat > conftest.$ac_ext <<EOF
  12.246 --#line 9168 "configure"
  12.247 -+#line 9162 "configure"
  12.248 - #include "confdefs.h"
  12.249 - 
  12.250 - #if HAVE_DLFCN_H
  12.251 -@@ -11266,7 +11260,7 @@
  12.252 - WITH_ZLIB_SUBDIR=
  12.253 - WITH_ZLIB_INCLUDE=
  12.254 - WITH_ZLIB_LIB=
  12.255 --if test -d zlib ; then
  12.256 -+if false; then
  12.257 -   WITH_ZLIB_SUBDIR=zlib
  12.258 -   addlib \${top_builddir}/zlib
  12.259 -   WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
  12.260 -@@ -11284,44 +11278,6 @@
  12.261 - 
  12.262 - localdone=
  12.263 - 
  12.264 --dirs=$prefix
  12.265 --if test "$cross_compiling" != "yes"; then
  12.266 --  dirs="$dirs /usr/local"
  12.267 --fi
  12.268 --for dir in $dirs
  12.269 --do
  12.270 --	case $dir in
  12.271 --	NONE|/usr)	continue;;
  12.272 --	/usr/local)
  12.273 --		if test X$localdone != X ; then continue; fi
  12.274 --		localdone="$dir"
  12.275 --		;;
  12.276 --	esac
  12.277 --
  12.278 --	echo "$as_me:$LINENO: checking for $dir/lib in LIBS" >&5
  12.279 --echo $ECHO_N "checking for $dir/lib in LIBS... $ECHO_C" >&6
  12.280 --	if test -d $dir/lib 2> /dev/null ; then
  12.281 --		addlib $dir/lib
  12.282 --		echo "$as_me:$LINENO: result: yes" >&5
  12.283 --echo "${ECHO_T}yes" >&6
  12.284 --	else
  12.285 --		echo "$as_me:$LINENO: result: no" >&5
  12.286 --echo "${ECHO_T}no" >&6
  12.287 --	fi
  12.288 --
  12.289 --	echo "$as_me:$LINENO: checking for $dir/include in INCPATH" >&5
  12.290 --echo $ECHO_N "checking for $dir/include in INCPATH... $ECHO_C" >&6
  12.291 --	if test -d $dir/include 2>/dev/null ; then
  12.292 --		if  "$dir" != "/usr/local"  ; then
  12.293 --		    INCPATH="$INCPATH -I$dir/include"
  12.294 --		fi
  12.295 --		echo "$as_me:$LINENO: result: yes" >&5
  12.296 --echo "${ECHO_T}yes" >&6
  12.297 --	else
  12.298 --		echo "$as_me:$LINENO: result: no" >&5
  12.299 --echo "${ECHO_T}no" >&6
  12.300 --	fi
  12.301 --done
  12.302 - 
  12.303 - echo "$as_me:$LINENO: checking for /usr/ucblib in LIBS" >&5
  12.304 - echo $ECHO_N "checking for /usr/ucblib in LIBS... $ECHO_C" >&6
  12.305 -@@ -12051,7 +12007,7 @@
  12.306 - #define HAVE_LIBBEECRYPT 1
  12.307 - _ACEOF
  12.308 - 
  12.309 --	    WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt"
  12.310 -+	    WITH_BEECRYPT_INCLUDE=""
  12.311 - 	    WITH_BEECRYPT_LIB="-lbeecrypt"
  12.312 - 
  12.313 - fi
  12.314 -@@ -12647,287 +12603,13 @@
  12.315 - 
  12.316 - 
  12.317 - 
  12.318 --
  12.319 --
  12.320 --
  12.321 --for ac_header in thread.h pthread.h synch.h semaphore.h
  12.322 --do
  12.323 --as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
  12.324 --if eval "test \"\${$as_ac_Header+set}\" = set"; then
  12.325 --  echo "$as_me:$LINENO: checking for $ac_header" >&5
  12.326 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
  12.327 --if eval "test \"\${$as_ac_Header+set}\" = set"; then
  12.328 --  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.329 --fi
  12.330 --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
  12.331 --echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
  12.332 --else
  12.333 --  # Is the header compilable?
  12.334 --echo "$as_me:$LINENO: checking $ac_header usability" >&5
  12.335 --echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
  12.336 --cat >conftest.$ac_ext <<_ACEOF
  12.337 --#line $LINENO "configure"
  12.338 --/* confdefs.h.  */
  12.339 --_ACEOF
  12.340 --cat confdefs.h >>conftest.$ac_ext
  12.341 --cat >>conftest.$ac_ext <<_ACEOF
  12.342 --/* end confdefs.h.  */
  12.343 --$ac_includes_default
  12.344 --#include <$ac_header>
  12.345 --_ACEOF
  12.346 --rm -f conftest.$ac_objext
  12.347 --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  12.348 --  (eval $ac_compile) 2>&5
  12.349 --  ac_status=$?
  12.350 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.351 --  (exit $ac_status); } &&
  12.352 --         { ac_try='test -s conftest.$ac_objext'
  12.353 --  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  12.354 --  (eval $ac_try) 2>&5
  12.355 --  ac_status=$?
  12.356 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.357 --  (exit $ac_status); }; }; then
  12.358 --  ac_header_compiler=yes
  12.359 --else
  12.360 --  echo "$as_me: failed program was:" >&5
  12.361 --sed 's/^/| /' conftest.$ac_ext >&5
  12.362 --
  12.363 --ac_header_compiler=no
  12.364 --fi
  12.365 --rm -f conftest.$ac_objext conftest.$ac_ext
  12.366 --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
  12.367 --echo "${ECHO_T}$ac_header_compiler" >&6
  12.368 --
  12.369 --# Is the header present?
  12.370 --echo "$as_me:$LINENO: checking $ac_header presence" >&5
  12.371 --echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
  12.372 --cat >conftest.$ac_ext <<_ACEOF
  12.373 --#line $LINENO "configure"
  12.374 --/* confdefs.h.  */
  12.375 --_ACEOF
  12.376 --cat confdefs.h >>conftest.$ac_ext
  12.377 --cat >>conftest.$ac_ext <<_ACEOF
  12.378 --/* end confdefs.h.  */
  12.379 --#include <$ac_header>
  12.380 --_ACEOF
  12.381 --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  12.382 --  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  12.383 --  ac_status=$?
  12.384 --  grep -v '^ *+' conftest.er1 >conftest.err
  12.385 --  rm -f conftest.er1
  12.386 --  cat conftest.err >&5
  12.387 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.388 --  (exit $ac_status); } >/dev/null; then
  12.389 --  if test -s conftest.err; then
  12.390 --    ac_cpp_err=$ac_c_preproc_warn_flag
  12.391 --  else
  12.392 --    ac_cpp_err=
  12.393 --  fi
  12.394 --else
  12.395 --  ac_cpp_err=yes
  12.396 --fi
  12.397 --if test -z "$ac_cpp_err"; then
  12.398 --  ac_header_preproc=yes
  12.399 --else
  12.400 --  echo "$as_me: failed program was:" >&5
  12.401 --sed 's/^/| /' conftest.$ac_ext >&5
  12.402 --
  12.403 --  ac_header_preproc=no
  12.404 --fi
  12.405 --rm -f conftest.err conftest.$ac_ext
  12.406 --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
  12.407 --echo "${ECHO_T}$ac_header_preproc" >&6
  12.408 --
  12.409 --# So?  What about this header?
  12.410 --case $ac_header_compiler:$ac_header_preproc in
  12.411 --  yes:no )
  12.412 --    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
  12.413 --echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
  12.414 --    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
  12.415 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
  12.416 --    (
  12.417 --      cat <<\_ASBOX
  12.418 --## ------------------------------------ ##
  12.419 --## Report this to bug-autoconf@gnu.org. ##
  12.420 --## ------------------------------------ ##
  12.421 --_ASBOX
  12.422 --    ) |
  12.423 --      sed "s/^/$as_me: WARNING:     /" >&2
  12.424 --    ;;
  12.425 --  no:yes )
  12.426 --    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
  12.427 --echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
  12.428 --    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
  12.429 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
  12.430 --    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
  12.431 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
  12.432 --    (
  12.433 --      cat <<\_ASBOX
  12.434 --## ------------------------------------ ##
  12.435 --## Report this to bug-autoconf@gnu.org. ##
  12.436 --## ------------------------------------ ##
  12.437 --_ASBOX
  12.438 --    ) |
  12.439 --      sed "s/^/$as_me: WARNING:     /" >&2
  12.440 --    ;;
  12.441 --esac
  12.442 --echo "$as_me:$LINENO: checking for $ac_header" >&5
  12.443 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
  12.444 --if eval "test \"\${$as_ac_Header+set}\" = set"; then
  12.445 --  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.446 --else
  12.447 --  eval "$as_ac_Header=$ac_header_preproc"
  12.448 --fi
  12.449 --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
  12.450 --echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
  12.451 --
  12.452 --fi
  12.453 --if test `eval echo '${'$as_ac_Header'}'` = yes; then
  12.454 --  cat >>confdefs.h <<_ACEOF
  12.455 --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
  12.456 --_ACEOF
  12.457 --
  12.458 --fi
  12.459 --
  12.460 --done
  12.461 --
  12.462 --
  12.463 --
  12.464 --echo "$as_me:$LINENO: checking for pthread_mutex_trylock in -lpthread" >&5
  12.465 --echo $ECHO_N "checking for pthread_mutex_trylock in -lpthread... $ECHO_C" >&6
  12.466 --if test "${ac_cv_lib_pthread_pthread_mutex_trylock+set}" = set; then
  12.467 --  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.468 --else
  12.469 --  ac_check_lib_save_LIBS=$LIBS
  12.470 --LIBS="-lpthread  $LIBS"
  12.471 --cat >conftest.$ac_ext <<_ACEOF
  12.472 --#line $LINENO "configure"
  12.473 --/* confdefs.h.  */
  12.474 --_ACEOF
  12.475 --cat confdefs.h >>conftest.$ac_ext
  12.476 --cat >>conftest.$ac_ext <<_ACEOF
  12.477 --/* end confdefs.h.  */
  12.478 --
  12.479 --/* Override any gcc2 internal prototype to avoid an error.  */
  12.480 --#ifdef __cplusplus
  12.481 --extern "C"
  12.482 --#endif
  12.483 --/* We use char because int might match the return type of a gcc2
  12.484 --   builtin and then its argument prototype would still apply.  */
  12.485 --char pthread_mutex_trylock ();
  12.486 --int
  12.487 --main ()
  12.488 --{
  12.489 --pthread_mutex_trylock ();
  12.490 --  ;
  12.491 --  return 0;
  12.492 --}
  12.493 --_ACEOF
  12.494 --rm -f conftest.$ac_objext conftest$ac_exeext
  12.495 --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  12.496 --  (eval $ac_link) 2>&5
  12.497 --  ac_status=$?
  12.498 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.499 --  (exit $ac_status); } &&
  12.500 --         { ac_try='test -s conftest$ac_exeext'
  12.501 --  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  12.502 --  (eval $ac_try) 2>&5
  12.503 --  ac_status=$?
  12.504 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.505 --  (exit $ac_status); }; }; then
  12.506 --  ac_cv_lib_pthread_pthread_mutex_trylock=yes
  12.507 --else
  12.508 --  echo "$as_me: failed program was:" >&5
  12.509 --sed 's/^/| /' conftest.$ac_ext >&5
  12.510 --
  12.511 --ac_cv_lib_pthread_pthread_mutex_trylock=no
  12.512 --fi
  12.513 --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  12.514 --LIBS=$ac_check_lib_save_LIBS
  12.515 --fi
  12.516 --echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_trylock" >&5
  12.517 --echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_trylock" >&6
  12.518 --if test $ac_cv_lib_pthread_pthread_mutex_trylock = yes; then
  12.519 --  cat >>confdefs.h <<_ACEOF
  12.520 --#define HAVE_LIBPTHREAD 1
  12.521 --_ACEOF
  12.522 --
  12.523 --  LIBS="-lpthread $LIBS"
  12.524 --
  12.525 --else
  12.526 --
  12.527 --
  12.528 --echo "$as_me:$LINENO: checking for __pthread_mutex_trylock in -lpthread" >&5
  12.529 --echo $ECHO_N "checking for __pthread_mutex_trylock in -lpthread... $ECHO_C" >&6
  12.530 --if test "${ac_cv_lib_pthread___pthread_mutex_trylock+set}" = set; then
  12.531 --  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.532 --else
  12.533 --  ac_check_lib_save_LIBS=$LIBS
  12.534 --LIBS="-lpthread  $LIBS"
  12.535 --cat >conftest.$ac_ext <<_ACEOF
  12.536 --#line $LINENO "configure"
  12.537 --/* confdefs.h.  */
  12.538 --_ACEOF
  12.539 --cat confdefs.h >>conftest.$ac_ext
  12.540 --cat >>conftest.$ac_ext <<_ACEOF
  12.541 --/* end confdefs.h.  */
  12.542 --
  12.543 --/* Override any gcc2 internal prototype to avoid an error.  */
  12.544 --#ifdef __cplusplus
  12.545 --extern "C"
  12.546 --#endif
  12.547 --/* We use char because int might match the return type of a gcc2
  12.548 --   builtin and then its argument prototype would still apply.  */
  12.549 --char __pthread_mutex_trylock ();
  12.550 --int
  12.551 --main ()
  12.552 --{
  12.553 --__pthread_mutex_trylock ();
  12.554 --  ;
  12.555 --  return 0;
  12.556 --}
  12.557 --_ACEOF
  12.558 --rm -f conftest.$ac_objext conftest$ac_exeext
  12.559 --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  12.560 --  (eval $ac_link) 2>&5
  12.561 --  ac_status=$?
  12.562 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.563 --  (exit $ac_status); } &&
  12.564 --         { ac_try='test -s conftest$ac_exeext'
  12.565 --  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  12.566 --  (eval $ac_try) 2>&5
  12.567 --  ac_status=$?
  12.568 --  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.569 --  (exit $ac_status); }; }; then
  12.570 --  ac_cv_lib_pthread___pthread_mutex_trylock=yes
  12.571 --else
  12.572 --  echo "$as_me: failed program was:" >&5
  12.573 --sed 's/^/| /' conftest.$ac_ext >&5
  12.574 --
  12.575 --ac_cv_lib_pthread___pthread_mutex_trylock=no
  12.576 --fi
  12.577 --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  12.578 --LIBS=$ac_check_lib_save_LIBS
  12.579 --fi
  12.580 --echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_trylock" >&5
  12.581 --echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_trylock" >&6
  12.582 --if test $ac_cv_lib_pthread___pthread_mutex_trylock = yes; then
  12.583 --  cat >>confdefs.h <<_ACEOF
  12.584 --#define HAVE_LIBPTHREAD 1
  12.585 --_ACEOF
  12.586 --
  12.587 --  LIBS="-lpthread $LIBS"
  12.588 --
  12.589 --else
  12.590 --
  12.591 --
  12.592 --echo "$as_me:$LINENO: checking for mutex_lock in -lthread" >&5
  12.593 --echo $ECHO_N "checking for mutex_lock in -lthread... $ECHO_C" >&6
  12.594 --if test "${ac_cv_lib_thread_mutex_lock+set}" = set; then
  12.595 -+echo "$as_me:$LINENO: checking for svc_run in -lnsl" >&5
  12.596 -+echo $ECHO_N "checking for svc_run in -lnsl... $ECHO_C" >&6
  12.597 -+if test "${ac_cv_lib_nsl_svc_run+set}" = set; then
  12.598 -   echo $ECHO_N "(cached) $ECHO_C" >&6
  12.599 - else
  12.600 -   ac_check_lib_save_LIBS=$LIBS
  12.601 --LIBS="-lthread  $LIBS"
  12.602 -+LIBS="-lnsl  $LIBS"
  12.603 - cat >conftest.$ac_ext <<_ACEOF
  12.604 - #line $LINENO "configure"
  12.605 - /* confdefs.h.  */
  12.606 -@@ -12942,11 +12624,11 @@
  12.607 - #endif
  12.608 - /* We use char because int might match the return type of a gcc2
  12.609 -    builtin and then its argument prototype would still apply.  */
  12.610 --char mutex_lock ();
  12.611 -+char svc_run ();
  12.612 - int
  12.613 - main ()
  12.614 - {
  12.615 --mutex_lock ();
  12.616 -+svc_run ();
  12.617 -   ;
  12.618 -   return 0;
  12.619 - }
  12.620 -@@ -12963,33 +12645,28 @@
  12.621 -   ac_status=$?
  12.622 -   echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.623 -   (exit $ac_status); }; }; then
  12.624 --  ac_cv_lib_thread_mutex_lock=yes
  12.625 -+  ac_cv_lib_nsl_svc_run=yes
  12.626 - else
  12.627 -   echo "$as_me: failed program was:" >&5
  12.628 - sed 's/^/| /' conftest.$ac_ext >&5
  12.629 - 
  12.630 --ac_cv_lib_thread_mutex_lock=no
  12.631 -+ac_cv_lib_nsl_svc_run=no
  12.632 - fi
  12.633 - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  12.634 - LIBS=$ac_check_lib_save_LIBS
  12.635 - fi
  12.636 --echo "$as_me:$LINENO: result: $ac_cv_lib_thread_mutex_lock" >&5
  12.637 --echo "${ECHO_T}$ac_cv_lib_thread_mutex_lock" >&6
  12.638 --if test $ac_cv_lib_thread_mutex_lock = yes; then
  12.639 -+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_svc_run" >&5
  12.640 -+echo "${ECHO_T}$ac_cv_lib_nsl_svc_run" >&6
  12.641 -+if test $ac_cv_lib_nsl_svc_run = yes; then
  12.642 -   cat >>confdefs.h <<_ACEOF
  12.643 --#define HAVE_LIBTHREAD 1
  12.644 -+#define HAVE_LIBNSL 1
  12.645 - _ACEOF
  12.646 - 
  12.647 --  LIBS="-lthread $LIBS"
  12.648 --
  12.649 --fi
  12.650 --
  12.651 -+  LIBS="-lnsl $LIBS"
  12.652 - 
  12.653 - fi
  12.654 - 
  12.655 - 
  12.656 --fi
  12.657 --
  12.658 - 
  12.659 - 
  12.660 - for ac_header in aio.h
  12.661 -@@ -22911,6 +22588,86 @@
  12.662 - 
  12.663 - else
  12.664 - 
  12.665 -+ echo "$as_me:$LINENO: checking for getmntinfo" >&5
  12.666 -+echo $ECHO_N "checking for getmntinfo... $ECHO_C" >&6
  12.667 -+if test "${ac_cv_func_getmntinfo+set}" = set; then
  12.668 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.669 -+else
  12.670 -+  cat >conftest.$ac_ext <<_ACEOF
  12.671 -+#line $LINENO "configure"
  12.672 -+/* confdefs.h.  */
  12.673 -+_ACEOF
  12.674 -+cat confdefs.h >>conftest.$ac_ext
  12.675 -+cat >>conftest.$ac_ext <<_ACEOF
  12.676 -+/* end confdefs.h.  */
  12.677 -+/* System header to define __stub macros and hopefully few prototypes,
  12.678 -+    which can conflict with char getmntinfo (); below.
  12.679 -+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  12.680 -+    <limits.h> exists even on freestanding compilers.  */
  12.681 -+#ifdef __STDC__
  12.682 -+# include <limits.h>
  12.683 -+#else
  12.684 -+# include <assert.h>
  12.685 -+#endif
  12.686 -+/* Override any gcc2 internal prototype to avoid an error.  */
  12.687 -+#ifdef __cplusplus
  12.688 -+extern "C"
  12.689 -+{
  12.690 -+#endif
  12.691 -+/* We use char because int might match the return type of a gcc2
  12.692 -+   builtin and then its argument prototype would still apply.  */
  12.693 -+char getmntinfo ();
  12.694 -+/* The GNU C library defines this for functions which it implements
  12.695 -+    to always fail with ENOSYS.  Some functions are actually named
  12.696 -+    something starting with __ and the normal name is an alias.  */
  12.697 -+#if defined (__stub_getmntinfo) || defined (__stub___getmntinfo)
  12.698 -+choke me
  12.699 -+#else
  12.700 -+char (*f) () = getmntinfo;
  12.701 -+#endif
  12.702 -+#ifdef __cplusplus
  12.703 -+}
  12.704 -+#endif
  12.705 -+
  12.706 -+int
  12.707 -+main ()
  12.708 -+{
  12.709 -+return f != getmntinfo;
  12.710 -+  ;
  12.711 -+  return 0;
  12.712 -+}
  12.713 -+_ACEOF
  12.714 -+rm -f conftest.$ac_objext conftest$ac_exeext
  12.715 -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  12.716 -+  (eval $ac_link) 2>&5
  12.717 -+  ac_status=$?
  12.718 -+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.719 -+  (exit $ac_status); } &&
  12.720 -+         { ac_try='test -s conftest$ac_exeext'
  12.721 -+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  12.722 -+  (eval $ac_try) 2>&5
  12.723 -+  ac_status=$?
  12.724 -+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.725 -+  (exit $ac_status); }; }; then
  12.726 -+  ac_cv_func_getmntinfo=yes
  12.727 -+else
  12.728 -+  echo "$as_me: failed program was:" >&5
  12.729 -+sed 's/^/| /' conftest.$ac_ext >&5
  12.730 -+
  12.731 -+ac_cv_func_getmntinfo=no
  12.732 -+fi
  12.733 -+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  12.734 -+fi
  12.735 -+echo "$as_me:$LINENO: result: $ac_cv_func_getmntinfo" >&5
  12.736 -+echo "${ECHO_T}$ac_cv_func_getmntinfo" >&6
  12.737 -+if test $ac_cv_func_getmntinfo = yes; then
  12.738 -+
  12.739 -+cat >>confdefs.h <<\_ACEOF
  12.740 -+#define HAVE_GETMNTINFO 1
  12.741 -+_ACEOF
  12.742 -+
  12.743 -+else
  12.744 -+
  12.745 -   echo "$as_me:$LINENO: checking for mntctl" >&5
  12.746 - echo $ECHO_N "checking for mntctl... $ECHO_C" >&6
  12.747 - if test "${ac_cv_func_mntctl+set}" = set; then
  12.748 -@@ -23148,6 +22905,8 @@
  12.749 - 
  12.750 - fi
  12.751 - 
  12.752 -+fi
  12.753 -+
  12.754 - 
  12.755 - echo "$as_me:$LINENO: checking for lchown" >&5
  12.756 - echo $ECHO_N "checking for lchown... $ECHO_C" >&6
  12.757 -@@ -23454,9 +23213,6 @@
  12.758 - fi
  12.759 - 
  12.760 - MARK64=
  12.761 --case "${target_cpu}" in
  12.762 --x86_64*|ppc64*|powerpc64*|sparc64*|s390x*)	MARK64=64 ;;
  12.763 --esac
  12.764 - 
  12.765 - 
  12.766 - autorelocate_path='%{nil}'
  12.767 -@@ -23515,7 +23271,7 @@
  12.768 - 
  12.769 - LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
  12.770 - 
  12.771 --RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
  12.772 -+RPMCONFIGDIR="@l_prefix@/lib/openpkg"
  12.773 - 
  12.774 - cat >>confdefs.h <<_ACEOF
  12.775 - #define RPMCONFIGDIR "$RPMCONFIGDIR"
  12.776 -@@ -23523,7 +23279,7 @@
  12.777 - 
  12.778 - 
  12.779 - 
  12.780 --SYSCONFIGDIR="`echo /etc/rpm`"
  12.781 -+SYSCONFIGDIR="@l_prefix@/etc/openpkg"
  12.782 - 
  12.783 - cat >>confdefs.h <<_ACEOF
  12.784 - #define SYSCONFIGDIR "$SYSCONFIGDIR"
  12.785 -@@ -23539,7 +23295,7 @@
  12.786 - 
  12.787 - 
  12.788 - 
  12.789 --LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
  12.790 -+LIBRPMRC_FILENAME="${SYSCONFIGDIR}/rpmrc"
  12.791 - 
  12.792 - cat >>confdefs.h <<_ACEOF
  12.793 - #define LIBRPMRC_FILENAME "$LIBRPMRC_FILENAME"
  12.794 -@@ -23547,7 +23303,7 @@
  12.795 - 
  12.796 - 
  12.797 - 
  12.798 --VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
  12.799 -+VENDORRPMRC_FILENAME="${SYSCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
  12.800 - 
  12.801 - cat >>confdefs.h <<_ACEOF
  12.802 - #define VENDORRPMRC_FILENAME "$VENDORRPMRC_FILENAME"
  12.803 -@@ -23555,7 +23311,7 @@
  12.804 - 
  12.805 - 
  12.806 - 
  12.807 --LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}"
  12.808 -+LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt"
  12.809 - 
  12.810 - cat >>confdefs.h <<_ACEOF
  12.811 - #define LIBRPMALIAS_FILENAME "$LIBRPMALIAS_FILENAME"
  12.812 -@@ -23588,9 +23344,202 @@
  12.813 - 
  12.814 - 
  12.815 - 
  12.816 -+echo "$as_me:$LINENO: checking for uint8_t" >&5
  12.817 -+echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6
  12.818 -+if test "${ac_cv_type_uint8_t+set}" = set; then
  12.819 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.820 -+else
  12.821 -+  cat >conftest.$ac_ext <<_ACEOF
  12.822 -+#line $LINENO "configure"
  12.823 -+/* confdefs.h.  */
  12.824 -+_ACEOF
  12.825 -+cat confdefs.h >>conftest.$ac_ext
  12.826 -+cat >>conftest.$ac_ext <<_ACEOF
  12.827 -+/* end confdefs.h.  */
  12.828 -+#if HAVE_STDINT_H
  12.829 -+#include <stdint.h>
  12.830 -+#endif
  12.831 -+#include <sys/types.h>
  12.832 -+#if STDC_HEADERS
  12.833 -+#include <stdlib.h>
  12.834 -+#include <stddef.h>
  12.835 -+#endif
  12.836 -+_ACEOF
  12.837 -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  12.838 -+  $EGREP "(^|[^a-zA-Z_0-9])uint8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  12.839 -+  ac_cv_type_uint8_t=yes
  12.840 -+else
  12.841 -+  ac_cv_type_uint8_t=no
  12.842 -+fi
  12.843 -+rm -f conftest*
  12.844 -+
  12.845 -+fi
  12.846 -+echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
  12.847 -+echo "${ECHO_T}$ac_cv_type_uint8_t" >&6
  12.848 -+if test $ac_cv_type_uint8_t = no; then
  12.849 -+
  12.850 -+cat >>confdefs.h <<\_ACEOF
  12.851 -+#define uint8_t unsigned char
  12.852 -+_ACEOF
  12.853 -+
  12.854 -+fi
  12.855 -+echo "$as_me:$LINENO: checking for uint16_t" >&5
  12.856 -+echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6
  12.857 -+if test "${ac_cv_type_uint16_t+set}" = set; then
  12.858 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.859 -+else
  12.860 -+  cat >conftest.$ac_ext <<_ACEOF
  12.861 -+#line $LINENO "configure"
  12.862 -+/* confdefs.h.  */
  12.863 -+_ACEOF
  12.864 -+cat confdefs.h >>conftest.$ac_ext
  12.865 -+cat >>conftest.$ac_ext <<_ACEOF
  12.866 -+/* end confdefs.h.  */
  12.867 -+#if HAVE_STDINT_H
  12.868 -+#include <stdint.h>
  12.869 -+#endif
  12.870 -+#include <sys/types.h>
  12.871 -+#if STDC_HEADERS
  12.872 -+#include <stdlib.h>
  12.873 -+#include <stddef.h>
  12.874 -+#endif
  12.875 -+_ACEOF
  12.876 -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  12.877 -+  $EGREP "(^|[^a-zA-Z_0-9])uint16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  12.878 -+  ac_cv_type_uint16_t=yes
  12.879 -+else
  12.880 -+  ac_cv_type_uint16_t=no
  12.881 -+fi
  12.882 -+rm -f conftest*
  12.883 -+
  12.884 -+fi
  12.885 -+echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
  12.886 -+echo "${ECHO_T}$ac_cv_type_uint16_t" >&6
  12.887 -+if test $ac_cv_type_uint16_t = no; then
  12.888 -+
  12.889 -+cat >>confdefs.h <<\_ACEOF
  12.890 -+#define uint16_t unsigned short
  12.891 -+_ACEOF
  12.892 -+
  12.893 -+fi
  12.894 -+echo "$as_me:$LINENO: checking for uint32_t" >&5
  12.895 -+echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
  12.896 -+if test "${ac_cv_type_uint32_t+set}" = set; then
  12.897 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.898 -+else
  12.899 -+  cat >conftest.$ac_ext <<_ACEOF
  12.900 -+#line $LINENO "configure"
  12.901 -+/* confdefs.h.  */
  12.902 -+_ACEOF
  12.903 -+cat confdefs.h >>conftest.$ac_ext
  12.904 -+cat >>conftest.$ac_ext <<_ACEOF
  12.905 -+/* end confdefs.h.  */
  12.906 -+#if HAVE_STDINT_H
  12.907 -+#include <stdint.h>
  12.908 -+#endif
  12.909 -+#include <sys/types.h>
  12.910 -+#if STDC_HEADERS
  12.911 -+#include <stdlib.h>
  12.912 -+#include <stddef.h>
  12.913 -+#endif
  12.914 -+_ACEOF
  12.915 -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  12.916 -+  $EGREP "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  12.917 -+  ac_cv_type_uint32_t=yes
  12.918 -+else
  12.919 -+  ac_cv_type_uint32_t=no
  12.920 -+fi
  12.921 -+rm -f conftest*
  12.922 -+
  12.923 -+fi
  12.924 -+echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
  12.925 -+echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
  12.926 -+if test $ac_cv_type_uint32_t = no; then
  12.927 -+
  12.928 -+cat >>confdefs.h <<\_ACEOF
  12.929 -+#define uint32_t unsigned int
  12.930 -+_ACEOF
  12.931 -+
  12.932 -+fi
  12.933 -+
  12.934 -+echo "$as_me:$LINENO: checking for madvise" >&5
  12.935 -+echo $ECHO_N "checking for madvise... $ECHO_C" >&6
  12.936 -+if test "${ac_cv_func_madvise+set}" = set; then
  12.937 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  12.938 -+else
  12.939 -+  cat >conftest.$ac_ext <<_ACEOF
  12.940 -+#line $LINENO "configure"
  12.941 -+/* confdefs.h.  */
  12.942 -+_ACEOF
  12.943 -+cat confdefs.h >>conftest.$ac_ext
  12.944 -+cat >>conftest.$ac_ext <<_ACEOF
  12.945 -+/* end confdefs.h.  */
  12.946 -+/* System header to define __stub macros and hopefully few prototypes,
  12.947 -+    which can conflict with char madvise (); below.
  12.948 -+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  12.949 -+    <limits.h> exists even on freestanding compilers.  */
  12.950 -+#ifdef __STDC__
  12.951 -+# include <limits.h>
  12.952 -+#else
  12.953 -+# include <assert.h>
  12.954 -+#endif
  12.955 -+/* Override any gcc2 internal prototype to avoid an error.  */
  12.956 -+#ifdef __cplusplus
  12.957 -+extern "C"
  12.958 -+{
  12.959 -+#endif
  12.960 -+/* We use char because int might match the return type of a gcc2
  12.961 -+   builtin and then its argument prototype would still apply.  */
  12.962 -+char madvise ();
  12.963 -+/* The GNU C library defines this for functions which it implements
  12.964 -+    to always fail with ENOSYS.  Some functions are actually named
  12.965 -+    something starting with __ and the normal name is an alias.  */
  12.966 -+#if defined (__stub_madvise) || defined (__stub___madvise)
  12.967 -+choke me
  12.968 -+#else
  12.969 -+char (*f) () = madvise;
  12.970 -+#endif
  12.971 -+#ifdef __cplusplus
  12.972 -+}
  12.973 -+#endif
  12.974 -+
  12.975 -+int
  12.976 -+main ()
  12.977 -+{
  12.978 -+return f != madvise;
  12.979 -+  ;
  12.980 -+  return 0;
  12.981 -+}
  12.982 -+_ACEOF
  12.983 -+rm -f conftest.$ac_objext conftest$ac_exeext
  12.984 -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  12.985 -+  (eval $ac_link) 2>&5
  12.986 -+  ac_status=$?
  12.987 -+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.988 -+  (exit $ac_status); } &&
  12.989 -+         { ac_try='test -s conftest$ac_exeext'
  12.990 -+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  12.991 -+  (eval $ac_try) 2>&5
  12.992 -+  ac_status=$?
  12.993 -+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  12.994 -+  (exit $ac_status); }; }; then
  12.995 -+  ac_cv_func_madvise=yes
  12.996 -+else
  12.997 -+  echo "$as_me: failed program was:" >&5
  12.998 -+sed 's/^/| /' conftest.$ac_ext >&5
  12.999 -+
 12.1000 -+ac_cv_func_madvise=no
 12.1001 -+fi
 12.1002 -+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 12.1003 -+fi
 12.1004 -+echo "$as_me:$LINENO: result: $ac_cv_func_madvise" >&5
 12.1005 -+echo "${ECHO_T}$ac_cv_func_madvise" >&6
 12.1006 -+
 12.1007 -+
 12.1008 -+
 12.1009 - 
 12.1010 - 
 12.1011 --subdirs="$subdirs popt beecrypt zlib elfutils file db3"
 12.1012 -+subdirs="$subdirs popt zlib elfutils file db3"
 12.1013 - 
 12.1014 - 
 12.1015 -                                                                                                                                                                                                                                                                                                                                                               ac_config_files="$ac_config_files Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile scripts/Makefile scripts/brp-redhat scripts/macros.perl scripts/macros.php scripts/macros.python tools/Makefile tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile misc/Makefile intl/Makefile po/Makefile.in doc/Makefile doc/manual/Makefile doc/fr/Makefile doc/ja/Makefile doc/ko/Makefile doc/pl/Makefile doc/ru/Makefile doc/sk/Makefile python/Makefile python/rpmdb/Makefile python/test/Makefile"
 12.1016 -@@ -25157,7 +25106,6 @@
 12.1017 -       esac
 12.1018 -     done ;;
 12.1019 -     default ) 	echo timestamp > popt/stamp-h.in
 12.1020 --	echo timestamp > beecrypt/stamp-h.in
 12.1021 - 	echo timestamp > stamp-h.in
 12.1022 - 
 12.1023 -  ;;
 12.1024 -
 12.1025 -+---------------------------------------------------------------------------
 12.1026 -| Corresponding patches in "configure" script after regeneration from
 12.1027 -| patched "configure.ac" with "autoconf".
 12.1028 -+---------------------------------------------------------------------------
 12.1029 -Index: popt/configure
 12.1030 ---- popt/configure	16 Jul 2003 17:04:51 -0000	1.1.1.16
 12.1031 -+++ popt/configure	12 May 2004 14:34:35 -0000	1.18
 12.1032 -@@ -9359,9 +9359,6 @@
 12.1033 - 
 12.1034 - 
 12.1035 - MARK64=
 12.1036 --case "${target_cpu}" in
 12.1037 --x86_64*|powerpc64*|ppc64*|sparc64*|s390x*)        MARK64=64 ;;
 12.1038 --esac
 12.1039 - 
 12.1040 - 
 12.1041 - 
    13.1 --- a/openpkg/rpmrc	Tue Jul 31 12:27:54 2012 +0200
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,76 +0,0 @@
    13.4 -##
    13.5 -##  rpmrc -- OpenPKG RPM Configuration
    13.6 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
    13.7 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
    13.8 -##
    13.9 -##  Permission to use, copy, modify, and distribute this software for
   13.10 -##  any purpose with or without fee is hereby granted, provided that
   13.11 -##  the above copyright notice and this permission notice appear in all
   13.12 -##  copies.
   13.13 -##
   13.14 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   13.15 -##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   13.16 -##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   13.17 -##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
   13.18 -##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   13.19 -##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   13.20 -##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   13.21 -##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   13.22 -##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   13.23 -##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   13.24 -##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   13.25 -##  SUCH DAMAGE.
   13.26 -##
   13.27 -##  The purpose of this configuration file is to override the
   13.28 -##  "macrofiles" directive in the default RPM configuration in order
   13.29 -##  to direct RPM to the special macro definitions for the @l_prefix@
   13.30 -##  hierarchy.
   13.31 -##
   13.32 -
   13.33 -#
   13.34 -#   Macro Sets
   13.35 -#
   13.36 -
   13.37 -macrofiles: @l_prefix@/lib/openpkg/macros:@l_prefix@/etc/openpkg/rpmmacros:~/.rpmmacros:~/.openpkg/rpmmacros
   13.38 -
   13.39 -#
   13.40 -#   CPU Architecture Mappings
   13.41 -#   (most important architectures only)
   13.42 -#
   13.43 -
   13.44 -#   Intel IA32/IA64
   13.45 -arch_canon:         ix86:       ix86 1
   13.46 -arch_canon:         ia64:       ia64 9
   13.47 -arch_compat:        ix86:       ix86 noarch
   13.48 -buildarch_compat:   ix86:       ix86 noarch
   13.49 -arch_compat:        ia64:       ia64 ix86 noarch
   13.50 -buildarch_compat:   ia64:       ia64 ix86 noarch
   13.51 -
   13.52 -#   AMD/Intel AMD64/EM64T
   13.53 -arch_canon:         amd64:      amd64 2
   13.54 -arch_compat:        amd64:      amd64 ix86 noarch
   13.55 -buildarch_compat:   amd64:      amd64 ix86 noarch
   13.56 -
   13.57 -#   Sun SPARC
   13.58 -arch_canon:         sparc:      sparc   3
   13.59 -arch_canon:         sparc64:    sparc64 3
   13.60 -arch_compat:        sparc:      sparc noarch
   13.61 -buildarch_compat:   sparc:      sparc noarch
   13.62 -arch_compat:        sparc64:    sparc64 sparc noarch
   13.63 -buildarch_compat:   sparc64:    sparc64 sparc noarch
   13.64 -
   13.65 -#   HP PA-RISC
   13.66 -arch_canon:         hppa:       hppa 4
   13.67 -arch_compat:        hppa:       hppa noarch
   13.68 -buildarch_compat:   hppa:       hppa noarch
   13.69 -
   13.70 -#   IBM PowerPC
   13.71 -arch_canon:         ppc:        ppc 5
   13.72 -arch_compat:        ppc:        ppc noarch
   13.73 -buildarch_compat:   ppc:        ppc noarch
   13.74 -
   13.75 -#
   13.76 -#   Operating System Mappings
   13.77 -#   (currently intentionally left out to avoid any magic)
   13.78 -#
   13.79 -

mercurial