1 |
commit: f8796ea819bb3bc16ea85ec84c43dd9f21010982 |
2 |
Author: MalakymR <MalakymR <AT> esdf <DOT> uk> |
3 |
AuthorDate: Wed Sep 6 14:06:22 2017 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 22 22:48:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8796ea8 |
7 |
|
8 |
www-misc/zoneminder: version bump to 1.30.4 |
9 |
|
10 |
* sample modified to work with new 2.4 apache syntax |
11 |
* README: import schema as root |
12 |
|
13 |
Closes: https://github.com/gentoo/gentoo/pull/5661 |
14 |
|
15 |
www-misc/zoneminder/Manifest | 1 + |
16 |
www-misc/zoneminder/files/10_zoneminder.conf | 20 ++- |
17 |
www-misc/zoneminder/files/README.gentoo | 12 +- |
18 |
.../files/zoneminder-1.30.4-path_zms.patch | 16 ++ |
19 |
www-misc/zoneminder/zoneminder-1.30.4.ebuild | 178 +++++++++++++++++++++ |
20 |
5 files changed, 210 insertions(+), 17 deletions(-) |
21 |
|
22 |
diff --git a/www-misc/zoneminder/Manifest b/www-misc/zoneminder/Manifest |
23 |
index e8f8359c774..7352a3c915e 100644 |
24 |
--- a/www-misc/zoneminder/Manifest |
25 |
+++ b/www-misc/zoneminder/Manifest |
26 |
@@ -2,3 +2,4 @@ DIST Crud-3.0.10.tar.gz 72960 BLAKE2B d7dd9d7f7d465dab910708ce34f1348983d14e80ac |
27 |
DIST Crud-3.1.0.tar.gz 72993 BLAKE2B d11938a0a667f6747bbe3609e51ccc5665b8d243e1787a5779319c679f1f20301afd6b0a14c5489976b9f66f57b5f18ef3ae0ee5a24e1368702cb43a5d564dd5 SHA512 7ec84afaa336b1bd582b7f39724f77081bdb3008947c4124ad96e4bc7755a03fbe31e01666d4d1939ebe17b342db37bf3766a42d88fbed0e99706807ff5b9d01 |
28 |
DIST zoneminder-1.30.0.tar.gz 9757409 BLAKE2B b67340b9cf8f0875a5ea5c4aef2c4a2770532987e8482952a3e81036006efe6f84dc142309ca2926c33d72fca9b157739daf15d9f6716e31b56a00fd704921e7 SHA512 cbff14447a568648a0475e878be5cd19cb694c65814fe33c20774752410e31f3f4ff9e5695667d4d50634b3193dc50aaca2d950efc151bbb968d3f9609d35db4 |
29 |
DIST zoneminder-1.30.2.tar.gz 9931753 BLAKE2B 3c48d5886053ed72788028b0c7a1f483ca2f659b6614bf0cbc1a5de7c9a7ed21aa730b614ba7400b96b057e076724364d24958e3ee5ff8e1134aeb9f142c38fd SHA512 98bd6d42ecc19bcd317a30e1a9c57bd6bd295593bcc6c12e2fbe1beddfe43fb0301e042323a88969fd5f7da1dc45a1c01324878837633e5a5ed4fa54bed8690a |
30 |
+DIST zoneminder-1.30.4.tar.gz 9937220 BLAKE2B feab8251b3f36f3fb91e1ea52a25b06e131a81c398f8c97a4ef304848bc65abaf5514bded1783c1ab6ec2287e279baa69d406e24191d59276315d7131af42104 SHA512 b55b2541bcaba08f89b95fdfb06b6cf3fc7b462b1f3fac2bb3fd6e8ee890735d4fac343c7625cf59b22fd25c19585900050cb5305b35aa8f6557421be09450b3 |
31 |
|
32 |
diff --git a/www-misc/zoneminder/files/10_zoneminder.conf b/www-misc/zoneminder/files/10_zoneminder.conf |
33 |
index 277d680d24b..eb9961d1322 100644 |
34 |
--- a/www-misc/zoneminder/files/10_zoneminder.conf |
35 |
+++ b/www-misc/zoneminder/files/10_zoneminder.conf |
36 |
@@ -1,18 +1,16 @@ |
37 |
-ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms" |
38 |
-ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms" |
39 |
+ScriptAlias /zm/cgi-bin "/usr/libexec/zoneminder/cgi-bin/" |
40 |
|
41 |
<Directory "/usr/libexec/zoneminder/cgi-bin"> |
42 |
AllowOverride All |
43 |
- Options ExecCGI |
44 |
- Order allow,deny |
45 |
- Allow from all |
46 |
-</Directory> |
47 |
+ Options +ExecCGI |
48 |
+ Require all granted |
49 |
+</Directory> |
50 |
|
51 |
-Alias /zoneminder "%ZM_WEBDIR%" |
52 |
+Alias /zm "%ZM_WEBDIR%" |
53 |
|
54 |
<Directory "%ZM_WEBDIR%"> |
55 |
- Options -Indexes MultiViews FollowSymLinks |
56 |
+ Options -Indexes +MultiViews +FollowSymLinks |
57 |
AllowOverride All |
58 |
- Order allow,deny |
59 |
- Allow from all |
60 |
-</Directory> |
61 |
+ Require all granted |
62 |
+</Directory> |
63 |
+ |
64 |
|
65 |
diff --git a/www-misc/zoneminder/files/README.gentoo b/www-misc/zoneminder/files/README.gentoo |
66 |
index 07995214d1c..8713fda6f78 100644 |
67 |
--- a/www-misc/zoneminder/files/README.gentoo |
68 |
+++ b/www-misc/zoneminder/files/README.gentoo |
69 |
@@ -3,12 +3,12 @@ |
70 |
(see https://wiki.gentoo.org/wiki/MySQL/Startup_Guide). |
71 |
E.g., when logged into mysql as root, |
72 |
mysql> CREATE DATABASE \`zm\`; |
73 |
- mysql> GRANT ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'topsecretpassword'; |
74 |
+ mysql> grant select,insert,alter,update,lock tables,delete on zm.* to 'zmuser'@localhost identified by 'zmpass'; |
75 |
+ mysql> flush privileges; |
76 |
Once you completed that you should execute the following: |
77 |
- cd /usr/share/zoneminder |
78 |
- mysql -u zmuser -p < db/zm_create.sql |
79 |
+ mysql -p < /usr/share/zoneminder/db/zm_create.sql |
80 |
|
81 |
-2. Set your database settings in /etc/zm.conf, including above topsecretpassword |
82 |
+2. Set your database settings in /etc/zm.conf, including above zmpass |
83 |
|
84 |
3. Configure apache to use zoneminder, see /usr/share/doc/zoneminder*/10_zoneminder.conf |
85 |
for an example configuration snippet. |
86 |
@@ -23,5 +23,5 @@ |
87 |
|
88 |
6. Finally point your browser to http://your.webserver/zm |
89 |
|
90 |
-If you are upgrading, you will need to run the zmupdate.pl script: |
91 |
- /usr/bin/zmupdate.pl --version=oldversionnumber [--user=zmuser --pass=topsecretpassword] |
92 |
+If you are upgrading, you will need to run the zmupdate.pl script: |
93 |
+ /usr/bin/zmupdate.pl |
94 |
|
95 |
diff --git a/www-misc/zoneminder/files/zoneminder-1.30.4-path_zms.patch b/www-misc/zoneminder/files/zoneminder-1.30.4-path_zms.patch |
96 |
new file mode 100644 |
97 |
index 00000000000..54772a14769 |
98 |
--- /dev/null |
99 |
+++ b/www-misc/zoneminder/files/zoneminder-1.30.4-path_zms.patch |
100 |
@@ -0,0 +1,16 @@ |
101 |
+duplicate the work of utils/zmeditconfigdata.sh |
102 |
+https://github.com/ZoneMinder/ZoneMinder/commit/5a59a0375dd19f8e5af9b2acadec9f2bb16ee56c |
103 |
+ |
104 |
+diff -ruN ZoneMinder-1.30.4.orig/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in ZoneMinder-1.30.4/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in |
105 |
+--- ZoneMinder-1.30.4.orig/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2017-08-30 14:55:31.894727925 +0100 |
106 |
++++ ZoneMinder-1.30.4/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2017-08-30 14:57:05.050731752 +0100 |
107 |
+@@ -507,7 +507,7 @@ |
108 |
+ }, |
109 |
+ { |
110 |
+ name => "ZM_PATH_ZMS", |
111 |
+- default => "/cgi-bin/nph-zms", |
112 |
++ default => "/zm/cgi-bin/nph-zms", |
113 |
+ description => "Web path to zms streaming server", |
114 |
+ help => qqq(" |
115 |
+ The ZoneMinder streaming server is required to send streamed |
116 |
+ |
117 |
|
118 |
diff --git a/www-misc/zoneminder/zoneminder-1.30.4.ebuild b/www-misc/zoneminder/zoneminder-1.30.4.ebuild |
119 |
new file mode 100644 |
120 |
index 00000000000..aa27e4b053e |
121 |
--- /dev/null |
122 |
+++ b/www-misc/zoneminder/zoneminder-1.30.4.ebuild |
123 |
@@ -0,0 +1,178 @@ |
124 |
+# Copyright 1999-2017 Gentoo Foundation |
125 |
+# Distributed under the terms of the GNU General Public License v2 |
126 |
+ |
127 |
+# TO DO: |
128 |
+# * dependencies of unknown status: |
129 |
+# dev-perl/Device-SerialPort |
130 |
+# dev-perl/MIME-Lite |
131 |
+# dev-perl/MIME-tools |
132 |
+# dev-perl/PHP-Serialization |
133 |
+# virtual/perl-Archive-Tar |
134 |
+# virtual/perl-libnet |
135 |
+# virtual/perl-Module-Load |
136 |
+ |
137 |
+EAPI=6 |
138 |
+ |
139 |
+inherit versionator perl-functions readme.gentoo-r1 cmake-utils depend.apache flag-o-matic systemd |
140 |
+ |
141 |
+MY_PN="ZoneMinder" |
142 |
+ |
143 |
+MY_CRUD_VERSION="3.1.0" |
144 |
+ |
145 |
+DESCRIPTION="Capture, analyse, record and monitor any cameras attached to your system" |
146 |
+HOMEPAGE="http://www.zoneminder.com/" |
147 |
+SRC_URI=" |
148 |
+ https://github.com/${MY_PN}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
149 |
+ https://github.com/FriendsOfCake/crud/archive/v${MY_CRUD_VERSION}.tar.gz -> Crud-${MY_CRUD_VERSION}.tar.gz |
150 |
+" |
151 |
+ |
152 |
+LICENSE="GPL-2" |
153 |
+KEYWORDS="~amd64" |
154 |
+IUSE="curl ffmpeg gcrypt gnutls +mmap +ssl libressl vlc" |
155 |
+SLOT="0" |
156 |
+ |
157 |
+REQUIRED_USE=" |
158 |
+ || ( ssl gnutls ) |
159 |
+" |
160 |
+ |
161 |
+DEPEND=" |
162 |
+ app-eselect/eselect-php[apache2] |
163 |
+ dev-lang/perl:= |
164 |
+ dev-lang/php:*[apache2,cgi,curl,gd,inifile,pdo,mysql,mysqli,sockets] |
165 |
+ dev-libs/libpcre |
166 |
+ dev-perl/Archive-Zip |
167 |
+ dev-perl/Class-Std-Fast |
168 |
+ dev-perl/Data-Dump |
169 |
+ dev-perl/Date-Manip |
170 |
+ dev-perl/Data-UUID |
171 |
+ dev-perl/DBD-mysql |
172 |
+ dev-perl/DBI |
173 |
+ dev-perl/IO-Socket-Multicast |
174 |
+ dev-perl/SOAP-WSDL |
175 |
+ dev-perl/Sys-CPU |
176 |
+ dev-perl/Sys-MemInfo |
177 |
+ dev-perl/URI-Encode |
178 |
+ dev-perl/libwww-perl |
179 |
+ dev-php/pecl-apcu:* |
180 |
+ sys-auth/polkit |
181 |
+ sys-libs/zlib |
182 |
+ virtual/ffmpeg |
183 |
+ virtual/httpd-php:* |
184 |
+ virtual/jpeg:0 |
185 |
+ virtual/mysql |
186 |
+ virtual/perl-ExtUtils-MakeMaker |
187 |
+ virtual/perl-Getopt-Long |
188 |
+ virtual/perl-Sys-Syslog |
189 |
+ virtual/perl-Time-HiRes |
190 |
+ www-servers/apache |
191 |
+ curl? ( net-misc/curl ) |
192 |
+ gcrypt? ( dev-libs/libgcrypt:0= ) |
193 |
+ gnutls? ( net-libs/gnutls ) |
194 |
+ mmap? ( dev-perl/Sys-Mmap ) |
195 |
+ ssl? ( |
196 |
+ !libressl? ( dev-libs/openssl:0= ) |
197 |
+ libressl? ( dev-libs/libressl:0= ) |
198 |
+ ) |
199 |
+ vlc? ( media-video/vlc[live] ) |
200 |
+" |
201 |
+RDEPEND="${DEPEND}" |
202 |
+ |
203 |
+# we cannot use need_httpd_cgi here, since we need to setup permissions for the |
204 |
+# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here. |
205 |
+need_apache |
206 |
+ |
207 |
+S=${WORKDIR}/${MY_PN}-${PV} |
208 |
+ |
209 |
+PATCHES=( |
210 |
+ "${FILESDIR}/${PN}-1.30.2"-diskspace.patch |
211 |
+ "${FILESDIR}/${PN}-1.30.4"-path_zms.patch |
212 |
+) |
213 |
+ |
214 |
+MY_ZM_WEBDIR=/usr/share/zoneminder/www |
215 |
+ |
216 |
+src_prepare() { |
217 |
+ cmake-utils_src_prepare |
218 |
+ |
219 |
+ rmdir "${S}/web/api/app/Plugin/Crud" || die |
220 |
+ mv "${WORKDIR}/crud-${MY_CRUD_VERSION}" "${S}/web/api/app/Plugin/Crud" || die |
221 |
+} |
222 |
+ |
223 |
+src_configure() { |
224 |
+ append-cxxflags -D__STDC_CONSTANT_MACROS |
225 |
+ perl_set_version |
226 |
+ |
227 |
+ mycmakeargs=( |
228 |
+ -DZM_PERL_SUBPREFIX=${VENDOR_LIB#/usr} |
229 |
+ -DZM_TMPDIR=/var/tmp/zm |
230 |
+ -DZM_SOCKDIR=/var/run/zm |
231 |
+ -DZM_WEB_USER=apache |
232 |
+ -DZM_WEB_GROUP=apache |
233 |
+ -DZM_WEBDIR=${MY_ZM_WEBDIR} |
234 |
+ -DZM_NO_MMAP="$(usex mmap OFF ON)" |
235 |
+ -DZM_NO_X10=OFF |
236 |
+ -DZM_NO_FFMPEG="$(usex ffmpeg OFF ON)" |
237 |
+ -DZM_NO_CURL="$(usex curl OFF ON)" |
238 |
+ -DZM_NO_LIBVLC="$(usex vlc OFF ON)" |
239 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" |
240 |
+ -DHAVE_GNUTLS="$(usex gnutls ON OFF)" |
241 |
+ -DHAVE_GCRYPT="$(usex gcrypt ON OFF)" |
242 |
+ ) |
243 |
+ |
244 |
+ cmake-utils_src_configure |
245 |
+ |
246 |
+} |
247 |
+ |
248 |
+src_install() { |
249 |
+ cmake-utils_src_install |
250 |
+ |
251 |
+ # the log directory |
252 |
+ keepdir /var/log/zm |
253 |
+ fowners apache:apache /var/log/zm |
254 |
+ |
255 |
+ # the logrotate script |
256 |
+ insinto /etc/logrotate.d |
257 |
+ newins distros/ubuntu1204/zoneminder.logrotate zoneminder |
258 |
+ |
259 |
+ # now we duplicate the work of zmlinkcontent.sh |
260 |
+ keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp |
261 |
+ fperms -R 0775 /var/lib/zoneminder |
262 |
+ fowners -R apache:apache /var/lib/zoneminder |
263 |
+ dosym /var/lib/zoneminder/images ${MY_ZM_WEBDIR}/images |
264 |
+ dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events |
265 |
+ dosym /var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp |
266 |
+ |
267 |
+ # bug 523058 |
268 |
+ keepdir ${MY_ZM_WEBDIR}/temp |
269 |
+ fowners -R apache:apache ${MY_ZM_WEBDIR}/temp |
270 |
+ |
271 |
+ # the configuration file |
272 |
+ fperms 0640 /etc/zm.conf |
273 |
+ fowners root:apache /etc/zm.conf |
274 |
+ |
275 |
+ # init scripts etc |
276 |
+ newinitd "${FILESDIR}"/init.d zoneminder |
277 |
+ newconfd "${FILESDIR}"/conf.d zoneminder |
278 |
+ |
279 |
+ # systemd unit file |
280 |
+ systemd_dounit "${FILESDIR}"/zoneminder.service |
281 |
+ |
282 |
+ cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die |
283 |
+ sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die |
284 |
+ |
285 |
+ dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO "${T}"/10_zoneminder.conf |
286 |
+ |
287 |
+ perl_delete_packlist |
288 |
+ |
289 |
+ readme.gentoo_create_doc |
290 |
+} |
291 |
+ |
292 |
+pkg_postinst() { |
293 |
+ readme.gentoo_print_elog |
294 |
+ |
295 |
+ local v |
296 |
+ for v in ${REPLACING_VERSIONS}; do |
297 |
+ if ! version_is_at_least ${PV} ${v}; then |
298 |
+ elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." |
299 |
+ fi |
300 |
+ done |
301 |
+} |