Author: bdubbs
Date: 2006-04-28 11:56:38 -0600 (Fri, 28 Apr 2006)
New Revision: 1508
Added:
trunk/dhcp/dhcp-3.0.3-iproute2-3.patch
trunk/rp-pppoe/rp-pppoe-3.8-iproute2-1.patch
trunk/seamonkey/seamonkey-1.0.1-system_nss-1.patch
Log:
Copies of existing patches for new package versions
Copied: trunk/dhcp/dhcp-3.0.3-iproute2-3.patch (from rev 1474,
trunk/dhcp/dhcp-3.0.2-iproute2-3.patch)
===================================================================
--- trunk/dhcp/dhcp-3.0.3-iproute2-3.patch (rev 0)
+++ trunk/dhcp/dhcp-3.0.3-iproute2-3.patch 2006-04-28 17:56:38 UTC (rev
1508)
@@ -0,0 +1,230 @@
+Submitted By: DJ Lucas (dj at linuxfromscratch dot org)
+Date: 2005-06-18
+Initial Package Version: 3.0.2
+Origin: Jim Gifford, Bruce Dubbs, DJ Lucas
+Description: Fixes client script to use iproute2 (added flush to previous
+ unversioned patches)
+Upstream Status: Not submitted
+
+--- dhcp-3.0.2-orig/client/scripts/linux 2002-11-14 19:09:09.000000000
-0600
++++ dhcp-3.0.2/client/scripts/linux 2005-06-18 22:54:59.000000000 -0500
+@@ -1,26 +1,15 @@
+ #!/bin/bash
+ # dhclient-script for Linux. Dan Halbert, March, 1997.
+ # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+-# No guarantees about this. I'm a novice at the details of Linux
+-# networking.
++
++# Updated to iproute2 by Jim Gifford ([EMAIL PROTECTED])
+
+ # Notes:
+
+ # 0. This script is based on the netbsd script supplied with dhcp-970306.
+-
+-# 1. ifconfig down apparently deletes all relevant routes and flushes
+-# the arp cache, so this doesn't need to be done explicitly.
+-
+-# 2. The alias address handling here has not been tested AT ALL.
+-# I'm just going by the doc of modern Linux ip aliasing, which uses
+-# notations like eth0:0, eth0:1, for each alias.
+-
+-# 3. I have to calculate the network address, and calculate the broadcast
+-# address if it is not supplied. This might be much more easily done
+-# by the dhclient C code, and passed on.
+-
+-# 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
+-# of the $1 in its args.
++# 1. This script was modified to work with iproute2
++# 2. cidr_convert based on a script by Kevin Fleming ([EMAIL PROTECTED])
++# 3. Updated to delete addresses when taking an interface down ([EMAIL
PROTECTED])
+
+ make_resolv_conf() {
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ];
then
+@@ -32,6 +21,30 @@
+ fi
+ }
+
++dec2binary()
++{
++ local n=$1
++ local ret=""
++ while [ $n != 0 ]; do
++ ret=$[$n%2]$ret
++ n=$[$n>>1]
++ done
++ echo $ret
++}
++
++mask_to_binary()
++{
++ echo `dec2binary $1``dec2binary $2``dec2binary $3``dec2binary $4`
++}
++
++cidr_convert()
++{
++ netmask=$1
++ local mask=`mask_to_binary ${netmask//./ }`
++ mask=${mask%%0*}
++ cidr=${#mask}
++}
++
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+ exit_with_hooks() {
+ exit_status=$1
+@@ -53,11 +66,6 @@
+ fi
+ fi
+
+-release=`uname -r`
+-release=`expr $release : '\(.*\)\..*'`
+-relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
+-relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
+-
+ if [ x$new_broadcast_address != x ]; then
+ new_broadcast_arg="broadcast $new_broadcast_address"
+ fi
+@@ -65,13 +73,12 @@
+ old_broadcast_arg="broadcast $old_broadcast_address"
+ fi
+ if [ x$new_subnet_mask != x ]; then
+- new_subnet_arg="netmask $new_subnet_mask"
++ cidr_convert $new_subnet_mask
++ new_subnet_arg="$cidr"
+ fi
+ if [ x$old_subnet_mask != x ]; then
+- old_subnet_arg="netmask $old_subnet_mask"
+-fi
+-if [ x$alias_subnet_mask != x ]; then
+- alias_subnet_arg="netmask $alias_subnet_mask"
++ cidr_convert $old_subnet_mask
++ old_subnet_arg="$cidr"
+ fi
+
+ if [ x$reason = xMEDIUM ]; then
+@@ -82,17 +89,10 @@
+ if [ x$reason = xPREINIT ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Bring down alias interface. Its routes will disappear too.
+- ifconfig $interface:0- inet 0
+- fi
+- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
+- then
+- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
+- broadcast 255.255.255.255 up
+- # Add route to make broadcast work. Do not omit netmask.
+- route add default dev $interface netmask 0.0.0.0
+- else
+- ifconfig $interface 0 up
++ ip link set $interface down
++ ip addr del $alias_ip_address dev $interface
+ fi
++ ip link set $interface up
+
+ # We need to give the kernel some time to get the interface up.
+ sleep 1
+@@ -115,83 +115,51 @@
+ fi
+ fi
+
+- if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+- [ x$alias_ip_address != x$old_ip_address ]; then
+- # Possible new alias. Remove old alias.
+- ifconfig $interface:0- inet 0
+- fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ];
then
+- # IP address changed. Bringing down the interface will delete all routes,
++ # IP address changed. Bring down the interface, delete all routes,
+ # and clear the ARP cache.
+- ifconfig $interface inet 0 down
+-
++ ip link set $interface down
++ ip addr flush dev $interface
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+
+- ifconfig $interface inet $new_ip_address $new_subnet_arg \
+- $new_broadcast_arg
++ ip link set $interface up
++ ip addr add $new_ip_address/$new_subnet_arg $new_broadcast_arg \
++ label $interface dev $interface
+ # Add a network route to the computed network address.
+- if [ $relmajor -lt 2 ] || \
+- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
+- route add -net $new_network_number $new_subnet_arg dev $interface
+- fi
+ for router in $new_routers; do
+- route add default gw $router
++ ip route add default via $router
+ done
+ fi
+- if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x
];
+- then
+- ifconfig $interface:0- inet 0
+- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address $interface:0
+- fi
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+
+ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
+- if [ x$alias_ip_address != x ]; then
+- # Turn off alias interface.
+- ifconfig $interface:0- inet 0
+- fi
+ if [ x$old_ip_address != x ]; then
+- # Shut down interface, which will delete routes and clear arp cache.
+- ifconfig $interface inet 0 down
+- fi
+- if [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address $interface:0
++ # Shut down interface, delete routes, and clear arp cache.
++ ip link set $interface down
++ ip addr flush dev $interface
+ fi
+ exit_with_hooks 0
+ fi
+
+ if [ x$reason = xTIMEOUT ]; then
+- if [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0- inet 0
+- fi
+- ifconfig $interface inet $new_ip_address $new_subnet_arg \
+- $new_broadcast_arg
++ ip link set $interface up
++ ip addr set $new_ip_address/$new_subnet_arg $new_broadcast_arg \
++ label $interface dev $interface
+ set $new_routers
+- ############## what is -w in ping?
+- if ping -q -c 1 $1; then
+- if [ x$new_ip_address != x$alias_ip_address ] && \
+- [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address dev $interface:0
+- fi
+- if [ $relmajor -lt 2 ] || \
+- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
+- route add -net $new_network_number
+- fi
+- for router in $new_routers; do
+- route add default gw $router
+- done
+- make_resolv_conf
+- exit_with_hooks 0
+- fi
+- ifconfig $interface inet 0 down
++
++ for router in $new_routers; do
++ ip route add default via $router
++ done
++
++ make_resolv_conf
++ exit_with_hooks 0
++ ip link set $interface down
++ ip addr flush dev $interface
+ exit_with_hooks 1
+ fi
+
Copied: trunk/rp-pppoe/rp-pppoe-3.8-iproute2-1.patch (from rev 1474,
trunk/rp-pppoe/rp-pppoe-3.6-iproute2-1.patch)
===================================================================
--- trunk/rp-pppoe/rp-pppoe-3.8-iproute2-1.patch
(rev 0)
+++ trunk/rp-pppoe/rp-pppoe-3.8-iproute2-1.patch 2006-04-28 17:56:38 UTC
(rev 1508)
@@ -0,0 +1,242 @@
+Submitted By: DJ Lucas (dj at linuxfromscratch dot org)
+Date: 2004-08-30
+Initial Package Version: 3.5
+Origin: Self
+Description: Removed dependancy on net-tools in favor of utils from iproute2.
+Upstream Status: Not submitted
+
+$LastChangedBy: igor $
+$Date: 2005-01-04 03:43:16 -0700 (Tue, 04 Jan 2005) $
+
+diff -Naur rp-pppoe-3.5-orig/doc/CHANGES rp-pppoe-3.5/doc/CHANGES
+--- rp-pppoe-3.5-orig/doc/CHANGES 2002-07-08 09:38:24.000000000 -0500
++++ rp-pppoe-3.5/doc/CHANGES 2004-08-30 22:20:13.931535304 -0500
+@@ -1,5 +1,11 @@
+ # LIC: GPL
+
++Changes from Version 3.5 to current:
++
++- Adapted scripts to make use of the utilities included with the iproute2
++ package as opposed to the ones included with net-tools.
++ Does this break 2.0.x kernels?
++
+ Changes from Version 3.4 to 3.5:
+
+ - Fixes for compilation on Solaris.
+diff -Naur rp-pppoe-3.5-orig/doc/HOW-TO-CONNECT rp-pppoe-3.5/doc/HOW-TO-CONNECT
+--- rp-pppoe-3.5-orig/doc/HOW-TO-CONNECT 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/doc/HOW-TO-CONNECT 2004-08-30 22:17:19.436062648 -0500
+@@ -21,14 +21,15 @@
+ of this document. However, if the card is the only Ethernet card in
+ the system, executing:
+
+- ifconfig eth0
++ ip link show eth0
+
+ should display something like this:
+
+- eth0 Link encap:Ethernet HWaddr 00:60:67:62:31:D4
++3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
++ link/ether 00:10:b5:d1:ea:fc brd ff:ff:ff:ff:ff:ff
+
+-plust some more lines. Your HWaddr will be different. As long as you see
+-the HWaddr line, your card should be working.
++Your second line will most definately be different. As long as you see
++the link/ether line, your card should be working.
+
+ DO NOT assign an IP address to the Ethernet card. DO NOT configure the
+ card to come up at boot time.
+@@ -119,7 +120,7 @@
+
+ If you want to manually configure the LAN hosts, here's how:
+
+-In Linux, use: "ifconfig eth0 mtu 1452". For best results, put this
++In Linux, use: "ip link set eth0 mtu 1452". For best results, put this
+ in an /etc/rc.d/rc.local script.
+
+ For Windows, machines, see http://lan.cns.ksu.edu/OS/WIN95/slip95.htm.
+@@ -147,9 +148,9 @@
+
+ Well, I can't really help you here. To use these instructions, you must
+ have Linux working to the point where it recognizes your Ethernet card.
+-If you type "ifconfig ethx" and you get back a HWAddr value, your Ethernet
+-card is probably OK. But I really can't help with hardware configuration
+-issues.
++If you type "ip link show ethx" and you get back a hardware address value
++in the line that begins with link/ether, your Ethernet card is probably OK.
++But I really can't help with hardware configuration issues.
+
+ -----------------------------------------------------------------------------
+ B) Connection seems to come up, but I can't browse the web or ping anything
+@@ -223,9 +224,9 @@
+ address. For example, if eth0 is your internal LAN card and eth1 goes to
+ the DSL modem, do something like this:
+
+- ifconfig eth1 10.0.0.1 netmask 255.255.255.0
++ ip link set eth1 10.0.0.1/24
+
+-(You may have to choose a different IP address; experiment.)
++(You may have to choose a different IP address and prefix; experiment.)
+ -----------------------------------------------------------------------------
+ K) How can I run a script every time I connect and get a new IP address?
+
+@@ -261,8 +262,8 @@
+ connected to the ADSL modem. You might want to add these lines in
+ pppoe-connect:
+
+- ifconfig ethx down
+- ifconfig ethx up mtu 1500
++ ip link set ethx down
++ ip link set ethx up mtu 1500
+
+ which should reset things to sane values.
+
+diff -Naur rp-pppoe-3.5-orig/gui/tkpppoe.in rp-pppoe-3.5/gui/tkpppoe.in
+--- rp-pppoe-3.5-orig/gui/tkpppoe.in 2002-07-08 09:38:24.000000000 -0500
++++ rp-pppoe-3.5/gui/tkpppoe.in 2004-08-30 21:04:07.736702432 -0500
+@@ -1573,7 +1573,7 @@
+ #***********************************************************************
+ proc GetEthernetInterfaces {} {
+ set ifs {}
+- set fp [open "|/sbin/ifconfig" "r"]
++ set fp [open "|/sbin/ip" "r"]
+ while {[gets $fp line] >= 0} {
+ if {[regexp {^eth[0-9]+} $line eth]} {
+ lappend ifs $eth
+diff -Naur rp-pppoe-3.5-orig/man/pppoe-sniff.8 rp-pppoe-3.5/man/pppoe-sniff.8
+--- rp-pppoe-3.5-orig/man/pppoe-sniff.8 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/man/pppoe-sniff.8 2004-08-30 21:06:06.050715968 -0500
+@@ -32,7 +32,7 @@
+ for example, type these commands:
+
+ .nf
+- ifconfig eth0 promisc
++ ip link set eth0 promisc on
+ pppoe-sniff -I eth0
+ .fi
+
+@@ -49,7 +49,7 @@
+ remember to turn off promiscuous mode:
+
+ .nf
+- ifconfig eth0 -promisc
++ ip link set eth0 promisc on
+ .fi
+
+ .SH OPTIONS
+diff -Naur rp-pppoe-3.5-orig/scripts/pppoe-connect.in
rp-pppoe-3.5/scripts/pppoe-connect.in
+--- rp-pppoe-3.5-orig/scripts/pppoe-connect.in 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/scripts/pppoe-connect.in 2004-08-30 21:19:42.593582584
-0500
+@@ -28,7 +28,7 @@
+ localstatedir=/var
+
+ # Paths to programs
+-IFCONFIG=/sbin/ifconfig
++IPBIN=/sbin/ip
+ [EMAIL PROTECTED]@
+ [EMAIL PROTECTED]@
+ [EMAIL PROTECTED]@/pppoe
+@@ -115,7 +115,7 @@
+ # fails on some *BSD's, so we'll only do it under Linux
+
+ if test `uname -s` = Linux ; then
+- $IFCONFIG $ETH up mtu 1500
++ $IPBIN link set $ETH up mtu 1500
+ # For 2.4 kernels. Will fail on 2.2.x, but who cares?
+ modprobe ppp_generic > /dev/null 2>&1
+ modprobe ppp_async > /dev/null 2>&1
+diff -Naur rp-pppoe-3.5-orig/scripts/pppoe-setup.in
rp-pppoe-3.5/scripts/pppoe-setup.in
+--- rp-pppoe-3.5-orig/scripts/pppoe-setup.in 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/scripts/pppoe-setup.in 2004-08-30 21:17:41.196037816
-0500
+@@ -17,7 +17,7 @@
+ [EMAIL PROTECTED]@
+
+ # Paths to programs
+-IFCONFIG=/sbin/ifconfig
++IPBIN=/sbin/ip
+ [EMAIL PROTECTED]@
+ [EMAIL PROTECTED]@/pppoe
+ [EMAIL PROTECTED]@
+@@ -94,7 +94,7 @@
+
+ # Under Linux, "fix" the default interface if eth1 is not available
+ if test `uname -s` = "Linux" ; then
+- $IFCONFIG $ETH > /dev/null 2>&1 || ETH=eth0
++ $IPBIN link show $ETH > /dev/null 2>&1 || ETH=eth0
+ fi
+ $ECHO ""
+ $ECHO "INTERFACE"
+diff -Naur rp-pppoe-3.5-orig/scripts/pppoe-start.in
rp-pppoe-3.5/scripts/pppoe-start.in
+--- rp-pppoe-3.5-orig/scripts/pppoe-start.in 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/scripts/pppoe-start.in 2004-08-30 21:50:26.559257192
-0500
+@@ -29,7 +29,7 @@
+ # Paths to programs
+ [EMAIL PROTECTED]@/pppoe-connect
+ [EMAIL PROTECTED]@
+-IFCONFIG=/sbin/ifconfig
++IPBIN=/sbin/ip
+
+ # Set to "C" locale so we can parse messages from commands
+ LANG=C
+@@ -69,8 +69,8 @@
+ $ECHO "* interfaces. The one you chose for PPPoE should contain the
words:" >> $DEBUG
+ $ECHO "* 'UP' and 'RUNNING'. If it does not, you probably have an
Ethernet" >> $DEBUG
+ $ECHO "* driver problem." >> $DEBUG
+- $ECHO "Output of ifconfig -a" >> $DEBUG
+- $IFCONFIG -a >> $DEBUG
++ $ECHO "Output of 'ip link show'" >> $DEBUG
++ $IPBIN link show >> $DEBUG
+ $ECHO "---------------------------------------------" >> $DEBUG
+ if [ "`uname -s`" = "Linux" ] ; then
+ $ECHO "* The following section contains information about kernel
modules" >> $DEBUG
+@@ -85,8 +85,8 @@
+ $ECHO "* have defined a default route and gateway, and pppd will" >>
$DEBUG
+ $ECHO "* not create a default route using your ISP. Try getting" >>
$DEBUG
+ $ECHO "* rid of this route." >> $DEBUG
+- $ECHO "Output of netstat -n -r" >> $DEBUG
+- netstat -n -r >> $DEBUG
++ $ECHO "Output of ip route" >> $DEBUG
++ $IPBIN route >> $DEBUG
+ $ECHO "---------------------------------------------" >> $DEBUG
+ $ECHO "Contents of /etc/resolv.conf" >> $DEBUG
+ $ECHO "* The following section lists DNS setup." >> $DEBUG
+diff -Naur rp-pppoe-3.5-orig/scripts/pppoe-status
rp-pppoe-3.5/scripts/pppoe-status
+--- rp-pppoe-3.5-orig/scripts/pppoe-status 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/scripts/pppoe-status 2004-08-30 21:52:58.461164592 -0500
+@@ -66,14 +66,14 @@
+ PID=`cat $i`
+ if [ "$PID" = "$PPPD_PID" ] ; then
+ IF=`basename $i .pid`
+- netstat -rn | grep " ${IF}\$" > /dev/null
+- # /sbin/ifconfig $IF | grep "UP.*POINTOPOINT" > /dev/null
++ ip route | grep "dev ${IF}" > /dev/null
++ # /sbin/ip link show $IF | grep "UP.*POINTOPOINT" > /dev/null
+ if [ "$?" != "0" ] ; then
+ echo "pppoe-status: Link is attached to $IF, but $IF is down"
+ exit 1
+ fi
+ echo "pppoe-status: Link is up and running on interface $IF"
+- /sbin/ifconfig $IF
++ /sbin/ip link show $IF
+ exit 0
+ fi
+ fi
+@@ -81,4 +81,4 @@
+
+ echo "pppoe-status: Link is down -- could not find interface corresponding to"
+ echo "pppd pid $PPPD_PID"
+-exit 1
+\ No newline at end of file
++exit 1
+diff -Naur rp-pppoe-3.5-orig/src/pppoe-sniff.c rp-pppoe-3.5/src/pppoe-sniff.c
+--- rp-pppoe-3.5-orig/src/pppoe-sniff.c 2002-07-08 09:38:24.000000000
-0500
++++ rp-pppoe-3.5/src/pppoe-sniff.c 2004-08-30 21:54:47.247626536 -0500
+@@ -194,7 +194,7 @@
+
+ #endif
+
+- /* We assume interface is in promiscuous mode -- use ifconfig to
++ /* We assume interface is in promiscuous mode -- use 'ip link show' to
+ ensure this */
+ fprintf(stderr, "Sniffing for PADR. Start your connection on another
machine...\n");
+ while (!SeenPADR) {
Copied: trunk/seamonkey/seamonkey-1.0.1-system_nss-1.patch (from rev 1474,
trunk/seamonkey/seamonkey-1.0-system_nss-1.patch)
===================================================================
--- trunk/seamonkey/seamonkey-1.0.1-system_nss-1.patch
(rev 0)
+++ trunk/seamonkey/seamonkey-1.0.1-system_nss-1.patch 2006-04-28 17:56:38 UTC
(rev 1508)
@@ -0,0 +1,611 @@
+Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
+Date: 2006-02-27
+Initial Package Version: 1.0
+Upstream Status: Unknown
+Origin: Fedora CVS
+Description: Fixes the --use-system-nss and --with-nss-prefix
+ switches so that they actually work. This patch
+ allows the Mozilla products to use the system
+ installed versions of NSS and NSPR.
+
+
+diff -Naur mozilla-orig/aclocal.m4 mozilla/aclocal.m4
+--- mozilla-orig/aclocal.m4 2004-05-13 03:12:47.000000000 +0000
++++ mozilla/aclocal.m4 2006-02-27 15:09:03.000000000 +0000
+@@ -8,6 +8,7 @@
+ builtin(include, build/autoconf/libIDL.m4)dnl
+ builtin(include, build/autoconf/libIDL-2.m4)dnl
+ builtin(include, build/autoconf/nspr.m4)dnl
++builtin(include, build/autoconf/nss.m4)dnl
+ builtin(include, build/autoconf/libart.m4)dnl
+ builtin(include, build/autoconf/pkg.m4)dnl
+ builtin(include, build/autoconf/freetype2.m4)dnl
+
+diff -Naur mozilla-orig/build/autoconf/nss.m4 mozilla/build/autoconf/nss.m4
+--- mozilla-orig/build/autoconf/nss.m4 1970-01-01 00:00:00.000000000 +0000
++++ mozilla/build/autoconf/nss.m4 2006-02-27 15:09:03.000000000 +0000
+@@ -0,0 +1,67 @@
++# -*- tab-width: 4; -*-
++# Configure paths for NSS
++# Public domain - Chris Seawood <[EMAIL PROTECTED]> 2001-04-05
++# Based upon gtk.m4 (also PD) by Owen Taylor
++
++dnl AM_PATH_NSS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
++dnl Test for NSS, and define NSS_CFLAGS and NSS_LIBS
++AC_DEFUN(AM_PATH_NSS,
++[dnl
++
++AC_ARG_WITH(nss-prefix,
++ [ --with-nss-prefix=PFX Prefix where NSS is installed],
++ nss_config_prefix="$withval",
++ nss_config_prefix="")
++
++AC_ARG_WITH(nss-exec-prefix,
++ [ --with-nss-exec-prefix=PFX
++ Exec prefix where NSS is installed],
++ nss_config_exec_prefix="$withval",
++ nss_config_exec_prefix="")
++
++ if test -n "$nss_config_exec_prefix"; then
++ nss_config_args="$nss_config_args
--exec-prefix=$nss_config_exec_prefix"
++ if test -z "$NSS_CONFIG"; then
++ NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config
++ fi
++ fi
++ if test -n "$nss_config_prefix"; then
++ nss_config_args="$nss_config_args --prefix=$nss_config_prefix"
++ if test -z "$NSS_CONFIG"; then
++ NSS_CONFIG=$nss_config_prefix/bin/nss-config
++ fi
++ fi
++
++ unset ac_cv_path_NSS_CONFIG
++ AC_PATH_PROG(NSS_CONFIG, nss-config, no)
++ min_nss_version=ifelse([$1], ,3.0.0,$1)
++ AC_MSG_CHECKING(for NSS - version >= $min_nss_version (skipping))
++
++ no_nss=""
++ if test "$NSS_CONFIG" = "no"; then
++ no_nss="yes"
++ else
++ NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags`
++ NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs`
++
++ dnl Skip version check for now
++ nss_config_major_version=`$NSS_CONFIG $nss_config_args
--version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
++ nss_config_minor_version=`$NSS_CONFIG $nss_config_args
--version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
++ nss_config_micro_version=`$NSS_CONFIG $nss_config_args
--version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
++ fi
++
++ if test -z "$no_nss"; then
++ AC_MSG_RESULT(yes)
++ ifelse([$2], , :, [$2])
++ else
++ AC_MSG_RESULT(no)
++ fi
++
++
++ AC_SUBST(NSS_CFLAGS)
++ AC_SUBST(NSS_LIBS)
++
++])
+
+diff -Naur mozilla-orig/config/autoconf.mk.in mozilla/config/autoconf.mk.in
+--- mozilla-orig/config/autoconf.mk.in 2006-01-06 21:01:20.000000000 +0000
++++ mozilla/config/autoconf.mk.in 2006-02-27 15:09:03.000000000 +0000
+@@ -229,6 +229,7 @@
+ MOZ_INSURE_EXCLUDE_DIRS = @MOZ_INSURE_EXCLUDE_DIRS@
+
+ MOZ_NATIVE_NSPR = @MOZ_NATIVE_NSPR@
++MOZ_NATIVE_NSS = @MOZ_NATIVE_NSS@
+
+ CROSS_COMPILE = @CROSS_COMPILE@
+
+@@ -384,6 +385,48 @@
+ NSPR_CFLAGS = @NSPR_CFLAGS@
+ NSPR_LIBS = @NSPR_LIBS@
+
++NSS_CONFIG = @NSS_CONFIG@
++NSS_CFLAGS = @NSS_CFLAGS@
++NSS_LIBS = @NSS_LIBS@
++
++ifdef MOZ_NATIVE_NSS
++NSS_DEP_LIBS = \
++ $(NULL)
++NSS_LIBS += \
++ -lcrmf \
++ $(NULL)
++else
++NSS_DEP_LIBS = \
++ $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
++ $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \
++ $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \
++ $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \
++ $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \
++ $(NULL)
++NSS_LIBS = \
++ $(LIBS_DIR) \
++ $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
++ -lsmime3 \
++ -lssl3 \
++ -lnss3 \
++ -lsoftokn3 \
++ $(NULL)
++endif
++
++ifneq (,$(filter OS2 WINNT WINCE, $(OS_ARCH)))
++ifndef GNU_CC
++ifndef MOZ_NATIVE_NSS
++NSS_LIBS = \
++ $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
++ $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \
++ $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \
++ $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \
++ $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \
++ $(NULL)
++endif
++endif
++endif
++
+ LDAP_CFLAGS = @LDAP_CFLAGS@
+ LDAP_LIBS = @LDAP_LIBS@
+ XPCOM_GLUE_LDOPTS = @XPCOM_GLUE_LDOPTS@
+
+diff -Naur mozilla-orig/config/config.mk mozilla/config/config.mk
+--- mozilla-orig/config/config.mk 2006-01-06 21:01:22.000000000 +0000
++++ mozilla/config/config.mk 2006-02-27 15:09:03.000000000 +0000
+@@ -138,39 +138,6 @@
+ FINAL_LINK_COMPS = $(DEPTH)/config/final-link-comps
+ FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names
+
+-#
+-# NSS libs needed for final link in static build
+-#
+-
+-NSS_LIBS = \
+- $(LIBS_DIR) \
+- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
+- -lsmime3 \
+- -lssl3 \
+- -lnss3 \
+- -lsoftokn3 \
+- $(NULL)
+-
+-ifneq (,$(filter OS2 WINNT WINCE, $(OS_ARCH)))
+-ifndef GNU_CC
+-NSS_LIBS = \
+- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
+- $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \
+- $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \
+- $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \
+- $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \
+- $(NULL)
+-endif
+-endif
+-
+-NSS_DEP_LIBS = \
+- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
+- $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \
+- $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \
+- $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \
+- $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \
+- $(NULL)
+-
+ MOZ_UNICHARUTIL_LIBS = $(DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX)
+ MOZ_REGISTRY_LIBS = $(DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
+ MOZ_WIDGET_SUPPORT_LIBS =
$(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX)
+
+diff -Naur mozilla-orig/configure mozilla/configure
+--- mozilla-orig/configure 2006-01-11 05:43:03.000000000 +0000
++++ mozilla/configure 2006-02-27 15:09:03.000000000 +0000
+@@ -44,6 +44,13 @@
+ --with-nspr-exec-prefix=PFX
+ Exec prefix where NSPR is installed"
+ ac_help="$ac_help
++ --with-system-nss Use system installed NSS"
++ac_help="$ac_help
++ --with-nss-prefix=PFX Prefix where NSS is installed"
++ac_help="$ac_help
++ --with-nss-exec-prefix=PFX
++ Exec prefix where NSS is installed"
++ac_help="$ac_help
+ --with-system-jpeg[=PFX]
+ Use system libjpeg [installed at prefix PFX]"
+ ac_help="$ac_help
+@@ -1023,6 +1030,7 @@
+ MOZPNG=10207
+ MOZZLIB=1.2.3
+ NSPR_VERSION=4
++NSS_VERSION=3
+
+ GLIB_VERSION=1.2.0
+ GTK_VERSION=1.2.0
+@@ -11308,6 +11316,123 @@
+ fi
+ fi
+
++
++# Check whether --with-system-nss or --without-system-nss was given.
++if test "${with_system_nss+set}" = set; then
++ withval="$with_system_nss"
++ if test "$withval" = "yes"; then
++ _USE_SYSTEM_NSS=1
++ elif test "$withval" = "no"; then
++ :
++ else
++ { echo "configure: error: Option, system-nss, does not take an argument
($withval)." 1>&2; exit 1; }
++ fi
++fi
++
++
++if test -n "$_USE_SYSTEM_NSS"; then
++
++# Check whether --with-nss-prefix or --without-nss-prefix was given.
++if test "${with_nss_prefix+set}" = set; then
++ withval="$with_nss_prefix"
++ nss_config_prefix="$withval"
++else
++ nss_config_prefix=""
++fi
++
++
++# Check whether --with-nss-exec-prefix or --without-nss-exec-prefix was given.
++if test "${with_nss_exec_prefix+set}" = set; then
++ withval="$with_nss_exec_prefix"
++ nss_config_exec_prefix="$withval"
++else
++ nss_config_exec_prefix=""
++fi
++
++
++ if test -n "$nss_config_exec_prefix"; then
++ nss_config_args="$nss_config_args
--exec-prefix=$nss_config_exec_prefix"
++ if test -z "$NSS_CONFIG"; then
++ NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config
++ fi
++ fi
++ if test -n "$nss_config_prefix"; then
++ nss_config_args="$nss_config_args --prefix=$nss_config_prefix"
++ if test -z "$NSS_CONFIG"; then
++ NSS_CONFIG=$nss_config_prefix/bin/nss-config
++ fi
++ fi
++
++ unset ac_cv_path_NSS_CONFIG
++ # Extract the first word of "nss-config", so it can be a program name
with args.
++set dummy nss-config; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:11363: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ case "$NSS_CONFIG" in
++ /*)
++ ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a
path.
++ ;;
++ ?:/*)
++ ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a
dos path.
++ ;;
++ *)
++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
++ ac_dummy="$PATH"
++ for ac_dir in $ac_dummy; do
++ test -z "$ac_dir" && ac_dir=.
++ if test -f $ac_dir/$ac_word; then
++ ac_cv_path_NSS_CONFIG="$ac_dir/$ac_word"
++ break
++ fi
++ done
++ IFS="$ac_save_ifs"
++ test -z "$ac_cv_path_NSS_CONFIG" && ac_cv_path_NSS_CONFIG="no"
++ ;;
++esac
++fi
++NSS_CONFIG="$ac_cv_path_NSS_CONFIG"
++if test -n "$NSS_CONFIG"; then
++ echo "$ac_t""$NSS_CONFIG" 1>&6
++else
++ echo "$ac_t""no" 1>&6
++fi
++
++ min_nss_version=3.0.0
++ echo $ac_n "checking for NSS - version >= $min_nss_version
(skipping)""... $ac_c" 1>&6
++echo "configure:11398: checking for NSS - version >= $min_nss_version
(skipping)" >&5
++
++ no_nss=""
++ if test "$NSS_CONFIG" = "no"; then
++ no_nss="yes"
++ else
++ NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags`
++ NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs`
++
++ nss_config_major_version=`$NSS_CONFIG
$nss_config_args --version | \
++ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
++ nss_config_minor_version=`$NSS_CONFIG $nss_config_args
--version | \
++ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
++ nss_config_micro_version=`$NSS_CONFIG $nss_config_args
--version | \
++ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
++ fi
++
++ if test -z "$no_nss"; then
++ echo "$ac_t""yes" 1>&6
++ MOZ_NATIVE_NSS=1
++ else
++ echo "$ac_t""no" 1>&6
++ fi
++
++
++
++
++
++
++fi
++
+ if test -z "$SKIP_LIBRARY_CHECKS"; then
+ # Check whether --with-system-jpeg or --without-system-jpeg was given.
+ if test "${with_system_jpeg+set}" = set; then
+@@ -19491,6 +19616,9 @@
+ [EMAIL PROTECTED]@%$NSPR_CONFIG%g
+ [EMAIL PROTECTED]@%$NSPR_CFLAGS%g
+ [EMAIL PROTECTED]@%$NSPR_LIBS%g
[EMAIL PROTECTED]@%$NSS_CONFIG%g
[EMAIL PROTECTED]@%$NSS_CFLAGS%g
[EMAIL PROTECTED]@%$NSS_LIBS%g
+ [EMAIL PROTECTED]@%$GTK_CONFIG%g
+ [EMAIL PROTECTED]@%$GTK_CFLAGS%g
+ [EMAIL PROTECTED]@%$GTK_LIBS%g
+@@ -19771,6 +19899,7 @@
+ [EMAIL PROTECTED]@%$MOZ_PNG_CFLAGS%g
+ [EMAIL PROTECTED]@%$MOZ_PNG_LIBS%g
+ [EMAIL PROTECTED]@%$MOZ_NATIVE_NSPR%g
[EMAIL PROTECTED]@%$MOZ_NATIVE_NSS%g
+ [EMAIL PROTECTED]@%$COMPILE_CFLAGS%g
+ [EMAIL PROTECTED]@%$COMPILE_CXXFLAGS%g
+ [EMAIL PROTECTED]@%$CROSS_COMPILE%g
+
+diff -Naur mozilla-orig/configure.in mozilla/configure.in
+--- mozilla-orig/configure.in 2006-01-10 03:11:42.000000000 +0000
++++ mozilla/configure.in 2006-02-27 15:09:03.000000000 +0000
+@@ -86,6 +86,7 @@
+ MOZPNG=10207
+ MOZZLIB=1.2.3
+ NSPR_VERSION=4
++NSS_VERSION=3
+
+ dnl Set the minimum version of toolkit libs used by mozilla
+ dnl ========================================================
+@@ -3491,6 +3492,19 @@
+ fi
+ fi
+
++dnl ========================================================
++dnl = If NSS was not detected in the system,
++dnl = use the one in the source tree (mozilla/security/nss)
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-nss,
++[ --with-system-nss Use system installed NSS],
++ _USE_SYSTEM_NSS=1 )
++
++if test -n "$_USE_SYSTEM_NSS"; then
++ AM_PATH_NSS(3.0.0, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=])
++fi
++
+ if test -z "$SKIP_LIBRARY_CHECKS"; then
+ dnl system JPEG support
+ dnl ========================================================
+@@ -6735,6 +6749,10 @@
+ AC_SUBST(NSPR_LIBS)
+ AC_SUBST(MOZ_NATIVE_NSPR)
+
++AC_SUBST(NSS_CFLAGS)
++AC_SUBST(NSS_LIBS)
++AC_SUBST(MOZ_NATIVE_NSS)
++
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CXXFLAGS)
+ AC_SUBST(CPPFLAGS)
+
+diff -Naur mozilla-orig/security/manager/Makefile.in
mozilla/security/manager/Makefile.in
+--- mozilla-orig/security/manager/Makefile.in 2006-01-05 15:40:17.000000000
+0000
++++ mozilla/security/manager/Makefile.in 2006-02-27 15:09:03.000000000
+0000
+@@ -46,6 +46,8 @@
+ MODULE = psm
+
+ PACKAGE_FILE = psm.pkg
++
++ifndef MOZ_NATIVE_NSS
+ PACKAGE_VARS += \
+ NSS3_LIB \
+ SMIME3_LIB \
+@@ -57,6 +59,7 @@
+ $(NULL)
+
+ LOADABLE_ROOT_MODULE = $(DLL_PREFIX)nssckbi$(DLL_SUFFIX)
++endif
+
+ NSS3_LIB = $(DLL_PREFIX)nss3$(DLL_SUFFIX)
+ SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX)
+@@ -150,6 +153,7 @@
+ export:: .nss.cleaned
+
+ .nss.cleaned: .nss.checkout
++ifndef MOZ_NATIVE_NSS
+ $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
+ $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
+ ifndef SKIP_CHK
+@@ -157,9 +161,12 @@
+ $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign
$(DEFAULT_GMAKE_FLAGS) clean
+ endif
+ touch $@
++endif
+
+ .nss.checkout:
++ifndef MOZ_NATIVE_NSS
+ touch $(srcdir)/$@
++endif
+
+ dependclean export packages chrome::
+ $(MAKE) -C boot $@
+@@ -170,12 +177,15 @@
+ endif
+
+ libs::
++ifndef MOZ_NATIVE_NSS
+ $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS)
++endif
+ ifeq ($(OS_ARCH),WINNT)
+ cd $(DIST)/lib; cp -f $(LIB_PREFIX)dbm$(MOZ_BITS).$(LIB_SUFFIX)
$(LIB_PREFIX)dbm.$(LIB_SUFFIX)
+ else
+ cd $(DIST)/lib; cp -f $(LIB_PREFIX)mozdbm_s.$(LIB_SUFFIX)
$(LIB_PREFIX)dbm.$(LIB_SUFFIX); $(RANLIB) $(LIB_PREFIX)dbm.$(LIB_SUFFIX)
+ endif
++ifndef MOZ_NATIVE_NSS
+ $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS)
+ ifndef SKIP_CHK
+ $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS)
+@@ -213,6 +223,7 @@
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_HYBRID_MODULE) $(DIST)/bin
+ endif
+ endif
++endif
+ $(MAKE) -C boot $@
+ $(MAKE) -C ssl $@
+ $(MAKE) -C locales $@
+@@ -221,6 +232,7 @@
+ endif
+
+ install::
++ifndef MOZ_NATIVE_NSS
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE)
$(DESTDIR)$(mozappdir)
+ ifndef SKIP_CHK
+ $(SYSINSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DESTDIR)$(mozappdir)
+@@ -235,6 +247,7 @@
+ $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_HYBRID_CHK)
$(DESTDIR)$(mozappdir)
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_HYBRID_MODULE)
$(DESTDIR)$(mozappdir)
+ endif
++endif
+ $(MAKE) -C boot $@
+ $(MAKE) -C ssl $@
+ $(MAKE) -C locales $@
+@@ -249,15 +262,18 @@
+ ifdef MOZ_XUL
+ $(MAKE) -C pki $@
+ endif
++ifndef MOZ_NATIVE_NSS
+ $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
+ $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
+ ifndef SKIP_CHK
+ $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS)
clean
+ $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign
$(DEFAULT_GMAKE_FLAGS) clean
+ endif
++endif
+
+ echo-requires-recursive::
+ $(MAKE) -C boot $@
+ $(MAKE) -C ssl $@
+ $(MAKE) -C pki $@
+ $(MAKE) -C locales $@
++
+
+diff -Naur mozilla-orig/security/manager/ssl/src/Makefile.in
mozilla/security/manager/ssl/src/Makefile.in
+--- mozilla-orig/security/manager/ssl/src/Makefile.in 2005-08-03
05:24:18.000000000 +0000
++++ mozilla/security/manager/ssl/src/Makefile.in 2006-02-27
15:09:03.000000000 +0000
+@@ -123,8 +123,13 @@
+
+ # Use local includes because they are inserted before INCLUDES
+ # so that Mozilla's nss.h is used, not glibc's
++ifdef MOZ_NATIVE_NSS
++LOCAL_INCLUDES += $(NSS_CFLAGS) \
++ $(NULL)
++else
+ LOCAL_INCLUDES += -I$(DIST)/public/nss \
+ $(NULL)
++endif
+
+ EXTRA_DSO_LDOPTS += \
+ $(MOZ_UNICHARUTIL_LIBS) \
+
+diff -Naur mozilla-orig/security/manager/ssl/src/nsNSSComponent.cpp
mozilla/security/manager/ssl/src/nsNSSComponent.cpp
+--- mozilla-orig/security/manager/ssl/src/nsNSSComponent.cpp 2005-08-26
06:41:50.000000000 +0000
++++ mozilla/security/manager/ssl/src/nsNSSComponent.cpp 2006-02-27
15:09:03.000000000 +0000
+@@ -488,14 +488,6 @@
+ }
+
+
+-#ifdef XP_MAC
+-#ifdef DEBUG
+-#define LOADABLE_CERTS_MODULE NS_LITERAL_CSTRING("NSSckbiDebug.shlb")
+-#else
+-#define LOADABLE_CERTS_MODULE NS_LITERAL_CSTRING("NSSckbi.shlb")
+-#endif /*DEBUG*/
+-#endif /*XP_MAC*/
+-
+ static void setOCSPOptions(nsIPrefBranch * pref);
+
+ NS_IMETHODIMP
+@@ -689,40 +681,40 @@
+
+ const char *possible_ckbi_locations[] = {
+ NS_GRE_DIR,
+- NS_XPCOM_CURRENT_PROCESS_DIR
++ NS_XPCOM_CURRENT_PROCESS_DIR,
++ 0
+ };
+-
++
+ for (size_t il = 0; il < sizeof(possible_ckbi_locations)/sizeof(const
char*); ++il) {
+ nsCOMPtr<nsILocalFile> mozFile;
+- directoryService->Get( possible_ckbi_locations[il],
+- NS_GET_IID(nsILocalFile),
+- getter_AddRefs(mozFile));
++ char *fullModuleName = nsnull;
++
++ if (!possible_ckbi_locations[il])
++ {
++ fullModuleName = PR_GetLibraryName(nsnull, "nssckbi");
++ }
++ else
++ {
++ directoryService->Get( possible_ckbi_locations[il],
++ NS_GET_IID(nsILocalFile),
++ getter_AddRefs(mozFile));
+
+- if (!mozFile) {
+- continue;
++ if (!mozFile) {
++ continue;
++ }
++
++ nsCAutoString processDir;
++ mozFile->GetNativePath(processDir);
++ fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi");
+ }
+
+- char *fullModuleName = nsnull;
+-#ifdef XP_MAC
+- nsCAutoString nativePath;
+- mozFile->AppendNative(NS_LITERAL_CSTRING("Essential Files"));
+- mozFile->AppendNative(LOADABLE_CERTS_MODULE);
+- mozFile->GetNativePath(nativePath);
+- fullModuleName = (char *) nativePath.get();
+-#else
+- nsCAutoString processDir;
+- mozFile->GetNativePath(processDir);
+- fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi");
+-#endif
+ /* If a module exists with the same name, delete it. */
+ NS_ConvertUCS2toUTF8 modNameUTF8(modName);
+ int modType;
+ SECMOD_DeleteModule(NS_CONST_CAST(char*, modNameUTF8.get()), &modType);
+ SECStatus rv_add =
+ SECMOD_AddNewModule(NS_CONST_CAST(char*, modNameUTF8.get()),
fullModuleName, 0, 0);
+-#ifndef XP_MAC
+- PR_Free(fullModuleName); // allocated by NSPR
+-#endif
++ PR_FreeLibraryName(fullModuleName); // allocated by NSPR
+ if (SECSuccess == rv_add) {
+ // found a module, no need to try other directories
+ break;
--
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page