diff options
-rw-r--r-- | UPDATING | 25 | ||||
-rw-r--r-- | multimedia/motion/Makefile | 19 | ||||
-rw-r--r-- | multimedia/motion/files/motion.in | 2 | ||||
-rw-r--r-- | multimedia/motion/files/patch-configure.ac | 2 | ||||
-rw-r--r-- | multimedia/motion/files/patch-netcam.c | 50 | ||||
-rw-r--r-- | multimedia/motion/files/pkg-message.in | 2 |
6 files changed, 86 insertions, 14 deletions
@@ -5,6 +5,31 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20170129: + AFFECTS: users of multimedia/motion + AUTHOR: jhale@FreeBSD.org + + Version 3.x expected the configuration files to reside in: + ${LOCALBASE}/etc + Version 4.x expects the configuration files to reside in: + ${LOCALBASE}/etc/motion + This was unfortunately overlooked when the port was updated to 4.x, but it + has now been fixed to install the default configuration file in the new + location. The rc script now checks for motion.conf in the new location. + + While you may be able to simply copy your old motion.conf to the new location, + it is recommended to review ${LOCALBASE}/etc/motion/motion.conf and make + changes to it based on your old ${LOCALBASE}/etc/motion.conf as some options + have been added and removed. + + Further, if you use motion with multiple cameras and have + ${LOCALBASE}/etc/thread[0-9].conf files, they should be moved to + ${LOCALBASE}/etc/motion as well. These files are deprecated and should be + renamed to camera[0-9].conf and in motion.conf, lines like: + thread /usr/local/etc/thread1.conf + Should be converted to: + camera /usr/local/etc/motion/camera1.conf + 20170127: AFFECTS: users of www/uwsgi AUTHOR: feld@FreeBSD.org diff --git a/multimedia/motion/Makefile b/multimedia/motion/Makefile index e7a2de0cc228..23e9fab92e1d 100644 --- a/multimedia/motion/Makefile +++ b/multimedia/motion/Makefile @@ -3,7 +3,7 @@ PORTNAME= motion PORTVERSION= 4.0.1 -PORTREVISION= 1 +PORTREVISION= 2 DISTVERSIONPREFIX= release- CATEGORIES= multimedia @@ -31,17 +31,19 @@ SUB_FILES= pkg-message PLIST_FILES= bin/motion \ man/man1/motion.1.gz \ - "@sample etc/motion.conf.sample" + "@sample ${ETCDIR}/motion.conf.sample" \ + "@dir ${ETCDIR}/conf.d" PORTDOCS= CHANGELOG CREDITS README.md README.FreeBSD \ - motion_guide.html + motion_guide.html mask1.png normal.jpg \ + outputmotion1.jpg outputnormal1.jpg PORTEXAMPLES= camera1-dist.conf camera2-dist.conf \ camera3-dist.conf camera4-dist.conf OPTIONS_DEFINE= DOCS EXAMPLES FFMPEG MYSQL PGSQL SQLITE3 -OPTIONS_SINGLE= VIDEO -OPTIONS_SINGLE_VIDEO= BKTR PWCBSD +OPTIONS_RADIO= VIDEO +OPTIONS_RADIO_VIDEO= BKTR PWCBSD OPTIONS_DEFAULT= BKTR FFMPEG -VIDEO_DESC= Video capture driver +VIDEO_DESC= Video capture driver (Netcam support only if none selected) BKTR_DESC= BKTR based TV capture cards BKTR_CONFIGURE_WITH= bktr @@ -87,12 +89,13 @@ post-patch: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/motion ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/motion.1 ${STAGEDIR}${MANPREFIX}/man/man1 + @${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d ${INSTALL_DATA} ${WRKSRC}/motion-dist.conf \ - ${STAGEDIR}${PREFIX}/etc/motion.conf.sample + ${STAGEDIR}${ETCDIR}/motion.conf.sample do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} do-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} diff --git a/multimedia/motion/files/motion.in b/multimedia/motion/files/motion.in index 84288a5fb0c3..b556007fc39b 100644 --- a/multimedia/motion/files/motion.in +++ b/multimedia/motion/files/motion.in @@ -21,6 +21,6 @@ load_rc_config $name command=%%PREFIX%%/bin/${name} pidfile="/var/run/${name}.pid" -required_files=%%PREFIX%%/etc/${name}.conf +required_files=%%ETCDIR%%/${name}.conf run_rc_command "$1" diff --git a/multimedia/motion/files/patch-configure.ac b/multimedia/motion/files/patch-configure.ac index 3f410068b73d..5b912fefb47a 100644 --- a/multimedia/motion/files/patch-configure.ac +++ b/multimedia/motion/files/patch-configure.ac @@ -5,7 +5,7 @@ AC_MSG_CHECKING(for V42L support) AC_MSG_RESULT(skipping) -else -+elif test "${BKTR}" = "no"; then ++elif test "${PWCBSD}" = "yes"; then AC_CHECK_TYPE([struct v4l2_buffer], [SUPPORTED_V4L2=true], [SUPPORTED_V4L2=false], diff --git a/multimedia/motion/files/patch-netcam.c b/multimedia/motion/files/patch-netcam.c index 6ef89148a628..017c09692cad 100644 --- a/multimedia/motion/files/patch-netcam.c +++ b/multimedia/motion/files/patch-netcam.c @@ -1,13 +1,57 @@ -Fix sockaddr type mismatch warnings (Fixed upstream in dbd7282) +Fix netcam getaddrinfo/connect usage (Fixed upstream in be2328a) --- netcam.c.orig 2016-10-25 01:39:24 UTC +++ netcam.c -@@ -948,7 +948,7 @@ static int netcam_connect(netcam_context +@@ -840,8 +840,7 @@ static void netcam_disconnect(netcam_con + */ + static int netcam_connect(netcam_context_ptr netcam, int err_flag) + { +- struct sockaddr_in6 server; /* For connect */ +- struct addrinfo *ai; /* For getaddrinfo */ ++ struct addrinfo *ai; + int ret; + int saveflags; + int back_err; +@@ -851,8 +850,11 @@ static int netcam_connect(netcam_context + fd_set fd_w; + struct timeval selecttime; + ++ char port[15]; ++ sprintf(port,"%u",netcam->connect_port); ++ + /* Lookup the hostname given in the netcam URL. */ +- if ((ret = getaddrinfo(netcam->connect_host, NULL, NULL, &ai)) != 0) { ++ if ((ret = getaddrinfo(netcam->connect_host, port, NULL, &ai)) != 0) { + if (!err_flag) + MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO, "%s: getaddrinfo() failed (%s): %s", + netcam->connect_host, gai_strerror(ret)); +@@ -920,16 +922,6 @@ static int netcam_connect(netcam_context + netcam->sock); + + /* +- * Fill the hostname details into the 'server' structure and +- * attempt to connect to the remote server. +- */ +- memset(&server, 0, sizeof(server)); +- memcpy(&server, ai->ai_addr, sizeof(server)); +- server.sin6_family = ai->ai_family; +- server.sin6_port = htons(netcam->connect_port); +- freeaddrinfo(ai); +- +- /* + * We set the socket non-blocking and then use a 'select' + * system call to control the timeout. + */ +@@ -948,9 +940,11 @@ static int netcam_connect(netcam_context } /* Now the connect call will return immediately. */ - ret = connect(netcam->sock, &server, sizeof(server)); -+ ret = connect(netcam->sock, (struct sockaddr *)&server, sizeof(server)); ++ ret = connect(netcam->sock, ai->ai_addr, ai->ai_addrlen); back_err = errno; /* Save the errno from connect */ ++ freeaddrinfo(ai); ++ /* If the connect failed with anything except EINPROGRESS, error. */ + if ((ret < 0) && (back_err != EINPROGRESS)) { + if (!err_flag) diff --git a/multimedia/motion/files/pkg-message.in b/multimedia/motion/files/pkg-message.in index ef83fc9e8a6a..8d9fceba10f8 100644 --- a/multimedia/motion/files/pkg-message.in +++ b/multimedia/motion/files/pkg-message.in @@ -1,7 +1,7 @@ **************************************************************** To use the motion service properly, you should edit - %%PREFIX%%/etc/motion.conf + %%ETCDIR%%/motion.conf according to your needs. |