summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-10-22 23:03:46 -0200
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-10-22 23:03:46 -0200
commit93643331275b8ef2c4070077f260a52431133713 (patch)
tree0bd0a600fdbb3aeb6954c05bed9103101ad9d4b0
parent10970cba29cb1f265bcd7045a693e50ac6bf24b0 (diff)
parent72780d31ec566cbd62df57a6ba4d8fc7bc90bf56 (diff)
downloadabslibre-93643331275b8ef2c4070077f260a52431133713.tar.gz
abslibre-93643331275b8ef2c4070077f260a52431133713.tar.bz2
abslibre-93643331275b8ef2c4070077f260a52431133713.zip
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
-rw-r--r--libre/parabolaweb-utils/PKGBUILD12
-rw-r--r--libre/parabolaweb-utils/parabolaweb-fcgi4
-rw-r--r--libre/parabolaweb-utils/parabolaweb-update7
-rw-r--r--libre/parabolaweb-utils/parabolaweb.conf1
-rw-r--r--libre/parabolaweb-utils/parabolaweb.rc1
-rw-r--r--libre/parabolaweb-utils/parabolaweb.service5
-rw-r--r--pcr/etckeeper/.gitignore (renamed from ~lukeshu/etckeeper/.gitignore)0
-rw-r--r--pcr/etckeeper/PKGBUILD (renamed from ~lukeshu/etckeeper/PKGBUILD)22
-rw-r--r--pcr/etckeeper/etckeeper-archlinux.conf (renamed from ~lukeshu/etckeeper/etckeeper-archlinux.conf)0
-rw-r--r--pcr/etckeeper/etckeeper-pacman.patch9
-rw-r--r--pcr/zoneminder/Controls_Orbit.sql3
-rw-r--r--pcr/zoneminder/PKGBUILD99
-rw-r--r--pcr/zoneminder/arm-context.patch18
-rwxr-xr-xpcr/zoneminder/customdb31
-rw-r--r--pcr/zoneminder/httpd-zoneminder.conf (renamed from pcr/zoneminder/httpd-zm.conf)0
-rw-r--r--pcr/zoneminder/patch-ffmpeg-configure.patch26
-rw-r--r--pcr/zoneminder/patch-libavcodec-detection.patch11
-rw-r--r--pcr/zoneminder/zm.service9
-rwxr-xr-xpcr/zoneminder/zmeventbackup48
-rw-r--r--pcr/zoneminder/zminit.arch143
-rw-r--r--pcr/zoneminder/zoneminder (renamed from pcr/zoneminder/zm.rc.d)0
-rw-r--r--pcr/zoneminder/zoneminder-1.25.0-kernel35.patch21
-rw-r--r--pcr/zoneminder/zoneminder.install120
-rw-r--r--pcr/zoneminder/zoneminder.service1
24 files changed, 201 insertions, 390 deletions
diff --git a/libre/parabolaweb-utils/PKGBUILD b/libre/parabolaweb-utils/PKGBUILD
index cfb39d703..9c6da333a 100644
--- a/libre/parabolaweb-utils/PKGBUILD
+++ b/libre/parabolaweb-utils/PKGBUILD
@@ -8,12 +8,18 @@
pkgname=parabolaweb-utils
pkgver=`_get_pkgver`
-pkgrel=2
+pkgrel=3
pkgdesc="Utils for the Parabola website"
arch=('any')
url="https://projects.parabolagnulinux.org/parabolaweb.git/"
license=('GPL2')
-depends=('python2' 'python2-flup' 'git' 'libretools' `_get_depends`)
+depends=(
+ 'python2' # duh
+ 'python2-flup' # for fcgi
+ 'postgresql' # for database
+ 'git' # used in parabolaweb-update
+ 'libretools' # used in parabolaweb-update
+ `_get_depends`)
backup=('etc/conf.d/parabolaweb')
export pkgver
@@ -42,5 +48,5 @@ md5sums=('SKIP'
'dd05d6a4ea7cff7fdd789f59aeb9059a'
'520e20b8bbca64042b3afa76b0bec55f'
'1bce8fb832ad9e61cf8b96426ce843b5'
- 'c7e292d2d1c3e846e5cfcd7283de0fe4'
+ '80ee438224b4d67677d0980d5bc57005'
'fb291168d3f57a85f82216c4e74c9ccf')
diff --git a/libre/parabolaweb-utils/parabolaweb-fcgi b/libre/parabolaweb-utils/parabolaweb-fcgi
index 3dec02e10..e42aec3cd 100644
--- a/libre/parabolaweb-utils/parabolaweb-fcgi
+++ b/libre/parabolaweb-utils/parabolaweb-fcgi
@@ -3,9 +3,9 @@ set -e
. /etc/conf.d/parabolaweb
-[[ -e /srv/http/web/manage.py ]]
+[[ -e ${WEBDIR}/manage.py ]]
-sudo -u "${WEBUSER:-$USER}" python2 /srv/http/web/manage.py runfcgi \
+sudo -u "${WEBUSER:-$USER}" python2 "${WEBDIR}/manage.py" runfcgi \
host=${HOST} \
port=${PORT} \
--settings=settings \
diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update
index e4d65c2d9..b8ac5bf5e 100644
--- a/libre/parabolaweb-utils/parabolaweb-update
+++ b/libre/parabolaweb-utils/parabolaweb-update
@@ -1,8 +1,11 @@
#!/bin/bash
set -e
-_install_dir=/srv/http
-_gitname=web
+. /etc/conf.d/parabolaweb
+
+
+_install_dir=${WEBDIR%/*}
+_gitname=${WEBDIR##*/}
_gitroot=git://parabolagnulinux.org/parabolaweb.git
_gitbranch=master
diff --git a/libre/parabolaweb-utils/parabolaweb.conf b/libre/parabolaweb-utils/parabolaweb.conf
index c53b19cb8..467e62e2c 100644
--- a/libre/parabolaweb-utils/parabolaweb.conf
+++ b/libre/parabolaweb-utils/parabolaweb.conf
@@ -1,3 +1,4 @@
HOST=127.0.0.1
PORT=8090 # 80 is nginx
+WEBDIR=/srv/http/web
WEBUSER=nobody
diff --git a/libre/parabolaweb-utils/parabolaweb.rc b/libre/parabolaweb-utils/parabolaweb.rc
index 087a3fcb0..5e310b01d 100644
--- a/libre/parabolaweb-utils/parabolaweb.rc
+++ b/libre/parabolaweb-utils/parabolaweb.rc
@@ -8,6 +8,7 @@ PIDFILE=/run/web/parabolaweb.pid
case $1 in
start)
stat_busy "Starting ParabolaWeb"
+ install -dm777 ${PIDFILE%/*}
if parabolaweb-fcgi pidfile=${PIDFILE}; then
add_daemon parabolaweb
stat_done
diff --git a/libre/parabolaweb-utils/parabolaweb.service b/libre/parabolaweb-utils/parabolaweb.service
index d145e53d8..a59d58512 100644
--- a/libre/parabolaweb-utils/parabolaweb.service
+++ b/libre/parabolaweb-utils/parabolaweb.service
@@ -1,10 +1,13 @@
[Unit]
+Requires=postgresql.service
+After=postgresql.service
Description=ParabolaWeb
[Service]
Type=forking
-ExecStart=/usr/sbin/parabolaweb-fcgi pidfile=/run/web/parabolaweb.pid
PIDFile=/run/web/parabolaweb.pid
+ExecStartPre=/usr/bin/install -dm777 /run/web
+ExecStart=/usr/sbin/parabolaweb-fcgi pidfile=/run/web/parabolaweb.pid
[Install]
WantedBy=multi-user.target
diff --git a/~lukeshu/etckeeper/.gitignore b/pcr/etckeeper/.gitignore
index b4a9ca909..b4a9ca909 100644
--- a/~lukeshu/etckeeper/.gitignore
+++ b/pcr/etckeeper/.gitignore
diff --git a/~lukeshu/etckeeper/PKGBUILD b/pcr/etckeeper/PKGBUILD
index a359500b5..163c320db 100644
--- a/~lukeshu/etckeeper/PKGBUILD
+++ b/pcr/etckeeper/PKGBUILD
@@ -1,26 +1,31 @@
-#Contributor: Danie Roux <accounts@danieroux.com>
-#Maintainer: Buce <dmbuce@gmail.com>
+# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (AUR): Buce <dmbuce@gmail.com>
+# Contributor: Danie Roux <accounts@danieroux.com>
-# This requires lukeshu's modified makepkg to build
+# This requires makepkg newer than 4.0.3, which at this time means from git
pkgname=etckeeper
-pkgver=0.63
-pkgrel=2.3
+pkgver=0.64
pkgdesc="collection of tools to let /etc be stored in a git, hg, bzr or darcs repository."
-arch=('any')
-backup=('etc/etckeeper/etckeeper.conf')
url="http://kitenet.net/~joey/code/etckeeper/"
license=('GPL2')
-provides=('etckeeper')
+
+pkgrel=1
+arch=('any')
depends=('inetutils' 'python2')
makedepends=('bzr') # bzr must be there at compile time to have bzr support
optdepends=('git' 'hg' 'bzr' 'darcs')
+backup=(etc/etckeeper/etckeeper.conf)
source=("etckeeper-$pkgver::git://git.kitenet.net/etckeeper#tag=${pkgver}"
+ etckeeper-pacman.patch
etckeeper-archlinux.conf)
build() {
cd "$srcdir/etckeeper-$pkgver"
+ # add pacman support to list-to `list-installed`
+ patch -p0 -i "$srcdir/etckeeper-pacman.patch"
+
# use python2
sed -i 's@^#!/usr/bin/python$@&2@' etckeeper-bzr/__init__.py
@@ -34,4 +39,5 @@ package() {
}
md5sums=('SKIP'
+ 'f1f00bf9331d1ef7f29b0ac29cdfcbda'
'99d8d2838f49fa0f2f21c9e37948100d')
diff --git a/~lukeshu/etckeeper/etckeeper-archlinux.conf b/pcr/etckeeper/etckeeper-archlinux.conf
index 83e2c577d..83e2c577d 100644
--- a/~lukeshu/etckeeper/etckeeper-archlinux.conf
+++ b/pcr/etckeeper/etckeeper-archlinux.conf
diff --git a/pcr/etckeeper/etckeeper-pacman.patch b/pcr/etckeeper/etckeeper-pacman.patch
new file mode 100644
index 000000000..1fb4acb62
--- /dev/null
+++ b/pcr/etckeeper/etckeeper-pacman.patch
@@ -0,0 +1,9 @@
+--- list-installed.d/50list-installed.orig 2012-10-21 23:45:30.000000000 -0400
++++ list-installed.d/50list-installed 2012-10-21 23:45:39.000000000 -0400
+@@ -7,4 +7,6 @@
+ egrep '(ok installed|ok config-files)' | cut -f2,3
+ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then
+ rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort
++elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacman ]; then
++ { pacman -Qd|sed 's/.*/& (dep)/'; pacman -Qe|sed 's/.*/& (explicit)/'; } |sort
+ fi
diff --git a/pcr/zoneminder/Controls_Orbit.sql b/pcr/zoneminder/Controls_Orbit.sql
deleted file mode 100644
index 23224e4aa..000000000
--- a/pcr/zoneminder/Controls_Orbit.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-
-INSERT INTO `Controls` VALUES (7,'Orbit','Remote','mjpgStreamer',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,-7000,7000,200,200,1,100,100,0,0,1,-2000,2000,10,100,1,200,200,0,0,0,0);
-
diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD
index 64c3f94b0..e5e54537b 100644
--- a/pcr/zoneminder/PKGBUILD
+++ b/pcr/zoneminder/PKGBUILD
@@ -8,39 +8,75 @@
pkgname=zoneminder
pkgver=1.25.0
-pkgrel=19
+pkgrel=20
pkgdesc='Capture, analyse, record and monitor video security cameras'
-arch=(i686 x86_64 mips64el)
-backup=(etc/zm.conf etc/httpd/conf/extra/httpd-zm.conf)
-url=http://www.$pkgname.com
-license=(GPL)
+arch=(
+ i686
+ x86_64
+ mips64el
+)
+backup=(
+ etc/zm.conf
+)
+url="http://www.$pkgname.com"
+license=(
+ GPL
+)
depends=(
- apache cambozola ffmpeg-static gnutls mysql perl-archive-zip perl-date-manip
- perl-dbd-mysql perl-dbi perl-expect perl-libwww perl-mime-lite
- perl-mime-tools perl-php-serialization perl-net-sftp-foreign perl-sys-mmap
- perl-time-modules perl-x10 php php-apache php-gd php-mcrypt
+ apache
+ cambozola
+ ffmpeg-static
+ gnutls
+ mysql
+ perl-archive-zip
+ perl-date-manip
+ perl-dbd-mysql
+ perl-dbi
+ perl-expect
+ perl-libwww
+ perl-mime-lite
+ perl-mime-tools
+ perl-php-serialization
+ perl-net-sftp-foreign
+ perl-sys-mmap
+ perl-time-modules
+ perl-x10
+ php
+ php-apache
+ php-gd
+ php-mcrypt
+)
+makedepends=(
+ netpbm
+)
+optdepends=(
+ netpbm
)
-makedepends=(netpbm)
install=$pkgname.install
source=(
http://www.$pkgname.com/downloads/ZoneMinder-$pkgver.tar.gz
- httpd-zm.conf
- zm.rc.d
+ httpd-$pkgname.conf
+ $pkgname
$pkgname.service
patch-ffmpeg-0.11.patch
)
-md5sums=(
- eaefa14befd482154970541252aa1a39
- 72380d8793a784ec24cb6809aea4a739
- 034b61cda8849fc3001849e76ef26041
- 7487cc72ead82aea0bc78f2e4106ae1a
- 81c8be870260142e2633eedf73c72040
+sha512sums=(
+ 3e18993b0539729491052c97d8c94227ccc089eb40277c2f07682f30049033303c7cfe9734fdac6d33ae67df29c76eb72bf7fbb5dae8227e8831fa603b61c375
+ 4ce0d8eba9d006d258f5b8a83920fc17f1f602b96518d37b7a47cd9b6eb84ef2587641a6ba839a469c3f0e33b46475866187279ae3f8be0d4054b074ee5d6b08
+ ab4e1d5ddaf4d9cd53d6ca59d7965902afd6a2dc830fbbafa270736c52c2b3563075fee860bb0276466f96e9dbfb71b259ac45a4ae2e4ead8eaec154a0159eb0
+ cfb0eb87a989236c72741a496ddc6a73aa2696e5beaaca4836d3c231ddb24c7ef5e9f65e7afa49674f2115cbfa4a07c75486e1947ce294c816ddbb875f3b99cf
+ 382799ad6add1632d934544230520f942dae37913b58cfa19e0cb2b11e7002267b1fdb9aa535f2217bcccf0c85c4d754f316dc3980a3ca267e5b3f5500536024
)
+
build() {
cd $srcdir/ZoneMinder-$pkgver
+ # ZM_RUNDIR need change to run dir
export CPPFLAGS=-D__STDC_CONSTANT_MACROS\
- ZM_SSL_LIB=gnutls
+ ZM_LOGDIR=/var/log/$pkgname\
+ ZM_RUNDIR=/tmp/$pkgname\
+ ZM_SSL_LIB=gnutls\
+ ZM_TMPDIR=/tmp/$pkgname
# Patch for GCC 4.7.x
sed -i -e 's/^#include <errno.h>/#include <errno.h>\n#include <unistd.h>/'\
@@ -61,13 +97,15 @@ build() {
/ZM_FFMPEG_FORMATS/,+1 s/mpg mpeg wmv asf avi\* mov swf 3gp\*\*/mpg mpeg wmv asf avi\* mov flv swf 3gp\*\* webm ogg h254/'\
scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
- # Patch for change path
- sed -i -e '/ZM_PATH_SOCKS/,+1 s/tmp\/zm/run/;
- /ZM_PATH_LOGS/,+1 s/zm/zonemider/;
- /ZM_PATH_SWAP/,+1 s/zm/zonemider/'\
+ # Patch for change path run dir
+ sed -i -e '/ZM_PATH_SOCKS/,+1 s/TMP/RUN/'\
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
+
+ # Patch for change ZM name to ZoneMinder
+ sed -i -e '/ZM_WEB_TITLE_PREFIX/,+1 s/"ZM"/"ZoneMinder"/'\
scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
- # Patch for v4l1 compat
+ # Patch for v4l1 compat support
sed -i -e "s/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};\n$ENV{LD_PRELOAD} = \'\/usr\/lib\/libv4l\/v4l1compat.so\' ;/"\
scripts/zmdc.pl.in || read
@@ -139,11 +177,12 @@ build() {
package() {
cd $srcdir/ZoneMinder-$pkgver
- make DESTDIR=$pkgdir RUNDIR=$pkdir/run ZM_RUNDIR=$pkgdir/run install
+ make DESTDIR=$pkgdir install
mkdir -p $pkgdir/{etc/{httpd/conf/extra,rc.d},srv/http/{cgi-bin,$pkgname},usr/{lib/systemd/system,share/{license/$pkgname,$pkgname/db}},var/{cache/$pkgname,log/$pkgname}}
chown -R http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/$pkgname}}
+ chmod 0700 $pkgdir/etc/zm.conf
for i in events images temp; do
mv $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i
@@ -153,9 +192,9 @@ package() {
ln -s /srv/http/cgi-bin $pkgdir/srv/http/$pkgname
ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname
- install -D -m 644 $srcdir/httpd-zm.conf $pkgdir/etc/httpd/conf/extra
- install -D -m 644 $srcdir/zm.rc.d $pkgdir/etc/rc.d/${pkgname}d
- install -D -m 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system
- install -D -m 644 COPYING $pkgdir/usr/share/license/$pkgname
- install -D -m 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db
+ install -D -m 644 $srcdir/httpd-$pkgname.conf $pkgdir/etc/httpd/conf/extra
+ install -D -m 644 $srcdir/$pkgname $pkgdir/etc/rc.d
+ install -D -m 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system
+ install -D -m 644 COPYING $pkgdir/usr/share/license/$pkgname
+ install -D -m 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db
}
diff --git a/pcr/zoneminder/arm-context.patch b/pcr/zoneminder/arm-context.patch
deleted file mode 100644
index a6fbb5328..000000000
--- a/pcr/zoneminder/arm-context.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/zm_signal.cpp.orig 2012-08-30 13:24:16.479872021 -0700
-+++ src/zm_signal.cpp 2012-08-30 13:27:35.909871996 -0700
-@@ -82,13 +82,13 @@
- int trace_size = 0;
-
- #if HAVE_STRUCT_SIGCONTEXT_EIP
-- Error( "Signal address is %p, from %p", (void *)context.cr2, (void *)context.eip );
-+ Error( "Signal address is %p, from %p", (void *)context.fault_address, (void *)context.eip );
-
- trace_size = backtrace( trace, TRACE_SIZE );
- // overwrite sigaction with caller's address
- trace[1] = (void *)context.eip;
- #elif HAVE_STRUCT_SIGCONTEXT
-- Error( "Signal address is %p, no eip", (void *)context.cr2 );
-+ Error( "Signal address is %p, no eip", (void *)context.fault_address );
-
- trace_size = backtrace( trace, TRACE_SIZE );
- #else // HAVE_STRUCT_SIGCONTEXT
diff --git a/pcr/zoneminder/customdb b/pcr/zoneminder/customdb
deleted file mode 100755
index afd295935..000000000
--- a/pcr/zoneminder/customdb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-DBHOST=$1
-DBNAME=$2
-USERNAME=$3
-PASSWORD=$4
-
-ZM_PATH_ZMS=/cgi-bin/nph-zms
-ZM_PATH_SOCKS=/srv/zoneminder/socks
-ZM_PATH_LOGS=/var/log/zm
-ZM_WEB_LIST_THUMBS=1
-ZM_WEB_MONTAGE_WIDTH=320
-ZM_WEB_MONTAGE_HEIGHT=240
-ZM_OPT_CAMBOZOLA=1
-ZM_OPT_MPEG=ffmpeg
-ZM_PATH_FFMPEG=/usr/bin/ffmpeg
-ZM_OPT_NETPBM=1
-ZM_EXTRA_DEBUG_LOG=/var/log/zm/zm_debug.log
-ZM_OPT_USE_AUTH=0
-
-sql=/tmp/$$
-echo "" >$sql
-for n in ZM_PATH_ZMS ZM_PATH_SOCKS ZM_PATH_LOGS ZM_WEB_LIST_THUMBS ZM_WEB_MONTAGE_WIDTH ZM_WEB_MONTAGE_HEIGHT ZM_OPT_CAMBOZOLA ZM_OPT_MPEG ZM_PATH_FFMPEG ZM_OPT_NETPBM ZM_EXTRA_DEBUG_LOG ZM_OPT_USE_AUTH; do
- eval "val=\$$n"
- echo "UPDATE Config SET Value='$val' WHERE Name='$n';" >>$sql
-done
-
-cat $sql | mysql --user=$USERNAME --password=$PASSWORD --host=$DBHOST $DBNAME
-rm -f $sql
-
-
-exit 0
diff --git a/pcr/zoneminder/httpd-zm.conf b/pcr/zoneminder/httpd-zoneminder.conf
index aeb089bc1..aeb089bc1 100644
--- a/pcr/zoneminder/httpd-zm.conf
+++ b/pcr/zoneminder/httpd-zoneminder.conf
diff --git a/pcr/zoneminder/patch-ffmpeg-configure.patch b/pcr/zoneminder/patch-ffmpeg-configure.patch
deleted file mode 100644
index ba1674a4a..000000000
--- a/pcr/zoneminder/patch-ffmpeg-configure.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- configure.old 2011-08-23 12:10:37.000000000 -0300
-+++ configure 2012-09-26 16:23:33.211940267 -0300
-@@ -3026,8 +3026,8 @@
- fi
-
-
--FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}"
--FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include"
-+FFMPEG_LIBS=`pkg-config --cflags libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
-+FFMPEG_CFLAGS=`pkg-config --cflags libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
-
-
-
---- configure.ac.old 2011-08-23 12:10:32.000000000 -0300
-+++ configure.ac 2012-09-26 18:16:44.146848335 -0300
-@@ -88,8 +88,8 @@
- e.g. --with-ffmpeg=/usr/local])
- )
- AC_SUBST(FFMPEG_PREFIX)
--FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}"
--FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include"
-+FFMPEG_LIBS=`pkg-config --libs libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
-+FFMPEG_CFLAGS=`pkg-config --libs libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
- AC_SUBST(FFMPEG_LIBS)
- AC_SUBST(FFMPEG_CFLAGS)
-
diff --git a/pcr/zoneminder/patch-libavcodec-detection.patch b/pcr/zoneminder/patch-libavcodec-detection.patch
deleted file mode 100644
index 0aaa9bc23..000000000
--- a/pcr/zoneminder/patch-libavcodec-detection.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.ac~ 2012-07-15 22:27:11.195257379 +0100
-+++ configure.ac 2012-07-15 22:24:34.308268675 +0100
-@@ -276,7 +276,7 @@
- AC_CHECK_LIB(avutil,av_malloc,,AC_MSG_WARN(libavutil.a may be required for MPEG streaming))
- # Don't bother to warn about this one
- AC_CHECK_LIB(avcore,av_image_copy,,)
--AC_CHECK_LIB(avcodec,avcodec_init,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
-+AC_CHECK_LIB(avcodec,avcodec_open,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
- AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
- AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming))
- AC_CHECK_LIB(swscale,sws_scale,,,-lswscale) \ No newline at end of file
diff --git a/pcr/zoneminder/zm.service b/pcr/zoneminder/zm.service
deleted file mode 100644
index ccf1f3334..000000000
--- a/pcr/zoneminder/zm.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Capture, analyse, record and monitor video security cameras
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/zm
-
-[Install]
-WantedBy=multi-user.target
diff --git a/pcr/zoneminder/zmeventbackup b/pcr/zoneminder/zmeventbackup
deleted file mode 100755
index a14ee22a1..000000000
--- a/pcr/zoneminder/zmeventbackup
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-#===============================================================================
-#
-# FILE: eventdump.sh
-#
-# USAGE: ./eventdump.sh
-#
-# DESCRIPTION: Uses mysqldump to create a .sql file for individual zm
-# events to make Event table recovery possible by doing a
-# 'find' search in ZoneMinder the events directory
-#
-# OPTIONS: ---
-# REQUIREMENTS: --- mysqldump
-# BUGS: ---
-# NOTES: ---
-# AUTHOR: Ross Melin <rdmelin@gmail.com>
-# COMPANY:
-# VERSION: 1.0
-# CREATED: 03/06/2008 11:51:19 AM PST
-# REVISION: ---
-#===============================================================================
-
-# Edit these to suit your configuration
-ZM_CONFIG=/etc/zm.conf
-MYSQLDUMP=/usr/bin/mysqldump
-EVENTSDIR=/srv/zoneminder/www/events
-
-# The rest should not need editing
-
-# Get the mysql user and password
-source $ZM_CONFIG
-MYDUMPOPTS="--user=$ZM_DB_USER --password=$ZM_DB_PASS --skip-opt --compact --quick --no-create-info"
-
-
-for tag in $(find $EVENTSDIR -amin -65 -name ".[0-9]*")
- do
- EVENT_PATH=$(echo $tag |cut -f 1 -d .)
- EVENT_ID=$(echo $tag |cut -f 2 -d .)
- # Dump the sql statements needed to reload the Events, Frames and Stats tables
-
- echo "-- ZM_DB_VERSION=$ZM_VERSION
-" > $EVENT_PATH.sql
-
- $MYSQLDUMP $MYDUMPOPTS --where="Id=$EVENT_ID" zm Events >> $EVENT_PATH.sql
- $MYSQLDUMP $MYDUMPOPTS --where="Eventid=$EVENT_ID" zm Frames >> $EVENT_PATH.sql
- $MYSQLDUMP $MYDUMPOPTS --where="Eventid=$EVENT_ID" zm Stats >> $EVENT_PATH.sql
-
-done
diff --git a/pcr/zoneminder/zminit.arch b/pcr/zoneminder/zminit.arch
deleted file mode 100644
index 01b6658a7..000000000
--- a/pcr/zoneminder/zminit.arch
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-
-
-ZM_CONFIG=/etc/zm.conf
-
-
-
-loadcfg() {
- if [ -f $ZM_CONFIG ]; then
- . $ZM_CONFIG
- else
- echo "ERROR: $ZM_CONFIG not found."
- exit 1
- fi
- }
-chkmysql(){
- #FIXME
- /etc/rc.d/mysqld restart || (echo "mysql is not availible" && exit 1 )
- }
-
-getmylogin(){
- echo "Enter MySQL Administrator username"
- echo "(Default: root and password is blank)"
- echo -n "MySQL Admin: "
- read MYADMIN
- echo -n "Password: "
- read MYPASS
- if [ "X$MYPASS" != "X" ]; then MYPASS="-p$MYPASS"; fi
- echo "\q" |mysql -u $MYADMIN $MYPASS || exit 0
-
- }
-
-checkdb()
-{
- # Check database exisits and version
- exists=$(echo "show databases" |mysql -u $MYADMIN "$MYPASS" |grep zm)
- if [ "$exists" = "zm" ]; then
- OLD_VERSION=$(echo "select Value from Config where Name = 'ZM_DYN_DB_VERSION';" | mysql -u $MYADMIN $MYPASS zm |grep -v '^Value')
-
- case $OLD_VERSION in
- "")
- echo "A zm database exists, but the version is unknown"
- echo "Updating is unlikely to succeed"
- ;;
- "$ZM_VERSION")
- echo "The zm database appears to be up to date"
- echo "If this is incorrect, edit $ZM_CONFIG to reflect the current version"
- ;;
- *)
- echo "A database fron zm-$OLD_VERSION exists already"
- ;;
- esac
-
- while [ true ]
- do
- echo "Choose one of the following options:"
- echo "[U]pdate the database"
- echo "[D]rop the old database and reinitialize"
- echo "[E]xit and do nothing"
- read OPTION
- case $OPTION in
- "U"|"u")
- /etc/rc.d/zm restart
- exit 0
- ;;
- "D"|"d")
- echo "drop database zm;"|mysql -u $MYADMIN $MYPASS
- return
- ;;
- "E"|"e")
- exit 0
- ;;
- esac
- done
- fi
-}
-
-checkcfg(){
-for n in ZM_DB_HOST ZM_DB_NAME ZM_DB_USER ZM_DB_PASS; do
- eval "val=\$$n"
- if [ "$val" = "" ]; then
- echo "ERROR($ZM_CONFIG): $n should not be empty."
- echo "Enter a $n for ZM to use the Database."
- if [ "$n" = "ZM_DB_PASS" ]; then
- echo -n "Will not echo on screen $n : "
- stty -echo # Turns off screen echo.
- read newval
- stty echo # Restores screen echo.
- echo ""
- ### The following can be used to generate a random password
- # randstr newval 16
- else
- echo -n "$n : "
- read newval
- fi
- cp $ZM_CONFIG /tmp/$$ &&
- sed 's/^'$n='.*$/'$n=$newval'/g' /tmp/$$ >$ZM_CONFIG
-
- fi
-done
-
-if [ "$ZM_DB_HOST" = "localhost" ]; then
- ClientHost=localhost
-else
- ClientHost=`hostname`
-fi
-}
-
-reloadcfg(){
-loadcfg
-}
-
-initdb(){
-sql=/tmp/zm.crdb.sql
-echo "" >$sql
-chmod 600 $sql
-
-echo "CREATE DATABASE $ZM_DB_NAME;" >>$sql
-echo "USE $ZM_DB_NAME;" >>$sql
-
-echo "GRANT all on $ZM_DB_NAME.* TO '$ZM_DB_USER'@'$ClientHost' IDENTIFIED BY '$ZM_DB_PASS';" >>$sql
-
-cat $sql | mysql -B -h $ZM_DB_HOST -u $MYADMIN $MYPASS
-rm -f $sql
-
-cat $ZM_PATH_UPDATE/zm_create.sql | mysql -h $ZM_DB_HOST -u $ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME
-( cd $ZM_PATH_UPDATE; perl $ZM_PATH_BIN/zmupdate.pl -f )
-
- $ZM_PATH_UPDATE/customdb $ZM_DB_HOST $ZM_DB_NAME $ZM_DB_USER $ZM_DB_PASS
-}
-
-
-
-loadcfg
-getmylogin
-checkdb
-checkcfg
-reloadcfg
-initdb
-
-
-
-
diff --git a/pcr/zoneminder/zm.rc.d b/pcr/zoneminder/zoneminder
index c4cbf4d3f..c4cbf4d3f 100644
--- a/pcr/zoneminder/zm.rc.d
+++ b/pcr/zoneminder/zoneminder
diff --git a/pcr/zoneminder/zoneminder-1.25.0-kernel35.patch b/pcr/zoneminder/zoneminder-1.25.0-kernel35.patch
deleted file mode 100644
index 9939dc5c3..000000000
--- a/pcr/zoneminder/zoneminder-1.25.0-kernel35.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -up ./src/zm_local_camera.cpp.kernel35 ./src/zm_local_camera.cpp
---- ./src/zm_local_camera.cpp.kernel35 2012-07-16 15:01:22.182614878 -0500
-+++ ./src/zm_local_camera.cpp 2012-07-16 15:02:16.491941730 -0500
-@@ -739,7 +739,7 @@ void LocalCamera::Terminate()
- {
- Debug( 3, "Terminating video stream" );
- //enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- enum v4l2_buf_type type = v4l2_data.fmt.type;
-+ enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;
- if ( vidioctl( vid_fd, VIDIOC_STREAMOFF, &type ) < 0 )
- Error( "Failed to stop capture stream: %s", strerror(errno) );
-
-@@ -1519,7 +1519,7 @@ int LocalCamera::PrimeCapture()
-
- Debug( 3, "Starting video stream" );
- //enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- enum v4l2_buf_type type = v4l2_data.fmt.type;
-+ enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;
- if ( vidioctl( vid_fd, VIDIOC_STREAMON, &type ) < 0 )
- Fatal( "Failed to start capture stream: %s", strerror(errno) );
- }
diff --git a/pcr/zoneminder/zoneminder.install b/pcr/zoneminder/zoneminder.install
index 5e62cc23e..899e2a5d1 100644
--- a/pcr/zoneminder/zoneminder.install
+++ b/pcr/zoneminder/zoneminder.install
@@ -8,7 +8,7 @@ pre_install() {
fi
fi
if [ -L /srv/http/zoneminder/images ]; then
- l=$(readlink /srv/http/zoneminder/images )
+ l=$(readlink /srv/http/zoneminder/images)
if [ $l != /var/cache/zoneminder/images ]; then
abort=true
fi
@@ -26,23 +26,73 @@ EOF
}
post_install() {
- if [ -d /var/log/zoneminder ]; then
- mkdir -m 0755 /var/log/zoneminder
+ if [[ -d /var/log/zoneminder ]]; then
+ chmod 0755 /var/log/zoneminder
chown http.http /var/log/zoneminder
else
- chmod 0755 /var/log/zoneminder
+ mkdir -m 0755 /var/log/zoneminder
chown http.http /var/log/zoneminder
fi
+ if [[ -d /tmp/zoneminder ]]; then
+ chmod 0700 /tmp/zoneminder
+ chown http.http /tmp/zoneminder
+ else
+ mkdir -m 0700 /tmp/zoneminder
+ chown http.http /tmp/zoneminder
+ fi
+ sed -i -e '
+ /^;extension=mysql.so/ s/^;//;
+ /^#extension=mysql.so/ s/^#//;
+ /^;extension=mysqli.so/ s/^;//;
+ /^#extension=mysqli.so/ s/^#//;
+ /^;extension=gd.so/ s/^;//;
+ /^#extension=gd.so/ s/^#//;
+ /^;extension=gettext.so/ s/^;//;
+ /^#extension=gettext.so/ s/^#//;
+ /^;extension=mcrypt.so/ s/^;//;
+ /^#extension=mcrypt.so/ s/^#//;
+ /^;extension=session.so/ s/^;//;
+ /^#extension=session.so/ s/^#//;
+ /^;extension=sockets.so/ s/^;//;
+ /^#extension=sockets.so/ s/^#//;
+ /^;extension=openssl.so/ s/^;//;
+ /^#extension=openssl.so/ s/^#//;
+ /^;extension=ftp.so/ s/^;//;
+ /^#extension=ftp.so/ s/^#//;
+ /^;extension=zip.so/ s/^;//;
+ /^#extension=zip.so/ s/^#//;
+ /^;open_basedir/ s/^;//;
+ /^#open_basedir/ s/^#//;
+ /^open_basedir/ s/:\/etc//;
+ /^open_basedir/ s/:\/etc\///;
+ /^open_basedir/ s/$/:\/etc/;
+ /^open_basedir/ s/:\/srv\/http\/zoneminder//;
+ /^open_basedir/ s/:\/srv\/http\/zoneminder\///;
+ /^open_basedir/ s/$/:\/srv\/http\/zoneminder/;
+ ' /etc/php/php.ini || read
+ sed -i -e '
+ /^LoadModule php5_module modules\/libphp5.so/d;
+ /^LoadModule rewrite_module modules\/mod_rewrite.so/ s/$/\nLoadModule php5_module modules\/libphp5.so/;
+ /^# PHP 5/d;
+ /^# ZoneMinder/d;
+ /^Include \/etc\/httpd\/conf\/extra\/php5_module.conf/d;
+ /^Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d;
+ /^Include conf\/extra\/httpd-default.conf/ s/$/\n\n# PHP 5\n\Include \/etc\/httpd\/conf\/extra\/php5_module.conf\n\n# ZoneMinder\nInclude \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/;
+ ' /etc/httpd/conf/httpd.conf || read
cat << EOF
-Note:
+Note for mysql:
==> To run Zoneminder, you must install the database running mysql service (as root):
==> "rc.d start mysqld" (in initscripts) or "systemctl start mysqld.service" (in systemd)
-==> and add Zoneminder database typing:
+==> and add Zoneminder database typing (with passsword):
==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload"
==> "cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p"
==> "echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
+==> (or without passsword):
+==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload"
+==> "cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf"
+==> "echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
-Note:
+Note for php:
==> You must uncomment that line in /etc/php/php.ini:
==> "extension=mysql.so"
==> check and make sure these are uncommented:
@@ -52,55 +102,59 @@ Note:
==> "extension=mysqli.so"
==> "extension=session.so"
==> "extension=sockets.so"
-
-==> You must edit /etc/php/php.ini and add to open_basedir "/etc" and
-==> "/usr/share/zoneminder" like so
+==> "extension=openssl.so"
+==> "extension=ftp.so"
+==> "extension=zip.so"
+==> check and add to open_basedir "/etc" and
+==> "/srv/http/zoneminder" like so
==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder"
-==> Otherwise ZoneMinder will be unable to read /etc/zm.conf
-==> or display its own web directory
-==> And set your timezone in php.ini: date.timezone = <my_country>/<my_city>
+==> and set your timezone in php.ini:
+==> "date.timezone = <your_country>/<your_city>"
-Note:
+Note for apache:
==> You must edit /etc/httpd/conf/httpd.conf and add the line:
==> "LoadModule php5_module modules/libphp5.so"
==> and:
==> "Include /etc/httpd/conf/extra/php5_module.conf"
-==> "Include /etc/httpd/conf/extra/httpd-zm.conf"
+==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf"
EOF
}
post_upgrade() {
+ post_install
/usr/bin/zmupdate.pl -f >/dev/null
- if [ -d /var/log/zoneminder ]; then
- mkdir -m 0755 /var/log/zoneminder
- chown http.http /var/log/zoneminder
- else
- chmod 0755 /var/log/zoneminder
- chown http.http /var/log/zoneminder
- fi
}
post_remove() {
- if [ -d /run/zoneminder ]; then
- rm -vr /run/zoneminder
- fi
- if [ -d /tmp/zoneminder ]; then
+ if [[ -d /tmp/zoneminder ]]; then
rm -vr /tmp/zoneminder
fi
+ sed -i -e '
+ /^open_basedir/ s/:\/srv\/http\/zoneminder//;
+ /^open_basedir/ s/:\/srv\/http\/zoneminder\///;
+ ' /etc/php/php.ini || read
+ sed -i -e '
+ /^# ZoneMinder/d;
+ /Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d;
+ ' /etc/httpd/conf/httpd.conf || read
cat << EOF
Note:
-==> To clean Zoneminder mysql database, run as root:
+==> To clean Zoneminder mysql database, run as root (with password):
==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zm"
+==> (or without password):
+==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
+==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
+==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm"
==> Disable http with php if it isn't needed with others servers,
==> comment or remove that lines in /etc/httpd/conf/httpd.conf:
==> "LoadModule php5_module modules/libphp5.so"
==> "Include /etc/httpd/conf/extra/php5_module.conf"
-==> Remove
-==> "Include /etc/httpd/conf/extra/httpd-zm.conf"
+==> Remove line in /etc/httpd/conf/httpd.conf:
+==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf"
==> Disable php with mysql if it isn't needed with others servers,
==> comment that lines in /etc/php/php.ini:
@@ -113,11 +167,11 @@ Note:
==> "extension=sockets.so"
==> "date.timezone = <my_country>/<my_city>"
-==> Edit /etc/php/php.ini and remove "/etc" and "/usr/share/zoneminder/www"
-==> in the open_basedir.
+==> Edit /etc/php/php.ini and remove "/etc" and "/srv/http/zoneminder"
+==> in the "open_basedir".
-==> Remove log files and 'zonemider' directory in "/var/log/zoneminder"
+==> Remove log files and "zonemider" directory in "/var/log/zoneminder".
-==> Backup and remove events images and temp dirs in "/var/cache/zoneminder"
+==> Backup and remove "events", "images" and "temp" dirs in "/var/cache/zoneminder".
EOF
}
diff --git a/pcr/zoneminder/zoneminder.service b/pcr/zoneminder/zoneminder.service
index ba41e8926..05cae6f91 100644
--- a/pcr/zoneminder/zoneminder.service
+++ b/pcr/zoneminder/zoneminder.service
@@ -5,7 +5,6 @@ Required=mysqld.service
[Service]
Type=forking
-PIDFile=/run/zm.pid
ExecStart=/usr/bin/zmpkg.pl start
ExecRestart=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop