From sunpoet@sunpoet.net  Wed Sep  8 03:31:32 2010
Return-Path: <sunpoet@sunpoet.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8D8B910656E8
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Sep 2010 03:31:32 +0000 (UTC)
	(envelope-from sunpoet@sunpoet.net)
Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 32EF78FC1F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Sep 2010 03:31:31 +0000 (UTC)
Received: by gxk24 with SMTP id 24so2597475gxk.13
        for <multiple recipients>; Tue, 07 Sep 2010 20:31:31 -0700 (PDT)
Received: by 10.101.171.20 with SMTP id y20mr715603ano.150.1283916691295;
        Tue, 07 Sep 2010 20:31:31 -0700 (PDT)
Received: from sunpoet.net (sunpoet.net [220.133.12.240])
        by mx.google.com with ESMTPS id e18sm12555083ana.35.2010.09.07.20.31.19
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Tue, 07 Sep 2010 20:31:27 -0700 (PDT)
Received: by sunpoet.net (Postfix, from userid 1000)
	id 208702AEC4F3; Wed,  8 Sep 2010 11:30:53 +0800 (CST)
Message-Id: <20100908033053.208702AEC4F3@sunpoet.net>
Date: Wed,  8 Sep 2010 11:30:53 +0800 (CST)
From: Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: wxs@FreeBSD.org
Subject: [PATCH] security/sudo: fix 'make package' if LOCALBASE/etc/sudoers exists
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         150371
>Category:       ports
>Synopsis:       [PATCH] security/sudo: fix 'make package' if LOCALBASE/etc/sudoers exists
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 08 03:40:03 UTC 2010
>Closed-Date:    Mon Sep 13 20:48:49 UTC 2010
>Last-Modified:  Mon Sep 13 20:50:01 UTC 2010
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Sep 8 03:40:14 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150371 
State-Changed-From-To: open->closed 
State-Changed-By: wxs 
State-Changed-When: Mon Sep 13 20:48:49 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150371 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150371: commit references a PR
Date: Mon, 13 Sep 2010 20:46:07 +0000 (UTC)

 wxs         2010-09-13 20:46:01 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/sudo        Makefile 
     security/sudo/files  patch-Makefile.in 
   Log:
   Fix packaging.
   
   PR:             ports/150371
   Submitted by:   Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net>, dim@
   
   Revision  Changes    Path
   1.117     +1 -0      ports/security/sudo/Makefile
   1.5       +9 -6      ports/security/sudo/files/patch-Makefile.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
