# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231281639 -3600 # Node ID cb59d6afeb61e699f7380f0ff8061fdf43c1c1ec # Parent 333964c621f1734563dbd8cb189e3d23aa8cbe1a Import package vendor original specs for necessary manipulations. diff -r 333964c621f1 -r cb59d6afeb61 dhcpd/dhcpd.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcpd/dhcpd.conf Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,88 @@ +## +## dhcpd.conf -- ISC DHCP Daemon Configuration +## + +# Options applicable to all subnets +option domain-name "example.com"; +authoritative; +default-lease-time 600; +max-lease-time 7200; +ddns-update-style none; +use-host-decl-names on; + +# Define some non-standard options +option freebsd-swappath code 128 = text; +option freebsd-rootopts code 130 = text; +option freebsd-swapopts code 131 = text; + +# Test drive using loopback +subnet 127.0.0.0 netmask 255.0.0.0 { +} + +# Define a particular sample subnet +subnet 192.168.1.0 netmask 255.255.255.0 { + + # Options applicable to this particular subnet + option broadcast-address 192.168.1.255; + option subnet-mask 255.255.255.0; + option routers 192.168.1.1; + option domain-name-servers 192.168.1.2; + + # Dynamic DNS (DDNS) Updating + ddns-updates off; + ddns-domainname "example.com"; + ddns-rev-domainname "in-addr.arpa"; + + # Pool of known clients (i.e. MAC known but IP not specified) + pool { + range 192.168.1.100 192.168.1.149; + min-lease-time 600; # 10min + default-lease-time 43200; # 12hour + max-lease-time 86400; # 24hour + deny unknown clients; + } + + # Pool of unknown clients (i.e. MAC not known) + pool { + range 192.168.1.150 192.168.1.199; + min-lease-time 300; # 5min + default-lease-time 3600; # 1hour + max-lease-time 10800; # 3hour + allow unknown clients; + } +} + +# The list of clients we explicitly configure +group { + # Just assign a fixed IP address for machine "quux1" + host quux1 { + hardware ethernet 01:02:03:00:00:01; + fixed-address 192.168.1.3; + } + + # Provide full boot information for a FreeBSD diskless client "quux2": + # On the server, create a 32MB swapfile /dlc/fs/swap/swap.192.168.1.4 + # with `dd if=/dev/zero of=swap.192.168.1.4 bs=1m count=32' and the + # filesystem /dlc/fs/quux2 with `cd /usr/src; make buildworld; make + # installworld DESTDIR=/dlc/fs/quux2'. Then use Etherboot for booting. + host quux2 { + hardware ethernet 01:02:03:00:00:02; + fixed-address 192.168.1.4; + next-server 192.168.1.2; + option tftp-server-name "192.168.1.2"; + filename "kernel.quux"; + always-reply-rfc1048 on; + option root-path "192.168.1.2:/dlc/fs/quux2"; + option freebsd-rootopts "rw,noatime"; + option swap-server 192.168.1.2; + option freebsd-swappath "192.168.1.2:/dlc/fs/swap"; + option freebsd-swapopts "sw"; + } +} + +# The list of clients we know, but which get IP addresses from pool +group { + host quux3 { hardware ethernet 01:02:03:00:00:03; } + host quux4 { hardware ethernet 01:02:03:00:00:04; } +} + diff -r 333964c621f1 -r cb59d6afeb61 dhcpd/dhcpd.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcpd/dhcpd.spec Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,164 @@ +## +## dhcpd.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## 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. +## + +# package information +Name: dhcpd +Summary: DHCP Daemon +URL: http://www.isc.org/products/DHCP/ +Vendor: Internet Software Consortium +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: DHCP +License: ISC/BSD +Version: 4.1.0 +Release: 20081220 + +# package options +%option with_fsl yes + +# list of sources +Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz +Source1: dhcpd.conf +Source2: rc.dhcpd +Source3: fsl.dhcpd + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823 +PreReq: OpenPKG, openpkg >= 20060823 +%if "%{with_fsl}" == "yes" +BuildPreReq: fsl +PreReq: fsl +%endif +AutoReq: no +AutoReqProv: no + +%description + This is the ISC DHCP daemon reference implementation. + +%track + prog dhcpd = { + version = %{version} + url = ftp://ftp.isc.org/isc/dhcp/ + regex = dhcp-(\d+\.\d+\.\d+)\.tar\.gz + } + +%prep + %setup -q -n dhcp-%{version} + +%build + # configure program + %{l_shtool} subst \ + -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_PID[^"]*\).*;\1 "%{l_prefix}/var/dhcpd/run/dhcpd.pid";' \ + -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_DB[^"]*\).*;\1 "%{l_prefix}/var/dhcpd/db/dhcpd.leases";' \ + -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_CONF[^"]*\).*;\1 "%{l_prefix}/etc/dhcpd/dhcpd.conf";' \ + includes/site.h + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags} -DNOMINUM" \ + LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ + LIBS="%{l_fsl_libs}" \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ + --sysconfdir=%{l_prefix}/etc/dhcpd \ + --localstatedir=%{l_prefix}/var/dhcpd \ + --with-srv-lease-file=%{l_prefix}/var/dhcpd/db/dhcpd.leases \ + --with-cli-lease-file=%{l_prefix}/var/dhcpd/db/dhclient.leases \ + --with-srv-pid-file=%{l_prefix}/var/dhcpd/run/dhcpd.pid \ + --with-cli-pid-file=%{l_prefix}/var/dhcpd/run/dhclient.pid \ + --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid + + # build program + %{l_make} %{l_mflags} + +%install + # install program + rm -rf $RPM_BUILD_ROOT + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + + # install default configuration + %{l_shtool} install -c -m 644 \ + %{SOURCE dhcpd.conf} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/dhcpd/dhcpd.conf + + # post-adjust and strip down installation + rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/dhclient-script + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/dhclient-script.8 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true + + # install run-command script + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d + %{l_shtool} install -c -m 755 %{l_value -s -a} \ + %{SOURCE rc.dhcpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + + # install OSSP fsl configuration + %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE fsl.dhcpd} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ + + # create run-time directories + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/var/dhcpd/db \ + $RPM_BUILD_ROOT%{l_prefix}/var/dhcpd/run \ + $RPM_BUILD_ROOT%{l_prefix}/var/dhcpd/log + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/etc/fsl/fsl.dhcpd' \ + '%config %{l_prefix}/etc/dhcpd/*' + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + +%post + if [ $1 -eq 1 ]; then + # display final hints on initial installation + ( echo "Before starting DHCP daemon, please set the configuration variable" + echo "\"dhcpd_if\" in $RPM_INSTALL_PREFIX/etc/rc.conf to the name of the" + echo "used network interface." + ) | %{l_rpmtool} msg -b -t notice + fi + + # after upgrade, restart service + [ $1 -eq 2 ] || exit 0 + eval `%{l_rc} dhcpd status 2>/dev/null` + [ ".$dhcpd_active" = .yes ] && %{l_rc} dhcpd restart + exit 0 + +%preun + # before erase, stop service and remove log files + [ $1 -eq 0 ] || exit 0 + %{l_rc} dhcpd stop 2>/dev/null + rm -f $RPM_INSTALL_PREFIX/var/dhcpd/db/* >/dev/null 2>&1 || true + rm -f $RPM_INSTALL_PREFIX/var/dhcpd/run/* >/dev/null 2>&1 || true + exit 0 + diff -r 333964c621f1 -r cb59d6afeb61 dhcpd/fsl.dhcpd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcpd/fsl.dhcpd Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,52 @@ +## +## fsl.dhcpd -- OSSP fsl configuration +## + +ident (dhcpd.*)/.+ q{ + prefix( + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " + ) + -> { + debug: file( + path="@l_prefix@/var/dhcpd/log/dhcpd.log", + perm=0644 + ) + } +}; + +ident (dhclient.*)/.+ q{ + prefix( + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " + ) + -> { + debug: file( + path="@l_prefix@/var/dhcpd/log/dhclient.log", + perm=0644 + ) + } +}; + +ident (dhrelay.*)/.+ q{ + prefix( + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " + ) + -> { + debug: file( + path="@l_prefix@/var/dhcpd/log/dhrelay.log", + perm=0644 + ) + } +}; + +ident (omshell.*)/.+ q{ + prefix( + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " + ) + -> { + debug: file( + path="@l_prefix@/var/dhcpd/log/omshell.log", + perm=0644 + ) + } +}; + diff -r 333964c621f1 -r cb59d6afeb61 dhcpd/rc.dhcpd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcpd/rc.dhcpd Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,91 @@ +#!@l_prefix@/bin/openpkg rc +## +## rc.dhcpd -- Run-Commands +## + +%config + dhcpd_enable="$openpkg_rc_def" + dhcpd_flags="-q" + dhcpd_if="" + dhcpd_port="67" + dhcpd_log_prolog="true" + dhcpd_log_epilog="true" + dhcpd_log_numfiles="10" + dhcpd_log_minsize="1M" + dhcpd_log_complevel="9" + +%common + dhcpd_pidfile="@l_prefix@/var/dhcpd/run/dhcpd.pid" + dhcpd_leases="@l_prefix@/var/dhcpd/db/dhcpd.leases" + dhcpd_signal () { + [ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile` + } + dhcpd_start () { + if [ ! -f $dhcpd_leases ]; then + touch $dhcpd_leases + chmod 644 $dhcpd_leases + chown @l_susr@:@l_mgrp@ $dhcpd_leases + fi + local cmd="@l_prefix@/sbin/dhcpd" + cmd="$cmd $dhcpd_flags" + echo ".$dhcpd_flags" | grep -- -p >/dev/null 2>&1 + if [ $? -ne 0 -a ".$dhcpd_port" != . ]; then + cmd="$cmd -p $dhcpd_port" + fi + if [ $# -gt 0 ]; then + cmd="$cmd $@" + fi + cmd="$cmd >/dev/null 2>&1" + eval $cmd + } + +%status -u @l_susr@ -o + dhcpd_usable="unknown" + dhcpd_active="no" + dhcpd_start -q -t || dhcpd_usable="no" + [ ".$dhcpd_if" = . ] && dhcpd_usable="no" + rcService dhcpd enable yes && \ + dhcpd_signal 0 && dhcpd_active="yes" + echo "dhcpd_enable=\"$dhcpd_enable\"" + echo "dhcpd_usable=\"$dhcpd_usable\"" + echo "dhcpd_active=\"$dhcpd_active\"" + +%start -u @l_susr@ + rcService dhcpd enable yes || exit 0 + rcService dhcpd usable no && exit 0 + rcService dhcpd active yes && exit 0 + dhcpd_start $dhcpd_if + +%stop -u @l_susr@ + rcService dhcpd enable yes || exit 0 + rcService dhcpd active no && exit 0 + dhcpd_signal TERM + sleep 2 + rm -f $dhcpd_pidfile 2>/dev/null || true + +%restart -u @l_susr@ + rcService dhcpd enable yes || exit 0 + rcService dhcpd active no && exit 0 + rc dhcpd stop start + +%reload -u @l_susr@ + rcService dhcpd enable yes || exit 0 + dhcpd_signal HUP + +%daily -u @l_susr@ + rcService dhcpd enable yes || exit 0 + rcTmp -i + hintfile=`rcTmp -f -n hint` + for tool in dhcpd dhclient dhrelay omshell; do + shtool rotate -f \ + -n $dhcpd_log_numfiles -s $dhcpd_log_minsize -d \ + -z $dhcpd_log_complevel -m 644 -o @l_susr@ -g @l_mgrp@ \ + -P "$dhcpd_log_prolog" \ + -E "$dhcpd_log_epilog; echo 1 >$hintfile" \ + @l_prefix@/var/dhcpd/log/$tool.log + done + if [ -s $hintfile ]; then + rc dhcpd restart + fi + rcTmp -k + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/HISTORY --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/HISTORY Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,692 @@ + +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 333964c621f1 -r cb59d6afeb61 openpkg/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/README Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,189 @@ + + OpenPKG Boostrap Package Source Tree + ==================================== + + This is the source code tree for the OpenPKG bootstrap package. What + you find here is rather complex and tricky stuff, so don't be confused + if you don't understand everything immediately. + + The Files + --------- + + README .................. this file ;-) + HISTORY ................. change history tracking of this package + + openpkg.spec ............ the regular build procedure + openpkg.boot ............ the bootstrapping procedure + + gzip-*.tar .............. untouched distribution tarball of the GNU gzip tool + make-*.tar.gz ........... untouched distribution tarball of the GNU make tool + patch-*.tar.gz .......... untouched distribution tarball of the GNU patch tool + bash-*.tar.gz ........... untouched distribution tarball of the GNU bash tool + tar-*.tar.gz ............ untouched distribution tarball of the GNU tar tool + uuid-*.tar.gz ........... untouched distribution tarball of the OSSP uuid tool + curl-*.tar.gz ........... untouched distribution tarball of the cURL tool + bzip2-*.tar.gz .......... untouched distribution tarball of the BZIP2 library + zlib-*.tar.gz ........... untouched distribution tarball of the ZLIB library + beecrypt-*.tar.gz ....... untouched distribution tarball of the BeeCrypt library + rpm-*.tar.gz ............ untouched distribution tarball of the RPM tool + config-*.tar.gz ......... untouched distribution tarball of the GNU config scripts + openpkg-registry-*.tar.gz untouched distribution tarball of the OpenPKG Registry + openpkg-tools-*.tar.gz .. untouched distribution tarball of the OpenPKG Tool Chain + openssl-*.tar.gz ........ untouched distribution tarball of the OpenSSL toolkit + perl-*-mini.tar.gz ...... stripped down distribution tarball of the Perl tool + + make.patch .............. patch for GNU make + bash.patch .............. patch for GNU bash + tar.patch ............... patch for GNU tar + beecrypt.patch .......... patch for BeeCrypt + openssl.patch ........... patch for OpenSSL + perl.patch .............. patch for Perl + gzip.c .................. replacement file for GNU gzip + rpm.patch.bugfix ........ patch for RPM (bugfixing parts) + rpm.patch.feature ....... patch for RPM (new features parts) + rpm.patch.porting ....... patch for RPM (portability enhancement parts) + rpm.patch.regen ......... patch for RPM (re-generated files parts) + + rpmpopt ................. replacements/extensions for RPM's POPT configuration + rpmmacros ............... replacements/extensions for RPM's macros + rpmrc ................... replacements for RPM's run-command configuration + + root.README ............. the source for installed /README + local.README ............ the source for installed /local/README + dot.bashrc .............. the source for installed /.bashrc + dot.bash_login .......... the source for installed /.bash_login + dot.lsyncrc ............. the source for installed /local/.lsyncrc + + openpkg.c ............... the OpenPKG frontend (set-uid wrapper) + openpkg.sh .............. the OpenPKG frontend (main script) + openpkg.pod ............. the OpenPKG frontend manual page (source) + openpkg.1 ............... the OpenPKG frontend manual page (pre-generated output) + + rc ...................... the OpenPKG run-command handling script + rc.func ................. the OpenPKG run-command function definitions + rc.conf ................. the OpenPKG run-command configuration template + rc.openpkg .............. the OpenPKG run-command script for the bootstrap package + rc.pod .................. the OpenPKG run-command script manual page (source) + rc.8 .................... the OpenPKG run-command script manual page (pre-generated output) + + release.sh .............. the OpenPKG release information utility script + release.pod ............. the OpenPKG release information utility manual page (source) + release.8 ............... the OpenPKG release information utility manual page (pre-generated output) + + uuid.sh ................. the OpenPKG UUID management utility script + uuid.pod ................ the OpenPKG UUID management utility manual page (source) + uuid.8 .................. the OpenPKG UUID management utility manual page (pre-generated output) + + rpmdb ................... the OpenPKG RPM database management utility + + rpmtool ................. the rpmtool tool (program source) + rpmtool.8 ............... the rpmtool tool (manual page) + rpmtool.pod ............. the rpmtool tool (manual page source) + shtool .................. the portable shell tool (GNU shtool) + + rpm-config.sh ........... the RPM C API helper script + rpm-config.pod .......... the RPM C API helper manual page (source) + rpm-config.8 ............ the RPM C API helper manual page (pre-generated output) + + lsync ................... the lsync tool (program source) + lsync.8 ................. the lsync tool (manual page) + lsync.pod ............... the lsync tool (manual page source) + + aux.usrgrp.sh ........... user/group name/id determination script + aux.prereq.sh ........... prerequisite checking script + aux.wrapsrc.sh .......... wrapper script for generating openpkg-V-R.src.sh + aux.wrapbin.sh .......... wrapper script for generating openpkg-V-R.P-L.sh + + pod2man.sh .............. helper script for pre-generating manual page outputs + man.sh .................. helper script for "openpkg man" command + install.sh .............. helper script for "openpkg install" command + + openpkg.org.pgp ......... the OpenPGP public key "OpenPKG " + openpkg.com.pgp ......... the OpenPGP public key "OpenPKG GmbH " + openpkg.net.pgp ......... the OpenPGP public key "OpenPKG Foundation e.V. " + + The Bootstrapping Procedure + --------------------------- + + The complexity of this OpenPKG RPM package results from the fact that + we force us to treat this bootstrapping package equal to every other + regular OpenPKG RPM package. First, this implies that the packaging + tool RPM is packaged with itself as an OpenPKG RPM package (means: its + build procedure is a real RPM .spec file and it can be installed and + upgraded through a binary or source RPM). Second, RPM is installed + into the same filesystem hierarchy as all other packages. Third, RPM + manages its own files. The reason for this approach should be obvious: + 100% consistency for the whole OpenPKG software packaging facility! + + The drawback is that this package requires a very tricky bootstrapping + procedure which had cost a lot of time to figure out and establish. If + you ever wanted to know the gory details, here they are... + + The first step was that we wrote the regular openpkg.spec file for + building the bootstrap package with OpenPKG RPM under the assumption + that OpenPKG RPM is already available. This way we can provide OpenPKG + RPM as an RPM package. Just remains the problem how we actually + bootstrap in case where OpenPKG RPM is still not available, i.e., + when we reach a new platform and have to build the package from + scratch. Here the "openpkg.boot" script comes into play. It executes + the "openpkg.spec" build procedure very similar to the way the real + OpenPKG RPM would do ("openpkg rpm -bb"). That is, "openpkg.boot" + partly emulates OpenPKG RPM -- just enough that "openpkg.spec" works. + As a result, "openpkg.spec" cannot use any fancy OpenPKG RPM features + or other things before "openpkg.boot" is able to emulate it, of + course. + + After "openpkg.boot" executed the "%prep", "%build" and "%install" + scripts of "openpkg.spec", there is a fresh version of the target + filesystem hierarchy staying under a temporary "build root". The + "openpkg.boot" script then creates a very special temporary "openpkg + rpm" command which allows the installed "openpkg rpm" command inside + the "build root" to work (although it is built for the final target + filesystem path). Then the $RPM_BOOT variable is set and the package + is _again_ build via "openpkg.spec" -- but this time with the real + OpenPKG RPM. To avoid unneccessary re-compilation, the "openpkg.spec" + skips "%prep", "%build" and "%install" sections if $RPM_BOOT is + defined. So, on this second build phase, only the "%files" section is + executed, i.e., a binary OpenPKG RPM package "openpkg-V-R.P-T.rpm" + is rolled from the files in the "build root". Additionally, a source + OpenPKG RPM package "openpkg-V-R.src.rpm" is rolled for consistency + reasons. + + Finally, we override the installation in the "build root" + again by installing the now rolled binary OpenPKG RPM package + "openpkg-V-R.P-T.rpm" by using the real OpenPKG RPM. This way + we achieve that OpenPKG RPM is remembered as a real OpenPKG RPM + package in the RPM database. We just have to make sure the package + is still relocated to the "build root" while installing. For this + we could use "--prefix=$RPM_BUILD_ROOT%{l_prefix}", but this would + create an incorrect file list for the package "openpkg" in the RPM + database. Instead we use the tricky "--justdb" option for "openpkg + rpm" which means "openpkg rpm" behaves as it would install into the + real location, but does not actually install anything. But as a + side-effect, the database inside the "build root" is now correct. + + After this procedure, the "build root" contains the target filesystem + hierarchy with OpenPKG RPM installed with itself. What is now just + remaining is to roll a bootstrap package "openpkg" with this stuff for + initial installation without OpenPKG RPM. For this the "build root" + is packed into a "tarball", compressed, again wrapped into another + tarball together with the uncompression tools ("bzip2" and "tar"), + and finally wrapped into a self-extracting shell script by appending + "aux.wrapbin.sh" (padded to 64KB for easier unpacking of the attached + tarball) to its front. + + The result is the binary bootstrap script "openpkg-V-R.P-T.sh" which + can be used to install the target hierarchy from scratch without any + pre-installed OpenPKG RPM. Nevetheless, the installed target hierarchy + looks _exactly_ as it would have been installed with OpenPKG RPM. + If one later wants to upgrade this hierarchy one can just use the + generated (or a newer) "openpkg-V-R.P-T.rpm". + + To allow one to easily repeat this from-source bootstrapping procedure + on other machines, one can run "./openpkg.boot -s" which rolls + a "openpkg-V-R.src.sh" script which is a self-extracting script + containing an attached tarball of the sources of this directory. This + script contains the same contents like "openpkg-V-R.src.rpm", but + is intended for running the described bootstrapping procedure from + scratch without any OpenPKG RPM. + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/aux.prereq.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/aux.prereq.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,87 @@ +#!/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 333964c621f1 -r cb59d6afeb61 openpkg/aux.usrgrp.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/aux.usrgrp.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,222 @@ +#!/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 333964c621f1 -r cb59d6afeb61 openpkg/aux.wrapbin.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/aux.wrapbin.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,252 @@ +#!/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 333964c621f1 -r cb59d6afeb61 openpkg/aux.wrapsrc.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/aux.wrapsrc.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,156 @@ +#!/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 333964c621f1 -r cb59d6afeb61 openpkg/bash.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/bash.patch Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,362 @@ +This patch documents two implemented and classical command +line options "-v" and "-x". It is derived from Debian GNU/Linux. + +Index: doc/bash.1 +--- doc/bash.1.orig 2004-07-12 17:27:08 +0200 ++++ doc/bash.1 2004-07-27 19:47:10 +0200 +@@ -116,6 +116,12 @@ + This option allows the positional parameters to be set + when invoking an interactive shell. + .TP ++.B \-v ++Print shell input lines as they are read. ++.TP ++.B \-x ++Print commands and their arguments as they are executed. ++.TP + .B \-D + A list of all double-quoted strings preceded by \fB$\fP + is printed on the standard ouput. + +----------------------------------------------------------------------------- + +Port to HP-UX 11i and similar less smart platforms. + +Index: configure +--- configure.orig 2004-07-21 22:18:56 +0200 ++++ configure 2004-07-27 19:47:10 +0200 +@@ -1517,6 +1517,7 @@ + *-beos*) opt_bash_malloc=no ;; # they say it's suitable + *-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment + *-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft ++*-hpux*) opt_bash_malloc=no ;; # HP HP-UX + esac + + # memory scrambling on free() +@@ -1662,7 +1663,7 @@ + + else + MALLOC_LIB= +- MALLOC_LIBRARY= ++ MALLOC_LIBRARY=dummy + MALLOC_LDFLAGS= + MALLOC_DEP= + fi +Index: syntax.h +--- syntax.h.orig 2004-04-15 05:19:36 +0200 ++++ syntax.h 2004-07-27 19:47:10 +0200 +@@ -21,6 +21,8 @@ + #ifndef _SYNTAX_H_ + #define _SYNTAX_H_ + ++#include "config.h" ++ + /* Defines for use by mksyntax.c */ + + #define slashify_in_quotes "\\`$\"\n" + +----------------------------------------------------------------------------- + +This adds the OpenPKG packaging brand. + +Index: version.c +--- version.c.orig 2003-12-19 22:34:02 +0100 ++++ version.c 2004-07-27 19:47:10 +0200 +@@ -77,7 +77,7 @@ + show_shell_version (extended) + int extended; + { +- printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); ++ printf ("GNU bash, version %s (%s) [@l_openpkg_release@]\n", shell_version_string (), MACHTYPE); + if (extended) + printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n")); + } + +----------------------------------------------------------------------------- + +Accumulated vendor patches Bash 3.2 001-005 + +Generated via: + +$ gunzip /tmp/bash.patch +$ popd +$ rm -rf bash-3.2 + +Index: parse.y +--- parse.y.orig 2006-09-19 22:37:21 +0200 ++++ parse.y 2006-12-06 13:32:45 +0100 +@@ -1029,6 +1029,7 @@ + #define PST_CMDTOKEN 0x1000 /* command token OK - unused */ + #define PST_COMPASSIGN 0x2000 /* parsing x=(...) compound assignment */ + #define PST_ASSIGNOK 0x4000 /* assignment statement ok in this context */ ++#define PST_REGEXP 0x8000 /* parsing an ERE/BRE as a single word */ + + /* Initial size to allocate for tokens, and the + amount to grow them by. */ +@@ -2591,6 +2592,9 @@ + return (character); + } + ++ if (parser_state & PST_REGEXP) ++ goto tokword; ++ + /* Shell meta-characters. */ + if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0)) + { +@@ -2698,6 +2702,7 @@ + if MBTEST(character == '-' && (last_read_token == LESS_AND || last_read_token == GREATER_AND)) + return (character); + ++tokword: + /* Okay, if we got this far, we have to read a word. Read one, + and then check it against the known ones. */ + result = read_token_word (character); +@@ -2735,7 +2740,7 @@ + /* itrace("parse_matched_pair: open = %c close = %c", open, close); */ + count = 1; + pass_next_character = backq_backslash = was_dollar = in_comment = 0; +- check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; ++ check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; + + /* RFLAGS is the set of flags we want to pass to recursive calls. */ + rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE); +@@ -3202,8 +3207,11 @@ + if (tok == WORD && test_binop (yylval.word->word)) + op = yylval.word; + #if defined (COND_REGEXP) +- else if (tok == WORD && STREQ (yylval.word->word,"=~")) +- op = yylval.word; ++ else if (tok == WORD && STREQ (yylval.word->word, "=~")) ++ { ++ op = yylval.word; ++ parser_state |= PST_REGEXP; ++ } + #endif + else if (tok == '<' || tok == '>') + op = make_word_from_token (tok); /* ( */ +@@ -3234,6 +3242,7 @@ + + /* rhs */ + tok = read_token (READ); ++ parser_state &= ~PST_REGEXP; + if (tok == WORD) + { + tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); +@@ -3419,9 +3428,34 @@ + goto next_character; + } + ++#ifdef COND_REGEXP ++ /* When parsing a regexp as a single word inside a conditional command, ++ we need to special-case characters special to both the shell and ++ regular expressions. Right now, that is only '(' and '|'. */ /*)*/ ++ if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/ ++ { ++ if (character == '|') ++ goto got_character; ++ ++ push_delimiter (dstack, character); ++ ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0); ++ pop_delimiter (dstack); ++ if (ttok == &matched_pair_error) ++ return -1; /* Bail immediately. */ ++ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, ++ token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); ++ token[token_index++] = character; ++ strcpy (token + token_index, ttok); ++ token_index += ttoklen; ++ FREE (ttok); ++ dollar_present = all_digit_token = 0; ++ goto next_character; ++ } ++#endif /* COND_REGEXP */ ++ + #ifdef EXTENDED_GLOB + /* Parse a ksh-style extended pattern matching specification. */ +- if (extended_glob && PATTERN_CHAR (character)) ++ if MBTEST(extended_glob && PATTERN_CHAR (character)) + { + peek_char = shell_getc (1); + if MBTEST(peek_char == '(') /* ) */ +Index: patchlevel.h +--- patchlevel.h.orig 2006-04-13 14:31:04 +0200 ++++ patchlevel.h 2006-12-06 13:32:45 +0100 +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 0 ++#define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ +Index: subst.c +--- subst.c.orig 2006-09-19 14:35:09 +0200 ++++ subst.c 2006-12-06 13:32:45 +0100 +@@ -5707,6 +5707,11 @@ + vtype &= ~VT_STARSUB; + + mflags = 0; ++ if (patsub && *patsub == '/') ++ { ++ mflags |= MATCH_GLOBREP; ++ patsub++; ++ } + + /* Malloc this because expand_string_if_necessary or one of the expansion + functions in its call chain may free it on a substitution error. */ +@@ -5741,13 +5746,12 @@ + } + + /* ksh93 doesn't allow the match specifier to be a part of the expanded +- pattern. This is an extension. */ ++ pattern. This is an extension. Make sure we don't anchor the pattern ++ at the beginning or end of the string if we're doing global replacement, ++ though. */ + p = pat; +- if (pat && pat[0] == '/') +- { +- mflags |= MATCH_GLOBREP|MATCH_ANY; +- p++; +- } ++ if (mflags & MATCH_GLOBREP) ++ mflags |= MATCH_ANY; + else if (pat && pat[0] == '#') + { + mflags |= MATCH_BEG; +Index: y.tab.c +--- y.tab.c.orig 2006-09-25 14:15:16 +0200 ++++ y.tab.c 2006-12-06 13:39:36 +0100 +@@ -2359,6 +2359,7 @@ + #define PST_CMDTOKEN 0x1000 /* command token OK - unused */ + #define PST_COMPASSIGN 0x2000 /* parsing x=(...) compound assignment */ + #define PST_ASSIGNOK 0x4000 /* assignment statement ok in this context */ ++#define PST_REGEXP 0x8000 /* parsing an ERE/BRE as a single word */ + + /* Initial size to allocate for tokens, and the + amount to grow them by. */ +@@ -3921,6 +3922,9 @@ + return (character); + } + ++ if (parser_state & PST_REGEXP) ++ goto tokword; ++ + /* Shell meta-characters. */ + if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0)) + { +@@ -4028,6 +4032,7 @@ + if MBTEST(character == '-' && (last_read_token == LESS_AND || last_read_token == GREATER_AND)) + return (character); + ++tokword: + /* Okay, if we got this far, we have to read a word. Read one, + and then check it against the known ones. */ + result = read_token_word (character); +@@ -4065,7 +4070,7 @@ + /* itrace("parse_matched_pair: open = %c close = %c", open, close); */ + count = 1; + pass_next_character = backq_backslash = was_dollar = in_comment = 0; +- check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; ++ check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; + + /* RFLAGS is the set of flags we want to pass to recursive calls. */ + rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE); +@@ -4532,8 +4537,11 @@ + if (tok == WORD && test_binop (yylval.word->word)) + op = yylval.word; + #if defined (COND_REGEXP) +- else if (tok == WORD && STREQ (yylval.word->word,"=~")) +- op = yylval.word; ++ else if (tok == WORD && STREQ (yylval.word->word, "=~")) ++ { ++ op = yylval.word; ++ parser_state |= PST_REGEXP; ++ } + #endif + else if (tok == '<' || tok == '>') + op = make_word_from_token (tok); /* ( */ +@@ -4564,6 +4572,7 @@ + + /* rhs */ + tok = read_token (READ); ++ parser_state &= ~PST_REGEXP; + if (tok == WORD) + { + tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); +@@ -4749,9 +4758,34 @@ + goto next_character; + } + ++#ifdef COND_REGEXP ++ /* When parsing a regexp as a single word inside a conditional command, ++ we need to special-case characters special to both the shell and ++ regular expressions. Right now, that is only '(' and '|'. */ /*)*/ ++ if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/ ++ { ++ if (character == '|') ++ goto got_character; ++ ++ push_delimiter (dstack, character); ++ ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0); ++ pop_delimiter (dstack); ++ if (ttok == &matched_pair_error) ++ return -1; /* Bail immediately. */ ++ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, ++ token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); ++ token[token_index++] = character; ++ strcpy (token + token_index, ttok); ++ token_index += ttoklen; ++ FREE (ttok); ++ dollar_present = all_digit_token = 0; ++ goto next_character; ++ } ++#endif /* COND_REGEXP */ ++ + #ifdef EXTENDED_GLOB + /* Parse a ksh-style extended pattern matching specification. */ +- if (extended_glob && PATTERN_CHAR (character)) ++ if MBTEST(extended_glob && PATTERN_CHAR (character)) + { + peek_char = shell_getc (1); + if MBTEST(peek_char == '(') /* ) */ + +----------------------------------------------------------------------------- + +Do not require autoconf. Fixes build on Solaris 10 8/07 u4 on sparc64 + +Index: Makefile.in +--- Makefile.in.orig 2006-08-17 20:03:35 +0200 ++++ Makefile.in 2007-10-15 13:00:34 +0200 +@@ -682,13 +682,9 @@ + stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/config-bot.h + CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status + +-config.status: $(srcdir)/configure ++config.status: + $(SHELL) ./config.status --recheck + +-# comment out for distribution +-$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in +- cd $(srcdir) && autoconf +- + # for chet + reconfig: force + sh $(srcdir)/configure -C diff -r 333964c621f1 -r cb59d6afeb61 openpkg/beecrypt.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/beecrypt.patch Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,62 @@ +Index: gas/aesopt.x86.m4 +--- gas/aesopt.x86.m4.orig 2004-06-13 13:37:23 +0200 ++++ gas/aesopt.x86.m4 2004-07-28 20:02:07 +0200 +@@ -134,6 +134,9 @@ + pxor 6144(%esi,%edx,8),s0 + ') + ++') ++ifdef(`USE_MMX',` ++ + define(`elr',` + movd 0(%ebp),s0 + movd t0,%eax +@@ -253,6 +256,9 @@ + ') + + ++') ++ifdef(`USE_MMX',` ++ + C_FUNCTION_BEGIN(aesEncrypt) + pushl %edi + pushl %esi +@@ -364,6 +370,9 @@ + pxor 6144(%esi,%edx,8),t2 + ') + ++') ++ifdef(`USE_MMX',` ++ + define(`dsft',` + movd $1+ 0(%ebp),s0 + movd t0,%eax +@@ -490,6 +499,9 @@ + pxor t3,s2 + ') + ++') ++ifdef(`USE_MMX',` ++ + define(`dblock',` + sxrk + +Index: gnu.h.in +--- gnu.h.in.orig 2004-12-19 21:18:48 +0100 ++++ gnu.h.in 2005-03-08 19:34:03 +0100 +@@ -48,15 +48,6 @@ + @TYPEDEF_UINT32_T@ + @TYPEDEF_UINT64_T@ + +-#if defined(__GNUC__) +-# if !defined(__GNUC_PREREQ__) +-# define __GNUC_PREREQ__(maj, min) (__GNUC__ > (maj) || __GNUC__ == (maj) && __GNUC_MINOR__ >= (min)) +-# endif +-#else +-# define __GNUC__ 0 +-# define __GNUC_PREREQ__(maj, min) 0 +-#endif +- + /* WARNING: overriding this value is dangerous; some assembler routines + * make assumptions about the size set by the configure script + */ diff -r 333964c621f1 -r cb59d6afeb61 openpkg/dot.bash_login --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/dot.bash_login Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,38 @@ +## +## @l_prefix@/.bash_login -- Local Bash Login Script +## + +# provide user and host information in default prompt +PS1="\u@\h\$ " + +# environment permissions +umask 022 +ulimit -c 16384 + +# history functionality +shopt -s histappend +HISTSIZE=100 +HISTFILESIZE=100 + +# various additional variables +export TMPDIR=/tmp +export BLOCKSIZE=1024 + +# activate the bootstrapping Bourne-Shell +# environment of the OpenPKG hierarchy +eval `@l_prefix@/bin/openpkg rc --eval openpkg env` + +# make sure some non-standard but usually +# important executable directories are active +test -d /usr/ccs/bin && PATH="$PATH:/usr/ccs/bin" +test -d /usr/local/bin && PATH="$PATH:/usr/local/bin" + +# initially adjust $PWD to symbolic path +cd $HOME + +# path to bash environment init script +BASH_ENV=$HOME/.bashrc + +# source the standard environment script +. $BASH_ENV + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/dot.bashrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/dot.bashrc Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,4 @@ +## +## @l_prefix@/.bashrc -- Local Bash Profile +## + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/dot.lsyncrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/dot.lsyncrc Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,1 @@ +--root=@l_prefix@/local diff -r 333964c621f1 -r cb59d6afeb61 openpkg/install.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/install.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,45 @@ +#!@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 333964c621f1 -r cb59d6afeb61 openpkg/local.README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/local.README Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,16 @@ + + This is @l_prefix@/local/, the manually-managed software package hierarchy + inside the OpenPKG software hierarchy @l_prefix@. This filesystem area + contains software which was manually installed under @l_prefix@/local/PKG/ + and activated under @l_prefix@/local/ by running: + + $ @l_prefix@/bin/openpkg lsync + + Use "eval `@l_prefix@/etc/rc --eval all env`" from within a user's + Bourne (Again) Shell startup script (.profile or .bashrc) in + order to activate this hierarchy and all of its packages. + + In case of any questions or problems post to the OpenPKG project + user support mailing list . For more + details about OpenPKG visit http://www.openpkg.org/. + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/lsync --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/lsync Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,339 @@ +#!@l_prefix@/lib/openpkg/bash +## +## lsync -- Access Layer Synchronization Tool +## 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. +## + +## +## filesystem hierarchy configuration +## + +# program name and version/date +progname="lsync" +progvers="1.0.4" +progdate="04-Aug-2001" + +# root directory +# (if empty, .lsyncrc files provide default) +root="" + +# subdirectory where packages are physically installed +pkgdir="PKG" + +# subdirectories which are synchronized between physically +# installed package areas and access layer +subdirs="bin,sbin,man,info,include,lib" + +## +## command line option parsing +## + +# default run-time modes +nop=0 +quiet=0 +trace=0 +help='' +init=0 +uninstall=0 +local=0 + +# be aware of .lsyncrc files +cwd=`pwd` +while [ 1 ]; do + if [ -f "$cwd/.lsyncrc" ]; then + set -- `cat $cwd/.lsyncrc` "$@" + fi + [ ".$cwd" = ./ ] && break + cwd=`echo $cwd | sed -e 's;/[^/]*$;;' -e 's;^$;/;'` +done +if [ ".$HOME" != . -a -f "$HOME/.lsyncrc" ]; then + set -- `cat $HOME/.lsyncrc` "$@" +fi + +# iterate over argument line +for opt +do + case $opt in + -*=*) arg=`echo "$opt" | sed 's/^[-_a-zA-Z0-9]*=//'` ;; + *) arg='' ;; + esac + case $opt in + -n|--nop ) nop=1 ;; + -q|--quiet ) quiet=1 ;; + -t|--trace ) trace=1 ;; + -v|--version ) version=1 ;; + -h|--help ) help="Usage" ;; + -i|--init ) init=1 ;; + -u|--uninstall ) uninstall=1 ;; + -l|--local ) local=1 ;; + --root=* ) root=$arg ;; + --pkgdir=* ) pkgdir=$arg ;; + --subdirs=* ) subdirs=$arg ;; + * ) help="Invalid option \`$opt'"; break ;; + esac +done + +# error or usage message +if [ ".$help" != . ]; then + if [ ".$help" != ".Usage" ]; then + echo "$progname:ERROR: $help" 1>&2 + fi + cat 1>&2 <&2 + echo "$progname:HINT: use --root=DIR option explicitly on command line" 1>&2 + echo "$progname:HINT: or implicitly inside an .lsyncrc file in your home" 1>&2 + echo "$progname:HINT: directory or in any parent directory." 1>&2 + exit 3 +fi + +## +## helper functions +## + +display_hd () { + if [ ".$headline" != . ]; then + if [ ".$quiet" = .0 ]; then + echo "$headline" + fi + headline='' + fi +} + +display_op () { + if [ ".$quiet" = .0 ]; then + echo " $@" + fi +} + +display_warning () { + echo "$progname:WARNING: $*" 1>&2 +} + +display_error () { + echo "$progname:ERROR: $*" 1>&2 +} + +perform_op () { + if [ ".$trace" = .1 ]; then + echo " \$ $@" + fi + if [ ".$nop" = .0 ]; then + eval "$@" + fi +} + +## +## main processing +## + +# extend a "man" subdir to a complete list with subdirs +# in order to avoid special cases in the loop processing +manex='' +if [ ".$init" = .1 ]; then + manex='man' +fi +for i in 1 2 3 4 5 6 7 8; do + manex="$manex,man/man$i" +done +manex=`echo $manex | sed -e 's;^,;;'` +subdirs=`echo $subdirs | sed -e "s;man;$manex;"` + +# special processing: create initial hierarchy +if [ ".$init" = .1 ]; then + if [ ! -d $root ]; then + echo "creating $root" + perform_op "mkdir $root" || exit 1 + fi + for subdir in $pkgdir `IFS=,; echo $subdirs`; do + if [ ! -d "$root/$subdir" ]; then + echo "creating $root/$subdir" + perform_op "mkdir $root/$subdir" || exit 1 + fi + done + exit 0 +fi + +# make sure the root directory actually exists +if [ ! -d "$root" ]; then + display_warning "root directory \`$root' does not exist" + exit 3 +fi + +# if processing is restricted to a local package area, pre-determine its name +if [ ".$local" = .1 ]; then + realroot=`cd $root; pwd` + realthis=`pwd` + pkgname=`expr "$realthis" : "^$realroot/$pkgdir/\\([^/]*\\).*"` + if [ ".$pkgname" = . ]; then + display_error "you are not staying under a local package sub-directory" + exit 3 + fi +fi + +# now perform the synchronization for each sub-directory... +for subdir in `IFS=,; echo $subdirs`; do + headline="$root/$subdir:" + + # make sure the subdir actually exists in the access layer + if [ ! -d "$root/$subdir" ]; then + display_warning "access layer directory \`$root/$subdir' does not exist" + continue + fi + + # + # PASS 1: remove dangling symbolic links in access layer + # + + # iterate over all symlinks in the access layer subdir + for link in . `ls "$root/$subdir/" | sed -e "s;^$root/$subdir/*;;g"`; do + test ".$link" = ".." && continue + + # determine the target file of the symlink + target=`ls -l "$root/$subdir/$link" 2>/dev/null | sed -e 's;.*-> *;;'` + if [ ".$target" = . ]; then + display_warning "$root/$subdir/$link seems to be not a symbolic link" + continue + fi + + # (optionally) make sure that link target points into local package area + if [ ".$local" = .1 -a .`expr $target : "../$pkgdir/$pkgname/.*"` = .0 ]; then + continue + fi + + # check whether link is valid, i.e., points to + # an existing target file or directory + if [ ".$uninstall" = .1 ] ||\ + [ ! -f "$root/$subdir/$target" -a \ + ! -d "$root/$subdir/$target" ]; then + # target no longer exists, so remove dangling symlink + display_hd + display_op "remove: $link -> $target" + perform_op "rm -f $root/$subdir/$link" + fi + done + + # if we are uninstalling only, our work is now done + if [ ".$uninstall" = ".1" ]; then + continue + fi + + # + # PASS 2: create new symbolic links in access layer + # + + # calculate the corresponding reverse directory for the current subdir + revdir=`echo $subdir | sed -e 's;[^/][^/]*;..;g'` + + # iterate over all package directories + for dir in . `ls "$root/$pkgdir/" | sed -e "s;^$root/$pkgdir/*;;g"`; do + test ".$dir" = ".." && continue + + # (optionally) make sure that we operate only for the local package area + if [ ".$local" = .1 -a ".$dir" != ".$pkgname" ]; then + continue + fi + + # skip all directories with appended version numbers + # in order to support manual versioning of packages + case $dir in + *-[0-9]* ) continue ;; + esac + + # skip if package directory or package sub-directories has sticky bit set + if [ ".`ls -l -d $root/$pkgdir/$dir 2>/dev/null | cut -c10`" = .t ] ||\ + [ ".`ls -l -d $root/$pkgdir/$dir/$subdir 2>/dev/null | cut -c10`" = .t ]; then + continue + fi + + # check whether the processed subdir exists in package area + if [ -d "$root/$pkgdir/$dir/$subdir" ]; then + + # iterate over all files/directories in package's subdir + for file in . `ls "$root/$pkgdir/$dir/$subdir/" |\ + sed -e "s;^$root/$pkgdir/$dir/$subdir/*;;g"`; do + test ".$file" = ".." && continue + + # calculate the access layer symlink target + target="$revdir/$pkgdir/$dir/$subdir/$file" + + # check whether a possibly conflicting symlink exists + exlink=`ls -l $root/$subdir/$file 2>/dev/null` + if [ ".$exlink" != . ]; then + extarget=`echo $exlink | sed -e 's;.*-> *;;'` + if [ ".$extarget" = . ]; then + display_warning "$root/$subdir/$file exits, but seems to be not a symbolic link" + elif [ ".$extarget" != ".$target" ]; then + display_hd + display_op "conflict: $file -> $extarget [existing]" + display_op " $file -> $target [alternative]" + fi + continue + fi + + # create new symlink in access layer + display_hd + display_op "create: $file -> $target" + perform_op "cd $root/$subdir && ln -s $target $file" + done + fi + done +done + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/lsync.8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/lsync.8 Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,340 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "LSYNC 8" +.TH LSYNC 8 "OpenPKG" "LSYNC(8)" "OpenPKG" +.SH "NAME" +\&\fBopenpkg lsync\fR \- Access Layer Synchronization Tool +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBopenpkg lsync\fR +[\fB\-\-version\fR|\fB\-v\fR] +[\fB\-\-help\fR|\fB\-h\fR] +[\fB\-\-init\fR|\fB\-i\fR] +[\fB\-\-nop\fR|\fB\-n\fR] +[\fB\-\-quiet\fR|\fB\-q\fR] +[\fB\-\-trace\fR|\fB\-t\fR] +[\fB\-\-local\fR|\fB\-l\fR] +[\fB\-\-uninstall\fR|\fB\-u\fR] +[\fB\-\-root=\fR\fIroot\fR] +[\fB\-\-pkgdir=\fR\fIpkgdir\fR] +[\fB\-\-subdirs=\fR\fIsubdir\fR[,\fIsubdir\fR,...]] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This program activates software packages which were locally +installed in a sub-directory of a package hierarchy (located under +\&\fIroot\fR/\fIpkgdir\fR/) by managing symbolic links in an access layer +(located under \fIroot\fR/) corresponding to package installation +files (found in \fIroot\fR/\fIpkgdir\fR/pkgname/subdir/) which need to be +collected in global directories (located under \fIroot\fR/subdir/). +.PP +The purpose of this is that individual packages can be installed and +deinstalled seperately without interfering with other packages while +all packages as a whole still can be treated like a single package +(installed into the access layer). +.PP +The +actual creation of symbolic links is as following (\*(L"foo\*(R" indicating an +arbitrary file; \*(L"bar\*(R" indicating an arbitrary package name): +.IP "\fIroot\fR\fB/bin/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/bin/\fRfoo" 4 +.IX Item "root/bin/foo -> ../pkgdir/bar/bin/foo" +This activates the user executeable +\&\fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/bin\fR/foo as \fIroot\fR\fB/bin/\fRfoo. It can +be found by the shell by placing \fIroot\fR\fB/bin\fR into the environment +variable \f(CW\*(C`PATH\*(C'\fR (\fBPATH="..:\fR\fIroot\fR\fB/bin:.."\fR). +.IP "\fIroot\fR\fB/sbin/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/sbin/\fRfoo" 4 +.IX Item "root/sbin/foo -> ../pkgdir/bar/sbin/foo" +This activates the system executeable +\&\fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/sbin\fR/foo as \fIroot\fR\fB/sbin/\fRfoo. It can +be found by the shell by placing \fIroot\fR\fB/sbin\fR into the environment +variable \f(CW\*(C`PATH\*(C'\fR (\fBPATH="..:\fR\fIroot\fR\fB/sbin:.."\fR). +.IP "\fIroot\fR\fB/man/man\fR\fIN\fR\fB/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/man/man\fR\fIN\fR\fB/\fRfoo" 4 +.IX Item "root/man/manN/foo -> ../pkgdir/bar/man/manN/foo" +This activates the Unix manual page +\&\fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/man/man\fR\fIN\fR\fB/\fRfoo as +\&\fIroot\fR\fB/man/man\fR\fIN\fR\fB/\fRfoo. It can be found by the \fIman\fR\|(1) tool +by placing \fIroot\fR\fB/man\fR into the environment variable \f(CW\*(C`MANPATH\*(C'\fR +(\fBMANPATH="..:\fR\fIroot\fR\fB/man:.."\fR). Keep in mind that \fBopenpkg lsync\fR +activates any files found in the \fBman/man\f(BIN\fB\fR sub-directory of the +package, but the \fIman\fR\|(1) tool usually requires the filename scheme +foo\fB.\fR\fIN\fR before it can find the file. +.IP "\fIroot\fR\fB/info/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/info/\fRfoo" 4 +.IX Item "root/info/foo -> ../pkgdir/bar/info/foo" +This activates the \s-1GNU\s0 info page \fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/info/\fRfoo +as \fIroot\fR\fB/info/\fRfoo. It can be found by the \fIinfo\fR\|(1) and \fIpinfo\fR\|(1) +tools by placing \fIroot\fR\fB/info\fR into the environment variable +\&\f(CW\*(C`INFOPATH\*(C'\fR (\fBINFOPATH="..:\fR\fIroot\fR\fB/info:.."\fR). Keep in mind that +\&\fBopenpkg lsync\fR activates any files found in the \fBinfo/\fR sub-directory of the +package, but the \fIinfo\fR\|(1) and \fIpinfo\fR\|(1) tools usually require the filename +scheme foo\fB.info\fR before it can find the file. +.IP "\fIroot\fR\fB/include/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/include/\fRfoo" 4 +.IX Item "root/include/foo -> ../pkgdir/bar/include/foo" +This activates the C header \fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/include\fR/foo +as \fIroot\fR\fB/include/\fRfoo. It can be found by the C/\*(C+ compilers +by adding \fIroot\fR\fB/include\fR to their include search path (\fBcc .. +\&\-I\fR\fIroot\fR\fB/include\fR \fB...\fR). Keep in mind that \fBopenpkg lsync\fR activates any +files found in the \fBinclude/\fR sub-directory of the package, but the +C/\*(C+ compiler usually by convention use the filename scheme foo\fB.h\fR. +.IP "\fIroot\fR\fB/lib/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/lib/\fRfoo" 4 +.IX Item "root/lib/foo -> ../pkgdir/bar/lib/foo" +This activates the C library \fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/lib\fR/foo +as \fIroot\fR\fB/lib/\fRfoo. It can be found by the C/\*(C+ compilers (and +the linker they use) by adding \fIroot\fR\fB/lib\fR to their library search +path (\fBcc .. \-L\fR\fIroot\fR\fB/lib\fR \fB...\fR). It can be found by the Unix +Dynamic Loader by adding \fIroot\fR\fB/lib\fR to the environment variable +\&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR (\fBLD_LIBRARY_PATH="..:\fR\fIroot\fR\fB/lib:.."\fR). +Keep in mind that \fBopenpkg lsync\fR activates any files found in the \fBlib/\fR +sub-directory of the package, but the C/\*(C+ compiler usually require the +filename scheme \fBlib\fRfoo\fB.a\fR and the Unix Dynamic Loader the filename +scheme \fBlib\fRfoo\fB.so\fR before they actually can use the file. +.PP +It is obvious that more sub-directories in a package installation +might exist \*(-- for instance \fBshare/\fR, \fBvar/\fR, \fBlibexec/\fR, etc. But +\&\fBopenpkg lsync\fR intentionally does not link files in those directories into +corresponding directories of the access layer, because those files do +not require that they are located in a global area in order to be used. +So \fBopenpkg lsync\fR only creates the access layer for files where a common area +is required for (easy) use. +.SH "SPECIAL FEATURES" +.IX Header "SPECIAL FEATURES" +There are two special features supported by \fBopenpkg lsync\fR: +.IP "\fBRun-Command Files\fR" 4 +.IX Item "Run-Command Files" +\&\fBopenpkg lsync\fR on startup implicitly reads command line options from +\&\f(CW\*(C`.lsyncrc\*(C'\fR files. They are searched in all parent directories and in +the callers home directory. Their contents is prepended to the list of +given command line options. +.IP "\fBMultiple Package Versions\fR" 4 +.IX Item "Multiple Package Versions" +\&\fBopenpkg lsync\fR skips all directories under \fIroot\fR/\fIpkgdir\fR/ which contain +the pattern \*(L"\-[0\-9]\*(R" in their directory name. On the other hand, +\&\fBopenpkg lsync\fR follows also symbolic links under \fIroot\fR/\fIpkgdir\fR/. +This can be used for installing multiple versions of a package and +switching between them. For instance, if version 1.0 of package +\&\*(L"foo\*(R" is installed into directory \fIroot\fR/\fIpkgdir\fR/foo\-1.0, +version 1.1 into \fIroot\fR/\fIpkgdir\fR/foo\-1.1 and version 1.2 into +\&\fIroot\fR/\fIpkgdir\fR/foo\-1.2, \fBopenpkg lsync\fR does skip all three. To enable +version 1.1 one just creates a symbolic link \fIroot\fR/\fIpkgdir\fR/foo +pointing to foo\-1.1. Then \fBopenpkg lsync\fR picks up the files in +\&\fIroot\fR/\fIpkgdir\fR/foo\-1.1. If you want to temporarily upgrade to +foo\-1.2, all you have to do is to change the symlink pointing from +foo\-1.1 to foo\-1.2. +.IP "\fBTemporarily Deactivated Package\fR" 4 +.IX Item "Temporarily Deactivated Package" +One can deactivate a package \*(L"foo\*(R" by going to \fIroot\fR/\fIpkgdir\fR/foo/ +and running \*(L"openpkg lsync \-\-local \-\-uninstall\*(R", of course. Alternatively +one can set the sticky bit on the directory \fIroot\fR/\fIpkgdir\fR/foo. +Then \fBopenpkg lsync\fR also skips the package. Alternatively, assume +package \*(L"foo\*(R" as a whole should not be deactivated, but its +\&\fIroot\fR/\fIpkgdir\fR/foo/lib directory (usually because this directory +unfortunately contains non-library files), one just sets the sticky bit +on \fIroot\fR/\fIpkgdir\fR/foo/lib. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-\-version\fR, \fB\-v\fR" 4 +.IX Item "--version, -v" +Display program version information only. +.IP "\fB\-\-help\fR, \fB\-h\fR" 4 +.IX Item "--help, -h" +Display program usage information only. +.IP "\fB\-\-init\fR, \fB\-i\fR" 4 +.IX Item "--init, -i" +Create an initial access layer hierarchy under \fIroot\fR. +.IP "\fB\-\-nop\fR, \fB\-n\fR" 4 +.IX Item "--nop, -n" +No Operation \*(-- causes \fBopenpkg lsync\fR to not perform any filesystem +operations. In conjunction with \fB\-\-trace\fR you can at least see what +would be executed. +.IP "\fB\-\-quiet\fR, \fB\-q\fR" 4 +.IX Item "--quiet, -q" +Forces \fBopenpkg lsync\fR to perform the operations quietly, i.e., without any +verbose messages. +.IP "\fB\-\-trace\fR, \fB\-t\fR" 4 +.IX Item "--trace, -t" +Forces \fBopenpkg lsync\fR to show what filesystem operations are performed. +.IP "\fB\-\-local\fR, \fB\-l\fR" 4 +.IX Item "--local, -l" +This restricts the operations to a local package area. This option can +only be used if you are physically staying below a package sub-directory +under \fIroot\fR/\fIpkgdir\fR/. For instance, when you are staying in +\&\fIroot\fR/\fIpkgdir\fR/bar or \fIroot\fR/\fIpkgdir\fR/bar/bin and use \fB\-\-local\fR, +all operations are restricted to the package \*(L"bar\*(R". +.IP "\fB\-\-uninstall\fR, \fB\-u\fR" 4 +.IX Item "--uninstall, -u" +This performs only package uninstallation operations, i.e., only +symbolic links are removed. This can be used to completely empty the +access layer. Additionally it is very useful in combination with +\&\fB\-\-local\fR in order to uninstall a particular package without having to +remove its files. +.IP "\fB\-\-root=\fR\fIroot\fR" 4 +.IX Item "--root=root" +Sets the root directory where the access layer and package subdirectory +is located. The default can be determined by running \f(CW\*(C`openpkg lsync \-\-help\*(C'\fR +(see section \*(L"Current configuration\*(R"). +.IP "\fB\-\-pkgdir=\fR\fIpkgdir\fR" 4 +.IX Item "--pkgdir=pkgdir" +Sets the sub-directory under the root directory where packages are +located. The default can be determined by running \f(CW\*(C`openpkg lsync \-\-help\*(C'\fR (see +section \*(L"Current configuration\*(R"). +.IP "\fB\-\-subdirs=\fR\fIsubdirs\fR[,\fIsubdir\fR,...]" 4 +.IX Item "--subdirs=subdirs[,subdir,...]" +Sets one or more sub-directories of the access layer on which \fBopenpkg lsync\fR +should act. The default can be determined by running \f(CW\*(C`openpkg lsync \-\-help\*(C'\fR +(see section \*(L"Current configuration\*(R"). +.SH "RESULTS" +.IX Header "RESULTS" +This program uses the following return codes on exit: 0 (operation +successful), 1 (system error), 2 (command line error) and 3 (other user +error). +.SH "HISTORY" +.IX Header "HISTORY" +The idea of filesystem access layers consisting of symbolic links +pointing to actual package installation areas is a rather old one. It +dates back to the early days of Unix and was implemented many times over +the last decades. One of many implementation was \fBGenOPT\fR, written by +Ralf S. Engelschall for sd&m GmbH & Co \s-1KG\s0, Munich in 1992. The name +indicates the programs purpose: to generate symbolic links in an access +layer which was located under \f(CW\*(C`/opt\*(C'\fR. \fBGenOPT\fR was very flexible, but +hence also very complex. Because of lack of documentation it was never +released and so only used at sd&m and on all machines which were under +control of Ralf S. Engelschall. +.PP +For Cable & Wireless, Munich, the old \fBGenOPT\fR principle was again +needed to manage the \f(CW\*(C`/cw/local\*(C'\fR area on their servers. For this in +November 2000 the functionality of \fBGenOPT\fR was revised, heavily +stripped down and finally implemented from scratch. The result is the +current \fBopenpkg lsync\fR. +.SH "AUTHOR" +.IX Header "AUTHOR" +.Vb 3 +\& Ralf S. Engelschall +\& rse@engelschall.com +\& www.engelschall.com +.Ve diff -r 333964c621f1 -r cb59d6afeb61 openpkg/lsync.pod --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/lsync.pod Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,274 @@ +## +## lsync.pod -- Access Layer Synchronization Tool (Manual Page) +## 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. +## + +=pod + +=head1 NAME + +B - Access Layer Synchronization Tool + +=head1 SYNOPSIS + +B +[B<--version>|B<-v>] +[B<--help>|B<-h>] +[B<--init>|B<-i>] +[B<--nop>|B<-n>] +[B<--quiet>|B<-q>] +[B<--trace>|B<-t>] +[B<--local>|B<-l>] +[B<--uninstall>|B<-u>] +[B<--root=>I] +[B<--pkgdir=>I] +[B<--subdirs=>I[,I,...]] + +=head1 DESCRIPTION + +This program activates software packages which were locally +installed in a sub-directory of a package hierarchy (located under +I/I/) by managing symbolic links in an access layer +(located under I/) corresponding to package installation +files (found in I/I/pkgname/subdir/) which need to be +collected in global directories (located under I/subdir/). + +The purpose of this is that individual packages can be installed and +deinstalled seperately without interfering with other packages while +all packages as a whole still can be treated like a single package +(installed into the access layer). + +The +actual creation of symbolic links is as following ("foo" indicating an +arbitrary file; "bar" indicating an arbitrary package name): + +=over 4 + +=item IBfoo -> B<../>IBbarBfoo + +This activates the user executeable +IBIBbarB/foo as IBfoo. It can +be found by the shell by placing IB into the environment +variable C (BIB). + +=item IBfoo -> B<../>IBbarBfoo + +This activates the system executeable +IBIBbarB/foo as IBfoo. It can +be found by the shell by placing IB into the environment +variable C (BIB). + +=item IBIBfoo -> B<../>IBbarBIBfoo + +This activates the Unix manual page +IBIBbarBIBfoo as +IBIBfoo. It can be found by the man(1) tool +by placing IB into the environment variable C +(BIB). Keep in mind that B +activates any files found in the B> sub-directory of the +package, but the man(1) tool usually requires the filename scheme +fooB<.>I before it can find the file. + +=item IBfoo -> B<../>IBbarBfoo + +This activates the GNU info page IBIBbarBfoo +as IBfoo. It can be found by the info(1) and pinfo(1) +tools by placing IB into the environment variable +C (BIB). Keep in mind that +B activates any files found in the B sub-directory of the +package, but the info(1) and pinfo(1) tools usually require the filename +scheme fooB<.info> before it can find the file. + +=item IBfoo -> B<../>IBbarBfoo + +This activates the C header IBIBbarB/foo +as IBfoo. It can be found by the C/C++ compilers +by adding IB to their include search path (BIB B<...>). Keep in mind that B activates any +files found in the B sub-directory of the package, but the +C/C++ compiler usually by convention use the filename scheme fooB<.h>. + +=item IBfoo -> B<../>IBbarBfoo + +This activates the C library IBIBbarB/foo +as IBfoo. It can be found by the C/C++ compilers (and +the linker they use) by adding IB to their library search +path (BIB B<...>). It can be found by the Unix +Dynamic Loader by adding IB to the environment variable +C (BIB). +Keep in mind that B activates any files found in the B +sub-directory of the package, but the C/C++ compiler usually require the +filename scheme BfooB<.a> and the Unix Dynamic Loader the filename +scheme BfooB<.so> before they actually can use the file. + +=back + +It is obvious that more sub-directories in a package installation +might exist -- for instance B, B, B, etc. But +B intentionally does not link files in those directories into +corresponding directories of the access layer, because those files do +not require that they are located in a global area in order to be used. +So B only creates the access layer for files where a common area +is required for (easy) use. + +=head1 SPECIAL FEATURES + +There are two special features supported by B: + +=over 4 + +=item B + +B on startup implicitly reads command line options from +C<.lsyncrc> files. They are searched in all parent directories and in +the callers home directory. Their contents is prepended to the list of +given command line options. + +=item B + +B skips all directories under I/I/ which contain +the pattern "-[0-9]" in their directory name. On the other hand, +B follows also symbolic links under I/I/. +This can be used for installing multiple versions of a package and +switching between them. For instance, if version 1.0 of package +"foo" is installed into directory I/I/foo-1.0, +version 1.1 into I/I/foo-1.1 and version 1.2 into +I/I/foo-1.2, B does skip all three. To enable +version 1.1 one just creates a symbolic link I/I/foo +pointing to foo-1.1. Then B picks up the files in +I/I/foo-1.1. If you want to temporarily upgrade to +foo-1.2, all you have to do is to change the symlink pointing from +foo-1.1 to foo-1.2. + +=item B + +One can deactivate a package "foo" by going to I/I/foo/ +and running "openpkg lsync --local --uninstall", of course. Alternatively +one can set the sticky bit on the directory I/I/foo. +Then B also skips the package. Alternatively, assume +package "foo" as a whole should not be deactivated, but its +I/I/foo/lib directory (usually because this directory +unfortunately contains non-library files), one just sets the sticky bit +on I/I/foo/lib. + +=back + +=head1 OPTIONS + +=over 4 + +=item B<--version>, B<-v> + +Display program version information only. + +=item B<--help>, B<-h> + +Display program usage information only. + +=item B<--init>, B<-i> + +Create an initial access layer hierarchy under I. + +=item B<--nop>, B<-n> + +No Operation -- causes B to not perform any filesystem +operations. In conjunction with B<--trace> you can at least see what +would be executed. + +=item B<--quiet>, B<-q> + +Forces B to perform the operations quietly, i.e., without any +verbose messages. + +=item B<--trace>, B<-t> + +Forces B to show what filesystem operations are performed. + +=item B<--local>, B<-l> + +This restricts the operations to a local package area. This option can +only be used if you are physically staying below a package sub-directory +under I/I/. For instance, when you are staying in +I/I/bar or I/I/bar/bin and use B<--local>, +all operations are restricted to the package "bar". + +=item B<--uninstall>, B<-u> + +This performs only package uninstallation operations, i.e., only +symbolic links are removed. This can be used to completely empty the +access layer. Additionally it is very useful in combination with +B<--local> in order to uninstall a particular package without having to +remove its files. + +=item B<--root=>I + +Sets the root directory where the access layer and package subdirectory +is located. The default can be determined by running C +(see section "Current configuration"). + +=item B<--pkgdir=>I + +Sets the sub-directory under the root directory where packages are +located. The default can be determined by running C (see +section "Current configuration"). + +=item B<--subdirs=>I[,I,...] + +Sets one or more sub-directories of the access layer on which B +should act. The default can be determined by running C +(see section "Current configuration"). + +=back + +=head1 RESULTS + +This program uses the following return codes on exit: 0 (operation +successful), 1 (system error), 2 (command line error) and 3 (other user +error). + +=head1 HISTORY + +The idea of filesystem access layers consisting of symbolic links +pointing to actual package installation areas is a rather old one. It +dates back to the early days of Unix and was implemented many times over +the last decades. One of many implementation was B, written by +Ralf S. Engelschall for sd&m GmbH & Co KG, Munich in 1992. The name +indicates the programs purpose: to generate symbolic links in an access +layer which was located under C. B was very flexible, but +hence also very complex. Because of lack of documentation it was never +released and so only used at sd&m and on all machines which were under +control of Ralf S. Engelschall. + +For Cable & Wireless, Munich, the old B principle was again +needed to manage the C area on their servers. For this in +November 2000 the functionality of B was revised, heavily +stripped down and finally implemented from scratch. The result is the +current B. + +=head1 AUTHOR + + Ralf S. Engelschall + rse@engelschall.com + www.engelschall.com + +=cut + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/make.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/make.patch Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,31 @@ +Index: glob/glob.c +--- glob/glob.c.orig 2006-03-10 03:20:45 +0100 ++++ glob/glob.c 2006-04-01 19:09:18 +0200 +@@ -216,13 +216,13 @@ + # ifdef HAVE_ALLOCA_H + # include + # else /* Not HAVE_ALLOCA_H. */ +-# ifndef _AIX ++# if !defined (_AIX) && !defined (__FreeBSD__) + # ifdef WINDOWS32 + # include + # else + extern char *alloca (); + # endif /* WINDOWS32 */ +-# endif /* Not _AIX. */ ++# endif /* Not _AIX && not __FreeBSD__. */ + # endif /* sparc or HAVE_ALLOCA_H. */ + # endif /* GCC. */ + +Index: make.h +--- make.h.orig 2006-02-16 00:54:43 +0100 ++++ make.h 2006-04-01 19:09:18 +0200 +@@ -31,7 +31,7 @@ + # ifdef _AIX + #pragma alloca + # else +-# ifndef alloca /* predefined by HP cc +Olibcalls */ ++# if !defined (alloca) && !defined (__FreeBSD__) /* predefined by HP cc +Olibcalls, part of stdlib.h on FreeBSD */ + char *alloca (); + # endif + # endif diff -r 333964c621f1 -r cb59d6afeb61 openpkg/man.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/man.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,154 @@ +#!@l_prefix@/lib/openpkg/bash +## +## man -- OpenPKG Tool Chain "man" command +## 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 +prefix="@l_prefix@" + +# minimum command line parsing +opt_h=no +while [ 1 ]; do + case "$1" in + -h | --help ) opt_h=yes; shift ;; + * ) break ;; + esac +done +if [ ".$opt_h" = .yes ]; then + echo "openpkg:man:USAGE: openpkg man [--help] [
] " + exit 0 +fi +if [ $# -eq 1 ]; then + man_page="$1" +elif [ $# -eq 2 ]; then + man_sect="$1" + man_page="$2" +else + echo "openpkg:man:ERROR: invalid number of arguments" 1>&2 + exit 1 +fi + +# determine path to commands +openpkg_tools="${OPENPKG_TOOLS}" +openpkg_tools_cmdpath="${OPENPKG_TOOLS_CMDPATH}" +if [ ".${openpkg_tools}" != . -a ".${openpkg_tools_cmdpath}" = . ]; then + openpkg_tools_cmdpath="${openpkg_tools}/cmd:@" +fi +cmdpath="${prefix}/libexec/openpkg" +if [ -d "${prefix}/libexec/openpkg-tools" ]; then + cmdpath="${prefix}/libexec/openpkg-tools:${cmdpath}" +fi +if [ -d "${prefix}/libexec/openpkg-audit" ]; then + cmdpath="${prefix}/libexec/openpkg-audit:${cmdpath}" +fi +if [ ".${openpkg_tools_cmdpath}" != . ]; then + cmdpath=`echo "${openpkg_tools_cmdpath}" | sed -e "s;@;${cmdpath};"` +fi +openpkg_tools_cmdpath=`echo "${cmdpath}" | sed -e 's/::/:/g' -e 's/^://' -e 's/:$//'` + +# search for manual page in OpenPKG Tool Chain +man_file="" +man_type="" +OIFS="$IFS"; IFS=":" +for dir in ${openpkg_tools_cmdpath}; do + IFS="$OIFS" + for file in $dir/$man_page.${man_sect-"1"} $dir/$man_page.[1-9]; do + if [ -f "$file" ]; then + man_file="$file" + man_type="roff" + if [ ".$man_sect" = . ]; then + man_sect=`echo "$man_file" |\ + sed -e 's;^;X;' -e 's;^X.*\.\([1-9]\)$;\1;' -e 's;^X.*;;'` + fi + break + fi + done + if [ ".$man_type" = . ]; then + for file in $dir/$man_page.pod $dir/$man_page.pl $dir/$man_page.sh; do + if [ -f "$file" ]; then + if [ ".`grep '^=pod' $file`" != . ]; then + man_file="$file" + man_type="pod" + break + fi + fi + done + fi + if [ ".$man_type" != . ]; then + break + fi +done +IFS="$OIFS" +if [ ".$man_type" != . ]; then + # determine POD to Roff converter + pod2roff="" + if [ ".$man_type" = .pod ]; then + pod2roff=`$prefix/lib/openpkg/shtool path -p "$prefix/bin:$PATH" pod2man` + if [ ".$pod2roff" = . ]; then + echo "openpkg:man:ERROR: unable to find POD to Roff converter (pod2man)" 1>&2 + exit 1 + fi + if [ ".$man_sect" = . ]; then + man_sect=1 + fi + pod2roff="$pod2roff --section=${man_sect}" + pod2roff="$pod2roff --release=\"$man_page(${man_sect})\"" + pod2roff="$pod2roff --center=OpenPKG --date=OpenPKG" + pod2roff="$pod2roff --quotes=none" + fi + + # determine Roff to ASCII converter + roff2ascii=`$prefix/lib/openpkg/shtool path -p "$prefix/bin:$PATH" nroff groff` + if [ ".$roff2ascii" = . ]; then + echo "openpkg:man:ERROR: unable to find Roff to ASCII converter (nroff, groff)" 1>&2 + exit 1 + fi + roff2ascii="$roff2ascii -man" + case "$roff2ascii" in + */groff ) roff2ascii="$roff2ascii -Tascii" ;; + esac + + # determine pager + pager="$PAGER" + if [ ".$pager" = . ]; then + pager=`$prefix/lib/openpkg/shtool path -p "$prefix/bin:$PATH" less more cat` + fi + if [ ".$pager" = . ]; then + echo "openpkg:man:ERROR: unable to find text viewer ($PAGER, less, more, cat)" 1>&2 + exit 1 + fi + + # render the manual page to the TTY + if [ ".$man_type" = .roff ]; then + eval "$roff2ascii $man_file | $pager" + elif [ ".$man_type" = .pod ]; then + eval "$pod2roff $man_file | $roff2ascii | $pager" + fi + exit 0 +fi + +# fallback to the man(1) command +MANPATH="$prefix/man:$prefix/local/man:${MANPATH-/usr/man}:/usr/man:/usr/share/man" +export MANPATH +eval "exec man $man_sect $man_page" + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.1 Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,183 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "OPENPKG 1" +.TH OPENPKG 1 "OpenPKG" "OPENPKG(8)" "OpenPKG" +.SH "NAME" +\&\fBOpenPKG\fR \-\- Cross\-Platform Unix Software Packaging Facility +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.IP "Command Line Interface" 4 +.IX Item "Command Line Interface" +$ \fBopenpkg\fR [\fIopt\fR ...] \fIcmd\fR [\fIcmd_opt\fR ...] [\fIcmd_arg\fR ...] +.Sp +$ \fBopenpkg\fR \fBman\fR \fIcmd\fR +.IP "Project Locations" 4 +.IX Item "Project Locations" +.Vb 4 +\& http://www.openpkg.org/ web service +\& http://cvs.openpkg.org/ repository service +\& http://pgp.openpkg.org/ OpenPGP service +\& ftp://ftp.openpkg.org/ download service +.Ve +.IP "Project Forums" 4 +.IX Item "Project Forums" +.Vb 4 +\& petidomo@openpkg.org mailing-list manager +\& openpkg-announce@openpkg.org project announcements +\& openpkg-dev@openpkg.org developer forum +\& openpkg-users@openpkg.org users forum +.Ve +.IP "Local Documentation" 4 +.IX Item "Local Documentation" +.Vb 6 +\& openpkg-rpm(1) RPM package manager +\& openpkg-rpmbuild(1) RPM package manager (build only) +\& openpkg-rpm2cpio(1) RPM payload utility +\& openpkg-rpm-config(1) RPM C API utility +\& openpkg-lsync(1) local area synchronization +\& openpkg-rc(1) run-command facility +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +OpenPKG is the world leading instrument for deployment and maintenance +of Open Source software when administration crosses Unix platform +boundaries. The OpenPKG project is a collaboration effort with the +goal of creating and maintaining portable and easy to install software +packages for use on the major Unix server platforms. +.PP +The unique OpenPKG architecture leverages proven technologies like +Red Hat Package Manager (\s-1RPM\s0) to establish a unified administration +environment, independent of the underlying operating system. OpenPKG +is completely self-contained and does not even need a preinstallation +of \s-1RPM\s0. Instead, \s-1RPM\s0 is provided as an OpenPKG \s-1RPM\s0 package itself plus +a tricky bootstrapping procedure in order to allow one to create from +scratch the initial state of the whole OpenPKG software packaging +system. diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.boot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.boot Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,621 @@ +#!/bin/sh +## +## openpkg.boot -- OpenPKG bootstrap procedure (look Ma, without hands ;) +## 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 is a very tricky procedure for building the OpenPKG bootstrap +# package via the RPM specification openpkg.spec, but without +# requiring that OpenPKG's RPM already exists. For this the +# openpkg.spec file is manually executed here in order to build +# OpenPKG RPM the first time (that is, we emulate a sufficient +# subset of the RPM functionality), followed by a second round over +# openpkg.spec with the real (and then existing) OpenPKG RPM tool. +# Also keep in mind that lots of tricks are played here in order to +# perform all the steps without having to touch the real installation +# location. That is the whole procedure can (and should) be performed +# by a non-privileged user and no access to the real installation +# location filesystem location. + +me="openpkg.boot" + +## +## command line handling +## + +# command line parameters (defaults) +help=0 +verbose='' +prefix='' +tag='' +usr=''; grp='' +susr=''; sgrp='' +musr=''; mgrp='' +rusr=''; rgrp='' +nusr=''; ngrp='' +suid=''; sgid='' +muid=''; mgid='' +ruid=''; rgid='' +nuid=''; ngid='' +use_tar=''; use_make=''; use_cc=''; use_ar=''; use_ld=''; use_as=''; use_strip='' +bs=0 + +# 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 ;; + -v | --verbose ) verbose=v ;; + --prefix=* ) prefix=$arg ;; + --tag=* ) tag=$arg ;; + --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 ;; + --use_tar=* ) use_tar=$arg ;; + --use_make=* ) use_make=$arg ;; + --use_cc=* ) use_cc=$arg ;; + --use_ar=* ) use_ar=$arg ;; + --use_ld=* ) use_ld=$arg ;; + --use_as=* ) use_as=$arg ;; + --use_strip=* ) use_strip=$arg ;; + -bs | -s ) bs=1 ;; + * ) help=1 ;; + esac +done +if [ ".$bs" = .0 -a ".$prefix" = . ]; then + help=1 +fi +if [ ".$help" = .1 ]; then + echo "Usage: sh $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 + +# determine missing parameters +eval `sh aux.usrgrp.sh \ + --usr="$usr" --grp="$grp" \ + --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"` + +# canonicalize prefix +prefix=`echo "$prefix" | sed -e 's;//*;/;g' -e 's;/$;;'` + +# provide default package tag +if [ ".$tag" = . ]; then + tag="" +fi + +## +## determine package information +## + +name="openpkg" +spec="$name.spec" +version=`grep V_openpkg $spec | sed -e 'q' | awk '{ printf("%s", $3); }'` +release="$version" + +## +## display headline +## + +sh ./shtool echo -e "%BOpenPKG Bootstrap Procedure%b" +echo "++ bootstrap version: $version-$release" +echo "++ user/group pairs: $susr/$sgrp $musr/$mgrp $rusr/$rgrp $nusr/$ngrp" + +## +## optionally roll just a bootstrap source package +## + +if [ ".$bs" = .1 ]; then + srcdir=. + if [ -d ../../dst ]; then + dstdir=../../dst/openpkg + else + dstdir=. + fi + tmpdir="/tmp/$me.$$.d" + if [ -d ../PKG/SRC ]; then + pkgdir=../PKG/SRC + elif [ -d ../PKG ]; then + pkgdir=../PKG + elif [ -d ../../PKG/SRC ]; then + pkgdir=../../PKG/SRC + elif [ -d ../../PKG ]; then + pkgdir=../../PKG + elif [ -d ../../pkg/src ]; then + pkgdir=../../pkg/src + elif [ -d ../../pkg ]; then + pkgdir=../../pkg + else + pkgdir=.. + fi + echo "** rolling source bootstrap package:" + echo " $pkgdir/$name-$version-$release.src.sh" + rm -rf $tmpdir + mkdir $tmpdir + ( echo "dstdir=$dstdir" + echo "srcdir=$srcdir" + echo "tmpdir=$tmpdir" + grep '^%define' $spec | sed -e 's:^%define *\([^ ]*\) *\(.*\):\1="\2":' + grep '^Source' $spec | sed -e 's;^Source[0-9]*: *;;' -e 's;^.*/;$dstdir/;' \ + -e 's;^\([^/]*\)$;$srcdir/\1;' -e 's;%;$;g' \ + -e 's;^\(.*\)$;cp \1 $tmpdir/;' + echo "cp -p $spec $tmpdir/" + ) >$tmpdir/.sh + sh $tmpdir/.sh + rm -f $tmpdir/.sh + l_version="$release" + l_release=`sh ./release.sh -r "${l_version}" -F "%t"` + sed <$srcdir/aux.wrapsrc.sh >$tmpdir/openpkg.boot.tmp \ + -e "s;@l_dir@;$name-$version-$release.src;" \ + -e "s;@l_release@;$l_release;" \ + -e "s;@l_version@;$l_version;" + echo . | awk '{ + for (i = 0; i < 8192; i++) { + printf(" "); + } + }' >>$tmpdir/openpkg.boot.tmp + dd if=$tmpdir/openpkg.boot.tmp bs=8192 count=8 \ + of=$pkgdir/$name-$version-$release.src.sh 2>/dev/null + rm -f $tmpdir/openpkg.boot.tmp + (cd $tmpdir && tar cf - *) >>$pkgdir/$name-$version-$release.src.sh + rm -rf $tmpdir + exit 0 +fi + +## +## determine distribution directory +## + +V_rpm=`grep V_rpm $spec | sed -e 'q' | awk '{ printf("%s", $3); }'` +if [ -f "../../dst/openpkg/rpm-${V_rpm}.tar.gz" ]; then + distdir="`cd ../../dst/openpkg; pwd`" # developer only +else + distdir="`pwd`" +fi +echo "++ distribution directory: $distdir" + +## +## perform prerequisite checks +## + +sh ./aux.prereq.sh source || exit $? + +## +## find reasonable run-time paths and tools +## + +# find reasonable temporary directory +tmpdir="${TMPDIR-/tmp}" + +# find reasonable safe program path +test ".$PATH" = . && PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin" +for dir in /usr/ccs/bin /usr/xpg4/bin; do + test -d $dir && PATH="$PATH:$dir" +done +export PATH + +# make environment at least partly sane +umask 022 +unset ls rm mv cp sed grep awk >/dev/null 2>&1 || true + +## +## execute the spec file manually by emulating +## the behaviour of the OpenPKG RPM tool. +## + +# create script prolog +prolog="$tmpdir/openpkg.boot.prolog.sh" +cp /dev/null $prolog +( + echo "_specdir=`pwd`" + echo "_sourcedir=$distdir" + echo "_tmppath=$tmpdir" + echo "_builddir=$tmpdir" + echo "l_prefix=$prefix" + echo "l_tag_fmt=\"$tag\"" + echo "l_buildroot=$tmpdir/$name-$version-root" + echo "l_susr=$susr" + echo "l_sgrp=$sgrp" + echo "l_musr=$musr" + echo "l_mgrp=$mgrp" + echo "l_rusr=$rusr" + echo "l_rgrp=$rgrp" + echo "l_nusr=$nusr" + echo "l_ngrp=$ngrp" + echo "l_suid=$suid" + echo "l_sgid=$sgid" + echo "l_muid=$muid" + echo "l_mgid=$mgid" + echo "l_ruid=$ruid" + echo "l_rgid=$rgid" + echo "l_nuid=$nuid" + echo "l_ngid=$ngid" + echo "use_tar=$use_tar" + echo "use_make=$use_make" + echo "use_cc=$use_cc" + echo "use_ar=$use_ar" + echo "use_ld=$use_ld" + echo "use_as=$use_as" + echo "use_strip=$use_strip" + grep '%define' $spec | \ + sed \ + -e 's:^%define *\([^ ]*\) *\(.*\):\1="\2":' + grep "^[A-Za-z0-9]*: *" $spec | \ + sed \ + -e 's;^\([A-Za-z0-9]*\): *\(.*\)$;\1="\2";' \ + -e 's;^A;a;' -e 's;^B;b;' -e 's;^C;c;' -e 's;^D;d;' -e 's;^E;e;' \ + -e 's;^F;f;' -e 's;^G;g;' -e 's;^H;h;' -e 's;^I;i;' -e 's;^J;j;' \ + -e 's;^K;k;' -e 's;^L;l;' -e 's;^M;m;' -e 's;^N;n;' -e 's;^O;o;' \ + -e 's;^P;p;' -e 's;^Q;q;' -e 's;^R;r;' -e 's;^S;s;' -e 's;^T;t;' \ + -e 's;^U;u;' -e 's;^V;v;' -e 's;^W;w;' -e 's;^X;x;' -e 's;^Y;y;' \ + -e 's;^Z;z;' -e 's;^buildRoot;buildroot;' + echo "RPM_BUILD_ROOT=\"%{buildroot}\"" + echo "RPM_BUILD_DIR=\"%{_builddir}\"" + echo "RPM_SOURCE_DIR=\"$distdir\"" + echo "export RPM_BUILD_ROOT" + echo "export RPM_BUILD_DIR" + echo "export RPM_SOURCE_DIR" + echo "set -x" + echo "umask 022" + echo "cd \$RPM_BUILD_DIR" +) | sed -e 's;%{\([^}]*\)};${\1};g' >$prolog + +# install package via RPM spec file by faking a +# sufficiently enough RPM run-time environment +runscript () { + step=$1 + script="$tmpdir/openpkg.boot.$step.sh" + echo ". $prolog" >$script + sed -e "/^%$step/,/^%/ p" -e 'd' <$spec | \ + sed -e '/^%/d' | \ + sed -e 's;%{SOURCE \([^ ]*\.tar[^ ]*\)};${RPM_DIST_DIR}/\1;g' \ + -e 's;%{SOURCE \([^ ]*\)};${RPM_SOURCE_DIR}/\1;g' | \ + sed -e 's;%{[?]\([^:}]*\):\([^}]*\)};${\1+\2};g' \ + -e 's;%{![?]\([^:}]*\):\([^}]*\)};${\1-\2};g' \ + -e 's;%{[?]\([^:}]*\)};${\1+""};g' \ + -e 's;%{![?]\([^:}]*\)};${\1-""};g' \ + -e 's;%{\([^}]*\)};${\1};g' >>$script + echo "++ executing(%$step): sh $script" + sh $script + if [ $? -ne 0 ]; then + rm -f $script + echo "$0:ERROR: script returned non-null value" + exit 1 + fi + rm -f $script +} +runscript prep +runscript build +runscript install + +## +## adjust build environment so that the installed +## "rpm" is actually useable, although it still resides in +## the temporary location instead of the real location. +## + +# suck in prolog in order to get variables from the spec file +cwd=`pwd` +. $prolog +cd $cwd + +# suck in buildenv script in order to get musr/mgrp +. $tmpdir/openpkg-*/.buildenv + +# create a custom "rpm" command +echo "++ creating custom RPM command" +rm -f $tmpdir/rpm >/dev/null 2>&1 +rmdir $tmpdir/rpm >/dev/null 2>&1 +if [ -d "$tmpdir/rpm" ]; then + echo "$0:ERROR: directory $tmpdir/rpm exists, cannot create file with same name" + exit 1 +fi +if [ -f "$tmpdir/rpm" ]; then + echo "$0:ERROR: file $tmpdir/rpm exists, cannot override" + exit 1 +fi +( echo "#!/bin/sh" + echo "exec $RPM_BUILD_ROOT$prefix/lib/openpkg/rpm \\" + echo " --rcfile \"$tmpdir/rpm.1\" \\" + echo " --define \"__platform $RPM_BUILD_ROOT$prefix/etc/openpkg/platform\" \\" + echo " \"\$@\"" +) >$tmpdir/rpm +chmod a+x $tmpdir/rpm + +# direct our own "rpm" tool to adjusted macro sets +sed <`SOURCE rpmrc` >$tmpdir/rpm.1 \ + -e "s;^\\(macrofiles:\\) .*;\\1 $tmpdir/rpm.2:$tmpdir/rpm.3;" + +# use an adjusted vendor macro set +sed <$RPM_BUILD_ROOT$prefix/lib/openpkg/macros >$tmpdir/rpm.2 \ + -e "s;$prefix;$RPM_BUILD_ROOT$prefix;g" + +# override the vendor macro set +sed <`SOURCE rpmmacros` >$tmpdir/rpm.3 \ + -e "s;@SUSR@;$susr;" \ + -e "s;@SGRP@;$sgrp;" \ + -e "s;@MUSR@;$musr;" \ + -e "s;@MGRP@;$mgrp;" \ + -e "s;@RUSR@;$rusr;" \ + -e "s;@RGRP@;$rgrp;" \ + -e "s;@NUSR@;$nusr;" \ + -e "s;@NGRP@;$ngrp;" \ + -e "s;@TAG@;$tag;" \ + -e "s;\\(%{l_prefix}/lib/openpkg/rpmtool\\);%{l_bash} \\1;g" \ + -e "s;@l_prefix_static@;$prefix;g" \ + -e "s;@l_prefix@;$RPM_BUILD_ROOT$prefix;g" \ + -e "s;%l_prefix\\([^_]\\);%l_prefix_INTERNAL\\1;g" \ + -e "s;%{l_prefix};%{l_prefix_INTERNAL};g" \ + -e "s;^\\(%_specdir *\\).*;\\1 `pwd`;" \ + -e "s;^\\(%_sourcedir *\\).*;\\1 $distdir;" \ + -e "s;^\\(%_builddir *\\).*;\\1 $tmpdir;" \ + -e "s;^\\(%_tmppath *\\).*;\\1 $tmpdir;" \ + -e "s;^\\(%_buildshell *\\).*;\\1 env -i OPENPKG_BOOT=1 %{l_build_shell_cmd} %{l_build_shell_opt};" \ + -e "s;@l_build_path@;/bin:/sbin:/usr/bin:/usr/sbin;g" \ + -e "s;@l_build_ldlp@;/usr/lib;g" \ + -e "s;@l_build_ulim@;:;g" +echo "%l_prefix $prefix" >>$tmpdir/rpm.3 + +# use an own $HOME/.popt in order to make sure the "rpm" +# tool is able to execute its sub-tools "rpm". +V_rpm=`grep V_rpm $spec | sed -e 'q' | awk '{ printf("%s", $3); }'` +sed <$RPM_BUILD_ROOT$prefix/lib/openpkg/rpmpopt >$tmpdir/.popt \ + -e "s;^\\(rpm.*exec.*\\)\\(rpm[bdieukvq]*\\);\\1$RPM_BUILD_ROOT$prefix/lib/openpkg/\\2;" + +# activate the .popt file +HOME=$tmpdir +export HOME + +## +## now initialize the RPM database under the temporary install location +## + +echo "++ initializing RPM database" +$RPM_BUILD_ROOT$prefix/lib/openpkg/bash \ +$RPM_BUILD_ROOT$prefix/lib/openpkg/rpmdb \ + --prefix=$RPM_BUILD_ROOT$prefix \ + --dbpath=$RPM_BUILD_ROOT$prefix/RPM/DB \ + --rpm=$tmpdir/rpm \ + --build --quiet + +## +## now turn over and re-iterate over the RPM spec, but this time +## with the real RPM tool. +## + +echo "++ re-iterating over RPM specification procedures" +$tmpdir/rpm -bb $spec + +## +## and finally overwrite the installation again, but this time by +## installing officially through the "rpm" tool. This way we achieve +## that RPM is remembered as an RPM package in its own database. We +## just have to make sure the package is relocated while installing. +## For this we could use --prefix=$RPM_BUILD_ROOT$prefix, but this +## would create an incorrect filelist for "rpm" in the database. +## Instead we use the --justdb option which means "rpm" behaves as it +## would install into the real location, but does not actually install +## anything. But as a side-effect, the database is now correct. +## + +echo "++ overwriting RPM installation by installing via RPM itself" +$tmpdir/rpm --install --justdb --force --noscripts --notriggers --ignoresize \ + $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-*.rpm + +## Puhhhh!!! what a tricky bootstrapping procedure. But now we are +## mostly finished. All we finally have to do is to roll a bootstrap +## tarball in addition to the binary RPM and save the stuff in a +## permanent location. + +v="$version-$release" +t="`$tmpdir/rpm --eval '%{l_platform -p}-%{l_tag}'`" + +# find a reasonable destination directory for packages +if [ -d ../PKG/BIN ]; then + dstdir=../PKG/BIN +elif [ -d ../PKG ]; then + dstdir=../PKG +elif [ -d ../../PKG/BIN ]; then + dstdir=../../PKG/BIN +elif [ -d ../../PKG ]; then + dstdir=../../PKG +else + dstdir=.. +fi + +# create Source-RPM file +echo "++ creating bootstrap source RPM file" +$tmpdir/rpm -bs --nodeps $spec +cp $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.src.rpm $dstdir/ +rm -f $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.src.rpm + +# create Binary-RPM file +echo "++ creating bootstrap binary RPM file" +cp $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.$t.rpm $dstdir/ +rm -f $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.$t.rpm + +# create Binary-Bootstrap file +echo "++ creating bootstrap binary shell script" +files=`cat $spec |\ + sed -e '1,/%files/d' -e '/%clean/,$d' |\ + grep -v '^ *$' | grep -v '%defattr' |\ + sed -e 's;%config(noreplace) *;;' -e 's;%config *;;' -e 's;%ghost *;;' -e 's;%attr([^)]*) *;;' \ + -e 's;%dir *;;' -e 's;%{l_prefix}/;;' -e 's;^ *;;' -e "s;%{V_rpm};${V_rpm};"` +db_files="" +for db_file in \ + `$RPM_BUILD_ROOT$prefix/lib/openpkg/bash \ + $RPM_BUILD_ROOT$prefix/lib/openpkg/rpmdb \ + --prefix=$RPM_BUILD_ROOT$prefix \ + --dbpath=$RPM_BUILD_ROOT$prefix/RPM/DB \ + --list --quiet`; do + db_files="$db_files RPM/DB/$db_file" +done +chmod 644 $RPM_BUILD_ROOT$prefix/RPM/DB/* +files="$files $db_files" +( cd $RPM_BUILD_ROOT$prefix + $RPM_BUILD_ROOT$prefix/lib/openpkg/tar --no-recursion -cf - $files +) | $RPM_BUILD_ROOT$prefix/lib/openpkg/bzip2 -9 \ + >$RPM_BUILD_ROOT$prefix/openpkg.tar.bz2 +cp -p $RPM_BUILD_ROOT$prefix/lib/openpkg/tar \ + $RPM_BUILD_ROOT$prefix/openpkg.tar +cp -p $RPM_BUILD_ROOT$prefix/lib/openpkg/bzip2 \ + $RPM_BUILD_ROOT$prefix/openpkg.bzip2 +l_platform=`$tmpdir/rpm --eval '%{l_platform -p}'` +l_version=`$tmpdir/rpm -q --qf '%{version}' openpkg` +release_sh=`SOURCE release.sh` +l_release=`sh $release_sh -r "$l_version" -F "%t"` +cat $spec |\ + sed -e "/^%pre$/,/^%/ p" -e 'd' |\ + sed -e '/^%/d' -e 's/^ //' |\ + sed -e 's;%{[?]l_\([^:}]*\):\([^}]*\)};${\1+\2};g' \ + -e 's;%{![?]l_\([^:}]*\):\([^}]*\)};${\1-\2};g' \ + -e 's;%{[?]l_\([^:}]*\)};${\1+""};g' \ + -e 's;%{![?]l_\([^:}]*\)};${\1-""};g' \ + -e 's;%{l_\([^}]*\)};${\1};g' \ + >$tmpdir/rpm.pre +cat $spec |\ + sed -e "/^%post$/,/^%/ p" -e 'd' |\ + sed -e '/^%/d' -e 's/^ //' |\ + sed -e 's;%{[?]l_\([^:}]*\):\([^}]*\)};${\1+\2};g' \ + -e 's;%{![?]l_\([^:}]*\):\([^}]*\)};${\1-\2};g' \ + -e 's;%{[?]l_\([^:}]*\)};${\1+""};g' \ + -e 's;%{![?]l_\([^:}]*\)};${\1-""};g' \ + -e 's;%{l_\([^}]*\)};${\1};g' \ + >$tmpdir/rpm.post +sed <`SOURCE aux.wrapbin.sh` \ + -e "s;@SUSR@;$susr;" -e "s;@SGRP@;$sgrp;" \ + -e "s;@MUSR@;$musr;" -e "s;@MGRP@;$mgrp;" \ + -e "s;@RUSR@;$rusr;" -e "s;@RGRP@;$rgrp;" \ + -e "s;@NUSR@;$nusr;" -e "s;@NGRP@;$ngrp;" \ + -e "s;@SUID@;$suid;" -e "s;@SGID@;$sgid;" \ + -e "s;@MUID@;$muid;" -e "s;@MGID@;$mgid;" \ + -e "s;@RUID@;$ruid;" -e "s;@RGID@;$rgid;" \ + -e "s;@NUID@;$nuid;" -e "s;@NGID@;$ngid;" \ + -e "s;@l_prefix@;$prefix;" \ + -e "s;@l_platform@;$l_platform;" \ + -e "s;@l_release@;$l_release;" \ + -e "s;@l_version@;$l_version;" \ + -e "/^@PRE@/r $tmpdir/rpm.pre" \ + -e "/^@POST@/r $tmpdir/rpm.post" |\ + sed -e '/^@PRE@/d' -e '/^@POST@/d' >$tmpdir/openpkg.boot.tmp +echo . | awk '{ + for (i = 0; i < 8192; i++) { + printf(" "); + } +}' >>$tmpdir/openpkg.boot.tmp +rm -f $dstdir/openpkg-$v.$t.sh +dd if=$tmpdir/openpkg.boot.tmp bs=8192 count=8 \ + of=$dstdir/openpkg-$v.$t.sh 2>/dev/null +rm -f $tmpdir/openpkg.boot.tmp +( cd $RPM_BUILD_ROOT$prefix + $RPM_BUILD_ROOT$prefix/lib/openpkg/tar --no-recursion -cf - \ + openpkg.tar openpkg.bzip2 openpkg.tar.bz2 +) >>$dstdir/openpkg-$v.$t.sh + +# cleanup +echo "++ cleaning up" +cp `SOURCE rpmtool` $tmpdir/rpmtool +rm -rf $RPM_BUILD_ROOT +rm -rf $tmpdir/$name-$version +rm -f $tmpdir/rpm $tmpdir/rpm.[123] $tmpdir/.popt $tmpdir/rpm.pre $tmpdir/rpm.post +rm -f $prolog + +# final hint about results +echo "++ resulting OpenPKG bootstrap package files:" +(cd $dstdir; ls -l openpkg-$v.$t.sh openpkg-$v.$t.rpm openpkg-$v.src.rpm) +set +x +( echo "You have successfully built the OpenPKG Package from scratch" + echo "for prefix $prefix on target platform $l_platform. The input" + echo "was the OpenPKG Source Bootstrap Package in file:" + echo "" + echo " openpkg-$v.src.sh" + echo "" + echo "The results are the following three files:" + echo "" + echo " openpkg-$v.src.rpm" + echo " openpkg-$v.$t.rpm" + echo " openpkg-$v.$t.sh" + echo "" + echo "The first result file is the OpenPKG Source RPM Package," + echo "containing just the same contents than the OpenPKG Source" + echo "Bootstrap Package, but now in RPM format. Optionally use this" + echo "after the installation of the OpenPKG Binary Bootstrap Package" + echo "if you want to rebuild from source again (but then with RPM" + echo "available)." + echo "" + echo "The second result file is the OpenPKG Binary RPM Package," + echo "containing the installation files in RPM format for the OpenPKG" + echo "instance $prefix. Optionally use this after the installation of" + echo "the OpenPKG Binary Bootstrap Package if you want (usually for" + echo "fixing something) to reinstall (but then with RPM available)." + echo "" + echo "The third result file is the OpenPKG Binary Bootstrap Package," + echo "containing the installation files as a self-extracting shell" + echo "script for the OpenPKG instance $prefix. Use this in YOUR NEXT" + echo "STEP to initially create the OpenPKG instance from scratch." + echo "Hence, proceed now by running the following command:" + echo "" + 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` + if [ ".$musr.$rusr.$nusr" = ".$cusr.$cusr.$cusr" -o ".$cusr" = ".root" ]; then + echo " \$ sh openpkg-$v.$t.sh" + else + echo " \$ su root -c \"sh openpkg-$v.$t.sh\"" + fi +) | sh $tmpdir/rpmtool msg -b -t info +rm -f $tmpdir/rpmtool + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.com.pgp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.com.pgp Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,33 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: OpenPKG GmbH +Comment: http://openpkg.com/openpkg.com.pgp +Comment: gpg-pubkey-61b7ae34-4544a6af +Comment: 7D12 1A8F C05D C18A 4329 E9EF 6704 2EC9 61B7 AE34 + +mQGiBEVEpq8RBAD0cBTeK8ukoS5/GlbKbBgs7SkZBMXBvUZkh/qKYqqVtciw9tfj +ifbRmY/ug8AU+BDgFQdoJN5HcM5c0YyQjs1RhstNGm0qQITfF6byh78F/pqdxjOd +MKDMjgYHRPojjH2dElqtH5gFhpuyp12Ueg/wN9g9pk8EjTp9/qvTtv3ZpwCg29Hu +I7CLKuwiXfpTbZTqWerL+ikD/ixPat8L5lnVpz3UFV0Mk8tkDg9odnKtdyRd11WK +PyZ3VL01XTb3E1NQS6jbOycDi8GUwN92QCZ4NRrk7lA0mRtSjtxOhrhdSPgbDIli +s5lHtZzeUKWMSfz8GY5mRs0eCz7zV0VscUW5GpJUKtWiHiOddoNQdcBP5L8JN888 +wd3yA/9PGzwK752HMTELlpUExaQoc7HiCkhRNJ8271NknkyrWjVAgLNWvQ/7hTiM +Ns6Pmk7Nlla9hRkorxQ6MB/h7ZmQmLmqJlVcoXe2nAADdD30/p+o9BL15FEei0Ci +o7349iKh1qlieeSM0vmHL5Y2drshZEWSggCPHQHtd5rxWrkXUrQiT3BlblBLRyBH +bWJIIDxvcGVucGtnQG9wZW5wa2cuY29tPohhBBMRAgAhBQJFRKavAhsDBwsJCAcD +AgEEFQIIAwQWAgMBAh4BAheAAAoJEGcELslht640NYcAoL0yn8Ofk+B8cRFTY2CL +j1uIDiM8AKCQieJH/AX1UuQ505cKFGwGtYbVAbkCDQRFRKa3EAgAgXE7Gx0q+OH1 +6U2ZDDPsLRe1WwSVaXvS3Ra1ee2Jq4Tu/uja36r8IR/7JfBiG+qGvcrKdIsdNFhh +OL0Dd8O8BwMPAAvzUT35VC29lHzewPHnquSF7X7Q8Xsr+mwGLHPS8brX56XWmWtf +1L1Ulx+KbcM/d/B+vssxSB3FsIvK+C666wiX4oZWbxcA3sC66Jxs1tuo1jWDxcGD +hb63FMdWsZODBNOqlKrOCfT/PMaKVftG5lpKFd6H60pIbx0OagqnFML6FeHGy1O7 +PkghOgbX+NfuH30dJKFYdwpZEcsaSTI9vedcjg2SL9frQyW8QIrK5zbCZFD9lPXP +Cl+XM0APGwADBgf/Yjj0IUSNJ4kYq1/Ofa+TvC4hVRpvQAHq+81LoN+XDXerAtmc +okr3fgHqMJypVfnGt5p+q9LvyCyKThOIOcvRfPeN49vnbdgIgJADmOmGQ35naF4Y +6LIuqgugVr16hMJqJn3vZXdJptt0am2oZyy0lpOGOlm5A7nwpJcD08ywOfcWXPrX +ybv08mjl8WMAZZdwdP/WStw3sDmsBl8dMPoAGnbTzzu2TeNC1W0373lonj6cdkgl +G3q6OnePsCah7GCyO8qDzyJbXvKD99i8/Uowuo4hi14Mj6fvyQbIUvJ5+djSAeqb +WNgBsmm9u3NlF0aFU799viLKo4dRYdhMLcLJx4hJBBgRAgAJBQJFRKa3AhsMAAoJ +EGcELslht640GDcAn3r5Zyaey8Gd/X3/9ZoZ3KfTIt0nAKC/E5yRwNfdwBWvEN4h +iGriXwS53Q== +=txp0 +-----END PGP PUBLIC KEY BLOCK----- diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.net.pgp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.net.pgp Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,33 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: OpenPKG Foundation e.V. +Comment: http://openpkg.net/openpkg.net.pgp +Comment: gpg-pubkey-52197903-4544a74d +Comment: 3BD1 0E11 71B2 2598 D770 8C48 AEBE 7645 5219 7903 + +mQGiBEVEp00RBACdhq0jQoj4k1oOVCvWAT8frZYQ0GNOFeTyFeSZOq44nd0igYSr +G53mRYW35BjNoR3MRS1gP97bzQdxIIM6N/zmAAgWA6lxLYiNeguaXoen2IEQMEPe +zSn/TtBezh5J05eHwaPdaWBRbSQL0DCJzRSkM42OrWqWElVHepWZRgeztwCgthii +quz+EfoHMBADvl+ddA9BZt8D/Ao9cRMZyoyBbFZ570bxffbXuhT/Wkm/kabXJGbN +EiW5XnIU9djbsSsOO3zkVzAcQc/cCRu8QXXsiOGIVTt2aWPtWoNaqR4wJ7opAPjs +l1CQSFhY6cRy8AfaMWON1y/7mUPKgUJJp/3lrA0CocNTAV4t0uFdE6kiC5SgZBvt +QGz7A/wPt+VBcVQcnMCfEoTEOOOADMPKgtgVXbcpu50jLo/4VLqq8o+yu9Co5Lhg +pMhYZCRLDpfz/CUxqoeGz0ueRbcJTn5Q10IqU3V29xPp2ggJ9+e+UW1kb3O1Xq1e +q+/YtuaHkYFy013W1PJtBIMB4gzAhPwc4rmSvdgrEk3Bfzdcl7QtT3BlblBLRyBG +b3VuZGF0aW9uIGUuVi4gPG9wZW5wa2dAb3BlbnBrZy5uZXQ+iGEEExECACEFAkVE +p00CGwMHCwkIBwMCAQQVAggDBBYCAwECHgECF4AACgkQrr52RVIZeQOHwACeNKFH +CvxATT5o+j7Nwurp7N5y5QoAn0tR7/ArhfESFf8szFRF55TITYk2uQINBEVEp18Q +CADkoUfhKNEe1CAoCXSkjmxX6zvKuqmSDBapd6Op5N01NcKQR8m4hn82LA0XAvmY +JXBmx5pvfK3qsOisZ5JxXsNFTZ07FVOqPqyVijrzturEc104Vbf675IjDfkBNqkv +r6AwIMrx/G6BrnUtAZQq9bjGFc7UX4blYw42QznvRM7cWqbsk/8qJ6AtmPVdLzsO +TGh4qFqqlxdD+K1fNsK7OZYoy8jjbsGNYDHRLeCSSvdKUVf1M8CO3Z3jlmzCYqPx +RMvzWjneC5cOGUpyPBIsWtsSic2tF7d/WW7CZtzdbOTCKj2pyZUtcBWFPgRFDaCr +l4ROZ83otv18aTCN7gqjoWH3AAMFB/9grTw4qLVntC115aFFwUks+IQ2DgNbAWK0 +Hxb3GmV21STbKPu+C98JB1ubCuT65LiqkELt/ZopgxXLKRhsSJkT2fJ/UtLINs+p +3kS+O+NcGcp8TWnQTM+8UfNv6cL/px9AivpfvAJW+6CFmWACOJymZQ1Nfym7rgpD +t/p/nMlU2w9BdYeF2E3vgdH0GLVdJnS5IV7gb4nFXn9yTNcFnKivbCI3zUP0c7dW +7sm6nuwg0erZvXgkw9Rwf9qYTARzYGIBxrjoPqc8zvhKcKmKo8tAGw+tVkqqFnlw +M53Fhyla+jA+Ck2do3qCzLz55p6xTIn5Dd6zhjP8nmiRyOh8RWjmiEkEGBECAAkF +AkVEp18CGwwACgkQrr52RVIZeQNX0ACfRZrb8BrnwFD0IBAaeDVxH22HNx4An0Wc +tcWorS8jCruV8lP/4tfKEJoT +=WOpb +-----END PGP PUBLIC KEY BLOCK----- diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.org.pgp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.org.pgp Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,32 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: OpenPKG +Comment: http://openpkg.org/openpkg.org.pgp +Comment: gpg-pubkey-63c4cb9f-3c591eda +Comment: 6D96 EFCF CF75 3288 10DB 40C2 8075 93E0 63C4 CB9F + +mQGiBDxZHtoRBADCER9+ncfA7yi5ZyCrgmQwbPjvdAPFnVrUVIiFcvBH5qWpoVOG +l3BG+fI2DZEO07Lz9Z/IHTE9iTgrV9Dh278oZuK+UW7jBovByjHCJd875diSU7Od +SaujLBnvDRbAfcgG/kRJI5G8Pmfd39RViQBdw1MZ5ZnHoM810peUv3RLawCg+msN +ORnJ7JHnEpnrhxOQ1S1cBSMD/0skJcwYn4ORXBCUSpBqzk2Haoch7Eko//H3fQqT +gA/SVGxcMteFCtoqHbowsfHdeNOyEkjf4umcdJo9Yiwk65oHGwBuvqhsTpQ7mzRq +dLVAFlpU8pecMfT3ZWCnB+7UfFIzZYemu1RbX5Hn9/kmK9kvu1djmqL+XMlhtS66 +4XH5A/4q7EdCHgrskxViW2MYfINkfWxwYaHv/9UsnmFQXb6Lm6FfU9icNaYieRv1 +yJTAOo+G7m+JEXnXJPv2wiVs0xzI0Ni0WWJo/ILihFGxwma7+auICUYmncnimWkl +cWAMEspKb439f1j6X3ABQNXsf1li+w3ro7yjpaI2gr5fGX1UU7QdT3BlblBLRyA8 +b3BlbnBrZ0BvcGVucGtnLm9yZz6IVwQTEQIAFwUCPFke2gULBwoDBAMVAwIDFgIB +AheAAAoJEIB1k+BjxMufXz8An0zGGFWZlQWMumfQ9GX16GNRh5MoAKCqw7xmuDN5 +jWVoSUiDOJlRf3LVL7kCDQQ8WR7iEAgApQrOX0sAWmlKNAwyxUyNbmgBnyqSIcI+ +d8u81kuuOEPpEsiPOG5YI/Bc5osrTGT2q4hdTX9nETqXXRGe+Hu0czHADMS5stPJ +bSlBVg4VaiKkSTElssiNLNMWPb51UTP/mPYOa7zOhkhXrg49WnvizNBZdurGoLpr +YDBIo7XW1k8QwJe43xn/GWO8pwTMDr/UUfEPZcSOqdWpkXB9OzPNiq3S+Armnv81 +FakrGCmRWDq4AWtmy2AVpQlcrkG0tQVq0QhFvz8yZ1lKbilrwEIYIEp56wF4k7D9 +t0Vpbi2RhbD/dcfgDN7E+DmEL4VHXBXIz63fnH4duebLTRLV7Qj+ewADBQf/Us7j +pY8n6jidAE3PtSy3rB+pN2+tzMtov6A+Zx2GHRefM9AwDLe6PRgJTVVQE9WTreuY +N33y3hf1PvYVBqhxAr031QqCHh1QdvrCJS0qUZk90it3EXUgAyRkD6vJobnsTkqH +aO1Ndqx8hQFYjpC5Fh3QVNKz4uACwjWPKTkRdihR5clfqIcZ9Mor8A3FBlYA7C8w ++O08uA+OTOmz9CrQlpwRUqaOKRepatv+MMYC4L/CtZEYUvc+fzm3XUYjolZGQiJQ +T4Kr1XC4sIy22V/oB3dWaJtAbHiTnEmuccn0Q8cOO+K1pZPlTjRjx0E9ZEoy4AXc +ataTO6Zyzcp2OkHyAYhGBBgRAgAGBQI8WR7iAAoJEIB1k+BjxMufQCwAoMk2qYPz +k/zbdWHw3BNDlsgo3iUCAJ9uDTvjgw87W5VP02WcgqtZzfLPhQ== +=vXJp +-----END PGP PUBLIC KEY BLOCK----- diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.pod --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.pod Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,86 @@ +## +## openpkg -- OpenPKG Tool Chain +## 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. +## +## openpkg.pod: Minimum Execution Frontend (Language: Perl POD) +## + +=pod + +=head1 NAME + +B -- Cross-Platform Unix Software Packaging Facility + +=head1 SYNOPSIS + +=over 4 + +=item Command Line Interface + +$ B [I ...] I [I ...] [I ...] + +$ B B I + +=item Project Locations + + http://www.openpkg.org/ web service + http://cvs.openpkg.org/ repository service + http://pgp.openpkg.org/ OpenPGP service + ftp://ftp.openpkg.org/ download service + +=item Project Forums + + petidomo@openpkg.org mailing-list manager + openpkg-announce@openpkg.org project announcements + openpkg-dev@openpkg.org developer forum + openpkg-users@openpkg.org users forum + +=item Local Documentation + + openpkg-rpm(1) RPM package manager + openpkg-rpmbuild(1) RPM package manager (build only) + openpkg-rpm2cpio(1) RPM payload utility + openpkg-rpm-config(1) RPM C API utility + openpkg-lsync(1) local area synchronization + openpkg-rc(1) run-command facility + +=back + +=head1 DESCRIPTION + +OpenPKG is the world leading instrument for deployment and maintenance +of Open Source software when administration crosses Unix platform +boundaries. The OpenPKG project is a collaboration effort with the +goal of creating and maintaining portable and easy to install software +packages for use on the major Unix server platforms. + +The unique OpenPKG architecture leverages proven technologies like +Red Hat Package Manager (RPM) to establish a unified administration +environment, independent of the underlying operating system. OpenPKG +is completely self-contained and does not even need a preinstallation +of RPM. Instead, RPM is provided as an OpenPKG RPM package itself plus +a tricky bootstrapping procedure in order to allow one to create from +scratch the initial state of the whole OpenPKG software packaging +system. + +=cut + diff -r 333964c621f1 -r cb59d6afeb61 openpkg/openpkg.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/openpkg.sh Tue Jan 06 23:40:39 2009 +0100 @@ -0,0 +1,299 @@ +#!@l_prefix@/lib/openpkg/bash +## +## openpkg -- OpenPKG Tool Chain +## 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. +## +## openpkg.sh: Execution Frontend (Language: Bourne-Shell) +## + +## +## command line parsing +## + +# command line options defaults +opt_prefix="" +opt_tools="" +opt_version=no +opt_help=no + +# process command line options by iterating over arguments +for opt +do + case "${opt}" in + -*=*) arg=`echo "${opt}" | sed 's/^[-_a-zA-Z0-9]*=//'` ;; + *) arg='' ;; + esac + case "${opt}" in + -v|--version ) opt_version=yes; shift ;; + -h|--help ) opt_help=yes; shift ;; + --prefix=* ) opt_prefix="${arg}"; shift ;; + --tools=* ) opt_tools="${arg}"; shift ;; + -* ) echo "openpkg:ERROR: Invalid command-line option \"${opt}\"." 1>&2 + echo "openpkg:ERROR: Run \"${0} --help\" for list of valid options" 1>&2; exit 1 ;; + * ) break ;; + esac +done + +## +## determine OpenPKG locations +## + +# determine path to OpenPKG instance +openpkg_prefix="@l_prefix@" +if [ ".${OPENPKG_PREFIX}" != . ]; then + openpkg_prefix="${OPENPKG_PREFIX}" +fi +if [ ".${opt_prefix}" != . ]; then + openpkg_prefix="${opt_prefix}" +fi +if [ -x "${openpkg_prefix}/bin/openpkg" -a -x "${openpkg_prefix}/libexec/openpkg/rpm" ]; then + # OpenPKG 2.0 and higher + true +elif [ -f "${openpkg_prefix}/bin/rpm" -a -x "${openpkg_prefix}/lib/openpkg/rpm" ]; then + # OpenPKG 1.x + echo "openpkg:ERROR: OpenPKG 1.x instance found under \"${openpkg_prefix}\" (not supported)" 1>&2 + exit 1 +else + echo "openpkg:ERROR: no OpenPKG instance found under \"${openpkg_prefix}\"" 1>&2 + exit 1 +fi + +# allow convenient all-in-one specification of OpenPKG Tool Chain locations +# (assuming the filesystem layout of an uninstalled OpenPKG Tool Chain) +openpkg_tools="${OPENPKG_TOOLS}" +openpkg_tools_cmdpath="${OPENPKG_TOOLS_CMDPATH}" +openpkg_tools_apipath="${OPENPKG_TOOLS_APIPATH}" +if [ ".${opt_tool}" != . ]; then + openpkg_tools="${opt_tools}" +fi +if [ ".${openpkg_tools}" != . -a ".${openpkg_tools_cmdpath}" = . ]; then + openpkg_tools_cmdpath="${openpkg_tools}/cmd:@" +fi +if [ ".${openpkg_tools}" != . -a ".${openpkg_tools_apipath}" = . ]; then + openpkg_tools_apipath="${openpkg_tools}/api:@" +fi + +# determine path to OpenPKG Tool Chain commands +cmdpath="${openpkg_prefix}/libexec/openpkg" +if [ -d "${openpkg_prefix}/libexec/openpkg-tools" ]; then + # openpkg-tools package overrides + cmdpath="${openpkg_prefix}/libexec/openpkg-tools:${cmdpath}" +fi +if [ -d "${openpkg_prefix}/libexec/openpkg-audit" ]; then + # openpkg-audit package overrides + cmdpath="${openpkg_prefix}/libexec/openpkg-audit:${cmdpath}" +fi +if [ ".${openpkg_tools_cmdpath}" != . ]; then + # user supplied path overrides + cmdpath=`echo "${openpkg_tools_cmdpath}" | sed -e "s;@;${cmdpath};"` +fi +openpkg_tools_cmdpath=`echo "${cmdpath}" | sed -e 's/::/:/g' -e 's/^://' -e 's/:$//'` + +# determine path to OpenPKG Tool Chain API +apipath="" +if [ -d "${openpkg_prefix}/lib/openpkg-tools" ]; then + # openpkg-tools package overrides + apipath="${openpkg_prefix}/lib/openpkg-tools:${apipath}" +fi +if [ ".${openpkg_tools_apipath}" != . ]; then + # user supplied path overrides + apipath=`echo "${openpkg_tools_apipath}" | sed -e "s;@;${apipath};"` +fi +openpkg_tools_apipath=`echo "${apipath}" | sed -e 's/::/:/g' -e 's/^://' -e 's/:$//'` + +## +## execute stand-alone option commands in advance +## + +# implement stand-alone "--help" option +if [ ".${opt_help}" = .yes ]; then + release=`${openpkg_prefix}/libexec/openpkg/rpm --eval '%{l_openpkg_release}'` + echo "" + echo "This is ${release} " + echo "Cross-Platform Unix Software Packaging Facility" + echo "" + echo "Copyright (c) 2000-2007 OpenPKG Foundation e.V. " + echo "Copyright (c) 2000-2007 Ralf S. Engelschall " + echo "" + echo "The command \"${openpkg_prefix}/bin/openpkg\" is the official command-line" + echo "execution frontend of the OpenPKG tool chain. Its usage is:" + echo "" + echo " \$ ${openpkg_prefix}/bin/openpkg [