ports/150371: [PATCH] security/sudo: fix 'make package' if LOCALBASE/etc/sudoers exists

Sunpoet Po-Chuan Hsieh sunpoet at sunpoet.net
Wed Sep 8 03:40:04 UTC 2010


>Number:         150371
>Category:       ports
>Synopsis:       [PATCH] security/sudo: fix 'make package' if LOCALBASE/etc/sudoers exists
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 08 03:40:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 8.1-STABLE amd64
>Organization:
SUNPOET.net
>Environment:
System: FreeBSD bonjour.sunpoet.net 8.1-STABLE FreeBSD 8.1-STABLE #0: Sun Jul 25 00:09:24 CST 2010
>Description:
If LOCALBASE/etc/sudoers exists already, 'make install' will not install LOCALBASE/etc/sudoers.sample.
Thus, 'make package' fails due to the missing sudoers.sample.

Port maintainer (wxs at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

# ls -al /usr/local/etc/sudoers
-r--r-----  1 root  wheel  3322 Aug 29 14:13 /usr/local/etc/sudoers
# cd /usr/ports/security/sudo
# make 
...
# make install
...
test -f /usr/local/etc/sudoers ||  /bin/sh ./install-sh -c -O 0 -G 0 -M 0440  sudoers /usr/local/etc/sudoers.sample
...
# make package
===>  Building package for sudo-1.7.4.4
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
Creating package /usr/ports/packages/All/sudo-1.7.4.4.tbz
Registering depends:.
Creating bzip'd tar ball in '/usr/ports/packages/All/sudo-1.7.4.4.tbz'
*** Error code 1

Stop in /usr/ports/security/sudo.

>Fix:

--- sudo-1.7.4.4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/security/sudo/files/patch-Makefile.in /usr/ports/sunpoet/sudo/files/patch-Makefile.in
--- /usr/ports/security/sudo/files/patch-Makefile.in	2010-09-08 04:04:01.000000000 +0800
+++ /usr/ports/sunpoet/sudo/files/patch-Makefile.in	2010-09-08 11:20:11.000000000 +0800
@@ -1,11 +1,14 @@
---- ./Makefile.in.orig	2010-09-07 09:57:25.000000000 -0400
-+++ ./Makefile.in	2010-09-07 09:59:19.000000000 -0400
-@@ -500,7 +500,7 @@
+--- Makefile.in.orig	2010-09-04 05:43:57.000000000 +0800
++++ Makefile.in	2010-09-08 11:19:29.000000000 +0800
+@@ -498,9 +498,8 @@
+ 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) \
 -		sudoers $(DESTDIR)$(sudoersdir)/sudoers
-+		sudoers $(DESTDIR)$(sudoersdir)/sudoers.sample
++	$(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
++	    sudoers $(DESTDIR)$(sudoersdir)/sudoers.sample
  
  install-doc: install-dirs ChangeLog
  	(cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done)
--- sudo-1.7.4.4.patch ends here ---

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



More information about the freebsd-ports-bugs mailing list