openpkg/etc.wrapbin.sh

changeset 445
43a74e63d4a3
parent 428
f880f219c566
child 450
061d2617f42f
equal deleted inserted replaced
0:728f9d08efcb 1:c2ef2271f881
177 # immediately activate BOOT license to let the 177 # immediately activate BOOT license to let the
178 # following early RPM usage already work correctly 178 # following early RPM usage already work correctly
179 echo "BOOT" >$l_prefix/etc/openpkg/license 179 echo "BOOT" >$l_prefix/etc/openpkg/license
180 180
181 # fixate installation files 181 # fixate installation files
182 # (ATTENTION: order of chgrp/chown and chmod is important because of "set-UID" bits) 182 # (ATTENTION: order of chgrp/chown and chmod is important because of "setuid" bits)
183 echo "++ fixating OpenPKG instance filesystem hierarchy" 183 echo "++ fixating OpenPKG instance filesystem hierarchy"
184 ( echo 'fixate () {' 184 ( echo 'fixate () {'
185 echo ' chgrp "$3" "$4"' 185 echo ' chgrp "$3" "$4"'
186 echo ' chown "$2" "$4"' 186 echo ' chown "$2" "$4"'
187 echo ' chmod "$1" "$4"' 187 echo ' chmod "$1" "$4"'
190 --qf '[fixate %7.7{FILEMODES:octal} %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} ::%{FILENAMES:shescape}\n]' |\ 190 --qf '[fixate %7.7{FILEMODES:octal} %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} ::%{FILENAMES:shescape}\n]' |\
191 grep -v '(none)' | sed 's/^fixate .../fixate /' | sed -e "s; ::\\(.\\)@l_prefix@; \\1$l_prefix;" 191 grep -v '(none)' | sed 's/^fixate .../fixate /' | sed -e "s; ::\\(.\\)@l_prefix@; \\1$l_prefix;"
192 ) | sh 2>/dev/null || true 192 ) | sh 2>/dev/null || true
193 193
194 # running the embedded %post script 194 # running the embedded %post script
195 echo "++ post-processing OpenPKG bootstrap installation" 195 echo "++ postprocessing OpenPKG bootstrap installation"
196 prefix="$l_prefix" 196 prefix="$l_prefix"
197 susr='@SUSR@'; sgrp='@SGRP@' 197 susr='@SUSR@'; sgrp='@SGRP@'
198 musr='@MUSR@'; mgrp='@MGRP@' 198 musr='@MUSR@'; mgrp='@MGRP@'
199 rusr='@RUSR@'; rgrp='@RGRP@' 199 rusr='@RUSR@'; rgrp='@RGRP@'
200 nusr='@NUSR@'; ngrp='@NGRP@' 200 nusr='@NUSR@'; ngrp='@NGRP@'
231 echo "" 231 echo ""
232 echo " \$ ${l_prefix}/bin/openpkg rpm --rebuild /path/to/foo-*.src.rpm" 232 echo " \$ ${l_prefix}/bin/openpkg rpm --rebuild /path/to/foo-*.src.rpm"
233 echo " \$ ${l_prefix}/bin/openpkg rpm -Uvh ${l_prefix}/RPM/PKG/foo-*.rpm" 233 echo " \$ ${l_prefix}/bin/openpkg rpm -Uvh ${l_prefix}/RPM/PKG/foo-*.rpm"
234 echo "" 234 echo ""
235 echo "To leverage from remote indexes on download.openpkg.org and" 235 echo "To leverage from remote indexes on download.openpkg.org and"
236 echo "conveniently generate a shell script for all-in-one downloading" 236 echo "conveniently generate a shell script for all in one downloading"
237 echo "(openpkg curl), building (openpkg rpm --rebuild) and installing" 237 echo "(openpkg curl), building (openpkg rpm --rebuild) and installing"
238 echo "(openpkg rpm -Uvh) one or more OpenPKG RPM packages, including all" 238 echo "(openpkg rpm -Uvh) one or more OpenPKG RPM packages, including all"
239 echo "their transitive dependencies, in topologically correct order:" 239 echo "their transitive dependencies, in topologically correct order:"
240 echo "" 240 echo ""
241 echo " \$ ${l_prefix}/bin/openpkg build foo bar quux | sh" 241 echo " \$ ${l_prefix}/bin/openpkg build foo bar quux | sh"
254 echo " OpenPKG GmbH" 254 echo " OpenPKG GmbH"
255 echo " openpkg.com" 255 echo " openpkg.com"
256 ) | $l_prefix/lib/openpkg/rpmtool msg -b -t info 256 ) | $l_prefix/lib/openpkg/rpmtool msg -b -t info
257 257
258 # die explicitly just before the shell would discover 258 # die explicitly just before the shell would discover
259 # that we carry mega-bytes of data with us... ;-) 259 # that we carry megabytes of data with us... ;-)
260 exit 0 260 exit 0
261 261
262 # the distribution tarball is appended in raw format directly to the 262 # the distribution tarball is appended in raw format directly to the
263 # end of this script, just leaded by padding whitespaces which make 263 # end of this script, just leaded by padding whitespaces which make
264 # sure that the tarball data starts at the pre-defined offset of 64KB. 264 # sure that the tarball data starts at the predefined offset of 64KB.
265 # This allows us to unpack the tarball by just skipping the leading 265 # This allows us to unpack the tarball by just skipping the leading
266 # 64KB (= 8192*8, see above). 266 # 64KB (= 8192*8, see above).
267 267

mercurial