Bug 157609

Summary: Fix port: irc/bitlbee-otr should use USERS
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Ashish SHUKLA <ashish>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2011-06-04 13:30:07 UTC
	

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

Fix: - Use USERS and GROUPS

	Submitted by: Chris Rees (utisoft@gmail.com)
	
	Please note that files/pkg-deinstall.in and files/pkg-install.in have been removed




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

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/bitlbee-otr/Makefile,v
retrieving revision 1.59
diff -u -r1.59 Makefile
--- Makefile	8 Aug 2010 16:41:53 -0000	1.59
+++ Makefile	4 Jun 2011 10:49:17 -0000
@@ -16,6 +16,7 @@
 COMMENT=	An IRC to other chat networks gateway with support for OTR
 
 SUB_FILES=	pkg-message
+SUB_LIST+=	BITLBEEUSER=${BITLBEEUSER}
 MAN5=		bitlbee.conf.5
 MAN8=		bitlbee.8
 PORTDOCS=	AUTHORS CHANGES CREDITS FAQ README
@@ -45,22 +46,12 @@
 
 BITLBEEUSER?=	bitlbee
 BITLBEEGROUP?=	bitlbee
-BITLBEEDIR?=	/nonexistent
-
-BITLBEEUID=	914
-BITLBEEGID=	${BITLBEEUID}
+USERS=		${BITLBEEUSER}
+GROUPS=		${BITLBEEGROUP}
 
 PLIST_SUB=	BITLBEEUSER=${BITLBEEUSER} \
 		BITLBEEGROUP=${BITLBEEGROUP}
 
-SUB_LIST+=	BITLBEEUSER=${BITLBEEUSER} \
-		BITLBEEGROUP=${BITLBEEGROUP} \
-		BITLBEEDIR=${BITLBEEDIR} \
-		BITLBEEUID=${BITLBEEUID} \
-		BITLBEEGID=${BITLBEEGID}
-
-SUB_FILES+=	pkg-install pkg-deinstall
-
 .include <bsd.port.options.mk>
 
 .if !defined(WITHOUT_MSN)
@@ -127,9 +118,6 @@
 	@${REINPLACE_CMD} -e "s:-iquote:-I:g" ${WRKSRC}/configure
 .endif
 
-pre-install:
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 	${MKDIR} ${PREFIX}/etc/bitlbee
 	${MKDIR} -m 0700 /var/db/bitlbee
