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 openpkg-web Date: 29-Oct-2003 13:57:05
Branch: HEAD Handle: 2003102912570202
Modified files:
openpkg-src/openpkg HISTORY aux.wrapbin.sh aux.wrapsrc.sh openpkg.boot
openpkg.spec
openpkg-web news.txt
Log:
Switch from uuencoded to raw distribution tarballs for the source
and binary bootstrap *.sh files. This removes the dependency to
uuencode/uudecode (remember that some brain-dead platforms like SuSE
do not have them installed in their standard set of packages) and
especially reduces the .sh files 30% in size.
Summary:
Revision Changes Path
1.83 +1 -0 openpkg-src/openpkg/HISTORY
1.10 +37 -11 openpkg-src/openpkg/aux.wrapbin.sh
1.10 +10 -12 openpkg-src/openpkg/aux.wrapsrc.sh
1.37 +25 -10 openpkg-src/openpkg/openpkg.boot
1.239 +1 -1 openpkg-src/openpkg/openpkg.spec
1.7216 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/HISTORY
============================================================================
$ cvs diff -u -r1.82 -r1.83 HISTORY
--- openpkg-src/openpkg/HISTORY 28 Oct 2003 15:59:20 -0000 1.82
+++ openpkg-src/openpkg/HISTORY 29 Oct 2003 12:57:04 -0000 1.83
@@ -2,6 +2,7 @@
2003
====
+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
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/aux.wrapbin.sh
============================================================================
$ cvs diff -u -r1.9 -r1.10 aux.wrapbin.sh
--- openpkg-src/openpkg/aux.wrapbin.sh 29 Jul 2003 10:19:37 -0000 1.9
+++ openpkg-src/openpkg/aux.wrapbin.sh 29 Oct 2003 12:57:04 -0000 1.10
@@ -25,11 +25,10 @@
##
# defaults
-f="$0"
+me="$0"
help=0
verbose=0
prefix='@l_prefix@'
-tgz='@TGZ@'
susr='@SUSR@'
sgrp='@SGRP@'
musr='@MUSR@'
@@ -47,6 +46,35 @@
nuid='@NUID@'
ngid='@NGID@'
+# establish standard environment
+LC_CTYPE=C
+export LC_CTYPE
+umask 022
+
+# make sure all essential unpacking tools are available
+for tool in sed mkdir dd tar chown chgrp; do
+ found=0
+ case $tool in
+ /* )
+ if [ -f $tool ]; then
+ found=1
+ fi
+ ;;
+ * )
+ for p in `IFS=:; echo $PATH`; do
+ if [ -f "$p/$tool" ]; then
+ found=1
+ break
+ fi
+ done
+ ;;
+ esac
+ if [ $found -eq 0 ]; then
+ echo "$me: unable to find tool \"$tool\"" 1>&2
+ exit 1
+ fi
+done
+
# parse command line options
for opt
do
@@ -69,11 +97,6 @@
exit 1
fi
-# establish standard environment
-LC_CTYPE=C
-export LC_CTYPE
-umask 022
-
# determine current username
cusr=`(id -un) 2>/dev/null ||\
(id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\
@@ -114,9 +137,7 @@
fi
# extract installation files
-uudecode $f || exit 1
-cat $tgz | (cd $prefix; tar x${v}f -)
-rm -f $tgz >/dev/null 2>&1
+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
@@ -129,4 +150,9 @@
# that we carry mega-bytes of data with us...
exit 0
-# the distribution tarball
+# 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).
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/aux.wrapsrc.sh
============================================================================
$ cvs diff -u -r1.9 -r1.10 aux.wrapsrc.sh
--- openpkg-src/openpkg/aux.wrapsrc.sh 5 Oct 2003 10:59:50 -0000 1.9
+++ openpkg-src/openpkg/aux.wrapsrc.sh 29 Oct 2003 12:57:04 -0000 1.10
@@ -27,7 +27,6 @@
# program parameters
me="$0"
dir='@DIR@'
-tgz='@TGZ@'
# establish standard environment
LC_CTYPE=C
@@ -36,7 +35,7 @@
# make sure all essential unpacking tools are available
# (the build tools are checked later from within openpkg.spec)
-for tool in /bin/sh uudecode mkdir cat tar rm chown chgrp sed; do
+for tool in /bin/sh mkdir cat tar rm chown chgrp sed dd; do
found=0
case $tool in
/* )
@@ -103,22 +102,17 @@
# extract the tarball
echo "$me: extracting to $dir..."
-uudecode $me || exit 1
-if [ ! -f $tgz ]; then
- echo "$me: failed to uudecode \"$me\" into tarball \"$tgz\"" 1>&2
- exit 1
-fi
rm -rf $dir >/dev/null 2>&1
mkdir $dir || exit 1
-cat $tgz | (cd $dir; tar x${v}f - 2>/dev/null)
+dd if=$me bs=8192 skip=8 2>/dev/null | (cd $dir; tar x${v}f - 2>/dev/null)
if [ ".$cusr" = .root ]; then
- ( cd $dir
+ ( cd $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 $dir/openpkg.boot ]; then
- echo "$me: failed to unpack tarball \"$tgz\" into directory \"$dir\"" 1>&2
+ echo "$me: failed to unpack into directory \"$dir\"" 1>&2
exit 1
fi
echo "$me: extraction done."
@@ -133,11 +127,15 @@
echo "$me: cleaning up..."
cd ..
rm -rf $dir >/dev/null 2>&1
-rm -f $tgz >/dev/null 2>&1
echo "$me: cleaned up."
# die explicitly just before the shell would discover
# that we carry mega-bytes of data with us...
exit 0
-# the distribution tarball
+# 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).
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/openpkg.boot
============================================================================
$ cvs diff -u -r1.36 -r1.37 openpkg.boot
--- openpkg-src/openpkg/openpkg.boot 14 Oct 2003 13:09:41 -0000 1.36
+++ openpkg-src/openpkg/openpkg.boot 29 Oct 2003 12:57:04 -0000 1.37
@@ -174,11 +174,17 @@
) >$tmpdir/.sh
sh $tmpdir/.sh
rm -f $tmpdir/.sh
- sed <$srcdir/aux.wrapsrc.sh >$pkgdir/$name-$version-$release.src.sh \
- -e "s;@DIR@;$name-$version-$release.src;" -e
"s;@TGZ@;$name-$version-$release.src.tar;"
- (cd $tmpdir && tar cf - *) |\
- uuencode $name-$version-$release.src.tar |\
- dd bs=64000 2>/dev/null >>$pkgdir/$name-$version-$release.src.sh
+ sed <$srcdir/aux.wrapsrc.sh >$tmpdir/openpkg.boot.tmp \
+ -e "s;@DIR@;$name-$version-$release.src;"
+ 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
@@ -547,9 +553,18 @@
-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;@TGZ@;openpkg-$v.$t.tar;" \
+ -e "s;@l_prefix@;$prefix;" \
-e "/[EMAIL PROTECTED]@/r $tmpdir/rpm.pre" |\
- sed -e '/[EMAIL PROTECTED]@/d' >$dstdir/openpkg-$v.$t.sh
+ sed -e '/[EMAIL PROTECTED]@/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
files=`cat $spec |\
sed -e '1,/%files/d' -e '/%clean/,$d' |\
grep -v '^ *$' | grep -v '%defattr' |\
@@ -566,9 +581,9 @@
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) |\
-$l_uuencode openpkg-$v.$t.tar >>$dstdir/openpkg-$v.$t.sh
+( cd $RPM_BUILD_ROOT$prefix
+ $RPM_BUILD_ROOT$prefix/lib/openpkg/tar --no-recursion -cf - $files
+) >>$dstdir/openpkg-$v.$t.sh
# cleanup
echo "++ cleaning up"
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/openpkg.spec
============================================================================
$ cvs diff -u -r1.238 -r1.239 openpkg.spec
--- openpkg-src/openpkg/openpkg.spec 28 Oct 2003 06:08:07 -0000 1.238
+++ openpkg-src/openpkg/openpkg.spec 29 Oct 2003 12:57:04 -0000 1.239
@@ -39,7 +39,7 @@
# o any cc(1)
# the package version/release
-%define V_openpkg 20031028
+%define V_openpkg 20031029
# the used software versions
%define V_rpm 4.2.1
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.7215 -r1.7216 news.txt
--- openpkg-web/news.txt 29 Oct 2003 12:06:39 -0000 1.7215
+++ openpkg-web/news.txt 29 Oct 2003 12:57:02 -0000 1.7216
@@ -1,3 +1,4 @@
+29-Oct-2003: Upgraded package: P<openpkg-20031029-20031029>
29-Oct-2003: Upgraded package: P<amd-6.0.9-20031029>
29-Oct-2003: Upgraded package: P<libxml-2.6.1-20031029>
29-Oct-2003: Upgraded package: P<perl-comp-20031029-20031029>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]