Subject: pkg/30261: security/sudo PLIST and shared library build fix
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <joerg@leaf.dragonflybsd.org>
List: pkgsrc-bugs
Date: 05/17/2005 15:09:01
>Number:         30261
>Category:       pkg
>Synopsis:       security/sudo PLIST and shared library build fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 17 15:09:00 +0000 2005
>Originator:     Jörg Sonnenberger
>Release:        pkgsrc-HEAD [DragonFly 1.3]
>Organization:
>Environment:
DragonFly britannica.bec.de 1.3.1-DEVELOPMENT DragonFly 1.3.1-DEVELOPMENT #15: Tue May 17 13:31:47 2005     joerg@britannica.bec.de:/home/joerg/wd/DragonFly/world/src/sys/compile/TURTLE  i386
>Description:
The configure script of security/sudo doesn't want to build shared libraries on DragonFly. This means that sudo_noexec is not correctly build. The common PLIST doesn't contain entries for man pages.
>How-To-Repeat:
build on DragonFly.
>Fix:
Index: security/sudo/PLIST.DragonFly
===================================================================
RCS file: security/sudo/PLIST.DragonFly
diff -N security/sudo/PLIST.DragonFly
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ security/sudo/PLIST.DragonFly       9 May 2005 21:37:08 -0000
@@ -0,0 +1,5 @@
+@comment $NetBSD$
+man/man5/sudoers.5
+man/man8/sudo.8
+man/man8/sudoedit.8
+man/man8/visudo.8
Index: security/sudo/distinfo
===================================================================
RCS file: /home/joerg/wd/repository/netbsd/pkgsrc/security/sudo/distinfo,v
retrieving revision 1.28
diff -u -r1.28 distinfo
--- security/sudo/distinfo      30 Mar 2005 12:08:15 -0000      1.28
+++ security/sudo/distinfo      11 May 2005 12:24:20 -0000
@@ -4,5 +4,5 @@
 RMD160 (sudo-1.6.8p7.tar.gz) = a2fefd369b8c20a989e084d8432f5ac3b03196b3
 Size (sudo-1.6.8p7.tar.gz) = 585302 bytes
 SHA1 (patch-aa) = a4f29f2c228eb3b4af0872cf04a00ffdf41c603c
-SHA1 (patch-af) = 870a0f0504449dbb839c8b8c2dfe6505a9c9ec68
-SHA1 (patch-ag) = 3703932e134ae90281179d0a4ae4760fa420264b
+SHA1 (patch-af) = 245761812dc600b3d2752fa135ba367bb0223370
+SHA1 (patch-ag) = 87c3263674ec98ccc9cc33f2108a2456eddaecc5
Index: security/sudo/patches/patch-af
===================================================================
RCS file: /home/joerg/wd/repository/netbsd/pkgsrc/security/sudo/patches/patch-af,v
retrieving revision 1.13
diff -u -r1.13 patch-af
--- security/sudo/patches/patch-af      17 Sep 2004 09:25:18 -0000      1.13
+++ security/sudo/patches/patch-af      11 May 2005 12:23:35 -0000
@@ -1,8 +1,8 @@
 $NetBSD: pkgsrc/security/sudo/patches/patch-af,v 1.13 2004/09/17 09:25:18 cube Exp $
 
---- configure.in.orig  2004-09-08 17:49:25.000000000 +0200
-+++ configure.in
-@@ -118,7 +118,6 @@ dnl
+--- configure.in.orig  2004-11-25 18:31:20.000000000 +0100
++++ configure.in       2005-05-11 14:23:01.000000000 +0200
+@@ -118,7 +118,6 @@
  test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man'
  test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
  test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
@@ -10,7 +10,7 @@
  
  dnl
  dnl Deprecated --with options (these all warn or generate an error)
-@@ -244,6 +243,19 @@ AC_ARG_WITH(csops, [  --with-csops      
+@@ -244,6 +243,19 @@
                ;;
  esac])
  
@@ -30,7 +30,16 @@
  AC_ARG_WITH(passwd, [  --without-passwd        don't use passwd/shadow file for authentication],
  [case $with_passwd in
      yes)      ;;
-@@ -1882,6 +1894,7 @@ if test -n "$with_kerb5" -a -z "$KRB5CON
+@@ -1513,7 +1525,7 @@
+                   esac
+               fi
+               ;;
+-    *-*-freebsd*)
++    *-*-freebsd*|*-*-dragonfly*)
+               # FreeBSD has a real setreuid(2) starting with 2.1 and
+               # backported to 2.0.5.  We just take 2.1 and above...
+               case "`echo $host_os | sed 's/^freebsd\([[0-9\.]]*\).*$/\1/'`" in
+@@ -1894,6 +1906,7 @@
            AC_MSG_RESULT(yes)
            AC_DEFINE(HAVE_HEIMDAL)
            SUDO_LIBS="${SUDO_LIBS} -lkrb5 -ldes -lcom_err -lasn1"
