diff options
author | Elio Maldonado <emaldona@redhat.com> | 2013-01-06 17:08:24 -0800 |
---|---|---|
committer | Elio Maldonado <emaldona@redhat.com> | 2013-01-06 17:08:24 -0800 |
commit | 29537299613a512d8049e4fb1db71e742302719c (patch) | |
tree | a386e48c4ee3dfef807325f9b92b08570eef417d /build_nss.sh | |
parent | 79650ad90c7b21e0889cdfd2bac6e21e72c3ccba (diff) | |
download | nssmockbuilds4fedora-29537299613a512d8049e4fb1db71e742302719c.tar.gz nssmockbuilds4fedora-29537299613a512d8049e4fb1db71e742302719c.tar.xz nssmockbuilds4fedora-29537299613a512d8049e4fb1db71e742302719c.zip |
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
Diffstat (limited to 'build_nss.sh')
-rwxr-xr-x | build_nss.sh | 58 |
1 files changed, 58 insertions, 0 deletions
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 +#------------------------------------------------------------------------- + |