OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 11-Aug-2006 20:40:40
Branch: HEAD Handle: 2006081119403801
Modified files:
openpkg-src/openpkg HISTORY install.sh openpkg.spec
Removed files:
openpkg-src/openpkg build.sh
Log:
Welcome back "openpkg build" in the OpenPKG bootstrap package!
We now provide a copy of the "openpkg build" command directly within
the bootstrap for making it as easy as possible to "get started" with
OpenPKG. This requires *no* Perl installation, as it is able to directly
run with our "miniperl" (which is part of the bootstrap since recently),
as it was already written with this purpose in mind a few years ago.
After we've recently worked off the implementation it is now our primary
deployment tool, although it still has a few small shortcomings.
Summary:
Revision Changes Path
1.354 +2 -0 openpkg-src/openpkg/HISTORY
1.6 +0 -128 openpkg-src/openpkg/build.sh
1.12 +2 -88 openpkg-src/openpkg/install.sh
1.507 +18 -6 openpkg-src/openpkg/openpkg.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/HISTORY
============================================================================
$ cvs diff -u -r1.353 -r1.354 HISTORY
--- openpkg-src/openpkg/HISTORY 9 Aug 2006 13:10:42 -0000 1.353
+++ openpkg-src/openpkg/HISTORY 11 Aug 2006 18:40:38 -0000 1.354
@@ -2,6 +2,8 @@
2006
====
+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)
@@ .
rm -f openpkg-src/openpkg/build.sh <<'@@ .'
Index: openpkg-src/openpkg/build.sh
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/install.sh
============================================================================
$ cvs diff -u -r1.11 -r1.12 install.sh
--- openpkg-src/openpkg/install.sh 22 Jun 2006 08:51:06 -0000 1.11
+++ openpkg-src/openpkg/install.sh 11 Aug 2006 18:40:39 -0000 1.12
@@ -40,92 +40,6 @@
exit 1
fi
-# determine OpenPKG distribution URLs
-url_raw=`$OPENPKG_PREFIX/bin/openpkg release --fmt="%u"`
-url_src=""
-url_upd=""
-case "$url_raw" in
- */SRC ) ;;
- */ ) url_src="${url_raw}SRC"; url_upd="${url_raw}UPD" ;;
- * ) url_src="${url_raw}/SRC"; url_upd="${url_raw}/UPD" ;;
-esac
-
-# determine path to binary RPMs
-rpmdir=`$OPENPKG_PREFIX/bin/openpkg rpm --eval '%{_rpmdir}'`
-rpmtag=`$OPENPKG_PREFIX/bin/openpkg rpm --eval '%{l_platform -p}-%{l_tag}'`
-
-# iterate through package installation in dependency order
-for pkg in openpkg make binutils gcc perl openpkg-tools; do
- # determine latest package version and URL
- pkg_srpm=""
- pkg_name=""
- for url in $url_upd $url_src $url_raw; do
- if [ ".$url" = . ]; then
- continue
- fi
- pkg_name=`$OPENPKG_PREFIX/lib/openpkg/curl -s "$url/00INDEX.rdf.bz2"
|\
- $OPENPKG_PREFIX/lib/openpkg/bzip2 -d |\
- egrep "rdf:Description about=\"${pkg}-[0-9]" |\
- sed -e 's;^.*rdf:Description about="\([^"]*\)".*$;\1;' |\
- sed -e "s;^;X;" \
- -e "s;^X${pkg}-\\([0-9][^-]*\\)-\\([^-][^-]*\\);\\2:\\1;" \
- -e "s;^X.*;;" |\
- sort -r | sed -e 'q' |\
- sed -e "s;^\\([^:]*\\):\\(.*\\);${pkg}-\\2-\\1;"`
- if [ ".$pkg_name" != . ]; then
- pkg_srpm="$url/$pkg_name.src.rpm"
- break
- fi
- done
- if [ ".$pkg_name" = . ]; then
- echo "openpkg:ERROR: package \"$pkg\" not found under URLs:" 1>&2
- if [ ".$url_upd" != . ]; then
- echo "openpkg:ERROR: $url_upd" 1>&2
- fi
- if [ ".$url_src" != . ]; then
- echo "openpkg:ERROR: $url_src" 1>&2
- fi
- echo "openpkg:ERROR: $url_raw" 1>&2
- exit 1
- fi
-
- # check whether package is already installed
- if [ ".`$OPENPKG_PREFIX/bin/openpkg rpm -q $pkg_name | grep -v 'is not
installed'`" != . ]; then
- continue
- fi
-
- # build binary package from source package
- if [ ! -f "$rpmdir/$pkg_name.$rpmtag.rpm" ]; then
- echo "++ fetching and building source package \"$pkg_name.src.rpm\""
- $OPENPKG_PREFIX/bin/openpkg rpm --rebuild $pkg_srpm
- if [ $? -ne 0 ]; then
- echo "openpkg:ERROR: failed to build package \"$pkg_name\" (RPM
returned with $?)" 1>&2
- exit 1
- fi
- if [ ! -f "$rpmdir/$pkg_name.$rpmtag.rpm" ]; then
- echo "openpkg:ERROR: failed to build package \"$pkg_name\" (RPM
returned successfully but there is no $rpmdir/$pkg_name.$rpmtag.rpm)" 1>&2
- exit 1
- fi
- fi
-
- # install binary package
- echo "++ installing binary package \"$pkg_name.$rpmtag.rpm\""
- $OPENPKG_PREFIX/bin/openpkg rpm -Uvh "$rpmdir/$pkg_name.$rpmtag.rpm"
- if [ $? -ne 0 ]; then
- echo "openpkg:ERROR: failed to install package \"$pkg_name\" (RPM
returned with $?)" 1>&2
- exit 1
- fi
-done
-
-# display final result message
-if [ -d "$OPENPKG_PREFIX/lib/openpkg-tools" ]; then
- ( echo "Congratulations, you have bootstrapped the OpenPKG Tool Chain."
- echo "You now have additional management commands available. Run"
- echo " \$ $OPENPKG_PREFIX/bin/openpkg --help"
- echo "for more details on the actual list of available commands."
- ) | $OPENPKG_PREFIX/lib/openpkg/rpmtool msg -b -t notice
-else
- echo "openpkg:ERROR: failed to install package \"openpkg-tools\"" 1>&2
- exit 1
-fi
+# pass-through operation to "openpkg build" tool
+$OPENPKG_PREFIX/bin/openpkg build openpkg-tools | sh
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/openpkg.spec
============================================================================
$ cvs diff -u -r1.506 -r1.507 openpkg.spec
--- openpkg-src/openpkg/openpkg.spec 9 Aug 2006 13:10:42 -0000 1.506
+++ openpkg-src/openpkg/openpkg.spec 11 Aug 2006 18:40:39 -0000 1.507
@@ -38,7 +38,7 @@
# o any cc(1)
# the package version/release
-%define V_openpkg 20060809
+%define V_openpkg 20060811
# the used software versions
%define V_rpm 4.2.1
@@ -56,6 +56,7 @@
%define V_registry 0.7.2
%define V_perl 5.8.8
%define V_openssl 0.9.8b
+%define V_tools 0.8.66
# package information
Name: openpkg
@@ -135,7 +136,7 @@
Source61: uuid.pod
Source62: uuid.sh
Source63:
ftp://ftp.openpkg.org/sources/CPY/openpkg-registry/openpkg-registry-%{V_registry}.tar.gz
-Source64: build.sh
+Source64:
ftp://ftp.openpkg.org/sources/CPY/openpkg-tools/openpkg-tools-%{V_tools}.tar.gz
Source65:
ftp://ftp.openpkg.org/sources/CPY/perl/perl-%{V_perl}-mini.tar.gz
Source66: ftp://ftp.openssl.org/source/openssl-%{V_openssl}.tar.gz
Source67: perl.patch
@@ -250,6 +251,11 @@
url = ftp://ftp.openssl.org/source/
regex = openssl-(\d+\.\d+\.\d+[a-z]?)\.tar\.gz
}
+ prog openpkg:openpkg-tools = {
+ version = %{V_tools}
+ url = ftp://ftp.openpkg.org/sources/CPY/openpkg-tools/
+ regex = openpkg-tools-(__VER__)\.tar\.gz
+ }
%prep
# skip in bootstrap phase 2 (see openpkg.boot)
@@ -573,6 +579,7 @@
${l_gzip} -dc `SOURCE openpkg-registry-%{V_registry}.tar.gz` | ${l_tar}
xf - 2>/dev/null || true
${l_gzip} -dc `SOURCE perl-%{V_perl}-mini.tar.gz` | ${l_tar} xf -
2>/dev/null || true
${l_gzip} -dc `SOURCE openssl-%{V_openssl}.tar.gz` | ${l_tar} xf -
2>/dev/null || true
+ ${l_gzip} -dc `SOURCE openpkg-tools-%{V_tools}.tar.gz` | ${l_tar} xf -
2>/dev/null || true
# update config.guess/config.sub
for dir in rpm-%{V_rpm} rpm-%{V_rpm}/popt beecrypt-%{V_beecrypt} \
@@ -1121,6 +1128,13 @@
cp register.8 $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/register.8
) || exit $?
+ # install OpenPKG Tool Chain command subset
+ ( cd openpkg-tools-%{V_tools}
+ cp cmd/build.pl $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/build.pl
+ chmod 644 $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/build.pl
+ cp cmd/build.8 $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/build.8
+ ) || exit $?
+
# install RPM extension
( cd rpm-%{V_rpm}
cp file/file $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file
@@ -1196,9 +1210,6 @@
<`SOURCE install.sh`
>$RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/install
chmod a+x $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/install
sed -e "s;@l_prefix@;%{l_prefix};g" \
- <`SOURCE build.sh` >$RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/build
- chmod a+x $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/build
- sed -e "s;@l_prefix@;%{l_prefix};g" \
<`SOURCE man.sh` >$RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/man
chmod a+x $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/man
@@ -1422,7 +1433,8 @@
%{l_prefix}/libexec/openpkg/uuid
%{l_prefix}/libexec/openpkg/uuid.8
%{l_prefix}/libexec/openpkg/man
- %{l_prefix}/libexec/openpkg/build
+ %{l_prefix}/libexec/openpkg/build.pl
+ %{l_prefix}/libexec/openpkg/build.8
%{l_prefix}/libexec/openpkg/install
%{l_prefix}/libexec/openpkg/lsync
%{l_prefix}/libexec/openpkg/lsync.8
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]