openpkg/openpkg.boot

changeset 428
f880f219c566
parent 13
cb59d6afeb61
child 447
129b16fdb811
     1.1 --- a/openpkg/openpkg.boot	Tue Jul 31 12:12:54 2012 +0200
     1.2 +++ b/openpkg/openpkg.boot	Tue Jul 31 12:23:42 2012 +0200
     1.3 @@ -1,15 +1,14 @@
     1.4  #!/bin/sh
     1.5  ##
     1.6  ##  openpkg.boot -- OpenPKG bootstrap procedure (look Ma, without hands ;)
     1.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     1.9 +##  Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
    1.10  ##
    1.11 -##  Permission to use, copy, modify, and distribute this software for
    1.12 -##  any purpose with or without fee is hereby granted, provided that
    1.13 -##  the above copyright notice and this permission notice appear in all
    1.14 -##  copies.
    1.15 +##  This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
    1.16 +##  All rights reserved. Licenses which grant limited permission to use,
    1.17 +##  copy, modify and distribute this software are available from the
    1.18 +##  OpenPKG GmbH.
    1.19  ##
    1.20 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.21 +##  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
    1.22  ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.23  ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.24  ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.25 @@ -47,6 +46,8 @@
    1.26  verbose=''
    1.27  prefix=''
    1.28  tag=''
    1.29 +stack=''
    1.30 +unprivileged=no
    1.31  usr='';  grp=''
    1.32  susr=''; sgrp=''
    1.33  musr=''; mgrp=''
    1.34 @@ -71,6 +72,8 @@
    1.35          -v | --verbose       ) verbose=v   ;;
    1.36          --prefix=*           ) prefix=$arg ;;
    1.37          --tag=*              ) tag=$arg    ;;
    1.38 +        --stack=*            ) stack=$arg  ;;
    1.39 +        --unprivileged       ) unprivileged=yes ;;
    1.40          --usr=* | --user=*   ) usr=$arg    ;;
    1.41          --grp=* | --group=*  ) grp=$arg    ;;
    1.42          --susr=*             ) susr=$arg   ;;
    1.43 @@ -106,6 +109,7 @@
    1.44  if [ ".$help" = .1 ]; then
    1.45      echo "Usage: sh $me" 2>&1
    1.46      echo "       [--prefix=<prefix>] [--tag=<str>]" 2>&1
    1.47 +    echo "       [--stack=<name-or-url>] [--unprivileged]" 2>&1
    1.48      echo "       [--user=<usr>] [--group=<grp>]" 2>&1
    1.49      echo "       [--{s,m,r,n}usr=<usr>] [--{s,m,r,n}grp=<grp>]" 2>&1
    1.50      echo "       [--{s,m,r,n}uid=<uid>] [--{s,m,r,n}gid=<gid>]" 2>&1
    1.51 @@ -115,8 +119,33 @@
    1.52      exit 1
    1.53  fi
    1.54  
    1.55 +#   special support for environments with only a single 
    1.56 +#   fully unprivileged user account (the current user)
    1.57 +if [ ".$unprivileged" = .yes ]; then
    1.58 +    #   determine current user/group
    1.59 +    cusr=`(id -un) 2>/dev/null ||\
    1.60 +          (id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\
    1.61 +          (whoami) 2>/dev/null ||\
    1.62 +          (who am i | cut "-d " -f1) 2>/dev/null ||\
    1.63 +          echo $LOGNAME`
    1.64 +    cgid=`(id -g $cusr) 2>/dev/null ||\
    1.65 +          ((getent passwd "${cusr}"; grep "^${cusr}:" /etc/passwd; ypmatch "${cusr}" passwd; nismatch "${cusr}" passwd; nidump passwd . | grep "^${cusr}:") 2>/dev/null |\
    1.66 +           sed -n -e '1p' | awk -F: '{ print $4; }')`
    1.67 +    cgrp=`(id -gn $cusr) 2>/dev/null ||\
    1.68 +          ((getent group; cat /etc/group; ypcat group; niscat group; nidump group .) 2>/dev/null | grep "^[^:]*:[^:]*:${cgid}:" |\
    1.69 +           sed -n -e '1p' | awk -F: '{ print $1; }')`
    1.70 +    [ ".$cgrp" = . ] && cgrp="$cusr"
    1.71 +
    1.72 +    #   set all other user/group variants to current user/group
    1.73 +    for who in s m r n; do
    1.74 +        for what in usr grp; do
    1.75 +            eval "${who}${what}=\"\$c${what}\""
    1.76 +        done
    1.77 +    done
    1.78 +fi
    1.79 +
    1.80  #   determine missing parameters
    1.81 -eval `sh aux.usrgrp.sh \
    1.82 +eval `sh etc.usrgrp.sh \
    1.83        --usr="$usr" --grp="$grp" \
    1.84        --susr="$susr" --sgrp="$sgrp" \
    1.85        --musr="$musr" --mgrp="$mgrp" \
    1.86 @@ -141,8 +170,8 @@
    1.87  
    1.88  name="openpkg"
    1.89  spec="$name.spec"
    1.90 -version=`grep V_openpkg $spec | sed -e 'q' | awk '{ printf("%s", $3); }'`
    1.91 -release="$version"
    1.92 +version=`grep '^Version:' $spec | sed -e 'q' | awk '{ printf("%s", $2); }'`
    1.93 +release=`grep '^Release:' $spec | sed -e 'q' | awk '{ printf("%s", $2); }'`
    1.94  
    1.95  ##
    1.96  ##  display headline
    1.97 @@ -158,24 +187,18 @@
    1.98  
    1.99  if [ ".$bs" = .1 ]; then
   1.100      srcdir=.
   1.101 -    if [ -d ../../dst ]; then
   1.102 +    if [ -d ../dst ]; then
   1.103 +       dstdir=../dst
   1.104 +    elif [ -d ../../dst/openpkg ]; then
   1.105         dstdir=../../dst/openpkg
   1.106      else
   1.107         dstdir=.
   1.108      fi
   1.109      tmpdir="/tmp/$me.$$.d"
   1.110 -    if [ -d ../PKG/SRC ]; then
   1.111 -       pkgdir=../PKG/SRC
   1.112 -    elif [ -d ../PKG ]; then
   1.113 -       pkgdir=../PKG
   1.114 -    elif [ -d ../../PKG/SRC ]; then
   1.115 -       pkgdir=../../PKG/SRC
   1.116 -    elif [ -d ../../PKG ]; then
   1.117 -       pkgdir=../../PKG
   1.118 -    elif [ -d ../../pkg/src ]; then
   1.119 -       pkgdir=../../pkg/src
   1.120 -    elif [ -d ../../pkg ]; then
   1.121 -       pkgdir=../../pkg
   1.122 +    if [ -d ../pkg ]; then
   1.123 +       pkgdir=../pkg
   1.124 +    elif [ -d ../../pkg/openpkg ]; then
   1.125 +       pkgdir=../../pkg/openpkg
   1.126      else
   1.127         pkgdir=..
   1.128      fi
   1.129 @@ -196,7 +219,7 @@
   1.130      rm -f $tmpdir/.sh
   1.131      l_version="$release"
   1.132      l_release=`sh ./release.sh -r "${l_version}" -F "%t"`
   1.133 -    sed <$srcdir/aux.wrapsrc.sh >$tmpdir/openpkg.boot.tmp \
   1.134 +    sed <$srcdir/etc.wrapsrc.sh >$tmpdir/openpkg.boot.tmp \
   1.135          -e "s;@l_dir@;$name-$version-$release.src;" \
   1.136          -e "s;@l_release@;$l_release;" \
   1.137          -e "s;@l_version@;$l_version;"
   1.138 @@ -218,8 +241,10 @@
   1.139  ##
   1.140  
   1.141  V_rpm=`grep V_rpm $spec | sed -e 'q' | awk '{ printf("%s", $3); }'`
   1.142 -if [ -f "../../dst/openpkg/rpm-${V_rpm}.tar.gz" ]; then
   1.143 -    distdir="`cd ../../dst/openpkg; pwd`" # developer only
   1.144 +if [ -d ../dst ]; then
   1.145 +    distdir="`cd ../dst; pwd`"
   1.146 +elif [ -d ../../dst/openpkg ]; then
   1.147 +    distdir="`cd ../../dst/openpkg; pwd`"
   1.148  else
   1.149      distdir="`pwd`"
   1.150  fi
   1.151 @@ -229,14 +254,18 @@
   1.152  ##  perform prerequisite checks
   1.153  ##
   1.154  
   1.155 -sh ./aux.prereq.sh source || exit $?
   1.156 +sh ./etc.prereq.sh source || exit $?
   1.157  
   1.158  ##
   1.159  ##  find reasonable run-time paths and tools
   1.160  ##
   1.161  
   1.162  #   find reasonable temporary directory
   1.163 -tmpdir="${TMPDIR-/tmp}"
   1.164 +if [ -d ../tmp ]; then
   1.165 +    tmpdir="`cd ../tmp; pwd`"
   1.166 +else
   1.167 +    tmpdir="${TMPDIR-/tmp}"
   1.168 +fi
   1.169  
   1.170  #   find reasonable safe program path
   1.171  test ".$PATH" = . && PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"
   1.172 @@ -264,7 +293,8 @@
   1.173    echo "_builddir=$tmpdir"
   1.174    echo "l_prefix=$prefix"
   1.175    echo "l_tag_fmt=\"$tag\""
   1.176 -  echo "l_buildroot=$tmpdir/$name-$version-root"
   1.177 +  echo "l_stack=$stack"
   1.178 +  echo "l_buildroot=$tmpdir/$name-$version-$release-buildroot"
   1.179    echo "l_susr=$susr"
   1.180    echo "l_sgrp=$sgrp"
   1.181    echo "l_musr=$musr"
   1.182 @@ -281,6 +311,7 @@
   1.183    echo "l_rgid=$rgid"
   1.184    echo "l_nuid=$nuid"
   1.185    echo "l_ngid=$ngid"
   1.186 +  echo "l_unprivileged=$unprivileged"
   1.187    echo "use_tar=$use_tar"
   1.188    echo "use_make=$use_make"
   1.189    echo "use_cc=$use_cc"
   1.190 @@ -341,7 +372,7 @@
   1.191  
   1.192  ##
   1.193  ##  adjust build environment so that the installed
   1.194 -##  "rpm" is actually useable, although it still resides in
   1.195 +##  "rpm" is actually usable, although it still resides in
   1.196  ##  the temporary location instead of the real location.
   1.197  ##
   1.198  
   1.199 @@ -354,6 +385,7 @@
   1.200  . $tmpdir/openpkg-*/.buildenv
   1.201  
   1.202  #   create a custom "rpm" command
   1.203 +#   (and direct it to an adjusted macro set)
   1.204  echo "++ creating custom RPM command"
   1.205  rm -f $tmpdir/rpm >/dev/null 2>&1
   1.206  rmdir $tmpdir/rpm >/dev/null 2>&1
   1.207 @@ -367,22 +399,21 @@
   1.208  fi
   1.209  ( echo "#!/bin/sh"
   1.210    echo "exec $RPM_BUILD_ROOT$prefix/lib/openpkg/rpm \\"
   1.211 -  echo "    --rcfile \"$tmpdir/rpm.1\" \\"
   1.212 -  echo "    --define \"__platform $RPM_BUILD_ROOT$prefix/etc/openpkg/platform\" \\"
   1.213 +  echo "    --macros \"$tmpdir/rpm.1:$tmpdir/rpm.2:$tmpdir/rpm.3\" \\"
   1.214 +  echo "    --rpmpopt \"$tmpdir/rpm.4:$tmpdir/rpm.5\" \\"
   1.215 +  echo "    --rpmlua \"$tmpdir/rpm.6\" \\"
   1.216    echo "    \"\$@\""
   1.217  ) >$tmpdir/rpm
   1.218  chmod a+x $tmpdir/rpm
   1.219  
   1.220 -#   direct our own "rpm" tool to adjusted macro sets
   1.221 -sed <`SOURCE rpmrc` >$tmpdir/rpm.1 \
   1.222 -    -e "s;^\\(macrofiles:\\) .*;\\1 $tmpdir/rpm.2:$tmpdir/rpm.3;"
   1.223 -
   1.224  #   use an adjusted vendor macro set
   1.225 -sed <$RPM_BUILD_ROOT$prefix/lib/openpkg/macros >$tmpdir/rpm.2 \
   1.226 +rm -f $tmpdir/rpm.1 >/dev/null 2>&1
   1.227 +sed <$RPM_BUILD_ROOT$prefix/lib/openpkg/rpmmacros >$tmpdir/rpm.1 \
   1.228      -e "s;$prefix;$RPM_BUILD_ROOT$prefix;g"
   1.229  
   1.230  #   override the vendor macro set
   1.231 -sed <`SOURCE rpmmacros` >$tmpdir/rpm.3 \
   1.232 +rm -f $tmpdir/rpm.2 >/dev/null 2>&1
   1.233 +sed <`SOURCE rpmmacros` >$tmpdir/rpm.2 \
   1.234      -e "s;@SUSR@;$susr;" \
   1.235      -e "s;@SGRP@;$sgrp;" \
   1.236      -e "s;@MUSR@;$musr;" \
   1.237 @@ -392,10 +423,11 @@
   1.238      -e "s;@NUSR@;$nusr;" \
   1.239      -e "s;@NGRP@;$ngrp;" \
   1.240      -e "s;@TAG@;$tag;" \
   1.241 +    -e "s;@l_unprivileged@;$unprivileged;" \
   1.242      -e "s;\\(%{l_prefix}/lib/openpkg/rpmtool\\);%{l_bash} \\1;g" \
   1.243      -e "s;@l_prefix_static@;$prefix;g" \
   1.244      -e "s;@l_prefix@;$RPM_BUILD_ROOT$prefix;g" \
   1.245 -    -e "s;%l_prefix\\([^_]\\);%l_prefix_INTERNAL\\1;g" \
   1.246 +    -e "s;^%l_prefix\\([^_]\\);%l_prefix_INTERNAL\\1;g" \
   1.247      -e "s;%{l_prefix};%{l_prefix_INTERNAL};g" \
   1.248      -e "s;^\\(%_specdir *\\).*;\\1 `pwd`;" \
   1.249      -e "s;^\\(%_sourcedir *\\).*;\\1 $distdir;" \
   1.250 @@ -405,17 +437,33 @@
   1.251      -e "s;@l_build_path@;/bin:/sbin:/usr/bin:/usr/sbin;g" \
   1.252      -e "s;@l_build_ldlp@;/usr/lib;g" \
   1.253      -e "s;@l_build_ulim@;:;g"
   1.254 -echo "%l_prefix $prefix" >>$tmpdir/rpm.3
   1.255  
   1.256 -#   use an own $HOME/.popt in order to make sure the "rpm"
   1.257 -#   tool is able to execute its sub-tools "rpm<x>".
   1.258 -V_rpm=`grep V_rpm $spec | sed -e 'q' | awk '{ printf("%s", $3); }'`
   1.259 -sed <$RPM_BUILD_ROOT$prefix/lib/openpkg/rpmpopt >$tmpdir/.popt \
   1.260 -    -e "s;^\\(rpm.*exec.*\\)\\(rpm[bdieukvq]*\\);\\1$RPM_BUILD_ROOT$prefix/lib/openpkg/\\2;"
   1.261 +#   provide some special overrides
   1.262 +rm -f $tmpdir/rpm.3 >/dev/null 2>&1
   1.263 +( echo "%l_prefix $prefix"
   1.264 +  echo "%l_rpm $tmpdir/rpm"
   1.265 +  echo "%__spec_install_pre %{nil}"
   1.266 +  echo "%__spec_clean_body  %{nil}"
   1.267 +  echo "%__platform $RPM_BUILD_ROOT$prefix/etc/openpkg/platform"
   1.268 +  echo "%_integrity_spec_cfg $RPM_BUILD_ROOT$prefix/etc/openpkg/license.d/BOOT"
   1.269 +  echo "%_integrity_proc_lua $RPM_BUILD_ROOT$prefix/lib/openpkg/license.lua"
   1.270 +  echo "%_integrity_pkey_pgp $RPM_BUILD_ROOT$prefix/etc/openpkg/openpkg.com.pgp"
   1.271 +) >$tmpdir/rpm.3
   1.272  
   1.273 -#   activate the .popt file
   1.274 -HOME=$tmpdir
   1.275 -export HOME
   1.276 +#   use an adjusted vendor POPT config
   1.277 +rm -f $tmpdir/rpm.4 >/dev/null 2>&1
   1.278 +sed <$RPM_BUILD_ROOT$prefix/lib/openpkg/rpmpopt >$tmpdir/rpm.4 \
   1.279 +    -e "s;$prefix;$RPM_BUILD_ROOT$prefix;g"
   1.280 +
   1.281 +#   override the vendor POPT config
   1.282 +rm -f $tmpdir/rpm.5 >/dev/null 2>&1
   1.283 +sed <$RPM_BUILD_ROOT$prefix/etc/openpkg/rpmpopt >$tmpdir/rpm.5 \
   1.284 +    -e "s;@l_prefix@;$RPM_BUILD_ROOT$prefix;g"
   1.285 +
   1.286 +#   use an adjusted vendor RPM Lua script
   1.287 +rm -f $tmpdir/rpm.6 >/dev/null 2>&1
   1.288 +sed <$RPM_BUILD_ROOT$prefix/etc/openpkg/rpmlua >$tmpdir/rpm.6 \
   1.289 +    -e "s;@l_prefix@;$RPM_BUILD_ROOT$prefix;g"
   1.290  
   1.291  ##
   1.292  ##   now initialize the RPM database under the temporary install location
   1.293 @@ -450,7 +498,7 @@
   1.294  ##
   1.295  
   1.296  echo "++ overwriting RPM installation by installing via RPM itself"
   1.297 -$tmpdir/rpm --install --justdb --force --noscripts --notriggers --ignoresize \
   1.298 +$tmpdir/rpm --install --justdb --replacepkgs --replacefiles --oldpackage --noscripts --notriggers --ignoresize \
   1.299      $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-*.rpm
   1.300  
   1.301  ##  Puhhhh!!! what a tricky bootstrapping procedure. But now we are
   1.302 @@ -462,28 +510,24 @@
   1.303  t="`$tmpdir/rpm --eval '%{l_platform -p}-%{l_tag}'`"
   1.304  
   1.305  #   find a reasonable destination directory for packages
   1.306 -if [ -d ../PKG/BIN ]; then
   1.307 -   dstdir=../PKG/BIN
   1.308 -elif [ -d ../PKG ]; then
   1.309 -   dstdir=../PKG
   1.310 -elif [ -d ../../PKG/BIN ]; then
   1.311 -   dstdir=../../PKG/BIN
   1.312 -elif [ -d ../../PKG ]; then
   1.313 -   dstdir=../../PKG
   1.314 +if [ -d ../pkg ]; then
   1.315 +   pkgdir=../pkg
   1.316 +elif [ -d ../../pkg/openpkg ]; then
   1.317 +   pkgdir=../../pkg/openpkg
   1.318  else
   1.319 -   dstdir=..
   1.320 +   pkgdir=..
   1.321  fi
   1.322  
   1.323  #   create Source-RPM file
   1.324  echo "++ creating bootstrap source RPM file"
   1.325 -$tmpdir/rpm -bs --nodeps $spec
   1.326 -cp $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.src.rpm $dstdir/
   1.327 -rm -f $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.src.rpm
   1.328 +$tmpdir/rpm -bs --nodeps --define "_srcrpmdir $pkgdir" $spec
   1.329  
   1.330  #   create Binary-RPM file
   1.331 +#   (notice that there might be a discrepancy in the platform
   1.332 +#   identification, so we have to copy the source via wildcard)
   1.333  echo "++ creating bootstrap binary RPM file"
   1.334 -cp $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.$t.rpm $dstdir/
   1.335 -rm -f $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-$v.$t.rpm
   1.336 +cp $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-*.rpm $pkgdir/openpkg-$v.$t.rpm
   1.337 +rm -f $RPM_BUILD_ROOT$prefix/RPM/PKG/openpkg-*.rpm
   1.338  
   1.339  #   create Binary-Bootstrap file
   1.340  echo "++ creating bootstrap binary shell script"
   1.341 @@ -492,13 +536,15 @@
   1.342         grep -v '^ *$' | grep -v '%defattr' |\
   1.343         sed -e 's;%config(noreplace) *;;' -e 's;%config *;;' -e 's;%ghost *;;' -e 's;%attr([^)]*) *;;' \
   1.344             -e 's;%dir *;;' -e 's;%{l_prefix}/;;' -e 's;^ *;;' -e "s;%{V_rpm};${V_rpm};"`
   1.345 +rm -f $RPM_BUILD_ROOT$prefix/RPM/DB/__db.[0-9]*
   1.346  db_files=""
   1.347  for db_file in \
   1.348      `$RPM_BUILD_ROOT$prefix/lib/openpkg/bash \
   1.349       $RPM_BUILD_ROOT$prefix/lib/openpkg/rpmdb \
   1.350           --prefix=$RPM_BUILD_ROOT$prefix \
   1.351           --dbpath=$RPM_BUILD_ROOT$prefix/RPM/DB \
   1.352 -         --list --quiet`; do
   1.353 +         --rpm=$tmpdir/rpm \
   1.354 +         --list --quiet` VERSION; do
   1.355      db_files="$db_files RPM/DB/$db_file"
   1.356  done
   1.357  chmod 644 $RPM_BUILD_ROOT$prefix/RPM/DB/*
   1.358 @@ -533,7 +579,7 @@
   1.359          -e 's;%{![?]l_\([^:}]*\)};${\1-""};g' \
   1.360          -e 's;%{l_\([^}]*\)};${\1};g' \
   1.361      >$tmpdir/rpm.post
   1.362 -sed <`SOURCE aux.wrapbin.sh` \
   1.363 +sed <`SOURCE etc.wrapbin.sh` \
   1.364      -e "s;@SUSR@;$susr;" -e "s;@SGRP@;$sgrp;" \
   1.365      -e "s;@MUSR@;$musr;" -e "s;@MGRP@;$mgrp;" \
   1.366      -e "s;@RUSR@;$rusr;" -e "s;@RGRP@;$rgrp;" \
   1.367 @@ -546,6 +592,7 @@
   1.368      -e "s;@l_platform@;$l_platform;" \
   1.369      -e "s;@l_release@;$l_release;" \
   1.370      -e "s;@l_version@;$l_version;" \
   1.371 +    -e "s;@l_unprivileged@;$unprivileged;" \
   1.372      -e "/^@PRE@/r $tmpdir/rpm.pre" \
   1.373      -e "/^@POST@/r $tmpdir/rpm.post" |\
   1.374      sed -e '/^@PRE@/d' -e '/^@POST@/d' >$tmpdir/openpkg.boot.tmp
   1.375 @@ -554,30 +601,30 @@
   1.376          printf("        ");
   1.377      }
   1.378  }' >>$tmpdir/openpkg.boot.tmp
   1.379 -rm -f $dstdir/openpkg-$v.$t.sh
   1.380 +rm -f $pkgdir/openpkg-$v.$t.sh
   1.381  dd if=$tmpdir/openpkg.boot.tmp bs=8192 count=8 \
   1.382 -   of=$dstdir/openpkg-$v.$t.sh 2>/dev/null
   1.383 +   of=$pkgdir/openpkg-$v.$t.sh 2>/dev/null
   1.384  rm -f $tmpdir/openpkg.boot.tmp
   1.385  ( cd $RPM_BUILD_ROOT$prefix
   1.386    $RPM_BUILD_ROOT$prefix/lib/openpkg/tar --no-recursion -cf - \
   1.387        openpkg.tar openpkg.bzip2 openpkg.tar.bz2
   1.388 -) >>$dstdir/openpkg-$v.$t.sh
   1.389 +) >>$pkgdir/openpkg-$v.$t.sh
   1.390  
   1.391  #   cleanup
   1.392  echo "++ cleaning up"
   1.393  cp `SOURCE rpmtool` $tmpdir/rpmtool
   1.394  rm -rf $RPM_BUILD_ROOT
   1.395  rm -rf $tmpdir/$name-$version
   1.396 -rm -f $tmpdir/rpm $tmpdir/rpm.[123] $tmpdir/.popt $tmpdir/rpm.pre $tmpdir/rpm.post
   1.397 +rm -f $tmpdir/rpm $tmpdir/rpm.[123456] $tmpdir/rpm.pre $tmpdir/rpm.post
   1.398  rm -f $prolog
   1.399  
   1.400  #   final hint about results
   1.401 -echo "++ resulting OpenPKG bootstrap package files:"
   1.402 -(cd $dstdir; ls -l openpkg-$v.$t.sh openpkg-$v.$t.rpm openpkg-$v.src.rpm)
   1.403 +echo "++ resulting OpenPKG Framework bootstrap package files:"
   1.404 +(cd $pkgdir; ls -l openpkg-$v.$t.sh openpkg-$v.$t.rpm openpkg-$v.src.rpm)
   1.405  set +x
   1.406 -( echo "You have successfully built the OpenPKG Package from scratch"
   1.407 +( echo "You have successfully built the OpenPKG Framework from scratch"
   1.408    echo "for prefix $prefix on target platform $l_platform. The input"
   1.409 -  echo "was the OpenPKG Source Bootstrap Package in file:"
   1.410 +  echo "was the OpenPKG Framework Source Bootstrap Package in file:"
   1.411    echo ""
   1.412    echo "    openpkg-$v.src.sh"
   1.413    echo ""
   1.414 @@ -587,23 +634,23 @@
   1.415    echo "    openpkg-$v.$t.rpm"
   1.416    echo "    openpkg-$v.$t.sh"
   1.417    echo ""
   1.418 -  echo "The first result file is the OpenPKG Source RPM Package,"
   1.419 -  echo "containing just the same contents than the OpenPKG Source"
   1.420 -  echo "Bootstrap Package, but now in RPM format. Optionally use this"
   1.421 -  echo "after the installation of the OpenPKG Binary Bootstrap Package"
   1.422 +  echo "The first result file is the OpenPKG Framework Source RPM Package,"
   1.423 +  echo "containing just the same contents than the OpenPKG Framework Source"
   1.424 +  echo "Bootstrap Package, but now in RPM format. Optionally use this after"
   1.425 +  echo "the installation of the OpenPKG Framework Binary Bootstrap Package"
   1.426    echo "if you want to rebuild from source again (but then with RPM"
   1.427    echo "available)."
   1.428    echo ""
   1.429 -  echo "The second result file is the OpenPKG Binary RPM Package,"
   1.430 +  echo "The second result file is the OpenPKG Framework Binary RPM Package,"
   1.431    echo "containing the installation files in RPM format for the OpenPKG"
   1.432    echo "instance $prefix. Optionally use this after the installation of"
   1.433 -  echo "the OpenPKG Binary Bootstrap Package if you want (usually for"
   1.434 -  echo "fixing something) to reinstall (but then with RPM available)."
   1.435 +  echo "the OpenPKG Framework Binary Bootstrap Package if you want (usually"
   1.436 +  echo "for fixing something) to reinstall (but then with RPM available)."
   1.437    echo ""
   1.438 -  echo "The third result file is the OpenPKG Binary Bootstrap Package,"
   1.439 -  echo "containing the installation files as a self-extracting shell"
   1.440 -  echo "script for the OpenPKG instance $prefix. Use this in YOUR NEXT"
   1.441 -  echo "STEP to initially create the OpenPKG instance from scratch."
   1.442 +  echo "The third result file is the OpenPKG Framework Binary Bootstrap"
   1.443 +  echo "Package, containing the installation files as a self-extracting"
   1.444 +  echo "shell script for the OpenPKG instance $prefix. Use this in YOUR"
   1.445 +  echo "NEXT STEP to initially create the OpenPKG instance from scratch."
   1.446    echo "Hence, proceed now by running the following command:"
   1.447    echo ""
   1.448    cusr=`(id -un) 2>/dev/null ||\

mercurial