pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/zoneminder Fix build with Clang and as unpriv...
details: https://anonhg.NetBSD.org/pkgsrc/rev/144e8a19338a
branches: trunk
changeset: 616308:144e8a19338a
user: joerg <joerg%pkgsrc.org@localhost>
date: Sun Mar 24 16:47:47 2013 +0000
description:
Fix build with Clang and as unprivileged user.
diffstat:
security/zoneminder/Makefile | 7 +-
security/zoneminder/distinfo | 33 +++++++++------
security/zoneminder/patches/patch-Makefile_am | 10 ++--
security/zoneminder/patches/patch-configure_ac | 27 ++++++------
security/zoneminder/patches/patch-scripts_zm_in | 12 ++--
security/zoneminder/patches/patch-src_Makefile_am | 8 +-
security/zoneminder/patches/patch-src_zm__thread.h | 13 ++++++
security/zoneminder/patches/patch-src_zm__timer.h | 13 ++++++
security/zoneminder/patches/patch-src_zm__utils.cpp | 26 ++++++++++++
security/zoneminder/patches/patch-src_zm__utils.h | 12 +++++
security/zoneminder/patches/patch-src_zm_comms_cpp | 6 +-
security/zoneminder/patches/patch-src_zm_comms_h | 10 ++-
security/zoneminder/patches/patch-src_zm_logger_cpp | 8 +-
security/zoneminder/patches/patch-src_zm_remote_camera_h | 6 +-
security/zoneminder/patches/patch-src_zm_signal_h | 6 +-
security/zoneminder/patches/patch-src_zm_thread_cpp | 17 +++++--
security/zoneminder/patches/patch-src_zmc_cpp | 8 +-
security/zoneminder/patches/patch-src_zmf_cpp | 10 ++--
security/zoneminder/patches/patch-web_Makefile.am | 13 ++++++
security/zoneminder/patches/patch-web_ajax_stream_php | 8 +-
20 files changed, 172 insertions(+), 81 deletions(-)
diffs (truncated from 562 to 300 lines):
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/Makefile
--- a/security/zoneminder/Makefile Sun Mar 24 16:46:37 2013 +0000
+++ b/security/zoneminder/Makefile Sun Mar 24 16:47:47 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2013/03/16 07:21:22 obache Exp $
+# $NetBSD: Makefile,v 1.4 2013/03/24 16:47:47 joerg Exp $
#
DISTNAME= ZoneMinder-1.25.0
@@ -173,9 +173,8 @@
${INSTALL_DATA} ${WRKSRC}/zm.conf ${DESTDIR}${PREFIX}/${EGDIR}/config/zm.conf
${INSTALL_SCRIPT} ${WRKSRC}/scripts/zm ${DESTDIR}${PREFIX}/share/examples/rc.d/zoneminder
${INSTALL_DATA} ${WRKSRC}/db/*.sql ${DESTDIR}${PREFIX}/share/zoneminder/db/
- rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp
- rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events
- rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images
+ rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events || true
+ rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images || true
${LN} -s ${ZM_CACHE}/temp ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp
${LN} -s ${ZM_CACHE}/events ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events
${LN} -s ${ZM_CACHE}/images ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/distinfo
--- a/security/zoneminder/distinfo Sun Mar 24 16:46:37 2013 +0000
+++ b/security/zoneminder/distinfo Sun Mar 24 16:47:47 2013 +0000
@@ -1,18 +1,23 @@
-$NetBSD: distinfo,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: distinfo,v 1.2 2013/03/24 16:47:47 joerg Exp $
SHA1 (ZoneMinder-1.25.0.tar.gz) = a93a976a5cd82f1e197f4d7bd626d3f0387c4231
RMD160 (ZoneMinder-1.25.0.tar.gz) = 32a4f503770103e55bfe592864c1cab82e7395a6
Size (ZoneMinder-1.25.0.tar.gz) = 1119091 bytes
-SHA1 (patch-Makefile_am) = a66d11a5743a945801bec23c0611e1ec34b9e207
-SHA1 (patch-configure_ac) = 5f839d3f619096f843620079f491393d74d751ad
-SHA1 (patch-scripts_zm_in) = e8dd80bb6d00f17199a0e44d0b6490567bc005eb
-SHA1 (patch-src_Makefile_am) = 54ed8c43b964cc549ee6b78a569de552f617f5a7
-SHA1 (patch-src_zm_comms_cpp) = 8b786fa7c0a61ce94b9310df4ff14b4daec785c8
-SHA1 (patch-src_zm_comms_h) = 3436a563a8c1fedfca6daa325c017b9d2ed22f21
-SHA1 (patch-src_zm_logger_cpp) = 486f9ae99623ed4a8b20ddc0543f83217d85805d
-SHA1 (patch-src_zm_remote_camera_h) = b02a58a2422007aa6ab23338d4ffa9bb7679f165
-SHA1 (patch-src_zm_signal_h) = c40fb8c3265e042771058794c2f13f7a519a7390
-SHA1 (patch-src_zm_thread_cpp) = f1957ab1ea7bc80a1f8c2c129fddb7e4b541b87b
-SHA1 (patch-src_zmc_cpp) = bf8e745ceda9dc61c2d11c92e2ea9a9eb242a3b6
-SHA1 (patch-src_zmf_cpp) = 23707dd6493b11fd2b79dcbf9e09598ce286c07f
-SHA1 (patch-web_ajax_stream_php) = a3be6ae58c98c90807c764937ffe0f9a782a9de2
+SHA1 (patch-Makefile_am) = 09b3ba7f9c292ef672506219be66f059290b6405
+SHA1 (patch-configure_ac) = 87410ce8bc8fe42e08bf0e32e40b59619f7db90d
+SHA1 (patch-scripts_zm_in) = 91809c9a179a0135c432a0ffad7c2d2ddfd512de
+SHA1 (patch-src_Makefile_am) = 84999df8b7c80b049e2dd9cb308e12f50ed8285f
+SHA1 (patch-src_zm__thread.h) = 51b2868f6de36e6713f6f0a0cd5a40e8cfc7b943
+SHA1 (patch-src_zm__timer.h) = 38dae4f8573c7ae6d459adddf05260ce4b6e2088
+SHA1 (patch-src_zm__utils.cpp) = f6a109296146822014d57d39094390adcc5df760
+SHA1 (patch-src_zm__utils.h) = 361a69dfd4e2c3e46cf6fea3e1470df2e5cfa446
+SHA1 (patch-src_zm_comms_cpp) = d40932a3d0ae4375a649f200d973995d56aa71c7
+SHA1 (patch-src_zm_comms_h) = 69992d44e17d5c8e15cd4431f2fcb313e4891852
+SHA1 (patch-src_zm_logger_cpp) = 879077d2961ee735dd3e150aaf18a81117dc98db
+SHA1 (patch-src_zm_remote_camera_h) = 9df0e7f0eaab171b50560eb3490a4c5f44d066dc
+SHA1 (patch-src_zm_signal_h) = 226e96d4771921a8ad23fbe130a80a43550062d3
+SHA1 (patch-src_zm_thread_cpp) = c5f64697c3024c6c382f9ae2c5dbe9c21b529b6e
+SHA1 (patch-src_zmc_cpp) = d1046ddfad3a88bdd30501237834ec9e9fbc4c83
+SHA1 (patch-src_zmf_cpp) = 77dafa6ef6e9756b975e45b2ca41d1be85f9bf2c
+SHA1 (patch-web_Makefile.am) = ddb3815fa1b1799658034789302c8d3840f2b894
+SHA1 (patch-web_ajax_stream_php) = e8f811e63bedec03345b74db72c3d8014b3cc7f6
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-Makefile_am
--- a/security/zoneminder/patches/patch-Makefile_am Sun Mar 24 16:46:37 2013 +0000
+++ b/security/zoneminder/patches/patch-Makefile_am Sun Mar 24 16:47:47 2013 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-Makefile_am,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-Makefile_am,v 1.2 2013/03/24 16:47:47 joerg Exp $
Disable the hacks around ownership setup so Pkgsrc can take responsibility.
Don't install zm.conf at all - let Pkgsrc install it into EGDIR.
---- Makefile.am.orig 2009-03-21 01:07:10.000000000 +1300
-+++ Makefile.am 2010-11-23 00:34:37.003586001 +1300
-@@ -4,8 +4,8 @@
+--- Makefile.am.orig 2011-05-20 09:39:37.000000000 +0000
++++ Makefile.am
+@@ -4,8 +4,8 @@ AUTOMAKE_OPTIONS = gnu
webuser = @WEB_USER@
webgroup = @WEB_GROUP@
@@ -16,7 +16,7 @@
SUBDIRS = \
src \
-@@ -19,7 +19,7 @@
+@@ -19,7 +19,7 @@ EXTRA_DIST = \
zmconfgen.pl.in
# Yes, you are correct. This is a HACK!
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-configure_ac
--- a/security/zoneminder/patches/patch-configure_ac Sun Mar 24 16:46:37 2013 +0000
+++ b/security/zoneminder/patches/patch-configure_ac Sun Mar 24 16:47:47 2013 +0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-configure_ac,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-configure_ac,v 1.2 2013/03/24 16:47:47 joerg Exp $
Set PATH_BUILD to PREFIX/share/zoneminder, so that zmupdate.pl can locate the
database build scripts as installed files, not out of a probably non-existent
build directory. Correct shell syntax. Allow Pkgsrc to manage dlopen()
support.
---- configure.ac.orig 2011-08-24 03:10:32.000000000 +1200
-+++ configure.ac 2013-02-13 14:09:57.143689856 +1300
-@@ -2,9 +2,9 @@
+--- configure.ac.orig 2011-08-23 15:10:32.000000000 +0000
++++ configure.ac
+@@ -2,10 +2,10 @@ AC_PREREQ(2.59)
AC_INIT(zm,1.25.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/zm.h)
@@ -15,12 +15,13 @@
+AC_CONFIG_HEADERS(config.h)
-PATH_BUILD=`pwd`
+-AC_SUBST(PATH_BUILD)
+AC_DEFINE_DIR([DATA_ROOT_DIR],[datarootdir],[Expanded data directory])
--AC_SUBST(PATH_BUILD)
+AC_SUBST(PATH_BUILD, "$DATA_ROOT_DIR/zoneminder")
TIME_BUILD=`date +'%s'`
AC_SUBST(TIME_BUILD)
-@@ -19,31 +19,31 @@
+
+@@ -19,31 +19,31 @@ AC_ARG_VAR(ZM_RUNDIR,[Location of transi
AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /tmp/zm])
AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm])
@@ -61,7 +62,7 @@
AC_SUBST(ZM_LOGDIR,[/var/log/zm])
fi
-@@ -203,7 +203,7 @@
+@@ -203,7 +203,7 @@ AC_ARG_ENABLE(mmap,
filesystem which will normally be the case by default.
e.g. --enable-mmap=yes or --disable-mmap])
)
@@ -70,7 +71,7 @@
AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory")
else
AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory")
-@@ -254,7 +254,7 @@
+@@ -254,7 +254,7 @@ AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no)
AC_PATH_PROG(PATH_FFMPEG,ffmpeg)
AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no)
AC_PATH_PROG(PATH_NETPBM,pnmscale)
@@ -79,7 +80,7 @@
PATH_NETPBM=`dirname $PATH_NETPBM`
fi
-@@ -262,8 +262,8 @@
+@@ -262,8 +262,8 @@ fi
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
@@ -90,7 +91,7 @@
AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead]))
else
AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),)
-@@ -293,7 +293,7 @@
+@@ -293,7 +293,7 @@ AC_CHECK_HEADERS(syscall.h,,,)
AC_CHECK_HEADERS(pthread.h,,,)
AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),)
AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,0),)
@@ -99,7 +100,7 @@
AC_SUBST(ZM_HAS_V4L,1)
else
AC_SUBST(ZM_HAS_V4L,0)
-@@ -307,7 +307,7 @@
+@@ -307,7 +307,7 @@ AC_CHECK_HEADERS(libavformat/avformat.h,
AC_CHECK_HEADERS(libswscale/swscale.h,,,)
AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
@@ -108,7 +109,7 @@
AC_CHECK_HEADERS(sys/mman.h,,,)
AC_CHECK_HEADERS(fcntl.h,,,)
else
-@@ -317,7 +317,7 @@
+@@ -317,7 +317,7 @@ fi
AC_CHECK_HEADERS(zlib.h,,,)
AC_CHECK_DECLS(round,,,[#include <math.h>])
@@ -117,7 +118,7 @@
AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h>
#include <openssl/md5.h>])
else
-@@ -339,7 +339,7 @@
+@@ -339,7 +339,7 @@ AC_PROG_PERL_MODULES(Time::HiRes,,AC_MSG
AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip))
AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent))
AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker))
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-scripts_zm_in
--- a/security/zoneminder/patches/patch-scripts_zm_in Sun Mar 24 16:46:37 2013 +0000
+++ b/security/zoneminder/patches/patch-scripts_zm_in Sun Mar 24 16:47:47 2013 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-scripts_zm_in,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-scripts_zm_in,v 1.2 2013/03/24 16:47:47 joerg Exp $
/etc/rc.d/init.d/functions doesn't commonly exist.
The LOCKFILE feature appears unused, and requires a /var/lock/subsys directory
we don't have.
---- scripts/zm.in.orig 2010-11-23 01:26:38.000000000 +1300
-+++ scripts/zm.in 2010-11-23 01:26:46.000000000 +1300
+--- scripts/zm.in.orig 2011-06-22 10:42:16.000000000 +0000
++++ scripts/zm.in
@@ -4,12 +4,12 @@
# processname: zmpkg.pl
@@ -22,7 +22,7 @@
loadconf()
{
-@@ -50,7 +50,7 @@
+@@ -50,7 +50,7 @@ start()
RETVAL=$?
[ $RETVAL = 0 ] && success || failure
echo
@@ -31,7 +31,7 @@
return $RETVAL
}
-@@ -62,7 +62,7 @@
+@@ -62,7 +62,7 @@ stop()
RETVAL=$?
[ $RETVAL = 0 ] && success || failure
echo
@@ -40,7 +40,7 @@
}
zmstatus()
-@@ -103,7 +103,7 @@
+@@ -103,7 +103,7 @@ case "$1" in
result=`$ZM_PATH_BIN/zmdc.pl check`
if [ "$result" = "running" ]; then
$ZM_PATH_BIN/zmdc.pl shutdown > /dev/null
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-src_Makefile_am
--- a/security/zoneminder/patches/patch-src_Makefile_am Sun Mar 24 16:46:37 2013 +0000
+++ b/security/zoneminder/patches/patch-src_Makefile_am Sun Mar 24 16:47:47 2013 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_Makefile_am,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_Makefile_am,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't pointlessly chown zms. Don't setuid zmfix here, let Pkgsrc deal with
that.
---- src/Makefile.am.orig 2010-11-23 01:57:40.000000000 +1300
-+++ src/Makefile.am 2010-11-23 01:58:47.000000000 +1300
-@@ -124,8 +124,8 @@
+--- src/Makefile.am.orig 2011-06-21 07:40:14.000000000 +0000
++++ src/Makefile.am
+@@ -125,8 +125,8 @@ dist-hook:
# Yes, you are correct. This is a HACK!
install-exec-hook:
( cd $(DESTDIR)@bindir@; mkdir -p $(DESTDIR)$(cgidir); mv zms $(DESTDIR)$(cgidir) )
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-src_zm__thread.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/zoneminder/patches/patch-src_zm__thread.h Sun Mar 24 16:47:47 2013 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_zm__thread.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_thread.h.orig 2009-06-08 09:20:17.000000000 +0000
++++ src/zm_thread.h
+@@ -27,7 +27,7 @@
+ class ThreadException : public Exception
+ {
+ public:
+- ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
++ ThreadException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)syscall(224) ) )
+ {
+ }
+ };
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-src_zm__timer.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/zoneminder/patches/patch-src_zm__timer.h Sun Mar 24 16:47:47 2013 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_zm__timer.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_timer.h.orig 2008-07-25 09:33:24.000000000 +0000
++++ src/zm_timer.h
+@@ -30,7 +30,7 @@ private:
+ class TimerException : public Exception
+ {
+ public:
+- TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
++ TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)syscall(224) ) )
+ {
+ }
+ };
diff -r 90acff0b3fac -r 144e8a19338a security/zoneminder/patches/patch-src_zm__utils.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/zoneminder/patches/patch-src_zm__utils.cpp Sun Mar 24 16:47:47 2013 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_zm__utils.cpp,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_utils.cpp.orig 2011-06-21 09:19:11.000000000 +0000
++++ src/zm_utils.cpp
+@@ -38,21 +38,6 @@ const std::string stringtf( const char *
+ return( tempString );
+ }
Home |
Main Index |
Thread Index |
Old Index