diff options
Diffstat (limited to 'legacy-scripts/top-script.sh')
-rwxr-xr-x | legacy-scripts/top-script.sh | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/legacy-scripts/top-script.sh b/legacy-scripts/top-script.sh new file mode 100755 index 0000000..a8320a0 --- /dev/null +++ b/legacy-scripts/top-script.sh @@ -0,0 +1,87 @@ +# -- #!/bin/bash + +# This is not a real script. You must execute the steps by hand. +# We do use auxiliary scripts inside and outside mock. +# 1. prepare for building +# 2. create a mock shell to build nss packages +# 3. build the nss related packages inside mock +# and also install the newly bult ones for some testing +# 4. exit mock to install in mock the dependencies for +# building a few nss client packages, e.g.xumrunne +# 5. create a mock shell to build nss clients (the old environment remains) +# 6. build some nss client packages inside mock +# At this stage we at least know we don't break others +# 7. Optional: collect the packages for further testing in a suitable +# virtual machine +# +# TODO: Automate some some, perhaps using python + +# +# Build nspr, nss-util, nss-softokn, and nss using mock. +# +# These exports define what we want to build +export nspr_v=4.8.9; export nspr_r=2 +export nss_v=3.13.1; export nss_r=3 +export nss_util_v=3.13.1; export nss_util_r=1 +export nss_softokn_v=3.12.10; export nss_softokn_r=7 +export nss_softokn_v= +export nss_softokn_r= +export nss_softokn_v=; export nss_softokn_r= +export target=16; export dist=16 +export arch=x86_64; export archalso=x86_64 + +# prepare for build +./mock-build-prepare.sh -a ${nspr_v} -b ${nspr_r} -c ${nss_v} -d ${nss_r} -e ${nss_util_v} -f ${nss_util_r} -g ${nss_softokn_v} -h ${nss_softokn_r} -i ${target} -j ${arch} + +# create a mock shell +mock -r fedora-rawhide-x86_64 --shell + +#------------------------------------------------------------------------- +# Now we are inside mock +#------------------------------------------------------------------------- + +# Must export these again +export nspr_v=4.8.9; export nspr_r=2 +export nss_v=3.13.1; export nss_r=3 +export nss_util_r=3.13.1; export nss_util_r=1 +export nss_softokn_r=""; export nss_softokn_r="" +export target=16; export dist=16 +export arch=x86_64; export archalso=x86_64 + +# build the packages +mock-build-inside.sh -a ${nspr_v} -b ${nspr_r} -c ${nss_v} -d ${nss_r} -e ${nss_util_v} f ${nss_util_r} -g ${nss_softokn_v} -h ${nss_softokn_r} -i ${target} -j ${arch} + +#Ignore these warnings +#Installing /builddir/build/RPMS +#error: not an rpm package +#error: /builddir/build/RPMS cannot be installed +cd /builddir/build/RPMS/ + +#go back to the ouside shell and package the rpm's +exit + +#----------------------------------------------------------------------------- +# We are outside mock now +#----------------------------------------------------------------------------- + +#------------------------------------------------------------------------------ +# Testing 1: Having our new versions in the build root should not break +# the build of other packages that depend on nss. Two very important +# pacakges are curl and xulrunner. curl is a client of the PEM module +# and xulrunner is how Mozilla applications call nss. +# +# Install dependencies for those devel packages that depend on nss and +# verify that we don't break their builds. + +sh ./prepare-nss-clients.sh -i ${target} -j ${arch} + +# back to mock +mock -r fedora-${target}-${arch} --shell + +# build xulrunner +rpmbuild --rebuild /tmp/xulrunner-*.src.rpm + +# Testing 2: You may now collect the rpms and send them to a convenient +# location fromwhere you can download them, install them for doing more +# tests on a virtual machine. The rpm's can be found at +# /var/lib/mock/fedora-${target}-${arch}/root/builddir/build/RPMS |