# HG changeset patch # User Michael Schloh von Bennewitz # Date 1343821869 -7200 # Node ID 9b4bbbae3a987066b5f07fda93d33e4c1b7c1c48 # Parent b363f8ef6dcb0afcc1def5aa3223bb47adca8683 Remove overlooked sources remaining after upstream resynchronization. diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/HISTORY --- a/openpkg/HISTORY Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,701 +0,0 @@ -2009 -==== - -20090106 port miniperl and rpmio to Solaris 11 - -2008 -==== - -20080101 closedpkg - -2007 -==== - -20071227 remove support for ancient FreeBSD 4 -20071222 upgrade to Perl 5.10.0 -20071030 upgrade to cURL 7.17.1 -20071019 upgrade to OpenSSL 0.9.8g -20071018 upgrade to latest Tar patch -20071017 try to port Tar and OpenSSL to AIX 5 and Solaris 8 again -20071015 avoid calling of autoconf while building GNU bash -20071014 fix OpenSSL patch (some important portability related hunks were lost) -20071011 upgrade to OpenSSL 0.9.8f -20071011 add support for FreeBSD 8.0-CURRENT -20071010 upgrade to GNU tar 1.19 -20070914 upgrade to cURL 7.17.0 -20070909 print entire list of all %NoSource files instead of bailing out on the first missing file encountered -20070321 upgrade to openpkg-registry 1.1.3 remove legacy code which had the side effect of the REGISTRY_UUID file being touched hourly -20070718 "diff reduction" to RPM 5 development version (no functional change) -20070717 fix a very long-standing cruel implementation bug in the platform detection -20070711 upgrade to cURL 7.16.4 -20070630 upgrade to GNU tar 1.18 -20070625 upgrade to cURL 7.16.3 -20070624 upgrade to openpkg-tools 1.4.5 -20070623 apply a workaround to GNU gzip for resolving potential futimens() conflict (fixes built under Fedora 7) -20070620 more consistently use "shtool platform" for building OpenSSL -20070616 teach OpenSSL config to identify cc being a disguised gcc (pass -gcc to Configure but run cc) -20070614 synchronize 64bit -fPIC option and ./config usage from "openssl" package -20070608 upgrade to GNU tar 1.17 -20070608 fix tracking of gzip -20070607 use path /etc/rc.d/init.d/ instead of non-standard /etc/init.d/ under AIX -20070606 under MacOS X do not add -Wl,-search_paths_first if -c or -E is present on the cc command line -20070605 upgrade to GNU gzip 1.3.12 -20070605 upgrade to latest GNU shtool snapshot for final Mac OS X identification and some small improvements for CentOS -20070604 improve Mac OS X support by providing gcc/cc/ld override scripts to pass option "-search_paths_first" to ld(1) -20070604 improve Mac OS X support by upgrading to an improved GNU shtool snapshot -20070603 disable shared library building in Perl for better supporting Mac OS X -20070603 synchronize openssl.patch with latest version from "openssl" package -20070520 fix building Perl under GCC 4.2 world order -20070519 upgrade to OSSP uuid 1.6.0 -20070519 upgrade to official GNU shtool 2.0.7 -20070514 upgrade to newer GNU shtool snapshot which fixes "shtool mkln" and "shtool install" commands -20070511 upgrade to "openpkg" executable version 2.0.1-C, do not rise privileges for "openpkg rpm" when given -[bt]* options -20070507 workaround PIC/DSO related problems under FreeBSD on sparc64 by enforcing -fPIC -20070419 meticulously obey order when creating user, group, login shell relationships -20070418 use bootstrapped bash to prevent problems when /bin/sh is not a bourne shell -20070417 support %l_as macro and --use_as bootstrap option to complement ar, ld, strip handling -20070411 upgrade to cURL 7.16.2 -20070329 add variables to expand uuid(8) information in the "openpkg release" format -20070322 cosmetic: align code variable name with documentation -20070321 upgrade to openpkg-registry 1.1.2 replace HOSTNAME with FQDN when creating OPENPKG_DESC default -20070320 automatic (re-)registration if previous registration, community series or release set to openpkg URLs -20070320 improve generation of UUID_PLATFORM by using a better (no longer IP based) "discriminator" value -20070320 remove old support for never finished rcng -20070320 remove old backward compatibility from rc.func for OpenPKG 1.2's opXXX functions -20070319 change "rc" to not check permissions for --print operations -20070319 fix eval "rc" in rc.func which relies on PATH and conflicts with Plan 9 shell - -20070319 **** RELEASE AS PART OF OPENPKG 2.20070319 **** -20070305 invalidate passwd and group tables from Name Service Cache Daemon after pwconv -20070305 upgrade to rpmtool 1.1.0 remove dormant code for system user/group addition/removal - -20070303 **** RELEASE AS PART OF OPENPKG 2.20070303 **** -20070302 upgrade to openpkg-registry 1.1.1 upgrade safety -20070302 upgrade to openpkg-tools 1.4.3 direct access relative path names (identified by leading "./"); minor re fix in 1.4.4 -20070226 upgrade to openpkg-tools 1.4.2 direct access absolut path names (identified by leading "/"), download from URLs (including "file://") -20070223 upgrade to OpenSSL 0.9.8e -20070222 upgrade to openpkg-tools 1.4.1 avoid "openpkg curl" to emit confusing "error trying read config" messages - -20070221 **** RELEASE AS PART OF OPENPKG 2.20070221 **** -20070221 autoregister for community series; always reregister -20070221 backout capability to seed registry user/link information to avoid register.conf file conflict -20070221 upgrade to openpkg-tools 1.4.0 ("openpkg curl"), upgrade to openpkg-registry 1.1.0 (autoregister) -20070207 upgrade to openpkg-tools 1.3.2 -20070206 upgrade to GNU gzip 1.3.11 -20070204 rpmtool cflags tool detection must handle relative pathes (no gcc) and absolute pathes (with gcc) -20070204 unbreak rpmtool cflags tool detection -20070130 minor fixes in rpmtool and the corresponding man page -20070130 upgrade to cURL 7.16.1 - -20070105 **** RELEASE AS PART OF OPENPKG 2.20070105 **** -20070105 upgrade to GNU bzip2 1.0.4 -20070102 upgrade to openpkg-tools 1.3.1 -20070101 upgrade to GNU gzip 1.3.10 -20070101 adjust copyright year in all messages to cover new year 2007 - -2006 -==== - -20061223 upgrade to openpkg-tools 1.3.0 -20061210 upgrade to GNU tar 1.16.1 -20061210 upgrade to GNU gzip 1.3.8 -20061208 upgrade to GNU gzip 1.3.7 - -20061207 **** RELEASE AS PART OF OPENPKG 2.20061207 **** -20061207 remove obsolete references to openpkg-bugdb@openpkg.org and rt.openpkg.org -20061207 fix incorrect double-import of OpenPGP keys by first fixating the RPM DB -20061207 fix Solaris build issues with the newer GNU gzip 1.3.6 -20061207 upgrade to "openpkg" executable version 2.0.0-C -20061206 apply the GNU Bash 3.2 upstream patches 001-005 -20061206 switch GNU gzip from pre-patched OpenPKG tarball to pristine upstream tarball plus OpenPKG "update" tarball -20061206 enhance "openpkg release" robustness when config file defines same value repeatedly -20061205 skip build of irrelevant parts of the GNU tar distribution -20061129 upgrade to GNU gzip 1.3.6 -20061129 adjust wordings in package class hints according to current classification -20061114 upgrade to openpkg-tools 1.1.1 -20061114 provide %{l_miniperl} and %{l_openssl} macros -20061112 install zlib's zconf.h header as it is required by zlib.h -20061030 upgrade to cURL 7.16.0 - -20061030 **** RELEASE AS PART OF OPENPKG 2.20061030 **** -20061030 upgrade to openpkg-tools 1.1.0 -20061030 switch from a single OpenPGP key openpkg.pgp (.org) to three openpkg.{org,com,net}.pgp keys -20061026 fix number of CPU detection in rpmtool to support recent FreeBSDs & NetBSDs - -20061024 **** RELEASE AS PART OF OPENPKG 2.20061024 **** -20061024 try to workaround GNU tar build problems - -20061023 **** RELEASE AS PART OF OPENPKG 2.20061023 **** -20061023 upgrade to openpkg-tools 1.0.1 -20061022 upgrade to openpkg-registry 1.0.1 -20061022 upgrade to GNU tar 1.16 -20061022 fix License header of "openpkg" package - -20061018 **** RELEASE AS PART OF OPENPKG 2.20061018 **** -20061016 upgrade to openpkg-tools 1.0.0 with no functional change to 0.8.80 -20061008 upgrade to openpkg-registry 1.0.0 with no functional change to 0.7.2 -20061016 upgrade to openpkg-tools 0.8.80 -20061013 allow %{l_cc} and %{l_cxx} to be set in ~/.rpmmacros to values containing spaces -20061013 new world order for "Packager" and "Distribution" headers -20061012 remove Alpha and add PPC and AMD64 to rpmrc -20061011 upgrade to GNU Bash 3.2.0 -20060930 upgrade to openpkg-tools 0.8.76 -20060929 fix error message in openpkg setuid wrapper -20060929 make passwd/group lookups more efficient by performing key-based lookups instead of full dumps when possible -20060929 upgrade to openpkg-tools 0.8.75 -20060928 upgrade to OpenSSL 0.9.8d -20060926 upgrade to openpkg-tools 0.8.74 -20060923 upgrade to GNU config 20060923 -20060923 upgrade to openpkg-tools 0.8.73 - -20060913 **** RELEASE AS PART OF OPENPKG 2.20060913 **** -20060913 if CWD is NO LONGER accessible, try to switch to home of target identity to prevent failures in e.g. GNU bash -20060913 unpack source RPM package files as management user if called by super user ("openpkg rpm -Uvh *.src.rpm") -20060913 do not rise privileges for "openpkg rc" when given --eval or --print options -20060910 OpenPKG supports all major Unix platforms - remove explicit and unmaintained platform support determination -20060905 upgrade to OpenSSL 0.9.8c -20060826 try to allow Perl to build under RHEL4/amd64 (attempt 2) -20060826 upgrade to openpkg-tools 0.8.71 -20060825 cleanup build procedure of Perl to allow it to build under RHEL4/amd64 (attempt 1) -20060825 cleanup and bring up-to-date the source tree documentation - -20060824 **** RELEASE AS PART OF OPENPKG 2.20060824 **** -20060823 upgrade to openpkg-tools 0.8.70 -20060823 create fallback/override directories with owner/group musr/mgrp -20060823 make /bin/openpkg "set-uid" for allowing it to downgrade/upgrade privileges automatically -20060823 upgrade to openpkg-tools 0.8.69 (no longer uses "curl -q" in "openpkg build") -20060823 fix "openpkg release" with workaround for Solaris sed(1) which ignores lines without trailing newlines - -20060818 **** RELEASE AS PART OF OPENPKG 2.20060818 **** -20060818 upgrade to openpkg-tools 0.8.68 -20060818 try to workaround "grep -e" Autoconf issues on Solaris with OSSP uuid. - -20060815 **** RELEASE AS PART OF OPENPKG 2.20060815 **** -20060815 upgrade to openpkg-tools 0.8.67 (finally allows "openpkg build" to really run under miniperl) - -20060812 **** RELEASE AS PART OF OPENPKG 2.20060812 **** -20060811 let old "openpkg install" command use the "openpkg build" command -20060811 replace "openpkg build" wrapper with a copy of the real "openpkg build" command -20060808 make "openpkg uuid update" processing more robust by detecting empty UUID_REGISTRY -20060808 upgrade to openpkg-registry 0.7.2 improve user visible error handling -20060808 upgrade to openpkg-registry 0.7.1 (server changes only) -20060808 upgrade to openpkg-registry 0.7.0 link feature -20060807 upgrade to cURL 7.15.5 -20060803 upgrade to openpkg-registry 0.6.4, 0.6.5 (server changes only) -20060801 upgrade to OSSP uuid 1.5.1 -20060728 upgrade to OSSP uuid 1.5.0 - -20060726 **** RELEASE AS PART OF OPENPKG 2.20060726 **** -20060725 upgrade to openpkg-registry 0.6.3 which comes with prerendered manual page -20060725 upgrade to openpkg-registry 0.6.2 fixes broken URL rewriting code and -20060725 upgrade to openpkg-registry 0.6.1 remove gpg-pubkey and similar improper data from preparation step -20060714 upgrade to openpkg-registry 0.6.0 to capture package and provides data -20060710 upgrade to openpkg-registry 0.5.2 which comes with embedded manual page -20060628 allow "openpkg build" emulation script to gracefully handle platform changes -20060625 align configure call of GNU make with the "make" package -20060625 upgrade to cURL 7.15.4 by using the GREP=grep workaround. - -20060622 **** RELEASE AS PART OF OPENPKG 2.20060622 **** -20060622 replace release tag fiddling in openpkg.boot with "openpkg release" functionality, too. -20060622 do not rely on RPM's smartness to not expand "%x" when we actually meant "%%x" -20060621 use new "openpkg release" for "openpkg install" and "openpkg build" commands -20060621 use new "openpkg release" for %{l_openpkg_release} macro -20060621 added "openpkg release" command for more precise OpenPKG distribution tag and URL determination -20060621 complain also about .rpmsave/.rpmnew files if it is a symbolic link (usually created manually) -20060619 downgrade to cURL 7.15.3 til a suitable solution for long line-capable 'grep -e' is found -20060619 backout SMF and revert to classic System V init style on Solaris 10 due to complete brokenness -20060618 support bootstrap "Release:" tags for N-STABLE branches ("N.YYYMMDD") -20060618 support bootstrap "Release:" tags like YYYYMMDDxxxx for variants of external parties -20060612 upgrade to cURL 7.15.4 -20060523 force OpenSSL to build with just platform "cc" for maximum portability -20060517 make "openpkg uuid update" processing more robust to prevent problems -20060517 fix output of "openpkg build" wrapper script -20060515 fix building of OpenSSL by reducing used Perl features (integer.pm, Cwd.pm) -20060514 fix building of OpenSSL by reducing used Perl features (find.pl, strict.pm) -20060513 build cURL with SSL support to allow it to fetch from HTTPS URLs -20060513 major change: build and install OpenSSL 0.9.8b (for adding SSL support to cURL) -20060513 major change: build and install Perl 5.8.8 miniperl (for building OpenSSL, rpmtool files, etc) - -20060512 **** RELEASE AS PART OF OPENPKG 2.5.2 **** -20060512 upgrade to OpenPKG Registry 0.4.0 -20060512 add a bootstrap wrapper for "openpkg build" command similar to "openpkg install" -20060512 fix "openpkg install" command under OpenPKG Registry world order by using RDF index files -20060512 include a copy of the OpenPKG Registry client ("openpkg register") -20060419 upgrade to GNU shtool 2.0.6 -20060417 increase Solaris SMF timeout from 60 to 180 seconds -20060417 upgrade to GNU make 3.81 (excluded in 2.5.2) -20060320 upgrade to cURL 7.15.3 -20060313 upgrade to OSSP uuid 1.4.2 -20060311 upgrade to GNU config 20060310 (excluded in 2.5.2) -20060307 fixed Solaris 10 svc manifest -20060307 cleanup building of GNU Bash -20060306 fixed building of GNU Bash by reducing dependency to Bison/Yacc -20060227 upgrade to cURL 7.15.2 -20060207 upgrade to OSSP uuid 1.4.1 -20060207 upgrade to GNU shtool 2.0.5 -20060206 upgrade to GNU config 20060206 -20060204 upgrade to GNU shtool 2.0.4 -20060204 apply Bash 3.1 vendor patches 001 to 007 -20060115 upgrade to OSSP uuid 1.4.0 -20060101 upgrade to GNU config 20051231 -20060101 adjust copyright year in all messages to cover new year 2005 - -2005 -==== - -20051210 **** RELEASE AS PART OF OPENPKG 2.5.1 **** -20051209 upgrade to GNU Bash 3.1 (excluded in 2.5.2) -20051207 upgrade to cURL 7.15.1 -20051206 upgrade to OSSP uuid 1.3.2 -20051017 cleanup the source tree by removing trailing blanks from HISTORY - -20051016 **** RELEASE AS PART OF OPENPKG 2.5.0 **** -20051016 adjust aux.prereq.sh for the official set of platforms in OpenPKG 2.5 -20051016 be pendantic and add /lib also to LD_LIBRARY_PATH under NetBSD & FreeBSD -20051014 upgrade to cURL 7.15.0 -20051007 on Solaris 10 switch from legacy rcX.d init scripts to SMF manifest -20051002 upgrade to GNU shtool 2.0.3 -20051002 upgrade to GNU config.* scripts as of 20050102 -20050924 more IRIX 6.x support -20050924 upgrade to OSSP uuid 1.3.1 -20050923 fix rpm/configure not detecting inet_aton, causing rpmio.c fail with gcc4 -20050920 fix init script for Gentoo Linux to ensure startup as very last service -20050902 upgrade to OSSP uuid 1.3.0 -20050902 upgrade to cURL 7.14.1 -20050830 upgrade to OSSP uuid 1.2.1 -20050815 move tool determination back into .spec to unbreak upgrades -20050815 backout --fallback option (has to be replaced by a more general solution) -20050815 unbreak *.sh --help command (was broken by cut & paste bugs) -20050815 fix Fedora Core 4 compile problems with a more clean and permanent patch -20050813 add --fallback and related options, enabling use of "foreign" dev tools -20050812 use ls(1) as a better strip(1) replacement as both fail when a file is missing -20050812 store l_ar, l_ld and l_strip in .buildenv, reorder rpmmacros and introduce l_strip -20050808 make sure strip(1) logic does not break shell script execution -20050804 temporary workaround defeating problems with Fedora Core 4 vendor compiler -20050727 remove dependency to binutils tools size(1) and strip(1) -20050727 added to rpmtool the detection for "number of CPUs" under AIX for "make -j" - -20050726 **** RELEASE AS PART OF OPENPKG 2.4.2 **** -20050726 Cosmetics in "openpkg rpm --help" output -20050726 Add %{l_ar} and %{l_ld} macros for easier bootstrapping -20050724 "better" patch for GNU gzip, OpenPKG-SA-2005.009 (CAN-2005-1228) -20050722 Upgraded to Zlib 1.2.3 - -20050706 **** RELEASE AS PART OF OPENPKG 2.4.1 **** -20050706 Fixed zlib security issue (OpenPKG-SA-2005.013, CAN-2005-2096) -20050706 upgrade to latest version 20050606 of GNU config.* scripts -20050706 upgrade to latest CVS snapshot of GNU shtool to correctly detect FreeBSD/amd64 on ix86+EM64T - -20050615 **** RELEASE AS PART OF OPENPKG 2.4.0 **** -20050615 update the platform support list (aux.prereq.sh) for OpenPKG 2.4 -20050615 upgrade to GNU shtool 2.0.2 (fixing CAN-2005-1751 and CAN-2005-1759) -20050613 part 4 of AIX port: cleanups and fixes for system hooks -20050611 upgrade to latest CVS snapshot of GNU shtool to correctly detect Mandriva Linux -20050610 patch GNU gzip, OpenPKG-SA-2005.009 (CAN-2005-1228) -20050609 part 3 of AIX port: cleanups and fixes for system hooks -20050608 part 2 of AIX port: RPM patches, system hooks -20050607 part 1 of AIX port: RPM patches -20050606 fix and enhance various vendor file trackings -20050606 upgrade to latest version 20050606 of GNU config.* scripts -20050606 upgrade to GNU bzip2, OpenPKG-SA-2005.008 (CAN-2005-0953, CAN-2005-1260) -20050527 upgrade to latest CVS snapshot of GNU shtool to correctly support IBM AIX -20050523 search 'rpmmacros' file (not hidden) in '.openpkg' directory -20050521 upgrade to latest version 20050521 of GNU config.* scripts -20050518 add feature to search '.rpmmacros' file in '.openpkg' directory -20050516 upgrade to cURL 7.14.0 -20050513 upgrade to latest CVS snapshot of GNU shtool to support IBM OS/400 PASE -20050513 upgrade to latest version 20050513 of GNU config.* scripts -20050405 upgrade to cURL 7.13.2 - -20050323 **** RELEASE AS PART OF OPENPKG 2.3.1 **** -20050323 give a more precise hint at the end of the .src.sh bootstrap procedure -20050314 fix rc env processing: do not assign to the variable "_" (which is read-only in some shells like zsh) -20050308 remove GNU gcc specific and unused stuff from , because it breaks under non-GCC -20050305 upgrade to latest version of GNU config.* scripts -20050304 upgrade to cURL 7.13.1 -20050224 upgrade to GNU shtool 2.0.1 -20050224 update aux.prereq.sh for OpenPKG 2.3's list of platforms - -20050223 **** RELEASE AS PART OF OPENPKG 2.3.0 **** -20050223 fix %clean procedure to correctly remove build area -20050223 apply cURL 7.13.0 security fixes -20050221 upgrade to ZLib 1.2.2 (excluded in 2.2.3) -20050209 workaround PIC/DSO related problems under FreeBSD on amd64/ia64 by enforcing -fPIC (excluded in 2.2.3) -20050203 fix the basename(3) issues the correct way by including -20050202 fix DESTDIR not being passed to subdir make -20050202 update platform support to match current state of buildfarm -20050201 remove cast in RPM source to workaround FreeBSD/ia64 segfault -20050201 upgrade to cURL 7.13.0 (excluded in 2.2.3) -20050131 apply three vendor bugfixes for GNU tar 1.15.1 (excluded in 2.2.3) -20050124 upgrade from old config.guess/config.sub to newer versioned ones (excluded in 2.2.3) -20050123 upgrade to OSSP uuid 1.2.0 (excluded in 2.2.3) -20050120 add support for Slackware 10.0 (excluded in 2.2.3) -20050120 adjust copyright year in all messages to cover new year 2005 -20050113 add %{l_nil} macro (excluded in 2.2.3) -20050113 upgrade to OSSP uuid 1.1.2 (excluded in 2.2.3) - -2004 -==== - -20041225 upgrade to BeeCrypt 4.1.2 (excluded in 2.2.3) -20041222 upgrade to GNU tar 1.15.1 (excluded in 2.2.3) -20041220 upgrade to cURL 7.12.3 (excluded in 2.2.3) -20041220 add "tool override" support for Debian-based Ubuntu Linux distribution - -20041211 **** RELEASE AS PART OF OPENPKG 2.2.2 **** -20041211 fix system start/stop transfer script for FreeBSD 5 (II) -20041210 fix system start/stop transfer script for FreeBSD 5 -20041125 port RPM to NetBSD 2.0 (pre-release) -20041119 upgrade to BeeCrypt 4.1.1 (excluded in 2.2.2) -20041118 upgrade to BeeCrypt 4.1.0 (excluded in 2.2.2) -20041118 upgrade to OSSP uuid 1.1.1 (excluded in 2.2.2) -20041118 fix rc(1) command processing for "%cmd -u foo" situations under umask 027 and similar -20041008 port to MacOS X 10.3.6 by disabling assembly code in gzip - -20041004 **** RELEASE AS PART OF OPENPKG 2.2.1 **** -20041104 apply GNU bash patch for brain-dead Linux platforms with broken WCONTINUE -20041103 upgrade to OSSP uuid 1.1.0 (excluded in 2.2.1) -20041024 synchronize GNU bash patches with OpenPKG "bash" package -20041018 upgrade to cURL 1.12.2 (excluded in 2.2.1) -20041018 upgrade to OSSP uuid 1.0.4 (excluded in 2.2.1) -20041015 upgrade to OSSP uuid 1.0.3 (excluded in 2.2.1) - -20041002 **** RELEASE AS PART OF OPENPKG 2.2.0 **** -20041002 cleanup more shtool usages -20040928 fix broken shtool usage introduced in 20040924 -20040924 remove the beecrypt C++ preprocessor configure test -20040923 fix building of cURL under at least FreeBSD 5.3. -20040922 correct usage text of openpkg.boot (matching aux.wrapsrc.sh exactly) -20040920 use the older "test -h" instead of the modern "test -L" in "rpm --setperms" for portability reasons -20040920 remove /lib/openpkg/override directory and its files on deinstallation -20040912 upgrade to OSSP uuid 1.0.2 - -20040825 **** RELEASE AS PART OF OPENPKG 2.1.2 **** -20040825 applied security bugfixes for ZLIB 1.2.1 - -20040811 **** RELEASE AS PART OF OPENPKG 2.1.1 **** -20040811 upgrade to cURL 7.12.1 -20040811 apply more fixes for GNU Bash 3.0 -20040810 fix uid/gid determination loops by not being confused by multiple query results -20040804 upgrade to BeeCrypt 4.0.0 and GNU Bash 3.0 -20040725 fix a few typos in rc(8) manual page -20040725 remove useless "Provides" for the corresponding RELEASE version -20040721 disable special RedHat NPTL handling for portability reasons -20040721 fixed paths in manual pages -20040716 upgrade to OSSP uuid 1.0.1 - -20040712 **** RELEASE AS PART OF OPENPKG 2.1.0 **** -20040712 make --prefix optional in aux.wrapsrc.sh and default to /openpkg -20040712 let the --susr/--sgrp default to "root" only if --user/--group was specified -20040712 emulate GNU libtool environment for bzip2 to make sure RPM picks it up before a vendor version -20040712 fix final install detection in "openpkg install" command -20040702 reorder and split building of tools in order to already unpack problematic cURL tarball with GNU tar -20040702 make sure $PATH contains at least "/bin:/sbin:/usr/bin:/usr/sbin" for bootstrapping -20040702 upgrade to GNU shtool 2.0.0 -20040702 update platform prerequisite checks for OpenPKG 2.1 platform set -20040701 add support for openpkg-audit package -20040609 add support for recognizing package class in old 1.3 Distribution headers during building -20040609 start rc.openpkg jobs in background and as soon as possible (priority 0) -20040607 workaround NetBSD gcc 2.95 optimization problems by not using -O2 there -20040607 upgrade to latest GNU shtool snapshot to fix platform detection under NetBSD 1.6.2-STABLE -20040604 revise the stderr processing of run-command processor in case of -d/--debug -20040604 add -k/--keep option to run-command processor for debug purposes -20040604 add GNU bash 2.05b vendor patches 001-007 -20040604 port to HP-UX 11.11 platform -20040602 upgrade to cURL 7.12.0 -20040602 add evil hack to workaround Debian 3.1 install-info(8) conflicts -20040602 remove unused code from run-command processor -20040602 prevent gcc 2.95 from optimizing RPM DB's sha1.c and run into a virtual memory exhaustion situation -20040601 fixate path to GnuPG, because RPM 4.2 passes argument directly to execve(2) -20040601 enable pure-C builds by patching out useless C++ checks from cURL configure -20040601 finally disable ulimits for FreeBSD, Solaris and Linux -20040601 add path defaults for HP/UX, Tru64/OSF1 and UnixWare -20040601 removed OS compatibility mapping list in rpmrc to avoid any magic -20040515 initial port to Tru64/OSF1 4.0F and IRIX 6.5.21m -20040512 remove RPM's "lib64" hack to port to NetBSD/sparc64 -20040510 fix GNU tar patch -20040508 upgraded to GNU shtool 2.0b3 - -20040507 **** RELEASE AS PART OF OPENPKG 2.0.3 **** -20040507 synchronize aux.prereq.sh platform checks with official list as of OpenPKG 2.0 -20040507 fix disk space detection in aux.prereq.sh script -20040506 finally remove /bin/{rpm,rpm2cpio} wrappers in preparation to OpenPKG 2.1 (excluded in 2.0.3) -20040505 rc: skip .snap (FreeBSD 5) and .snapshot (NetApp) directories in *.rpmxxx checking -20040501 use better GCC detection in "rpmtool cflags" (taken over from "gcc" package) -20040429 make sure /etc/rc does not complain in cronjobs of non-privileged setups -20040429 port to NetBSD 1.6.2 (excluded in 2.0.3) -20040428 fix "openpkg man" command now that OPENPKG_TOOLS_CMDPATH is not provided -20040428 let rc point out that it searches subdirectories for unresolved file conflicts -20040427 fixed rpmpopt: replace hard-coded bash path and do not use reserved shell keywords -20040426 upgrade to cURL 7.11.2 (excluded in 2.0.3) -20040422 backout added hack to "rpmtool cflags -O" processing because it was incorrect (excluded in 2.0.3) -20040421 add hack to "rpmtool cflags -O" processing because Tru64 doesn't know plain "-O" option (excluded in 2.0.3) -20040421 POSIX compliance: replace "head -1" with "sed -e 'q'" and "tail -1" with "sed -n -e '$p'" - -20040418 **** RELEASE AS PART OF OPENPKG 2.0.2 **** -20040418 port RPM to Tru64 5.1 (again) (excluded in 2.0.2) -20040418 remove left-over object files from RPM distribution tarball before building -20040418 use "openpkg lsync" consistently in lsync manual page (excluded in 2.0.2) -20040414 fix "rpm --help" output related to option "--with" -20040414 fix building of GNU tar by applying more "no iconv here" enforcement (excluded in 2.0.2) -20040409 removed old RPM extensions (now part of "openpkg-tools") (excluded in 2.0.2) -20040409 worked-off /bin/openpkg frontend in order to provide better tool chain processing -20040408 fixed internal OPENPKG_TOOLS variable processing in /bin/openpkg frontend -20040408 added workaround to BeeCrypt build to make sure /dev/audio and /dev/dsp are not used -20040407 upgraded to GNU shtool 2.0b2 -20040406 upgraded to GNU tar 1.13.94 (excluded in 2.0.2) - -20040405 **** RELEASE AS PART OF OPENPKG 2.0.1 **** -20040405 fix "openpkg man" command for embedded POD manual page rendering -20040403 fix tracking of GNU tar -20040401 fix "openpkg install openpkg-tool" bootstrapping command -20040324 fix %l_check_nosource: the output went directly into the shell scripts -20040320 upgrade to cURL 7.11.1 (excluded in 2.0.1) -20040320 bump provide for 2.0.0-2.0.0 - -20040224 **** RELEASE AS PART OF OPENPKG 2.0.0 **** -20040224 use ~/.openpkg/warning instead of ~/.openpkg/timestamp for warning timestamp file -20040223 change BeeCrypt building to use no assembly code at all -20040223 use a more smart rpm/rpm2cpio execution wrapper warning -20040221 written manual page for "openpkg uuid" -20040221 implemented "openpkg man" command for reading tool chain command manual pages -20040220 fix "openpkg rpm-config --version" output -20040220 cleanup displayed messages and do not display error message on failed commands -20040218 upgraded to GNU shtool 2.0b1 -20040217 added -t|--tar option to *.sh scripts for convenient extracting embedded tarball -20040217 provide /bin/rpm2cpio for convenience reasons -20040216 change filesystem layout for final OpenPKG 2.0 namespace clean layout -20040216 config.{guess,sub} scripts are no longer installed -20040216 fixed --tag processing in bootstrapping situation -20040216 upgraded to OSSP uuid 1.0.0 -20040214 use sane build environment already in pre-expanded sanity checking macros -20040213 upgraded to OSSP uuid 0.9.7 -20040212 added support to RPM's %patch macro for passing through patch(1) "-d" option -20040212 upgraded to the latest GNU shtool 2.0b0 snapshot version -20040211 upgraded to OSSP uuid 0.9.6 -20040210 use "" for "%l_tag_fmt" on upgrades to be more OpenPKG 1.3 compatible -20040210 we more smart and accept not-existing "Class:" headers for compatibility. -20040209 cleanup "rpmmacros" for consistent "%l_prefix" usage and fix "rpmtool not found" issue -20040208 added version tracking for OSSP uuid -20040206 upgraded to OSSP uuid 0.9.5 -20040206 disable %prep checks under --track-dump and cleanup its output -20040205 activate only the %env of "openpkg" in the "musr" run-time environment -20040205 add --tack-dump and make sure --track/-bt do not require dependencies and sources -20040205 make sure -bs no longer requires dependencies -20040204 fix class checking macro l_check_class. -20040203 actually use new Class: header and %track section -20040130 add support to RPM for new "%track" section which will become the new vcheck(1) source -20040130 add support to RPM for new "%test" section which will allow run-time testing -20040130 add support to RPM for new "Class" header which will become the new package class source -20040127 fix typos and remove trailing whitespaces from source files -20040124 add parallel build support in %{l_mflags} for HP/UX -20040123 adjust copyright year in all messages to cover new year 2004 -20040123 upgrade to cURL 7.11.0 -20040122 add "rpm --tag " support for tagging binary RPMs with arbitrary strings -20040122 upgrade to latest GNU shtool snapshot for better RHL/RHEL detection and naming -20040121 cleanup openpkg.spec by sorting SourceX headers -20040120 add OSSP uuid and companion uuid.sh frontend to provide new /etc/openpkg/uuid -20040120 embed %post section from openpkg.spec into bootstrap script *.src.sh -20040120 adjust widths in "rpm -qplv" output to allow longer owner/group -20040120 regenerate rpm.patch.* files with latest CVS 1.12.x -20040113 add %status to rc.openpkg; this prevents warnings when no package provides a status -20040112 settings from [smrn]gid options get lost; fix by introducing a temporary variable -20040112 fix RPM internal handling of %_excludedocs macro -20040107 fix config.cache file handling in building of GNU tar and GNU patch -20040107 downgrade to GNU tar 1.13.25 again because --no-recursion is broken in <= 1.13.92 -20040105 exclude %doc flagged files by default. -20040102 make sure rpmtool exists (important on bootstrapping with openpkg.boot) -20040101 start using the global file /etc/openpkg to register all OpenPKG instances on a system - -2003 -==== - -20031212 upgrade to GNU tar 1.13.92 (second attempt) -20031213 replaced unreleased OSSP platform script with latest GNU shtool (which includes OSSP platform) -20031211 add support for RedHat WS/ES/AS and Fedora to %{l_platform} via latest OSSP platform -20031211 uprade to GNU tar 1.13.91 (backed out again, because 1.13.91 is partly broken) -20031205 fix rpmtool run-time under openpkg.boot environment -20031129 do not enforce uudecode availability as raw tarballs introduced a month ago do no longer require it -20031127 only allow exact section command matches in rc -20031124 upgrade to zlib 1.2.1 -20031121 rc manual page additions -20031117 automatically check for %NoSource/%NoPatch integrity and package class in %prep -20031113 stop processing if we cannot create the necessary user accounts -20031107 fix usage of %pre in aux.wrapbin.sh -- was broken after recent work-offs -20031102 upgrade to cURL 7.10.8 -20031031 upgrade to latest OSSP platform script version -20031031 work-off aux.wrap{src,bin}.sh scripts and internal documentation in README -20031029 switch from uncompressed binary tarball to compressed tarball in tarball encapsulation -20031029 switch from uuencoded to raw tarballs for source/binary .sh files (30% space reduction) -20031028 remove problematic INCPATH stuff in RPM configure which picks up external stuff -20031028 upgrade to latest OSSP platform script for Darwin 6.6 and Solaris 10 support -20031027 port RPM to OpenDarwin 6.6.2 -20031027 try to cleanup glob(3) replacement hacks in RPM -20031021 fix RPM GCC building on Unixware by using Linux i386 assembly specific stuff on Linux only. -20031020 include "trigger argument passing patch" from RPM BugDB -20031020 make "rpm --setperms" and "rpm --setugids" more portable by using Bash -20031020 finish porting to SCO UnixWare 7.1.3 -20031019 port mostly to SCO UnixWare 7.1.3 (only some libtool issues remaining) -20031019 provide %{l_cppflags -i} for platform identification defines -20031019 use /lib/openpkg/bash for rpmtool and lsync for better portability -20031015 fix RPM for building without GCC again -20031014 port to Solaris 8 with Forte C compiler -20031014 fix filesystem space checking (aux.prereq.sh) -20031014 get rid of TEMPDIR (we use more canonical TMPDIR now only) -20031010 provide %{_rpmdb_private} macro and --db-private for operating the RPM DB in DB_PRIVATE mode. -20031010 working off the aux.prereq.sh script for adjusted platform checks and additional disk space checks -20031008 make sure RPM does not pick up headers of a vendor BeeCrypt package under RedHat Linux -20031008 fix --makeproxy command after recent OpenPKG branding in "rpm --version" output -20031006 add 'Provides: openpkg = 1.3.1-1.3.1' for easier mixing with OpenPKG 1.3 release packages -20031006 add OpenPKG branding to "rpm --version" output -20031005 check availability of unpacking tools in .src.sh script -20030929 upgrade to latest OSSP platform script to recognize even more platforms -20030928 add partial UnixWare 7.1.x support to bootstrap; add IRIX, UnixWare and QNX support to "platform" -20030927 make %{error:} really stop SPEC processing -20030927 add new macro %{l_openpkg_release} for expanding the release id -20030922 remove stale temporary files in /etc -20030918 use assembly code in BeeCrypt only for platform where it is known to work -20030918 add RPM internal %{_force_oldpackage} option for enforcing --oldpackage on upgrades -20030918 introduce new rpmdb utility for administrating the RPM database on the lower level -20030916 RPM database mutex workaround for Solaris plus the passing of option -b to patch(1) -20030915 remove the librpmmisc.a library because its contents RPM includes in librpmio.a -20030915 Berkeley-DB fixes for fcntl(2) usage and Linux O_DIRECT issue -20030913 update to latest OSSP platform for even more accurate Linux product recognition -20030913 fix ordering of libraries in "rpm-config --libs" -20030912 add -pipe to %{l_cflags} only if %{l_cc} is GCC and as(1) is GNU as -20030912 remove per-package %{_sourcedir} and %{_specdir} directories on --rebuild -20030912 allow "-bb --short-circuit" for continuing building a binary package -20030912 unconditionally remove temporary files of generated/executed scripts -20030912 do not remove the builded sources in %clean to be consistent with other OpenPKG packages -20030912 include all essential RPM C API headers in /include/rpm/ -20030912 add file(1) magic* files to /lib/openpkg/ -20030911 disable RPM internal support for unzip(1)'ing .zip files -20030911 improve Linux detection in "platform" script -20030909 remove one more GCC extensional feature (in RPM's file/file.h) -20030908 upgrade "platform" script to new "OSSP platform" implementation and provide %{l_platform} -20030907 add rpm-config(8) utility and add librpmbeecrypt.a to installation tree -20030904 apply new BeeCrypt and Bash patch files -20030904 remove obsoleted patch files from CVS -20030904 fix cut & paste typo in openpkg.spec related to VERBOSE function -20030904 fix logic in previous owner/group patch -20030903 patch RPM 4.2.1 so it does again (as 4.0.2) ignore file owner/group on .src.rpm installation. -20030901 port RPM 4.2.1 to Solaris 2.6 (no "uintX_t") and non-GCC platforms (no "inline") -20030901 port RPM 4.2.1 to OpenBSD/NetBSD, too. -20030830 replace Bash variable exporting constructs with compatible Bourne-Shell constructs -20030828 fix unpacking of non-compressed tarballs -20030827 enhance and fix %post script to correctly rebuild RPM DB and import OpenPGP public key - -20030826 **** MAJOR UPGRADE FROM RPM 4.0.2 TO RPM 4.2.1 **** -20030820 name internal bootstrapping tarball just .tar instead of .tar.Z -- it is no longer compressed. -20030806 fix "rcTmp -f" functionality -20030805 trick cURL to skip some useless F77 autoconf checks to get it working under NetBSD again -20030805 allow variables with other characters than A-Z (e.g. LD_LIBRARY_PATH) to be set in %env, too. - -20030802 **** RELEASE AS PART OF OPENPKG 1.3.0 **** -20030730 add entry to /etc/shells only if /etc/shells already exists at all -20030729 aux.wrap{src,bin}.sh: exit immediately if uudecode cannot be found -20030729 rc: fixed processing of $openpkg_rc_def (requires pre-inclusion of rc.conf) -20030729 fixed nasty filedescriptor leakage in RPM on script execution -20030728 upgraded to cURL 7.10.6 -20030728 rc: stop processing 'start' and 'restart' scripts if .rpmsave files exists -20030727 rc: do not export TMPDIR at all, it causes problems for applications once the directory is gone -20030721 rc: do not use TMPDIR -- instead use hard-coded /tmp -20030719 openpkg.boot: try to make build environment more sane by setting umask and unsetting some strange aliases -20030718 rc.func: opXXX replaced by rcXXX; add rc(8) manual page; add pod2man.sh; fix perl/ warnings under building -20030717 rc.func: add opService, switch to Bash; rc: rewrite --eval to use Bash; rpmmacros: add l_tmp{dir,file} -20030716 cleaned and enhanced "rc" again; added %{l_value} killer macro -20030715 work-off "rc" again: add -o/--output options, better cleanup, global return code -20030715 add to "rc" the -v/--verbose option again and provide terminal-detection -20030714 reduce run-time of "rc" --eval/--print operations by parsing %config sections just once -20030714 add convenience macros %l_rc and %l_rpm; resolve conflict with openpkg-rc package -20030714 bugfix verbose output; add "rc" command to search path for run-command sections -20030710 rename openpkg_runall to openpkg_rc_all, support new openpkg_rc_def. -20030709 fully work-off rc script -20030709 make sure l_fsl_{ldflags,libs} do not produce an error if fsl-config is not existing -20030709 change syntax of append/prepend feature for %{l_cppflags} and %{l_ldflags} macros; fix DB autoconf checks -20030708 provide append/prepend feature for %{l_cppflags} and %{l_ldflags} macros -20030707 remove now officially deprecated usage of %{name} macro -20030606 correctly support "use_cxx" for setting the "c++" path -20030604 fix "{s,m,r,r}{u,g}id" handling on initial bootstrapping via .src.sh. -20030604 better support SuSE -20030603 make sure 'shtool install -e ...' does not fail if file is not writeable due to permissions -20030530 add HISTORY file to package -20030519 upgrade to cURL 7.10.5 -20030516 make sure 'shtool subst' does not fail if file is not writeable due to permissions -20030509 fix 'shtool mkln' command -20030429 Gentoo Linux support -20030429 RedHat 8 support (avoid problems due to alias rm='rm -i'), clean up temp dir -20030429 some cosmetics -20030429 switch to new shtool which now has a working 'shtool rotate' for SuSE -20030428 add bzip2 library/header to package because it is references by librpmio -20030425 allow only 'use_' instead of 'with_' for overriding 'l_' to reduce conflict with regular package options -20030422 teach --fetch to honor proxy settings -20030417 force RPM to no longer build itself statically -20030416 Fix dev ticket 23 by finally implementing {m,r,n,s}uid and {m,r,n,s}gid params -20030416 Fix removal of group entries, which never worked from day one?!?! -20030415 Add l_fsl_ldflags and l_fsl_libs macros -20030414 fix cache file usage -20030410 do not leave dot files on deinstallation -20030404 upgrade to latest shtool snapshot in order to fix rotate command if a filename contains whitespaces -20030403 (unknown change) -20030324 speclint police -20030319 fix shell syntax error -20030317 Support for MacOS X (at least 10.0.4) -20030310 fix substitution of noreplace attribute -20030305 mega-commit: speclint police changes which were not picked up by openpkg-dev before -20030305 speclint police -20030223 add more 'getent' support -20030222 add Solaris/Linux 'getent' based support for passwd/group fiddling, too. -20030221 enhance user/group name/id fiddling in all bootstrap places to favorize POSIX id -20030211 Aaaaannnd risk: GNU shtool 2.0b0 (developer snapshot) -20030205 move bash environment setup into .bash_login; use %config(noreplace) for them plus rc.conf -20030204 make sure that the prefix/root directory has correct permissions and owner/group -20030203 try to fix temporary filename issues -20030202 workaround problem of missing PATH for scripts executed under different users -20030130 fix rpmtool PATH fiddling -20030128 fix typo - -20030121 **** RELEASE AS PART OF OPENPKG 1.2.0 **** -20030114 upgrade to cURL 7.10.3 -20030113 make sure we stop on errors -20030110 some vendor tar complain about setuid bits and other flags, but work fine -20030109 ops, not needed actually, was my fault in not cleaning up the system -20030109 add FreeBSD 5.0-CURRENT support -20030108 add no-source support -20030103 switch to new %option implementation -20030103 remove '%options' hack, it will be replaced soon with a more elegant solution based on RPM 'Provides' headers - -2002 -==== - -20021230 bump of Copyright messages for forthcoming years 2003 -20021230 switch to %option(s), but intentionally WITHOUT dep increase and WITHOUT FTP server updates -20021230 provide brand-new extensions: %option and %options macros -20021220 consistently use 'Options: none' to indicate no options to 'openpkg build' -20021218 finally fix the mkdir issues -20021217 make sure RPM does not hard-code an absolute path to 'mkdir' -20021204 add l_cxxflags for consistency; support gcc 3.2.x -20021127 and also the bigger hammer for bash included in the bootstrap package -20021122 provide a more convenient definition for cppflags and ldflags -20021120 make all %config sections visible for any package -20021119 upgrade to cURL 7.10.2 (required zlib) -20021118 add 'rpm --makeproxy --prefix=' feature -20021030 get rid of unneccessary semicolon -20021028 fix building under NetBSD -20021023 try to fix cURL building -20021011 upgrade to cURL 7.10.1 -20021009 fix unpacking -20021005 upgrading package: openpkg 20021004 -> 20021005 -20021004 upgrading package: openpkg 20021002 -> 20021004 -20021002 Added support for IRIX. -20021001 upgrade to cURL 7.10 -20021001 upgrading package: openpkg 20020926 -> 20021001 -20020926 upgrade to gzip 1.3.4 -20020909 Fixed a subtle login name bug by rearranging user name assignment in rc. -20020904 Add unofficial support for Darwin OS. -20020829 fix for more modern SuSE -20020826 also add sbin directory to $PATH - -20020826 **** RELEASE AS PART OF OPENPKG 1.1.0 **** -... - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/aux.prereq.sh --- a/openpkg/aux.prereq.sh Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -#!/bin/sh -## -## aux.prereq.sh -- Platform Pre-Requisite Checks -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## -## Usage: aux.prereq.sh source|binary -## - -mode="$1" - -# CHECK: determine platform ids -platform_prod=`sh ./shtool platform -n -L -S "" -C "+" -F "%-%"` -platform_tech=`sh ./shtool platform -n -L -S "" -C "+" -F "%-%"` -echo "++ platform product: $platform_prod" -echo "++ platform technology: $platform_tech" - -# -# CHECK: diskspace requirement -# -if [ ".$mode" = .source ]; then - fs_path="${TMPDIR-/tmp}" - fs_need=150000 -else - fs_path="" # FIXME - fs_need=0 # FIXME -fi -fs_free="" -case "$platform_tech" in - *-freebsd* | *-linux* | *-sunos* ) - fs_free=`cd $fs_path && /bin/df -k . | sed -n -e '$p' | sed -e 's;^[^ ]*;;' -e 's; *;;' | awk '{ print $3; }'` - ;; -esac -if [ ".$fs_free" != . ]; then - if [ $fs_free -lt $fs_need ]; then - if [ ".$mode" = .source ]; then - echo "ERROR: temporary directory \"$fs_path\" has to reside on a partition" 1>&2 - echo " with at least $fs_need KB of free disk space. Set \$TMPDIR to" 1>&2 - echo " a directory on a partition with enough free disk space, please." 1>&2 - else - echo "ERROR: installation directory \"$fs_path\" has to reside on a partition" 1>&2 - echo " with at least $fs_need KB of free disk space. Make \"$fs_path\" a" 1>&2 - echo " symbolic link to a directory on a partition with enough free" 1>&2 - echo " disk space, please." 1>&2 - fi - exit 1 - fi -fi - -# -# CHECK: available vendor packages -# -# ...FIXME... - -# -# CHECK: available tools in $PATH -# -# ...FIXME... - -# -# CHECK: available devices /dev/random, etc. -# -# ...FIXME... - -# -# CHECK: consistency check for /prefix (symlink!) -# -# ...FIXME... - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/aux.usrgrp.sh --- a/openpkg/aux.usrgrp.sh Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -#!/bin/sh -## -## usrgrp.sh -- user/group name/id determination -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# command line parameters (defaults) -help=0 -usr=''; grp='' -susr=''; sgrp='' -musr=''; mgrp='' -rusr=''; rgrp='' -nusr=''; ngrp='' -suid=''; sgid='' -muid=''; mgid='' -ruid=''; rgid='' -nuid=''; ngid='' - -# parse command line options -for opt -do - case $opt in - -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;; - *) arg='' ;; - esac - case $opt in - -h | --help ) help=1 ;; - --usr=* | --user=* ) usr=$arg ;; - --grp=* | --group=* ) grp=$arg ;; - --susr=* ) susr=$arg ;; - --sgrp=* ) sgrp=$arg ;; - --musr=* ) musr=$arg ;; - --mgrp=* ) mgrp=$arg ;; - --rusr=* ) rusr=$arg ;; - --rgrp=* ) rgrp=$arg ;; - --nusr=* ) nusr=$arg ;; - --ngrp=* ) ngrp=$arg ;; - --suid=* ) suid=$arg ;; - --sgid=* ) sgid=$arg ;; - --muid=* ) muid=$arg ;; - --mgid=* ) mgid=$arg ;; - --ruid=* ) ruid=$arg ;; - --rgid=* ) rgid=$arg ;; - --nuid=* ) nuid=$arg ;; - --ngid=* ) ngid=$arg ;; - * ) help=1 ;; - esac -done -if [ ".$help" = .1 ]; then - echo "Usage: sh $0 [-h|--help]" 2>&1 - echo " [--[smrn]?usr=] [--[smrn]?grp=]" 2>&1 - echo " [--[smrn]uid=] [--[smrn]gid=]" 2>&1 - exit 1 -fi - -# determine cusr/cgrp -cusr=`(id -un) 2>/dev/null ||\ - (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\ - (whoami) 2>/dev/null ||\ - (who am i | cut "-d " -f1) 2>/dev/null ||\ - echo $LOGNAME` -cgid=`(id -g $cusr) 2>/dev/null ||\ - ((getent passwd "${cusr}"; grep "^${cusr}:" /etc/passwd; ypmatch "${cusr}" passwd; nismatch "${cusr}" passwd; nidump passwd . | grep "^${cusr}:") 2>/dev/null |\ - sed -n -e '1p' | awk -F: '{ print $4; }')` -cgrp=`(id -gn $cusr) 2>/dev/null ||\ - ((getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null | grep "^[^:]*:[^:]*:${cgid}:" |\ - sed -n -e '1p' | awk -F: '{ print $1; }')` -[ ".$cgrp" = . ] && cgrp="$cusr" - -# determine OpenPKG susr/sgrp -if [ ".$susr" = . ]; then - if [ ".$usr" = . ]; then - susr="$cusr" - else - susr="root" - fi -fi -if [ ".$sgrp" = . ]; then - sgrp=`(id -gn $susr) 2>/dev/null` - if [ ".$sgrp" = . ]; then - tgid=`(getent passwd "${susr}"; grep "^${susr}:" /etc/passwd; ypmatch "${susr}" passwd; nismatch "${susr}" passwd; nidump passwd . | grep "^${susr}:") 2>/dev/null |\ - sed -n -e '1p' | awk -F: '{ print $4; }'` - if [ ".$tgid" != . ]; then - sgid="${tgid}" - sgrp=`(getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null |\ - grep "^[^:]*:[^:]*:${sgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'` - fi - if [ ".$sgrp" = . ]; then - sgrp="wheel" - fi - fi -fi - -# determine OpenPKG musr/mgrp -if [ ".$musr" = . ]; then - musr="$usr" -fi -if [ ".$musr" = . ]; then - musr="$cusr" -fi -if [ ".$mgrp" = . ]; then - mgrp=`(id -gn $musr) 2>/dev/null` - if [ ".$mgrp" = . ]; then - tgid=`(getent passwd "${musr}"; grep "^${musr}:" /etc/passwd; ypmatch "${musr}" passwd; nismatch "${musr}" passwd; nidump passwd . | grep "^${musr}:") 2>/dev/null |\ - sed -n -e '1p' | awk -F: '{ print $4; }'` - if [ ".$tgid" != . ]; then - mgid="${tgid}" - mgrp=`(getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null |\ - grep "^[^:]*:[^:]*:${mgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'` - fi - if [ ".$mgrp" = . ]; then - mgrp="$grp" - fi - if [ ".$mgrp" = . ]; then - mgrp="$cgrp" - fi - fi -fi - -# determine OpenPKG rusr/rgrp -if [ ".$rusr" = . ]; then - rusr="${usr}-r" -fi -if [ ".$rusr" = ".-r" ]; then - rusr="$cusr" -fi -if [ ".$rgrp" = . ]; then - rgrp=`(id -gn $rusr) 2>/dev/null` - if [ ".$rgrp" = . ]; then - tgid=`(getent passwd "${rusr}"; grep "^${rusr}:" /etc/passwd; ypmatch "${rusr}" passwd; nismatch "${rusr}" passwd; nidump passwd . | grep "^${rusr}:") 2>/dev/null |\ - sed -n -e '1p' | awk -F: '{ print $4; }'` - if [ ".$tgid" != . ]; then - rgid="${tgid}" - rgrp=`(getent group; cat /etc/group; ypcat group; nismatch group; nidump group .) 2>/dev/null |\ - grep "^[^:]*:[^:]*:${rgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'` - fi - if [ ".$rgrp" = . ]; then - rgrp="${grp}-r" - fi - if [ ".$rgrp" = ".-r" ]; then - rgrp="$cgrp" - fi - fi -fi - -# determine OpenPKG nusr/ngrp -if [ ".$nusr" = . ]; then - nusr="${usr}-n" -fi -if [ ".$nusr" = ".-n" ]; then - nusr="$cusr" -fi -if [ ".$ngrp" = . ]; then - ngrp=`(id -gn $nusr) 2>/dev/null` - if [ ".$ngrp" = . ]; then - tgid=`(getent passwd "${nusr}"; grep "^${nusr}:" /etc/passwd; ypmatch "${nusr}" passwd; nismatch "${nusr}" passwd; nidump passwd . | grep "^${nusr}:") 2>/dev/null |\ - sed -n -e '1p' | awk -F: '{ print $4; }'` - if [ ".$tgid" != . ]; then - ngid="${tgid}" - ngrp=`(getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null |\ - grep "^[^:]*:[^:]*:${ngid}:" | sed -n -e '1p' | awk -F: '{ print $1; }'` - fi - if [ ".$ngrp" = . ]; then - ngrp="${grp}-n" - fi - if [ ".$ngrp" = ".-n" ]; then - ngrp="$cgrp" - fi - fi -fi - -# determine OpenPKG suid/sgid -# (currently not necessary) - -# determine OpenPKG muid/mgid -# (currently not necessary) - -# determine OpenPKG ruid/rgid -# (currently not necessary) - -# determine OpenPKG nuid/ngid -# (currently not necessary) - -# print results -output="" -for var in \ - susr sgrp \ - musr mgrp \ - rusr rgrp \ - nusr ngrp \ - suid sgid \ - muid mgid \ - ruid rgid \ - nuid ngid; do - eval "val=\"\$$var\"" - if [ ".$output" = . ]; then - output="$var=\"$val\"" - else - output="$output; $var=\"$val\"" - fi -done -echo $output - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/aux.wrapbin.sh --- a/openpkg/aux.wrapbin.sh Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -#!/bin/sh -## -## OpenPKG Binary Bootstrap Package (self-extracting shell script) -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# configuration -l_me="$0" -o_help=no -o_version=no -o_tar=no -l_prefix='@l_prefix@' -l_musr='@MUSR@' -l_mgrp='@MGRP@' -l_platform="@l_platform@" -l_release="@l_release@" -l_version="@l_version@" - -# establish standard environment -PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin" -LC_CTYPE=C -export LC_CTYPE -umask 022 - -# parse command line options -for opt -do - case $opt in - -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;; - *) arg='' ;; - esac - case $opt in - -h | --help ) o_help=yes ;; - -v | --version ) o_version=yes ;; - -t | --tar ) o_tar=yes ;; - --prefix=* ) l_prefix=$arg ;; - * ) o_help=yes ;; - esac -done -if [ ".$o_version" = .no -a ".$l_prefix" = . ]; then - o_help=yes -fi -if [ ".$o_help" = .yes ]; then - echo "Usage: sh $l_me" 2>&1 - echo " [--prefix=] [-t|--tar]" 2>&1 - echo " [-h|--help] [-v|--version]" 2>&1 - exit 1 -fi - -# make sure all essential installation tools are available -for tool in sed mkdir dd tar chown chgrp; do - found=no - case $tool in - /* ) - if [ -f $tool ]; then - found=yes - fi - ;; - * ) - for p in `IFS=:; echo $PATH`; do - if [ -f "$p/$tool" ]; then - found=yes - break - fi - done - ;; - esac - if [ ".$found" = .no ]; then - echo "$l_me:ERROR: unable to find installation tool \"$tool\"" 1>&2 - exit 1 - fi -done - -# optionally extract the embedded tarball only -if [ ".$o_tar" = .yes ]; then - tmpdir="${TMPDIR-/tmp}/openpkg.$$" - ( umask 077 && mkdir $tmpdir) || exit 1 - dd if=$l_me bs=8192 skip=8 2>/dev/null |\ - ( cd $tmpdir || exit 1 - tar xf - 2>/dev/null || exit 1 - ./openpkg.bzip2 -d -c openpkg.tar.bz2 - ) || exit 1 - rm -rf $tmpdir - exit 0 -fi - -# display version and copyright header -echo "OpenPKG ${l_release} Binary Bootstrap Package, version ${l_version}" -echo "Built for prefix ${l_prefix} on target platform ${l_platform}" -if [ ".$o_version" = .yes ]; then - exit 0 -fi - -# determine current username -cusr=`(id -un) 2>/dev/null ||\ - (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\ - (whoami) 2>/dev/null ||\ - (who am i | cut "-d " -f1) 2>/dev/null ||\ - echo ${LOGNAME-"NN"}` - -# running the embedded %pre script for hooking into the system environment -echo "++ hooking OpenPKG instance into system environment" -prefix="$l_prefix" -susr='@SUSR@'; sgrp='@SGRP@' -musr='@MUSR@'; mgrp='@MGRP@' -rusr='@RUSR@'; rgrp='@RGRP@' -nusr='@NUSR@'; ngrp='@NGRP@' -suid='@SUID@'; sgid='@SGID@' -muid='@MUID@'; mgid='@MGID@' -ruid='@RUID@'; rgid='@RGID@' -nuid='@NUID@'; ngid='@NGID@' -set -- 1 # emulate RPM's $1 when executing scripts -# ---- BEGIN EMBEDDED %pre SCRIPT ---- -@PRE@ -# ---- END EMBEDDED %pre SCRIPT ---- - -# make sure prefix/root directory exists -# and has correct permissions and owner/group -if [ ! -d $l_prefix ]; then - # create prefix/root directory from scratch - echo "++ creating OpenPKG instance root directory \"$l_prefix\"" - d='' - for c in `IFS=/; echo $l_prefix`; do - d="$d/$c" - if [ ! -d $d ]; then - mkdir $d || exit 1 - chmod 755 $d || exit 1 - if [ ".$cusr" = .root ]; then - chown $musr $d >/dev/null 2>&1 || true - chgrp $mgrp $d >/dev/null 2>&1 || true - fi - fi - done -else - # adjust already existing prefix/root directory - echo "++ fixating OpenPKG instance root directory \"$l_prefix\"" - ( cd $l_prefix || exit 1 - chmod 755 . || exit 1 - if [ ".$cusr" = .root ]; then - chown $musr . >/dev/null 2>&1 || true - chgrp $mgrp . >/dev/null 2>&1 || true - fi - ) || exit 1 -fi - -# extract and install binary distribution files -echo "++ extracting OpenPKG binary distribution" -dd if=$l_me bs=8192 skip=8 2>/dev/null |\ - (cd $l_prefix; tar xf - 2>/dev/null) -echo "++ installing OpenPKG binary distribution" -( cd $l_prefix || exit 1 - ./openpkg.bzip2 -d -c openpkg.tar.bz2 | ./openpkg.tar xf - 2>/dev/null - rm -f openpkg.tar openpkg.bzip2 openpkg.tar.bz2 >/dev/null 2>&1 || true -) || exit 1 - -# fixate installation files -# (ATTENTION: order of chgrp/chown and chmod is important because of "set-UID" bits) -echo "++ fixating OpenPKG instance filesystem hierarchy" -( echo 'fixate () {' - echo ' chgrp "$3" "$4"' - echo ' chown "$2" "$4"' - echo ' chmod "$1" "$4"' - echo '}' - $l_prefix/bin/openpkg --keep-privileges rpm -q openpkg \ - --qf '[fixate %7.7{FILEMODES:octal} %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} ::%{FILENAMES:shescape}\n]' |\ - grep -v '(none)' | sed 's/^fixate .../fixate /' | sed -e "s; ::\\(.\\)@l_prefix@; \\1$l_prefix;" -) | sh 2>/dev/null || true - -# running the embedded %post script -echo "++ post-processing OpenPKG bootstrap installation" -prefix="$l_prefix" -susr='@SUSR@'; sgrp='@SGRP@' -musr='@MUSR@'; mgrp='@MGRP@' -rusr='@RUSR@'; rgrp='@RGRP@' -nusr='@NUSR@'; ngrp='@NGRP@' -suid='@SUID@'; sgid='@SGID@' -muid='@MUID@'; mgid='@MGID@' -ruid='@RUID@'; rgid='@RGID@' -nuid='@NUID@'; ngid='@NGID@' -set -- 1 # emulate RPM's $1 when executing scripts -# ---- BEGIN EMBEDDED %post SCRIPT ---- -@POST@ -# ---- END EMBEDDED %post SCRIPT ---- - -# display final information -( echo "Congratulations!" - echo "" - echo "You have successfully installed an OpenPKG ${l_release} instance" - echo "under prefix ${l_prefix} on target platform ${l_platform}." - echo "" - echo "For details about this OpenPKG instance, run any of the" - echo "following typical OpenPKG RPM query commands:" - echo "" - echo " \$ ${l_prefix}/bin/openpkg rpm -qa" - echo " \$ ${l_prefix}/bin/openpkg rpm -qi openpkg" - echo " \$ ${l_prefix}/bin/openpkg rpm -qlv openpkg" - echo "" - echo "To check the integrity of the entire OpenPKG instance," - echo "run the following OpenPKG RPM verify command:" - echo "" - echo " \$ ${l_prefix}/bin/openpkg rpm -Va" - echo "" - echo "To install software packages into this OpenPKG instance, run" - echo "the following two OpenPKG RPM build commands for each package:" - echo "" - echo " \$ ${l_prefix}/bin/openpkg rpm --rebuild /path/to/foo-*.src.rpm" - echo " \$ ${l_prefix}/bin/openpkg rpm -Uvh ${l_prefix}/RPM/PKG/foo-*.rpm" - echo "" - echo "To remove a software package later, just run:" - echo "" - echo " \$ ${l_prefix}/bin/openpkg rpm -e foo" - echo "" - echo "To remove the whole OpenPKG instance under prefix ${l_prefix}," - echo "just remove every package as shown above. As you finally" - echo "remove the package \"openpkg\", the OpenPKG instance itself" - echo "will be unlinked from the system and removed as well." - echo "" - echo "Thank you for flying OpenPKG..." - echo " Ralf S. Engelschall" - echo " The OpenPKG Project" - echo " openpkg@openpkg.org" -) | $l_prefix/lib/openpkg/rpmtool msg -b -t info - -# die explicitly just before the shell would discover -# that we carry mega-bytes of data with us... ;-) -exit 0 - -# the distribution tarball is appended in raw format directly to the -# end of this script, just leaded by padding whitespaces which make -# sure that the tarball data starts at the pre-defined offset of 64KB. -# This allows us to unpack the tarball by just skipping the leading -# 64KB (= 8192*8, see above). - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/aux.wrapsrc.sh --- a/openpkg/aux.wrapsrc.sh Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -#!/bin/sh -## -## OpenPKG Source Bootstrap Package (self-extracting shell script) -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# configuration -l_me="$0" -o_help=no -o_version=no -o_tar=no -l_prefix='/openpkg' -l_dir='@l_dir@' -l_release="@l_release@" -l_version="@l_version@" - -# establish standard environment -PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin" -LC_CTYPE=C -export LC_CTYPE -umask 022 - -# pre-parse command line options -for opt -do - case $opt in - -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;; - *) arg='' ;; - esac - case $opt in - -h | --help ) o_help=yes ;; - -v | --version ) o_version=yes ;; - -t | --tar ) o_tar=yes ;; - --prefix=* ) l_prefix=$arg ;; - esac -done -if [ ".$o_help" = .yes ]; then - echo "Usage: sh $l_me" 2>&1 - echo " [--prefix=] [--tag=]" 2>&1 - echo " [--user=] [--group=]" 2>&1 - echo " [--{s,m,r,n}usr=] [--{s,m,r,n}grp=]" 2>&1 - echo " [--{s,m,r,n}uid=] [--{s,m,r,n}gid=]" 2>&1 - echo " [--use_tar=] [--use_make=] [--use_cc=]" 2>&1 - echo " [--use_ar=] [--use_ld=] [--use_as=] [--use_strip=]" 2>&1 - echo " [-t|--tar] [-h|--help] [-v|--version]" 2>&1 - exit 1 -fi - -# make sure all essential unpacking tools are available -# (the build tools are checked later from within openpkg.spec) -for tool in /bin/sh mkdir cat tar rm chown chgrp sed dd; do - found=no - case $tool in - /* ) - if [ -f $tool ]; then - found=yes - fi - ;; - * ) - for p in `IFS=:; echo $PATH`; do - if [ -f "$p/$tool" ]; then - found=yes - break - fi - done - ;; - esac - if [ ".$found" = .no ]; then - echo "$l_me:ERROR: unable to find bootstrap tool \"$tool\"" 1>&2 - exit 1 - fi -done - -# optionally extract the embedded tarball only -if [ ".$o_tar" = .yes ]; then - dd if=$l_me bs=8192 skip=8 2>/dev/null - exit 0 -fi - -# display version and copyright header -echo "OpenPKG ${l_release} Source Bootstrap Package, version ${l_version}" -if [ ".$o_version" = .yes ]; then - exit 0 -fi -echo "Building for prefix ${l_prefix} on current platform" - -# determine current user/group -cusr=`(id -un) 2>/dev/null ||\ - (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\ - (whoami) 2>/dev/null ||\ - (who am i | cut "-d " -f1) 2>/dev/null ||\ - echo $LOGNAME` -cgid=`(id -g $cusr) 2>/dev/null ||\ - ((getent passwd "${cusr}"; grep "^${cusr}:" /etc/passwd; ypmatch "${cusr}" passwd; nismatch "${cusr}" passwd; nidump passwd . | grep "^${cusr}:") 2>/dev/null |\ - sed -e 'q' | awk -F: '{ print $4; }')` -cgrp=`(id -gn $cusr) 2>/dev/null ||\ - ((getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null | grep "^[^:]*:[^:]*:${cgid}:" |\ - sed -e 'q' | awk -F: '{ print $1; }')` -if [ ".$cgrp" = . ]; then - cgrp="$cusr" -fi - -# extract the source distribution files -echo "++ extracting OpenPKG source distribution" -rm -rf $l_dir >/dev/null 2>&1 -mkdir $l_dir || exit 1 -dd if=$l_me bs=8192 skip=8 2>/dev/null | (cd $l_dir; tar xf - 2>/dev/null) -if [ ".$cusr" = .root ]; then - ( cd $l_dir || exit 1 - chown -R -h $cusr . >/dev/null 2>&1 || true - chgrp -R -h $cgrp . >/dev/null 2>&1 || true - ) || exit 1 -fi -if [ ! -f $l_dir/openpkg.boot ]; then - echo "$l_me:ERROR: failed to unpack into directory \"$l_dir\"" 1>&2 - exit 1 -fi - -# perform bootstrap procedure -echo "++ building OpenPKG binary distribution" -( cd $l_dir || exit 1 - ./openpkg.boot ${1+"$@"} || exit 1 -) || exit 1 - -# cleanup -rm -rf $l_dir >/dev/null 2>&1 - -# die explicitly just before the shell would discover -# that we carry mega-bytes of data with us... -exit 0 - -# the distribution tarball is appended in raw format directly to the -# end of this script, just leaded by padding whitespaces which make -# sure that the tarball data starts at the pre-defined offset of 64KB. -# This allows us to unpack the tarball by just skipping the leading -# 64KB (= 8192*8, see above). - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/install.sh --- a/openpkg/install.sh Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -#!@l_prefix@/lib/openpkg/bash -## -## install -- OpenPKG Tool Chain "install" command (BOOSTRAP VERSION ONLY) -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -## -## This command emulates the "openpkg install openpkg-tools" command -## in order to bootstrap the installation of the OpenPKG Tool Chain. -## - -# sanity check usage -if [ $# -eq 1 -a ".$1" = ".openpkg-tools" ]; then - : -else - echo "openpkg:ERROR: still not available functionality \"install $*\"" 1>&2 - echo "openpkg:INFO: This functionality is provided by the \"openpkg-tools\" package only!" 1>&2 - echo "openpkg:INFO: Run the command \"$OPENPKG_PREFIX/bin/openpkg install openpkg-tools\" to" 1>&2 - echo "openpkg:INFO: bootstrap the \"openpkg-tools\" package for additional functionality." 1>&2 - echo "openpkg:INFO: This bootstrap version only supports this particular install command." 1>&2 - exit 1 -fi - -# pass-through operation to "openpkg build" tool -$OPENPKG_PREFIX/bin/openpkg build openpkg-tools | sh - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/pod2man.sh --- a/openpkg/pod2man.sh Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#!/bin/sh -pod2man --section=1 --center="OpenPKG" --release="OPENPKG(8)" --date="OpenPKG" --quotes=none openpkg.pod >openpkg.1 -pod2man --section=8 --center="OpenPKG" --release="RC(8)" --date="OpenPKG" --quotes=none rc.pod >rc.8 -pod2man --section=8 --center="OpenPKG" --release="RPMTOOL(8)" --date="OpenPKG" --quotes=none rpmtool.pod >rpmtool.8 -pod2man --section=8 --center="OpenPKG" --release="LSYNC(8)" --date="OpenPKG" --quotes=none lsync.pod >lsync.8 -pod2man --section=8 --center="OpenPKG" --release="RPM-CONFIG(8)" --date="OpenPKG" --quotes=none rpm-config.pod >rpm-config.8 -pod2man --section=8 --center="OpenPKG" --release="UUID(8)" --date="OpenPKG" --quotes=none uuid.pod >uuid.8 -pod2man --section=8 --center="OpenPKG" --release="RELEASE(8)" --date="OpenPKG" --quotes=none release.pod >release.8 diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/rplstrnlen.c --- a/openpkg/rplstrnlen.c Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -// -// Stubfunc - Stubs to replace missing functions in third party projects -// Copyright © 2012 Michael Schloh von Bennewitz -// -// Stubfunc is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// Stubfunc is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Stubfunc. If not, see . -// -// This file implements a stub function and is part of a larger project, -// explanations of which can be found at http://dev.europalab.com/. -// -// rplstrnlen.c: ISO C99 implementation -// - -#include - - -///* replacement for strnlen(3), missing in some POSIX distributions */ -//status size_t strnlen(const char *pckInstring, size_t Maxsize) { -// register const char *prckIdx; -// for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx); -// return(prckIdx - pckInstring); -//} - -/* replacement for strnlen(3), missing in some POSIX distributions */ -extern size_t rpl_strnlen(const char *pckInstring, size_t Maxsize) { - register const char *prckIdx; - for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx); - return(prckIdx - pckInstring); -} diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/rpm.patch.bugfix --- a/openpkg/rpm.patch.bugfix Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,369 +0,0 @@ -## -## rpm.patch.bugfix -- Annotated OpenPKG RPM Patch file -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## This file assembles changes to existing RPM source files between -## the original RedHat RPM and the OpenPKG RPM variant. It can be -## automatically applied to a vanilla RedHat RPM source tree with the -## 'patch' tool to upgrade those files. Each patch snippet is annotated -## with a short description. -## -## Created on: 13-Sep-2006 -## -## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG -## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE. -## - -+--------------------------------------------------------------------------- -| %setup and %patch macros are treated very special internally, but -| make sure they at least optically can be used like any other macro -| and especially can have leading whitespaces. -+--------------------------------------------------------------------------- -Index: build/parsePrep.c ---- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 -+++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 -@@ -584,12 +584,15 @@ - saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n'); - /*@-usereleased@*/ - for (lines = saveLines; *lines; lines++) { -+ char *cp; -+ for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++) -+ ; - res = 0; - /*@-boundsread@*/ -- if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) { -- res = doSetupMacro(spec, *lines); -- } else if (! strncmp(*lines, "%patch", sizeof("%patch")-1)) { -- res = doPatchMacro(spec, *lines); -+ if (! strncmp(cp, "%setup", sizeof("%setup")-1)) { -+ res = doSetupMacro(spec, cp); -+ } else if (! strncmp(cp, "%patch", sizeof("%patch")-1)) { -+ res = doPatchMacro(spec, cp); - } else { - appendLineStringBuf(spec->prep, *lines); - } - -+--------------------------------------------------------------------------- -| Do not pick of the vendor BeeCrypt package on RedHat Linux. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:38:23 -0000 -@@ -416,7 +416,7 @@ - AC_CHECK_HEADER([beecrypt/beecrypt.h], [ - AC_CHECK_LIB(beecrypt, mpfprintln, [ - AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).]) -- WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt" -+ WITH_BEECRYPT_INCLUDE="" - WITH_BEECRYPT_LIB="-lbeecrypt" - ]) - ], [ - -+--------------------------------------------------------------------------- -| Remove access to not-existing beecrypt/ subdirectory -| to avoid the configure script to break building. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:38:26 -0000 -@@ -1274,7 +1274,6 @@ - python/rpmdb/Makefile - python/test/Makefile - ], [ echo timestamp > popt/stamp-h.in -- echo timestamp > beecrypt/stamp-h.in - echo timestamp > stamp-h.in - ] - ) - -+--------------------------------------------------------------------------- -| Fix filedescriptor leakage. -+--------------------------------------------------------------------------- -Index: lib/psm.c ---- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 -+++ lib/psm.c 13 Sep 2006 13:38:27 -0000 -@@ -940,6 +940,8 @@ - if (sfdno > STDERR_FILENO) { - xx = Fclose (scriptFd); - } -+ } else { -+ xx = Fclose(out); - } - - { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL); - -+--------------------------------------------------------------------------- -| Fix trigger argument passing. For more details see RPM BugDB under: -| http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100509 -+--------------------------------------------------------------------------- -Index: lib/psm.c ---- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 -+++ lib/psm.c 13 Sep 2006 13:38:29 -0000 -@@ -1108,11 +1108,13 @@ - const char ** triggerProgs; - int_32 * triggerIndices; - const char * sourceName; -+ const char * triggerName; - rpmRC rc = RPMRC_OK; - int xx; - int i; - - xx = headerNVR(sourceH, &sourceName, NULL, NULL); -+ xx = headerNVR(triggeredH, &triggerName, NULL, NULL); - - trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem)); - if (trigger == NULL) -@@ -1151,7 +1153,7 @@ - { int arg1; - int index; - -- arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), Name); -+ arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), triggerName); - if (arg1 < 0) { - /* XXX W2DO? fails as "execution of script failed" */ - rc = RPMRC_FAIL; - -+--------------------------------------------------------------------------- -| Make sure RPM does not try to set file owner/group on files during -| installation of _source_ RPMs. Instead, let it use the current -| run-time owner/group, because most of the time the owner/group in -| the source RPM (which is the owner/group of the files as staying on -| the package author system) is not existing on the target system, of -| course. -+--------------------------------------------------------------------------- -Index: lib/psm.c ---- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 -+++ lib/psm.c 13 Sep 2006 13:38:32 -0000 -@@ -1714,6 +1714,7 @@ - - uid = fi->uid; - gid = fi->gid; -+ if (!headerIsEntry(fi->h, RPMTAG_SOURCEPACKAGE)) { - if (fi->fuser && unameToUid(fi->fuser[i], &uid)) { - rpmMessage(RPMMESS_WARNING, - _("user %s does not exist - using root\n"), -@@ -1731,6 +1732,7 @@ - /* XXX this diddles header memory. */ - fi->fmodes[i] &= ~S_ISGID; /* turn off the sgid bit */ - } -+ } - if (fi->fuids) fi->fuids[i] = uid; - if (fi->fgids) fi->fgids[i] = gid; - } - -+--------------------------------------------------------------------------- -| Fix --justdb operation by consistently use the same rootDir checks -| RPM uses everywhere else, too. -+--------------------------------------------------------------------------- -Index: lib/psm.c ---- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 -+++ lib/psm.c 13 Sep 2006 13:38:33 -0000 -@@ -2033,7 +2033,8 @@ - case PSM_CHROOT_IN: - { const char * rootDir = rpmtsRootDir(ts); - /* Change root directory if requested and not already done. */ -- if (rootDir != NULL && !rpmtsChrootDone(ts) && !psm->chrootDone) { -+ if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0') -+ && !rpmtsChrootDone(ts) && !psm->chrootDone) { - static int _loaded = 0; - - /* - -+--------------------------------------------------------------------------- -| First, remove incorrectly introduced buffer assignment. Second, fix -| second and subsequent "%{foo -x}" constructs for non-Linux systems -| (without resetting the option index only the first construct would -| work). Third, bugfix the handling of macros inside macro arguments -| as in "%{foo bar%{quux}baz}": RPM correctly determined the pointer -| to the terminating second closing brace, but instead of passing -| this pointer to the subroutine which handles the macro argument -| construction, it passed the underlying character. This in turn -| obviously leaded to an incorrect determination of the argument end -| (it then though the first closing brace is the end). We fix this by -| passing the pointer and not the underlying character. -+--------------------------------------------------------------------------- -Index: rpmio/macro.c ---- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 -+++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -879,7 +879,7 @@ - */ - /*@-bounds@*/ - /*@dependent@*/ static const char * --grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char lastc) -+grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char *lastc) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies mb, rpmGlobalMacroContext @*/ - { -@@ -900,7 +900,7 @@ - - /* Copy args into buf until lastc */ - *be++ = ' '; -- while ((c = *se++) != '\0' && c != lastc) { -+ while ((c = *se++) != '\0' && (se-1) != lastc) { - /*@-globs@*/ - if (!isblank(c)) { - *be++ = c; -@@ -968,6 +968,8 @@ - /*@-mods@*/ - optind = 0; /* XXX but posix != glibc */ - /*@=mods@*/ -+#else -+ optind = 1; - #endif - - opts = me->opts; -@@ -1168,7 +1170,7 @@ - int c; - int rc = 0; - int negate; -- char grab; -+ char *grab; - int chkexist; - - if (++mb->depth > max_macro_depth) { -@@ -1202,7 +1204,7 @@ - if (mb->depth > 1) /* XXX full expansion for outermost level */ - t = mb->t; /* save expansion pointer for printExpand */ - negate = 0; -- grab = '\0'; -+ grab = NULL; - chkexist = 0; - switch ((c = *s)) { - default: /* %name substitution */ -@@ -1237,7 +1239,8 @@ - /* For "%name " macros ... */ - /*@-globs@*/ - if ((c = *fe) && isblank(c)) -- grab = '\n'; -+ if ((grab = strchr(fe,'\n')) == NULL) -+ grab = strchr(fe, '\0'); - /*@=globs@*/ - /*@switchbreak@*/ break; - case '(': /* %(...) shell escape */ -@@ -1284,7 +1287,7 @@ - ge = se - 1; - /*@innerbreak@*/ break; - case ' ': -- grab = se[-1]; -+ grab = se-1; - /*@innerbreak@*/ break; - default: - /*@innerbreak@*/ break; -@@ -1438,7 +1441,7 @@ - - /* Setup args for "%name " macros with opts */ - if (me && me->opts != NULL) { -- if (grab != '\0') { -+ if (grab != NULL) { - se = grabArgs(mb, me, fe, grab); - } else { - addMacro(mb->mc, "**", NULL, "", mb->depth); - -+--------------------------------------------------------------------------- -| Backported RPM vendor patch: -| "fix: packages w/o file colors segfault" -| (cvs diff -r2.41.2.6 -r2.41.2.7 lib/rpmfi.c) -+--------------------------------------------------------------------------- -Index: lib/rpmfi.c ---- lib/rpmfi.c 17 Jul 2003 22:44:28 -0000 1.1.1.3 -+++ lib/rpmfi.c 22 Jan 2004 21:42:24 -0000 1.2 -@@ -866,6 +866,7 @@ - *fn = '\0'; - fnlen = stpcpy( stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn; - -+if (fColors != NULL) - dColors[dirIndexes[i]] |= fColors[i]; - /* - * See if this file path needs relocating. - -+--------------------------------------------------------------------------- -| The "%_excludedocs" macro is intended to set the _default_ if -| both --excludedocs and --includedocs are not specified and it is -| evaluated already before. So, do not override it here again, because -| it would not allow us to make "%_excludedocs 1" the default. -+--------------------------------------------------------------------------- -Index: lib/transaction.c ---- lib/transaction.c 15 Jul 2003 15:15:47 -0000 1.1.1.15 -+++ lib/transaction.c 22 Jan 2004 21:42:26 -0000 1.2 -@@ -702,8 +702,10 @@ - int dc; - int i, j; - -+#if 0 - if (!noDocs) - noDocs = rpmExpandNumeric("%{_excludedocs}"); -+#endif - - { const char *tmpPath = rpmExpand("%{_netsharedpath}", NULL); - /*@-branchstate@*/ - -+--------------------------------------------------------------------------- -| Bugfix: POSIX/SUSv3 clearly expresses that fcntl(2) returns "value -| other than -1" on success, so check for equality to -1 instead of -| non-equality to 0. In practice this does not harm on most platforms, -| because they fortunately (by conincidence and common practice) -| return 0. -| Additionally, at least Solaris may reject (see fcntl(2) manpage) the -| (partial) locking, because DB mmap(2)'ed the file (or vice versa). -| The workaround is to lock the entire(!) file. -+--------------------------------------------------------------------------- -Index: db/mutex/mut_fcntl.c ---- db/mutex/mut_fcntl.c 18 Jan 2003 14:05:03 -0000 1.1.1.5 -+++ db/mutex/mut_fcntl.c 22 Jan 2004 21:42:18 -0000 1.2 -@@ -84,8 +84,13 @@ - - /* Initialize the lock. */ - k_lock.l_whence = SEEK_SET; -+#if 0 - k_lock.l_start = mutexp->off; - k_lock.l_len = 1; -+#else -+ k_lock.l_start = 0; -+ k_lock.l_len = 0; -+#endif - - for (locked = waited = 0;;) { - /* -@@ -101,7 +106,7 @@ - - /* Acquire an exclusive kernel lock. */ - k_lock.l_type = F_WRLCK; -- if (fcntl(dbenv->lockfhp->fd, F_SETLKW, &k_lock)) -+ if (fcntl(dbenv->lockfhp->fd, F_SETLKW, &k_lock) == -1) - return (__os_get_errno()); - - /* If the resource is still available, it's ours. */ -@@ -112,7 +117,7 @@ - - /* Release the kernel lock. */ - k_lock.l_type = F_UNLCK; -- if (fcntl(dbenv->lockfhp->fd, F_SETLK, &k_lock)) -+ if (fcntl(dbenv->lockfhp->fd, F_SETLK, &k_lock) == -1) - return (__os_get_errno()); - - /* - -+--------------------------------------------------------------------------- -| The O_DIRECT feature is fully broken under at least Linux 2.2 and -| 2.4. It is sometimes accepted by open(2) without error and later -| causes a write(2) to fail with EINVAL -- all depending on the -| underlying filesystem (usually works on tmpfs and fails on ext3). -| Sometimes it also causes open(2) to fail with EINVAL. In general, -| it does especially no "graceful degradation" and so is useless for -| use mostly all platforms except for those where we know it works -| (currently FreeBSD only). Interestingly, RPM works on RedHat, just -| because RedHat's "kernel" package contains a patch which masks out -| O_DIRECT usage... ;-) -+--------------------------------------------------------------------------- -Index: db/os/os_open.c ---- db/os/os_open.c 18 Jan 2003 14:05:03 -0000 1.1.1.5 -+++ db/os/os_open.c 22 Jan 2004 21:42:19 -0000 1.2 -@@ -93,7 +93,7 @@ - if (LF_ISSET(DB_OSO_TRUNC)) - oflags |= O_TRUNC; - --#ifdef HAVE_O_DIRECT -+#if defined(HAVE_O_DIRECT) && defined(__FreeBSD__) - if (LF_ISSET(DB_OSO_DIRECT)) - oflags |= O_DIRECT; - #endif diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/rpm.patch.feature --- a/openpkg/rpm.patch.feature Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2227 +0,0 @@ -## -## rpm.patch.feature -- Annotated OpenPKG RPM Patch file -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## This file assembles changes to existing RPM source files between -## the original RedHat RPM and the OpenPKG RPM variant. It can be -## automatically applied to a vanilla RedHat RPM source tree with the -## 'patch' tool to upgrade those files. Each patch snippet is annotated -## with a short description. -## -## Created on: 13-Sep-2006 -## -## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG -## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE. -## - -+--------------------------------------------------------------------------- -| Remove "tools" directory from sub-directory list because it contains -| things we are not interested in and which cause some build trouble -| anyway. -| Use a plain "rpmpopt" file without any trailing version. -| Adjust paths to conform to OpenPKG filesystem layout. -| Do not run the "installplatform" script, because not needed for OpenPKG. -+--------------------------------------------------------------------------- -Index: Makefile.am ---- Makefile.am 29 May 2003 18:20:28 -0000 1.1.1.17 -+++ Makefile.am 22 Jan 2004 21:42:02 -0000 1.2 -@@ -12,9 +12,9 @@ - xmlspec/examples/*.sh xmlspec/examples/*.lst \ - xmlspec/examples/*.xmlspec \ - po/*.in po/*.po po/rpm.pot \ -- rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c -+ rpm.magic rpmpopt rpmqv.c rpm.c - --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 . -+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 . - - INCLUDES = \ - -I$(top_srcdir)/build \ -@@ -47,13 +47,10 @@ - - pkglibdir = @RPMCONFIGDIR@ - pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq --pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros -+pkglib_DATA = rpmrc rpmpopt macros - pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \ - config.guess config.sub config.site - --rpmpopt-$(VERSION): rpmpopt -- cp rpmpopt $@ -- - noinst_HEADERS = build.h debug.h system.h - - rpm_SOURCES = -@@ -124,32 +121,32 @@ - pkgsrcdir = $(prefix)/src/$(RPMCANONVENDOR) - - install-data-local: -- @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm -+ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg - @rm -f $(DESTDIR)$(libdir)/rpmrc - @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc - @rm -f $(DESTDIR)$(libdir)/rpmpopt - @@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt - @rm -f $(DESTDIR)$(libdir)/rpm/rpmt -- @@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt -- @rm -f $(DESTDIR)$(libdir)/rpm/rpme -- @@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpme -- @rm -f $(DESTDIR)$(libdir)/rpm/rpmu -- @@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpmu -- @rm -f $(DESTDIR)$(libdir)/rpm/rpmv -- @@LN_S@ rpmq $(DESTDIR)$(libdir)/rpm/rpmv -+ @@LN_S@ rpmb $(DESTDIR)$(libdir)/openpkg/rpmt -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpme -+ @@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpme -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpmu -+ @@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpmu -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpmv -+ @@LN_S@ rpmq $(DESTDIR)$(libdir)/openpkg/rpmv - rm -f $(DESTDIR)$(bindir)/rpmbuild -- @LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild -+ @LN_S@ ../lib/openpkg/rpmb $(DESTDIR)$(bindir)/rpmbuild - rm -f $(DESTDIR)$(bindir)/rpmquery -- @LN_S@ ../lib/rpm/rpmq $(DESTDIR)$(bindir)/rpmquery -+ @LN_S@ ../lib/openpkg/rpmq $(DESTDIR)$(bindir)/rpmquery - rm -f $(DESTDIR)$(bindir)/rpmverify -- @LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify -+ @LN_S@ ../lib/openpkg/rpmv $(DESTDIR)$(bindir)/rpmverify - rm -f $(DESTDIR)$(bindir)/rpmsign -- @LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign -+ @LN_S@ ../lib/openpkg/rpmk $(DESTDIR)$(bindir)/rpmsign - rm -f $(DESTDIR)$(bindir)/rpmdb ; \ -- @LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ -+ @LN_S@ ../lib/openpkg/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ - for bf in e i u ; do \ - rm -f $(DESTDIR)$(bindir)/rpm$$bf ; \ -- @LN_S@ ../lib/rpm/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \ -+ @LN_S@ ../lib/openpkg/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \ - done - @for dir in BUILD RPMS SOURCES SPECS SRPMS ; do\ - $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/$$dir;\ -@@ -174,11 +171,6 @@ - *) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@host_cpu@ ;;\ - esac - $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch -- @case "@host_os@" in \ -- mint) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/m68kmint ;;\ -- solaris*|linux*) \ -- chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ;; \ -- esac - @$(mkinstalldirs) $(DESTDIR)/var/tmp - - .PHONY: setperms -@@ -198,10 +190,10 @@ - $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\ - done - @$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir) -- @$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/rpm -- -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/[A-Z]* -- -@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/rpm -- -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/__db.* -+ @$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/openpkg -+ -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/[A-Z]* -+ -@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/openpkg -+ -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/__db.* - - .PHONY: unsetgid - unsetgid: -@@ -244,7 +236,7 @@ - @sudo ./rpm -ta rpm-$(VERSION).tar.gz - - .PHONY: doxygen --doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt-@VERSION@ -+doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt - rm -rf $@ - mkdir -p $@ - - [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@ - -+--------------------------------------------------------------------------- -| Remove "tools" directory from sub-directory list because it contains -| things we are not interested in and which cause some build trouble -| anyway. -| Use a plain "rpmpopt" file without any trailing version. -| Adjust paths to conform to OpenPKG filesystem layout. -| Do not run the "installplatform" script, because not needed for OpenPKG. -+--------------------------------------------------------------------------- -Index: Makefile.in ---- Makefile.in 16 Jul 2003 17:05:42 -0000 1.1.1.23 -+++ Makefile.in 22 Jan 2004 21:42:03 -0000 1.2 -@@ -265,10 +265,10 @@ - xmlspec/examples/*.sh xmlspec/examples/*.lst \ - xmlspec/examples/*.xmlspec \ - po/*.in po/*.po po/rpm.pot \ -- rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c -+ rpm.magic rpmpopt rpmqv.c rpm.c - - --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 . -+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 . - - INCLUDES = \ - -I$(top_srcdir)/build \ -@@ -301,7 +301,7 @@ - bin_PROGRAMS = rpm2cpio - bin_SCRIPTS = gendiff - pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq --pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros -+pkglib_DATA = rpmrc rpmpopt macros - pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \ - config.guess config.sub config.site - -@@ -1058,8 +1058,6 @@ - uninstall-rpmbinPROGRAMS - - --rpmpopt-$(VERSION): rpmpopt -- cp rpmpopt $@ - rpm.o: rpmqv.c - $(COMPILE) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.c - rpmb.o: rpmqv.c -@@ -1097,32 +1095,32 @@ - `make -s sources -C popt` - - install-data-local: -- @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm -+ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg - @rm -f $(DESTDIR)$(libdir)/rpmrc - @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc - @rm -f $(DESTDIR)$(libdir)/rpmpopt - @@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt -- @rm -f $(DESTDIR)$(libdir)/rpm/rpmt -- @@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt -- @rm -f $(DESTDIR)$(libdir)/rpm/rpme -- @@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpme -- @rm -f $(DESTDIR)$(libdir)/rpm/rpmu -- @@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpmu -- @rm -f $(DESTDIR)$(libdir)/rpm/rpmv -- @@LN_S@ rpmq $(DESTDIR)$(libdir)/rpm/rpmv -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpmt -+ @@LN_S@ rpmb $(DESTDIR)$(libdir)/openpkg/rpmt -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpme -+ @@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpme -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpmu -+ @@LN_S@ rpmi $(DESTDIR)$(libdir)/openpkg/rpmu -+ @rm -f $(DESTDIR)$(libdir)/openpkg/rpmv -+ @@LN_S@ rpmq $(DESTDIR)$(libdir)/openpkg/rpmv - rm -f $(DESTDIR)$(bindir)/rpmbuild -- @LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild -+ @LN_S@ ../lib/openpkg/rpmb $(DESTDIR)$(bindir)/rpmbuild - rm -f $(DESTDIR)$(bindir)/rpmquery -- @LN_S@ ../lib/rpm/rpmq $(DESTDIR)$(bindir)/rpmquery -+ @LN_S@ ../lib/openpkg/rpmq $(DESTDIR)$(bindir)/rpmquery - rm -f $(DESTDIR)$(bindir)/rpmverify -- @LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify -+ @LN_S@ ../lib/openpkg/rpmv $(DESTDIR)$(bindir)/rpmverify - rm -f $(DESTDIR)$(bindir)/rpmsign -- @LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign -+ @LN_S@ ../lib/openpkg/rpmk $(DESTDIR)$(bindir)/rpmsign - rm -f $(DESTDIR)$(bindir)/rpmdb ; \ -- @LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ -+ @LN_S@ ../lib/openpkg/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ - for bf in e i u ; do \ - rm -f $(DESTDIR)$(bindir)/rpm$$bf ; \ -- @LN_S@ ../lib/rpm/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \ -+ @LN_S@ ../lib/openpkg/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \ - done - @for dir in BUILD RPMS SOURCES SPECS SRPMS ; do\ - $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/$$dir;\ -@@ -1147,11 +1145,6 @@ - *) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@host_cpu@ ;;\ - esac - $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch -- @case "@host_os@" in \ -- mint) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/m68kmint ;;\ -- solaris*|linux*) \ -- chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ;; \ -- esac - @$(mkinstalldirs) $(DESTDIR)/var/tmp - - .PHONY: setperms -@@ -1171,10 +1164,10 @@ - $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\ - done - @$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir) -- @$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/rpm -- -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/[A-Z]* -- -@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/rpm -- -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/__db.* -+ @$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/openpkg -+ -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/[A-Z]* -+ -@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/openpkg -+ -@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/openpkg/__db.* - - .PHONY: unsetgid - unsetgid: -@@ -1217,7 +1210,7 @@ - @sudo ./rpm -ta rpm-$(VERSION).tar.gz - - .PHONY: doxygen --doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt-@VERSION@ -+doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt - rm -rf $@ - mkdir -p $@ - - [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@ - -+--------------------------------------------------------------------------- -| Add support for splitted source directories, i.e., source files -| alternatively can be placed into the .spec directory and are picked -| up there, too. -+--------------------------------------------------------------------------- -Index: build/build.c ---- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20 -+++ build/build.c 6 Feb 2004 15:37:57 -0000 1.4 -@@ -33,7 +33,15 @@ - - for (p = spec->sources; p != NULL; p = p->next) { - if (! (p->flags & RPMBUILD_ISNO)) { -+#ifndef OPENPKG - const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); -+#else -+ const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL); -+ if (access(fn, F_OK) == -1) { -+ fn = _free(fn); -+ fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); -+ } -+#endif - rc = Unlink(fn); - fn = _free(fn); - } -@@ -42,7 +50,15 @@ - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - for (p = pkg->icon; p != NULL; p = p->next) { - if (! (p->flags & RPMBUILD_ISNO)) { -+#ifndef OPENPKG - const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); -+#else -+ const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL); -+ if (access(fn, F_OK) == -1) { -+ fn = _free(fn); -+ fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); -+ } -+#endif - rc = Unlink(fn); - fn = _free(fn); - } - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/build.c ---- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20 -+++ build/build.c 6 Feb 2004 15:37:57 -0000 1.4 -@@ -129,6 +129,14 @@ - mTemplate = "%{__spec_clean_template}"; - mPost = "%{__spec_clean_post}"; - break; -+#ifdef OPENPKG -+ case RPMBUILD_TRACK: -+ name = "%track"; -+ sb = spec->track; -+ mTemplate = "%{__spec_track_template}"; -+ mPost = "%{__spec_track_post}"; -+ break; -+#endif - case RPMBUILD_STRINGBUF: - default: - mTemplate = "%{___build_template}"; -@@ -185,7 +193,11 @@ - - (void) fputs(buildTemplate, fp); - -+#ifdef OPENPKG -+ if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir && what != RPMBUILD_TRACK) -+#else - if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir) -+#endif - fprintf(fp, "cd %s\n", spec->buildSubdir); - - if (what == RPMBUILD_RMBUILD) { -@@ -231,6 +243,9 @@ - buildCmd = rpmExpand("%{___build_cmd}", " ", buildScript, NULL); - (void) poptParseArgvString(buildCmd, &argc, &argv); - -+#ifdef OPENPKG -+ if (what != RPMBUILD_TRACK) -+#endif - rpmMessage(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd); - if (!(child = fork())) { - -@@ -306,6 +323,12 @@ - /*@=boundsread@*/ - } - } else { -+#ifdef OPENPKG -+ if ((what & RPMBUILD_TRACK) && -+ (rc = doScript(spec, RPMBUILD_TRACK, NULL, NULL, test))) -+ goto exit; -+#endif -+ - if ((what & RPMBUILD_PREP) && - (rc = doScript(spec, RPMBUILD_PREP, NULL, NULL, test))) - goto exit; - -+--------------------------------------------------------------------------- -| Unconditionally remove temporary files ("rpm-tmp.XXXXX") which -| were generated for the executed scripts. In OpenPKG we run the -| scripts in debug mode ("set -x") anyway, so we never need to -| see the whole generated script -- not even if it breaks. Instead -| we would just have temporary files staying around forever. -+--------------------------------------------------------------------------- -Index: build/build.c ---- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20 -+++ build/build.c 6 Feb 2004 15:37:57 -0000 1.4 -@@ -273,7 +273,9 @@ - - exit: - if (scriptName) { -+#ifndef OPENPKG - if (!rc) -+#endif - (void) Unlink(scriptName); - scriptName = _free(scriptName); - } - -+--------------------------------------------------------------------------- -| In OpenPKG we use per-package %{_sourcedir} and %{_specdir} -| definitions (macros have trailing ".../%{name}"). On removal -| of source(s) and .spec file, this per-package directory would -| be kept (usually /RPM/SRC//), because RPM does -| not know about this OpenPKG convention. So, let RPM try(!) to -| remove the two directories (if they are empty) and just ignore -| removal failures (if they are still not empty). -+--------------------------------------------------------------------------- -Index: build/build.c ---- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20 -+++ build/build.c 6 Feb 2004 15:37:57 -0000 1.4 -@@ -377,6 +377,21 @@ - if (what & RPMBUILD_RMSPEC) - (void) Unlink(spec->specFile); - -+#ifdef OPENPKG -+ if (what & RPMBUILD_RMSOURCE) { -+ const char *pn; -+ pn = rpmGetPath("%{_sourcedir}", NULL); -+ Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY) */ -+ pn = _free(pn); -+ } -+ if (what & RPMBUILD_RMSPEC) { -+ const char *pn; -+ pn = rpmGetPath("%{_specdir}", NULL); -+ Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY) */ -+ pn = _free(pn); -+ } -+#endif -+ - exit: - if (rc && rpmlogGetNrecs() > 0) { - rpmMessage(RPMMESS_NORMAL, _("\n\nRPM build errors:\n")); - -+--------------------------------------------------------------------------- -| Do not declare any files as %doc files by default. -+--------------------------------------------------------------------------- -Index: build/files.c ---- build/files.c 4 Mar 2003 17:04:13 -0000 1.1.1.20 -+++ build/files.c 6 Feb 2004 15:37:57 -0000 1.3 -@@ -1971,6 +1971,7 @@ - fl.defSpecdFlags = 0; - - fl.docDirCount = 0; -+#if 0 - fl.docDirs[fl.docDirCount++] = xstrdup("/usr/doc"); - fl.docDirs[fl.docDirCount++] = xstrdup("/usr/man"); - fl.docDirs[fl.docDirCount++] = xstrdup("/usr/info"); -@@ -1981,6 +1982,7 @@ - fl.docDirs[fl.docDirCount++] = rpmGetPath("%{_docdir}", NULL); - fl.docDirs[fl.docDirCount++] = rpmGetPath("%{_mandir}", NULL); - fl.docDirs[fl.docDirCount++] = rpmGetPath("%{_infodir}", NULL); -+#endif - - fl.fileList = NULL; - fl.fileListRecsAlloced = 0; - -+--------------------------------------------------------------------------- -| Make sure the "Provides" headers are available for querying from the -| .src.rpm files. -+--------------------------------------------------------------------------- -Index: build/files.c ---- build/files.c 4 Mar 2003 17:04:13 -0000 1.1.1.20 -+++ build/files.c 6 Feb 2004 15:37:57 -0000 1.3 -@@ -2185,6 +2185,12 @@ - case RPMTAG_CHANGELOGTEXT: - case RPMTAG_URL: - case HEADER_I18NTABLE: -+#ifdef OPENPKG -+ case RPMTAG_PROVIDENAME: -+ case RPMTAG_PROVIDEVERSION: -+ case RPMTAG_PROVIDEFLAGS: -+ case RPMTAG_CLASS: -+#endif - if (ptr) - (void)headerAddEntry(spec->sourceHeader, tag, type, ptr, count); - /*@switchbreak@*/ break; - -+--------------------------------------------------------------------------- -| Add support for splitted source directories, i.e., source files -| alternatively can be placed into the .spec directory and are picked -| up there, too. -+--------------------------------------------------------------------------- -Index: build/files.c ---- build/files.c 4 Mar 2003 17:04:13 -0000 1.1.1.20 -+++ build/files.c 6 Feb 2004 15:37:57 -0000 1.3 -@@ -2261,8 +2261,20 @@ - } - - { const char * sfn; -+#ifndef OPENPKG - sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), - "%{_sourcedir}/", srcPtr->source, NULL); -+#else -+ const char *sfn2; -+ sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL); -+ if (access(sfn2, F_OK) == 0) -+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), -+ "%{_specdir}/", srcPtr->source, NULL); -+ else -+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), -+ "%{_sourcedir}/", srcPtr->source, NULL); -+ sfn2 = _free(sfn2); -+#endif - appendLineStringBuf(sourceFiles, sfn); - sfn = _free(sfn); - } -@@ -2271,8 +2283,20 @@ - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - for (srcPtr = pkg->icon; srcPtr != NULL; srcPtr = srcPtr->next) { - const char * sfn; -+#ifndef OPENPKG - sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), - "%{_sourcedir}/", srcPtr->source, NULL); -+#else -+ const char *sfn2; -+ sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL); -+ if (access(sfn2, F_OK) == 0) -+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), -+ "%{_specdir}/", srcPtr->source, NULL); -+ else -+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), -+ "%{_sourcedir}/", srcPtr->source, NULL); -+ sfn2 = _free(sfn2); -+#endif - appendLineStringBuf(sourceFiles, sfn); - sfn = _free(sfn); - } - -+--------------------------------------------------------------------------- -| Add support for splitted source directories, i.e., source files -| alternatively can be placed into the .spec directory and are picked -| up there, too. -+--------------------------------------------------------------------------- -Index: build/parsePreamble.c ---- build/parsePreamble.c 3 Mar 2003 20:46:34 -0000 1.1.1.13 -+++ build/parsePreamble.c 6 Feb 2004 15:37:58 -0000 1.3 -@@ -366,7 +368,15 @@ - size_t nb, iconsize; - - /* XXX use rpmGenPath(rootdir, "%{_sourcedir}/", file) for icon path. */ -+#ifndef OPENPKG - fn = rpmGetPath("%{_sourcedir}/", file, NULL); -+#else -+ fn = rpmGetPath("%{_specdir}/", file, NULL); -+ if (access(fn, F_OK) == -1) { -+ fn = _free(fn); -+ fn = rpmGetPath("%{_sourcedir}/", file, NULL); -+ } -+#endif - - fd = Fopen(fn, "r.ufdio"); - if (fd == NULL || Ferror(fd)) { - -+--------------------------------------------------------------------------- -| In OpenPKG, the RPM package contains own local versions of the -| "patch" and "tar" tools, so we cannot accept hard-coded names here. -| Instead we expand a variable to allow us to direct RPM to our tools. -| Additionally, pass option "-b" to patch(1) so it creates original -| files not only if a non-standard (not ".orig") suffix is used. -| Finally, add support for the GNU patch "-d" option for convenient -| changing into a subdirectory. -| Remove "unzip" support, because in OpenPKG there are less than -| a dozend packages requiring unpacking of .zip files. For these -| it is fully sufficient to explicitly require the "infozip" -| package (containing "unzip") and leaving the less portable -| "unzip" out of the bootstrap package. -+--------------------------------------------------------------------------- -Index: build/parsePrep.c ---- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 -+++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 -@@ -66,7 +66,7 @@ - */ - /*@-boundswrite@*/ - /*@observer@*/ static char *doPatch(Spec spec, int c, int strip, const char *db, -- int reverse, int removeEmpties) -+ int reverse, int removeEmpties, const char *subdir) - /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/ - { -@@ -76,6 +76,7 @@ - struct Source *sp; - rpmCompressedMagic compressed = COMPRESSED_NOT; - int urltype; -+ const char *patcher; - - for (sp = spec->sources; sp != NULL; sp = sp->next) { - if ((sp->flags & RPMBUILD_ISPATCH) && (sp->num == c)) { -@@ -97,6 +106,10 @@ - strcat(args, "--suffix "); - strcat(args, db); - } -+ if (subdir) { -+ strcat(args, "-d "); -+ strcat(args, subdir); -+ } - if (reverse) { - strcat(args, " -R"); - } -@@ -124,6 +137,10 @@ - /*@notreached@*/ break; - } - -+ patcher = rpmGetPath("%{_patchbin}", NULL); -+ if (strcmp(patcher, "%{_patchbin}") == 0) -+ patcher = "patch"; -+ - if (compressed) { - const char *zipper = rpmGetPath( - (compressed == COMPRESSED_BZIP2 ? "%{_bzip2bin}" : "%{_gzipbin}"), -@@ -131,22 +148,23 @@ - - sprintf(buf, - "echo \"Patch #%d (%s):\"\n" -- "%s -d < %s | patch -p%d %s -s\n" -+ "%s -d <%s | %s -p%d %s -s -b\n" - "STATUS=$?\n" - "if [ $STATUS -ne 0 ]; then\n" - " exit $STATUS\n" - "fi", -- c, /*@-unrecog@*/ (const char *) basename(fn), /*@=unrecog@*/ -+ c, /*@-unrecog@*/ basename(fn), /*@=unrecog@*/ - zipper, -- fn, strip, args); -+ fn, patcher, strip, args); - zipper = _free(zipper); - } else { - sprintf(buf, - "echo \"Patch #%d (%s):\"\n" -- "patch -p%d %s -s < %s", c, (const char *) basename(fn), -- strip, args, fn); -+ "%s -p%d %s -s -b <%s", c, basename(fn), -+ patcher, strip, args, fn); - } - -+ patcher = _free(patcher); - urlfn = _free(urlfn); - return buf; - } -@@ -171,6 +189,7 @@ - struct Source *sp; - rpmCompressedMagic compressed = COMPRESSED_NOT; - int urltype; -+ const char *tar; - - for (sp = spec->sources; sp != NULL; sp = sp->next) { - if ((sp->flags & RPMBUILD_ISSOURCE) && (sp->num == c)) { -@@ -228,6 +255,10 @@ - /*@notreached@*/ break; - } - -+ tar = rpmGetPath("%{_tarbin}", NULL); -+ if (strcmp(tar, "%{_tarbin}") == 0) -+ tar = "tar"; -+ - if (compressed != COMPRESSED_NOT) { - const char *zipper; - int needtar = 1; -@@ -240,6 +271,7 @@ - case COMPRESSED_BZIP2: - t = "%{_bzip2bin} -dc"; - break; -+#if 0 - case COMPRESSED_ZIP: - if (rpmIsVerbose() && !quietly) - t = "%{_unzipbin}"; -@@ -247,6 +279,7 @@ - t = "%{_unzipbin} -qq"; - needtar = 0; - break; -+#endif - } - zipper = rpmGetPath(t, NULL); - buf[0] = '\0'; -@@ -254,8 +287,13 @@ - zipper = _free(zipper); - *t++ = ' '; - t = stpcpy(t, fn); -- if (needtar) -- t = stpcpy( stpcpy( stpcpy(t, " | tar "), taropts), " -"); -+ if (needtar) { -+ t = stpcpy(t, " | "); -+ t = stpcpy(t, tar); -+ t = stpcpy(t, " "); -+ t = stpcpy(t, taropts); -+ t = stpcpy(t, " -"); -+ } - t = stpcpy(t, - "\n" - "STATUS=$?\n" -@@ -264,11 +302,14 @@ - "fi"); - } else { - buf[0] = '\0'; -- t = stpcpy( stpcpy(buf, "tar "), taropts); -- *t++ = ' '; -+ t = stpcpy(buf, tar); -+ t = stpcpy(t, " "); -+ t = stpcpy(t, taropts); -+ t = stpcpy(t, " "); - t = stpcpy(t, fn); - } - -+ tar = _free(tar); - urlfn = _free(urlfn); - return buf; - } -@@ -443,7 +484,7 @@ - /*@modifies spec->prep, rpmGlobalMacroContext, - fileSystem, internalState @*/ - { -- char *opt_b; -+ char *opt_b, *opt_d; - int opt_P, opt_p, opt_R, opt_E; - char *s; - char buf[BUFSIZ], *bp; -@@ -453,6 +494,7 @@ - memset(patch_nums, 0, sizeof(patch_nums)); - opt_P = opt_p = opt_R = opt_E = 0; - opt_b = NULL; -+ opt_d = NULL; - patch_index = 0; - - if (! strchr(" \t\n", line[6])) { -@@ -492,6 +534,15 @@ - spec->lineNum, spec->line); - return RPMERR_BADSPEC; - } -+ } else if (!strcmp(s, "-d")) { -+ /* orig suffix */ -+ opt_d = strtok(NULL, " \t\n"); -+ if (! opt_d) { -+ rpmError(RPMERR_BADSPEC, -+ _("line %d: Need arg to %%patch -d: %s\n"), -+ spec->lineNum, spec->line); -+ return RPMERR_BADSPEC; -+ } - } else if (!strncmp(s, "-p", sizeof("-p")-1)) { - /* unfortunately, we must support -pX */ - if (! strchr(" \t\n", s[2])) { -@@ -530,14 +581,14 @@ - /* All args processed */ - - if (! opt_P) { -- s = doPatch(spec, 0, opt_p, opt_b, opt_R, opt_E); -+ s = doPatch(spec, 0, opt_p, opt_b, opt_R, opt_E, opt_d); - if (s == NULL) - return RPMERR_BADSPEC; - appendLineStringBuf(spec->prep, s); - } - - for (x = 0; x < patch_index; x++) { -- s = doPatch(spec, patch_nums[x], opt_p, opt_b, opt_R, opt_E); -+ s = doPatch(spec, patch_nums[x], opt_p, opt_b, opt_R, opt_E, opt_d); - if (s == NULL) - return RPMERR_BADSPEC; - appendLineStringBuf(spec->prep, s); - -+--------------------------------------------------------------------------- -| Add support for splitted source directories, i.e., source files -| alternatively can be placed into the .spec directory and are picked -| up there, too. -+--------------------------------------------------------------------------- -Index: build/parsePrep.c ---- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 -+++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 -@@ -88,7 +88,15 @@ - return NULL; - } - -+#ifndef OPENPKG - urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL); -+#else -+ urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL); -+ if (access(urlfn, F_OK) == -1) { -+ urlfn = _free(urlfn); -+ urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL); -+ } -+#endif - - args[0] = '\0'; - if (db) { -@@ -193,7 +201,15 @@ - return NULL; - } - -+#ifndef OPENPKG - urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL); -+#else -+ urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL); -+ if (access(urlfn, F_OK) == -1) { -+ urlfn = _free(urlfn); -+ urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL); -+ } -+#endif - - /*@-internalglobs@*/ /* FIX: shrug */ - taropts = ((rpmIsVerbose() && !quietly) ? "-xvvf" : "-xf"); - -+--------------------------------------------------------------------------- -| Not everything on a system is RPM based (for instance OpenPKG is -| just an add-on to the system), so do not assume we can just require -| a package to provide "/bin/sh". -+--------------------------------------------------------------------------- -Index: build/parseScript.c ---- build/parseScript.c 23 Jun 2002 19:47:12 -0000 1.1.1.12 -+++ build/parseScript.c 30 Jan 2004 17:06:29 -0000 1.3 -@@ -261,6 +269,7 @@ - stripTrailingBlanksStringBuf(sb); - p = getStringBuf(sb); - -+ if (progArgv[0] != NULL && strcmp(progArgv[0], "/bin/sh") != 0) - (void) addReqProv(spec, pkg->header, (tagflags | RPMSENSE_INTERP), progArgv[0], NULL, 0); - - /* Trigger script insertion is always delayed in order to */ - -+--------------------------------------------------------------------------- -| Add support for splitted source directories, i.e., source files -| alternatively can be placed into the spec directory and are picked -| up there, too. -+--------------------------------------------------------------------------- -Index: build/spec.c ---- build/spec.c 4 Mar 2003 15:25:51 -0000 1.1.1.21 -+++ build/spec.c 30 Jan 2004 17:06:31 -0000 1.3 -@@ -334,7 +337,15 @@ - - if (tag != RPMTAG_ICON) { - /*@-nullpass@*/ /* LCL: varargs needs null annotate. */ -+#ifndef OPENPKG - const char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL); -+#else -+ const char *body = rpmGetPath("%{_specdir}/", p->source, NULL); -+ if (access(body, F_OK) == -1) { -+ body = _free(body); -+ body = rpmGetPath("%{_sourcedir}/", p->source, NULL); -+ } -+#endif - /*@=nullpass@*/ - - sprintf(buf, "%s%d", - -+--------------------------------------------------------------------------- -| Do not build with warnings on, because we do no RPM development -| (so warnings are useless here), they cause some confusion inside -| Berkeley-DB and also slow down building. Instead, increase the -| optimization level. Additionally, disable static linking of RPM -| tools. Finally, use "shtool mkdir" as the "mkdir -p" fallback. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:39:07 -0000 -@@ -53,7 +53,7 @@ - AS=${AS-as} - AC_SUBST(AS) - if test "$ac_cv_prog_gcc" = yes; then -- CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts" -+ CFLAGS="$CFLAGS -O2 -D_GNU_SOURCE -D_REENTRANT" - fi - export CFLAGS - -@@ -142,6 +142,7 @@ - # just link it dynamically - LDFLAGS_STATIC="" - fi -+LDFLAGS_STATIC="" # OpenPKG wants dynamically linked RPM tools - LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}" # libtool format - AC_MSG_RESULT($LDFLAGS_STATIC) - AC_SUBST(LDFLAGS_STATIC) -@@ -201,7 +202,7 @@ - - if test X"$MKDIR_P" = X0 ; then - AC_MSG_RESULT(no) -- MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`" -+ MKDIR_P="@l_prefix@/lib/openpkg/shtool mkdir -f -p -m 755" - else - AC_MSG_RESULT(yes) - fi - -+--------------------------------------------------------------------------- -| Disable the use of the internal zlib library, because -| we build against an external one. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:39:09 -0000 -@@ -311,7 +311,7 @@ - WITH_ZLIB_SUBDIR= - WITH_ZLIB_INCLUDE= - WITH_ZLIB_LIB= --if test -d zlib ; then -+if false; then - WITH_ZLIB_SUBDIR=zlib - addlib \${top_builddir}/zlib - WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}" - -+--------------------------------------------------------------------------- -| Disable unnecessary INCPATH checks, because in OpenPKG the -| externally used libraries are all explicitly given. And they just -| would make RPM pick up things which we do not want to be picked up. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:39:11 -0000 -@@ -325,38 +325,38 @@ - - localdone= - --dirs=$prefix --if test "$cross_compiling" != "yes"; then -- dirs="$dirs /usr/local" --fi --for dir in $dirs --do -- case $dir in -- NONE|/usr) continue;; -- /usr/local) -- if test X$localdone != X ; then continue; fi -- localdone="$dir" -- ;; -- esac -- -- AC_MSG_CHECKING(for $dir/lib in LIBS) -- if test -d $dir/lib 2> /dev/null ; then -- addlib $dir/lib -- AC_MSG_RESULT(yes) -- else -- AC_MSG_RESULT(no) -- fi -- -- AC_MSG_CHECKING(for $dir/include in INCPATH) -- if test -d $dir/include 2>/dev/null ; then -- if [ "$dir" != "/usr/local" ] ; then -- INCPATH="$INCPATH -I$dir/include" -- fi -- AC_MSG_RESULT(yes) -- else -- AC_MSG_RESULT(no) -- fi --done -+dnl dirs=$prefix -+dnl if test "$cross_compiling" != "yes"; then -+dnl dirs="$dirs /usr/local" -+dnl fi -+dnl for dir in $dirs -+dnl do -+dnl case $dir in -+dnl NONE|/usr) continue;; -+dnl /usr/local) -+dnl if test X$localdone != X ; then continue; fi -+dnl localdone="$dir" -+dnl ;; -+dnl esac -+dnl -+dnl AC_MSG_CHECKING(for $dir/lib in LIBS) -+dnl if test -d $dir/lib 2> /dev/null ; then -+dnl addlib $dir/lib -+dnl AC_MSG_RESULT(yes) -+dnl else -+dnl AC_MSG_RESULT(no) -+dnl fi -+dnl -+dnl AC_MSG_CHECKING(for $dir/include in INCPATH) -+dnl if test -d $dir/include 2>/dev/null ; then -+dnl if test "$dir" != "/usr/local"; then -+dnl INCPATH="$INCPATH -I$dir/include" -+dnl fi -+dnl AC_MSG_RESULT(yes) -+dnl else -+dnl AC_MSG_RESULT(no) -+dnl fi -+dnl done - - AC_MSG_CHECKING(for /usr/ucblib in LIBS) - if test -d /usr/ucblib ; then - -+--------------------------------------------------------------------------- -| Adjust paths for OpenPKG filesystem layout. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:39:12 -0000 -@@ -1201,12 +1201,12 @@ - AC_SUBST(LOCALEDIR) - LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" - AC_SUBST(LIBDIR) --RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" -+RPMCONFIGDIR="@l_prefix@/lib/openpkg" - AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR", - [Full path to rpm global configuration directory (usually /usr/lib/rpm)]) - AC_SUBST(RPMCONFIGDIR) - --SYSCONFIGDIR="`echo /etc/rpm`" -+SYSCONFIGDIR="@l_prefix@/etc/openpkg" - AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR", - [Full path to rpm system configuration directory (usually /etc/rpm)]) - AC_SUBST(SYSCONFIGDIR) -@@ -1216,17 +1216,17 @@ - [Colon separated paths of macro files to read.]) - AC_SUBST(MACROFILES) - --LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc" -+LIBRPMRC_FILENAME="${SYSCONFIGDIR}/rpmrc" - AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME", - [Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)]) - AC_SUBST(LIBRPMRC_FILENAME) - --VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc" -+VENDORRPMRC_FILENAME="${SYSCONFIGDIR}/${RPMCANONVENDOR}/rpmrc" - AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME", - [Full path to vendor rpmrc configuration file (usually /usr/lib/rpm/vendor/rpmrc)]) - AC_SUBST(VENDORRPMRC_FILENAME) - --LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}" -+LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt" - AC_DEFINE_UNQUOTED(LIBRPMALIAS_FILENAME, "$LIBRPMALIAS_FILENAME", - [Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)]) - AC_SUBST(LIBRPMALIAS_FILENAME) - -+--------------------------------------------------------------------------- -| If running as "susr", do not unpack source RPM packages with "susr" -| file ownerships as the OpenPKG Set-UID wrapper switches from "musr" -| to "susr" on "openpkg rpm -Uvh *.src.rpm". As a result the installed -| files could be never removed again by "musr". It is more consistent -| to always unpack as "musr" if possible. -+--------------------------------------------------------------------------- -Index: lib/psm.c ---- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 -+++ lib/psm.c 13 Sep 2006 13:39:15 -0000 -@@ -314,6 +314,20 @@ - - fi->uid = getuid(); - fi->gid = getgid(); -+#ifdef OPENPKG -+ if (fi->uid == 0) { -+ char *muid_str; -+ char *mgid_str; -+ uid_t *muid; -+ gid_t *mgid; -+ if ((muid_str = rpmExpand("%{l_muid}", NULL)) != NULL) -+ if ((muid = (uid_t)strtol(muid_str, (char **)NULL, 10)) > 0) -+ fi->uid = muid; -+ if ((mgid_str = rpmExpand("%{l_mgid}", NULL)) != NULL) -+ if ((mgid = (gid_t)strtol(mgid_str, (char **)NULL, 10)) > 0) -+ fi->gid = mgid; -+ } -+#endif - fi->astriplen = 0; - fi->striplen = 0; - -@@ -352,6 +366,9 @@ - rpmrc = RPMRC_FAIL; - goto exit; - } -+#ifdef OPENPKG -+ chown(_sourcedir, fi->uid, fi->gid); -+#endif - - _specdir = rpmGenPath(rpmtsRootDir(ts), "%{_specdir}", ""); - rpmrc = rpmMkdirPath(_specdir, "specdir"); -@@ -359,6 +376,9 @@ - rpmrc = RPMRC_FAIL; - goto exit; - } -+#ifdef OPENPKG -+ chown(_specdir, fi->uid, fi->gid); -+#endif - - /* Build dnl/dil with {_sourcedir, _specdir} as values. */ - if (i < fi->fc) { - -+--------------------------------------------------------------------------- -| RPM has two platform id canonicalizations: hard-coded ones in -| the "rpm" program and defined ones in the rpmrc files. The -| hard-coded ones make the defined ones inconsistent. Additionally, -| in OpenPKG we know exactly what we do. So, disable the hard-coded -| canonicalizations and use only the defined ones. The only thing we -| do inside RPM is to reduce the platform version to major and minor -| version numbers in order to simplify the "rpmrc" files. Then, RPM -| allows to read the platform from an external program. Adjust the -| hard-coded path to this program and allow it to be overridden with -| the macro %{__platform}. Finally, change the default definition of -| %{_host} to not contain the vendor stuff to more conform to what -| %{_target} usually is defined to and what we are using throughout -| OpenPKG, too. -+--------------------------------------------------------------------------- -Index: lib/rpmrc.c ---- lib/rpmrc.c 4 Jun 2003 18:18:45 -0000 1.1.1.25 -+++ lib/rpmrc.c 6 Jun 2005 15:53:06 -0000 1.3 -@@ -27,7 +27,7 @@ - const char * macrofiles = MACROFILES; - - /*@observer@*/ /*@unchecked@*/ --static const char * platform = "/etc/rpm/platform"; -+static const char * platform = "@l_prefix@/etc/openpkg/platform"; - /*@only@*/ /*@relnull@*/ /*@unchecked@*/ - static const char ** platpat = NULL; - /*@unchecked@*/ -@@ -861,7 +861,11 @@ - - platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat)); - /*@-onlyunqglobaltrans@*/ -+#ifdef OPENPKG -+ platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_os}", NULL); -+#else - platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}", (gnu && *gnu ? "-" : NULL), gnu, NULL); -+#endif - nplatpat++; - platpat[nplatpat] = NULL; - /*@=onlyunqglobaltrans@*/ -@@ -1055,14 +1059,35 @@ - /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies *arch, *os, rpmGlobalMacroContext, fileSystem, internalState @*/ - { -+#ifdef OPENPKG -+ static struct utsname un_real; -+ /* utsname fields on some platforms (like HP-UX) are very small -+ (about 8 characters). This is too small for OpenPKG, so cheat! */ -+ static struct { -+ char sysname[32]; -+ char nodename[32]; -+ char release[32]; -+ char version[32]; -+ char machine[32]; -+ } un; -+#else - static struct utsname un; -+#endif - static int gotDefaults = 0; - char * chptr; - canonEntry canon; - int rc; - - while (!gotDefaults) { -+#ifdef OPENPKG -+ const char *cp; -+ cp = rpmExpand("%{?__platform}", NULL); -+ if (cp == NULL || cp[0] == '\0') -+ cp = platform; -+ if (!rpmPlatform(cp)) { -+#else - if (!rpmPlatform(platform)) { -+#endif - const char * s; - s = rpmExpand("%{_host_cpu}", NULL); - if (s) { -@@ -1079,9 +1104,44 @@ - gotDefaults = 1; - break; - } -+#ifdef OPENPKG -+ rc = uname(&un_real); -+ strncpy(un.sysname, un_real.sysname, sizeof(un.sysname)); un.sysname [sizeof(un.sysname)-1] = '\0'; -+ strncpy(un.nodename, un_real.nodename, sizeof(un.nodename)); un.nodename[sizeof(un.nodename)-1] = '\0'; -+ strncpy(un.release, un_real.release, sizeof(un.release)); un.release [sizeof(un.release)-1] = '\0'; -+ strncpy(un.version, un_real.version, sizeof(un.version)); un.version [sizeof(un.version)-1] = '\0'; -+ strncpy(un.machine, un_real.machine, sizeof(un.machine)); un.machine [sizeof(un.machine)-1] = '\0'; -+#else - rc = uname(&un); -+#endif - if (rc < 0) return; - -+#ifdef OPENPKG -+ { -+ char *cp; -+ char *cpR; -+ int n; -+ cpR = un.release; -+ if ((n = strcspn(cpR, "0123456789")) > 0) -+ cpR += n; -+ if ((n = strspn(cpR, "0123456789.")) > 0) { -+ /* terminate after "N.N.N...." prefix */ -+ cpR[n] = '\0'; -+ /* shorten to "N.N" if longer */ -+ if ((cp = strchr(cpR, '.')) != NULL) { -+ if ((cp = strchr(cp+1, '.')) != NULL) -+ *cp = '\0'; -+ } -+ strcat(un.sysname, cpR); -+ } -+ /* fix up machine hardware name containing white-space as it -+ * happens to be on Power Macs running MacOS X -+ */ -+ if (!strncmp(un.machine, "Power Macintosh", 15)) { -+ sprintf(un.machine, "powerpc"); -+ } -+ } -+#else /* OPENPKG */ - #if !defined(__linux__) - #ifdef SNI - /* USUALLY un.sysname on sinix does start with the word "SINIX" -@@ -1298,6 +1358,7 @@ - } - } - # endif -+#endif /* OPENPKG */ - - /* the uname() result goes through the arch_canon table */ - canon = lookupInCanonTable(un.machine, - -+--------------------------------------------------------------------------- -| In verbose file listing output, give the owner and group fields more -| width and at the same time reduce the nlink and size fields to more -| typical sizes within OpenPKG. -+--------------------------------------------------------------------------- -Index: lib/query.c ---- lib/query.c 4 Jun 2003 18:24:14 -0000 1.1.1.13 -+++ lib/query.c 22 Jan 2004 21:42:24 -0000 1.2 -@@ -33,7 +33,11 @@ - /*@modifies *te @*/ - { - char sizefield[15]; -+#ifdef OPENPKG -+ char ownerfield[13+1], groupfield[13+1]; -+#else - char ownerfield[8+1], groupfield[8+1]; -+#endif - char timefield[100]; - time_t when = mtime; /* important if sizeof(int_32) ! sizeof(time_t) */ - struct tm * tm; -@@ -58,7 +62,11 @@ - groupfield[sizeof(groupfield)-1] = '\0'; - - /* this is normally right */ -+#ifdef OPENPKG -+ sprintf(sizefield, "%8u", size); -+#else - sprintf(sizefield, "%12u", size); -+#endif - - /* this knows too much about dev_t */ - -@@ -98,7 +106,11 @@ - (void)strftime(timefield, sizeof(timefield) - 1, fmt, tm); - } - -+#ifdef OPENPKG -+ sprintf(te, "%s %d %-13s %-13s %8s %s %s", perms, -+#else - sprintf(te, "%s %4d %-8s%-8s %10s %s %s", perms, -+#endif - (int)nlink, ownerfield, groupfield, sizefield, timefield, namefield); - perms = _free(perms); - } - -+--------------------------------------------------------------------------- -| Enable the exlusion of "%doc" files by default. -| Disable "check-files" feature, because it is useless in OpenPKG -| (we consistently use BuildRoot and our %files lists are fully -| autogenerated) and just makes problems on bootstrapping. -| Provide the possibility to optionally re-enable the old -| RPM 4.0.2 way of RPM database operation by defining the -| macro %{_rpmdb_private}. This is important for easily fixing -| corrupted/hanging RPM database (on upgrades, etc) or if you -| permanently have to operate RPM on a NFS filesystem where no -| rpc.lockd(8) support is available. -| Additionally, do not override the "_host_xx" macros because their -| value (derived from /etc/openpkg/platform) is already -| correctly set internally. -| Additionally, provide default macros for the %track and %test -| section expansion. -| Finally, provide default for introduced variable -| %{_force_oldpackage}, which, if non-zero, automatically enforces -| --oldpackage on all upgrade operations (this is useful on -| mass-upgrades from OpenPKG-CURRENT to OpenPKG-RELEASE). -+--------------------------------------------------------------------------- -Index: macros.in ---- macros.in 2 Jul 2003 19:20:52 -0000 1.1.1.14 -+++ macros.in 30 Jan 2004 17:06:27 -0000 1.3 -@@ -1,7 +1,7 @@ - #/*! \page config_macros Default configuration: @RPMCONFIGDIR@/macros - # \verbatim - # --# $Id: macros.in,v 1.138.2.1 2003/07/02 19:14:06 jbj Exp $ -+# $Id: macros.in,v 1.2 2004/01/22 21:42:09 rse Exp $ - # - # This is a global RPM configuration file. All changes made here will - # be lost when the rpm package is upgraded. Any per-system configuration -@@ -206,7 +206,7 @@ - - # Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files - # marked as %doc should be installed. --#%_excludedocs -+%_excludedocs 1 - - # The port and machine name of a FTP proxy host running TIS firewall. - # -@@ -305,7 +305,7 @@ - # Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged. - # - # Note: Disable (by commenting out) for legacy compatibility. --%__check_files @RPMCONFIGDIR@/check-files %{buildroot} -+#%__check_files @RPMCONFIGDIR@/check-files %{buildroot} - - # - # Should unpackaged files in a build root terminate a build? -@@ -449,7 +449,7 @@ - - # Use a CDB database model for concurrent access. - # XXX Add "private" here for legacy interoperation transiting to glibc+nptl. --%__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb -+%__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb %{?_rpmdb_private:private} - - %__dbi_other %{?_tmppath:tmpdir=%{_tmppath}} %{?__dbi_cdb} - -@@ -618,6 +618,10 @@ - # If non-zero, all erasures will be automagically repackaged. - %_repackage_all_erasures 0 - -+# If non-zero, automatically enforce --oldpackage for all upgrade operations -+# (useful on mass-upgrades from OpenPKG-CURRENT to OpenPKG-RELEASE) -+%_force_oldpackage 0 -+ - # Verify digest/signature flags for various rpm modes: - # 1 --nohdrchk if set, don't check rpmdb headers - # -@@ -870,6 +874,26 @@ - #%{__spec_clean_post}\ - #%{nil} - -+%__spec_track_shell %{___build_shell} -+%__spec_track_args %{___build_args} -+%__spec_track_cmd %{___build_cmd} -+%__spec_track_pre %{___build_pre} -+%__spec_track_body %{___build_body} -+%__spec_track_post %{___build_post} -+%__spec_track_template #!%{__spec_track_shell}\ -+%{__spec_track_pre}\ -+%{nil} -+ -+%__spec_test_shell %{___build_shell} -+%__spec_test_args %{___build_args} -+%__spec_test_cmd %{___build_cmd} -+%__spec_test_pre %{___build_pre} -+%__spec_test_body %{___build_body} -+%__spec_test_post %{___build_post} -+%__spec_test_template #!%{__spec_test_shell}\ -+%{__spec_test_pre}\ -+%{nil} -+ - %__spec_rmbuild_shell %{___build_shell} - %__spec_rmbuild_args %{___build_args} - %__spec_rmbuild_cmd %{___build_cmd} -@@ -929,11 +953,11 @@ - %_build_cpu %{_host_cpu} - %_build_vendor %{_host_vendor} - %_build_os %{_host_os} --%_host @host@ --%_host_alias @host_alias@%{nil} --%_host_cpu @host_cpu@ --%_host_vendor @host_vendor@ --%_host_os @host_os@ -+#%_host @host@ -+#%_host_alias @host_alias@%{nil} -+#%_host_cpu @host_cpu@ -+#%_host_vendor @host_vendor@ -+#%_host_os @host_os@ - %_target %{_host} - %_target_alias %{_host_alias} - %_target_cpu %{_host_cpu} - -+--------------------------------------------------------------------------- -| Adjust path for OpenPKG filesystem layout. -+--------------------------------------------------------------------------- -Index: scripts/Makefile.am ---- scripts/Makefile.am 20 Jun 2003 19:04:49 -0000 1.1.1.11 -+++ scripts/Makefile.am 22 Jan 2004 21:42:34 -0000 1.2 -@@ -22,7 +22,7 @@ - - all: - --configdir = ${prefix}/lib/rpm -+configdir = ${prefix}/lib/openpkg - config_SCRIPTS = \ - brp-compress brp-python-bytecompile brp-redhat \ - brp-strip brp-strip-comment-note \ - -+--------------------------------------------------------------------------- -| Adjust path for OpenPKG filesystem layout. -+--------------------------------------------------------------------------- -Index: scripts/Makefile.in ---- scripts/Makefile.in 16 Jul 2003 17:05:49 -0000 1.1.1.14 -+++ scripts/Makefile.in 22 Jan 2004 21:42:34 -0000 1.2 -@@ -273,7 +273,7 @@ - - installprefix = $(DESTDIR) - --configdir = ${prefix}/lib/rpm -+configdir = ${prefix}/lib/openpkg - config_SCRIPTS = \ - brp-compress brp-python-bytecompile brp-redhat \ - brp-strip brp-strip-comment-note \ - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -| Additionally, adjust the path to file(1)'s "magic" file. -+--------------------------------------------------------------------------- -Index: file/Makefile.am ---- file/Makefile.am 24 Jan 2003 19:41:56 -0000 1.1.1.1 -+++ file/Makefile.am 22 Jan 2004 21:42:21 -0000 1.2 -@@ -36,7 +36,7 @@ - #MAGIC = @datadir@/magic - #data_DATA = magic magic.mime magic.mgc magic.mime.mgc - --pkglibdir = @prefix@/lib/rpm -+pkglibdir = @prefix@/lib/openpkg - pkglib_DATA = magic magic.mime magic.mgc magic.mime.mgc - MAGIC = $(pkglibdir)/magic - CPPFLAGS = -DMAGIC='"$(MAGIC)"' - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -| Additionally, adjust the path to file(1)'s "magic" file. -+--------------------------------------------------------------------------- -Index: file/Makefile.in ---- file/Makefile.in 16 Jul 2003 17:05:23 -0000 1.1.1.2 -+++ file/Makefile.in 22 Jan 2004 21:42:22 -0000 1.2 -@@ -39,7 +39,7 @@ - - #MAGIC = @datadir@/magic - #data_DATA = magic magic.mime magic.mgc magic.mime.mgc --pkglibdir = @prefix@/lib/rpm -+pkglibdir = @prefix@/lib/openpkg - ACLOCAL = @ACLOCAL@ - AMDEP_FALSE = @AMDEP_FALSE@ - AMDEP_TRUE = @AMDEP_TRUE@ -@@ -159,7 +159,7 @@ - noinst_PROGRAMS = file - - file_SOURCES = file.c --file_LDFLAGS = -all-static -+file_LDFLAGS = -static - file_LDADD = libfmagic.la - - man_MAGIC = magic.@fsect@ - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -| Additionally, disable the building of gettext stuff we don't need. -+--------------------------------------------------------------------------- -Index: popt/Makefile.am ---- popt/Makefile.am 6 Mar 2003 23:16:43 -0000 1.1.1.9 -+++ popt/Makefile.am 22 Jan 2004 21:42:28 -0000 1.2 -@@ -9,7 +9,7 @@ - po/*.in po/*.po po/popt.pot \ - popt.ps - --SUBDIRS = intl po -+SUBDIRS = intl - - INCLUDES = -I. -I$(top_srcdir) - -@@ -17,13 +17,13 @@ - - noinst_PROGRAMS = test1 test2 test3 - test1_SOURCES = test1.c --test1_LDFLAGS = -all-static -+test1_LDFLAGS = -static - test1_LDADD = $(usrlib_LTLIBRARIES) - test2_SOURCES = test2.c --test2_LDFLAGS = -all-static -+test2_LDFLAGS = -static - test2_LDADD = $(usrlib_LTLIBRARIES) - test3_SOURCES = test3.c --test3_LDFLAGS = -all-static -+test3_LDFLAGS = -static - test3_LDADD = $(usrlib_LTLIBRARIES) - - noinst_SCRIPTS = testit.sh - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -| Additionally, disable the building of gettext stuff we don't need. -+--------------------------------------------------------------------------- -Index: popt/Makefile.in ---- popt/Makefile.in 16 Jul 2003 17:04:49 -0000 1.1.1.14 -+++ popt/Makefile.in 22 Jan 2004 21:42:28 -0000 1.2 -@@ -163,7 +163,7 @@ - popt.ps - - --SUBDIRS = intl po -+SUBDIRS = intl - - INCLUDES = -I. -I$(top_srcdir) - -@@ -171,13 +171,13 @@ - - noinst_PROGRAMS = test1 test2 test3 - test1_SOURCES = test1.c --test1_LDFLAGS = -all-static -+test1_LDFLAGS = -static - test1_LDADD = $(usrlib_LTLIBRARIES) - test2_SOURCES = test2.c --test2_LDFLAGS = -all-static -+test2_LDFLAGS = -static - test2_LDADD = $(usrlib_LTLIBRARIES) - test3_SOURCES = test3.c --test3_LDFLAGS = -all-static -+test3_LDFLAGS = -static - test3_LDADD = $(usrlib_LTLIBRARIES) - - noinst_SCRIPTS = testit.sh - -+--------------------------------------------------------------------------- -| Revert back to the old behaviour of passing to "exec" programs an -| extra "--" argument to separate options and arguments. Additionally, -| allow the "!#:+" constructs to be used multiple times and then each -| time eat another argument (instead of just eating an argument once -| and expanding this multiple times). -+--------------------------------------------------------------------------- -Index: popt/popt.c ---- popt/popt.c 22 Aug 2002 14:17:44 -0000 1.1.1.12 -+++ popt/popt.c 22 Jan 2004 21:42:28 -0000 1.2 -@@ -400,9 +400,7 @@ - } - - if (con->leftovers != NULL && con->numLeftovers > 0) { --#if 0 - argv[argc++] = "--"; --#endif - memcpy(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers); - argc += con->numLeftovers; - } -@@ -580,10 +578,8 @@ - if (!(s[0] == '#' && s[1] == ':' && s[2] == '+')) - /*@switchbreak@*/ break; - /* XXX Make sure that findNextArg deletes only next arg. */ -- if (a == NULL) { - if ((a = findNextArg(con, 1, 1)) == NULL) - /*@switchbreak@*/ break; -- } - s += 3; - - alen = strlen(a); - -+--------------------------------------------------------------------------- -| Dedefine the stdio variable BUFSIZ because it is usually just 1024 -| on some platforms (on Linux it is 8192) and unfortunately RPM uses -| it here for the macro expansion buffer. For OpenPKG the size 1024 is -| definetely too small. So increase this to a 16KB buffer. -+--------------------------------------------------------------------------- -Index: rpmio/macro.c ---- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 -+++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -50,6 +50,9 @@ - - #include "debug.h" - -+#undef BUFSIZ -+#define BUFSIZ 16384 -+ - #if defined(__LCLINT__) - /*@-exportheader@*/ - extern const unsigned short int **__ctype_b_loc (void) /*@*/; - -+--------------------------------------------------------------------------- -| Remove "unzip" support, because in OpenPKG there are less than -| a dozend packages requiring unpacking of .zip files. For these -| it is fully sufficient to explicitly require the "infozip" -| package (containing "unzip") and leaving the less portable -| "unzip" out of the bootstrap package. -+--------------------------------------------------------------------------- -Index: rpmio/macro.c ---- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 -+++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -1119,9 +1119,11 @@ - case 2: /* COMPRESSED_BZIP2 */ - sprintf(be, "%%_bzip2 %s", b); - break; -+#if 0 - case 3: /* COMPRESSED_ZIP */ - sprintf(be, "%%_unzip %s", b); - break; -+#endif - } - b = be; - } else if (STREQ("S", f, fn)) { -@@ -1723,9 +1725,11 @@ - - if ((magic[0] == 'B') && (magic[1] == 'Z')) { - *compressed = COMPRESSED_BZIP2; -+#if 0 - } else if ((magic[0] == 0120) && (magic[1] == 0113) && - (magic[2] == 0003) && (magic[3] == 0004)) { /* pkzip */ - *compressed = COMPRESSED_ZIP; -+#endif - } else if (((magic[0] == 0037) && (magic[1] == 0213)) || /* gzip */ - ((magic[0] == 0037) && (magic[1] == 0236)) || /* old gzip */ - ((magic[0] == 0037) && (magic[1] == 0036)) || /* pack */ - -+--------------------------------------------------------------------------- -| Make sure that an %{error:} macro really stops further -| processing. Else it would be nothing more than a %{warn:}. -+--------------------------------------------------------------------------- -Index: rpmio/macro.c ---- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 -+++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -1337,7 +1337,7 @@ - STREQ("error", f, fn)) { - int waserror = 0; - if (STREQ("error", f, fn)) -- waserror = 1; -+ waserror = 1, rc = 1; - if (g < ge) - doOutput(mb, waserror, g, gn); - else - -+--------------------------------------------------------------------------- -| Reactivate build mode aliases which were removed in rpm-4.1 -| (and now should be available through "rpmbuild" only). -+--------------------------------------------------------------------------- -Index: rpmpopt.in ---- rpmpopt.in 24 Jan 2003 14:56:30 -0000 1.1.1.7 -+++ rpmpopt.in 22 Jan 2004 21:42:11 -0000 1.2 -@@ -147,28 +147,28 @@ - # Popt glue to preserve legacy CLI behavior. - # - # XXX popt exec parsing doesn't honor POPT_ARGFLAG_ONEDASH --# XXX Build mode aliases, removed in rpm-4.1. --#rpm exec --bp rpmb -bp --#rpm exec --bc rpmb -bc --#rpm exec --bi rpmb -bi --#rpm exec --bl rpmb -bl --#rpm exec --ba rpmb -ba --#rpm exec --bb rpmb -bb --#rpm exec --bs rpmb -bs --#rpm exec --tp rpmb -tp --#rpm exec --tc rpmb -tc --#rpm exec --ti rpmb -ti --#rpm exec --tl rpmb -tl --#rpm exec --ta rpmb -ta --#rpm exec --tb rpmb -tb --#rpm exec --ts rpmb -ts --#rpm exec --rebuild rpmb --rebuild --#rpm exec --recompile rpmb --recompile --#rpm exec --clean rpmb --clean --#rpm exec --rmsource rpmb --rmsource --#rpm exec --rmspec rpmb --rmspec --#rpm exec --target rpmb --target --#rpm exec --short-circuit rpmb --short-circuit -+rpm exec --bp rpmb -bp -+rpm exec --bc rpmb -bc -+rpm exec --bi rpmb -bi -+rpm exec --bl rpmb -bl -+rpm exec --ba rpmb -ba -+rpm exec --bb rpmb -bb -+rpm exec --bs rpmb -bs -+rpm exec --bt rpmb -bt -+rpm exec --tp rpmb -tp -+rpm exec --tc rpmb -tc -+rpm exec --ti rpmb -ti -+rpm exec --tl rpmb -tl -+rpm exec --ta rpmb -ta -+rpm exec --tb rpmb -tb -+rpm exec --ts rpmb -ts -+rpm exec --rebuild rpmb --rebuild -+rpm exec --recompile rpmb --recompile -+rpm exec --clean rpmb --clean -+rpm exec --rmsource rpmb --rmsource -+rpm exec --rmspec rpmb --rmspec -+rpm exec --target rpmb --target -+rpm exec --short-circuit rpmb --short-circuit - - rpm exec --initdb rpmd --initdb - rpm exec --rebuilddb rpmd --rebuilddb - -+--------------------------------------------------------------------------- -| Allow "-bb --short-circuit" for continuing building a binary package -| after the %install step (usually previously fixed and repeated with -| "-bi --short-circuit". -+--------------------------------------------------------------------------- -Index: rpmqv.c ---- rpmqv.c 4 Mar 2003 15:32:57 -0000 1.1.1.8 -+++ rpmqv.c 6 Feb 2004 15:37:56 -0000 1.4 -@@ -682,6 +682,10 @@ - case 'b': - ba->buildAmount |= RPMBUILD_PACKAGEBINARY; - ba->buildAmount |= RPMBUILD_CLEAN; -+#ifdef OPENPKG -+ if ((ba->buildChar == 'b') && ba->shortCircuit) -+ /*@innerbreak@*/ break; -+#endif - /*@fallthrough@*/ - case 'i': - ba->buildAmount |= RPMBUILD_INSTALL; - -+--------------------------------------------------------------------------- -| Because permissions and ownership on Berkeley-DB region files -| __db.XXX have to be already fixed in advance and those files cannot -| be created in advance on the command line with some reasonable -| default (as it is the case for the other files which are created -| with [rpm]db_load), so force Berkeley-DB to accept zero-sized files -| and create them (instead of thinking another process is currently -| creating them). -+--------------------------------------------------------------------------- -Index: db/env/env_region.c ---- db/env/env_region.c 18 Jan 2003 14:05:01 -0000 1.1.1.5 -+++ db/env/env_region.c 22 Jan 2004 21:42:17 -0000 1.2 -@@ -184,6 +184,24 @@ - } - - /* -+ * OpenPKG hack: because permissions and ownership on Berkeley-DB -+ * region files __db.XXX have to be already fixed in advance and -+ * those files cannot be created in advance on the command line -+ * with some reasonable default (as it is the case for the other -+ * files which are created with [rpm]db_load), so force Berkeley-DB -+ * to accept zero-sized files and create them (instead of thinking -+ * another process is currently creating them). -+ */ -+ if (mbytes == 0 && bytes == 0) { -+ if (F_ISSET(dbenv, DB_ENV_CREATE)) -+ goto creation; -+ else { -+ ret = ENOENT; -+ goto err; -+ } -+ } -+ -+ /* - * !!! - * A size_t is OK -- regions get mapped into memory, and so can't - * be larger than a size_t. - -+--------------------------------------------------------------------------- -| Make sure RPM passes DB_CREATE to Berkeley-DB also if file exists, -| but is (still) zero-sized. -+--------------------------------------------------------------------------- -Index: rpmdb/db3.c ---- rpmdb/db3.c 3 Mar 2003 16:18:29 -0000 1.1.1.5 -+++ rpmdb/db3.c 22 Jan 2004 21:42:29 -0000 1.2 -@@ -1019,9 +1019,13 @@ - } else { /* dbhome is writable, check for persistent dbenv. */ - /*@-mods@*/ - const char * dbf = rpmGetPath(dbhome, "/__db.001", NULL); -+ struct stat sb; -+ long size = -1; - /*@=mods@*/ - -- if (access(dbf, F_OK) == -1) { -+ if (stat(dbf, &sb) == 0) -+ size = (long)sb.st_size; -+ if (access(dbf, F_OK) == -1 || size == 0) { - /* ... non-existent (or unwritable) DBENV, will create ... */ - dbi->dbi_oeflags |= DB_CREATE; - dbi->dbi_eflags &= ~DB_JOINENV; - -+--------------------------------------------------------------------------- -| Add internal feature variable %{_force_oldpackage} which, if -| non-zero, automatically enforces --oldpackage on all upgrade -| operations (this is useful on mass-upgrades from OpenPKG-CURRENT to -| OpenPKG-RELEASE). -+--------------------------------------------------------------------------- -Index: rpm.c ---- rpm.c 16 May 2002 16:55:25 -0000 1.1.1.23 -+++ rpm.c 22 Jan 2004 21:42:10 -0000 1.2 -@@ -1016,6 +1016,10 @@ - - if (oldPackage && !upgrade) - argerror(_("--oldpackage may only be used during upgrades")); -+#ifdef OPENPKG -+ if (upgrade && rpmExpandNumeric("%{?_force_oldpackage}")) -+ probFilter |= RPMPROB_FILTER_OLDPACKAGE; -+#endif - - if (noPgp && bigMode != MODE_CHECKSIG) - argerror(_("--nopgp may only be used during signature checking")); - -+--------------------------------------------------------------------------- -| Add OpenPKG branding to make sure people do not intermix -| this RPM version with the stock RPM version. -+--------------------------------------------------------------------------- -Index: lib/poptALL.c ---- lib/poptALL.c 25 Jun 2003 19:10:01 -0000 1.1.1.3 -+++ lib/poptALL.c 22 Jan 2004 21:42:23 -0000 1.2 -@@ -102,7 +102,7 @@ - /*@globals rpmEVR, fileSystem @*/ - /*@modifies *fp, fileSystem @*/ - { -- fprintf(fp, _("RPM version %s\n"), rpmEVR); -+ fprintf(fp, _("OpenPKG RPM %s\n"), rpmEVR); - } - - /** - -+--------------------------------------------------------------------------- -| Add OpenPKG branding to make sure people do not intermix -| this RPM version with the stock RPM version. -+--------------------------------------------------------------------------- -Index: rpm.c ---- rpm.c 16 May 2002 16:55:25 -0000 1.1.1.23 -+++ rpm.c 22 Jan 2004 21:42:10 -0000 1.2 -@@ -235,7 +235,7 @@ - static void printHelpLine(char * prefix, char * help); - - static void printVersion(void) { -- fprintf(stdout, _("RPM version %s\n"), rpmEVR); -+ fprintf(stdout, _("OpenPKG RPM %s\n"), rpmEVR); - } - - static void printBanner(void) { - -+--------------------------------------------------------------------------- -| Add OpenPKG branding to make sure people do not intermix -| this RPM version with the stock RPM version. -+--------------------------------------------------------------------------- -Index: rpmqv.c ---- rpmqv.c 4 Mar 2003 15:32:57 -0000 1.1.1.8 -+++ rpmqv.c 6 Feb 2004 15:37:56 -0000 1.4 -@@ -126,7 +126,7 @@ - /*@globals rpmEVR, fileSystem @*/ - /*@modifies *fp, fileSystem @*/ - { -- fprintf(fp, _("RPM version %s\n"), rpmEVR); -+ fprintf(fp, _("OpenPKG RPM %s\n"), rpmEVR); - } - - static void printBanner(FILE * fp) - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: rpmqv.c ---- rpmqv.c 4 Mar 2003 15:32:57 -0000 1.1.1.8 -+++ rpmqv.c 6 Feb 2004 15:37:56 -0000 1.4 -@@ -707,7 +707,19 @@ - /*@innerbreak@*/ break; - case 's': - ba->buildAmount |= RPMBUILD_PACKAGESOURCE; -+ /* enforce no dependency checking */ -+ ba->noDeps = 1; - /*@innerbreak@*/ break; -+#ifdef OPENPKG -+ case 't': -+ ba->buildAmount |= RPMBUILD_TRACK; -+ /* enforce no dependency checking and expansion of %setup, %patch and %prep macros */ -+ ba->noDeps = 1; -+ rpmDefineMacro(NULL, "setup #", RMIL_CMDLINE); -+ rpmDefineMacro(NULL, "patch #", RMIL_CMDLINE); -+ rpmDefineMacro(NULL, "prep %%prep", RMIL_CMDLINE); -+ /*@innerbreak@*/ break; -+#endif - } - - if (!poptPeekArg(optCon)) { - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/pack.c ---- build/pack.c 4 Mar 2003 17:03:17 -0000 1.1.1.20 -+++ build/pack.c 30 Jan 2004 17:06:29 -0000 1.2 -@@ -252,6 +252,15 @@ - return RPMERR_BADFILENAME; - } - } -+#ifdef OPENPKG -+ if (pkg->testFile) { -+ if (addFileToTag(spec, pkg->testFile, pkg->header, RPMTAG_TEST)) { -+ rpmError(RPMERR_BADFILENAME, -+ _("Could not open Test file: %s\n"), pkg->testFile); -+ return RPMERR_BADFILENAME; -+ } -+ } -+#endif - - for (p = pkg->triggerFiles; p != NULL; p = p->next) { - (void) headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTPROG, - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/parseBuildInstallClean.c ---- build/parseBuildInstallClean.c 3 Mar 2003 20:43:30 -0000 1.1.1.9 -+++ build/parseBuildInstallClean.c 30 Jan 2004 17:06:29 -0000 1.2 -@@ -29,6 +29,11 @@ - } else if (parsePart == PART_CLEAN) { - sbp = &(spec->clean); - name = "%clean"; -+#ifdef OPENPKG -+ } else if (parsePart == PART_TRACK) { -+ sbp = &(spec->track); -+ name = "%track"; -+#endif - } - /*@=branchstate@*/ - - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/parseScript.c ---- build/parseScript.c 23 Jun 2002 19:47:12 -0000 1.1.1.12 -+++ build/parseScript.c 30 Jan 2004 17:06:29 -0000 1.3 -@@ -156,6 +156,14 @@ - progtag = RPMTAG_TRIGGERSCRIPTPROG; - partname = "%triggerpostun"; - break; -+#ifdef OPENPKG -+ case PART_TEST: -+ tag = RPMTAG_TEST; -+ tagflags = RPMSENSE_SCRIPT_TEST; -+ progtag = RPMTAG_TESTPROG; -+ partname = "%test"; -+ break; -+#endif - } - /*@=branchstate@*/ - -@@ -304,6 +313,11 @@ - case PART_VERIFYSCRIPT: - pkg->verifyFile = xstrdup(file); - break; -+#ifdef OPENPKG -+ case PART_TEST: -+ pkg->testFile = xstrdup(file); -+ break; -+#endif - } - } - } - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -| -| MSvB: Additionally provide a default %clean section, removing buildroot. -+--------------------------------------------------------------------------- -Index: build/parseSpec.c ---- build/parseSpec.c 15 May 2003 13:38:57 -0000 1.1.1.15 -+++ build/parseSpec.c 30 Jan 2004 17:06:30 -0000 1.2 -@@ -43,6 +43,10 @@ - { PART_TRIGGERIN, 0, "%triggerin"}, - { PART_TRIGGERIN, 0, "%trigger"}, - { PART_VERIFYSCRIPT, 0, "%verifyscript"}, -+#ifdef OPENPKG -+ { PART_TRACK, 0, "%track"}, -+ { PART_TEST, 0, "%test"}, -+#endif - {0, 0, 0} - }; - -@@ -489,6 +493,15 @@ - parsePart = parseFiles(spec); - /*@switchbreak@*/ break; - -+#ifdef OPENPKG -+ case PART_TRACK: -+ parsePart = parseBuildInstallClean(spec, parsePart); -+ /*@switchbreak@*/ break; -+ case PART_TEST: -+ parsePart = parseScript(spec, parsePart); -+ /*@switchbreak@*/ break; -+#endif -+ - case PART_NONE: /* XXX avoid gcc whining */ - case PART_LAST: - case PART_BUILDARCHITECTURES: -@@ -576,6 +589,13 @@ - } - /*@=infloops@*/ /* LCL: parsePart is modified @*/ - -+ if (spec->clean == NULL) { -+ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); -+ spec->clean = newStringBuf(); -+ appendLineStringBuf(spec->clean, body); -+ free(body); -+ } -+ - /* Check for description in each package and add arch and os */ - { - #ifdef DYING - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/poptBT.c ---- build/poptBT.c 3 Mar 2003 20:04:12 -0000 1.1.1.3 -+++ build/poptBT.c 30 Jan 2004 17:06:30 -0000 1.2 -@@ -35,6 +35,9 @@ - #define POPT_BL 0x626c - #define POPT_BP 0x6270 - #define POPT_BS 0x6273 -+#ifdef OPENPKG -+#define POPT_BT 0x6274 -+#endif - #define POPT_TA 0x7461 - #define POPT_TB 0x7462 - #define POPT_TC 0x7463 -@@ -82,6 +85,9 @@ - case POPT_BL: - case POPT_BP: - case POPT_BS: -+#ifdef OPENPKG -+ case POPT_BT: -+#endif - case POPT_TA: - case POPT_TB: - case POPT_TC: -@@ -177,6 +183,11 @@ - { "bs", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BS, - N_("build source package only from "), - N_("") }, -+#ifdef OPENPKG -+ { "bt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT, -+ N_("track versions of sources from "), -+ N_("") }, -+#endif - - { "tp", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_TP, - N_("build through %prep (unpack sources and apply patches) from "), - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/rpmbuild.h ---- build/rpmbuild.h 4 Mar 2003 17:03:07 -0000 1.1.1.13 -+++ build/rpmbuild.h 30 Jan 2004 17:06:30 -0000 1.2 -@@ -34,6 +34,9 @@ - RPMBUILD_RMSOURCE = (1 << 8), /*!< Remove source(s) and patch(s). */ - RPMBUILD_RMBUILD = (1 << 9), /*!< Remove build sub-tree. */ - RPMBUILD_STRINGBUF = (1 << 10), /*!< only for doScript() */ -+#ifdef OPENPKG -+ RPMBUILD_TRACK = (1 << 12), /*!< Execute %%track. */ -+#endif - RPMBUILD_RMSPEC = (1 << 11) /*!< Remove spec file. */ - } rpmBuildFlags; - /*@=typeuse@*/ -@@ -69,7 +72,13 @@ - PART_VERIFYSCRIPT = 16, /*!< */ - PART_BUILDARCHITECTURES= 17,/*!< */ - PART_TRIGGERPOSTUN = 18, /*!< */ -+#ifdef OPENPKG -+ PART_TRACK = 19, /*!< */ -+ PART_TEST = 20, /*!< */ -+ PART_LAST = 21 /*!< */ -+#else - PART_LAST = 19 /*!< */ -+#endif - } rpmParseState; - - #define STRIP_NOTHING 0 - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/rpmspec.h ---- build/rpmspec.h 4 Mar 2003 15:30:23 -0000 1.1.1.11 -+++ build/rpmspec.h 30 Jan 2004 17:06:30 -0000 1.2 -@@ -164,6 +164,10 @@ - StringBuf check; /*!< %check scriptlet. */ - /*@only@*/ - StringBuf clean; /*!< %clean scriptlet. */ -+#ifdef OPENPKG -+/*@only@*/ -+ StringBuf track; /*!< %track scriptlet. */ -+#endif - - /*@owned@*/ - Package packages; /*!< Package list. */ -@@ -196,6 +200,10 @@ - const char * postUnFile; /*!< %postun scriptlet. */ - /*@only@*/ - const char * verifyFile; /*!< %verifyscript scriptlet. */ -+#ifdef OPENPKG -+/*@only@*/ -+ const char * testFile; /*!< %test scriptlet. */ -+#endif - - /*@only@*/ - StringBuf specialDoc; - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: build/spec.c ---- build/spec.c 4 Mar 2003 15:25:51 -0000 1.1.1.21 -+++ build/spec.c 30 Jan 2004 17:06:31 -0000 1.3 -@@ -138,6 +138,9 @@ - p->preUnFile = NULL; - p->postUnFile = NULL; - p->verifyFile = NULL; -+#ifdef OPENPKG -+ p->testFile = NULL; -+#endif - - p->specialDoc = NULL; - -@@ -452,6 +463,9 @@ - spec->install = NULL; - spec->check = NULL; - spec->clean = NULL; -+#ifdef OPENPKG -+ spec->track = NULL; -+#endif - - spec->sources = NULL; - spec->packages = NULL; -@@ -499,6 +513,9 @@ - spec->install = freeStringBuf(spec->install); - spec->check = freeStringBuf(spec->check); - spec->clean = freeStringBuf(spec->clean); -+#ifdef OPENPKG -+ spec->track = freeStringBuf(spec->track); -+#endif - - spec->buildRootURL = _free(spec->buildRootURL); - spec->buildSubdir = _free(spec->buildSubdir); - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -+--------------------------------------------------------------------------- -Index: lib/rpmlib.h ---- lib/rpmlib.h 19 Jun 2003 17:39:35 -0000 1.1.1.26 -+++ lib/rpmlib.h 30 Jan 2004 17:06:31 -0000 1.2 -@@ -414,6 +414,12 @@ - RPMTAG_FILEDEPENDSN = 1144, - RPMTAG_DEPENDSDICT = 1145, - RPMTAG_SOURCEPKGID = 1146, -+#ifdef OPENPKG -+ RPMTAG_TRACK = 1200, -+ RPMTAG_TEST = 1201, -+ RPMTAG_TESTPROG = 1202, -+ RPMTAG_CLASS = 1203, -+#endif - /*@-enummemuse@*/ - RPMTAG_FIRSTFREE_TAG /*!< internal */ - /*@=enummemuse@*/ -@@ -488,6 +494,9 @@ - RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */ - RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */ - RPMSENSE_SCRIPT_CLEAN = (1 << 23), /*!< %clean build dependency. */ -+#ifdef OPENPKG -+ RPMSENSE_SCRIPT_TEST = (1 << 29), /*!< %test build dependency. */ -+#endif - RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */ - /*@-enummemuse@*/ - RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */ - -+--------------------------------------------------------------------------- -| Add support for the OpenPKG custom .spec file sections %track -| (package build-time feature for performing vendor source tracking) -| and %test (package install-time feature for performing package -| run-time tests). -| Additionally, add support for "Class" header. -+--------------------------------------------------------------------------- -Index: rpmdb/tagtbl.c ---- rpmdb/tagtbl.c 2 Jul 2003 20:20:27 -0000 1.1.1.4 -+++ rpmdb/tagtbl.c 30 Jan 2004 17:06:32 -0000 1.2 -@@ -135,6 +135,12 @@ - { "RPMTAG_FILEDEPENDSN", 1144, }, - { "RPMTAG_DEPENDSDICT", 1145, }, - { "RPMTAG_SOURCEPKGID", 1146, }, -+#ifdef OPENPKG -+ { "RPMTAG_TRACK", 1200, }, -+ { "RPMTAG_TEST", 1201, }, -+ { "RPMTAG_TESTPROG", 1202, }, -+ { "RPMTAG_CLASS", 1203, }, -+#endif - { NULL, 0 } - }; - - -+--------------------------------------------------------------------------- -| Add support for "Class" header. -+--------------------------------------------------------------------------- -Index: build/parsePreamble.c ---- build/parsePreamble.c 3 Mar 2003 20:46:34 -0000 1.1.1.13 -+++ build/parsePreamble.c 6 Feb 2004 15:37:58 -0000 1.3 -@@ -21,6 +21,7 @@ - RPMTAG_LICENSE, - RPMTAG_PACKAGER, - RPMTAG_DISTRIBUTION, -+ RPMTAG_CLASS, - RPMTAG_DISTURL, - RPMTAG_VENDOR, - RPMTAG_ICON, -@@ -327,6 +328,7 @@ - { RPMTAG_VENDOR, "%{vendor}" }, - { RPMTAG_PACKAGER, "%{packager}" }, - { RPMTAG_DISTRIBUTION, "%{distribution}" }, -+ { RPMTAG_CLASS, "%{class}" }, - { RPMTAG_DISTURL, "%{disturl}" }, - { -1, NULL } - }; -@@ -545,6 +547,7 @@ - (void) stashSt(spec, pkg->header, tag, lang); - /*@fallthrough@*/ - case RPMTAG_DISTRIBUTION: -+ case RPMTAG_CLASS: - case RPMTAG_VENDOR: - case RPMTAG_LICENSE: - case RPMTAG_PACKAGER: -@@ -751,6 +754,7 @@ - {RPMTAG_LICENSE, 0, 0, "copyright"}, - {RPMTAG_LICENSE, 0, 0, "license"}, - {RPMTAG_DISTRIBUTION, 0, 0, "distribution"}, -+ {RPMTAG_CLASS, 0, 0, "class"}, - {RPMTAG_DISTURL, 0, 0, "disturl"}, - {RPMTAG_VENDOR, 0, 0, "vendor"}, - {RPMTAG_GROUP, 0, 1, "group"}, diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/rpm.patch.porting --- a/openpkg/rpm.patch.porting Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1539 +0,0 @@ -## -## rpm.patch.porting -- Annotated OpenPKG RPM Patch file -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## This file assembles changes to existing RPM source files between -## the original RedHat RPM and the OpenPKG RPM variant. It can be -## automatically applied to a vanilla RedHat RPM source tree with the -## 'patch' tool to upgrade those files. Each patch snippet is annotated -## with a short description. -## -## Created on: 13-Sep-2006 -## -## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG -## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE. -## - -+--------------------------------------------------------------------------- -| Evil hack to get GNU libtool working under NetBSD 1.6 -| with the ugly way RPM currently has to use it. -+--------------------------------------------------------------------------- -Index: ltconfig ---- ltconfig 17 Jan 2001 16:22:58 -0000 1.1.1.7 -+++ ltconfig 29 Apr 2004 13:07:28 -0000 1.4 -@@ -2017,6 +2017,7 @@ - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH -+ deplibs_check_method=pass_all - ;; - - openbsd*) - -+--------------------------------------------------------------------------- -| Disable special RedHat NPTL handling. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:40:20 -0000 -@@ -151,10 +151,10 @@ - dnl XXX Test for libpthread.a that is NPTL aware (static link only). - dnl - LDFLAGS_NPTL= --if test -f /usr/lib/nptl/libpthread.a ; then -- LDFLAGS_NPTL="-L/usr/lib/nptl" --# INCPATH="$INCPATH -I/usr/include/nptl" --fi -+dnl if test -f /usr/lib/nptl/libpthread.a ; then -+dnl LDFLAGS_NPTL="-L/usr/lib/nptl" -+dnl # INCPATH="$INCPATH -I/usr/include/nptl" -+dnl fi - AC_SUBST(LDFLAGS_NPTL) - - dnl - -+--------------------------------------------------------------------------- -| Disable any POSIX Pthread stuff because in OpenPKG we use -| non-Pthread mutexes in Berkeley-DB. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:40:21 -0000 -@@ -447,14 +447,17 @@ - AC_CHECK_LIB(socket, socket) - ]) - --AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h) -+dnl # required for HP-UX because of RPC stuff in DB -+AC_CHECK_LIB(nsl, svc_run) - --AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [ -- dnl OSF 5.0 has the the symbols prefixed with __ in libpthread. -- AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [ -- AC_CHECK_LIB(thread, mutex_lock) -- ]) --]) -+dnl AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h) -+dnl -+dnl AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [ -+dnl dnl OSF 5.0 has the the symbols prefixed with __ in libpthread. -+dnl AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [ -+dnl AC_CHECK_LIB(thread, mutex_lock) -+dnl ]) -+dnl ]) - - AC_CHECK_HEADERS(aio.h) - AC_SEARCH_LIBS(aio_read, [c rt aio posix4]) - -+--------------------------------------------------------------------------- -| Add support for BSD getmntinfo(3). -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:40:23 -0000 -@@ -967,12 +967,13 @@ - AC_CHECK_FUNCS(getpassphrase) - - AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [ -+ AC_CHECK_FUNC(getmntinfo, AC_DEFINE(HAVE_GETMNTINFO, 1, [Define as 1 if you have the getmntinfo() function]), [ - AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[ - AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)]), [ - AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r"; - AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)])], [ - AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is used]) -- AC_LIBOBJ(getmntent)])])])]) -+ AC_LIBOBJ(getmntent)])])])])]) - - AC_CHECK_FUNC(lchown, - [__CHOWN_RHF="%{__chown} -Rhf" - -+--------------------------------------------------------------------------- -| Remove RPM's "lib64" hack because we do not install -| into any system locations at all. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:40:25 -0000 -@@ -1146,9 +1146,6 @@ - - dnl XXX Choose /usr/lib or /usr/lib64 for library installs. - MARK64= --case "${target_cpu}" in --x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;; --esac - AC_SUBST(MARK64) - - dnl Determine the canonical arch-vendor-os for the build machine - -+--------------------------------------------------------------------------- -| Provide fallback definitions for uintX_t stuff, which is used by -| build/rpmfile.h and not available on all platforms. We do this by -| adding the same Autoconf checks file/configure already used for its -| original file.h. -| Additionally, do not try to configure in an internal -| beecrypt subdirectory. -+--------------------------------------------------------------------------- -Index: configure.ac ---- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 -+++ configure.ac 13 Sep 2006 13:40:29 -0000 -@@ -1251,11 +1251,40 @@ - - AC_SUBST(OBJDUMP) - -+dnl OpenPKG: rpmfile.h (used in RPM) from file(1) needs additional checks -+dnl for its use of uintXX_t (which are available in file/config.h, but which -+dnl we cannot include into RPM because of conflicts with RPM's config.h) -+AC_DEFUN([AC_CHECK_TYPE_STDC], -+[AC_REQUIRE([AC_HEADER_STDC])dnl -+AC_MSG_CHECKING(for $1) -+AC_CACHE_VAL(ac_cv_type_$1, -+[AC_EGREP_CPP(dnl -+[(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]], -+[#if HAVE_STDINT_H -+#include -+#endif -+#include -+#if STDC_HEADERS -+#include -+#include -+#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -+AC_MSG_RESULT($ac_cv_type_$1) -+if test $ac_cv_type_$1 = no; then -+ AC_DEFINE($1, $2, $1) -+fi]) -+AC_CHECK_TYPE_STDC(uint8_t, unsigned char) -+AC_CHECK_TYPE_STDC(uint16_t, unsigned short) -+AC_CHECK_TYPE_STDC(uint32_t, unsigned int) -+ -+dnl OpenPKG: some strange platforms (like Unixware) really have MADV_XXX -+dnl but no madvise(2) function itself, so check for madvise explicitly. -+AC_CHECK_FUNC(madvise) -+ - dnl XXX this causes popt to depend on zlib et al - dnl # XXX Propagate -lucb to popt ... - dnl export LIBS INCPATH CONFIG_SITE - --AC_CONFIG_SUBDIRS(popt beecrypt zlib elfutils file db3) -+AC_CONFIG_SUBDIRS(popt zlib elfutils file db3) - - AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec - rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile - -+--------------------------------------------------------------------------- -| Remove RPM's "lib64" hack because we do not install -| into any system locations at all. -+--------------------------------------------------------------------------- -Index: popt/configure.ac ---- popt/configure.ac 27 Mar 2003 17:23:18 -0000 1.1.1.3 -+++ popt/configure.ac 12 May 2004 14:34:35 -0000 1.2 -@@ -53,9 +53,6 @@ - - dnl XXX Choose /usr/lib or /usr/lib64 for library installs. - MARK64= --case "${target_cpu}" in --x86_64*|powerpc64*|ppc64*|sparc64*|s390x*) MARK64=64 ;; --esac - AC_SUBST(MARK64) - - AC_CHECK_HEADERS(alloca.h float.h libintl.h mcheck.h unistd.h) - -+--------------------------------------------------------------------------- -| Prevent (at least NetBSD's) gcc 2.95 from optimizing (at least sha1.c) -| and this way run into a resource (virtual memory) exhaustion situation. -| Not all Bourne-Shells support embedded TAB characters in -| here-document style constructs. Insert the TAB character indirectly -| to workaround problems. -| Additionally, there is no need to build a shared library version of -| Berkeley-DB. -| Finally, enforce the use of the standard UNIX/fcntl mutex type for -| full portability and to get rid of Pthread library dependencies -| (which especially are nasty for the external RPM API users). -+--------------------------------------------------------------------------- -Index: db3/configure ---- db3/configure 18 Jan 2003 14:04:22 -0000 1.1.1.4 -+++ db3/configure 6 Jun 2005 15:53:05 -0000 1.3 -@@ -7,19 +7,29 @@ - # XXX edit CFLAGS= ... out of invocation args ??? - ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`" - -+# prevent gcc 2.95 from optimizing (at least sha1.c) -+# and this way get into a resource exhaustion situation -+if [ ".`($CC -v; $CC --version) &1 | grep -i 'gcc'`" != . ]; then -+ case "`$CC -dumpversion 2>/dev/null`" in -+ 3.* ) ;; -+ * ) CFLAGS=`echo " $CFLAGS -O0" | sed -e 's; -O[0-9]* ; ;g' -e 's;^ *;;'` ;; -+ esac -+fi -+ - CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ -- --enable-shared --enable-static --enable-rpc \ -- --with-uniquename=_rpmdb --srcdir=$db_dist -+ --disable-shared --enable-static --enable-rpc \ -+ --with-uniquename=_rpmdb --srcdir=$db_dist \ -+ --with-mutex="UNIX/fcntl" --disable-largefile - - mv Makefile Makefile.orig - cat Makefile.orig | sed -e '/^install[:-]/c\ - .PHONY: listobjs\ - listobjs:\ -- @echo $(OBJS) $(C_OBJS) \ -+~@echo $(OBJS) $(C_OBJS) \ - \ - distdir install check:\ - \ --db4_install: all install_setip' > Makefile -+db4_install: all install_setip' | tr '~' ' ' > Makefile - - mv db.h db.h.orig - cat db.h.orig | sed \ - -+--------------------------------------------------------------------------- -| Add support for BSD getmntinfo(3). -+--------------------------------------------------------------------------- -Index: lib/fs.c ---- lib/fs.c 4 Jun 2003 18:09:43 -0000 1.1.1.13 -+++ lib/fs.c 25 Nov 2004 09:32:16 -0000 1.3 -@@ -164,6 +164,15 @@ - int nextMount = 0; - - getmntinfo_r(&mounts, flags, &mntCount, &bufSize); -+# elif HAVE_GETMNTINFO -+# if defined(__NetBSD__) && (__NetBSD_Version__ > 200030000) -+# define statfs statvfs -+# endif -+ struct statfs * mounts = NULL; -+ int mntCount, flags = MNT_NOWAIT; -+ int nextMount = 0; -+ -+ mntCount = getmntinfo(&mounts, flags); - # endif - - filesystems = xcalloc((numAlloced + 1), sizeof(*filesystems)); /* XXX memory leak */ -@@ -193,6 +202,9 @@ - # elif HAVE_GETMNTINFO_R - if (nextMount == mntCount) break; - mntdir = mounts[nextMount++].f_mntonname; -+# elif HAVE_GETMNTINFO -+ if (nextMount == mntCount) break; -+ mntdir = mounts[nextMount++].f_mntonname; - # endif - - if (stat(mntdir, &sb)) { - -+--------------------------------------------------------------------------- -| Add support for Compaq/HP OSF1/Tru64. -+--------------------------------------------------------------------------- -Index: misc/fnmatch.h ---- misc/fnmatch.h 22 Feb 2002 17:12:15 -0000 1.1.1.3 -+++ misc/fnmatch.h 22 Jan 2004 21:42:26 -0000 1.2 -@@ -55,7 +55,7 @@ - #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ - #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ - --#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE -+#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE || defined __osf__ - # define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ - # define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ - # define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ - -+--------------------------------------------------------------------------- -| Use more correct Autoconf based size_t check. -| Add support for Compaq/HP OSF1/Tru64 and SCO UnixWare. -+--------------------------------------------------------------------------- -Index: misc/glob.h ---- misc/glob.h 11 Mar 2000 20:59:30 -0000 1.1.1.3 -+++ misc/glob.h 22 Jan 2004 21:42:27 -0000 1.2 -@@ -46,7 +46,7 @@ - #endif /* C++ or ANSI C. */ - - /* We need `size_t' for the following definitions. */ --#ifndef __size_t -+#if !defined(__size_t) && !defined(_SIZE_T_DECLARED) - # if defined __GNUC__ && __GNUC__ >= 2 - typedef __SIZE_TYPE__ __size_t; - # ifdef _XOPEN_SOURCE -@@ -74,7 +74,7 @@ - #define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ - - #if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE \ -- || defined _GNU_SOURCE) -+ || defined _GNU_SOURCE || defined __osf__ ) - # define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ - # define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ - # define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ -@@ -151,7 +151,8 @@ - `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. - If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. - Otherwise, `glob' returns zero. */ --#if _FILE_OFFSET_BITS != 64 -+/* #if _FILE_OFFSET_BITS != 64 || defined(OPENPKG_UNIXWARE) */ -+#if !defined(__linux__) - extern int glob __P ((__const char *__pattern, int __flags, - int (*__errfunc) (__const char *, int), - glob_t *__pglob)); - -+--------------------------------------------------------------------------- -| Better portability. -+--------------------------------------------------------------------------- -Index: misc/glob.c ---- misc/glob.c 11 Mar 2000 21:13:18 -0000 1.1.1.4 -+++ misc/glob.c 22 Jan 2004 21:42:26 -0000 1.2 -@@ -813,6 +813,7 @@ - - - /* Free storage allocated in PGLOB by a previous `glob' call. */ -+#if !defined(__linux__) || (defined(__linux__) && (_FILE_OFFSET_BITS != 64) || (__GNUC__ >= 2)) - void - globfree (pglob) - register glob_t *pglob; -@@ -826,7 +827,7 @@ - free ((__ptr_t) pglob->gl_pathv); - } - } -- -+#endif - - /* Do a collated comparison of A and B. */ - static int - -+--------------------------------------------------------------------------- -| Add libmisc.a for platform portability. -+--------------------------------------------------------------------------- -Index: tools/Makefile.am ---- tools/Makefile.am 29 May 2003 17:40:17 -0000 1.1.1.14 -+++ tools/Makefile.am 22 Jan 2004 21:42:34 -0000 1.2 -@@ -22,7 +22,7 @@ - - LDADD = \ - $(top_builddir)/lib/librpm.la \ -- @INTLLIBS@ -+ @INTLLIBS@ @LIBMISC@ - - staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@ - - -+--------------------------------------------------------------------------- -| Add libmisc.a for platform portability. -+--------------------------------------------------------------------------- -Index: tools/Makefile.in ---- tools/Makefile.in 16 Jul 2003 17:05:51 -0000 1.1.1.20 -+++ tools/Makefile.in 22 Jan 2004 21:42:35 -0000 1.2 -@@ -275,7 +275,7 @@ - - LDADD = \ - $(top_builddir)/lib/librpm.la \ -- @INTLLIBS@ -+ @INTLLIBS@ @LIBMISC@ - - - staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@ - -+--------------------------------------------------------------------------- -| Drop GCC "inline" attribute if not compiling with GCC. -| Workaround some other GCC'isms, too. -| Do not take over "const" replacements from Zlib. -+--------------------------------------------------------------------------- -Index: file/system.h ---- file/system.h 24 Jan 2003 19:41:56 -0000 1.1.1.1 -+++ file/system.h 6 Jun 2005 15:53:05 -0000 1.4 -@@ -13,6 +13,9 @@ - #endif - - #include -+#ifdef HAVE_INTTYPES_H -+#include -+#endif - - #include - #include -@@ -53,6 +56,8 @@ - #else - #if HAVE_ERROR && HAVE_ERROR_H - #include -+#else -+extern void error(int status, int errnum, const char *format, ...); - #endif - #endif - -@@ -194,6 +199,7 @@ - - #ifdef HAVE_LIBZ - #include -+#undef const - #endif - - #ifndef HAVE_STRERROR -@@ -246,7 +252,11 @@ - */ - /*@-shadow@*/ - /*@unused@*/ /*@exits@*/ /*@only@*/ -+#if defined(__GNUC__) - static inline void * vmefail(/*@unused@*/ size_t nb) -+#else -+static void * vmefail(/*@unused@*/ size_t nb) -+#endif - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/ - { -@@ -286,9 +296,33 @@ - - #if !defined(__LCLINT__) - /* Memory allocation via macro defs to get meaningful locations from mtrace() */ -+#if defined(__GNUC__) - #define xmalloc(_size) (malloc(_size) ? : vmefail(0)) - #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(0)) - #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(0)) -+#else -+static void *xmalloc(size_t size) -+{ -+ void *vp = malloc(size); -+ if (vp == NULL) -+ vmefail(0); -+ return vp; -+} -+static void *xcalloc(size_t number, size_t size) -+{ -+ void *vp = calloc(number, size); -+ if (vp == NULL) -+ vmefail(0); -+ return vp; -+} -+static void *xrealloc(void *ptr, size_t size) -+{ -+ void *vp = realloc(ptr, size); -+ if (vp == NULL) -+ vmefail(0); -+ return vp; -+} -+#endif - #define xstrdup(_str) (strcpy(xmalloc(strlen(_str)+1), (_str))) - #endif - -@@ -314,9 +348,14 @@ - - #if defined(__LCLINT__) - #define FILE_RCSID(id) --#else -+#elif defined(__GNUC__) - #define FILE_RCSID(id) \ - static inline const char *rcsid(const char *p) { \ -+ return rcsid(p = id); \ -+} -+#else -+#define FILE_RCSID(id) \ -+static const char *rcsid(const char *p) { \ - return rcsid(p = id); \ - } - #endif - -+--------------------------------------------------------------------------- -| Use GCC extensional features only if compiled with GCC. -+--------------------------------------------------------------------------- -Index: file/file.h ---- file/file.h 24 Jan 2003 19:41:56 -0000 1.1.1.1 -+++ file/file.h 22 Jan 2004 21:42:22 -0000 1.2 -@@ -95,7 +95,11 @@ - } value; /* either number or string */ - uint32_t mask; /* mask before comparison with value */ - char desc[MAXDESC]; /* description */ -+#if defined(__GNUC__) - } __attribute__((__packed__)); -+#else -+}; -+#endif - - #define BIT(A) (1 << (A)) - #define STRING_IGNORE_LOWERCASE BIT(0) - -+--------------------------------------------------------------------------- -| Add int32_t detection and automatic fallback support. -+--------------------------------------------------------------------------- -Index: file/config.h.in ---- file/config.h.in 7 Mar 2003 19:39:18 -0000 1.1.1.1 -+++ file/config.h.in 13 Sep 2006 13:40:49 -0000 -@@ -106,6 +106,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H - -+/* Define to 1 if you have the `vsnprintf' function. */ -+#undef HAVE_VSNPRINTF -+ - /* Define to 1 if `major', `minor', and `makedev' are declared in . - */ - #undef MAJOR_IN_MKDEV -@@ -162,12 +165,16 @@ - /* Define to empty if `const' does not conform to ANSI C. */ - #undef const - -+/* int32_t */ -+#undef int32_t -+ - /* Define to `long' if does not define. */ - #undef off_t - - /* Define to `unsigned' if does not define. */ - #undef size_t - -+#ifndef HAVE_STDINT_H - /* uint16_t */ - #undef uint16_t - -@@ -179,3 +186,4 @@ - - /* uint8_t */ - #undef uint8_t -+#endif - -+--------------------------------------------------------------------------- -| Add int32_t detection and automatic fallback support. -+--------------------------------------------------------------------------- -Index: file/configure.ac ---- file/configure.ac 1 Dec 2002 21:34:06 -0000 1.1.1.1 -+++ file/configure.ac 6 Jun 2005 15:53:05 -0000 1.2 -@@ -92,6 +92,7 @@ - AC_CHECK_TYPE_STDC(uint8_t, unsigned char) - AC_CHECK_TYPE_STDC(uint16_t, unsigned short) - AC_CHECK_TYPE_STDC(uint32_t, unsigned int) -+AC_CHECK_TYPE_STDC(int32_t, int) - AC_C_LONG_LONG - if test $ac_cv_c_long_long = yes; then - long64='unsigned long long'; -@@ -107,7 +108,7 @@ - AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0) - - dnl Checks for functions --AC_CHECK_FUNCS(error mtrace mkstemp mmap strdup strerror strtoul) -+AC_CHECK_FUNCS(error mtrace mkstemp mmap strdup strerror strtoul vsnprintf) - - dnl Checks for libraries - AC_CHECK_LIB(z, gzopen) - -+--------------------------------------------------------------------------- -| Add int32_t detection and automatic fallback support. -+--------------------------------------------------------------------------- -Index: file/configure ---- file/configure 16 Jul 2003 17:05:25 -0000 1.1.1.2 -+++ file/configure 6 Jun 2005 15:53:05 -0000 1.2 -@@ -10847,6 +10847,46 @@ - - fi - -+echo "$as_me:$LINENO: checking for int32_t" >&5 -+echo $ECHO_N "checking for int32_t... $ECHO_C" >&6 -+if test "${ac_cv_type_int32_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line $LINENO "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_STDINT_H -+#include -+#endif -+#include -+#if STDC_HEADERS -+#include -+#include -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ ac_cv_type_int32_t=yes -+else -+ ac_cv_type_int32_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 -+echo "${ECHO_T}$ac_cv_type_int32_t" >&6 -+if test $ac_cv_type_int32_t = no; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define int32_t int -+_ACEOF -+ -+fi -+ - echo "$as_me:$LINENO: checking for long long" >&5 - echo $ECHO_N "checking for long long... $ECHO_C" >&6 - if test "${ac_cv_c_long_long+set}" = set; then -@@ -11220,7 +11260,8 @@ - - - --for ac_func in error mtrace mkstemp mmap strdup strerror strtoul -+ -+for ac_func in error mtrace mkstemp mmap strdup strerror strtoul vsnprintf - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - -+--------------------------------------------------------------------------- -| Fallback to vsprintf(3) if vsnprintf(3) does not exist. -+--------------------------------------------------------------------------- -Index: file/print.c ---- file/print.c 24 Jan 2003 19:41:56 -0000 1.1.1.1 -+++ file/print.c 6 Jun 2005 15:53:05 -0000 1.2 -@@ -187,7 +187,11 @@ - - va_start(va, f); - /*@-boundswrite@*/ -+#ifdef HAVE_VSNPRINTF - rc = vsnprintf(fm->obp, fm->nob, f, va); -+#else -+ rc = vsprintf(fm->obp, f, va); -+#endif - /*@=boundswrite@*/ - va_end(va); - - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -+--------------------------------------------------------------------------- -Index: rpmdb/Makefile.am ---- rpmdb/Makefile.am 2 Jul 2003 20:14:07 -0000 1.1.1.7 -+++ rpmdb/Makefile.am 22 Jan 2004 21:42:29 -0000 1.2 -@@ -18,7 +18,7 @@ - EXTRA_PROGRAMS = tjfn - - tjfn_SOURCES = tjfn.c --tjfn_LDFLAGS = -all-static -+tjfn_LDFLAGS = -static - tjfn_LDADD = librpmdb.la - - pkgincdir = $(pkgincludedir) -@@ -180,4 +180,4 @@ - $(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES) - - tdbi: librpmdb.la tdbi.o -- $(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS) -+ $(LINK) -static $@.o $< $(mylibpaths) $(mylibs) $(LIBS) - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -+--------------------------------------------------------------------------- -Index: rpmdb/Makefile.in ---- rpmdb/Makefile.in 16 Jul 2003 17:05:48 -0000 1.1.1.7 -+++ rpmdb/Makefile.in 22 Jan 2004 21:42:29 -0000 1.2 -@@ -273,7 +273,7 @@ - EXTRA_PROGRAMS = tjfn - - tjfn_SOURCES = tjfn.c --tjfn_LDFLAGS = -all-static -+tjfn_LDFLAGS = -static - tjfn_LDADD = librpmdb.la - - pkgincdir = $(pkgincludedir) -@@ -952,7 +952,7 @@ - $(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES) - - tdbi: librpmdb.la tdbi.o -- $(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS) -+ $(LINK) -static $@.o $< $(mylibpaths) $(mylibs) $(LIBS) - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -+--------------------------------------------------------------------------- -Index: rpmio/Makefile.am ---- rpmio/Makefile.am 5 Jun 2003 12:05:23 -0000 1.1.1.9 -+++ rpmio/Makefile.am 22 Jan 2004 21:42:31 -0000 1.2 -@@ -68,27 +68,27 @@ - tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tdir_SOURCES = tdir.c --tdir_LDFLAGS = -all-static -+tdir_LDFLAGS = -static - tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tfts_SOURCES = tfts.c --tfts_LDFLAGS = -all-static -+tfts_LDFLAGS = -static - tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tglob_SOURCES = tglob.c --tglob_LDFLAGS = -all-static -+tglob_LDFLAGS = -static - tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tinv_SOURCES = tinv.c --tinv_LDFLAGS = -all-static -+tinv_LDFLAGS = -static - tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tkey_SOURCES = tkey.c --tkey_LDFLAGS = -all-static -+tkey_LDFLAGS = -static - tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tring_SOURCES = tring.c --tring_LDFLAGS = -all-static -+tring_LDFLAGS = -static - tring_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - trpmio_SOURCES = trpmio.c - -+--------------------------------------------------------------------------- -| Use GNU libtool's weaker -static (link with own static libraries) -| instead of the strong -all-static (link even with static libc, etc), -| because OpenPKG does not need to be fully static. -| Additionally, remove hard-coded Linux'ism of linking against POSIX -| rt/pthread libraries (is not needed even under Linux itself) and -| make sure the build does not break by an empty argument list when -| iterating over (the not existing) BeeCrypt objects. -+--------------------------------------------------------------------------- -Index: rpmio/Makefile.in ---- rpmio/Makefile.in 16 Jul 2003 17:05:49 -0000 1.1.1.9 -+++ rpmio/Makefile.in 22 Jan 2004 21:42:31 -0000 1.2 -@@ -288,8 +288,7 @@ - librpmio_la_LDFLAGS = -release 4.2 \ - @WITH_BEECRYPT_LIB@ \ - $(top_builddir)/file/libfmagic.la \ -- @WITH_ZLIB_LIB@ \ -- -lrt -lpthread -+ @WITH_ZLIB_LIB@ - - librpmio_la_LIBADD = $(BEECRYPTLOBJS) - librpmio_la_DEPENDENCIES = .created -@@ -298,27 +297,27 @@ - tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tdir_SOURCES = tdir.c --tdir_LDFLAGS = -all-static -+tdir_LDFLAGS = -static - tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tfts_SOURCES = tfts.c --tfts_LDFLAGS = -all-static -+tfts_LDFLAGS = -static - tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tglob_SOURCES = tglob.c --tglob_LDFLAGS = -all-static -+tglob_LDFLAGS = -static - tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tinv_SOURCES = tinv.c --tinv_LDFLAGS = -all-static -+tinv_LDFLAGS = -static - tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tkey_SOURCES = tkey.c --tkey_LDFLAGS = -all-static -+tkey_LDFLAGS = -static - tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - tring_SOURCES = tring.c --tring_LDFLAGS = -all-static -+tring_LDFLAGS = -static - tring_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la - - trpmio_SOURCES = trpmio.c -@@ -743,8 +742,8 @@ - .created: - if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \ - ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \ -- for lo in $(BEECRYPTLOBJS); do \ -- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \ -+ for lo in $(BEECRYPTLOBJS) ''; do \ -+ [ ".$$lo" = . ] || [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \ - done \ - fi - touch $@ - -+--------------------------------------------------------------------------- -| Add Unixware support. -+--------------------------------------------------------------------------- -Index: rpmio/fts.h ---- rpmio/fts.h 18 Jan 2003 16:13:17 -0000 1.1.1.3 -+++ rpmio/fts.h 22 Jan 2004 21:42:32 -0000 1.2 -@@ -51,7 +51,7 @@ - # define _LARGEFILE64_SOURCE - #endif - --#if defined(sun) -+#if defined(sun) || defined(OPENPKG_UNIXWARE) - # define _D_EXACT_NAMLEN(d) ((d)->d_reclen) - #endif - - -+--------------------------------------------------------------------------- -| Add FreeBSD/NetBSD/OpenBSD support. -| Workaround some GCC'isms. -+--------------------------------------------------------------------------- -Index: rpmio/fts.c ---- rpmio/fts.c 18 Jan 2003 16:13:17 -0000 1.1.1.3 -+++ rpmio/fts.c 8 Jun 2005 13:16:25 -0000 1.5 -@@ -34,6 +34,8 @@ - static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; - #endif /* LIBC_SCCS and not lint */ - -+#include -+ - #if defined(_LIBC) - #include - #include -@@ -45,20 +47,52 @@ - #include - #include - #else --#if defined(hpux) -+#if defined(OPENPKG_HPUX) - # define _INCLUDE_POSIX_SOURCE - # define __errno_location() (&errno) --# define dirfd(dirp) -1 -+# define locdirfd(dirp) -1 - # define stat64 stat - # define _STAT_VER 0 - # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) -+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen) - #endif --#if defined(sun) -+#if defined(sun) || defined(OPENPKG_UNIXWARE) - # define __errno_location() (&errno) --# define dirfd(dirp) -1 -+# define locdirfd(dirp) -1 - # define _STAT_VER 0 - # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) - #endif -+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENPKG_DARWIN) -+# define __errno_location() (&errno) -+# define stat64 stat -+# define _STAT_VER 0 -+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) -+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen) -+#endif -+#if defined(__osf__) -+# define __errno_location() (&errno) -+# define locdirfd(dirp) -1 -+# define stat64 stat -+# define _STAT_VER 0 -+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) -+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen) -+#endif -+#if defined(OPENPKG_IRIX64) -+# define __errno_location() (&errno) -+# define locdirfd(dirp) -1 -+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) -+# define _D_EXACT_NAMLEN(d) ((d)->d_reclen) -+#endif -+#if defined(OPENPKG_AIX) -+# define __errno_location() (&errno) -+# define _STAT_VER 0 -+# define locdirfd(dirp) ((dirp)->dd_fd) -+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) -+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen) -+#endif -+#if !defined(locdirfd) -+# define locdirfd(dirp) dirfd(dirp) -+#endif - #include "system.h" - #include "fts.h" - #include "rpmio.h" -@@ -73,7 +107,12 @@ - /* Largest alignment size needed, minus one. - Usually long double is the worst case. */ - #ifndef ALIGNBYTES -+#if defined(__GNUC__) - #define ALIGNBYTES (__alignof__ (long double) - 1) -+#else -+/* not accurate enough (usually too large), but sufficient (and this way equal safe) */ -+#define ALIGNBYTES (sizeof (long double) - 1) -+#endif - #endif - /* Align P to that size. */ - #ifndef ALIGN -@@ -107,9 +146,13 @@ - /*@modifies fileSystem, internalState @*/; - - #ifndef MAX -+#if defined(__GNUC__) - #define MAX(a, b) ({ __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a > _b ? _a : _b; }) -+#else -+#define MAX(a, b) ((a) > (b) ? (a) : (b)) -+#endif - #endif - - #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) -@@ -719,7 +762,7 @@ - */ - cderrno = 0; - if (nlinks || type == BREAD) { -- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { -+ if (fts_safe_changedir(sp, cur, locdirfd(dirp), NULL)) { - if (nlinks && type == BREAD) - cur->fts_errno = errno; - cur->fts_flags |= FTS_DONTCHDIR; - -+--------------------------------------------------------------------------- -| Remove inclusion of system because RPM uses its own glob(3) -| implementation and this can conflict with the system one. -+--------------------------------------------------------------------------- -Index: rpmio/rpmio.h ---- rpmio/rpmio.h 12 Jun 2003 18:22:18 -0000 1.1.1.7 -+++ rpmio/rpmio.h 22 Jan 2004 21:42:33 -0000 1.2 -@@ -9,9 +9,6 @@ - #include - #include - #include --/*@-noparams@*/ --#include --/*@=noparams@*/ - #include - #include - #include - -+--------------------------------------------------------------------------- -| Make this whole "dirent" fiddling at least working on -| FreeBSD/NetBSD/OpenBSD, Solaris, HPUX and Unixware. This certainly -| is a bad corner of RPM which inherently leads to portability -| problems. -+--------------------------------------------------------------------------- -Index: rpmio/rpmrpc.c ---- rpmio/rpmrpc.c 29 May 2003 22:14:04 -0000 1.1.1.8 -+++ rpmio/rpmrpc.c 8 Jun 2005 13:16:26 -0000 1.5 -@@ -1079,6 +1079,8 @@ - return rc; - } - -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(sun) && !defined(OPENPKG_DARWIN) -+ - struct __dirstream { - int fd; /* File descriptor. */ - char * data; /* Directory block. */ -@@ -1091,6 +1093,8 @@ - #endif - }; - -+#endif -+ - #if !defined(DT_DIR) - # define DT_UNKNOWN 0 - # define DT_FIFO 1 -@@ -1101,14 +1105,30 @@ - # define DT_LNK 10 - # define DT_SOCK 12 - # define DT_WHT 14 --typedef struct __dirstream * FTPDIR; --#else --typedef DIR * FTPDIR; - #endif - -+struct mydirstreament { -+ unsigned char type; -+ char *name; -+}; -+struct mydirstream { -+ DIR dir; -+ struct dirent ent; -+ unsigned int offset; -+ unsigned int size; -+ struct mydirstreament av[1]; -+}; -+typedef struct mydirstream *FTPDIR; -+ - /*@unchecked@*/ - static int ftpmagicdir = 0x8440291; --#define ISFTPMAGIC(_dir) (!memcmp((_dir), &ftpmagicdir, sizeof(ftpmagicdir))) -+#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) -+#define SETFTPMAGIC(_dir) ((_dir)->fd) = ftpmagicdir -+#define ISFTPMAGIC(_dir) ((_dir)->fd == ftpmagicdir) -+#else -+#define SETFTPMAGIC(_dir) ((_dir)->dd_fd) = ftpmagicdir -+#define ISFTPMAGIC(_dir) ((_dir)->dd_fd == ftpmagicdir) -+#endif - - /*@-boundswrite@*/ - /*@-type@*/ /* FIX: abstract DIR */ -@@ -1121,8 +1141,7 @@ - struct dirent * dp; - size_t nb; - const char * s, * sb, * se; -- const char ** av; -- unsigned char * dt; -+ struct mydirstreament * av; - char * t; - int ac; - int c; -@@ -1165,28 +1184,22 @@ - } - } - -- nb += sizeof(*mydir) + sizeof(*dp) + ((ac + 1) * sizeof(*av)) + (ac + 1); -+ nb = sizeof(*mydir) + (ac * sizeof(*av)) + nb; - mydir = xcalloc(1, nb); - /*@-abstract@*/ -- dp = (struct dirent *) (mydir + 1); -- av = (const char **) (dp + 1); -- dt = (char *) (av + (ac + 1)); -- t = (char *) (dt + ac + 1); -+ dp = &mydir->ent; -+ av = &mydir->av[0]; -+ t = (char *)&mydir->av[ac+1]; - /*@=abstract@*/ - -- mydir->fd = ftpmagicdir; --/*@-usereleased@*/ -- mydir->data = (char *) dp; --/*@=usereleased@*/ -- mydir->allocation = nb; -- mydir->size = ac; -- mydir->offset = -1; -- mydir->filepos = 0; -+ SETFTPMAGIC((DIR *)mydir); -+ mydir->size = ac; -+ mydir->offset = 0; - - ac = 0; - /*@-dependenttrans -unrecog@*/ -- dt[ac] = DT_DIR; av[ac++] = t; t = stpcpy(t, "."); t++; -- dt[ac] = DT_DIR; av[ac++] = t; t = stpcpy(t, ".."); t++; -+ av[ac].type = DT_DIR; av[ac].name = t; t = stpcpy(t, "."); ++ac; -+ av[ac].type = DT_DIR; av[ac].name = t; t = stpcpy(t, ".."); ++ac; - /*@=dependenttrans =unrecog@*/ - sb = NULL; - s = se = ftpBuf; -@@ -1198,34 +1211,34 @@ - /*@switchbreak@*/ break; - case '\r': - /*@-dependenttrans@*/ -- av[ac] = t; -+ av[ac].name = t; - /*@=dependenttrans@*/ - if (sb == NULL) { - /*@-unrecog@*/ - switch(*s) { - case 'p': -- dt[ac] = DT_FIFO; -+ av[ac].type = DT_FIFO; - /*@innerbreak@*/ break; - case 'c': -- dt[ac] = DT_CHR; -+ av[ac].type = DT_CHR; - /*@innerbreak@*/ break; - case 'd': -- dt[ac] = DT_DIR; -+ av[ac].type = DT_DIR; - /*@innerbreak@*/ break; - case 'b': -- dt[ac] = DT_BLK; -+ av[ac].type = DT_BLK; - /*@innerbreak@*/ break; - case '-': -- dt[ac] = DT_REG; -+ av[ac].type = DT_REG; - /*@innerbreak@*/ break; - case 'l': -- dt[ac] = DT_LNK; -+ av[ac].type = DT_LNK; - /*@innerbreak@*/ break; - case 's': -- dt[ac] = DT_SOCK; -+ av[ac].type = DT_SOCK; - /*@innerbreak@*/ break; - default: -- dt[ac] = DT_UNKNOWN; -+ av[ac].type = DT_UNKNOWN; - /*@innerbreak@*/ break; - } - /*@=unrecog@*/ -@@ -1243,7 +1256,7 @@ - /*@switchbreak@*/ break; - } - } -- av[ac] = NULL; -+ av[ac].name = NULL; - - /*@-kepttrans@*/ - return (DIR *) mydir; -@@ -1258,43 +1271,50 @@ - { - FTPDIR mydir = (FTPDIR)dir; - struct dirent * dp; -- const char ** av; -- unsigned char * dt; -+ struct mydirstreament * av; - int ac; - int i; - - /*@+voidabstract@*/ -- if (mydir == NULL || !ISFTPMAGIC(mydir) || mydir->data == NULL) { -+ if (dir == NULL || !ISFTPMAGIC(dir)) { - /* XXX TODO: EBADF errno. */ - return NULL; - } - /*@=voidabstract@*/ - -- dp = (struct dirent *) mydir->data; -- av = (const char **) (dp + 1); -+ dp = &mydir->ent; -+ av = &mydir->av[0]; - ac = mydir->size; -- dt = (char *) (av + (ac + 1)); -- i = mydir->offset + 1; -+ i = mydir->offset + 1; - - /*@-boundsread@*/ -- if (i < 0 || i >= ac || av[i] == NULL) -+ if (i < 0 || i >= ac || av[i].name == NULL) - return NULL; - /*@=boundsread@*/ - - mydir->offset = i; - -+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENPKG_DARWIN) -+ dp->d_ino = i + 1; -+ dp->d_reclen = 0; -+ dp->d_type = av[i].type; -+ strncpy(dp->d_name, av[i].name, sizeof(dp->d_name) - 1); -+ dp->d_name[sizeof(dp->d_name)-1] = '\0'; -+ dp->d_namlen = strlen(dp->d_name); -+#elif defined(OPENPKG_HPUX) || defined(sun) || defined(OPENPKG_UNIXWARE) || defined(__osf__) || defined(OPENPKG_IRIX64) || defined(OPENPKG_AIX) -+ /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */ -+ dp->d_ino = i + 1; /* W2DO? */ -+ dp->d_reclen = 0; /* W2DO? */ -+ strncpy(dp->d_name, av[i].name, sizeof(dp->d_name)); -+#else - /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */ - dp->d_ino = i + 1; /* W2DO? */ - dp->d_reclen = 0; /* W2DO? */ -- --#if !defined(hpux) && !defined(sun) - dp->d_off = 0; /* W2DO? */ --/*@-boundsread@*/ -- dp->d_type = dt[i]; --/*@=boundsread@*/ -+ dp->d_type = av[i].type; -+ strncpy(dp->d_name, av[i].name, sizeof(dp->d_name)); - #endif - -- strncpy(dp->d_name, av[i], sizeof(dp->d_name)); - /*@+voidabstract@*/ - if (_ftp_debug) - fprintf(stderr, "*** ftpReaddir(%p) %p \"%s\"\n", (void *)mydir, dp, dp->d_name); -@@ -1313,7 +1333,7 @@ - /*@+voidabstract@*/ - if (_ftp_debug) - fprintf(stderr, "*** ftpClosedir(%p)\n", (void *)mydir); -- if (mydir == NULL || !ISFTPMAGIC(mydir)) { -+ if (dir == NULL || !ISFTPMAGIC(dir)) { - /* XXX TODO: EBADF errno. */ - return -1; - } - -+--------------------------------------------------------------------------- -| Remove inclusion of ancient (and since years deprecated) -| header. This especially makes sure RPM build does not break on -| strict platforms like FreeBSD 5. -+--------------------------------------------------------------------------- -Index: system.h ---- system.h 1 Mar 2003 19:53:08 -0000 1.1.1.10 -+++ system.h 8 Jun 2005 13:15:16 -0000 1.4 -@@ -256,10 +256,6 @@ - #include - #endif - --#if HAVE_MALLOC_H && !defined(__LCLINT__) --#include --#endif -- - /*@-declundef -incondefs @*/ /* FIX: these are macros */ - /** - */ - -+--------------------------------------------------------------------------- -| Add support for BSD getmntinfo(3). -+--------------------------------------------------------------------------- -Index: system.h ---- system.h 1 Mar 2003 19:53:08 -0000 1.1.1.10 -+++ system.h 8 Jun 2005 13:15:16 -0000 1.4 -@@ -546,7 +546,7 @@ - #define lchown chown - #endif - --#if HAVE_GETMNTINFO_R || HAVE_MNTCTL -+#if HAVE_GETMNTINFO_R || HAVE_GETMNTINFO || HAVE_MNTCTL - # define GETMNTENT_ONE 0 - # define GETMNTENT_TWO 0 - # if HAVE_SYS_MNTCTL_H - -+--------------------------------------------------------------------------- -| Drop GCC "inline" attribute if not compiling with GCC. -+--------------------------------------------------------------------------- -Index: system.h ---- system.h 1 Mar 2003 19:53:08 -0000 1.1.1.10 -+++ system.h 8 Jun 2005 13:15:16 -0000 1.4 -@@ -599,11 +599,24 @@ - - #if defined(__LCLINT__) - #define FILE_RCSID(id) --#else -+#elif defined(__GNUC__) - #define FILE_RCSID(id) \ - static inline const char *rcsid(const char *p) { \ - return rcsid(p = id); \ - } -+#else -+#define FILE_RCSID(id) \ -+static const char *rcsid(const char *p) { \ -+ return rcsid(p = id); \ -+} -+#endif -+ -+/* for basename(3) and dirname(3) */ -+#if !defined(OPENPKG_AIX) -+#include -+#endif -+#if defined(OPENPKG_AIX) -+#define unsetenv(x) /* unsetenv() is used in RPM just for malloc debugging purposes */ - #endif - - #endif /* H_SYSTEM */ - -+--------------------------------------------------------------------------- -| Remove GCC'ism. -+--------------------------------------------------------------------------- -Index: build/rpmfile.h ---- build/rpmfile.h 24 Jan 2003 19:41:56 -0000 1.1.1.1 -+++ build/rpmfile.h 22 Jan 2004 21:42:14 -0000 1.2 -@@ -95,7 +95,11 @@ - } value; /* either number or string */ - uint32_t mask; /* mask before comparison with value */ - char desc[MAXDESC]; /* description */ -+#if defined(__GNUC__) - } __attribute__((__packed__)); -+#else -+}; -+#endif - - #define BIT(A) (1 << (A)) - #define STRING_IGNORE_LOWERCASE BIT(0) - -+--------------------------------------------------------------------------- -| Better portability for madvise(2) usage. -+--------------------------------------------------------------------------- -Index: rpmdb/legacy.c ---- rpmdb/legacy.c 18 Dec 2002 22:40:19 -0000 1.1.1.4 -+++ rpmdb/legacy.c 22 Jan 2004 21:42:30 -0000 1.2 -@@ -182,7 +182,7 @@ - break; - } - --#ifdef MADV_SEQUENTIAL -+#if defined(HAVE_MADVISE) && defined(MADV_SEQUENTIAL) - xx = madvise(mapped, fsize, MADV_SEQUENTIAL); - #endif - - -+--------------------------------------------------------------------------- -| Better portability for madvise(2) usage. -+--------------------------------------------------------------------------- -Index: lib/fsm.c ---- lib/fsm.c 3 Mar 2003 21:28:12 -0000 1.1.1.5 -+++ lib/fsm.c 22 Jan 2004 21:42:23 -0000 1.2 -@@ -879,7 +879,7 @@ - rdbuf = fsm->rdbuf; - fsm->rdbuf = (char *) mapped; - fsm->rdlen = nmapped = st->st_size; --#if defined(MADV_DONTNEED) -+#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED) - xx = madvise(mapped, nmapped, MADV_DONTNEED); - #endif - } -@@ -909,7 +909,7 @@ - #if HAVE_MMAP - if (mapped != (void *)-1) { - xx = msync(mapped, nmapped, MS_ASYNC); --#if defined(MADV_DONTNEED) -+#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED) - xx = madvise(mapped, nmapped, MADV_DONTNEED); - #endif - /*@-noeffect@*/ xx = munmap(mapped, nmapped) /*@=noeffect@*/; - -+--------------------------------------------------------------------------- -| Support UnixWare 7.1.3 and OpenDarwin 6.6.2, too. -+--------------------------------------------------------------------------- -Index: aclocal.m4 ---- aclocal.m4 16 Jul 2003 17:05:28 -0000 1.1.1.10 -+++ aclocal.m4 6 Jun 2005 15:53:03 -0000 1.4 -@@ -2838,7 +2838,7 @@ - runpath_var=LD_RUN_PATH - ;; - -- sysv5uw7* | unixware7*) -+ sysv5uw7* | unixware7* | sysv5UnixWare7* ) - no_undefined_flag='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -@@ -4311,6 +4311,7 @@ - ;; - *) # Darwin 1.3 on - lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; -@@ -4336,7 +4337,7 @@ - ;; - - hpux10.20*|hpux11*) -- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' -+ lt_cv_deplibs_check_method='pass_all' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; -@@ -4375,11 +4376,7 @@ - ;; - - netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' -- else -- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' -- fi -+ lt_cv_deplibs_check_method='pass_all' - ;; - - newos6*) -@@ -4414,7 +4411,7 @@ - lt_cv_file_magic_test_file=/lib/libc.so - ;; - --sysv5uw[[78]]* | sysv4*uw2*) -+sysv5uw[[78]]* | sysv4*uw2* | sysv5UnixWare7* ) - lt_cv_deplibs_check_method=pass_all - ;; - - -+--------------------------------------------------------------------------- -| Use Linux i386 assembly specific stuff on Linux only. -+--------------------------------------------------------------------------- -Index: rpmio/rpmsw.c ---- rpmio/rpmsw.c 5 Jun 2003 12:04:05 -0000 1.1.1.1 -+++ rpmio/rpmsw.c 22 Jan 2004 21:42:33 -0000 1.2 -@@ -27,7 +27,7 @@ - /*@unchecked@*/ - static int rpmsw_initialized = 0; - --#if defined(__i386__) -+#if defined(__linux__) && defined(__i386__) - /* Swiped from glibc-2.3.2 sysdeps/i386/i686/hp-timing.h */ - - #define HP_TIMING_ZERO(Var) (Var) = (0) - -+--------------------------------------------------------------------------- -| Fix "environ" declaration. -+--------------------------------------------------------------------------- -Index: lib/signature.c ---- lib/signature.c 29 May 2003 18:42:23 -0000 1.1.1.23 -+++ lib/signature.c 22 Jan 2004 21:42:25 -0000 1.2 -@@ -27,7 +27,7 @@ - /*@access pgpDigParams@*/ - - #if !defined(__GLIBC__) --char ** environ = NULL; -+extern char ** environ; - #endif - - int rpmLookupSignatureType(int action) - -+--------------------------------------------------------------------------- -| Rename own mergesort(3) implementation to avoid conflicts -| with a possibly existing vendor version. -+--------------------------------------------------------------------------- -Index: rpmdb/merge.c ---- rpmdb/merge.c 22 Jun 2002 18:51:58 -0000 1.1.1.2 -+++ rpmdb/merge.c 22 Jan 2004 21:42:30 -0000 1.2 -@@ -204,7 +204,7 @@ - * Arguments are as for qsort. - */ - int --mergesort(void *base, size_t nmemb, size_t size, -+rpmdb_mergesort(void *base, size_t nmemb, size_t size, - int (*cmp) (const void *, const void *)) - { - register int i, sense; - -+--------------------------------------------------------------------------- -| Rename own mergesort(3) implementation to avoid conflicts -| with a possibly existing vendor version. -+--------------------------------------------------------------------------- -Index: rpmdb/rpmdb.h ---- rpmdb/rpmdb.h 18 Jan 2003 14:04:35 -0000 1.1.1.5 -+++ rpmdb/rpmdb.h 22 Jan 2004 21:42:31 -0000 1.2 -@@ -1080,7 +1080,7 @@ - * Mergesort, same arguments as qsort(2). - */ - /*@unused@*/ --int mergesort(void *base, size_t nmemb, size_t size, -+int rpmdb_mergesort(void *base, size_t nmemb, size_t size, - int (*cmp) (const void *, const void *)) - /*@globals errno @*/ - /*@modifies base, errno @*/; - -+--------------------------------------------------------------------------- -| Rename own mergesort(3) implementation to avoid conflicts -| with a possibly existing vendor version. -+--------------------------------------------------------------------------- -Index: rpmdb/rpmdb.c ---- rpmdb/rpmdb.c 2 Jul 2003 19:21:54 -0000 1.1.1.6 -+++ rpmdb/rpmdb.c 22 Jan 2004 21:42:30 -0000 1.2 -@@ -2361,7 +2361,7 @@ - sizeof(*mi->mi_set->recs), hdrNumCmp); - /*@=boundsread@*/ - #else -- mergesort(mi->mi_set->recs, mi->mi_set->count, -+ rpmdb_mergesort(mi->mi_set->recs, mi->mi_set->count, - sizeof(*mi->mi_set->recs), hdrNumCmp); - #endif - mi->mi_sorted = 1; - -+--------------------------------------------------------------------------- -| Workaround a double-inclusion problem under AIX. -+--------------------------------------------------------------------------- -Index: lib/getdate.y ---- lib/getdate.y 24 Sep 2001 21:53:15 -0000 1.1.1.2 -+++ lib/getdate.y 8 Jun 2005 13:16:22 -0000 1.2 -@@ -30,7 +30,9 @@ - #undef static - #endif - -+#ifndef OPENPKG_AIX - #include -+#endif - #include - - /* The code at the top of get_date which figures out the offset of the - -+--------------------------------------------------------------------------- -| Workaround a double-inclusion problem under AIX. -+--------------------------------------------------------------------------- -Index: lib/getdate.c ---- lib/getdate.c 2 Jul 2003 19:21:45 -0000 1.1.1.4 -+++ lib/getdate.c 8 Jun 2005 13:16:21 -0000 1.2 -@@ -50,7 +50,9 @@ - #undef static - #endif - -+#ifndef OPENPKG_AIX - #include -+#endif - #include - - /* The code at the top of get_date which figures out the offset of the - -+--------------------------------------------------------------------------- -| The following patch works around a general failure of RPM to -| adhere to the ISO C standard, for which newer GCC releases claim -| compile errors and fail. -+--------------------------------------------------------------------------- -Index: misc/err.h ---- misc/err.h 2009-01-06 22:48:16.104430941 +0100 -+++ misc/err.h 2009-01-06 22:47:55.944312482 +0100 -@@ -29,31 +29,4 @@ - # define __gnuc_va_list __ptr_t - #endif - --__BEGIN_DECLS -- --/* Print "program: ", FORMAT, ": ", the standard error string for errno, -- and a newline, on stderr. */ --extern void warn __P ((__const char *__format, ...)) -- __attribute__ ((__format__ (__printf__, 1, 2))); --extern void vwarn __P ((__const char *__format, __gnuc_va_list)) -- __attribute__ ((__format__ (__printf__, 1, 0))); -- --/* Likewise, but without ": " and the standard error string. */ --extern void warnx __P ((__const char *__format, ...)) -- __attribute__ ((__format__ (__printf__, 1, 2))); --extern void vwarnx __P ((__const char *__format, __gnuc_va_list)) -- __attribute__ ((__format__ (__printf__, 1, 0))); -- --/* Likewise, and then exit with STATUS. */ --extern void err __P ((int __status, __const char *__format, ...)) -- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); --extern void verr __P ((int __status, __const char *__format, __gnuc_va_list)) -- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); --extern void errx __P ((int __status, __const char *__format, ...)) -- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); --extern void verrx __P ((int __status, __const char *, __gnuc_va_list)) -- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); -- --__END_DECLS -- - #endif /* err.h */ diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/rpm.patch.regen --- a/openpkg/rpm.patch.regen Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1038 +0,0 @@ -## -## rpm.patch.regen -- Annotated OpenPKG RPM Patch file -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## This file assembles changes to existing RPM source files between -## the original RedHat RPM and the OpenPKG RPM variant. It can be -## automatically applied to a vanilla RedHat RPM source tree with the -## 'patch' tool to upgrade those files. Each patch snippet is annotated -## with a short description. -## -## Created on: 13-Sep-2006 -## -## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG -## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE. -## - -+--------------------------------------------------------------------------- -| Corresponding patches in "config.h.in" script after regeneration from -| patched "configure.ac" with "autoheader". -+--------------------------------------------------------------------------- -Index: config.h.in ---- config.h.in 16 Jul 2003 17:17:13 -0000 1.1.1.18 -+++ config.h.in 13 Sep 2006 13:41:41 -0000 -@@ -108,6 +108,9 @@ - /* Define if you have the getmntent() function */ - #undef HAVE_GETMNTENT - -+/* Define as 1 if you have the getmntinfo() function */ -+#undef HAVE_GETMNTINFO -+ - /* Define as 1 if you have getmntinfo_r() (only osf?) */ - #undef HAVE_GETMNTINFO_R - -@@ -181,18 +184,12 @@ - /* Define to 1 if you have the `port' library (-lport). */ - #undef HAVE_LIBPORT - --/* Define to 1 if you have the `pthread' library (-lpthread). */ --#undef HAVE_LIBPTHREAD -- - /* Define to 1 if you have the `rand' library (-lrand). */ - #undef HAVE_LIBRAND - - /* Define to 1 if you have the `socket' library (-lsocket). */ - #undef HAVE_LIBSOCKET - --/* Define to 1 if you have the `thread' library (-lthread). */ --#undef HAVE_LIBTHREAD -- - /* Define to 1 if you have the header file. */ - #undef HAVE_LIMITS_H - -@@ -259,9 +256,6 @@ - /* Define to 1 if you have the `regcomp' function. */ - #undef HAVE_REGCOMP - --/* Define to 1 if you have the header file. */ --#undef HAVE_SEMAPHORE_H -- - /* Define to 1 if you have the `setenv' function. */ - #undef HAVE_SETENV - -@@ -323,9 +317,6 @@ - /* Define as 1 if you have "struct mnttab" (only sco?) */ - #undef HAVE_STRUCT_MNTTAB - --/* Define to 1 if you have the header file. */ --#undef HAVE_SYNCH_H -- - /* Define to 1 if you have the header file, and it defines `DIR'. - */ - #undef HAVE_SYS_DIR_H -@@ -391,9 +382,6 @@ - /* Define as 1 if defines S_ISSOCK */ - #undef HAVE_S_ISSOCK - --/* Define to 1 if you have the header file. */ --#undef HAVE_THREAD_H -- - /* Define to 1 if you have the `tsearch' function. */ - #undef HAVE_TSEARCH - -@@ -586,6 +574,17 @@ - /* Define to `unsigned' if does not define. */ - #undef size_t - -+#ifndef HAVE_STDINT_H -+/* uint16_t */ -+#undef uint16_t -+ -+/* uint32_t */ -+#undef uint32_t -+ -+/* uint8_t */ -+#undef uint8_t -+#endif -+ - /* Define to unsigned long or unsigned long long if and - don't define. */ - #undef uintmax_t - -+--------------------------------------------------------------------------- -| Corresponding patches in "configure" script after regeneration from -| patched "configure.ac" with "autoconf". -+--------------------------------------------------------------------------- -Index: configure ---- configure 16 Jul 2003 17:05:55 -0000 1.1.1.23 -+++ configure 13 Sep 2006 13:41:43 -0000 -@@ -467,7 +467,7 @@ - # include - #endif" - --ac_subdirs_all="$ac_subdirs_all popt beecrypt zlib elfutils file db3" -+ac_subdirs_all="$ac_subdirs_all popt zlib elfutils file db3" - 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' - ac_subst_files='' - -@@ -4040,7 +4040,7 @@ - AS=${AS-as} - - if test "$ac_cv_c_compiler_gnu" = yes; then -- CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts" -+ CFLAGS="$CFLAGS -O2 -D_GNU_SOURCE -D_REENTRANT" - fi - export CFLAGS - -@@ -4837,16 +4837,13 @@ - # just link it dynamically - LDFLAGS_STATIC="" - fi -+LDFLAGS_STATIC="" # OpenPKG wants dynamically linked RPM tools - LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}" # libtool format - echo "$as_me:$LINENO: result: $LDFLAGS_STATIC" >&5 - echo "${ECHO_T}$LDFLAGS_STATIC" >&6 - - - LDFLAGS_NPTL= --if test -f /usr/lib/nptl/libpthread.a ; then -- LDFLAGS_NPTL="-L/usr/lib/nptl" --# INCPATH="$INCPATH -I/usr/include/nptl" --fi - - - echo "$as_me:$LINENO: checking POSIX chmod" >&5 -@@ -4937,7 +4934,7 @@ - if test X"$MKDIR_P" = X0 ; then - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 -- MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`" -+ MKDIR_P="@l_prefix@/lib/openpkg/shtool mkdir -f -p -m 755" - else - echo "$as_me:$LINENO: result: yes" >&5 - echo "${ECHO_T}yes" >&6 -@@ -5878,6 +5875,7 @@ - ;; - *) # Darwin 1.3 on - lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; -@@ -5903,7 +5901,7 @@ - ;; - - hpux10.20*|hpux11*) -- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' -+ lt_cv_deplibs_check_method='pass_all' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; -@@ -5942,11 +5940,7 @@ - ;; - - netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -- else -- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' -- fi -+ lt_cv_deplibs_check_method='pass_all' - ;; - - newos6*) -@@ -5981,7 +5975,7 @@ - lt_cv_file_magic_test_file=/lib/libc.so - ;; - --sysv5uw[78]* | sysv4*uw2*) -+sysv5uw[78]* | sysv4*uw2* | sysv5UnixWare7* ) - lt_cv_deplibs_check_method=pass_all - ;; - -@@ -6682,7 +6676,7 @@ - case $host in - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 6685 "configure"' > conftest.$ac_ext -+ echo '#line 6679 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -7211,7 +7205,7 @@ - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" - compiler_c_o=no --if { (eval echo configure:7214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then -@@ -8069,7 +8063,7 @@ - runpath_var=LD_RUN_PATH - ;; - -- sysv5uw7* | unixware7*) -+ sysv5uw7* | unixware7* | sysv5UnixWare7* ) - no_undefined_flag='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -@@ -8395,7 +8389,7 @@ - libsuff= - case "$host_cpu" in - x86_64*|s390x*) -- echo '#line 8398 "configure"' > conftest.$ac_ext -+ echo '#line 8392 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -9067,7 +9061,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5 --echo $ECHO_N "checking for $dir/lib in LIBS... $ECHO_C" >&6 -- if test -d $dir/lib 2> /dev/null ; then -- addlib $dir/lib -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- fi -- -- echo "$as_me:$LINENO: checking for $dir/include in INCPATH" >&5 --echo $ECHO_N "checking for $dir/include in INCPATH... $ECHO_C" >&6 -- if test -d $dir/include 2>/dev/null ; then -- if "$dir" != "/usr/local" ; then -- INCPATH="$INCPATH -I$dir/include" -- fi -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- fi --done - - echo "$as_me:$LINENO: checking for /usr/ucblib in LIBS" >&5 - echo $ECHO_N "checking for /usr/ucblib in LIBS... $ECHO_C" >&6 -@@ -12051,7 +12007,7 @@ - #define HAVE_LIBBEECRYPT 1 - _ACEOF - -- WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt" -+ WITH_BEECRYPT_INCLUDE="" - WITH_BEECRYPT_LIB="-lbeecrypt" - - fi -@@ -12647,287 +12603,13 @@ - - - -- -- -- --for ac_header in thread.h pthread.h synch.h semaphore.h --do --as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --if eval "test \"\${$as_ac_Header+set}\" = set"; then -- echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 --if eval "test \"\${$as_ac_Header+set}\" = set"; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking $ac_header usability" >&5 --echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking $ac_header presence" >&5 --echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include <$ac_header> --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; -- no:yes ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 --echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 --if eval "test \"\${$as_ac_Header+set}\" = set"; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- eval "$as_ac_Header=$ac_header_preproc" --fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -- --fi --if test `eval echo '${'$as_ac_Header'}'` = yes; then -- cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- -- --echo "$as_me:$LINENO: checking for pthread_mutex_trylock in -lpthread" >&5 --echo $ECHO_N "checking for pthread_mutex_trylock in -lpthread... $ECHO_C" >&6 --if test "${ac_cv_lib_pthread_pthread_mutex_trylock+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lpthread $LIBS" --cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char pthread_mutex_trylock (); --int --main () --{ --pthread_mutex_trylock (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_pthread_pthread_mutex_trylock=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_pthread_pthread_mutex_trylock=no --fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_trylock" >&5 --echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_trylock" >&6 --if test $ac_cv_lib_pthread_pthread_mutex_trylock = yes; then -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBPTHREAD 1 --_ACEOF -- -- LIBS="-lpthread $LIBS" -- --else -- -- --echo "$as_me:$LINENO: checking for __pthread_mutex_trylock in -lpthread" >&5 --echo $ECHO_N "checking for __pthread_mutex_trylock in -lpthread... $ECHO_C" >&6 --if test "${ac_cv_lib_pthread___pthread_mutex_trylock+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lpthread $LIBS" --cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char __pthread_mutex_trylock (); --int --main () --{ --__pthread_mutex_trylock (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_pthread___pthread_mutex_trylock=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_pthread___pthread_mutex_trylock=no --fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_trylock" >&5 --echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_trylock" >&6 --if test $ac_cv_lib_pthread___pthread_mutex_trylock = yes; then -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBPTHREAD 1 --_ACEOF -- -- LIBS="-lpthread $LIBS" -- --else -- -- --echo "$as_me:$LINENO: checking for mutex_lock in -lthread" >&5 --echo $ECHO_N "checking for mutex_lock in -lthread... $ECHO_C" >&6 --if test "${ac_cv_lib_thread_mutex_lock+set}" = set; then -+echo "$as_me:$LINENO: checking for svc_run in -lnsl" >&5 -+echo $ECHO_N "checking for svc_run in -lnsl... $ECHO_C" >&6 -+if test "${ac_cv_lib_nsl_svc_run+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lthread $LIBS" -+LIBS="-lnsl $LIBS" - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" - /* confdefs.h. */ -@@ -12942,11 +12624,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char mutex_lock (); -+char svc_run (); - int - main () - { --mutex_lock (); -+svc_run (); - ; - return 0; - } -@@ -12963,33 +12645,28 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_lib_thread_mutex_lock=yes -+ ac_cv_lib_nsl_svc_run=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_thread_mutex_lock=no -+ac_cv_lib_nsl_svc_run=no - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_lib_thread_mutex_lock" >&5 --echo "${ECHO_T}$ac_cv_lib_thread_mutex_lock" >&6 --if test $ac_cv_lib_thread_mutex_lock = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_svc_run" >&5 -+echo "${ECHO_T}$ac_cv_lib_nsl_svc_run" >&6 -+if test $ac_cv_lib_nsl_svc_run = yes; then - cat >>confdefs.h <<_ACEOF --#define HAVE_LIBTHREAD 1 -+#define HAVE_LIBNSL 1 - _ACEOF - -- LIBS="-lthread $LIBS" -- --fi -- -+ LIBS="-lnsl $LIBS" - - fi - - --fi -- - - - for ac_header in aio.h -@@ -22911,6 +22588,86 @@ - - else - -+ echo "$as_me:$LINENO: checking for getmntinfo" >&5 -+echo $ECHO_N "checking for getmntinfo... $ECHO_C" >&6 -+if test "${ac_cv_func_getmntinfo+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line $LINENO "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char getmntinfo (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char getmntinfo (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_getmntinfo) || defined (__stub___getmntinfo) -+choke me -+#else -+char (*f) () = getmntinfo; -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+int -+main () -+{ -+return f != getmntinfo; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_func_getmntinfo=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_func_getmntinfo=no -+fi -+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_func_getmntinfo" >&5 -+echo "${ECHO_T}$ac_cv_func_getmntinfo" >&6 -+if test $ac_cv_func_getmntinfo = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_GETMNTINFO 1 -+_ACEOF -+ -+else -+ - echo "$as_me:$LINENO: checking for mntctl" >&5 - echo $ECHO_N "checking for mntctl... $ECHO_C" >&6 - if test "${ac_cv_func_mntctl+set}" = set; then -@@ -23148,6 +22905,8 @@ - - fi - -+fi -+ - - echo "$as_me:$LINENO: checking for lchown" >&5 - echo $ECHO_N "checking for lchown... $ECHO_C" >&6 -@@ -23454,9 +23213,6 @@ - fi - - MARK64= --case "${target_cpu}" in --x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;; --esac - - - autorelocate_path='%{nil}' -@@ -23515,7 +23271,7 @@ - - LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" - --RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" -+RPMCONFIGDIR="@l_prefix@/lib/openpkg" - - cat >>confdefs.h <<_ACEOF - #define RPMCONFIGDIR "$RPMCONFIGDIR" -@@ -23523,7 +23279,7 @@ - - - --SYSCONFIGDIR="`echo /etc/rpm`" -+SYSCONFIGDIR="@l_prefix@/etc/openpkg" - - cat >>confdefs.h <<_ACEOF - #define SYSCONFIGDIR "$SYSCONFIGDIR" -@@ -23539,7 +23295,7 @@ - - - --LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc" -+LIBRPMRC_FILENAME="${SYSCONFIGDIR}/rpmrc" - - cat >>confdefs.h <<_ACEOF - #define LIBRPMRC_FILENAME "$LIBRPMRC_FILENAME" -@@ -23547,7 +23303,7 @@ - - - --VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc" -+VENDORRPMRC_FILENAME="${SYSCONFIGDIR}/${RPMCANONVENDOR}/rpmrc" - - cat >>confdefs.h <<_ACEOF - #define VENDORRPMRC_FILENAME "$VENDORRPMRC_FILENAME" -@@ -23555,7 +23311,7 @@ - - - --LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}" -+LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt" - - cat >>confdefs.h <<_ACEOF - #define LIBRPMALIAS_FILENAME "$LIBRPMALIAS_FILENAME" -@@ -23588,9 +23344,202 @@ - - - -+echo "$as_me:$LINENO: checking for uint8_t" >&5 -+echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6 -+if test "${ac_cv_type_uint8_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line $LINENO "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_STDINT_H -+#include -+#endif -+#include -+#if STDC_HEADERS -+#include -+#include -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "(^|[^a-zA-Z_0-9])uint8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ ac_cv_type_uint8_t=yes -+else -+ ac_cv_type_uint8_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5 -+echo "${ECHO_T}$ac_cv_type_uint8_t" >&6 -+if test $ac_cv_type_uint8_t = no; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define uint8_t unsigned char -+_ACEOF -+ -+fi -+echo "$as_me:$LINENO: checking for uint16_t" >&5 -+echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6 -+if test "${ac_cv_type_uint16_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line $LINENO "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_STDINT_H -+#include -+#endif -+#include -+#if STDC_HEADERS -+#include -+#include -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "(^|[^a-zA-Z_0-9])uint16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ ac_cv_type_uint16_t=yes -+else -+ ac_cv_type_uint16_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 -+echo "${ECHO_T}$ac_cv_type_uint16_t" >&6 -+if test $ac_cv_type_uint16_t = no; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define uint16_t unsigned short -+_ACEOF -+ -+fi -+echo "$as_me:$LINENO: checking for uint32_t" >&5 -+echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 -+if test "${ac_cv_type_uint32_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line $LINENO "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_STDINT_H -+#include -+#endif -+#include -+#if STDC_HEADERS -+#include -+#include -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ ac_cv_type_uint32_t=yes -+else -+ ac_cv_type_uint32_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 -+echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 -+if test $ac_cv_type_uint32_t = no; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define uint32_t unsigned int -+_ACEOF -+ -+fi -+ -+echo "$as_me:$LINENO: checking for madvise" >&5 -+echo $ECHO_N "checking for madvise... $ECHO_C" >&6 -+if test "${ac_cv_func_madvise+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line $LINENO "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char madvise (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char madvise (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_madvise) || defined (__stub___madvise) -+choke me -+#else -+char (*f) () = madvise; -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+int -+main () -+{ -+return f != madvise; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_func_madvise=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_func_madvise=no -+fi -+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_func_madvise" >&5 -+echo "${ECHO_T}$ac_cv_func_madvise" >&6 -+ -+ -+ - - --subdirs="$subdirs popt beecrypt zlib elfutils file db3" -+subdirs="$subdirs popt zlib elfutils file db3" - - - 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" -@@ -25157,7 +25106,6 @@ - esac - done ;; - default ) echo timestamp > popt/stamp-h.in -- echo timestamp > beecrypt/stamp-h.in - echo timestamp > stamp-h.in - - ;; - -+--------------------------------------------------------------------------- -| Corresponding patches in "configure" script after regeneration from -| patched "configure.ac" with "autoconf". -+--------------------------------------------------------------------------- -Index: popt/configure ---- popt/configure 16 Jul 2003 17:04:51 -0000 1.1.1.16 -+++ popt/configure 12 May 2004 14:34:35 -0000 1.18 -@@ -9359,9 +9359,6 @@ - - - MARK64= --case "${target_cpu}" in --x86_64*|powerpc64*|ppc64*|sparc64*|s390x*) MARK64=64 ;; --esac - - - diff -r b363f8ef6dcb -r 9b4bbbae3a98 openpkg/rpmrc --- a/openpkg/rpmrc Tue Jul 31 12:27:54 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -## -## rpmrc -- OpenPKG RPM Configuration -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## -## The purpose of this configuration file is to override the -## "macrofiles" directive in the default RPM configuration in order -## to direct RPM to the special macro definitions for the @l_prefix@ -## hierarchy. -## - -# -# Macro Sets -# - -macrofiles: @l_prefix@/lib/openpkg/macros:@l_prefix@/etc/openpkg/rpmmacros:~/.rpmmacros:~/.openpkg/rpmmacros - -# -# CPU Architecture Mappings -# (most important architectures only) -# - -# Intel IA32/IA64 -arch_canon: ix86: ix86 1 -arch_canon: ia64: ia64 9 -arch_compat: ix86: ix86 noarch -buildarch_compat: ix86: ix86 noarch -arch_compat: ia64: ia64 ix86 noarch -buildarch_compat: ia64: ia64 ix86 noarch - -# AMD/Intel AMD64/EM64T -arch_canon: amd64: amd64 2 -arch_compat: amd64: amd64 ix86 noarch -buildarch_compat: amd64: amd64 ix86 noarch - -# Sun SPARC -arch_canon: sparc: sparc 3 -arch_canon: sparc64: sparc64 3 -arch_compat: sparc: sparc noarch -buildarch_compat: sparc: sparc noarch -arch_compat: sparc64: sparc64 sparc noarch -buildarch_compat: sparc64: sparc64 sparc noarch - -# HP PA-RISC -arch_canon: hppa: hppa 4 -arch_compat: hppa: hppa noarch -buildarch_compat: hppa: hppa noarch - -# IBM PowerPC -arch_canon: ppc: ppc 5 -arch_compat: ppc: ppc noarch -buildarch_compat: ppc: ppc noarch - -# -# Operating System Mappings -# (currently intentionally left out to avoid any magic) -# -