[Fedora-directory-commits] adminserver/m4 mod_nss.m4, NONE, 1.1 httpd.m4, 1.1, 1.2 mozldap.m4, 1.1, 1.2 modnss.m4, 1.1, NONE

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Fri May 11 19:44:09 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/adminserver/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24035/adminserver/m4

Modified Files:
	httpd.m4 mozldap.m4 
Added Files:
	mod_nss.m4 
Removed Files:
	modnss.m4 
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: Many more changes to make admin server more FHS friendly
Allow all hardcoded paths to writable directories to be overridden by environment variables
Integrate mod_admserv and mod_restartd
Allow Admin Server to use Fortitude or standalone mod_nss
Better httpd detection and support



--- NEW FILE mod_nss.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# END COPYRIGHT BLOCK

AC_CHECKING(for MOD_NSS)

# check for --with-modnss-lib
AC_MSG_CHECKING(for --with-modnss-lib)
AC_ARG_WITH(modnss-lib, [  --with-modnss-lib=PATH     MOD_NSS Apache module directory],
[
  if test -d "$withval"
  then
    AC_MSG_RESULT([using $withval])
    nssmoddir="$withval"
  else
    echo
    AC_MSG_ERROR([$withval not found])
  fi
],
AC_MSG_RESULT(no))

# check for --with-modnss-bin
AC_MSG_CHECKING(for --with-modnss-bin)
AC_ARG_WITH(modnss-bin, [  --with-modnss-bin=PATH     MOD_NSS binary directory],
[
  if test -d "$withval"
  then
    AC_MSG_RESULT([using $withval])
    modnssbindir="$withval"
  else
    echo
    AC_MSG_ERROR([$withval not found])
  fi
],
AC_MSG_RESULT(no))

# check for --with-fortitude
default_fortitudedir=/opt/fortitude
AC_MSG_CHECKING(for --with-fortitude)
AC_ARG_WITH(fortitude, [  --with-fortitude=PATH     Fortitude root directory (default: $default_fortitudedir)],
[
  if test -d "$withval"
  then
    AC_MSG_RESULT([using $withval])
    fortitudedir="$withval"
  elif test "$withval" = "yes" -a -d $default_fortitudedir ; then
    AC_MSG_RESULT([using $default_fortitudedir])
    fortitudedir="$default_fortitudedir"
  else
    echo
    AC_MSG_ERROR([$withval not found])
  fi
],
AC_MSG_RESULT(no))

if test -n "$fortitudedir" ; then
    if test -z "$nssmoddir" ; then
        nssmoddir="$fortitudedir/modules.local"
    fi
    if test -z "$modnssbindir" ; then
        modnssbindir="$fortitudedir/bin"
    fi
fi
# else, parse httpd.conf or httpconfdir/nss.conf

# else, punt
if test -z "$modnssbindir" ; then
    modnssbindir='$(sbindir)'
fi

if test -z "$nssmoddir" ; then
    nssmoddir="$moddir"
fi


Index: httpd.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/m4/httpd.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- httpd.m4	9 May 2007 00:26:38 -0000	1.1
+++ httpd.m4	11 May 2007 19:44:07 -0000	1.2
@@ -34,7 +34,7 @@
 httpd_conf_rel=`eval echo $httpd_conf_rel`
 # Server version: Apache/2.2.2
 verstr='Server version: Apache/'
-httpd_ver=`$HTTPD -v | grep "Server version:" | sed -e s@$verstr@@`
+httpd_ver=`$HTTPD -v | grep "Server version:" | sed -e "s,$verstr,,"`
 case $httpd_ver in
     2.2*) APACHE22=1 ;;
     *) APACHE22= ;;
@@ -42,12 +42,18 @@
 
 httpdconf=${httpd_root}/${httpd_conf_rel}
 
+mimemagic=`grep MIMEMagicFile $httpdconf|grep -v \^# | awk '{print $2}'`
+if [ ! -f "$mimemagic" ] ; then
+# assume relative to root
+    mimemagic=${httpd_root}/${mimemagic}
+fi
+
 AC_PATH_PROG([APXS], [apxs], [],
 			 [$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin])
 if test -n "$APXS" -a -x "$APXS" ; then
-    httpd_moddir=`$APXS -q LIBEXECDIR`
+    moddir=`$APXS -q LIBEXECDIR`
 fi
 
-if test -z "$httpd_moddir" ; then
-    httpd_moddir="$libdir/httpd/modules"
+if test -z "$moddir" ; then
+    moddir='$(libdir)/httpd/modules'
 fi


Index: mozldap.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/m4/mozldap.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mozldap.m4	9 May 2007 00:26:38 -0000	1.1
+++ mozldap.m4	11 May 2007 19:44:07 -0000	1.2
@@ -85,8 +85,8 @@
       AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].])
     fi
     ldapsdk_inc=`$PKG_CONFIG --cflags-only-I $mozldappkg`
-    ldapsdk_lib=`$PKG_CONFIG --libs-only-L $mozldappkg`
-    ldapsdk_libdir=`$PKG_CONFIG --libs-only-L $mozldappkg | sed -e s/-L// | sed -e s/\ .*$//`
+    ldapsdk_libdir=`$PKG_CONFIG --variable=libdir $mozldappkg`
+    ldapsdk_lib="-L$ldapsdk_libdir"
     ldapsdk_bindir=`$PKG_CONFIG --variable=bindir $mozldappkg`
     AC_MSG_RESULT([using system $mozldappkg])
   fi


--- modnss.m4 DELETED ---




More information about the Fedora-directory-commits mailing list