Wed Apr 22 15:13:44 2015 UTC ()
Fix paths in two missed installed scripts.

The intention of zmsystemctl.pl is to use bin/pkexec to allow the apache user
to start and stop the ZoneMinder services on operating systems using systemd
and newer versions of Polkit than Pkgsrc currently has.

If the base OS doesn't use systemd (E.g. anything not Linux), this file
shouldn't be used anyway.

In Pkgsrc we ignore the potentially absent pkexec interpreter in this file.
If the base OS uses systemd, it probably also has pkexec in its base
installation.

Bump PKGREVISION.


(dsainty)
diff -r1.17 -r1.18 pkgsrc/security/zoneminder/Makefile

cvs diff -r1.17 -r1.18 pkgsrc/security/zoneminder/Makefile (expand / switch to unified diff)

--- pkgsrc/security/zoneminder/Makefile 2015/04/10 02:58:49 1.17
+++ pkgsrc/security/zoneminder/Makefile 2015/04/22 15:13:43 1.18
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.17 2015/04/10 02:58:49 dsainty Exp $ 1# $NetBSD: Makefile,v 1.18 2015/04/22 15:13:43 dsainty Exp $
2 2
3PKGNAME= ${DISTNAME:S/ZoneMinder-/zoneminder-/} 3PKGNAME= ${DISTNAME:S/ZoneMinder-/zoneminder-/}
4DISTNAME= ZoneMinder-1.28.1 4DISTNAME= ZoneMinder-1.28.1
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= security 6CATEGORIES= security
7MASTER_SITES= ${MASTER_SITE_GITHUB:=ZoneMinder/} 7MASTER_SITES= ${MASTER_SITE_GITHUB:=ZoneMinder/}
8GITHUB_PROJECT= ZoneMinder 8GITHUB_PROJECT= ZoneMinder
9GITHUB_TYPE= tag 9GITHUB_TYPE= tag
10GITHUB_TAG= v${PKGVERSION_NOREV} 10GITHUB_TAG= v${PKGVERSION_NOREV}
11 11
12MAINTAINER= dsainty@NetBSD.org 12MAINTAINER= dsainty@NetBSD.org
13HOMEPAGE= http://www.zoneminder.com/ 13HOMEPAGE= http://www.zoneminder.com/
14COMMENT= Video camera security and surveillance solution 14COMMENT= Video camera security and surveillance solution
15LICENSE= gnu-gpl-v2 15LICENSE= gnu-gpl-v2
16 16
17# NetBSD tar: Invalid header, starting valid header search. 17# NetBSD tar: Invalid header, starting valid header search.
18EXTRACT_USING= gtar 18EXTRACT_USING= gtar
@@ -117,53 +117,78 @@ CONFIGURE_ARGS+= --with-webgroup=${APACH @@ -117,53 +117,78 @@ CONFIGURE_ARGS+= --with-webgroup=${APACH
117DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-[0-9]*:../../www/ap-php 117DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-[0-9]*:../../www/ap-php
118DEPENDS+= ${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql 118DEPENDS+= ${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql
119DEPENDS+= ${PHP_PKG_PREFIX}-pdo_mysql-[0-9]*:../../databases/php-pdo_mysql 119DEPENDS+= ${PHP_PKG_PREFIX}-pdo_mysql-[0-9]*:../../databases/php-pdo_mysql
120.endif 120.endif
121 121
122# This directory contains state, so use OWN_DIRS instead of MAKE_DIRS. 122# This directory contains state, so use OWN_DIRS instead of MAKE_DIRS.
123ZM_CACHE= ${VARBASE}/cache/zoneminder 123ZM_CACHE= ${VARBASE}/cache/zoneminder
124OWN_DIRS_PERMS+= ${ZM_CACHE} ${ROOT_USER} ${ROOT_GROUP} 755 124OWN_DIRS_PERMS+= ${ZM_CACHE} ${ROOT_USER} ${ROOT_GROUP} 755
125OWN_DIRS_PERMS+= ${ZM_CACHE}/temp ${ROOT_USER} ${APACHE_GROUP} 775 125OWN_DIRS_PERMS+= ${ZM_CACHE}/temp ${ROOT_USER} ${APACHE_GROUP} 775
126OWN_DIRS_PERMS+= ${ZM_CACHE}/images ${ROOT_USER} ${APACHE_GROUP} 775 126OWN_DIRS_PERMS+= ${ZM_CACHE}/images ${ROOT_USER} ${APACHE_GROUP} 775
127OWN_DIRS_PERMS+= ${ZM_CACHE}/events ${ROOT_USER} ${APACHE_GROUP} 775 127OWN_DIRS_PERMS+= ${ZM_CACHE}/events ${ROOT_USER} ${APACHE_GROUP} 775
128 128
129REPLACE_PERL+= scripts/zmaudit.pl.in 129REPLACE_PERL+= scripts/zmaudit.pl.in
 130REPLACE_PERL+= scripts/zmcamtool.pl.in
130REPLACE_PERL+= scripts/zmcontrol.pl.in 131REPLACE_PERL+= scripts/zmcontrol.pl.in
131REPLACE_PERL+= scripts/zmdc.pl.in 132REPLACE_PERL+= scripts/zmdc.pl.in
132REPLACE_PERL+= scripts/zmfilter.pl.in 133REPLACE_PERL+= scripts/zmfilter.pl.in
133REPLACE_PERL+= scripts/zmpkg.pl.in 134REPLACE_PERL+= scripts/zmpkg.pl.in
134REPLACE_PERL+= scripts/zmtrack.pl.in 135REPLACE_PERL+= scripts/zmtrack.pl.in
135REPLACE_PERL+= scripts/zmtrigger.pl.in 136REPLACE_PERL+= scripts/zmtrigger.pl.in
136REPLACE_PERL+= scripts/zmupdate.pl.in 137REPLACE_PERL+= scripts/zmupdate.pl.in
137REPLACE_PERL+= scripts/zmvideo.pl.in 138REPLACE_PERL+= scripts/zmvideo.pl.in
138REPLACE_PERL+= scripts/zmwatch.pl.in 139REPLACE_PERL+= scripts/zmwatch.pl.in
139REPLACE_PERL+= scripts/zmx10.pl.in 140REPLACE_PERL+= scripts/zmx10.pl.in
140 141
 142#
 143# The intention of zmsystemctl.pl is to use bin/pkexec to allow the
 144# apache user to start and stop the ZoneMinder services on operating
 145# systems using systemd and newer versions of Polkit than Pkgsrc
 146# currently has.
 147#
 148# If the base OS doesn't use systemd (E.g. anything not Linux), this
 149# file shouldn't be used anyway.
 150#
 151# In Pkgsrc we ignore the potentially absent pkexec interpreter in
 152# this file. If the base OS uses systemd, it probably also has pkexec
 153# in its base installation.
 154#
 155
 156CHECK_INTERPRETER_SKIP+= bin/zmsystemctl.pl
 157EXTRA_PERL+= scripts/zmsystemctl.pl.in
 158
 159SUBST_CLASSES+= systemd-perl
 160SUBST_MESSAGE.systemd-perl= Adjusting systemd pkexec perl.
 161SUBST_STAGE.systemd-perl= pre-configure
 162SUBST_FILES.systemd-perl= scripts/zmsystemctl.pl.in
 163SUBST_SED.systemd-perl= -e 's|/usr/bin/perl|${PERL5}|g'
 164
 165
141SUBST_CLASSES+= dbpaths-path 166SUBST_CLASSES+= dbpaths-path
142SUBST_MESSAGE.dbpaths-path= Adjusting default paths in configuration. 167SUBST_MESSAGE.dbpaths-path= Adjusting default paths in configuration.
143SUBST_STAGE.dbpaths-path= pre-configure 168SUBST_STAGE.dbpaths-path= pre-configure
144SUBST_FILES.dbpaths-path= db/zm_create.sql.in 169SUBST_FILES.dbpaths-path= db/zm_create.sql.in
145SUBST_SED.dbpaths-path= -e 's|/usr/local/bin/|${PREFIX}/bin/|g' 170SUBST_SED.dbpaths-path= -e 's|/usr/local/bin/|${PREFIX}/bin/|g'
146SUBST_SED.dbpaths-path+= -e 's|/usr/bin|${PREFIX}/bin|g' 171SUBST_SED.dbpaths-path+= -e 's|/usr/bin|${PREFIX}/bin|g'
147SUBST_SED.dbpaths-path+= -e 's|/cgi-bin/nph-zms|/zm/cgi-bin/nph-zms|g' 172SUBST_SED.dbpaths-path+= -e 's|/cgi-bin/nph-zms|/zm/cgi-bin/nph-zms|g'
148 173
149# 174#
150# Required to find the 'mysql' client executable, and may also use 'sudo' if 175# Required to find the 'mysql' client executable, and may also use 'sudo' if
151# installed. 176# installed.
152# 177#
153SUBST_CLASSES+= script-path 178SUBST_CLASSES+= script-path
154SUBST_MESSAGE.script-path= Adjusting paths in scripts. 179SUBST_MESSAGE.script-path= Adjusting paths in scripts.
155SUBST_STAGE.script-path= pre-configure 180SUBST_STAGE.script-path= pre-configure
156SUBST_FILES.script-path= ${REPLACE_PERL} 181SUBST_FILES.script-path= ${REPLACE_PERL} ${EXTRA_PERL}
157SUBST_SED.script-path= -e "s|^\\([\$$]ENV{PATH} *= *'\\).*';\$$|\\1${PREFIX}/bin:/bin:/usr/bin';|g" 182SUBST_SED.script-path= -e "s|^\\([\$$]ENV{PATH} *= *'\\).*';\$$|\\1${PREFIX}/bin:/bin:/usr/bin';|g"
158 183
159SUBST_CLASSES+= files 184SUBST_CLASSES+= files
160SUBST_STAGE.files= pre-configure 185SUBST_STAGE.files= pre-configure
161SUBST_FILES.files= zoneminder.conf 186SUBST_FILES.files= zoneminder.conf
162SUBST_SED.files= -e "s|@ZM_HTTPD_ROOT@|${PREFIX}/${ZM_HTTPD_ROOT}|g" 187SUBST_SED.files= -e "s|@ZM_HTTPD_ROOT@|${PREFIX}/${ZM_HTTPD_ROOT}|g"
163SUBST_SED.files+= -e "s|@ZM_HTTPD_CGIBIN@|${PREFIX}/${ZM_HTTPD_CGIBIN}|g" 188SUBST_SED.files+= -e "s|@ZM_HTTPD_CGIBIN@|${PREFIX}/${ZM_HTTPD_CGIBIN}|g"
164SUBST_MESSAGE.files= Fixing ZoneMinder configuration file for Apache. 189SUBST_MESSAGE.files= Fixing ZoneMinder configuration file for Apache.
165 190
166PLIST_VARS+= rcd 191PLIST_VARS+= rcd
167 192
168.if ${INIT_SYSTEM} == "rc.d" 193.if ${INIT_SYSTEM} == "rc.d"
169PLIST.rcd= yes 194PLIST.rcd= yes