Index: files/pkg-deinstall.in
===================================================================
RCS file: files/pkg-deinstall.in
diff -N files/pkg-deinstall.in
--- files/pkg-deinstall.in	15 Nov 2008 22:13:14 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD: ports/irc/bitlbee-otr/files/pkg-deinstall.in,v 1.2 2008/11/15 22:13:14 miwi Exp $
-#
-
-BITLBEEUSER=%%BITLBEEUSER%%
-BITLBEEGROUP=%%BITLBEEGROUP%%
-
-if [ "$2" = "POST-DEINSTALL" ]; then
-  if /usr/sbin/pw group show "${BITLBEEGROUP}" 2>&1 >/dev/null; then
-    echo "You should manually remove the \"${BITLBEEGROUP}\" group."
-  fi
-
-  if /usr/sbin/pw user show "${BITLBEEUSER}" 2>&1 >/dev/null; then
-    echo "You should manually remove the \"${BITLBEEUSER}\" user."
-  fi
-fi
Index: files/pkg-install.in
===================================================================
RCS file: files/pkg-install.in
diff -N files/pkg-install.in
--- files/pkg-install.in	15 Nov 2008 22:13:14 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD: ports/irc/bitlbee-otr/files/pkg-install.in,v 1.2 2008/11/15 22:13:14 miwi Exp $
-#
-
-BITLBEEDIR=%%BITLBEEDIR%%
-BITLBEEUSER=%%BITLBEEUSER%%
-BITLBEEGROUP=%%BITLBEEGROUP%%
-BITLBEEUID=%%BITLBEEUID%%
-BITLBEEGID=%%BITLBEEGID%%
-
-ask() {
-  local question default answer
-
-  question=$1
-  default=$2
-  if [ -z "${PACKAGE_BUILDING}" ]; then
-    read -p "${question} [${default}]? " answer
-  fi
-  if [ "x${answer}" = "x" ]; then
-    answer=${default}
-  fi
-  echo ${answer}
-}
-
-yesno() {
-  local default question answer
-
-  question=$1
-  default=$2
-  while :; do
-    answer=$(ask "${question}" "${default}")
-    case "${answer}" in
-      [Yy][Ee][Ss]|[Yy])
-        return 0
-        ;;
-      [Nn][Oo]|[Nn])
-        return 1
-        ;;
-    esac
-    echo "Please answer yes or no."
-   done
-}
-
-if [ "$2" = "PRE-INSTALL" ]; then
-  if /usr/sbin/pw group show "${BITLBEEGROUP}" 2>&1 >/dev/null; then
-    echo "You already have a \"${BITLBEEGROUP}\" group, so I will use it."
-  else
-    echo "You need a \"${BITLBEEGROUP}\" group."
-    if yesno "Would you like me to create it" "YES"; then
-      /usr/sbin/pw groupadd "${BITLBEEGROUP}" -g "${BITLBEEGID}" -h - || \
-        /usr/sbin/pw groupadd "${BITLBEEGROUP}" -h - || exit
-      echo "Done."
-    else
-      echo "Please create the \"${BITLBEEGROUP}\" group manually and try again."
-      exit 1
-    fi
-  fi
-
-  if /usr/sbin/pw user show "${BITLBEEUSER}" 2>&1 >/dev/null; then
-    echo "You already have a \"${BITLBEEUSER}\" user, so I will use it."
-  else
-    echo "You need a \"${BITLBEEUSER}\" user."
-    if yesno "Would you like me to create it" "YES"; then
-      /usr/sbin/pw useradd "${BITLBEEUSER}" -u "${BITLBEEUID}" -g "${BITLBEEGROUP}" -h - -d "${BITLBEEDIR}" \
-        -s /sbin/nologin -c "Bitlbee pseudo-user" || \
-        /usr/sbin/pw useradd "${BITLBEEUSER}" -g "${BITLBEEGROUP}" -h - -d "${BITLBEEDIR}" \
-        -s /sbin/nologin -c "Bitlbee pseudo-user" || exit
-    else
-      echo "Please create the \"${BITLBEEUSER}\" user manually and try again."
-      exit 1
-    fi
-  fi
-fi
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 13:30:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ashish

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ashish SHUKLA freebsd_committer freebsd_triage 2011-06-04 14:21:21 UTC
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Chris,

Thanks for your diff, but this port needs to be deleted as OTR changes are
merged upstream in irc/bitlbee port.

I'll delete it soon.

Thanks for reminding me.

=2D --=20
Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iQIcBAEBCgAGBQJN6jFUAAoJEMdGz6nnT6SwKl4P/AvsiJ+N/rIZxMhpxjWAA9GP
3aefs3vgblYe5enyw5gm+RBJKZBvsUEstbfI0BUupRhonD0dfNyphZZ/ETUYTx2W
y/on/Daryd9EDy9H1GJh8oa7K17QrIGnw9tV3ZsXXqeXpTIf9RHVwO0h+43G/PHt
OAL2gAgFaaleaQBgkCyjfEI5bzB9bClGuxfO7CNxMQo8tWnKipFD+/CiVpOgK/xa
RD4DxJRHfBEVJ8ZEQc7jLQ9qeZCUNsGg4VBBjPWiA8bWq+nE+Bi6TGRvVKsZOHIF
sIT4PlAh02NzBAT7L8eUMuG0sJbAsBwGGTWTS2prJ9AnaNF+y27OoB6GHJE8bLOe
nnpplxI0yrqtA3GvWn/wST4ckEICuh20bABZ3iVih0E0dNwsxXwTpNjdvk4VzvZt
/7uwh0BenhsjnkaTQX3kAc8e+XeSz1BaVxDmJBLq4CkyXVvbXNTcwMjLsIw2324b
F6RdFmenjOEb/4TWIgtxT+6qpkCcW5fqGpdhekrTvQlZgOutsnR7V8D7DE3Z5KbY
8M6PlXi6Oue9BPUDo4/4PUABixAXLZYynoMx0qkT8aapM3goLMTVzPaAKELpPjoR
QMHHQ2CmVcdFZN3wzvDb8WFaRlBOwY7xrJK53exYDohEqwRZbMZ4FS/hBa5Cik3J
TrDlsoNJaaAJ3uFXFf60
=3D1su1
=2D----END PGP SIGNATURE-----
Comment 3 Ashish SHUKLA freebsd_committer freebsd_triage 2011-06-13 02:31:54 UTC
State Changed
From-To: open->closed

Not applicable anymore, as port is deleted.