ports/182891: Make devel/kyua create a tests user

Julio Merino julio at meroh.net
Fri Oct 11 01:50:01 UTC 2013


>Number:         182891
>Category:       ports
>Synopsis:       Make devel/kyua create a tests user
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 11 01:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        FreeBSD 10.0-ALPHA5 powerpc
>Organization:
>Environment:
System: FreeBSD mastodon.meroh.net 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #6 r256122M: Tue Oct 8 07:26:36 EDT 2013 jmmv at mastodon.meroh.net:/usr/obj/usr/src/sys/GENERIC64 powerpc


	
>Description:
	The base system currently has a _tests user but there is an ongoing
	discussion/change to delete it.

	The devel/kyua package should be changed to create a 'tests' user
	instead and to install a valid configuration file that sets the
	unprivileged_user configuration variable accordingly.
>How-To-Repeat:
	
>Fix:
	The following patch should do the trick:

Index: UIDs
===================================================================
--- UIDs	(revision 329785)
+++ UIDs	(working copy)
@@ -270,4 +270,5 @@
 plex:*:972:972::0:0:Plex Media Server:/nonexistent:/usr/sbin/nologin
 boinc:*:973:973::0:0:BOINC user:/var/db/boinc:/usr/sbin/nologin
 radicale:*:974:974::0:0:Radicale daemon:/nonexistent:/usr/sbin/nologin
+tests:*:975:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin
 nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin
Index: devel/kyua/Makefile
===================================================================
--- devel/kyua/Makefile	(revision 330037)
+++ devel/kyua/Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	kyua
 PORTVERSION=	0.6
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 PROJECTHOST=	kyua
@@ -21,6 +22,11 @@
 GNU_CONFIGURE=	yes
 USES=		pkgconfig
 
+TESTS_USER=	tests
+USERS=		${TESTS_USER}
+SUB_FILES=	kyua.conf
+SUB_LIST=	TESTS_USER=${TESTS_USER}
+
 OPTIONS_DEFINE=	DOCS EXAMPLES
 NO_STAGE=	yes
 .include <bsd.port.options.mk>
@@ -38,6 +44,8 @@
 MAKE_FLAGS+=	dist_examples_DATA=
 .endif
 PLIST_FILES=	bin/kyua
+PLIST_DIRS=	etc/kyua
+PLIST_FILES+=	etc/kyua/kyua.conf
 
 PORTDATA=	misc store examples
 PORTDOCS=	AUTHORS COPYING NEWS README
@@ -47,4 +55,8 @@
 MAN5=	kyua.conf.5 kyuafile.5
 MAN7=	kyua-build-root.7 kyua-test-filters.7
 
+post-install:
+	${MKDIR} ${PREFIX}/etc/kyua/
+	${INSTALL_DATA} ${WRKDIR}/kyua.conf ${PREFIX}/etc/kyua/
+
 .include <bsd.port.mk>
Index: devel/kyua/files/kyua.conf.in
===================================================================
--- devel/kyua/files/kyua.conf.in	(revision 0)
+++ devel/kyua/files/kyua.conf.in	(working copy)
@@ -0,0 +1,14 @@
+-- $FreeBSD$
+--
+-- System-wide configuration file for kyua(1).  See kyua.conf(5) for details
+-- on the syntax.
+--
+
+syntax(2)
+
+-- User to drop privileges to when invoking kyua(1) as root and a test case
+-- requests to be run with non-root permissions.
+unprivileged_user = '%%TESTS_USER%%'
+
+-- An example to set a configuration property specific to FreeBSD.
+--test_suites.FreeBSD.fstype = 'ffs'
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list