Hello community, here is the log from the commit of package motion for openSUSE:Factory checked in at 2018-03-08 10:58:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/motion (Old) and /work/SRC/openSUSE:Factory/.motion.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "motion" Thu Mar 8 10:58:22 2018 rev:3 rq:583843 version:4.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/motion/motion.changes 2017-11-27 22:17:01.577650562 +0100 +++ /work/SRC/openSUSE:Factory/.motion.new/motion.changes 2018-03-08 10:58:26.347297840 +0100 @@ -1,0 +2,12 @@ +Wed Mar 7 10:05:53 UTC 2018 - [email protected] + +- Update to 4.1.1: + https://motion-project.github.io/motion_news.html + + Fixes: + - Build on musl based systems + - jpeg decompression error processing + - image saving when using highres option + - filename for debug movie correction + +------------------------------------------------------------------- Old: ---- release-4.1.tar.gz New: ---- release-4.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ motion.spec ++++++ --- /var/tmp/diff_new_pack.r4KBzp/_old 2018-03-08 10:58:29.387187960 +0100 +++ /var/tmp/diff_new_pack.r4KBzp/_new 2018-03-08 10:58:29.387187960 +0100 @@ -1,7 +1,7 @@ # # spec file for package motion # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ %define spooldir /var/spool/motion Name: motion -Version: 4.1 +Version: 4.1.1 Release: 0 Summary: A motion detection system License: GPL-2.0+ ++++++ release-4.1.tar.gz -> release-4.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/.travis.yml new/motion-release-4.1.1/.travis.yml --- old/motion-release-4.1/.travis.yml 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/.travis.yml 2017-12-10 02:05:49.000000000 +0100 @@ -37,9 +37,18 @@ services: docker language: c compiler: gcc + - os: linux + env: DOCKER_IMAGE=alpine:latest + services: docker + language: c + compiler: gcc before_install: - - if [ "x$DOCKER_IMAGE" != "x" ]; then + - if [ "$DOCKER_IMAGE" = "alpine:latest" ]; then + echo $DOCKER_IMAGE; + docker pull $DOCKER_IMAGE; + docker run -d -v $(pwd):/motion -w /motion $DOCKER_IMAGE /bin/sh -c 'while true; do sleep 1; done'; + elif [ "x$DOCKER_IMAGE" != "x" ]; then echo $DOCKER_IMAGE; docker pull $DOCKER_IMAGE; docker run -d -v $(pwd):/motion -w /motion $DOCKER_IMAGE /bin/bash -c 'while true; do sleep 1; done'; @@ -50,11 +59,13 @@ brew upgrade ffmpeg pkg-config jpeg; brew install ffmpeg pkg-config libjpeg; autoreconf -fiv; - fi; - - if [ "$BUILD_IMAGE" = "14.04" ]; then + elif [ "$BUILD_IMAGE" = "14.04" ]; then autoreconf -fiv; - fi; - - if [ "x$DOCKER_IMAGE" != "x" ]; then + elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then + docker exec $(docker ps -aq) /bin/sh -c 'apk update'; + docker exec $(docker ps -aq) /bin/sh -c 'apk add alpine-sdk autoconf automake pkgconf libtool libjpeg-turbo-dev libzip-dev ffmpeg-dev'; + docker exec $(docker ps -aq) /bin/sh -c 'autoreconf -fiv'; + elif [ "x$DOCKER_IMAGE" != "x" ]; then docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update'; docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake pkgconf libtool git'; docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev'; @@ -65,10 +76,10 @@ script: - if [ $TRAVIS_OS_NAME = osx ]; then ./configure --with-developer-flags && make; - fi; - - if [ "$BUILD_IMAGE" = "14.04" ]; then + elif [ "$BUILD_IMAGE" = "14.04" ]; then ./test_builds.sh; - fi; - - if [ "x$DOCKER_IMAGE" != "x" ]; then + elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then + docker exec $(docker ps -aq) /bin/sh -c './test_builds.sh'; + elif [ "x$DOCKER_IMAGE" != "x" ]; then docker exec $(docker ps -aq) /bin/bash -c './test_builds.sh'; fi; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/CHANGELOG new/motion-release-4.1.1/CHANGELOG --- old/motion-release-4.1/CHANGELOG 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/CHANGELOG 2017-12-10 02:05:49.000000000 +0100 @@ -1,4 +1,10 @@ Summary of Changes +Version 4.1.1 Changes Below + * Fix file name for debug movies + * Fix image saving when using highres option + * Add error checking of jpeg decompression. + * Fix version script for old distributions. + * Fix building on musl based systems. Version 4.1 Changes Below * Add flip_axis option * Add mask_privacy option diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/configure.ac new/motion-release-4.1.1/configure.ac --- old/motion-release-4.1/configure.ac 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/configure.ac 2017-12-10 02:05:49.000000000 +0100 @@ -128,19 +128,54 @@ if test x$THREADS = xyes; then TEMP_LIBS="$TEMP_LIBS -pthread" TEMP_CFLAGS="${TEMP_CFLAGS} -D_THREAD_SAFE" -fi ############################################################################## ### Check for pthread_setname_np (nonstandard GNU extension) ############################################################################## -AC_MSG_CHECKING([for pthread_setname_np]) -AC_COMPILE_IFELSE( + AC_MSG_CHECKING([for pthread_setname_np]) + HOLD_LIBS="$LIBS" + LIBS="$TEMP_LIBS" + AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include <pthread.h>], [pthread_setname_np(pthread_self(), "name")])], [AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define if you have pthread_setname_np function.]) AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])] ) ############################################################################## +### Check for pthread_getname_np (nonstandard GNU extension) +############################################################################## + AC_MSG_CHECKING([for pthread_getname_np]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include <pthread.h>], [pthread_getname_np(pthread_self(), NULL, 0)])], + [AC_DEFINE([HAVE_PTHREAD_GETNAME_NP], [1], [Define if you have pthread_getname_np function.]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] ) + + LIBS="$HOLD_LIBS" +fi + +############################################################################## +### Check for XSI strerror_r +############################################################################## +AC_MSG_CHECKING([for XSI strerror_r]) +HOLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror" +AC_LINK_IFELSE( + [AC_LANG_SOURCE[ + #include <string.h> + #include <errno.h> + int main(int argc, char** argv) { + char buf[1024]; + int ret = strerror_r(ENOMEM, buf, sizeof(buf)); + return ret; + } + ]], + [AC_DEFINE([XSI_STRERROR_R], [1], [Define if you have XSI strerror_r function.]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] ) +CFLAGS="$HOLD_CFLAGS" + +############################################################################## ### Check for JPG ############################################################################## AC_CHECK_HEADERS(setjmp.h jerror.h jpeglib.h,[JPGS="yes"],[JPGS="no"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/event.c new/motion-release-4.1.1/event.c --- old/motion-release-4.1/event.c 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/event.c 2017-12-10 02:05:49.000000000 +0100 @@ -788,7 +788,7 @@ cnt->ffmpeg_output_debug->tlapse = TIMELAPSE_NONE; cnt->ffmpeg_output_debug->fps = cnt->movie_fps; cnt->ffmpeg_output_debug->bps = cnt->conf.ffmpeg_bps; - cnt->ffmpeg_output_debug->filename = cnt->newfilename; + cnt->ffmpeg_output_debug->filename = cnt->motionfilename; cnt->ffmpeg_output_debug->vbr = cnt->conf.ffmpeg_vbr; cnt->ffmpeg_output_debug->start_time.tv_sec = currenttime_tv->tv_sec; cnt->ffmpeg_output_debug->start_time.tv_usec = currenttime_tv->tv_usec; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/jpegutils.c new/motion-release-4.1.1/jpegutils.c --- old/motion-release-4.1/jpegutils.c 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/jpegutils.c 2017-12-10 02:05:49.000000000 +0100 @@ -66,6 +66,7 @@ JMETHOD(void, original_emit_message, (j_common_ptr cinfo, int msg_level)); /* Was a corrupt-data warning seen. */ int warning_seen; + int error_seen; }; /* These huffman tables are required by the old jpeg libs included with 14.04 */ @@ -290,6 +291,8 @@ MOTION_LOG(ERR, TYPE_ALL, NO_ERRNO, "%s", buffer); + myerr->error_seen++ ; + /* Return control to the setjmp point. */ longjmp (myerr->setjmp_buffer, 1); } @@ -360,6 +363,7 @@ jerr.original_emit_message = jerr.pub.emit_message; jerr.pub.emit_message = jpgutl_emit_message; jerr.warning_seen = 0; + jerr.error_seen = 0; jpeg_create_decompress (&dinfo); @@ -370,14 +374,31 @@ } jpgutl_buffer_src (&dinfo, jpeg_data_in, jpeg_data_len); + if (jerr.error_seen > 0){ + MOTION_LOG(DBG, TYPE_VIDEO, NO_ERRNO,"jpgutl_buffer_src returned error"); + jpeg_destroy_decompress(&dinfo); + return -1; + } jpeg_read_header (&dinfo, TRUE); + if (jerr.error_seen > 0){ + MOTION_LOG(DBG, TYPE_VIDEO, NO_ERRNO,"jpeg_read_header returned error"); + jpeg_destroy_decompress(&dinfo); + return -1; + } //420 sampling is the default for YCbCr so no need to override. dinfo.out_color_space = JCS_YCbCr; dinfo.dct_method = JDCT_DEFAULT; + guarantee_huff_tables(&dinfo); /* Required by older versions of the jpeg libs */ + jpeg_start_decompress (&dinfo); + if (jerr.error_seen > 0){ + MOTION_LOG(DBG, TYPE_VIDEO, NO_ERRNO,"jpeg_start_decompress returned error"); + jpeg_destroy_decompress(&dinfo); + return -1; + } if ((dinfo.output_width == 0) || (dinfo.output_height == 0)) { MOTION_LOG(WRN, TYPE_VIDEO, NO_ERRNO,"Invalid JPEG image dimensions"); @@ -406,6 +427,11 @@ while (dinfo.output_scanline < dinfo.output_height) { jpeg_read_scanlines(&dinfo, line, 1); + if (jerr.error_seen > 0){ + MOTION_LOG(DBG, TYPE_VIDEO, NO_ERRNO,"jpeg_read_scanlines returned error"); + jpeg_destroy_decompress(&dinfo); + return -1; + } for (i = 0; i < (dinfo.output_width * 3); i += 3) { img_y[i / 3] = wline[i]; @@ -424,6 +450,12 @@ } jpeg_finish_decompress(&dinfo); + if (jerr.error_seen > 0){ + MOTION_LOG(DBG, TYPE_VIDEO, NO_ERRNO,"jpeg_finish_decompress returned error"); + jpeg_destroy_decompress(&dinfo); + return -1; + } + jpeg_destroy_decompress(&dinfo); /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/logger.c new/motion-release-4.1.1/logger.c --- old/motion-release-4.1/logger.c 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/logger.c 2017-12-10 02:05:49.000000000 +0100 @@ -206,10 +206,8 @@ */ errno_save = errno; - char threadname[32] = "unknown"; -#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP) || defined(__APPLE__)) - pthread_getname_np(pthread_self(), threadname, sizeof(threadname)); -#endif + char threadname[32]; + util_threadname_get(threadname); /* * Prefix the message with the thread number and name, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/motion.c new/motion-release-4.1.1/motion.c --- old/motion-release-4.1/motion.c 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/motion.c 2017-12-10 02:05:49.000000000 +0100 @@ -3772,7 +3772,7 @@ void util_threadname_get(char *threadname){ -#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP) || defined(__APPLE__)) +#if ((!defined(BSD) && HAVE_PTHREAD_GETNAME_NP) || defined(__APPLE__)) char currname[16]; pthread_getname_np(pthread_self(), currname, sizeof(currname)); snprintf(threadname, sizeof(currname), "%s",currname); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/motion.h new/motion-release-4.1.1/motion.h --- old/motion-release-4.1/motion.h 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/motion.h 2017-12-10 02:05:49.000000000 +0100 @@ -100,12 +100,6 @@ #define ATTRIBUTE_UNUSED #endif -/* strerror_r() XSI vs GNU */ -#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) -#define XSI_STRERROR_R -#endif - - /* * The macro below defines a version of sleep using nanosleep * If a signal such as SIG_CHLD interrupts the sleep we just continue sleeping diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/picture.c new/motion-release-4.1.1/picture.c --- old/motion-release-4.1/picture.c 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/picture.c 2017-12-10 02:05:49.000000000 +0100 @@ -1194,6 +1194,7 @@ char previewname[PATH_MAX]; char filename[PATH_MAX]; struct image_data *saved_current_image; + int passthrough; if (cnt->imgs.preview_image.diffs) { /* Save current global context. */ @@ -1217,7 +1218,14 @@ previewname[basename_len] = '\0'; strcat(previewname, imageext(cnt)); - put_picture(cnt, previewname, cnt->imgs.preview_image.image_norm , FTYPE_IMAGE); + + passthrough = util_check_passthrough(cnt); + if ((cnt->imgs.size_high > 0) && (!passthrough)) { + put_picture(cnt, previewname, cnt->imgs.preview_image.image_high , FTYPE_IMAGE); + } else { + put_picture(cnt, previewname, cnt->imgs.preview_image.image_norm , FTYPE_IMAGE); + } + } else { /* * Save best preview-shot also when no movies are recorded or imagepath @@ -1236,7 +1244,12 @@ mystrftime(cnt, filename, sizeof(filename), imagepath, &cnt->imgs.preview_image.timestamp_tv, NULL, 0); snprintf(previewname, PATH_MAX, "%s/%s.%s", cnt->conf.filepath, filename, imageext(cnt)); - put_picture(cnt, previewname, cnt->imgs.preview_image.image_norm, FTYPE_IMAGE); + passthrough = util_check_passthrough(cnt); + if ((cnt->imgs.size_high > 0) && (!passthrough)) { + put_picture(cnt, previewname, cnt->imgs.preview_image.image_high , FTYPE_IMAGE); + } else { + put_picture(cnt, previewname, cnt->imgs.preview_image.image_norm, FTYPE_IMAGE); + } } /* Restore global context values. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/stream.c new/motion-release-4.1.1/stream.c --- old/motion-release-4.1/stream.c 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/stream.c 2017-12-10 02:05:49.000000000 +0100 @@ -25,7 +25,7 @@ #include <arpa/inet.h> #include <netdb.h> #include <ctype.h> -#include <sys/fcntl.h> +#include <fcntl.h> #define STREAM_REALM "Motion Stream Security Access" #define KEEP_ALIVE_TIMEOUT 100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/motion-release-4.1/version.sh new/motion-release-4.1.1/version.sh --- old/motion-release-4.1/version.sh 2017-11-11 04:47:06.000000000 +0100 +++ new/motion-release-4.1.1/version.sh 2017-12-10 02:05:49.000000000 +0100 @@ -1,9 +1,17 @@ #!/bin/sh -BASE_VERSION="4.1" +BASE_VERSION="4.1.1" if [ -d .git ]; then - GIT_COMMIT=`git show -s --date=format:'%Y%m%d' --format=%cd-%h` + if test "`git diff --name-only`" = "" ; then + GIT_COMMIT="git" + else + GIT_COMMIT="dirty" + fi + GIT_COMMIT=$GIT_COMMIT`git show -s --date=format:'%Y%m%d' --format=%cd-%h` 2>/dev/null + if [ $? -ne 0 ]; then + GIT_COMMIT=$GIT_COMMIT`git show -s --format=%h` + fi printf "$BASE_VERSION" - #printf "$BASE_VERSION+git$GIT_COMMIT" + #printf "$BASE_VERSION+$GIT_COMMIT" else printf "$BASE_VERSION" #printf "$BASE_VERSION+gitUNKNOWN"
