Subject: Re: user/group news?
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 05/22/2004 12:09:45
--GV0iVqYguTV4Q9ER
Content-Type: multipart/mixed; boundary="idY8LE8SD6/8DnRI"
Content-Disposition: inline


--idY8LE8SD6/8DnRI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Georg Schwarz <geos@epost.de> wrote:
> pkgsrc/news/inn seems to have a user and group "news" hardcoded. Would
> it make sense to have a pkgsrc variable for that instead?

Try the patch attached and let me know if that's what you want.

-Jan

--=20
"Life," said Marvin dolefully, "loathe it or ignore it, you can't like it."

--idY8LE8SD6/8DnRI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Content-Transfer-Encoding: quoted-printable

? news/inn/README.html
Index: mk/bsd.pkg.defaults.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.defaults.mk,v
retrieving revision 1.239
diff -b -u -r1.239 bsd.pkg.defaults.mk
--- mk/bsd.pkg.defaults.mk	15 May 2004 09:44:00 -0000	1.239
+++ mk/bsd.pkg.defaults.mk	22 May 2004 16:04:21 -0000
@@ -1060,6 +1060,16 @@
 # Possible: any path you like
 # Default: /var/news
=20
+INN_USER?=3D	news
+# Used by inn to specify the username=20
+# Possible: any valid username=20
+# Default: news
+
+INN_GROUP?=3D	news
+# Used by inn to specify the groupname
+# Possible: any valid groupname
+# Default: news
+
 IRCD_HYBRID_SMALL_NET?=3D		YES
 # Used by ircd-hybrid to tune various ircd paramaters when running
 # small IRC networks so the daemon does not use much resources.
Index: news/inn/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/news/inn/Makefile,v
retrieving revision 1.54
diff -b -u -r1.54 Makefile
--- news/inn/Makefile	11 Apr 2004 17:33:47 -0000	1.54
+++ news/inn/Makefile	22 May 2004 16:04:21 -0000
@@ -37,8 +37,8 @@
 			--with-spool-dir=3D${INN_SPOOL}
 CONFIGURE_ENV+=3D		_PATH_PERL=3D${PERL5}
=20
-PKG_USERS=3D		news:news::Internet\\ News:${INN_DATA_DIR}:${SH}
-PKG_GROUPS=3D		news
+PKG_USERS=3D		${INN_USER}:${INN_GROUP}::Internet\\ News:${INN_DATA_DIR}:${=
SH}
+PKG_GROUPS=3D		${INN_GROUP}
=20
 PKG_SYSCONFDIR.inn=3D	${INN_DATA_DIR}/etc
 EXAMPLEDIR=3D		${PREFIX}/share/examples/inn
@@ -47,12 +47,12 @@
 			outgoing uniover innfeed
=20
 OWN_DIRS=3D		${PREFIX}/etc/nntp
-OWN_DIRS_PERMS=3D		${INN_DATA_DIR}			news news 0775
+OWN_DIRS_PERMS=3D		${INN_DATA_DIR}			${INN_USER} ${INN_GROUP} 0775
 .for DIR in ${INN_DATADIRS}
-MAKE_DIRS_PERMS+=3D	${INN_DATA_DIR}/${DIR}		news news 0775
+MAKE_DIRS_PERMS+=3D	${INN_DATA_DIR}/${DIR}		${INN_USER} ${INN_GROUP} 0775
 .endfor
 .for DIR in ${INN_SPOOLDIRS}
-MAKE_DIRS_PERMS+=3D	${INN_DATA_DIR}/spool/${DIR}	news news 0775
+MAKE_DIRS_PERMS+=3D	${INN_DATA_DIR}/spool/${DIR}	${INN_USER} ${INN_GROUP} =
0775
 .endfor
=20
 CFILES=3D			actsync.cfg actsync.ign buffindexed.conf \
@@ -64,7 +64,7 @@
 			radius.conf readers.conf sasl.conf storage.conf
 .for FILE in ${CFILES}
 CONF_FILES_PERMS+=3D	${EXAMPLEDIR}/${FILE} ${PKG_SYSCONFDIR}/${FILE} \
-			news news 0664
+			${INN_USER} ${INN_GROUP} 0664
 .endfor
=20
 RCD_SCRIPTS=3D		innd

--idY8LE8SD6/8DnRI--

--GV0iVqYguTV4Q9ER
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAr3tJfFtkr68iakwRAibVAKDNKH/MNCB3Ax59+tl+ETMdiM5G4gCgxo5w
c557rdDy7MUqy/G/JrOVnS0=
=NTRC
-----END PGP SIGNATURE-----

--GV0iVqYguTV4Q9ER--