aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2013-12-28 04:45:03 +0800
committerjmmv <jmmv@FreeBSD.org>2013-12-28 04:45:03 +0800
commitd729aa306c23df35484452362c65c2b7a5948a23 (patch)
tree196344d26d885cd04eda70a28f85864be6952dbe /devel
parentbf219a9bfb064d58508ec5a8219e2b67fe2137d7 (diff)
downloadfreebsd-ports-gnome-d729aa306c23df35484452362c65c2b7a5948a23.tar.gz
freebsd-ports-gnome-d729aa306c23df35484452362c65c2b7a5948a23.tar.zst
freebsd-ports-gnome-d729aa306c23df35484452362c65c2b7a5948a23.zip
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)
Diffstat (limited to 'devel')
-rw-r--r--devel/kyua/Makefile12
-rw-r--r--devel/kyua/files/kyua.conf.in14
2 files changed, 26 insertions, 0 deletions
diff --git a/devel/kyua/Makefile b/devel/kyua/Makefile
index dba138ccba45..9a7dd5d6c138 100644
--- a/devel/kyua/Makefile
+++ b/devel/kyua/Makefile
@@ -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>
diff --git a/devel/kyua/files/kyua.conf.in b/devel/kyua/files/kyua.conf.in
new file mode 100644
index 000000000000..e09018346c54
--- /dev/null
+++ b/devel/kyua/files/kyua.conf.in
@@ -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'