nss - Mozilla Network Security Services ChangeLog

HOWTO


# NSS 3.96.1
# ==========
# Slackware 14.0: mozilla-nss 3.13.5
# Slackware 14.1: mozilla-nss 3.15.2
# Slackware 14.2: mozilla-nss 3.23
# Slackware 15.0: mozilla-nss 3.74

# As this is written, the home page URL at developer.mozilla.org redirects
# to:
# https://firefox-source-docs.mozilla.org/security/nss/index.html

# If you ever want to uninstall NSS, look at the install commands below
# and remove everything that was installed...  If you want to keep a list
# for the future, you can pipe the output of 'install' to 'tee' to
# view stdout and also write to a file.

# Overview of NSS
# Building NSS
# NSS 3.96.1 release notes

# Mozilla Discussion Forums
# https://wiki.mozilla.org/NSS
# https://www-archive.mozilla.org/projects/security/pki/nss/

# NSS release notes
# (may take some time to update for the latest if it was recently released)

# NSS 3.96.1 Release

# Prerequisites:
# gyp-next
# Ninja
# NSPR >= 4.35
# SQLite

# We get the combined nss-nspr tarball here because nss uses nspr's
# configure script, you can separately install NSPR before doing this

# Get it
cd
test -f installed/nss-3.96.1-with-nspr-4.35.tar.gz &&
mv -f installed/nss-3.96.1-with-nspr-4.35.tar.gz .
test ! -f nss-3.96.1-with-nspr-4.35.tar.gz &&
wget https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_96_1_RTM/src/\
nss-3.96.1-with-nspr-4.35.tar.gz

# Verify tarball w/ sha256sum:
echo "81e080ec10883e9526418b73f27342c1c25e5de118401c8f105166f1e93967\
0a  nss-3.96.1-with-nspr-4.35.tar.gz" | sha256sum -c

# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "nss-*" -exec rm -r {} \;
tar xzvf ~/nss-3.96.1-with-nspr-4.35.tar.gz
cd nss-3.96.1
test $UID = 0 && chown -R root:root .

cd nss

# See ./help.txt for build.sh arguments

# If you do not have an already installed NSPR, leave off --with-nspr=...
# to install both

# I tried and failed to build 3.95 and 3.96.1 without --disable-tests

# Build it
./build.sh -v -j $(nproc) --opt --system-sqlite --enable-libpkix \
--with-nspr=/usr/include/nspr:/usr/lib64 --disable-tests

# Create a nss-config file
sed -e "s%@prefix@%/usr%" \
    -e "s/@MOD_MAJOR_VERSION@/3/" \
    -e "s/@MOD_MINOR_VERSION@/96/" \
    -e "s/@MOD_PATCH_VERSION@/1/" \
    pkg/pkg-config/nss-config.in > nss-config

# Create a mozilla-nss.pc pkg-config file
LIBDIR=lib
NSPRVER=$(nspr-config --version | cut -d. -f1,2)
test $(uname -m) = 'x86_64' && LIBDIR=lib64
sed -e "s|%prefix%|/usr|" \
    -e "s|%exec_prefix%|/usr|" \
    -e "s|%libdir%|/usr/${LIBDIR}|" \
    -e "s|%includedir%|/usr/include/nss|" \
    -e "s|%NSS_VERSION%|3.96.1|" \
    -e "s|%NSPR_VERSION%|${NSPRVER}|" \
    -e "s|^Requires: \(.*\)|& sqlite3|" \
    pkg/pkg-config/nss.pc.in > nss.pc
unset LIBDIR
unset NSPRVER

cd ../dist/Release

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg mozilla-nss

# Install it
# [ Historically I just keep doing this, though maybe these days
#   'make install' would be fine or at least partly fine; maybe next time ]
install -d /usr/include/nss
install -s bin/* /usr/bin/
install -m 755 ../../nss/nss-config /usr/bin/
install -m 644 ../public/nss/*.h /usr/include/nss/
test $(uname -m) = 'x86_64' &&
( install lib/*.so /usr/lib64/
   install -m 644 ../../nss/nss.pc /usr/lib64/pkgconfig/
   ln -sf /usr/lib64/pkgconfig/nss.pc /usr/lib64/pkgconfig/mozilla-nss.pc )
test $(uname -m) != 'x86_64' &&
( install lib/* /usr/lib/
   install -m 644 ../../nss/nss.pc /usr/lib/pkgconfig/
   ln -sf /usr/lib/pkgconfig/nss.pc /usr/lib/pkgconfig/mozilla-nss.pc )

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/nss-*-with-nspr-*.tar.*
mv nss-3.96.1-with-nspr-4.35.tar.gz installed/

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2023-12-22 4:34pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]