Closed Bug 301249 Opened 19 years ago Closed 18 years ago

Checking out and building DBM as part of NSS in mozilla builds

Categories

(Firefox Build System :: General, defect, P2)

x86
Windows XP
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: wtc, Assigned: benjamin)

References

Details

Attachments

(2 files, 1 obsolete file)

The NSS team now owns the Berkeley DB 1.85 code
in mozilla/dbm (also called "DBM).

The C code in mozilla/dbm can be built with two
sets of makefiles.

1. The Mozilla autoconf-based Makefile.in's in
mozilla/dbm.

2. The NSS coreconf-based Makefiles in a separate
directory, mozilla/security/dbm.  (Those makefiles
use GNU make's VPATH variable to point to the source
files in mozilla/dbm.)

Right now Mozilla clients use the first set of makefiles
to build DBM.  We would like to switch to the second
set of makefiles.  In addition, we would like to
check out mozilla/dbm and mozilla/security/dbm using
the same CVS tag as NSS proper (mozilla/security/coreconf
and mozilla/security/dbm).  We don't want to move the source
files in mozilla/dbm to mozilla/security/dbm.

The biggest challenge is that mozilla/dbm is part of
the SeaMonkeyAll CVS module, but we often check out
SeaMonkeyAll and NSS using two different CVS tags
(e.g., the HEAD and NSS_CLIENT_TAG).  I think it is
a problem if we check out two overlapping CVS modules
using different CVS tags.

I heard that we can't remove mozilla/dbm from SeaMonkeyAll.
If so, I think the best solution is to copy the .h and .c
files in mozilla/dbm to mozilla/security/dbm, preferrably
with CVS histories, and cvs remove the all the files under
mozilla/dbm.

Any objection?  Any better solution?

Once we agree on a solution to this problem, Doug Turner
said he will implement the Mozilla client makefile changes
to check out and build DBM as part of NSS.
*** Bug 328518 has been marked as a duplicate of this bug. ***
If it would be easier I have plans to stop using the SeaMonkeyAll CVS module for mozilla checkouts (using explicit checkout directories in client.mk instead), and I can push that up to make this happen.
Ben, yes, it would be easier if we stop using the SeaMonkeyAll
CVS module for mozilla checkouts.
Depends on: 328780
WTC, can I get you to tag mozilla/dbm with NSS_CLIENT_TAG so that I can pull it with NSS?
Attached patch Build dbm with NSS, rev. 1 (obsolete) — Splinter Review
This patch works without any changes to NSS except the necessary tagging of mozilla/dbm and mozilla/security/dbm with the appropriate NSS_CLIENT_TAG.
Assignee: dougt → benjamin
Status: NEW → ASSIGNED
Attachment #216139 - Flags: review?(wtchang)
Nelson and I spoke for a bit this morning.  I think we both agree that we should drop using NSS_CLIENT_TAG and instead have the mozilla build pull the right NSS release tag.  This will allow us to easily determine what version of NSS shipped with a specific version of a mozilla client.  thoughts?
I couldn't agree more! What is the current tag to use for mozilla trunk?
Priority: -- → P2
Target Milestone: --- → mozilla1.9alpha
Wan-Teh is presently away on bereavement leave, until the end of March, approx.

Whenever a numbered NSS release is made, and QAed, the source for that release
is tagged with a numbered NSS release tag, such as NSS_3_11_RTM for NSS 3.11.

It *appears* that all the parts of NSS _except_ DBM are presently also tagged 
with NSS_CLIENT_TAG, and that NSS_CLIENT_TAG present corresponds to the 
NSS 3.11 release (that is, to NSS_3_11_RTM).  

However, I think that needs to be better confirmed, to ensure that those
two tags match throughout ALL of NSS, before we simply tag DBM with an NSS_CLIENT_TAG that corresponds exactly to the NSS_3_11_RTM tag.  
(Ah, the joys of using mutable tags.  How does one ever know what they mean?).

I would like to propose an alternative to tagging DBM with NSS_CLIENT_TAG.
That alternative amounts to the abolitiion of NSS_CLIENT_TAG (going forward).
I propose that the clients simply switch from NSS_CLIENT_TAG to the present
release tag, NSS_3_11_RTM.  That change will cause the clients to pull 
everything in NSS, including DBM, in a consistent, tested state, with a 
known immutable name.  

IINM, one of the goals of the revision control in the client products is the
ability to go back and pull the sources as they were at the point of a past
release, perhaps one made long ago.  NSS_CLIENT_TAG, being a moving mutable
tag, seems useless for that purpose.  The numbered immutable NSS release 
tags, OTOH, seem ideal for that purpose.  

At some point in a future, when NSS has produced a newer release (and newer
release tag), the clients may switch from pulling with the NSS_3_11_RTM tag
to pulling with the newer tag (e.g. NSS_3_11_1_RTM or NSS_3_12_RTM) at their
discretion and pleasure.   

Comments?
Summary: Checking out and building DBM as part of NSS → Checking out and building DBM as part of NSS in mozilla builds
Like this! This is awesomely simple.
Attachment #216139 - Attachment is obsolete: true
Attachment #216151 - Flags: review?(dougt)
Attachment #216139 - Flags: review?(wtchang)
Comment on attachment 216151 [details] [diff] [review]
Build dbm with NSS, rev. 1.1

great as a first step.  I would like to see only one DBM at some point.

r= assuming that is the correct NSS VERSION, nelson or one of the NSS peers might be able to answer this.
Attachment #216151 - Flags: review?(dougt) → review+
> ------- Comment #10 from dougt@meer.net  2006-03-24 14:20 PST -------
> (From update of attachment 216151 [details] [diff] [review])
> great as a first step.  I would like to see only one DBM at some point.

how many DBMs do we have?  
NSS uses only one, and its in mozilla/dbm.
I've been repeatedly told that NSS is the only user of DBM.
So, if NSS is the only user of DBM, and the only DBM that nss uses is
the one mozilla/DBM, then why do we have others?
Can we CVS remove them?

> r= assuming that is the correct NSS VERSION, nelson or one of the NSS peers
> might be able to answer this.

AFAIK NSS_CLIENT_TAG == NSS_3_11_RTM everywhere in NSS except DBM,
where presently there is no NSS_CLIENT_TAG.  So, yes, AFAIK, NSS_3_11_RTM
is the right tag for DBM as well as for the rest of NSS.
Fixed on trunk. There is only one set of DBM sources: mozilla/dbm

The files in mozilla/security/dbm are makefiles which drive the coreconf build of mozilla/dbm and these two directories should be unified at some point. (preferably in security/dbm).

Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
There was an extra bustage-fix in client.mk when checking out by date.
Depends on: 332012
Blocks: 332012
No longer depends on: 332012
No longer blocks: 332012
Depends on: 332012
Depends on: 332050
Additional breakage caused by this patch is in bug 332012 and bug 332050.  Both are fully diagnosed and only need cvs tags to move, if it's permissible to move the NSS_3_11_RTM tag now.

If not, we won't be able to use NSS_3_11_RTM.
It is not and never will be permissible to move an NSS release tag.
It's best to stop thinking of moving tags.  
Tags ought not move.
Instead, new tags ought to be adopted as needed.
If you can't use NSS_3_11_RTM, then we need to get you a newer tag.
Not move a tag, but have you switch to a newer one.
If I understand the comments, this changed tag is the reason for pulling an older (non-useable) version of mozilla/security/nss/cmd/shlibsign/sign.sh.  This tag causes CVS to pull version 1.16, which causes BeOS build bustage.  Current version is 1.17.  See bug 331879.
cvs rdiff -u -r NSS_3_11_RTM -r NSS_CLIENT_TAG mozilla/security/nss mozilla/security/coreconf

This command gives a 1 MB sized diff, > 28000 lines.

We should have made that comparison prior to making the change.

So we are now in a state where we are using old code and things are broken.
I think we should fix that asap.

I propose the following as an immediate fix:
  cvs co -r NSS_CLIENT_TAG mozilla/security/nss
  cvs co -r NSS_CLIENT_TAG mozilla/security/coreconf
  cvs co -r NSS_3_11_RTM mozilla/dbm
  cvs co -r NSS_3_11_RTM mozilla/security/dbm
  cvs tag _SOME_NEW_TAG_ mozilla/dbm mozilla/security/dbm mozilla/security/nss mozilla/security/coreconf

Nelson, is that what you proposed yesterday?

I see a tag 
  NSS_3_11_20060331_TAG
has been created.
Is that identical to the above?
To answer myself:

cvs rdiff -u -r NSS_3_11_RTM -r NSS_3_11_20060331_TAG mozilla/dbm
gives a difference in a comment only

cvs rdiff -u -r NSS_3_11_RTM -r NSS_3_11_20060331_TAG mozilla/security/dbm/
cvs rdiff -u -r NSS_CLIENT_TAG -r NSS_3_11_20060331_TAG mozilla/security/coreconf
cvs rdiff -u -r NSS_CLIENT_TAG -r NSS_3_11_20060331_TAG mozilla/security/nss
do not produce any differences

Are we ready to change mozilla/client.mk to pull NSS_3_11_20060331_TAG ?
I performed a diff of NSS_CLIENT_TAG against the new tag and it looks good. I am checking in a change to client.mk to make this change for the mozilla tree.
ok, fixed
No longer blocks: 331879
Depends on: 331879
The current code tests for _RTM or _TAG in NSS_CO_TAG.
This prevents us from using NSS_3_11_1_BETA as
NSS_CO_TAG.

NSS uses the naming convention that all the branch tags
end in _BRANCH.  This patch allows the tip (an empty
NSS_CO_TAG or NSS_CO_TAG=HEAD) and branch tags to be
pulled by date.
Attachment #217086 - Flags: superreview?(benjamin)
Attachment #217086 - Flags: review?(dougt)
Attachment #217086 - Flags: superreview?(benjamin)
Attachment #217086 - Flags: review?(dougt)
Attachment #217086 - Flags: review+
*** Bug 331879 has been marked as a duplicate of this bug. ***
*** Bug 332050 has been marked as a duplicate of this bug. ***
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: