openpkg/README

changeset 428
f880f219c566
parent 13
cb59d6afeb61
child 445
43a74e63d4a3
equal deleted inserted replaced
0:73a4294b4785 1:02c1eb245824
1 1
2 OpenPKG Boostrap Package Source Tree 2 OpenPKG Framework Bootstrap Package, Source Tree
3 ==================================== 3 ================================================
4 4
5 This is the source code tree for the OpenPKG bootstrap package. What 5 This is the source tree for the OpenPKG Framework "bootstrap" package.
6 you find here is rather complex and tricky stuff, so don't be confused 6 What you find here is rather complex and tricky stuff, so don't be
7 if you don't understand everything immediately. 7 confused if you don't understand everything immediately.
8 8
9 The Files 9 The Files
10 --------- 10 ---------
11 11
12 README .................. this file ;-) 12 README .................. this file ;-)
13 HISTORY ................. change history tracking of this package
14 13
15 openpkg.spec ............ the regular build procedure 14 openpkg.spec ............ the regular build procedure
16 openpkg.boot ............ the bootstrapping procedure 15 openpkg.boot ............ the bootstrapping procedure
17 16
18 gzip-*.tar .............. untouched distribution tarball of the GNU gzip tool
19 make-*.tar.gz ........... untouched distribution tarball of the GNU make tool
20 patch-*.tar.gz .......... untouched distribution tarball of the GNU patch tool 17 patch-*.tar.gz .......... untouched distribution tarball of the GNU patch tool
21 bash-*.tar.gz ........... untouched distribution tarball of the GNU bash tool 18 bash-*.tar.gz ........... untouched distribution tarball of the GNU bash tool
19 make-*.tar.gz ........... untouched distribution tarball of the GNU make tool
22 tar-*.tar.gz ............ untouched distribution tarball of the GNU tar tool 20 tar-*.tar.gz ............ untouched distribution tarball of the GNU tar tool
21 config-*.tar.gz ......... untouched distribution tarball of the GNU config scripts
22 gzip-*.tar .............. pre-unpacked distribution tarball of the GNU gzip tool
23 gzip-*-openpkg-r*.tar ... pre-patched distribution files of the GNU gzip tool
24 perl-*-mini.tar.gz ...... stripped down distribution tarball of the Perl tool
25 rpm-*.tar.gz ............ untouched distribution tarball of the RPM tool
26 openssl-*.tar.gz ........ untouched distribution tarball of the OpenSSL toolkit
23 uuid-*.tar.gz ........... untouched distribution tarball of the OSSP uuid tool 27 uuid-*.tar.gz ........... untouched distribution tarball of the OSSP uuid tool
24 curl-*.tar.gz ........... untouched distribution tarball of the cURL tool 28 curl-*.tar.gz ........... untouched distribution tarball of the cURL tool
29 beecrypt-*.tar.gz ....... untouched distribution tarball of the BeeCrypt library
25 bzip2-*.tar.gz .......... untouched distribution tarball of the BZIP2 library 30 bzip2-*.tar.gz .......... untouched distribution tarball of the BZIP2 library
26 zlib-*.tar.gz ........... untouched distribution tarball of the ZLIB library 31 zlib-*.tar.gz ........... untouched distribution tarball of the ZLIB library
27 beecrypt-*.tar.gz ....... untouched distribution tarball of the BeeCrypt library 32 popt-*.tar.gz ........... untouched distribution tarball of the POPT library
28 rpm-*.tar.gz ............ untouched distribution tarball of the RPM tool 33 sqlite-*.tar.gz ......... untouched distribution tarball of the SQLite library
29 config-*.tar.gz ......... untouched distribution tarball of the GNU config scripts 34 pcre-*.tar.gz ........... untouched distribution tarball of the SQLite library
30 openpkg-registry-*.tar.gz untouched distribution tarball of the OpenPKG Registry 35 diffutils-*.tar.gz ...... untouched distribution tarball of the GNU diffutils toolkit
31 openpkg-tools-*.tar.gz .. untouched distribution tarball of the OpenPKG Tool Chain 36 svs-*.tar.gz ............ untouched distribution tarball of the OSSP svs tool
32 openssl-*.tar.gz ........ untouched distribution tarball of the OpenSSL toolkit 37 xz-*.tar.gz ............. untouched distribution tarball of the XZ tool
33 perl-*-mini.tar.gz ...... stripped down distribution tarball of the Perl tool 38
34 39 bash.patch .............. patch for GNU bash tool
35 make.patch .............. patch for GNU make 40 bash.patch.vendor ....... patch for GNU bash tool (upstream vendor only)
36 bash.patch .............. patch for GNU bash 41 bash.patch.vendor.sh .... patch for GNU bash tool (generation utility, NOT BUNDLED)
37 tar.patch ............... patch for GNU tar 42 beecrypt.patch .......... patch for BeeCrypt library
38 beecrypt.patch .......... patch for BeeCrypt 43 make.patch .............. patch for GNU make tool
39 openssl.patch ........... patch for OpenSSL 44 openssl.patch ........... patch for OpenSSL toolkit
40 perl.patch .............. patch for Perl 45 perl.patch .............. patch for Perl tool
41 gzip.c .................. replacement file for GNU gzip 46 tar.patch ............... patch for GNU tar tool
42 rpm.patch.bugfix ........ patch for RPM (bugfixing parts) 47 rpm.patch ............... patch for RPM tool
43 rpm.patch.feature ....... patch for RPM (new features parts) 48 popt.patch .............. patch for POPT library
44 rpm.patch.porting ....... patch for RPM (portability enhancement parts) 49 sqlite.patch ............ patch for SQLite library
45 rpm.patch.regen ......... patch for RPM (re-generated files parts) 50 curl.patch .............. patch for cURL library
51 diffutils.patch ......... patch for GNU diffutils tool
52 libarchive.patch ........ patch for BSD libarchive tool
53 pcre.patch .............. patch for PCRE library
54 xz.patch ................ patch for XZ tool
46 55
47 rpmpopt ................. replacements/extensions for RPM's POPT configuration 56 rpmpopt ................. replacements/extensions for RPM's POPT configuration
48 rpmmacros ............... replacements/extensions for RPM's macros 57 rpmmacros ............... replacements/extensions for RPM's macros
49 rpmrc ................... replacements for RPM's run-command configuration
50 58
51 root.README ............. the source for installed <prefix>/README 59 root.README ............. the source for installed <prefix>/README
52 local.README ............ the source for installed <prefix>/local/README 60 local.README ............ the source for installed <prefix>/local/README
53 dot.bashrc .............. the source for installed <prefix>/.bashrc 61 dot.bashrc .............. the source for installed <prefix>/.bashrc
54 dot.bash_login .......... the source for installed <prefix>/.bash_login 62 dot.bash_login .......... the source for installed <prefix>/.bash_login
55 dot.lsyncrc ............. the source for installed <prefix>/local/.lsyncrc 63 dot.lsyncrc ............. the source for installed <prefix>/local/.lsyncrc
56 64
57 openpkg.c ............... the OpenPKG frontend (set-uid wrapper) 65 openpkg.c ............... the OpenPKG frontend (set-uid wrapper)
66 openpkg.mk .............. the OpenPKG frontend (build procedure)
58 openpkg.sh .............. the OpenPKG frontend (main script) 67 openpkg.sh .............. the OpenPKG frontend (main script)
59 openpkg.pod ............. the OpenPKG frontend manual page (source) 68 openpkg.pod ............. the OpenPKG frontend manual page (source)
60 openpkg.1 ............... the OpenPKG frontend manual page (pre-generated output) 69 openpkg.1 ............... the OpenPKG frontend manual page (pre-generated output)
61 70
62 rc ...................... the OpenPKG run-command handling script 71 rc ...................... the OpenPKG run-command handling script
87 96
88 lsync ................... the lsync tool (program source) 97 lsync ................... the lsync tool (program source)
89 lsync.8 ................. the lsync tool (manual page) 98 lsync.8 ................. the lsync tool (manual page)
90 lsync.pod ............... the lsync tool (manual page source) 99 lsync.pod ............... the lsync tool (manual page source)
91 100
92 aux.usrgrp.sh ........... user/group name/id determination script 101 etc.usrgrp.sh ........... user/group name/id determination script
93 aux.prereq.sh ........... prerequisite checking script 102 etc.prereq.sh ........... prerequisite checking script
94 aux.wrapsrc.sh .......... wrapper script for generating openpkg-V-R.src.sh 103 etc.wrapsrc.sh .......... wrapper script for generating openpkg-V-R.src.sh
95 aux.wrapbin.sh .......... wrapper script for generating openpkg-V-R.P-L.sh 104 etc.wrapbin.sh .......... wrapper script for generating openpkg-V-R.P-L.sh
96 105
97 pod2man.sh .............. helper script for pre-generating manual page outputs
98 man.sh .................. helper script for "openpkg man" command 106 man.sh .................. helper script for "openpkg man" command
99 install.sh .............. helper script for "openpkg install" command 107
108 rpm.sh .................. wrapper for RPM
109 curl.sh ................. wrapper for cURL
110
111 dev.pl .................. the OpenPKG package development utility script
112 dev.pod ................. the OpenPKG package development utility manual page (source)
113 dev.8 ................... the OpenPKG package development utility manual page (pre-generated output)
114
115 index.pl ................ the OpenPKG package indexing utility script
116 index.pod ............... the OpenPKG package indexing utility manual page (source)
117 index.8 ................. the OpenPKG package indexing utility manual page (pre-generated output)
118
119 search.pl ............... the OpenPKG package searching utility script
120 search.pod .............. the OpenPKG package searching utility manual page (source)
121 search.8 ................ the OpenPKG package searching utility manual page (pre-generated output)
122
123 sea.sh .................. the OpenPKG shell execution archive utility script
124 sea.pod ................. the OpenPKG shell execution archive utility manual page (source)
125 sea.8 ................... the OpenPKG shell execution archive utility manual page (pre-generated output)
126
127 mirror.pl ............... the OpenPKG package mirroing utility script
128 mirror.pod .............. the OpenPKG package mirroing utility manual page (source)
129 mirror.8 ................ the OpenPKG package mirroing utility manual page (pre-generated output)
130
131 build.pl ................ the OpenPKG package building utility script
132 build.pod ............... the OpenPKG package building utility manual page (source)
133 build.8 ................. the OpenPKG package building utility manual page (pre-generated output)
134
135 makeproxy.pl ............ the OpenPKG proxy package building utility script
136 makeproxy.pod ........... the OpenPKG proxy package building utility manual page (source)
137 makeproxy.8 ............. the OpenPKG proxy package building utility manual page (pre-generated output)
100 138
101 openpkg.org.pgp ......... the OpenPGP public key "OpenPKG <openpkg@openpkg.org>" 139 openpkg.org.pgp ......... the OpenPGP public key "OpenPKG <openpkg@openpkg.org>"
102 openpkg.com.pgp ......... the OpenPGP public key "OpenPKG GmbH <openpkg@openpkg.com>" 140 openpkg.com.pgp ......... the OpenPGP public key "OpenPKG GmbH <openpkg@openpkg.com>"
103 openpkg.net.pgp ......... the OpenPGP public key "OpenPKG Foundation e.V. <openpkg@openpkg.net>" 141 openpkg.net.pgp ......... the OpenPGP public key "OpenPKG Foundation e.V. <openpkg@openpkg.net>"
104 142
143 license.sh .............. the OpenPKG license management utility script
144 license.pod ............. the OpenPKG license management utility manual page (source)
145 license.8 ............... the OpenPKG license management utility manual page (pre-generated output)
146 license-BOOT.txt ........ the OpenPKG Framework Bootstrapping License
147 license-COMMUNITY.txt ... the OpenPKG Framework Community License
148 license-EVAL.txt ........ the OpenPKG Framework Evaluation License
149 license-EXAMPLE.txt ..... the OpenPKG Framework Example License
150 license-PROMO.txt ....... the OpenPKG Framework Promotion License
151 license-RECOVERY.txt .... the OpenPKG Framework Recovery License
152 license.lua ............. the OpenPKG Framework license processor script
153
154 Makefile ................ development build procedures
155
105 The Bootstrapping Procedure 156 The Bootstrapping Procedure
106 --------------------------- 157 ---------------------------
107 158
108 The complexity of this OpenPKG RPM package results from the fact that 159 The complexity of this OpenPKG RPM package results from the fact that
109 we force us to treat this bootstrapping package equal to every other 160 we force us to treat this bootstrapping package equal to every other
110 regular OpenPKG RPM package. First, this implies that the packaging 161 regular OpenPKG RPM package. First, this implies that the packaging
111 tool RPM is packaged with itself as an OpenPKG RPM package (means: its 162 tool RPM is packaged with itself as an OpenPKG RPM package -- which
112 build procedure is a real RPM .spec file and it can be installed and 163 means that its build procedure is a real RPM .spec file and it can be
113 upgraded through a binary or source RPM). Second, RPM is installed 164 installed and upgraded through a binary or source RPM. Second, RPM is
114 into the same filesystem hierarchy as all other packages. Third, RPM 165 installed into the same filesystem hierarchy as all other packages.
115 manages its own files. The reason for this approach should be obvious: 166 Third, RPM manages its own files. The reason for this approach should
116 100% consistency for the whole OpenPKG software packaging facility! 167 be obvious: 100% consistency for the whole OpenPKG software packaging
168 facility!
117 169
118 The drawback is that this package requires a very tricky bootstrapping 170 The drawback is that this package requires a very tricky bootstrapping
119 procedure which had cost a lot of time to figure out and establish. If 171 procedure which had cost a lot of time to figure out and establish. If
120 you ever wanted to know the gory details, here they are... 172 you ever wanted to know the gory details, here they are...
121 173
135 187
136 After "openpkg.boot" executed the "%prep", "%build" and "%install" 188 After "openpkg.boot" executed the "%prep", "%build" and "%install"
137 scripts of "openpkg.spec", there is a fresh version of the target 189 scripts of "openpkg.spec", there is a fresh version of the target
138 filesystem hierarchy staying under a temporary "build root". The 190 filesystem hierarchy staying under a temporary "build root". The
139 "openpkg.boot" script then creates a very special temporary "openpkg 191 "openpkg.boot" script then creates a very special temporary "openpkg
140 rpm" command which allows the installed "openpkg rpm" command inside 192 rpm" command which allows the installed "openpkg rpm" command
141 the "build root" to work (although it is built for the final target 193 inside the "build root" to work (although it is built for the
142 filesystem path). Then the $RPM_BOOT variable is set and the package 194 final target filesystem path). Then the $OPENPKG_BOOT variable
143 is _again_ build via "openpkg.spec" -- but this time with the real 195 is set and the package is _again_ build via "openpkg.spec" --
144 OpenPKG RPM. To avoid unneccessary re-compilation, the "openpkg.spec" 196 but this time with the real OpenPKG RPM. To avoid unneccessary
145 skips "%prep", "%build" and "%install" sections if $RPM_BOOT is 197 re-compilation, the "openpkg.spec" skips "%prep", "%build" and
146 defined. So, on this second build phase, only the "%files" section is 198 "%install" sections if $OPENPKG_BOOT is defined. So, on this second
147 executed, i.e., a binary OpenPKG RPM package "openpkg-V-R.P-T.rpm" 199 build phase, only the "%files" section is effectively executed, i.e.,
148 is rolled from the files in the "build root". Additionally, a source 200 a binary OpenPKG RPM package "openpkg-V-R.P-T.rpm" is rolled from the
149 OpenPKG RPM package "openpkg-V-R.src.rpm" is rolled for consistency 201 files in the "build root". Additionally, a source OpenPKG RPM package
150 reasons. 202 "openpkg-V-R.src.rpm" is rolled for consistency reasons, too.
151 203
152 Finally, we override the installation in the "build root" 204 Finally, we override the installation in the "build root"
153 again by installing the now rolled binary OpenPKG RPM package 205 again by installing the now rolled binary OpenPKG RPM package
154 "openpkg-V-R.P-T.rpm" by using the real OpenPKG RPM. This way 206 "openpkg-V-R.P-T.rpm" by using the real OpenPKG RPM. This way
155 we achieve that OpenPKG RPM is remembered as a real OpenPKG RPM 207 we achieve that OpenPKG RPM is remembered as a real OpenPKG RPM
167 remaining is to roll a bootstrap package "openpkg" with this stuff for 219 remaining is to roll a bootstrap package "openpkg" with this stuff for
168 initial installation without OpenPKG RPM. For this the "build root" 220 initial installation without OpenPKG RPM. For this the "build root"
169 is packed into a "tarball", compressed, again wrapped into another 221 is packed into a "tarball", compressed, again wrapped into another
170 tarball together with the uncompression tools ("bzip2" and "tar"), 222 tarball together with the uncompression tools ("bzip2" and "tar"),
171 and finally wrapped into a self-extracting shell script by appending 223 and finally wrapped into a self-extracting shell script by appending
172 "aux.wrapbin.sh" (padded to 64KB for easier unpacking of the attached 224 "etc.wrapbin.sh" (padded to 64KB for easier unpacking of the attached
173 tarball) to its front. 225 tarball) to its front.
174 226
175 The result is the binary bootstrap script "openpkg-V-R.P-T.sh" which 227 The result is the binary bootstrap script "openpkg-V-R.P-T.sh" which
176 can be used to install the target hierarchy from scratch without any 228 can be used to install the target hierarchy from scratch without
177 pre-installed OpenPKG RPM. Nevetheless, the installed target hierarchy 229 any pre-installed OpenPKG RPM. Nevertheless, the installed target
178 looks _exactly_ as it would have been installed with OpenPKG RPM. 230 hierarchy looks _exactly_ as it would have been installed with OpenPKG
179 If one later wants to upgrade this hierarchy one can just use the 231 RPM. If one later wants to upgrade this hierarchy one can just use the
180 generated (or a newer) "openpkg-V-R.P-T.rpm". 232 generated (or a newer) "openpkg-V-R.P-T.rpm".
181 233
182 To allow one to easily repeat this from-source bootstrapping procedure 234 To allow one to easily repeat this from-source bootstrapping procedure
183 on other machines, one can run "./openpkg.boot -s" which rolls 235 on other machines, one can run "./openpkg.boot -s" which rolls
184 a "openpkg-V-R.src.sh" script which is a self-extracting script 236 a "openpkg-V-R.src.sh" script which is a self-extracting script

mercurial