ports/149700: security/sudo: package target fails while upgrading

Barbara barbara.xxx1975 at libero.it
Mon Aug 16 09:30:03 UTC 2010


>Number:         149700
>Category:       ports
>Synopsis:       security/sudo: package target fails while upgrading
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 16 09:30:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Barbara
>Release:        RELENG_8
>Organization:
>Environment:
FreeBSD satanasso.local.net 8.1-STABLE FreeBSD 8.1-STABLE #0: Tue Aug 10 13:51:27 CEST 2010     root at satanasso.local.net:/usr/obj/usr/src/sys/SATANASSO  i386

>Description:

Upgrading to the latest version and building a package, I got:

Creating bzip'd tar ball in '/usr/ports/packages/All/sudo-1.7.4.2.tbz'
tar: etc/sudoers.sample: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** Error code 1

This is because etc/sudoers.sample doesn't exists as it is not installed if /usr/local/etc/sudoers exists.

>How-To-Repeat:
# portupgrade -p security/sudo
>Fix:
I'd prefer to always have a .sample file as reference or backup.
So I created a patch in that way. But this is just what I prefer.
Anyway I think that the port needs a fix.


Patch attached with submission follows:

--- pkg-install.orig	2007-07-21 05:15:13.000000000 +0200
+++ pkg-install	2010-08-16 10:15:50.000000000 +0200
@@ -4,9 +4,6 @@
 fi
 if [ -e ${PKG_PREFIX}/etc/sudoers ]; then
   echo "Will not overwrite existing ${PKG_PREFIX}/etc/sudoers file."
-else
-  cp -p ${PKG_PREFIX}/etc/sudoers.default ${PKG_PREFIX}/etc/sudoers
-  chmod 440 ${PKG_PREFIX}/etc/sudoers
 fi
 if [ -e ${PKG_PREFIX}/etc/pam.d/sudo ]; then
   echo "Will not overwrite existing ${PKG_PREFIX}/etc/pam.d/sudo file."
--- files/patch-Makefile.in.orig	2010-08-16 04:16:26.000000000 +0200
+++ files/patch-Makefile.in	2010-08-16 10:21:49.000000000 +0200
@@ -1,14 +1,15 @@
---- ./Makefile.in.orig	2010-07-30 11:58:54.000000000 -0400
-+++ ./Makefile.in	2010-08-15 21:33:54.000000000 -0400
-@@ -493,11 +493,9 @@
+--- Makefile.in.orig	2010-07-30 17:58:54.000000000 +0200
++++ Makefile.in	2010-08-16 10:21:01.000000000 +0200
+@@ -493,11 +493,8 @@
  	if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0755 .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi
  
  install-sudoers: install-dirs
 -	$(INSTALL) -d -O $(sudoers_uid) -G $(sudoers_gid) -M 0750 \
 -	    $(DESTDIR)$(sudoersdir)/sudoers.d
- 	test -f $(DESTDIR)$(sudoersdir)/sudoers || \
- 	    $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
+-	test -f $(DESTDIR)$(sudoersdir)/sudoers || \
+-	    $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
 -		$(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers
++	$(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
 +		$(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers.sample
  
  install-doc: install-dirs ChangeLog


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list