OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 29-Oct-2003 17:33:49
Branch: HEAD Handle: 2003102916334900
Modified files:
openpkg-src/openpkg HISTORY aux.wrapbin.sh openpkg.boot
Log:
switch from uncompressed binary tarball to compressed tarball in
tarball encapsulation
Summary:
Revision Changes Path
1.84 +1 -0 openpkg-src/openpkg/HISTORY
1.11 +26 -14 openpkg-src/openpkg/aux.wrapbin.sh
1.38 +26 -17 openpkg-src/openpkg/openpkg.boot
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/HISTORY
============================================================================
$ cvs diff -u -r1.83 -r1.84 HISTORY
--- openpkg-src/openpkg/HISTORY 29 Oct 2003 12:57:04 -0000 1.83
+++ openpkg-src/openpkg/HISTORY 29 Oct 2003 16:33:49 -0000 1.84
@@ -2,6 +2,7 @@
2003
====
+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
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/aux.wrapbin.sh
============================================================================
$ cvs diff -u -r1.10 -r1.11 aux.wrapbin.sh
--- openpkg-src/openpkg/aux.wrapbin.sh 29 Oct 2003 12:57:04 -0000 1.10
+++ openpkg-src/openpkg/aux.wrapbin.sh 29 Oct 2003 16:33:49 -0000 1.11
@@ -93,7 +93,7 @@
help=1
fi
if [ ".$help" = .1 ]; then
- echo "Usage: sh $0 [-h|--help] [-v|--verbose] [--prefix=<prefix>]" 2>&1
+ echo "Usage: sh $me [-h|--help] [-v|--verbose] [--prefix=<prefix>]" 2>&1
exit 1
fi
@@ -104,10 +104,8 @@
(who am i | cut "-d " -f1) 2>/dev/null ||\
echo $LOGNAME`
-# perform the installation
-echo "$0: installing into $prefix..."
-
# the reason of the following magic you certainly don't want to understand ;)
+echo "++ hooking into system environment"
set -- 1
@PRE@
@@ -115,6 +113,7 @@
# and has correct permissions and owner/group
if [ ! -d $prefix ]; then
# create prefix/root directory from scratch
+ echo "++ creating OpenPKG instance root $prefix"
d=''
for c in `IFS=/; echo $prefix`; do
d="$d/$c"
@@ -129,6 +128,7 @@
done
else
# adjust already existing prefix/root directory
+ echo "++ fixating OpenPKG instance root $prefix"
chmod 755 $prefix || exit 1
if [ ".$cusr" = .root ]; then
chown $musr $prefix >/dev/null 2>&1 || true
@@ -136,18 +136,30 @@
fi
fi
-# extract installation files
-dd if=$me bs=8192 skip=8 2>/dev/null | (cd $prefix; tar x${v}f - 2>/dev/null)
-if [ ".$cusr" = .root ]; then
- ( cd $prefix || exit 1
- chown -R -h $musr . >/dev/null 2>&1 || true
- chgrp -R -h $mgrp . >/dev/null 2>&1 || true
- ) || exit 1
-fi
-echo "$0: installation done."
+# extract and install binary distribution files
+echo "++ extracting binary distribution"
+dd if=$me bs=8192 skip=8 2>/dev/null |\
+ (cd $prefix; tar x${v}f - 2>/dev/null)
+echo "++ installing binary distribution"
+( cd $prefix || exit 1
+ ./openpkg.bzip2 -d -c openpkg.tar.bz2 | ./openpkg.tar x${v}f - 2>/dev/null
+ rm -f openpkg.tar openpkg.bzip2 openpkg.tar.bz2 >/dev/null 2>&1 || true
+) || exit 1
+
+# fixate installation files
+echo "++ fixating OpenPKG installation files"
+( echo 'fixate () {'
+ echo ' chmod "$1" "$4"'
+ echo ' chown "$2" "$4"'
+ echo ' chgrp "$3" "$4"'
+ echo '}'
+ $prefix/bin/rpm -qa \
+ --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$prefix;"
+) | sh 2>/dev/null || true
# die explicitly just before the shell would discover
-# that we carry mega-bytes of data with us...
+# that we carry mega-bytes of data with us... ;-)
exit 0
# the distribution tarball is appended in raw format directly to the
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/openpkg.boot
============================================================================
$ cvs diff -u -r1.37 -r1.38 openpkg.boot
--- openpkg-src/openpkg/openpkg.boot 29 Oct 2003 12:57:04 -0000 1.37
+++ openpkg-src/openpkg/openpkg.boot 29 Oct 2003 16:33:49 -0000 1.38
@@ -535,6 +535,30 @@
# 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;%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
cat $spec |\
sed -e "/^%pre$/,/^%/ p" -e 'd' |\
sed -e '/^%/d' -e 's/^ //' |\
@@ -565,24 +589,9 @@
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
-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;%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/tar --no-recursion -cf - \
+ openpkg.tar openpkg.bzip2 openpkg.tar.bz2
) >>$dstdir/openpkg-$v.$t.sh
# cleanup
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]