Closed
Bug 370062
Opened 19 years ago
Closed 18 years ago
nss changes for OpenBSD
Categories
(NSS :: Build, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.7
People
(Reporter: martynas, Assigned: nelson)
Details
Attachments
(3 files, 3 obsolete files)
505 bytes,
patch
|
nelson
:
review+
wtc
:
superreview+
|
Details | Diff | Splinter Review |
893 bytes,
patch
|
nelson
:
review+
wtc
:
superreview+
|
Details | Diff | Splinter Review |
1.99 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.1.1) Gecko/20070207 Firefox/2.0.0.1
Build Identifier:
security/coreconf/OpenBSD.mk should use arch(1) to obtain the actual CPU_ARCH. This fixes things like OpenBSD/zaurus.
The diff is available at http://www.altroot.org/OpenBSD_mk.diff
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Assignee: nobody → nobody
Component: Build Config → Build
Product: Core → NSS
QA Contact: build-config → build
Version: Trunk → trunk
Attachment #254723 -
Flags: review?(nelson)
Assignee | ||
Comment 2•19 years ago
|
||
Comment on attachment 254723 [details] [diff] [review]
from comment 0
I have no way to test this patch. I wonder if it works for all the relevant types of "arch", or if it only works for i386.
I'd like you to ask some other members of the OpenBSD community to "weigh in" on this proposed change before approving it.
I would accept r+ from OpenBSD folks for this patch (only), in lieu of the usual NSS team r+.
Reporter | ||
Comment 3•19 years ago
|
||
From the man page:
"The arch and machine commands display the machine's architecture in
slightly different ways. arch by default displays the application archi-
tecture, defined by both the operating system and the instruction set ar-
chitecture"
http://www.openbsd.org/cgi-bin/man.cgi?query=arch&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
The patches from OpenBSD ports:
http://www.openbsd.org/cgi-bin/cvsweb/ports/www/mozilla-firefox/patches/patch-security_coreconf_OpenBSD_mk?rev=1.6
http://www.openbsd.org/cgi-bin/cvsweb/ports/security/nss/patches/patch-mozilla_security_coreconf_OpenBSD_mk?rev=1.1.1.1
Feel free to adapt any other changes from OpenBSD ports repository to shrink our patches!
Assignee | ||
Comment 4•19 years ago
|
||
I'm in favor of shrinking downstream patches!
The way to do that, IMO, is to contribute the patches upstream.
Shall I interpret the two patch files cited in comment 3 as contributions
to moilla's security/coreconf ?
If so, to whom should those patches be credited?
Reporter | ||
Comment 5•19 years ago
|
||
Sure.
Credited? Dunno, to OpenBSD team perhaps. There are quite a lot developers working on this port.
Reporter | ||
Comment 6•19 years ago
|
||
Peter Strömberg submitted attachment 143032 [details] [diff] [review] in bug 236599 which got r=wtc.
Please see:
https://bugzilla.mozilla.org/show_bug.cgi?id=236599#c30
https://bugzilla.mozilla.org/show_bug.cgi?id=236599#c33
Also, use -Bsymbolic when linking nss to avoid symbol conflicts with libraries
that include OpenSSL.
We've got zlib in base, i've enabled that too.
Nelson, is there any reason for not committing it upstream? Every mozilla port uses this configuration (with changes to DLL_SUFFIX and OS_LIBS which i didn't include here).
Assignee | ||
Updated•19 years ago
|
Assignee: nobody → nelson
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 7•19 years ago
|
||
Comment on attachment 255473 [details] [diff] [review]
OpenBSD.mk with more hunks
Since the openBSD community wants it, This seems fine to me.
Wan-Teh, do you concur?
Attachment #255473 -
Flags: superreview?(wtchang)
Attachment #255473 -
Flags: review+
Assignee | ||
Comment 8•18 years ago
|
||
Comment on attachment 254723 [details] [diff] [review]
from comment 0
I gave r+ to the other patch for this bug.
Attachment #254723 -
Flags: review?(nelson) → review-
Comment 9•18 years ago
|
||
Comment on attachment 255473 [details] [diff] [review]
OpenBSD.mk with more hunks
The CPU_ARCH change is fine.
We should not take the DEFAULT_COMPILER, CC, and CCC changes.
I believe those changes are no longer necessary after bug 93206
was fixed.
The DSO_LDOPTS change is fine.
The -Bsymbolic change should be made for all platforms that support
that linker flag. I believe that it is sufficient to only use
-Bsymbolic when we build libfreebl3.so. This can be done by adding
OpenBSD to the following list in mozilla/security/nss/lib/freebl/Makefile:
ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD, $(OS_TARGET)))
MKSHLIB += -Wl,-Bsymbolic
endif
See bug 323977 for why -Bsymbolic is needed for libfreebl3.so.
The ZLIB change is fine.
Attachment #255473 -
Flags: superreview?(wtchang) → superreview-
Assignee | ||
Comment 10•18 years ago
|
||
> I believe those changes are no longer necessary after bug 93206 was fixed.
The fix for bug 93206 means that when NSS is built as part of the browser
build, these make variables will get the right values, but it doesn't help
stand-alone NSS builds on OpenBSD. I think the patch in attachment 255473 [details] [diff] [review]
was intended to fix stand-alone builds. (yes?)
Reporter | ||
Comment 11•18 years ago
|
||
OK. Verified the new patches i'm attaching work fine with standalone builds.
Reporter | ||
Comment 12•18 years ago
|
||
Reporter | ||
Comment 13•18 years ago
|
||
Uhm, we use our own shared library versioning in our ports tree. Could we use SO_VERSION in the environment to pass it to the libnss?
Attachment #254723 -
Attachment is obsolete: true
Attachment #255473 -
Attachment is obsolete: true
Reporter | ||
Comment 14•18 years ago
|
||
We also pass CC and CXX. Why not do something like:
CC ?= gcc
DEFAULT_COMPILER = ${CC}
Reporter | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Summary: OpenBSD: use arch(1) to get the actual CPU_ARCH → nss changes for OpenBSD
Reporter | ||
Updated•18 years ago
|
Attachment #255891 -
Flags: review?(nelson)
Reporter | ||
Comment 15•18 years ago
|
||
Attachment #255892 -
Attachment is obsolete: true
Attachment #260689 -
Flags: superreview?(wtchang)
Attachment #260689 -
Flags: review?(nelson)
Assignee | ||
Comment 16•18 years ago
|
||
Comment on attachment 255891 [details] [diff] [review]
patch: mozilla/security/nss/lib/freebl/Makefile
r=nelson for this change, for the trunk (NSS 3.12)
Attachment #255891 -
Attachment description: patch-mozilla_security_nss_lib_freebl_Makefile → patch: mozilla/security/nss/lib/freebl/Makefile
Attachment #255891 -
Flags: review?(nelson) → review+
Assignee | ||
Comment 17•18 years ago
|
||
Comment on attachment 260689 [details] [diff] [review]
patch v2: mozilla/security/coreconf/OpenBSD.mk
I have no way to test this patch.
Since it is only for files used only on OpenBSD,
if the OpenBSD community is in agreement concerning this patch, then I have no objecttion to it.
r=nelson for the trunk.
Waiting for Wan-Teh's SR.
Attachment #260689 -
Attachment description: patch-mozilla_security_coreconf_OpenBSD_mk → patch v2: mozilla/security/coreconf/OpenBSD.mk
Attachment #260689 -
Flags: review?(nelson) → review+
Reporter | ||
Comment 18•18 years ago
|
||
Nelson, i'm also asking for attachment 255891 [details] [diff] [review] inclusion in nss 3.11, too, because it won't build (crash while building).
Assignee | ||
Comment 19•18 years ago
|
||
Martynas, Then you need to request a second review from another NSS module
owner or peer, as you did for the other patch.
Priority: -- → P3
Target Milestone: --- → 3.11.7
Reporter | ||
Updated•18 years ago
|
Attachment #255891 -
Flags: superreview?(wtc)
Comment 20•18 years ago
|
||
Comment on attachment 255891 [details] [diff] [review]
patch: mozilla/security/nss/lib/freebl/Makefile
r=wtc.
Attachment #255891 -
Flags: superreview?(wtc) → superreview+
Comment 21•18 years ago
|
||
Comment on attachment 260689 [details] [diff] [review]
patch v2: mozilla/security/coreconf/OpenBSD.mk
r=wtc. Please submit a new patch with the following change.
>-DEFAULT_COMPILER = gcc
>-CC = gcc
>-CCC = g++
>+CC ?= gcc
>+CXX ?= g++
>+DEFAULT_COMPILER = ${CC}
>+CCC = ${CXX}
> RANLIB = ranlib
Don't change the DEFAULT_COMPILER line. It should be set to gcc,
the default value of CC.
Note: this patch introduces the use of ?= and the dependency on the
CC and CXX environment variables in NSS. Previously, we need to
override CC and CCC on the make command line like this:
make CC=/usr/local/bin/gcc CCC=/usr/local/bin/g++
I think it is OK to stick with this method, but I don't want to
be bogged down by this minor issue.
Attachment #260689 -
Flags: superreview?(wtc) → superreview+
Reporter | ||
Comment 22•18 years ago
|
||
(In reply to comment #21)
> (From update of attachment 260689 [details] [diff] [review])
> r=wtc. Please submit a new patch with the following change.
>
> >-DEFAULT_COMPILER = gcc
> >-CC = gcc
> >-CCC = g++
> >+CC ?= gcc
> >+CXX ?= g++
> >+DEFAULT_COMPILER = ${CC}
> >+CCC = ${CXX}
> > RANLIB = ranlib
>
> Don't change the DEFAULT_COMPILER line. It should be set to gcc,
> the default value of CC.
>
> Note: this patch introduces the use of ?= and the dependency on the
> CC and CXX environment variables in NSS. Previously, we need to
> override CC and CCC on the make command line like this:
>
> make CC=/usr/local/bin/gcc CCC=/usr/local/bin/g++
>
> I think it is OK to stick with this method, but I don't want to
> be bogged down by this minor issue.
>
I think you are right and i'm fine with you not taking this change; the build should respect CC/CXX environment variables. Not only for OpenBSD.
Reporter | ||
Comment 23•18 years ago
|
||
s/enh/normal/, since nss won't even build by default.
I'm new to your nss/nspr checking in process. What should i do now to get the two diffs committed?
Severity: enhancement → normal
Assignee | ||
Comment 24•18 years ago
|
||
Thanks for the reminder.
Bug 370062 – nss build changes for OpenBSD, r=nelson,wtc
patches contributed by Martynas Venckus <martynas@openbsd.org>
On trunk:
coreconf/OpenBSD.mk; new revision: 1.5; previous revision: 1.4
nss/lib/freebl/Makefile; new revision: 1.89; previous revision: 1.88
On 3.11 branch:
coreconf/OpenBSD.mk; new revision: 1.4.28.1; previous revision: 1.4
nss/lib/freebl/Makefile; new revision: 1.70.2.13; previous revision: 1.70.2.12
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 25•18 years ago
|
||
Comment 26•18 years ago
|
||
Comment on attachment 263899 [details] [diff] [review]
final patch, as checked in
The value of DEFAULT_COMPILER should be a
constant, 'gcc'. (The DEFAULT_COMPILER is
only used by our internal binary distributions.
Since we don't have any OpenBSD binary
distributions, this issue is moot.)
You need to log in
before you can comment on or make changes to this bug.
Description
•