Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2013 20:45:03 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337802 - in head: . devel/kyua devel/kyua/files
Message-ID:  <201312272045.rBRKj3RE013030@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv (src committer)
Date: Fri Dec 27 20:45:03 2013
New Revision: 337802
URL: http://svnweb.freebsd.org/changeset/ports/337802

Log:
  Add a tests user to run unprivileged tests as; use it in devel/kyua.
  
  This new user carries a generic 'tests' name because, even though it is
  only used by devel/kyua at this point, it could conceivably be used by
  other tools.
  
  Bump PORTREVISION of devel/kyua to 1.
  
  PR:		ports/182891
  Approved by:	asomers (maintainer), bdrewery (ports), rpaulo (mentor)

Added:
  head/devel/kyua/files/kyua.conf.in   (contents, props changed)
Modified:
  head/UIDs
  head/devel/kyua/Makefile

Modified: head/UIDs
==============================================================================
--- head/UIDs	Fri Dec 27 20:41:58 2013	(r337801)
+++ head/UIDs	Fri Dec 27 20:45:03 2013	(r337802)
@@ -274,4 +274,5 @@ boinc:*:973:973::0:0:BOINC user:/var/db/
 radicale:*:974:974::0:0:Radicale daemon:/nonexistent:/usr/sbin/nologin
 unifi:*:975:975::0:0:Unifi Wireless Controller:/nonexistent:/usr/sbin/nologin
 minetest:*:976:976::0:0:& server:/nonexistent:/usr/sbin/nologin
+tests:*:977:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin
 nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin

Modified: head/devel/kyua/Makefile
==============================================================================
--- head/devel/kyua/Makefile	Fri Dec 27 20:41:58 2013	(r337801)
+++ head/devel/kyua/Makefile	Fri Dec 27 20:45:03 2013	(r337802)
@@ -3,6 +3,7 @@
 
 PORTNAME=	kyua
 PORTVERSION=	0.8
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 PROJECTHOST=	kyua
@@ -21,6 +22,11 @@ RUN_DEPENDS:=	${BUILD_DEPENDS}
 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+=	doc_DATA=
 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 @@ MAN1+=	kyua-report.1 kyua-test.1 kyua.1
 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>

Added: head/devel/kyua/files/kyua.conf.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kyua/files/kyua.conf.in	Fri Dec 27 20:45:03 2013	(r337802)
@@ -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'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312272045.rBRKj3RE013030>