Hello community, here is the log from the commit of package camsource for openSUSE:Factory checked in at 2013-01-22 18:17:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/camsource (Old) and /work/SRC/openSUSE:Factory/.camsource.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "camsource", Maintainer is "meiss...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/camsource/camsource.changes 2013-01-20 07:45:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.camsource.new/camsource.changes 2013-01-22 18:17:22.000000000 +0100 @@ -1,0 +2,9 @@ +Tue Jan 22 08:39:54 UTC 2013 - matwey.korni...@gmail.com + +- An alternative fix for bnc#714439, we don't need any wrappers while + we can recompile apps from the sources +- Add camsource-v4l1.patch +- Drop camsource-v4l-2.6.38.patch +- Drop camsource-rename.patch + +------------------------------------------------------------------- Old: ---- camsource-rename.patch camsource-v4l-2.6.38.patch New: ---- camsource-v4l1.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ camsource.spec ++++++ --- /var/tmp/diff_new_pack.aRWiJT/_old 2013-01-22 18:17:24.000000000 +0100 +++ /var/tmp/diff_new_pack.aRWiJT/_new 2013-01-22 18:17:24.000000000 +0100 @@ -22,7 +22,6 @@ BuildRequires: pkgconfig(libxml-2.0) %if 0%{?suse_version} >= 1210 BuildRequires: libv4l-devel >= 0.8.4 -Requires: libv4l >= 0.8.4 %endif Version: 0.7.0 Release: 0 @@ -33,9 +32,9 @@ Source: camsource-%{version}.tar.gz Patch0: camsource-no_label_at_end.diff Patch1: camsource-no_implicit_decls.diff -Patch2: camsource-v4l-2.6.38.patch %if 0%{?suse_version} >= 1210 -Patch3: camsource-rename.patch +# PATCH-FIX-UPSTREAM camsource-v4l1.patch [bnc#714439] +Patch2: camsource-v4l1.patch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -61,7 +60,6 @@ %patch1 %if 0%{?suse_version} >= 1210 %patch2 -p1 -%patch3 %endif %build @@ -75,22 +73,11 @@ %install %make_install mv %{buildroot}%{_sysconfdir}/camsource.conf.example %{buildroot}%{_sysconfdir}/camsource.conf -%if 0%{?suse_version} >= 1210 -mv %{buildroot}%{_bindir}/camsource %{buildroot}%{_bindir}/camsource.bin -echo '#!/bin/bash -export LD_PRELOAD="%{_libdir}/libv4l/v4l1compat.so" -exec "%{_bindir}/camsource.bin" "$@" -' > %{buildroot}%{_bindir}/camsource -chmod --reference=%{buildroot}%{_bindir}/camsource.bin %{buildroot}%{_bindir}/camsource -%endif %files %defattr(-,root,root) %doc AUTHORS COPYING INSTALL ChangeLog README NEWS camsource.conf.example %{_bindir}/camsource -%if 0%{?suse_version} >= 1210 -%{_bindir}/camsource.bin -%endif %{_libdir}/camsource %config(noreplace) %{_sysconfdir}/camsource.conf ++++++ camsource-v4l-2.6.38.patch -> camsource-v4l1.patch ++++++ --- /work/SRC/openSUSE:Factory/camsource/camsource-v4l-2.6.38.patch 2011-09-23 01:53:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.camsource.new/camsource-v4l1.patch 2013-01-22 18:17:22.000000000 +0100 @@ -1,49 +1,264 @@ -diff -ur camsource-0.7.0.orig/configure.ac camsource-0.7.0/configure.ac ---- camsource-0.7.0.orig/configure.ac 2011-07-07 11:32:54.819089455 +0200 -+++ camsource-0.7.0/configure.ac 2011-07-07 11:33:12.968089451 +0200 +--- camsource-0.7.0/configure.ac 2003-05-01 14:27:00.000000000 +0400 ++++ camsource-0.7.0.new/configure.ac 2013-01-19 13:23:29.628830443 +0400 @@ -13,7 +13,7 @@ AC_C_BIGENDIAN AC_HEADER_STDC -AC_CHECK_HEADER(linux/videodev.h,, [AC_MSG_ERROR([Could not find linux/videodev.h])]) -+AC_CHECK_HEADER(libv4l1-videodev.h,, [AC_MSG_ERROR([Could not find libv4l1-videodev.h])]) ++AC_CHECK_HEADER(libv4l1.h,, [AC_MSG_ERROR([Could not find libv4l1.h])]) AC_CHECK_HEADER(jpeglib.h,, [AC_MSG_ERROR([Could not find jpeglib.h])]) AC_FUNC_MALLOC -diff -ur camsource-0.7.0.orig/src/input_v4l.c camsource-0.7.0/src/input_v4l.c ---- camsource-0.7.0.orig/src/input_v4l.c 2011-07-07 11:32:54.821089455 +0200 -+++ camsource-0.7.0/src/input_v4l.c 2011-07-07 11:33:12.969089451 +0200 +@@ -25,6 +25,7 @@ + AC_CHECK_SIZEOF(long) + + # Libs for main prog ++AC_CHECK_LIB(v4l1, v4l1_open,, [AC_MSG_ERROR([Could not find libv4l1])]) + AC_CHECK_LIB(dl, dlopen,, [AC_MSG_ERROR([Could not find dynamic link lib])]) + AC_CHECK_LIB(pthread, pthread_create,, [AC_MSG_ERROR([Could not find posix thread lib])]) + +--- camsource-0.7.0/src/input_v4l.c 2003-04-21 01:53:35.000000000 +0400 ++++ camsource-0.7.0.new/src/input_v4l.c 2013-01-19 13:38:53.060346764 +0400 @@ -3,7 +3,7 @@ #include <string.h> #include <errno.h> #include <libxml/parser.h> -#include <linux/videodev.h> -+#include <libv4l1-videodev.h> ++#include <libv4l1.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> -diff -ur camsource-0.7.0.orig/src/unpalette.c camsource-0.7.0/src/unpalette.c ---- camsource-0.7.0.orig/src/unpalette.c 2011-07-07 11:33:02.801089454 +0200 -+++ camsource-0.7.0/src/unpalette.c 2011-07-07 11:33:12.969089451 +0200 -@@ -1,7 +1,7 @@ - #include <stdio.h> - #include <sys/types.h> - #include <string.h> --#include <linux/videodev.h> -+#include <libv4l1-videodev.h> +@@ -113,19 +113,19 @@ + } + } + +- newcamdev.fd = open(path, O_RDONLY); ++ newcamdev.fd = v4l1_open(path, O_RDONLY); + if (newcamdev.fd < 0) + { + printf("Unable to open %s (%s)\n", path, strerror(errno)); + return -1; + } + +- ret = ioctl(newcamdev.fd, VIDIOCGCAP, &newcamdev.vidcap); ++ ret = v4l1_ioctl(newcamdev.fd, VIDIOCGCAP, &newcamdev.vidcap); + if (ret != 0) + { + printf("ioctl \"get video cap\" failed: %s\n", strerror(errno)); + closenerr: +- close(newcamdev.fd); ++ v4l1_close(newcamdev.fd); + return -1; + } + if (!(newcamdev.vidcap.type & VID_TYPE_CAPTURE)) +@@ -140,7 +140,7 @@ + vidchan.channel = channel; + if (norm >= 0) + vidchan.norm = norm; +- ret = ioctl(newcamdev.fd, VIDIOCSCHAN, &vidchan); ++ ret = v4l1_ioctl(newcamdev.fd, VIDIOCSCHAN, &vidchan); + if (ret) + printf("ioctl \"set input channel\" failed, continuing anyway: %s\n", strerror(errno)); + } +@@ -158,14 +158,14 @@ - #include "config.h" + vidwin.flags |= (fps & 0x3f) << 16; + +- ret = ioctl(newcamdev.fd, VIDIOCSWIN, &vidwin); ++ ret = v4l1_ioctl(newcamdev.fd, VIDIOCSWIN, &vidwin); + if (ret != 0) + { + printf("ioctl \"set grab window\" failed: %s\n", strerror(errno)); + printf("Trying again without the fps option...\n"); + + vidwin.flags &= ~(0x3f << 16); +- ret = ioctl(newcamdev.fd, VIDIOCSWIN, &vidwin); ++ ret = v4l1_ioctl(newcamdev.fd, VIDIOCSWIN, &vidwin); + + if (!ret) { + printf("ioctl \"set grab window\" succeeded without fps option.\n"); +@@ -181,12 +181,12 @@ + } + } + else { +- ret = ioctl(newcamdev.fd, VIDIOCGWIN, &vidwin); ++ ret = v4l1_ioctl(newcamdev.fd, VIDIOCGWIN, &vidwin); + if (!ret) +- ioctl(newcamdev.fd, VIDIOCSWIN, &vidwin); ++ v4l1_ioctl(newcamdev.fd, VIDIOCSWIN, &vidwin); + } + +- ret = ioctl(newcamdev.fd, VIDIOCGPICT, &newcamdev.vidpic); ++ ret = v4l1_ioctl(newcamdev.fd, VIDIOCGPICT, &newcamdev.vidpic); + if (ret != 0) + { + printf("ioctl \"get pict props\" failed: %s\n", strerror(errno)); +@@ -206,8 +206,8 @@ + newcamdev.vidpic.contrast = contrast; + if (whiteness >= 0) + newcamdev.vidpic.whiteness = whiteness; +- ioctl(newcamdev.fd, VIDIOCSPICT, &newcamdev.vidpic); +- ioctl(newcamdev.fd, VIDIOCGPICT, &newcamdev.vidpic); ++ v4l1_ioctl(newcamdev.fd, VIDIOCSPICT, &newcamdev.vidpic); ++ v4l1_ioctl(newcamdev.fd, VIDIOCGPICT, &newcamdev.vidpic); + if (newcamdev.vidpic.palette == pal->val) + goto palfound; /* break */ + } +@@ -247,7 +247,7 @@ + if (camdev->usemmap < 0) + { + do +- ret = ioctl(camdev->fd, VIDIOCGMBUF, &camdev->mbuf); ++ ret = v4l1_ioctl(camdev->fd, VIDIOCGMBUF, &camdev->mbuf); + while (ret < 0 && errno == EINTR); + if (ret < 0) + { +@@ -256,7 +256,7 @@ + camdev->usemmap = 0; + goto sysread; + } +- camdev->mbufp = mmap(NULL, camdev->mbuf.size, PROT_READ, MAP_PRIVATE, camdev->fd, 0); ++ camdev->mbufp = v4l1_mmap(NULL, camdev->mbuf.size, PROT_READ, MAP_PRIVATE, camdev->fd, 0); + if (camdev->mbufp == MAP_FAILED) + goto nommap; + camdev->usemmap = 1; +@@ -268,17 +268,17 @@ + mmapctx.height = gcamdev->y; + mmapctx.format = gcamdev->pal->val; + do +- ret = ioctl(camdev->fd, VIDIOCMCAPTURE, &mmapctx); ++ ret = v4l1_ioctl(camdev->fd, VIDIOCMCAPTURE, &mmapctx); + while (ret < 0 && errno == EINTR); + if (ret < 0) + { + unmap: +- munmap(camdev->mbufp, camdev->mbuf.size); ++ v4l1_munmap(camdev->mbufp, camdev->mbuf.size); + goto nommap; + } + ret = camdev->mbufframe; + do +- ret = ioctl(camdev->fd, VIDIOCSYNC, &ret); ++ ret = v4l1_ioctl(camdev->fd, VIDIOCSYNC, &ret); + while (ret < 0 && errno == EINTR); + if (ret < 0) + goto unmap; +@@ -294,7 +294,7 @@ + + sysread: + do +- ret = read(camdev->fd, camdev->imgbuf, camdev->bpf); ++ ret = v4l1_read(camdev->fd, camdev->imgbuf, camdev->bpf); + while (ret < 0 && errno == EINTR); + if (ret < 0) + { +@@ -366,7 +366,7 @@ + if (!(brightness < camdev->autobrightness -1 || brightness > camdev->autobrightness +1)) + return; + +- if (ioctl(camdev->fd, VIDIOCGPICT, &camdev->vidpic) == -1) { ++ if (v4l1_ioctl(camdev->fd, VIDIOCGPICT, &camdev->vidpic) == -1) { + perror ("ioctl (VIDIOCGPICT)"); + return; + } +@@ -387,7 +387,7 @@ + camdev->vidpic.brightness += (int)change; + /*printf("Setting camera brightness to %i\n", camdev->vidpic.brightness);*/ + } +- if (ioctl(camdev->fd, VIDIOCSPICT, &camdev->vidpic) == -1) { ++ if (v4l1_ioctl(camdev->fd, VIDIOCSPICT, &camdev->vidpic) == -1) { + perror ("ioctl (VIDIOCSPICT)"); + } + } +@@ -418,7 +418,7 @@ + return; + } -Only in camsource-0.7.0/src: unpalette.c.orig -diff -ur camsource-0.7.0.orig/src/vloopback.c camsource-0.7.0/src/vloopback.c ---- camsource-0.7.0.orig/src/vloopback.c 2011-07-07 11:32:54.821089455 +0200 -+++ camsource-0.7.0/src/vloopback.c 2011-07-07 11:33:12.969089451 +0200 +- ret = ioctl(fd, VIDIOCGCAP, &vidcap); ++ ret = v4l1_ioctl(fd, VIDIOCGCAP, &vidcap); + if (ret < 0) + { + printf("ioctl(VIDIOCGCAP) (get video capabilites) failed: %s\n", strerror(errno)); +@@ -442,7 +442,7 @@ + printf(" Min: %ix%i\n", vidcap.minwidth, vidcap.minheight); + printf(" Max: %ix%i\n", vidcap.maxwidth, vidcap.maxheight); + +- ret = ioctl(fd, VIDIOCGPICT, &vidpic); ++ ret = v4l1_ioctl(fd, VIDIOCGPICT, &vidpic); + if (ret != 0) + { + printf("ioctl(VIDIOCGPICT) (get picture properties) failed: %s\n", strerror(errno)); +@@ -467,8 +467,8 @@ + { + vidpic.palette = pal->val; + vidpic.depth = pal->depth; +- ioctl(fd, VIDIOCSPICT, &vidpic); +- ioctl(fd, VIDIOCGPICT, &vidpic); ++ v4l1_ioctl(fd, VIDIOCSPICT, &vidpic); ++ v4l1_ioctl(fd, VIDIOCGPICT, &vidpic); + if (vidpic.palette == pal->val) + printf(" Palette \"%s\" supported: Yes, with depth %u\n", pal->name, vidpic.depth); + else +@@ -476,5 +476,5 @@ + } + + closenout: +- close(fd); ++ v4l1_close(fd); + } +--- camsource-0.7.0/src/vloopback.c 2003-01-05 00:42:48.000000000 +0300 ++++ camsource-0.7.0.new/src/vloopback.c 2013-01-19 13:37:56.140691991 +0400 @@ -3,7 +3,7 @@ #include <stdio.h> #include <fcntl.h> #include <sys/ioctl.h> -#include <linux/videodev.h> -+#include <libv4l1-videodev.h> ++#include <libv4l1.h> #include <memory.h> #include "config.h" +@@ -38,28 +38,28 @@ + struct video_window vid_win; + struct video_picture vid_pic; + +- mctx->dev_out =open (mctx->dev_name, O_RDWR); ++ mctx->dev_out =v4l1_open (mctx->dev_name, O_RDWR); + if (mctx->dev_out < 0) { + perror ("Failed to open video device"); + } + +- if (ioctl (mctx->dev_out, VIDIOCGPICT, &vid_pic)== -1) { ++ if (v4l1_ioctl (mctx->dev_out, VIDIOCGPICT, &vid_pic)== -1) { + perror ("ioctl VIDIOCGPICT"); + return (1); + } + vid_pic.palette=mctx->format; +- if (ioctl (mctx->dev_out, VIDIOCSPICT, &vid_pic)== -1) { ++ if (v4l1_ioctl (mctx->dev_out, VIDIOCSPICT, &vid_pic)== -1) { + perror ("ioctl VIDIOCSPICT"); + return (1); + } +- if (ioctl (mctx->dev_out, VIDIOCGWIN, &vid_win)== -1) { ++ if (v4l1_ioctl (mctx->dev_out, VIDIOCGWIN, &vid_win)== -1) { + perror ("ioctl VIDIOCGWIN"); + return (1); + } + + vid_win.width=mctx->width; + vid_win.height=mctx->height; +- if (ioctl (mctx->dev_out, VIDIOCSWIN, &vid_win)== -1) { ++ if (v4l1_ioctl (mctx->dev_out, VIDIOCSWIN, &vid_win)== -1) { + perror ("ioctl VIDIOCSWIN"); + return (1); + } +--- camsource-0.7.0/src/unpalette.c 2013-01-19 13:55:39.936283019 +0400 ++++ camsource-0.7.0.new/src/unpalette.c 2013-01-19 13:25:58.427219854 +0400 +@@ -1,7 +1,7 @@ + #include <stdio.h> + #include <sys/types.h> + #include <string.h> +-#include <linux/videodev.h> ++#include <libv4l1.h> + + #include "config.h" + -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org