summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElio Maldonado <emaldona@redhat.com>2013-01-06 17:08:24 -0800
committerElio Maldonado <emaldona@redhat.com>2013-01-06 17:08:24 -0800
commit29537299613a512d8049e4fb1db71e742302719c (patch)
treea386e48c4ee3dfef807325f9b92b08570eef417d
parent79650ad90c7b21e0889cdfd2bac6e21e72c3ccba (diff)
downloadnssmockbuilds4fedora-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
-rw-r--r--README11
-rwxr-xr-xbuild_nss.sh58
-rwxr-xr-xbuild_nss_inside_mock.sh33
-rwxr-xr-xlegacy-scripts/checkout-all-packages.sh55
-rwxr-xr-xlegacy-scripts/clean-all-packages.sh33
-rwxr-xr-xlegacy-scripts/install-clients-deps.sh31
-rwxr-xr-xlegacy-scripts/mock-build-inside.sh81
-rwxr-xr-xlegacy-scripts/mock-build-install-nss.sh47
-rwxr-xr-xlegacy-scripts/mock-build-prepare.sh105
-rwxr-xr-xlegacy-scripts/prepare-nss-clients.sh44
-rwxr-xr-xlegacy-scripts/srpm-all-packages.sh53
-rwxr-xr-xlegacy-scripts/top-script.sh87
-rwxr-xr-xprepare-all-srpms.sh11
13 files changed, 97 insertions, 552 deletions
diff --git a/README b/README
index ac2f7cc..b640152 100644
--- a/README
+++ b/README
@@ -13,17 +13,14 @@ useful for testing, in normal development we woudn't
have pushed anything yet to the repository.
Example 1:
-python ./build-nss.py -d -t -r rawhide -a i386 -sc -sw \
- -b nss -c crypto-utils -c evolution-data-server -n mod_nss
-
-will build nss only, the default would have been included nspr, nss-util, and nss-softoken also,
-only the clients crypto-utils and mod_nss
+DIST=rawhide ARCH=x86_64 NSS_PKGS="nspr nss-util" CLIENT_PKGS="mod_nss mod_revocator" ./build_nss.sh
+will build { nspr nss-util } only and then the { mod_nss mod_revocator } clients
Example 2:
-python ./build-nss.py -d -t -r rawhide -a i386 -sc -sw
+DIST=rawhide ARCH=x86_64 NSS_PKGS="nspr nss-util" CLIENT_PKGS="mod_nss mod_revocator" ./build_nss.sh
will build the default sets, that is:
{ nspr, nss-util, nss-softokn, nss }
plus all of the crucial client packages
{ crypto-utils, curl, evolution-data-server, mod_nss, mod_revocator, openswan, xulrunner }
-]
+
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
+#-------------------------------------------------------------------------
+
diff --git a/build_nss_inside_mock.sh b/build_nss_inside_mock.sh
new file mode 100755
index 0000000..3e2bed3
--- /dev/null
+++ b/build_nss_inside_mock.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Build the nss package set and some nss clients inside mock
+
+#dist=19
+#arch=x86_64
+
+# Ignore these warnings
+# Installing /builddir/build/RPMS
+# error: not an rpm package
+# error: /builddir/build/RPMS cannot be installed
+cd /builddir/build/RPMS/
+
+# build and install the nss packages
+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}
+
+# build and install the nss packages
+for pkg in $NSS_PKGS; do
+ rpmbuild --rebuild /tmp/${pkg}-*.src.rpm
+ package=`rpm -qp /tmp/${pkg}-*.src.rpm`
+ notInstalled=`rpm -q $package | grep "not installed"`
+ if [ -n "${notInstalled}" ]; then
+ rpm -ihv /builddir/build/RPMS/${pkg}-*
+ fi
+done
+# build the client packages
+for pkg in $CLIENT_PKGS; do
+ rpmbuild --rebuild /tmp/${pkg}-*.src.rpm
+done
+
diff --git a/legacy-scripts/checkout-all-packages.sh b/legacy-scripts/checkout-all-packages.sh
deleted file mode 100755
index 0001b1d..0000000
--- a/legacy-scripts/checkout-all-packages.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-
-# checks out nspr, nss-util, nss-softokn, and nss
-# checks out also some clients of nss, xulrunner, etc.
-# Usage: checkout-all-packages [-b branch], defaults to master
-#
-# TODO: Pass the package names as arguments
-
-checkout_pkgs() {
- for p in $1; do
- fedpkg clone $p
- pushd $p
- if [ -n "$2" ]; then
- fedpkg switch-branch $2
- fi
- popd
- done
-}
-
-srpm_pkgs() {
- for p in $1; do
- pushd $p
- fedpkg srpm
- popd
- done
-}
-
-#----------------------------------------------------------
-nssPkgs="nspr nss-util nss-softokn nss"
-clientPkgs="crypto-utils curl evolution-data-server mod_nss mod_revocator nss_compat_ossl openswan xulrunner"
-
-while getopts b:s: opt
-do
- case $opt in
- b) export branch="$OPTARG";;
- s) export srpms="$OPTARG";;
- ?) printf "Usage: %s: [-b branch]\n [-s {false|true}]\n defauls to master and no srpms" $0
- exit 2;;
- esac
-done
-
-echo "branch = ${branch}"
-echo "srpms = ${srpms}"
-
-source ./clean-all-packages.sh
-
-checkout_pkgs "${nssPkgs}" "${branch}"
-checkout_pkgs "${clientPkgs}" "${branch}"
-
-if [ "${srpms}" = "true" ]; then
- srpm_pkgs "${nssPkgs}"
- srpm_pkgs "${clientPkgs}"
-fi
-
-
diff --git a/legacy-scripts/clean-all-packages.sh b/legacy-scripts/clean-all-packages.sh
deleted file mode 100755
index bd8dee9..0000000
--- a/legacy-scripts/clean-all-packages.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-# check out nspr, nss-util, nss-softokn, and nss
-# check out also some clients of nss
-
-remove_pkgs() {
- for p in $1; do
- rm -fr $p
- done
-}
-
-#----------------------------------------------------------
-
-nssPkgs="nspr nss-util nss-softokn nss"
-clientPkgs="crypto-utils curl evolution-data-server mod_nss mod_revocator nss_compat_ossl openswan xulrunner"
-
-# Defaults
-TARGET=Rawhide
-
-while getopts i: opt
-do
- case $opt in
- i) TARGET="$OPTARG";;
- ?) printf "Usage: %s: [-i dist]\n" $0
- exit 2;;
- esac
-done
-
-export dist=${TARGET}
-
-remove_pkgs "${nssPkgs}"
-remove_pkgs "${clientPkgs}"
-
diff --git a/legacy-scripts/install-clients-deps.sh b/legacy-scripts/install-clients-deps.sh
deleted file mode 100755
index 5c31eb7..0000000
--- a/legacy-scripts/install-clients-deps.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# Defaults
-TARGET=16
-ARCH=x86_64
-
-while getopts i:j: opt
-do
- case $opt in
- i) TARGET="$OPTARG";;
- j) ARCH="$OPTARG";;
- ?) printf "Usage: %s: [-i dist] [-j arch]\n" $0
- exit 2;;
- esac
-done
-
-export dist=${TARGET}
-export arch=${ARCH}
-
-cc="crypto-utils curl xulrunner";
-
-for c in $cc; do
- pushd ${c}
- fedpkg clean
- fedpkg srpm
- mock -r fedora-${dist}-${arch} --copyin ${c}-*.src.rpm /tmp
- mock -r fedora-${dist}-${arch} --installdeps ${c}-*.src.rpm
- popd
-done
-
-
diff --git a/legacy-scripts/mock-build-inside.sh b/legacy-scripts/mock-build-inside.sh
deleted file mode 100755
index 8cadb37..0000000
--- a/legacy-scripts/mock-build-inside.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-
-#
-# Rebase nss and nspr using mock to build nss and clients
-# Using beta candidates
-#
-# --nspr=nspr-version
-# --nss=nss-version
-# --fedora=target
-# --arch=arch or current
-
-export_tags() {
-export nspr_v=${NSPR_V}
-export nspr_r=${NSPR_R}
-export nss_v=${NSS_V}
-export nss_r=${NSS_R}
-export nss_util_v=${NSS_UTIL_V}
-export nss_util_r=${NSS_UTIL_R}
-export nss_softokn_v=${NSS_SOFTOKN_V}
-export nss_softokn_r=${NSS_SOFTOKN_R}
-export target=${TARGET}
-export dist=${DIST}
-export arch=${ARCH}
-export archalso=${ARCHALSO}
-}
-
-#----------------------------------------------------------
-# Defaults to not building any package
-# you must pass a {version,release} for it to be built
-NSPR_V=
-NSPR_R=
-NSS_V=
-NSS_R=
-NSS_UTIL_V=
-NSS_UTIL_R=1
-NSS_SOFTOKN_V=
-NSS_SOFTOKN_R=
-TARGET=16
-DIST=16
-ARCH=x86_64
-ARCHALSO=x86_64
-
-while getopts :a:b:c:d:e:f:g:h:i:j: opt
-do
- case $opt in
- a) NSPR_V="$OPTARG";;
- b) NSPR_R="$OPTARG";;
- c) NSS_V="$OPTARG";;
- d) NSS_R="$OPTARG";;
- e) NSS_UTIL_R="$OPTARG";;
- f) NSS_UTIL_V="$OPTARG";;
- g) NSS_SOFTOKN_R="$OPTARG";;
- h) NSS_SOFTOKN_V="$OPTARG";;
- i) TARGET="$OPTARG";;
- j) ARCH="$OPTARG";;
- ?) printf "Usage: %s: [-a nspr_version] [-b nspr_version] [-c nss_version] [-d nss_version] [-e dist] [-f arch]\n" $0
- exit 2;;
- esac
-done
-if [ ${ARCH} eq "i386" ]; then
- ARCHALSO="i686"
-fi
-
-# set environment variables
-export_tags
-
-# for ease of installing later
-cd /builddir/build/RPMS/
-
-# build and install the packages
-nssPkgs="nspr nss-util nss_softokn nss"
-for pkg in nssPkgs; do
- ver=${pkg}_v
- rel=${pkg}_r
- if [ -n ${ver} ] && [ -n ${rel} ]; then
- rpmbuild --rebuild /tmp/${pkg}-${ver}-${rel}.fc${target}.src.rpm
- pm -ihv /builddir/build/RPMS/${pkg}-*
- fi
-done
-
-
diff --git a/legacy-scripts/mock-build-install-nss.sh b/legacy-scripts/mock-build-install-nss.sh
deleted file mode 100755
index 49d7bbb..0000000
--- a/legacy-scripts/mock-build-install-nss.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-#
-# Installs nss in mock
-#
-export_tags() {
-export nss_version=${NSS_V}
-export nss_release=${NSS_R}
-export target=${TARGET}
-export dist=${DIST}
-export arch=${ARCH}
-export archalso=${ARCHALSO}
-}
-
-# Defaults
-NSS_V=3.12.9
-NSS_R=8
-TARGET=14
-DIST=rawhide
-ARCH=x86_64
-ARCHALSO=x86_64
-
-while getopts :c:d:i:j: opt
-do
- case $opt in
- c) NSS_V="$OPTARG";;
- d) NSS_R="$OPTARG";;
- i) TARGET="$OPTARG";;
- j) ARCH="$OPTARG";;
- ?) printf "Usage: %s [-c nss_version] [-d nss_release] [-i dist] [-j arch]\n" $0
- exit 2;;
- esac
-done
-if [ "${ARCH}" = "i386" ]; then
- ARCHALSO="i686"
-fi
-
-export_tags
-
-# install nss
-rpm -Uhv \
-nss-${nss_version}-${nss_release}.fc${target}.${archalso}.rpm \
-nss-sysinit-${nss_version}-${nss_release}.fc${target}.${archalso}.rpm \
-nss-tools-${nss_version}-${nss_release}.fc${target}.${archalso}.rpm \
-nss-debuginfo-${nss_version}-${nss_release}.fc${target}.${archalso}.rpm \
-nss-devel-${nss_version}-${nss_release}.fc${target}.${archalso}.rpm \
-nss-pkcs11-devel-${nss_version}-${nss_release}.fc${target}.${archalso}.rpm
-
diff --git a/legacy-scripts/mock-build-prepare.sh b/legacy-scripts/mock-build-prepare.sh
deleted file mode 100755
index ddfa2a7..0000000
--- a/legacy-scripts/mock-build-prepare.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash
-
-#
-# Rebase to nss and nspr using mock to build
-# Using beta candidates
-#
-
-export_tags() {
-export nspr_v=${NSPR_V}
-export nspr_r=${NSPR_R}
-export nss_v=${NSS_V}
-export nss_r=${NSS_R}
-export nss_util_v=${NSS_UTIL_V}
-export nss_util_r=${NSS_UTIL_R}
-export nss_softokn_v=${NSS_SOFTOKN_V}
-export nss_softokn_r=${NSS_SOFTOKN_R}
-export target=${TARGET}
-export dist=${DIST}
-export arch=${ARCH}
-export archalso=${ARCHALSO}
-}
-
-#----------------------------------------------------------
-
-# Defaults are mostly empty, so that package won't be built
-# unless two values {version,release} are passed in
-nspr_v=
-nspr_r=
-nss_v=
-nss_r=
-nss_util_v=
-nss_util_r=
-nss_softokn_v=
-nss_softokn_r=
-
-target=16
-dist=f16
-
-arch=x86_64
-archalso=x86_64
-
-while getopts :a:b:c:d:e:f:g:h:i:j: opt
-do
- case $opt in
- a) nspr_v="$OPTARG";;
- b) nspr_r="$OPTARG";;
- c) nss_v="$OPTARG";;
- d) nss_r="$OPTARG";;
- e) nss_util_v="$OPTARG";;
- f) nss_util_r="$OPTARG";;
- g) nss_softokn_v="$OPTARG";;
- h) nss_softokn_r="$OPTARG";;
- i) target="$OPTARG";;
- j) arch="$OPTARG";;
- ?) printf "Usage: %s [-a nspr_v] [-b nspr_r] [-c nss_version] [-d nss_r] [-e nss_util_v] [-f nss_util_r] [-g nss_softokn_v] [-h nss_softokn_r] [-i dist] [-j arch]\n" $0
- exit 2;;
- esac
-done
-
-if [ "${TARGET}" = "rawhide" ]; then
- # change as we move along
- TARGET = f17
- DIST="rawhide"
-fi
-if [ "${ARCH}" = "i386" ]; then
- ARCHALSO="i686"
-fi
-
-echo "nspr_v=${nspr_v}"
-echo "nspr_r=${nspr_r}"
-echo "nss_v=${nss_v}"
-echo "nss_r=${nss_r}"
-echo "nss_util_v=${nss_util_v}"
-echo "nss_util_r=${nss_util_r}"
-echo "nss_softokn_v=${nss_softokn_v}"
-echo "nss_softokn_r=${nss_softokn_r}"
-echo "target=${target}"
-echo "dist=${dist}"
-echo "arch=${arch}"
-echo "archalso=${archalso}"
-
-# initialize the mock environment and install
-# packages we will need later when building nss
-mock -r fedora-${dist}-${arch} --init
-mock -r fedora-${dist}-${arch} --install sqlite-devel zlib-devel pkgconfig gawk psmisc perl vim
-mock -r fedora-${dist}-${arch} --install nspr-devel nss-util-devel nss-softokn-devel nss-devel
-
-nssPkgs="nspr nss-util nss_softokn nss"
-for pkg in $nssPkgs; do
- if [ -n ${pkg}_v} ] && [ -n ${pkg}_r ]; then
- cd ${pkg}; fedpkg clean; fedpkg srpm
- # mock -r fedora-${dist}-${arch} --installdeps ${pkg}-*.fc${target}.src.rpm
- mock -r fedora-${dist}-${arch} --copyin ${pkg}-*.fc${target}.src.rpm /tmp
- fi
-done
-
-# copy the build script into mock
-mock -r fedora-${dist}-${arch} --copyin ./mock-build-inside.sh /usr/bin
-mock -r fedora-${dist}-${arch} --copyin ./mock-build-install-nss.sh /usr/bin
-mock -r fedora-${dist}-${arch} --copyin ./install-clients-deps.sh /usr/bin
-
-# create a mock shell
-#mock -r fedora-${dist}-${arch} --shell
-#exit
-# mock-build-inside.sh -a ${nspr_v} -b ${nspr_r} -c ${nss_version} -d ${nss_r} -e ${dist} -f ${arch}
diff --git a/legacy-scripts/prepare-nss-clients.sh b/legacy-scripts/prepare-nss-clients.sh
deleted file mode 100755
index 02f5762..0000000
--- a/legacy-scripts/prepare-nss-clients.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-#
-
-# Defaults
-TARGET=14
-ARCH=x86_64
-
-#------------------------------------------------------------------------------
-# Testing: 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.
-
-while getopts i:j: opt
-do
- case $opt in
- i) TARGET="$OPTARG";;
- j) ARCH="$OPTARG";;
- ?) printf "Usage: %s: [-a nspr_version] [-b nspr_version] [-c nss_version] [-d nss_version] [-e dist] [-f arch]\n" $0
- exit 2;;
- esac
-done
-
-export dist=${TARGET}
-export arch=${ARCH}
-
-cc="curl xulrunner"
-
-for c in $cc; do
- pushd $c
- fedpkg clean
- fedpkg srpm
- fedpkg local
- push ${arch}
- mock -r fedora-${dist}-${arch} --installdeps *.rpm
- popd
- mock -r fedora-${dist}-${arch} --copyin ${c}-*.src.rpm /tmp
- popd
-done
-
-
diff --git a/legacy-scripts/srpm-all-packages.sh b/legacy-scripts/srpm-all-packages.sh
deleted file mode 100755
index d8a2bd9..0000000
--- a/legacy-scripts/srpm-all-packages.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-# checks out nspr, nss-util, nss-softokn, and nss
-# checks out also some clients of nss, xulrunner, etc.
-# Usage: checkout-all-packages [-b branch], defaults to master
-#
-# TODO: Pass the package names as arguments
-
-checkout_pkgs() {
- for p in $1; do
- fedpkg clone $p
- pushd $p
- if [ -n "$2" ]; then
- fedpkg switch-branch $2
- fi
- popd
- done
-}
-
-srpm_pkgs() {
- for p in $1; do
- pushd $p
- fedpkg srpm
- popd
- done
-}
-
-#----------------------------------------------------------
-nssPkgs="nspr nss-util nss-softokn nss"
-clientPkgs="crypto-utils curl evolution-data-server mod_nss mod_revocator nss_compat_ossl openswan xulrunner"
-
-
-while getopts b: opt
-do
- case $opt in
- b) export branch="$OPTARG";;
- ?) printf "Usage: %s: [-b branch]\n defauls to master" $0
- exit 2;;
- esac
-done
-
-echo "branch = ${branch}"
-
-#source ./clean-all-packages.sh
-
-#checkout_pkgs "${nssPkgs}" "${branch}"
-#checkout_pkgs "${clientPkgs}" "${branch}"
-
-srpm_pkgs "${nssPkgs}"
-srpm_pkgs "${clientPkgs}"
-
-
-
diff --git a/legacy-scripts/top-script.sh b/legacy-scripts/top-script.sh
deleted file mode 100755
index a8320a0..0000000
--- a/legacy-scripts/top-script.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-# -- #!/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
diff --git a/prepare-all-srpms.sh b/prepare-all-srpms.sh
index fafdc2d..66e4e2c 100755
--- a/prepare-all-srpms.sh
+++ b/prepare-all-srpms.sh
@@ -7,12 +7,10 @@
# TODO: Pass the package names as arguments
checkout_and_srpm_pkgs() {
+ OPTION_BRANCH = [ -n "$2" ] ? "--branch $2" : ""
for p in $1; do
- fedpkg clone $p
+ fedpkg clone $p ${OPTION_BRANCH} --anonymous
pushd $p
- if [ -n "$2" ]; then
- fedpkg switch-branch $2
- fi
fedpkg srpm
cp -p $p-*.src.rpm ../../packages/SRPMS
popd
@@ -45,11 +43,6 @@ if [ -e packages/SRPMS ]; then
fi
mkdir packages/SRPMS
-if [ -e srpms4allpacakes ]; then
- rm -rf srpms4allpacakes
-fi
-mkdir srpms4allpacakes
-pushd srpms4allpacakes
remove_pkgs "${nssPkgs}"
remove_pkgs "${clientPkgs}"
checkout_and_srpm_pkgs "${nssPkgs}" "${branch}"