Bug 157613 - Fix port: mail/fetchmail should use USERS
Summary: Fix port: mail/fetchmail should use USERS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-04 17:10 UTC by Chris Rees
Modified: 2011-08-15 21:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees 2011-06-04 17:10:07 UTC
	

	This port uses pkg-install to create new users instead of using USERS= and GROUPS=

Fix: - Use USERS and GROUPS
	- Move rundir creation to pkg-plist

	Submitted by: Chris Rees (utisoft@gmail.com)

	Please note that pkg-install has been removed.




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--9kzNyjcm6HBKde1lROPmxEnqQji3VMzXQw4Ej3S29RYsF8xb
Content-Type: text/plain; name="mail-fetchmail.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="mail-fetchmail.patch"

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/mail/fetchmail/Makefile,v
retrieving revision 1.214
diff -u -r1.214 Makefile
--- Makefile	11 Dec 2010 22:27:06 -0000	1.214
+++ Makefile	4 Jun 2011 12:40:36 -0000
@@ -25,6 +25,9 @@
 
 RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss
 
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
+
 USE_RC_SUBR=	fetchmail
 FETCHMAILRC=	${PREFIX}/etc/fetchmailrc
 SUB_FILES=	pkg-message
@@ -113,9 +116,6 @@
 post-build:
 	@cd ${WRKSRC} && ${MAKE} check
 
-pre-su-install:
-	@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 .if !defined(NOPORTDOCS)
 	${INSTALL} -d -m 555 -o ${DOCOWN} -g ${DOCGRP} ${DOCSDIR}
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	15 May 2006 21:18:39 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-#	$FreeBSD: ports/mail/fetchmail/pkg-install,v 1.2 2006/05/15 21:18:39 barner Exp $
-#
-
-PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-
-if [ -x /usr/sbin/nologin ]; then
-	NOLOGIN=/usr/sbin/nologin
-else
-	NOLOGIN=/sbin/nologin
-fi
-
-if [ x"$2" = xPRE-INSTALL ]; then
-	USER=fetchmail
-	UID=124
-	GROUP=fetchmail
-	GID=124
-
-	if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
-		echo "You already have a group \"${GROUP}\", so I will use it."
-	else
-		if /usr/sbin/pw groupadd ${GROUP} -g ${GID}
-		then
-			echo "Added group \"${GROUP}\"."
-		else
-			echo "Adding group \"${GROUP}\" failed..."
-			echo "Please create it, and try again."
-			exit 1
-		fi
-	fi
-
-	if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
-		 echo "You already have a user \"${USER}\", so I will use it."
-	else
-		if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/run/fetchmail -s ${NOLOGIN} -c "Fetchmail mail-retrieval daemon"; then
-			echo "Added user \"${USER}\"."
-		else
-			echo "Adding user \"${USER}\" failed..."
-			echo "Please create it, and try again."
-			exit 1
-		fi
-	fi
-fi
-
-/usr/bin/install -d -m 755 -o fetchmail -g fetchmail /var/run/fetchmail
Index: pkg-plist
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/mail/fetchmail/pkg-plist,v
retrieving revision 1.29
diff -u -r1.29 pkg-plist
--- pkg-plist	4 Nov 2009 10:47:33 -0000	1.29
+++ pkg-plist	4 Jun 2011 12:39:09 -0000
@@ -36,6 +36,7 @@
 %%NLS%%share/locale/tr/LC_MESSAGES/fetchmail.mo
 %%NLS%%share/locale/vi/LC_MESSAGES/fetchmail.mo
 %%NLS%%share/locale/zh_CN/LC_MESSAGES/fetchmail.mo
+@exec /usr/bin/install -d -m 755 -o fetchmail -g fetchmail /var/run/fetchmail
 @unexec if cmp -s %D/etc/fetchmailrc.sample %D/etc/fetchmailrc; then rm -f %D/etc/fetchmailrc; fi
 etc/fetchmailrc.sample
 @exec if [ ! -f %D/etc/fetchmailrc ] ; then cp -p %D/%F %B/fetchmailrc; fi
Comment 1 Edwin Groothuis freebsd_committer 2011-06-04 17:10:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2011-06-04 17:10:35 UTC
Maintainer of mail/fetchmail,

Please note that PR ports/157613 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157613

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer 2011-06-04 17:10:37 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Corey Halpin 2011-06-05 02:06:38 UTC
   I approve the attached patch.

~crh

On 2011-06-04, Edwin Groothuis wrote:
>Maintainer of mail/fetchmail,
>
>Please note that PR ports/157613 has just been submitted.
>
>If it contains a patch for an upgrade, an enhancement or a bug fix
>you agree on, reply to this email stating that you approve the patch
>and a committer will take care of it.
>
>The full text of the PR can be found at:
>    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157613
>
>-- 
>Edwin Groothuis via the GNATS Auto Assign Tool
>edwin@FreeBSD.org

>
Comment 5 Chris Rees freebsd_committer 2011-06-22 17:54:42 UTC
Responsible Changed
From-To: pgollucci->crees

Invalid autoassignment
Comment 6 Chris Rees freebsd_committer 2011-06-22 18:02:52 UTC
Responsible Changed
From-To: crees->freebsd-ports-bugs

To pool to correct assign message
Comment 7 Chris Rees freebsd_committer 2011-06-22 18:25:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

Invalid autoassignment to pgollucci
Comment 8 Chris Rees freebsd_committer 2011-06-26 17:35:13 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 9 Chris Rees freebsd_committer 2011-07-09 11:07:55 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 10 dfilter service freebsd_committer 2011-07-09 11:08:02 UTC
crees       2011-07-09 10:07:49 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile pkg-plist 
  Removed files:
    mail/fetchmail       pkg-install 
  Log:
  Use USERS and GROUPS
  
  PR:             ports/157613
  Submitted by:   crees (me)
  Approved by:    rene (mentor, implicit), Corey Halpin (maintainer)
  
  Revision  Changes    Path
  1.216     +3 -3      ports/mail/fetchmail/Makefile
  1.3       +0 -46     ports/mail/fetchmail/pkg-install (dead)
  1.30      +2 -1      ports/mail/fetchmail/pkg-plist
_______________________________________________
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"
Comment 11 dfilter service freebsd_committer 2011-08-15 21:44:12 UTC
mandree     2011-08-15 20:43:57 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile 
  Log:
  Forced commit to note that the creation of /var/run/fetchmail
  got broken as undesired side effect of this fix when pkg-install
  was removed.  Regression fixed with previous commit.
  
  PR:           ports/157613
  Submitted by: crees
  
  Revision  Changes    Path
  1.218     +0 -0      ports/mail/fetchmail/Makefile
_______________________________________________
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"