From 7076b92af43876c539e8052db201bb34353b03f9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 09:01:47 -0400 Subject: [PATCH 01/11] fix if on exit status of build --- utils/do_debian_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index a018a1a4d..e647232f2 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -217,7 +217,7 @@ if [ "$DEBSIGN_KEYID" != "" ]; then DEBUILD="$DEBUILD -k$DEBSIGN_KEYID" fi $DEBUILD -if [ "$?" != "0" ]; then +if [ $? -ne 0 ]; then echo "Error status code is: $?" echo "Build failed."; exit $?; From 4121e4b061a2f411c6ef36680d921d9eb7c2dfa5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 11:45:10 -0400 Subject: [PATCH 02/11] put back the code that generates the .orig.tar.gz and deletes .git etc --- utils/do_debian_package.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index e647232f2..689170c23 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -194,20 +194,24 @@ zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY EOF fi; -# Auto-install all ZoneMinder's depedencies using the Debian control file -sudo apt-get install devscripts equivs -sudo mk-build-deps -ir ./debian/control -echo "Status: $?" +rm -rf .git +rm .gitignore +cd ../ +tar zcf $DIRECTORY.orig.tar.gz $DIRECTORY.orig +cd $DIRECTORY.orig -#rm -rf .git -#rm .gitignore -#cd ../ -#tar zcf zoneminder_$VERSION-$DISTRO.orig.tar.gz zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig -#cd zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig if [ $TYPE == "binary" ]; then + # Auto-install all ZoneMinder's depedencies using the Debian control file + sudo apt-get install devscripts equivs + sudo mk-build-deps -ir ./debian/control + echo "Status: $?" DEBUILD=debuild else if [ $TYPE == "local" ]; then + # Auto-install all ZoneMinder's depedencies using the Debian control file + sudo apt-get install devscripts equivs + sudo mk-build-deps -ir ./debian/control + echo "Status: $?" DEBUILD="debuild -i -us -uc -b" else DEBUILD="debuild -S -sa" From eac1ebfb5a5292a960126d9655618d7ab96bda7e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 11:46:07 -0400 Subject: [PATCH 03/11] bump up standards version --- distros/ubuntu1604/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1604/control b/distros/ubuntu1604/control index 231555b72..cc7ee1584 100644 --- a/distros/ubuntu1604/control +++ b/distros/ubuntu1604/control @@ -28,7 +28,7 @@ Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apa # Unbundled (dh_linktree): ,libjs-jquery ,libjs-mootools -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Homepage: http://www.zoneminder.com/ Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/zoneminder.git Vcs-Git: git://anonscm.debian.org/collab-maint/zoneminder.git From ce00047175e49a76af914c9c4ca1af49d1e71080 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 11:46:36 -0400 Subject: [PATCH 04/11] try out quilt format again --- distros/ubuntu1604/source/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1604/source/format b/distros/ubuntu1604/source/format index 89ae9db8f..163aaf8d8 100644 --- a/distros/ubuntu1604/source/format +++ b/distros/ubuntu1604/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) From 9dd251c1d5d3c80ea71ea459f3a0c77397de4053 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 11:52:24 -0400 Subject: [PATCH 05/11] direcoty shouldn't have the distro in it apparently --- utils/do_debian_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index 689170c23..ada3f90b0 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -143,7 +143,7 @@ if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then VERSION="$VERSION~$SNAPSHOT"; fi; -DIRECTORY="zoneminder_$VERSION-$DISTRO${PACKAGE_VERSION}"; +DIRECTORY="zoneminder_$VERSION"; echo "Doing $TYPE release $DIRECTORY"; mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig"; cd "$DIRECTORY.orig"; From 6e94e57f57886f8008f3ef674137fe9457dbddda Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 11:56:46 -0400 Subject: [PATCH 06/11] don't default the cgi-bin path to /zm --- distros/ubuntu1604/patches/series | 1 - 1 file changed, 1 deletion(-) diff --git a/distros/ubuntu1604/patches/series b/distros/ubuntu1604/patches/series index fc70f4006..bfa8983d3 100644 --- a/distros/ubuntu1604/patches/series +++ b/distros/ubuntu1604/patches/series @@ -1,2 +1 @@ -default_cgi-path.patch use_libjs-mootools.patch From 6a3531c2ef2bac5b0d4dcc4b39feb057cb53bcb9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 12:01:55 -0400 Subject: [PATCH 07/11] use the mootools shipped with zm --- .../ubuntu1604/patches/default_cgi-path.patch | 16 ---------------- distros/ubuntu1604/patches/series | 1 - .../patches/use_libjs-mootools.patch | 18 ------------------ 3 files changed, 35 deletions(-) delete mode 100644 distros/ubuntu1604/patches/default_cgi-path.patch delete mode 100644 distros/ubuntu1604/patches/use_libjs-mootools.patch diff --git a/distros/ubuntu1604/patches/default_cgi-path.patch b/distros/ubuntu1604/patches/default_cgi-path.patch deleted file mode 100644 index 8bfc2ba06..000000000 --- a/distros/ubuntu1604/patches/default_cgi-path.patch +++ /dev/null @@ -1,16 +0,0 @@ -Last-Update: 2015-08-16 -Forwarded: no -Author: Dmitry Smirnov -Description: correct path to CGI app according to default web server configuration. - ---- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -+++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -@@ -428,7 +428,7 @@ our @options = - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/zm/cgi-bin/nph-zms", - description => "Web path to zms streaming server", - help => qqq(" - The ZoneMinder streaming server is required to send streamed diff --git a/distros/ubuntu1604/patches/series b/distros/ubuntu1604/patches/series index bfa8983d3..e69de29bb 100644 --- a/distros/ubuntu1604/patches/series +++ b/distros/ubuntu1604/patches/series @@ -1 +0,0 @@ -use_libjs-mootools.patch diff --git a/distros/ubuntu1604/patches/use_libjs-mootools.patch b/distros/ubuntu1604/patches/use_libjs-mootools.patch deleted file mode 100644 index b3925f6d0..000000000 --- a/distros/ubuntu1604/patches/use_libjs-mootools.patch +++ /dev/null @@ -1,18 +0,0 @@ -Last-Update: 2015-03-29 -Forwarded: no -Bug-Debian: http://bugs.debian.org/585590 -Reviewed-By: Dmitry Smirnov -Description: use mootools shipped by debian, rather than the zoneminder included mootools. - ---- a/web/skins/classic/includes/functions.php -+++ b/web/skins/classic/includes/functions.php -@@ -63,9 +63,8 @@ - } - ?> - - -- - - - Date: Thu, 27 Apr 2017 12:05:13 -0400 Subject: [PATCH 08/11] delete the old merge files --- distros/ubuntu1204/rules.orig | 89 ----------------------------------- distros/ubuntu1204/rules.rej | 28 ----------- 2 files changed, 117 deletions(-) delete mode 100755 distros/ubuntu1204/rules.orig delete mode 100644 distros/ubuntu1204/rules.rej diff --git a/distros/ubuntu1204/rules.orig b/distros/ubuntu1204/rules.orig deleted file mode 100755 index 2b54a2131..000000000 --- a/distros/ubuntu1204/rules.orig +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed - -ifeq ($(DEB_BUILD_ARCH_OS),hurd) -ARGS:= -DZM_NO_MMAP=ON -endif - -%: - dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \ - --with sphinxdoc,apache2,linktree - -override_dh_auto_configure: - dh_auto_configure -- $(ARGS) \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DZM_CONFIG_DIR="/etc/zm" \ - -DZM_RUNDIR="/var/run/zm" \ - -DZM_SOCKDIR="/var/run/zm" \ - -DZM_TMPDIR="/tmp/zm" \ - -DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \ - -DZM_CONTENTDIR="/var/cache/zoneminder" - -override_dh_clean: - dh_clean $(MANPAGES1) - $(RM) -r docs/_build docs/installationguide - -build-indep: - #$(MAKE) -C docs text - $(MAKE) -C docs html - -MANPAGES1 = dbuild/scripts/zmupdate.pl.1 -$(MANPAGES1): - # generate man page(s): - pod2man -s1 --stderr --utf8 $(patsubst %.1, %, $@) $@ - -## reproducible build: -LAST_CHANGE=$(shell dpkg-parsechangelog -S Date) -BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)") -override_dh_installman: $(MANPAGES1) - $(MAKE) -C docs man SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" - dh_installman --language=C $(MANPAGES1) - -override_dh_auto_install: - dh_auto_install --destdir=$(CURDIR)/debian/tmp - # remove worthless files: - $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*/*/.packlist - $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*.in - # remove empty directories: - find $(CURDIR)/debian/tmp/usr -type d -empty -delete -printf 'removed %p\n' - # remove extra-license-file: - $(RM) -v $(CURDIR)/debian/tmp/usr/share/zoneminder/www/api/lib/Cake/LICENSE.txt - -override_dh_fixperms: - dh_fixperms - # - # As requested by the Debian Webapps Policy Manual §3.2.1 - 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 - -override_dh_apache2: - dh_apache2 --noenable - -override_dh_strip: - [ -d "$(CURDIR)/debian/zoneminder-dbg" ] \ - && dh_strip --dbg-package=zoneminder-dbg \ - || dh_strip - -#%: -# dh $@ --parallel --buildsystem=autoconf --with autoreconf -# -#override_dh_auto_configure: -# dh_auto_configure -- \ -# --sysconfdir=/etc/zm \ -# --with-mysql=/usr \ -# --with-webdir=/usr/share/zoneminder \ -# --with-ffmpeg=/usr \ -# --with-cgidir=/usr/lib/cgi-bin \ -# --with-webuser=www-data \ -# --with-webgroup=www-data \ -# --enable-mmap=yes diff --git a/distros/ubuntu1204/rules.rej b/distros/ubuntu1204/rules.rej deleted file mode 100644 index 8d88eb471..000000000 --- a/distros/ubuntu1204/rules.rej +++ /dev/null @@ -1,28 +0,0 @@ ---- distros/ubuntu1204/rules -+++ 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 ---- distros/ubuntu1204/rules -+++ 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 From 48d9167c5d6e0f6b6693079e84d5de331d3b3386 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 12:05:47 -0400 Subject: [PATCH 09/11] Don't apply patches. --- .../ubuntu1204/patches/default_cgi-path.patch | 16 ---------------- distros/ubuntu1204/patches/series | 2 -- .../patches/use_libjs-mootools.patch | 18 ------------------ 3 files changed, 36 deletions(-) delete mode 100644 distros/ubuntu1204/patches/default_cgi-path.patch delete mode 100644 distros/ubuntu1204/patches/use_libjs-mootools.patch diff --git a/distros/ubuntu1204/patches/default_cgi-path.patch b/distros/ubuntu1204/patches/default_cgi-path.patch deleted file mode 100644 index 8bfc2ba06..000000000 --- a/distros/ubuntu1204/patches/default_cgi-path.patch +++ /dev/null @@ -1,16 +0,0 @@ -Last-Update: 2015-08-16 -Forwarded: no -Author: Dmitry Smirnov -Description: correct path to CGI app according to default web server configuration. - ---- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -+++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -@@ -428,7 +428,7 @@ our @options = - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/zm/cgi-bin/nph-zms", - description => "Web path to zms streaming server", - help => qqq(" - The ZoneMinder streaming server is required to send streamed diff --git a/distros/ubuntu1204/patches/series b/distros/ubuntu1204/patches/series index fc70f4006..e69de29bb 100644 --- a/distros/ubuntu1204/patches/series +++ b/distros/ubuntu1204/patches/series @@ -1,2 +0,0 @@ -default_cgi-path.patch -use_libjs-mootools.patch diff --git a/distros/ubuntu1204/patches/use_libjs-mootools.patch b/distros/ubuntu1204/patches/use_libjs-mootools.patch deleted file mode 100644 index b3925f6d0..000000000 --- a/distros/ubuntu1204/patches/use_libjs-mootools.patch +++ /dev/null @@ -1,18 +0,0 @@ -Last-Update: 2015-03-29 -Forwarded: no -Bug-Debian: http://bugs.debian.org/585590 -Reviewed-By: Dmitry Smirnov -Description: use mootools shipped by debian, rather than the zoneminder included mootools. - ---- a/web/skins/classic/includes/functions.php -+++ b/web/skins/classic/includes/functions.php -@@ -63,9 +63,8 @@ - } - ?> - - -- - - - Date: Thu, 27 Apr 2017 12:15:39 -0400 Subject: [PATCH 10/11] Don't delete the docs anymore --- distros/ubuntu1604/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1604/rules b/distros/ubuntu1604/rules index c7fb00198..e3b235be8 100755 --- a/distros/ubuntu1604/rules +++ b/distros/ubuntu1604/rules @@ -28,7 +28,7 @@ override_dh_auto_configure: override_dh_clean: dh_clean $(MANPAGES1) - $(RM) -r docs/_build docs/installationguide + $(RM) -r docs/_build build-indep: #$(MAKE) -C docs text From 2344f533ba8456cc09030ad6827f6d8dcc35a7ec Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Apr 2017 12:18:27 -0400 Subject: [PATCH 11/11] debuild has a problem with the debian dir being a link, so mv it instead --- utils/do_debian_package.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index ada3f90b0..a035b1dd5 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -151,12 +151,12 @@ cd "$DIRECTORY.orig"; git submodule init git submodule update --init --recursive if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then - ln -sf distros/ubuntu1204 debian + mv distros/ubuntu1204 debian else if [ "$DISTRO" == "wheezy" ]; then - ln -sf distros/debian debian + mv distros/debian debian else - ln -sf distros/ubuntu1604 debian + mv distros/ubuntu1604 debian fi; fi;