Index: security/sudo/patches/patch-ag
===================================================================
RCS file: /home/joerg/wd/repository/netbsd/pkgsrc/security/sudo/patches/patch-ag,v
retrieving revision 1.5
diff -u -r1.5 patch-ag
--- security/sudo/patches/patch-ag      19 May 2004 19:26:38 -0000      1.5
+++ security/sudo/patches/patch-ag      11 May 2005 12:21:36 -0000
@@ -1,8 +1,8 @@
-$NetBSD: pkgsrc/security/sudo/patches/patch-ag,v 1.5 2004/05/19 19:26:38 kim Exp $
+$NetBSD: pkgsrc/security/sudo/patches/patch-af,v 1.13 2004/09/17 09:25:18 cube Exp $
 
---- configure.orig     2003-05-06 11:22:27.000000000 -0400
-+++ configure  2004-05-19 15:17:50.000000000 -0400
-@@ -873,6 +873,7 @@
+--- configure.orig     2004-11-26 21:04:30.000000000 +0100
++++ configure  2005-05-10 21:38:19.000000000 +0200
+@@ -1051,6 +1051,7 @@
    --with-devel            add development options
    --with-efence           link with -lefence for malloc() debugging
    --with-csops            add CSOps standard options
@@ -10,7 +10,7 @@
    --without-passwd        don't use passwd/shadow file for authentication
    --with-skey=DIR       enable S/Key support
    --with-opie=DIR       enable OPIE support
-@@ -1423,7 +1424,6 @@
+@@ -1622,7 +1623,6 @@
  test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man'
  test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
  test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
@@ -18,7 +18,7 @@
  
  
  
-@@ -1622,6 +1622,22 @@
+@@ -1820,6 +1820,22 @@
  fi;
  
  
@@ -41,7 +41,117 @@
  # Check whether --with-passwd or --without-passwd was given.
  if test "${with_passwd+set}" = set; then
    withval="$with_passwd"
-@@ -13230,6 +13246,58 @@
+@@ -5228,7 +5244,7 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+-freebsd*)
++freebsd*|dragonfly*)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     case $host_cpu in
+     i*86 )
+@@ -8440,7 +8456,7 @@
+       ;;
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+-    freebsd*)
++    dragonfly*|freebsd*)
+       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec='-R$libdir'
+       hardcode_direct=yes
+@@ -9071,11 +9087,11 @@
+   dynamic_linker=no
+   ;;
+ 
+-freebsd*)
++dragonfly*|freebsd*)
+   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+   version_type=freebsd-$objformat
+   case $version_type in
+-    freebsd-elf*)
++    dragonfly*|freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       ;;
+     freebsd-*)
+@@ -11205,7 +11221,7 @@
+   freebsd-elf*)
+     archive_cmds_need_lc_CXX=no
+     ;;
+-  freebsd*)
++  dragonfly*|freebsd*)
+     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+     # conventions
+     ld_shlibs_CXX=yes
+@@ -12576,11 +12592,11 @@
+   dynamic_linker=no
+   ;;
+ 
+-freebsd*)
++dragonfly*|freebsd*)
+   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+   version_type=freebsd-$objformat
+   case $version_type in
+-    freebsd-elf*)
++    dragonfly*|freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       ;;
+     freebsd-*)
+@@ -14890,7 +14906,7 @@
+       ;;
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+-    freebsd*)
++    dragonfly*|freebsd*)
+       archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec_F77='-R$libdir'
+       hardcode_direct_F77=yes
+@@ -15521,11 +15537,11 @@
+   dynamic_linker=no
+   ;;
+ 
+-freebsd*)
++dragonfly*|freebsd*)
+   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+   version_type=freebsd-$objformat
+   case $version_type in
+-    freebsd-elf*)
++    dragonfly*|freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       ;;
+     freebsd-*)
+@@ -17123,7 +17139,7 @@
+       ;;
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+-    freebsd*)
++    dragonfly*|freebsd*)
+       archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec_GCJ='-R$libdir'
+       hardcode_direct_GCJ=yes
+@@ -17754,11 +17770,11 @@
+   dynamic_linker=no
+   ;;
+ 
+-freebsd*)
++dragonfly*|freebsd*)
+   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+   version_type=freebsd-$objformat
+   case $version_type in
+-    freebsd-elf*)
++    dragonfly*|freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       ;;
+     freebsd-*)
+@@ -21737,7 +21753,7 @@
+                   esac
+               fi
+               ;;
+-    *-*-freebsd*)
++    *-*-freebsd*|*-*-dragonfly*)
+               # FreeBSD has a real setreuid(2) starting with 2.1 and
+               # backported to 2.0.5.  We just take 2.1 and above...
+               case "`echo $host_os | sed 's/^freebsd\([0-9\.]*\).*$/\1/'`" in
+@@ -29049,6 +29065,58 @@
  _ACEOF
  
            SUDO_LIBS="${SUDO_LIBS} -lkrb5 -ldes -lcom_err -lasn1"
@@ -100,7 +210,7 @@
            echo "$as_me:$LINENO: checking for main in -lroken" >&5
  echo $ECHO_N "checking for main in -lroken... $ECHO_C" >&6
  if test "${ac_cv_lib_roken_main+set}" = set; then
-@@ -13282,7 +13350,6 @@
+@@ -29101,7 +29169,6 @@
    SUDO_LIBS="${SUDO_LIBS} -lroken"
  fi