openpkg/README

changeset 428
f880f219c566
parent 13
cb59d6afeb61
child 445
43a74e63d4a3
     1.1 --- a/openpkg/README	Tue Jul 31 12:12:54 2012 +0200
     1.2 +++ b/openpkg/README	Tue Jul 31 12:23:42 2012 +0200
     1.3 @@ -1,52 +1,60 @@
     1.4  
     1.5 -  OpenPKG Boostrap Package Source Tree
     1.6 -  ====================================
     1.7 +  OpenPKG Framework Bootstrap Package, Source Tree
     1.8 +  ================================================
     1.9  
    1.10 -  This is the source code tree for the OpenPKG bootstrap package. What
    1.11 -  you find here is rather complex and tricky stuff, so don't be confused
    1.12 -  if you don't understand everything immediately.
    1.13 +  This is the source tree for the OpenPKG Framework "bootstrap" package.
    1.14 +  What you find here is rather complex and tricky stuff, so don't be
    1.15 +  confused if you don't understand everything immediately.
    1.16  
    1.17    The Files
    1.18    ---------
    1.19  
    1.20    README .................. this file ;-)
    1.21 -  HISTORY ................. change history tracking of this package
    1.22  
    1.23    openpkg.spec ............ the regular build procedure
    1.24    openpkg.boot ............ the bootstrapping procedure
    1.25  
    1.26 -  gzip-*.tar .............. untouched distribution tarball of the GNU gzip tool
    1.27 -  make-*.tar.gz ........... untouched distribution tarball of the GNU make tool
    1.28    patch-*.tar.gz .......... untouched distribution tarball of the GNU patch tool
    1.29    bash-*.tar.gz ........... untouched distribution tarball of the GNU bash tool
    1.30 +  make-*.tar.gz ........... untouched distribution tarball of the GNU make tool
    1.31    tar-*.tar.gz ............ untouched distribution tarball of the GNU tar tool
    1.32 +  config-*.tar.gz ......... untouched distribution tarball of the GNU config scripts
    1.33 +  gzip-*.tar .............. pre-unpacked distribution tarball of the GNU gzip tool
    1.34 +  gzip-*-openpkg-r*.tar ... pre-patched distribution files of the GNU gzip tool
    1.35 +  perl-*-mini.tar.gz ...... stripped down distribution tarball of the Perl tool
    1.36 +  rpm-*.tar.gz ............ untouched distribution tarball of the RPM tool
    1.37 +  openssl-*.tar.gz ........ untouched distribution tarball of the OpenSSL toolkit
    1.38    uuid-*.tar.gz ........... untouched distribution tarball of the OSSP uuid tool
    1.39    curl-*.tar.gz ........... untouched distribution tarball of the cURL tool
    1.40 +  beecrypt-*.tar.gz ....... untouched distribution tarball of the BeeCrypt library
    1.41    bzip2-*.tar.gz .......... untouched distribution tarball of the BZIP2 library
    1.42    zlib-*.tar.gz ........... untouched distribution tarball of the ZLIB library
    1.43 -  beecrypt-*.tar.gz ....... untouched distribution tarball of the BeeCrypt library
    1.44 -  rpm-*.tar.gz ............ untouched distribution tarball of the RPM tool
    1.45 -  config-*.tar.gz ......... untouched distribution tarball of the GNU config scripts
    1.46 -  openpkg-registry-*.tar.gz untouched distribution tarball of the OpenPKG Registry
    1.47 -  openpkg-tools-*.tar.gz .. untouched distribution tarball of the OpenPKG Tool Chain
    1.48 -  openssl-*.tar.gz ........ untouched distribution tarball of the OpenSSL toolkit
    1.49 -  perl-*-mini.tar.gz ...... stripped down distribution tarball of the Perl tool
    1.50 +  popt-*.tar.gz ........... untouched distribution tarball of the POPT library
    1.51 +  sqlite-*.tar.gz ......... untouched distribution tarball of the SQLite library
    1.52 +  pcre-*.tar.gz ........... untouched distribution tarball of the SQLite library
    1.53 +  diffutils-*.tar.gz ...... untouched distribution tarball of the GNU diffutils toolkit
    1.54 +  svs-*.tar.gz ............ untouched distribution tarball of the OSSP svs tool
    1.55 +  xz-*.tar.gz ............. untouched distribution tarball of the XZ tool
    1.56  
    1.57 -  make.patch .............. patch for GNU make
    1.58 -  bash.patch .............. patch for GNU bash
    1.59 -  tar.patch ............... patch for GNU tar
    1.60 -  beecrypt.patch .......... patch for BeeCrypt
    1.61 -  openssl.patch ........... patch for OpenSSL
    1.62 -  perl.patch .............. patch for Perl
    1.63 -  gzip.c .................. replacement file for GNU gzip
    1.64 -  rpm.patch.bugfix ........ patch for RPM (bugfixing parts)
    1.65 -  rpm.patch.feature ....... patch for RPM (new features parts)
    1.66 -  rpm.patch.porting ....... patch for RPM (portability enhancement parts)
    1.67 -  rpm.patch.regen ......... patch for RPM (re-generated files parts)
    1.68 +  bash.patch .............. patch for GNU bash tool
    1.69 +  bash.patch.vendor ....... patch for GNU bash tool (upstream vendor only)
    1.70 +  bash.patch.vendor.sh .... patch for GNU bash tool (generation utility, NOT BUNDLED)
    1.71 +  beecrypt.patch .......... patch for BeeCrypt library
    1.72 +  make.patch .............. patch for GNU make tool
    1.73 +  openssl.patch ........... patch for OpenSSL toolkit
    1.74 +  perl.patch .............. patch for Perl tool
    1.75 +  tar.patch ............... patch for GNU tar tool
    1.76 +  rpm.patch ............... patch for RPM tool
    1.77 +  popt.patch .............. patch for POPT library
    1.78 +  sqlite.patch ............ patch for SQLite library
    1.79 +  curl.patch .............. patch for cURL library
    1.80 +  diffutils.patch ......... patch for GNU diffutils tool
    1.81 +  libarchive.patch ........ patch for BSD libarchive tool
    1.82 +  pcre.patch .............. patch for PCRE library
    1.83 +  xz.patch ................ patch for XZ tool
    1.84  
    1.85    rpmpopt ................. replacements/extensions for RPM's POPT configuration
    1.86    rpmmacros ............... replacements/extensions for RPM's macros
    1.87 -  rpmrc ................... replacements for RPM's run-command configuration
    1.88  
    1.89    root.README ............. the source for installed <prefix>/README
    1.90    local.README ............ the source for installed <prefix>/local/README
    1.91 @@ -55,6 +63,7 @@
    1.92    dot.lsyncrc ............. the source for installed <prefix>/local/.lsyncrc
    1.93  
    1.94    openpkg.c ............... the OpenPKG frontend (set-uid wrapper)
    1.95 +  openpkg.mk .............. the OpenPKG frontend (build procedure)
    1.96    openpkg.sh .............. the OpenPKG frontend (main script)
    1.97    openpkg.pod ............. the OpenPKG frontend manual page (source)
    1.98    openpkg.1 ............... the OpenPKG frontend manual page (pre-generated output)
    1.99 @@ -89,31 +98,74 @@
   1.100    lsync.8 ................. the lsync tool (manual page)
   1.101    lsync.pod ............... the lsync tool (manual page source)
   1.102  
   1.103 -  aux.usrgrp.sh ........... user/group name/id determination script
   1.104 -  aux.prereq.sh ........... prerequisite checking script
   1.105 -  aux.wrapsrc.sh .......... wrapper script for generating openpkg-V-R.src.sh
   1.106 -  aux.wrapbin.sh .......... wrapper script for generating openpkg-V-R.P-L.sh
   1.107 +  etc.usrgrp.sh ........... user/group name/id determination script
   1.108 +  etc.prereq.sh ........... prerequisite checking script
   1.109 +  etc.wrapsrc.sh .......... wrapper script for generating openpkg-V-R.src.sh
   1.110 +  etc.wrapbin.sh .......... wrapper script for generating openpkg-V-R.P-L.sh
   1.111  
   1.112 -  pod2man.sh .............. helper script for pre-generating manual page outputs
   1.113    man.sh .................. helper script for "openpkg man" command
   1.114 -  install.sh .............. helper script for "openpkg install" command
   1.115 +
   1.116 +  rpm.sh .................. wrapper for RPM
   1.117 +  curl.sh ................. wrapper for cURL
   1.118 +
   1.119 +  dev.pl .................. the OpenPKG package development utility script
   1.120 +  dev.pod ................. the OpenPKG package development utility manual page (source)
   1.121 +  dev.8 ................... the OpenPKG package development utility manual page (pre-generated output)
   1.122 +
   1.123 +  index.pl ................ the OpenPKG package indexing utility script
   1.124 +  index.pod ............... the OpenPKG package indexing utility manual page (source)
   1.125 +  index.8 ................. the OpenPKG package indexing utility manual page (pre-generated output)
   1.126 +
   1.127 +  search.pl ............... the OpenPKG package searching utility script
   1.128 +  search.pod .............. the OpenPKG package searching utility manual page (source)
   1.129 +  search.8 ................ the OpenPKG package searching utility manual page (pre-generated output)
   1.130 +
   1.131 +  sea.sh .................. the OpenPKG shell execution archive utility script
   1.132 +  sea.pod ................. the OpenPKG shell execution archive utility manual page (source)
   1.133 +  sea.8 ................... the OpenPKG shell execution archive utility manual page (pre-generated output)
   1.134 +
   1.135 +  mirror.pl ............... the OpenPKG package mirroing utility script
   1.136 +  mirror.pod .............. the OpenPKG package mirroing utility manual page (source)
   1.137 +  mirror.8 ................ the OpenPKG package mirroing utility manual page (pre-generated output)
   1.138 +
   1.139 +  build.pl ................ the OpenPKG package building utility script
   1.140 +  build.pod ............... the OpenPKG package building utility manual page (source)
   1.141 +  build.8 ................. the OpenPKG package building utility manual page (pre-generated output)
   1.142 +
   1.143 +  makeproxy.pl ............ the OpenPKG proxy package building utility script
   1.144 +  makeproxy.pod ........... the OpenPKG proxy package building utility manual page (source)
   1.145 +  makeproxy.8 ............. the OpenPKG proxy package building utility manual page (pre-generated output)
   1.146  
   1.147    openpkg.org.pgp ......... the OpenPGP public key "OpenPKG <openpkg@openpkg.org>"
   1.148    openpkg.com.pgp ......... the OpenPGP public key "OpenPKG GmbH <openpkg@openpkg.com>"
   1.149    openpkg.net.pgp ......... the OpenPGP public key "OpenPKG Foundation e.V. <openpkg@openpkg.net>"
   1.150  
   1.151 +  license.sh .............. the OpenPKG license management utility script
   1.152 +  license.pod ............. the OpenPKG license management utility manual page (source)
   1.153 +  license.8 ............... the OpenPKG license management utility manual page (pre-generated output)
   1.154 +  license-BOOT.txt ........ the OpenPKG Framework Bootstrapping License
   1.155 +  license-COMMUNITY.txt ... the OpenPKG Framework Community License
   1.156 +  license-EVAL.txt ........ the OpenPKG Framework Evaluation License
   1.157 +  license-EXAMPLE.txt ..... the OpenPKG Framework Example License
   1.158 +  license-PROMO.txt ....... the OpenPKG Framework Promotion License
   1.159 +  license-RECOVERY.txt .... the OpenPKG Framework Recovery License
   1.160 +  license.lua ............. the OpenPKG Framework license processor script
   1.161 +
   1.162 +  Makefile ................ development build procedures
   1.163 +
   1.164    The Bootstrapping Procedure
   1.165    ---------------------------
   1.166  
   1.167    The complexity of this OpenPKG RPM package results from the fact that
   1.168    we force us to treat this bootstrapping package equal to every other
   1.169    regular OpenPKG RPM package. First, this implies that the packaging
   1.170 -  tool RPM is packaged with itself as an OpenPKG RPM package (means: its
   1.171 -  build procedure is a real RPM .spec file and it can be installed and
   1.172 -  upgraded through a binary or source RPM). Second, RPM is installed
   1.173 -  into the same filesystem hierarchy as all other packages. Third, RPM
   1.174 -  manages its own files. The reason for this approach should be obvious:
   1.175 -  100% consistency for the whole OpenPKG software packaging facility!
   1.176 +  tool RPM is packaged with itself as an OpenPKG RPM package -- which
   1.177 +  means that its build procedure is a real RPM .spec file and it can be
   1.178 +  installed and upgraded through a binary or source RPM. Second, RPM is
   1.179 +  installed into the same filesystem hierarchy as all other packages.
   1.180 +  Third, RPM manages its own files. The reason for this approach should
   1.181 +  be obvious: 100% consistency for the whole OpenPKG software packaging
   1.182 +  facility!
   1.183  
   1.184    The drawback is that this package requires a very tricky bootstrapping
   1.185    procedure which had cost a lot of time to figure out and establish. If
   1.186 @@ -137,17 +189,17 @@
   1.187    scripts of "openpkg.spec", there is a fresh version of the target
   1.188    filesystem hierarchy staying under a temporary "build root". The
   1.189    "openpkg.boot" script then creates a very special temporary "openpkg
   1.190 -  rpm" command which allows the installed "openpkg rpm" command inside
   1.191 -  the "build root" to work (although it is built for the final target
   1.192 -  filesystem path). Then the $RPM_BOOT variable is set and the package
   1.193 -  is _again_ build via "openpkg.spec" -- but this time with the real
   1.194 -  OpenPKG RPM. To avoid unneccessary re-compilation, the "openpkg.spec"
   1.195 -  skips "%prep", "%build" and "%install" sections if $RPM_BOOT is
   1.196 -  defined. So, on this second build phase, only the "%files" section is
   1.197 -  executed, i.e., a binary OpenPKG RPM package "openpkg-V-R.P-T.rpm"
   1.198 -  is rolled from the files in the "build root". Additionally, a source
   1.199 -  OpenPKG RPM package "openpkg-V-R.src.rpm" is rolled for consistency
   1.200 -  reasons.
   1.201 +  rpm" command which allows the installed "openpkg rpm" command
   1.202 +  inside the "build root" to work (although it is built for the
   1.203 +  final target filesystem path). Then the $OPENPKG_BOOT variable
   1.204 +  is set and the package is _again_ build via "openpkg.spec" --
   1.205 +  but this time with the real OpenPKG RPM. To avoid unneccessary
   1.206 +  re-compilation, the "openpkg.spec" skips "%prep", "%build" and
   1.207 +  "%install" sections if $OPENPKG_BOOT is defined. So, on this second
   1.208 +  build phase, only the "%files" section is effectively executed, i.e.,
   1.209 +  a binary OpenPKG RPM package "openpkg-V-R.P-T.rpm" is rolled from the
   1.210 +  files in the "build root". Additionally, a source OpenPKG RPM package
   1.211 +  "openpkg-V-R.src.rpm" is rolled for consistency reasons, too.
   1.212  
   1.213    Finally, we override the installation in the "build root"
   1.214    again by installing the now rolled binary OpenPKG RPM package
   1.215 @@ -169,14 +221,14 @@
   1.216    is packed into a "tarball", compressed, again wrapped into another
   1.217    tarball together with the uncompression tools ("bzip2" and "tar"),
   1.218    and finally wrapped into a self-extracting shell script by appending
   1.219 -  "aux.wrapbin.sh" (padded to 64KB for easier unpacking of the attached
   1.220 +  "etc.wrapbin.sh" (padded to 64KB for easier unpacking of the attached
   1.221    tarball) to its front.
   1.222  
   1.223    The result is the binary bootstrap script "openpkg-V-R.P-T.sh" which
   1.224 -  can be used to install the target hierarchy from scratch without any
   1.225 -  pre-installed OpenPKG RPM. Nevetheless, the installed target hierarchy
   1.226 -  looks _exactly_ as it would have been installed with OpenPKG RPM.
   1.227 -  If one later wants to upgrade this hierarchy one can just use the
   1.228 +  can be used to install the target hierarchy from scratch without
   1.229 +  any pre-installed OpenPKG RPM. Nevertheless, the installed target
   1.230 +  hierarchy looks _exactly_ as it would have been installed with OpenPKG
   1.231 +  RPM. If one later wants to upgrade this hierarchy one can just use the
   1.232    generated (or a newer) "openpkg-V-R.P-T.rpm".
   1.233  
   1.234    To allow one to easily repeat this from-source bootstrapping procedure

mercurial