Last Comment Bug 402773 - Verify the list of public header files in NSS 3.12
: Verify the list of public header files in NSS 3.12
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: trunk
: All All
: P1 normal (vote)
: 3.12
Assigned To: Alexei Volkov
Depends on:
  Show dependency treegraph
Reported: 2007-11-06 14:46 PST by Kai Engert (:kaie)
Modified: 2008-02-23 18:24 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

move pkix header file into private export directory (2.18 KB, patch)
2007-11-12 12:45 PST, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review
make sdb.h and sftkdbt.h private (895 bytes, patch)
2007-12-03 12:07 PST, Kai Engert (:kaie)
rrelyea: review+
Details | Diff | Splinter Review

Description Kai Engert (:kaie) 2007-11-06 14:46:04 PST
I compared the contents of mozilla/dist/public/nss
between 3.11.x and 3.12

The NSS 3.12 build process places several new headers files into dist/public/nss:

pkix*.h (about 15-20 files)

Should these files really be public?

If the answer is "no",
  then we should not copy those files to dist/public/nss
Comment 1 Nelson Bolyard (seldom reads bugmail) 2007-11-06 16:35:15 PST
Alexei, If I'm not mistaken, the pkix header files should all be private 
exports.  Right?  If so, Please fix it so that they are not exported as 
public files.

Kai, Good catch!
Comment 2 Nelson Bolyard (seldom reads bugmail) 2007-11-08 18:41:35 PST
Definitely a NSS213Beta1 blocker.  We can't be publishing private API headers.
Comment 3 Alexei Volkov 2007-11-12 12:45:15 PST
Created attachment 288361 [details] [diff] [review]
move pkix header file into private export directory
Comment 4 Nelson Bolyard (seldom reads bugmail) 2007-11-12 14:08:20 PST
Comment on attachment 288361 [details] [diff] [review]
move pkix header file into private export directory

Comment 5 Kai Engert (:kaie) 2007-11-12 15:40:02 PST
What about the non-libpkix header files?

Should they be private or public?
Comment 6 Kai Engert (:kaie) 2007-11-12 15:48:28 PST
Did you look at the files actually contained in dist/public/nss ?

Your patches addresses 14 files, but I see 16 files starting with "pkix" appearing in that directory. I compared the filenames and the ones not addressed by your patch are:

Comment 7 Kai Engert (:kaie) 2007-11-12 15:49:24 PST
Please ignore comment 6, you have addressed them

So only my question from comment 5 is open.
Comment 8 Nelson Bolyard (seldom reads bugmail) 2007-11-13 00:18:06 PST
I think Bob must answer the question in comment 5.
Comment 9 Alexei Volkov 2007-11-13 10:12:10 PST
Committing attachment 288361 [details] [diff] [review]:
/cvsroot/mozilla/security/nss/lib/libpkix/pkix/certsel/,v  <--
new revision: 1.5; previous revision: 1.4
/cvsroot/mozilla/security/nss/lib/libpkix/include/,v  <--
new revision: 1.4; previous revision: 1.3
Comment 10 Robert Relyea 2007-12-03 11:54:33 PST
RE: comment 5.

sdb.h and sftkdbt.h should be nss private.

Comment 11 Kai Engert (:kaie) 2007-12-03 12:07:58 PST
Created attachment 291262 [details] [diff] [review]
make sdb.h and sftkdbt.h private

Is this the right patch?
Comment 12 Kai Engert (:kaie) 2007-12-03 13:21:26 PST
Comment on attachment 291262 [details] [diff] [review]
make sdb.h and sftkdbt.h private

checked in this patch.

/cvsroot/mozilla/security/nss/lib/softoken/,v  <--
new revision: 1.34; previous revision: 1.33
Comment 13 Kai Engert (:kaie) 2007-12-03 13:21:56 PST
Comment 14 Nelson Bolyard (seldom reads bugmail) 2007-12-03 14:47:48 PST
Are sdb.h and sftkdbt.h included by any files outside of lib/softoken?
If not, then they don't need to be exported at all.  
Only header files that exist in one directory but are included by files
in another directory need to be exported either publicly or privately.
Comment 15 Wan-Teh Chang 2008-02-23 18:24:34 PST
sdb.h and sftkdbt.h are included by files in lib/softoken/legacydb,
which look like they're inside lib/softoken but are considered to
be outside lib/softoken by our build system.  This is why sdb.h and
sftkdbt.h still need to be exported privately.

It's reported in our newsgroup that stale copies of these headers are
still in dist/public/nss in some Mozilla developer and tinderbox's
long-lived build trees.  I think it's less work to ask them to delete
the dist/public/nss directories from those build trees, but if it
becomes an issue, a patch for the Makefile in lib/softoken,
lib/libpkix/pkix/certsel and lib/libpkix/include directories
like this would work:

Index: Makefile
RCS file: /cvsroot/mozilla/security/nss/lib/softoken/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile    25 Apr 2004 15:03:16 -0000      1.5
+++ Makefile    24 Feb 2008 02:18:55 -0000
@@ -93,3 +93,9 @@
+# Remove headers that were formerly exported to dist/public/nss.
+# Remove this makefile rule after NSS 3.12 ships.
+       rm -f $(PUBLIC_EXPORT_DIR)/sdb.h
+       rm -f $(PUBLIC_EXPORT_DIR)/sftkdbt.h

Note You need to log in before you can comment on or make changes to this bug.