[nss-util/f16] Update to NSS_3_13_4_RTM
Elio Maldonado
emaldonado at fedoraproject.org
Sat Apr 7 16:52:02 UTC 2012
commit 0b17408903797c6d0aaa0a6e0df49691a2a8d05e
Author: Elio Maldonado <emaldona at redhat.com>
Date: Sat Apr 7 09:51:31 2012 -0700
Update to NSS_3_13_4_RTM
.gitignore | 2 +-
mozilla-crypto-strip.sh | 128 +++++++++++++++++++++++++++++++++++++++++++++++
nss-util.spec | 41 ++++++++++------
sources | 2 +-
4 files changed, 156 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8e14894..c391d2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-nss-util-3.13.3.tar.bz2
+/nss-util-3.13.4.tar.bz2
diff --git a/mozilla-crypto-strip.sh b/mozilla-crypto-strip.sh
new file mode 100755
index 0000000..4edcbf0
--- /dev/null
+++ b/mozilla-crypto-strip.sh
@@ -0,0 +1,128 @@
+#!/bin/sh
+set -e
+
+if test -z $1
+then
+ echo "usage: $0 <input-tarball>"
+ exit
+fi
+
+ORIGDIR=`pwd`
+WORKDIR=nss_ecc_strip_working_dir
+EXTENSION=`echo $1 | sed -r 's#^(.*)(.tar.bz2|.tbz2|.tar.gz|.tgz)$#\2#'`
+BASE=`echo $1 | sed -r 's#^(.*)(.tar.bz2|.tbz2|.tar.gz|.tgz)$#\1#'`
+COMPRESS=""
+
+if test "x$EXTENSION" = "x.tar.bz2" || test "x$EXTENSION" = "x.tbz2"
+then
+ COMPRESS="j"
+fi
+
+if test "x$EXTENSION" = "x.tar.gz" || test "x$EXTENSION" = "x.tgz"
+then
+ COMPRESS="z"
+fi
+
+if test "x$COMPRESS" = "x"
+then
+ echo "unable to process, input file $1 has unsupported extension"
+ exit
+fi
+
+echo "== extension is $EXTENSION - ok"
+echo "== new extension will be $JEXTENSION"
+echo "== cleaning old workdir $WORKDIR"
+
+rm -rf $WORKDIR
+mkdir $WORKDIR
+
+echo "== extracting input archive $1"
+tar -x -$COMPRESS -C $WORKDIR -f $1
+
+echo "changing into $WORKDIR"
+pushd $WORKDIR
+
+DIRCOUNT=`ls -1 | wc -l`
+if test $DIRCOUNT -ne 1
+then
+ echo "unable to process, $1 contains more than one toplevel directory"
+ exit
+fi
+
+TOPDIR=`ls -1`
+if test "x$TOPDIR" != "xmozilla"
+then
+ # try to deal with a single additional subdirectory above "mozilla"
+ echo "== skipping toplevel directory $TOPDIR"
+ cd $TOPDIR
+fi
+
+DIRCOUNT=`ls -1 | wc -l`
+if test $DIRCOUNT -ne 1
+then
+ echo "unable to process, $1 contains more than one second level directory"
+ exit
+fi
+
+SINGLEDIR=`ls -1`
+if test "x$SINGLEDIR" != "xmozilla"
+then
+ echo "unable to process, first or second level directory is not mozilla"
+ exit
+fi
+
+echo "== input archive accepted, now processing"
+
+REALFREEBLDIR=mozilla/security/nss/lib/freebl
+FREEBLDIR=./$REALFREEBLDIR
+
+rm -rf ./mozilla/security/nss/cmd/ecperf
+
+mv ${FREEBLDIR}/ecl/ecl-exp.h ${FREEBLDIR}/save
+rm -rf ${FREEBLDIR}/ecl/tests
+rm -rf ${FREEBLDIR}/ecl/CVS
+for i in ${FREEBLDIR}/ecl/* ; do
+echo clobbering $i
+ > $i
+done
+mv ${FREEBLDIR}/save ${FREEBLDIR}/ecl/ecl-exp.h
+
+for j in ${FREEBLDIR}/ec.*; do
+ echo unifdef $j
+ cat $j | \
+ awk 'BEGIN {ech=1; prt=0;} \
+ /^#[ \t]*ifdef.*NSS_ENABLE_ECC/ {ech--; next;} \
+ /^#[ \t]*if/ {if(ech < 1) ech--;} \
+ {if(ech>0) {;print $0};} \
+ /^#[ \t]*endif/ {if(ech < 1) ech++;} \
+ {if (prt && (ech<=0)) {;print $0}; } \
+ {if (ech>0) {prt=0;} } \
+ /^#[ \t]*else/ {if (ech == 0) prt=1;}' > $j.hobbled && \
+ mv $j.hobbled $j
+done
+
+echo "== returning to original directory"
+popd
+
+JCOMPRESS=j
+JEXTENSION=.tar.bz2
+NEWARCHIVE=$BASE-stripped$JEXTENSION
+echo "== finally producing new archive $NEWARCHIVE"
+tar -c -$JCOMPRESS -C $WORKDIR -f $NEWARCHIVE $TOPDIR
+
+echo "== all done, listing of old and new archive:"
+ls -l $1
+ls -l $NEWARCHIVE
+
+LISTING_DIR=""
+if test "x$TOPDIR" != "xmozilla"
+then
+ LISTING_DIR="$TOPDIR/$REALFREEBLDIR/ecl"
+else
+ LISTING_DIR="$REALFREEBLDIR/ecl"
+fi
+
+echo "== FYI, producing listing of stripped dir in new archive"
+tar -t -v -$JCOMPRESS -C $WORKDIR -f $NEWARCHIVE $LISTING_DIR
+
+
diff --git a/nss-util.spec b/nss-util.spec
index ebff187..2d2bb53 100644
--- a/nss-util.spec
+++ b/nss-util.spec
@@ -2,8 +2,8 @@
Summary: Network Security Services Utilities Library
Name: nss-util
-Version: 3.13.3
-Release: 3%{?dist}
+Version: 3.13.4
+Release: 1%{?dist}
License: MPLv1.1 or GPLv2+ or LGPLv2+
URL: http://www.mozilla.org/projects/security/pki/nss/
Group: System Environment/Libraries
@@ -17,19 +17,27 @@ BuildRequires: psmisc
BuildRequires: perl
Source0: %{name}-%{version}.tar.bz2
-# The nss-util tar ball is a subset of nss-{version}-stripped.tar.bz2,
-# Therefore we use the nss-split-util.sh script to keeping only what we need.
-# Download the nss tarball via CVS from the nss propect and follow these
-# steps to make the r tarball for nss-util out of the for nss:
-# fedpkg clone nss
+# The nss-util tar ball is a subset of nss-{version}-stripped.tar.bz2.
+# We use the nss-split-util.sh script for keeping only what we need.
+# We first produce the full source archive from from the upstream,
+# nss-{version}-stripped.tar.gz, by running mozilla-crypto-strip.sh
+# to remove any non-free sources, none in this case but we want a bz2 archive,
+# and then split off nss-util from it via nss-split-util.sh {name}-{version}
+# Detailed Steps:
# fedpkg clone nss-util
-# cd nss-util/master
-# cp ../../nss/devel/${version}-stripped.tar.bz2 .
+# cd nss-util
+# Download the nss-{version}-stripped.tar.gz tarball from upstream
+# Strip-off unwanted sources with
+# ./mozilla-crypto-srip.sh nss-{version}-stripped.tar.gz
+# which produces nss-{version}-stripped.tar.bz2
+# Make the source tarball for nss-util out of the nss one:
# sh ./nss-split-util.sh ${version}
-# A file named {name}-{version}.tar.bz2 should appear
-Source1: nss-split-util.sh
-Source2: nss-util.pc.in
-Source3: nss-util-config.in
+# A file named ${name}-${version}.tar.bz2 should appear
+# ready to upload to the lookaside cache.
+Source1: mozilla-crypto-strip.sh
+Source2: nss-split-util.sh
+Source3: nss-util.pc.in
+Source4: nss-util-config.in
%description
@@ -96,7 +104,7 @@ export USE_64
# Set up our package file
%{__mkdir_p} ./mozilla/dist/pkgconfig
-%{__cat} %{SOURCE2} | sed -e "s,%%libdir%%,%{_libdir},g" \
+%{__cat} %{SOURCE3} | sed -e "s,%%libdir%%,%{_libdir},g" \
-e "s,%%prefix%%,%{_prefix},g" \
-e "s,%%exec_prefix%%,%{_prefix},g" \
-e "s,%%includedir%%,%{_includedir}/nss3,g" \
@@ -112,7 +120,7 @@ export NSSUTIL_VMAJOR
export NSSUTIL_VMINOR
export NSSUTIL_VPATCH
-%{__cat} %{SOURCE3} | sed -e "s, at libdir@,%{_libdir},g" \
+%{__cat} %{SOURCE4} | sed -e "s, at libdir@,%{_libdir},g" \
-e "s, at prefix@,%{_prefix},g" \
-e "s, at exec_prefix@,%{_prefix},g" \
-e "s, at includedir@,%{_includedir}/nss3,g" \
@@ -205,6 +213,9 @@ done
%{_includedir}/nss3/utilrename.h
%changelog
+* Fri Apr 06 2012 Elio Maldonado <emaldona at redhat.com> - 3.13.4-1
+- Update to NSS_3_13_4_RTM
+
* Wed Mar 28 2012 Elio Maldonado <emaldona at redhat.com> - 3.13.3
- Resolves: Bug 805716 - Library needs partial RELRO support added
diff --git a/sources b/sources
index 23e18b0..ddb16b1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ee3537b52cf903130a40ecff931a7dbd nss-util-3.13.3.tar.bz2
+4f42e8f698679701542ae3500d48403e nss-util-3.13.4.tar.bz2
More information about the scm-commits
mailing list