patch deb scripts to set perms on zm.conf
This commit is contained in:
parent
b4a04b1d61
commit
696cfb1fc3
|
@ -0,0 +1,85 @@
|
|||
From cfeb12fc73a22782858754a335775e3bdab36956 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Bauer <knnniggett@hotmail.com>
|
||||
Date: Sun, 5 Mar 2017 10:37:44 -0600
|
||||
Subject: [PATCH 1/2] fix permissions on zm.conf in deb pkg scripts
|
||||
|
||||
---
|
||||
distros/ubuntu1204/rules | 6 ++++--
|
||||
distros/ubuntu1604/rules | 6 ++++--
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/distros/ubuntu1204/rules b/distros/ubuntu1204/rules
|
||||
index b467c87..3f5c41c 100755
|
||||
--- a/distros/ubuntu1204/rules
|
||||
+++ b/distros/ubuntu1204/rules
|
||||
@@ -58,8 +58,10 @@ override_dh_auto_install:
|
||||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms
|
||||
- ## 637685
|
||||
- chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
+ #
|
||||
+ # As requested by the Debian Webapps Policy Manual §3.2.1
|
||||
+ chown root:www-data debian/zoneminder-core/etc/zm/zm.conf
|
||||
+ chmod 640 debian/zoneminder-core/etc/zm/zm.conf
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
||||
diff --git a/distros/ubuntu1604/rules b/distros/ubuntu1604/rules
|
||||
index bf8012a..15c953e 100755
|
||||
--- a/distros/ubuntu1604/rules
|
||||
+++ b/distros/ubuntu1604/rules
|
||||
@@ -58,8 +58,10 @@ override_dh_auto_install:
|
||||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms
|
||||
- ## 637685
|
||||
- chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
+ #
|
||||
+ # As requested by the Debian Webapps Policy Manual §3.2.1
|
||||
+ chown root:www-data debian/zoneminder-core/etc/zm/zm.conf
|
||||
+ chmod 640 debian/zoneminder-core/etc/zm/zm.conf
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
||||
|
||||
From f66408b9983ef1161f0fa753d71dd0ed0b2fdb6b Mon Sep 17 00:00:00 2001
|
||||
From: Andy Bauer <knnniggett@hotmail.com>
|
||||
Date: Sun, 5 Mar 2017 10:50:09 -0600
|
||||
Subject: [PATCH 2/2] update the path to zm.conf
|
||||
|
||||
---
|
||||
distros/ubuntu1204/rules | 4 ++--
|
||||
distros/ubuntu1604/rules | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/distros/ubuntu1204/rules b/distros/ubuntu1204/rules
|
||||
index 3f5c41c..2b54a21 100755
|
||||
--- a/distros/ubuntu1204/rules
|
||||
+++ b/distros/ubuntu1204/rules
|
||||
@@ -60,8 +60,8 @@ override_dh_fixperms:
|
||||
dh_fixperms
|
||||
#
|
||||
# As requested by the Debian Webapps Policy Manual §3.2.1
|
||||
- chown root:www-data debian/zoneminder-core/etc/zm/zm.conf
|
||||
- chmod 640 debian/zoneminder-core/etc/zm/zm.conf
|
||||
+ chown root:www-data $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
+ chmod 640 $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
||||
diff --git a/distros/ubuntu1604/rules b/distros/ubuntu1604/rules
|
||||
index 15c953e..c7fb001 100755
|
||||
--- a/distros/ubuntu1604/rules
|
||||
+++ b/distros/ubuntu1604/rules
|
||||
@@ -60,8 +60,8 @@ override_dh_fixperms:
|
||||
dh_fixperms
|
||||
#
|
||||
# As requested by the Debian Webapps Policy Manual §3.2.1
|
||||
- chown root:www-data debian/zoneminder-core/etc/zm/zm.conf
|
||||
- chmod 640 debian/zoneminder-core/etc/zm/zm.conf
|
||||
+ chown root:www-data $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
+ chmod 640 $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
|
@ -84,8 +84,6 @@ installtrusty () {
|
|||
|
||||
# Install and test the zoneminder package (only) for Ubuntu Trusty
|
||||
sudo gdebi --non-interactive build/zoneminder_*amd64.deb
|
||||
sudo chmod 644 /etc/zm/zm.conf
|
||||
sudo chgrp www-data /etc/zm/zm.conf
|
||||
mysql -uzmuser -pzmpass zm < db/test.monitor.sql
|
||||
sudo /usr/bin/zmpkg.pl start
|
||||
sudo /usr/bin/zmfilter.pl -f purgewhenfull
|
||||
|
@ -151,12 +149,11 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
|
|||
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then
|
||||
echo "Begin Debian build..."
|
||||
|
||||
# patch packpack to remove "debian" from the source tarball filename
|
||||
# fixed upstream
|
||||
# patch --dry-run --silent -f -p1 < utils/packpack/deb.mk.patch 2>/dev/null
|
||||
#if [ $? -eq 0 ]; then
|
||||
# patch -p1 < utils/packpack/deb.mk.patch
|
||||
#fi
|
||||
# patch debian build scripts to apply correct permissions to zm.conf
|
||||
patch --dry-run --silent -f -p1 < utils/packpack/fixdebperms.patch 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
patch -p1 < utils/packpack/fixdebperms.patch
|
||||
fi
|
||||
|
||||
movecrud
|
||||
|
||||
|
@ -178,6 +175,14 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
|
|||
|
||||
# We were not triggered via cron so just build and test trusty
|
||||
elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ]; then
|
||||
echo "Begin Ubuntu Trusty build..."
|
||||
|
||||
# patch debian build scripts to apply correct permissions to zm.conf
|
||||
patch --dry-run --silent -f -p1 < utils/packpack/fixdebperms.patch 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
patch -p1 < utils/packpack/fixdebperms.patch
|
||||
fi
|
||||
|
||||
commonprep
|
||||
movecrud
|
||||
|
||||
|
|
Loading…
Reference in New Issue