From 8803c1ae11239b3f7c35970b13d6b43ad86b2a005a12a800911924cb73155d47 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 5 Jun 2014 06:18:07 +0000 Subject: [PATCH] Accepting request 236327 from home:adra:branches:devel:libraries:c_c++ Update to version 1.0.1, Updated build requirements, Removed/Added patches OBS-URL: https://build.opensuse.org/request/show/236327 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/v4l-utils?expand=0&rev=27 --- baselibs.conf | 1 + bufferoverflowstrncat.patch | 11 +++ disable_rds_compilation.patch | 8 -- udev-rules-dir.patch | 21 ----- use-openat-if-available.patch | 32 -------- v4l-utils-0.8.9.tar.bz2 | 3 - v4l-utils-1.0.1.tar.bz2 | 3 + v4l-utils.changes | 17 ++++ v4l-utils.spec | 143 +++++++++++++++++++--------------- 9 files changed, 111 insertions(+), 128 deletions(-) create mode 100644 bufferoverflowstrncat.patch delete mode 100644 disable_rds_compilation.patch delete mode 100644 udev-rules-dir.patch delete mode 100644 use-openat-if-available.patch delete mode 100644 v4l-utils-0.8.9.tar.bz2 create mode 100644 v4l-utils-1.0.1.tar.bz2 diff --git a/baselibs.conf b/baselibs.conf index c7d4aca..68765a2 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,5 @@ libv4l libv4l1-0 libv4l2-0 +libv4l2rds0 libv4lconvert0 diff --git a/bufferoverflowstrncat.patch b/bufferoverflowstrncat.patch new file mode 100644 index 0000000..4e475f7 --- /dev/null +++ b/bufferoverflowstrncat.patch @@ -0,0 +1,11 @@ +--- lib/libdvbv5/descriptors.c.orig 2014-01-13 21:51:46.000000000 +0200 ++++ lib/libdvbv5/descriptors.c 2014-06-04 21:49:02.691930747 +0300 +@@ -1007,7 +1007,7 @@ + { + char t[4]; + snprintf (t, sizeof(t), "%02x ", (unsigned int) data[i]); +- strncat (hex, t, sizeof(hex)); ++ strncat (hex, t, sizeof(hex) - 1); + if (data[i] > 31 && data[i] < 128 ) + ascii[j] = data[i]; + else diff --git a/disable_rds_compilation.patch b/disable_rds_compilation.patch deleted file mode 100644 index 14aea63..0000000 --- a/disable_rds_compilation.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- utils/Makefile.orig 2012-04-06 19:55:44.000000000 +0300 -+++ utils/Makefile 2012-04-11 23:14:12.100253708 +0300 -@@ -1,4 +1,4 @@ --SUBDIRS=libv4l2util libmedia_dev decode_tm6000 keytable rds v4l2-compliance v4l2-ctl v4l2-dbg v4l2-sysfs-path xc3028-firmware dvb -+SUBDIRS=libv4l2util libmedia_dev decode_tm6000 keytable v4l2-compliance v4l2-ctl v4l2-dbg v4l2-sysfs-path xc3028-firmware dvb - - all install: - @for i in $(SUBDIRS); do \ diff --git a/udev-rules-dir.patch b/udev-rules-dir.patch deleted file mode 100644 index 34beb9a..0000000 --- a/udev-rules-dir.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: v4l-utils-0.8.8/utils/keytable/Makefile -=================================================================== ---- v4l-utils-0.8.8.orig/utils/keytable/Makefile -+++ v4l-utils-0.8.8/utils/keytable/Makefile -@@ -1,4 +1,5 @@ - TARGETS = ir-keytable -+UDEVRULESDIR=/lib/udev/rules.d - - all: $(TARGETS) - -@@ -37,8 +38,8 @@ install: $(TARGETS) - install -m 644 -p rc_maps.cfg $(DESTDIR)/etc - install -m 755 -d $(DESTDIR)/etc/rc_keymaps - install -m 644 -p rc_keymaps/* $(DESTDIR)/etc/rc_keymaps -- install -m 755 -d $(DESTDIR)/lib/udev/rules.d -- install -m 644 -p 70-infrared.rules $(DESTDIR)/lib/udev/rules.d -+ install -m 755 -d $(DESTDIR)/$(UDEVRULESDIR) -+ install -m 644 -p 70-infrared.rules $(DESTDIR)/$(UDEVRULESDIR) - install -m 755 -d $(DESTDIR)$(MANDIR)/man1 - install -m 644 -p ir-keytable.1 $(DESTDIR)$(MANDIR)/man1 - diff --git a/use-openat-if-available.patch b/use-openat-if-available.patch deleted file mode 100644 index f9c00be..0000000 --- a/use-openat-if-available.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ac8eb4d8e1c16b907e795da123a032869c77c56f Mon Sep 17 00:00:00 2001 -From: Riku Voipio -Date: Tue, 22 Jan 2013 12:44:48 +0200 -Subject: [PATCH] libv4lsyscall-priv.h: use openat when available - -New architectures such as 64-Bit arm build kernels without legacy -system calls - Such as the the no-at system calls. Thus, use -SYS_openat whenever it is available. - -Signed-off-by: Riku Voipio ---- - lib/libv4lconvert/libv4lsyscall-priv.h | 5 +++++ - 1 file changed, 5 insertions(+) - -Index: v4l-utils-0.8.9/lib/libv4lconvert/libv4lsyscall-priv.h -=================================================================== ---- v4l-utils-0.8.9.orig/lib/libv4lconvert/libv4lsyscall-priv.h -+++ v4l-utils-0.8.9/lib/libv4lconvert/libv4lsyscall-priv.h -@@ -72,8 +72,13 @@ typedef off_t __off_t; - - #ifndef CONFIG_SYS_WRAPPER - -+#ifdef SYS_openat -+#define SYS_OPEN(file, oflag, mode) \ -+ syscall(SYS_openat, AT_FDCWD, (const char *)(file), (int)(oflag), (mode_t)(mode)) -+#else - #define SYS_OPEN(file, oflag, mode) \ - syscall(SYS_open, (const char *)(file), (int)(oflag), (mode_t)(mode)) -+#endif - #define SYS_CLOSE(fd) \ - syscall(SYS_close, (int)(fd)) - #define SYS_IOCTL(fd, cmd, arg) \ diff --git a/v4l-utils-0.8.9.tar.bz2 b/v4l-utils-0.8.9.tar.bz2 deleted file mode 100644 index 0533938..0000000 --- a/v4l-utils-0.8.9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e5511c252b3c320d0b03418f7ee19b42d00ed0871c6b525779007416e46d08e -size 460681 diff --git a/v4l-utils-1.0.1.tar.bz2 b/v4l-utils-1.0.1.tar.bz2 new file mode 100644 index 0000000..d668295 --- /dev/null +++ b/v4l-utils-1.0.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc0132e82a18dfad9619be3abf50c206e2f449b1c14440cde36f25874fdce7df +size 971381 diff --git a/v4l-utils.changes b/v4l-utils.changes index 942690d..b5395c8 100644 --- a/v4l-utils.changes +++ b/v4l-utils.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Jun 4 19:51:21 UTC 2014 - asterios.dramis@gmail.com + +- Update to version 1.0.1: + * Lots of changes: See ChangeLog for details. +- Removed ImageMagick and sysfsutils-devel build requirements (not needed + anymore). +- Added pkg-config build requirement. +- Use desktop-file-utils instead of update-desktop-files for openSUSE > 12.1. + Added desktop-file-utils build requirement for this. +- Removed the following patches: + * disable_rds_compilation.patch (not needed anymore). + * udev-rules-dir.patch (fixed upstream). + * use-openat-if-available.patch (fixed upstream). +- Added a patch "bufferoverflowstrncat.patch" to fix rpm post build check error + "Statement might be overflowing a buffer in strncat". + ------------------------------------------------------------------- Thu Jan 2 10:02:04 UTC 2014 - dmueller@suse.com diff --git a/v4l-utils.spec b/v4l-utils.spec index 2756c1a..6f48cb0 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -16,14 +16,11 @@ # -%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190 -%define _udevrulesdir /usr/lib/udev/rules.d -%else -%define _udevrulesdir /lib/udev/rules.d -%endif +%define _udevdir %(pkg-config --variable udevdir udev) +%define so_ver 0 Name: v4l-utils -Version: 0.8.9 +Version: 1.0.1 Release: 0 Summary: Utilities for video4linux and DVB devices License: GPL-2.0+ and GPL-2.0 @@ -31,33 +28,24 @@ Group: Hardware/TV Url: http://linuxtv.org/downloads/v4l-utils/ Source0: http://linuxtv.org/downloads/v4l-utils/%{name}-%{version}.tar.bz2 Source100: baselibs.conf -# PATCH-FIX-OPENSUSE disable_rds_compilation.patch asterios.dramis@gmail.com -- Disable compilation of utils/rds (it isn't installed anyway) as it fails to compile with i2c-dev.h from i2c-tools (needs the one from linux-glibc-devel) -Patch0: disable_rds_compilation.patch -# PATCH-FIX-UPSTREAM udev-rules-dir.patch fcrozat@suse.com -- allow udev rules directory to be overridden -Patch1: udev-rules-dir.patch -Patch2: use-openat-if-available.patch -# Only needed to patch broken images in the upstream tarball -BuildRequires: ImageMagick +# PATCH-FIX-UPSTREAM bufferoverflowstrncat.patch asterios.dramis@gmail.com -- Fix rpm post build check error "Statement might be overflowing a buffer in strncat" +Patch0: bufferoverflowstrncat.patch +%if 0%{?suse_version} > 1210 +BuildRequires: desktop-file-utils +%else +BuildRequires: update-desktop-files +%endif BuildRequires: kernel-headers BuildRequires: libjpeg-devel BuildRequires: libqt4-devel -%if 0%{?suse_version} > 1130 -BuildRequires: sysfsutils-devel -%else -BuildRequires: sysfsutils -%endif +BuildRequires: pkg-config BuildRequires: udev -%if 0%{?suse_version} -BuildRequires: update-desktop-files -%endif Requires: libv4l = %{version} Requires: udev BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -v4l-utils is a collection of various video4linux (V4L) and DVB utilities. The -main v4l-utils package contains cx18-ctl, ir-keytable, ivtv-ctl, v4l2-ctl and -v4l2-sysfs-path. +v4l-utils is a collection of various video4linux (V4L) and DVB utilities. %package devel-tools Summary: Utilities for v4l2 / DVB driver development and debugging @@ -66,8 +54,7 @@ Group: Hardware/TV Requires: libv4l = %{version} %description devel-tools -Utilities for v4l2 / DVB driver authors: decode_tm6000, v4l2-compliance and -v4l2-dbg. +Utilities for v4l2 / DVB driver authors. %package -n libv4l Summary: Collection of video4linux support libraries @@ -78,53 +65,65 @@ Group: System/Libraries libv4l is a collection of libraries which adds a thin abstraction layer on top of video4linux2 devices. The purpose of this (thin) layer is to make it easy for application writers to support a wide variety of devices without -having to write separate code for different devices in the same class. libv4l -consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2. +having to write separate code for different devices in the same class. -%package -n libv4l1-0 +%package -n libv4l1-%{so_ver} Summary: Video4linux support library License: LGPL-2.1+ Group: System/Libraries Requires: libv4l -%description -n libv4l1-0 +%description -n libv4l1-%{so_ver} libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent of the drivers for those devices supporting v4l1 compatibility (which many v4l2 drivers do not). -This package contains shared lib for packages that use libv4l1.so.0 +This package contains shared lib for packages that use libv4l1. -%package -n libv4l2-0 +%package -n libv4l2-%{so_ver} Summary: Video4linux support library License: LGPL-2.1+ Group: System/Libraries Requires: libv4l -%description -n libv4l2-0 +%description -n libv4l2-%{so_ver} libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the application transparent libv4lconvert conversion where necessary. -This package contains shared lib for packages that use libv4l2.so.0 +This package contains shared lib for packages that use libv4l2. -%package -n libv4lconvert0 +%package -n libv4l2rds%{so_ver} Summary: Video4linux support library License: LGPL-2.1+ Group: System/Libraries Requires: libv4l -%description -n libv4lconvert0 +%description -n libv4l2rds%{so_ver} +libv4l2rds offers decoding raw RDS data from V4L2 Radio devices and simple ways +to access the received RDS information. + +This package contains shared lib for packages that use libv4l2rds. + +%package -n libv4lconvert%{so_ver} +Summary: Video4linux support library +License: LGPL-2.1+ +Group: System/Libraries +Requires: libv4l + +%description -n libv4lconvert%{so_ver} libv4lconvert offers functions to convert from any (known) pixel-format to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420. -This package contains shared lib for packages that use libv4lconvert.so.0 +This package contains shared lib for packages that use libv4lconvert. %package -n libv4l-devel Summary: Development files for libv4l License: LGPL-2.1+ Group: Development/Libraries/C and C++ -Requires: libv4l1-0 = %{version} -Requires: libv4l2-0 = %{version} -Requires: libv4lconvert0 = %{version} +Requires: libv4l1-%{so_ver} = %{version} +Requires: libv4l2-%{so_ver} = %{version} +Requires: libv4l2rds%{so_ver} = %{version} +Requires: libv4lconvert%{so_ver} = %{version} %description -n libv4l-devel The libv4l-devel package contains libraries and header files for @@ -142,47 +141,59 @@ qv4l2 is a test control and streaming test application for video4linux. %prep %setup -q %patch0 -%patch1 -p1 -%patch2 -p1 %build -make PREFIX=%{_prefix} LIBDIR=%{_libdir} CFLAGS="%{optflags} -fno-strict-aliasing" CXXFLAGS="%{optflags}" %{?_smp_mflags} +%configure --disable-static --disable-silent-rules --with-udevdir=%{_udevdir} +make %{?_smp_mflags} %install -make install PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} UDEVRULESDIR=%{_udevrulesdir} +make DESTDIR=%{buildroot} install -# Patch image with wrong dimensions - fix rpmlint warning "wrong-icon-size" -mogrify -extent "36x36" -background transparent -gravity "south" %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/qv4l2.png -mogrify -scale 32x32 -background transparent %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/qv4l2.png +# Remove libtool config files +find %{buildroot}%{_libdir} -name '*.la' -exec rm -f {} ';' -%if 0%{?suse_version} +# Not needed (links to plugins in libv4l subdir) +rm %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so} + +%if 0%{?suse_version} > 1210 +desktop-file-edit --set-name="QV4l2" --set-generic-name="V4L2 Test Utility" \ + --add-category=Qt --add-category=Video --add-category=TV %{buildroot}%{_datadir}/applications/qv4l2.desktop +%else %suse_update_desktop_file -N "QV4l2" -G "V4L2 Test Utility" -r qv4l2 Qt AudioVideo Video TV %endif -%post -n libv4l1-0 -p /sbin/ldconfig +%post -n libv4l1-%{so_ver} -p /sbin/ldconfig -%postun -n libv4l1-0 -p /sbin/ldconfig +%postun -n libv4l1-%{so_ver} -p /sbin/ldconfig -%post -n libv4l2-0 -p /sbin/ldconfig +%post -n libv4l2-%{so_ver} -p /sbin/ldconfig -%postun -n libv4l2-0 -p /sbin/ldconfig +%postun -n libv4l2-%{so_ver} -p /sbin/ldconfig -%post -n libv4lconvert0 -p /sbin/ldconfig +%post -n libv4l2rds%{so_ver} -p /sbin/ldconfig -%postun -n libv4lconvert0 -p /sbin/ldconfig +%postun -n libv4l2rds%{so_ver} -p /sbin/ldconfig + +%post -n libv4lconvert%{so_ver} -p /sbin/ldconfig + +%postun -n libv4lconvert%{so_ver} -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc COPYING ChangeLog README TODO -%dir %{_sysconfdir}/rc_keymaps -%config(noreplace) %{_sysconfdir}/rc_keymaps/* +%dir %{_sysconfdir}/rc_keymaps/ %config(noreplace) %{_sysconfdir}/rc_maps.cfg -%{_udevrulesdir}/70-infrared.rules +%{_udevdir}/rc_keymaps/ +%if 0%{?suse_version} <= 1310 +%dir %{_udevdir}/rules.d/ +%endif +%{_udevdir}/rules.d/70-infrared.rules %{_bindir}/cx18-ctl %{_bindir}/dvb-* %{_bindir}/dvbv5-* %{_bindir}/ir-keytable %{_bindir}/ivtv-ctl +%{_bindir}/rds-ctl %{_bindir}/v4l2-ctl %{_bindir}/v4l2-sysfs-path %{_mandir}/man1/ir-keytable.1%{ext_man} @@ -196,20 +207,24 @@ mogrify -scale 32x32 -background transparent %{buildroot}%{_datadir}/icons/hicol %files -n libv4l %defattr(-,root,root,-) -%doc COPYING.LIB ChangeLog README README.lib TODO +%doc COPYING.libv4l ChangeLog README README.libv4l TODO %{_libdir}/libv4l/ -%files -n libv4l1-0 +%files -n libv4l1-%{so_ver} %defattr(-,root,root,-) -%{_libdir}/libv4l1.so.* +%{_libdir}/libv4l1.so.%{so_ver}* -%files -n libv4l2-0 +%files -n libv4l2-%{so_ver} %defattr(-,root,root,-) -%{_libdir}/libv4l2.so.* +%{_libdir}/libv4l2.so.%{so_ver}* -%files -n libv4lconvert0 +%files -n libv4l2rds%{so_ver} %defattr(-,root,root,-) -%{_libdir}/libv4lconvert.so.* +%{_libdir}/libv4l2rds.so.%{so_ver}* + +%files -n libv4lconvert%{so_ver} +%defattr(-,root,root,-) +%{_libdir}/libv4lconvert.so.%{so_ver}* %files -n libv4l-devel %defattr(-,root,root,-)