Closed Bug 1169174 Opened 6 years ago Closed 6 years ago

Remove __DATE__ and __TIME__ references from NSS

Categories

(NSS :: Build, defect)

defect
Not set
normal

Tracking

(firefox41 affected)

RESOLVED FIXED
Tracking Status
firefox41 --- affected

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

The only reason for __DATE__ and __TIME__ to be used in NSS is for rcsid and sccsid strings for "Version information for the 'ident' and 'what commands". I doubt anyone has used either commands or had use for those strings in the past 10 years. Let's remove them.
Assignee: nobody → mh+mozilla
Attachment #8612143 - Flags: review?(rrelyea)
Attachment #8612143 - Flags: review?(kaie)
In addition to removing __DATE__ and __TIME__, you're also removing code that embeds version number infomation in the binaries.

It's currently possible to use e.g.
  strings libfreebl3.so |grep -w NSS
and identify the version of the library.

I don't know if we strictly require it, or if the developers had deliberately intended this to work, but I think that's nice to have.

I don't mind removing the build date/time from the library, but keeping the embedded version string in the binary might be nice?
Comment on attachment 8612143 [details] [diff] [review]
Remove __DATE__ and __TIME__ references from NSS

Review of attachment 8612143 [details] [diff] [review]:
-----------------------------------------------------------------

I agree with Kai's assesment.

I don't have a problem with removing The date and time, and we don't need 2 of each (we don't really care about ident any more since we haven't used cvs/rcs for a long time, but we need to keep the string with the library version and features:

current:

$Header: NSS 3.19.1 Extended ECC  Jun 10 2015 19:41:58 $

Proposed:
$Header: NSS 3.19.1 Extended ECC $
Attachment #8612143 - Flags: review?(rrelyea) → review-
BTW we don't use ident, we use strings to find these. We still use those.

We don't need 2 versions of each, though.
(In reply to Robert Relyea from comment #3)
> Proposed:
> $Header: NSS 3.19.1 Extended ECC $

Do we require the "$Header:" prefix and "$" suffix?

Would it be sufficient to have this?
  NSS 3.19.1 Extended ECC
Flags: needinfo?(rrelyea)
No, it's good to have something to identify it as the version, but it doesn't have to be $Header: or @(#). 

bob
Flags: needinfo?(rrelyea)
Then I'd suggest to change the existing

  $Header: NSS 3.19.1 Extended ECC  Jun 10 2015 19:41:58 $

into new:

  Version: NSS 3.19.1 Extended ECC
I'm OK with that. If Mike has a better suggestions, I'd be OK to hear it as well.
Attachment #8612143 - Attachment is obsolete: true
Attachment #8612143 - Flags: review?(kaie)
Attachment #8630817 - Flags: review?(rrelyea)
Comment on attachment 8630817 [details] [diff] [review]
Remove __DATE__ and __TIME__ references from NSS

Review of attachment 8630817 [details] [diff] [review]:
-----------------------------------------------------------------

r+ rrelyea.
Thanks Mike!
Attachment #8630817 - Flags: review?(rrelyea) → review+
Thank you Mike!
https://hg.mozilla.org/projects/nss/rev/8ea23862252b
Target Milestone: --- → 3.20
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.