From 29537299613a512d8049e4fb1db71e742302719c Mon Sep 17 00:00:00 2001 From: Elio Maldonado Date: Sun, 6 Jan 2013 17:08:24 -0800 Subject: Simplify the shell scripts - Add build_nss_inside_mock.sh to do what its name says - Add build_nss.sh that builds all packages and them creates a mock shell to execute build_nss_inside_mock.sh - Need to modify build-nss.py and build_functions to invoke build_nss.sh - Remove the legacy-scripts - Update README with new exmaples --- build_nss.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 build_nss.sh (limited to 'build_nss.sh') diff --git a/build_nss.sh b/build_nss.sh new file mode 100755 index 0000000..aad12bb --- /dev/null +++ b/build_nss.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Build the nss package set and some nss clients inside mock +# +# 1. prepare for building: initialize the mock environment and +# install # packages we will need later when building nss +# 2. create a mock shell to build nss packages +# 3. build the nss related packages inside mock installing +# the newly built ones as we go along +# +# This script is meant to be invoked by build_nss.py + +dist=rawhide +DIST=${DIST:-$dist} +if [ $DIST = "rawhide" ]; then + DIST="19" +fi +arch=x86_64 +ARCH=${ARCH:-$arch} + +# prepare for build +# initialize the mock environment and install +# packages we will need later when building nss +mock -r fedora-${dist}-${arch} --init + +nss_pkgs="nspr nss-util nss-softokn nss" +NSS_PKGS=${NSS_PKGS:-$nss_pkgs} + +client_pkgs="crypto-utils curl evolution-data-server mod_nss mod_revocator openswan xulrunner" +CLIENT_PKGS=${CLIENT_PKGS:-$client_pkgs} + +workdir=`pwd` +for pkg in $NSS_PKGS; do + cd ${pkg} + fedpkg srpm + mock -r fedora-${dist}-${arch} --installdeps ${pkg}-*.src.rpm + mock -r fedora-${dist}-${arch} --copyin ${pkg}-*.src.rpm /tmp + cd ${workdir} +done + +for pkg in $CLIENT_PKGS; do + cd ${pkg} + fedpkg srpm + mock -r fedora-${dist}-${arch} --installdeps ${pkg}-*.src.rpm + mock -r fedora-${dist}-${arch} --copyin ${pkg}-*.src.rpm /tmp + cd ${workdir} +done + + +# copy the build script into mock +mock -r fedora-${dist}-${arch} --copyin ./build_nss_inside_mock.sh /usr/bin + +# create a mock shell and execute a build script thre +mock -r fedora-rawhide-x86_64 --shell NSS_PKGS=\"${NSS_PKGS}\" CLIENT_PKGS=\"${CLIENT_PKGS}\" build_nss_inside_mock.sh + +#---------------------------------------------------------------------- +# Inside mock we will execute build_nss_inside_mock.sh +#------------------------------------------------------------------------- + -- cgit