Closed Bug 189504 Opened 22 years ago Closed 22 years ago

Build Linux RPMS

Categories

(NSS :: Build, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kirk.erickson, Assigned: kirk.erickson)

Details

Attachments

(2 files, 2 obsolete files)

Create Makefile infrastructure to build RedHat Linux RPMs.
Use Solaris packages as a guide for what and where to install
a RedHat 7.2 build of NSS.

Bug 158683 added pkg/solaris. This bug adds pkg/linux.
Consider adding ./mozilla/security/nss/pkg/Makefile, and removing
the 'solarispkg' target from ./mozilla/security/nss/Makefile,
replacing it with a 'packages' target that does a publish in
the pkg directory.  The new Makefile would set DIRS to 'solaris'
or 'linux', or '' depending on $(OS_ARCH).
Changed highlevel target from 'solarispkg' to 'package',
and added ./mozilla/security/nss/pkg/Makefile.	We decend into
pkg/linux when OS_TARGET is Linux and pkg/solaris when OS_TARGET
is SunOS.  Otherwise the new 'package' target is a noop.

Shifted copy of solaris to $(OBJDIR) from 'solarispkg' down
into ./mozilla/security/nss/pkg/Makefile.  Recall - we copy
to $(OBJDIR) and work there to support simultaneous builds
in the same tree on different platforms.

Gathering .so's only for %files in sun-nss.  Gathering everything
else in dist/$(OBJDIR), including: bin, lib, and include for
sun-nss-devel.	Both are done dynamically.

sun-nss requires sun-nspr >= 4.3

I tested building and installing the linux RPMs under 7.2,
and building Solaris packages under SunOS.

Note, I needed to hardcode version numbers in the spec.  VERSION
was "current".	I believe its specified in the 'release' target.
If we packaged in the release target, we could capture the
VERSION number dynamically (avoid editing the spec release
to release).

Note, I have yet to figure out how to build anywhere other than
TOPDIR=/usr/src/redhat.  Chris said there was a way via .rpmrc.
I believe this means we can actually supply something on
the rpm command line to direct it to use working $OBJDIR

	rpm --rcfile rpmrc -ba nspr.spec
	error: bad option 'topdir' at rpmrc:1

The Maximum RPM document says 'topdir' should work, but its
perhaps out of date.  I've dug through the source to the rpm
command, but have yet to find a way to override.

So as things stand, the buildmeister needs write access to
/usr/src/redhat.  I simply changed ownership to me to build.
See my comments in the next attachment.
Proposed patch for TIP of NSS (new files)

	mozilla/security/nss/pkg/Makefile
	mozilla/security/nss/pkg/linux/Makefile
	mozilla/security/nss/pkg/linux/sun-nss.spec

To build RPMs, checkout normally on a Linux machine, and:

    cd ${WORKAREA}
	patch <patchfile
	tar xvf tarfile
	<build NSS normally>
	chown -R kirke.wheel /usr/src/redhat
	cd ${WORKAREA}/mozilla/security/nss
	gmake package
Note - the proposed patch gathers include files from
mozilla/dist/public. 

bin/ and lib/ come from dist/$(OBJDIR).
The sun-nss RPM targets /usr/lib/mps.
The sun-nss-devel RPM targets
    /usr/lib/mps
    /usr/include/mps
and /usr/bin/mps
Status: NEW → ASSIGNED
Comment on attachment 113563 [details] [diff] [review]
Proposed patch for the TIP of NSS

r=wtc.	You can go ahead and check in this patch
(which I reviewed) and add the new files (which I
did not review).
Attachment #113563 - Flags: review+
Kirk, you should not take everything from dist/$(OBJDIR)/bin.
You should either take nothing, or just take the core tools
(certutil, cmsutil, modutil, pk12util, signtool, and ssltap).
(See http://www.mozilla.org/projects/security/pki/nss/tools/.
dbck doesn't work, and I am not sure if signver is working.)
Priority: -- → P1
Target Milestone: --- → 3.8
1. Simplified pkg/Makefile (no DIRS), and added 'clean' target.
2. Corrected Summary: and %description for sun-nss-devel.
3. Removed /usr/bin/mps from sun-nss-devel.
4. Added lib/*.chk" to sun-nss for FIPS Integrity check (see bug 177387).
5. Now setting VERSION dynamically using NSS_VERSION in nss.h.
Attachment #113563 - Attachment is obsolete: true
Tar file to go with previous attachment (id=113753).
Attachment #113564 - Attachment is obsolete: true
Comment on attachment 113753 [details] [diff] [review]
Proposed patch for the TIP of NSS

Kirk, this patch is good.  Please go ahead and
check it into the TIP of NSS.
Attachment #113753 - Flags: review+
Checked in the last patch (attachment 113753 [details] [diff] [review], and attachment 113564 [details])
into the TIP of NSS (4.3).
Tests at the TIP of NSS with building, installing,
and removing RPMs identified no problems.

Note, The NSS 3.8 RPMs prereq NSPR 4.3 or greater.
At the point of release, after the remaining QA issues
are resolved, Wan-Teh will shift some functions from
NSS into NSPR and make NSS 3.8 engage NSPR 4.3.
Its not till then that useful RPMs will be generated.

But the RPM building infrastructure is complete.
Closing.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: