Mozilla-friendly build changes for NSS 3.8



16 years ago
16 years ago


(Reporter: wtc, Assigned: wtc)


Firefox Tracking Flags

(Not tracked)



(2 attachments)



16 years ago
We need to make some changes to the NSS TIP (3.8)
to be able to build it in the Mozilla client's
build environment.  These changes have to do with
the new .*chk FIPS checksum files.

1. The Mozilla client is now only building
mozilla/security/nss/lib because it doesn't need
anything in mozilla/security/nss/cmd.  This will
change in NSS 3.8 because the *.chk files are
generated by building and running

Unless we move shlibsign to mozilla/security/nss/lib,
Mozilla will need to build mozilla/security/nss/cmd/shlibsign
and its dependency mozilla/security/nss/cmd/lib.
We will also need to eliminate the unnecessary dependency
on mozilla/security/nss/cmd/zlib.

2. On Windows, Mozilla uses Cygwin's bash.  In
some build environments, full pathnames containing
drive letters (for example, d:/mozilla-tip/win.opt/dist)
may be passed to NSS.  mozilla/security/nss/cmd/shlibsign/
will need to add two directories derived from these
full pathnames to PATH, and under Cygwin's bash the
drive letters need to be escaped so that colons (:)
are not used (for example, /cygdrive/d/mozilla-tip/win.opt/dist).

Comment 1

16 years ago
Created attachment 117508 [details] [diff] [review]
Proposed patch

Comment 2

16 years ago

I need to convert a pathname containing a drive letter
(for example, d:/mozilla-tip/win.opt/dist) to a pathname
using cygdrive for Cygwin.  What is the best way to do

Right now I am using this command:
    ARG1=`(cd ${1}; pwd)`
where ${1} is the pathname that contains a drive letter.
Should I use Cygwin's cygpath command?
    ARG1=`cygpath -u ${1}`

Can I assume that the cygpath command is in every Cygwin
Priority: -- → P1
Target Milestone: --- → 3.8
Yes, cygpath is in every cygwin distribution that we support.  Of course, that
utility won't be present if you're trying to build NSS standalone using MKS
which has been noted as a concern in the past.

Comment 4

16 years ago
In the code path in question, we know the shell is Cygwin bash.
Given that, which method do you think is better?
    ARG1=`(cd ${1}; pwd)`
    ARG1=`cygpath -u ${1}`
I'd use cygpath just to avoid path issues with pwd (though we'll choke much
earlier if pwd is bad).

Comment 6

16 years ago
Created attachment 117615 [details] [diff] [review]
Patch to use cygpath (backed out)

This patch should be applied on top of the first patch.

Comment 7

16 years ago
Both patches have been checked in.
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 8

16 years ago
I just landed NSS 3.8 on the Mozilla trunk today.

The cygpath command caused the "WINNT 5.0 beast Dep" SeaMonkey
tinderbox build to fail.  I don't understand why cygpath can't
create title mutex.  Here is an excerpt of the build error log:

make[5]: Leaving directory
C:\cygwin\bin\cygpath.exe: *** can't create title mutex, Win32 error 6
c:/builds/seamonkey/tinderbox/WINNT_5.0_Depend/mozilla/nss/shlibsign -v -i
make[4]: ***
Error 128
make[4]: Leaving directory
make[3]: *** [libs] Error 2

Comment 9

16 years ago
Comment on attachment 117615 [details] [diff] [review]
Patch to use cygpath (backed out)

After I backed out this patch, Mozilla's "beast" tinderbox
is working again.  Go figure.
Attachment #117615 - Attachment description: Patch to use cygpath → Patch to use cygpath (backed out)
You need to log in before you can comment on or make changes to this bug.