Bug 431381

Summary: Review Request: unicap - Library to access different kinds of (video) capture devices
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: Package ReviewAssignee: Parag AN(पराग) <panemade>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: fedora-package-review, notting, panemade
Target Milestone: ---Flags: panemade: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-18 22:40:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
libdir patch
none
Proposed diff (Untested and likely incomplete) none

Description Robert Scheck 2008-02-03 23:09:52 UTC
Spec URL: http://labs.linuxnetz.de/bugzilla/unicap.spec
SRPM URL: http://labs.linuxnetz.de/bugzilla/unicap-0.2.19-1.src.rpm
Unicap provides a uniform interface to video capture devices. It allows
applications to use any supported video capture device via a single API.
The included ucil library provides easy to use functions to render text
and graphic overlays onto video images.

Comment 1 Parag AN(पराग) 2008-02-04 04:13:58 UTC
mock build is ok. 
1) missing Requires: pkgconfig in -devel, drop pkgconfig as BR from main package.

2) rpmlint gave me
unicap-devel.i386: W: dangling-relative-symlink
/usr/lib/unicap2/cpi/libvid21394.so libvid21394.so.0.0.0
The relative symbolic link points nowhere.

unicap-devel.i386: W: dangling-relative-symlink /usr/lib/unicap2/cpi/libdcam.so
libdcam.so.0.0.0
The relative symbolic link points nowhere.

unicap-devel.i386: W: dangling-relative-symlink /usr/lib/unicap2/cpi/libv4l2.so
libv4l2.so.0.0.0
The relative symbolic link points nowhere.

unicap-devel.i386: W: dangling-relative-symlink /usr/lib/unicap2/cpi/libv4l.so
libv4l.so.0.0.0
The relative symbolic link points nowhere.

unicap-devel.i386: E: only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.

3)

Comment 2 Parag AN(पराग) 2008-02-04 04:21:48 UTC
oops clicked submit button
3) can you also include APIs and examples to -devel package?

Comment 3 Robert Scheck 2008-02-04 07:39:29 UTC
to 2): The relative symlinks are pointing to files of the base package or did
I misread something? And the error seems to result from the warnings. Because 
where to put the *.so files/links when not in /usr/lib?

to 3): APIs? doc/apis seems to be nearly (?) the same like the gtk-doc stuff or 
was my look to that too fast? Adding examples is no problem.

Comment 4 Parag AN(पराग) 2008-02-04 09:29:42 UTC
(In reply to comment #3)
> to 2): The relative symlinks are pointing to files of the base package or did
> I misread something? And the error seems to result from the warnings. Because 
> where to put the *.so files/links when not in /usr/lib?
> 
 I installed this and looks ok.

> to 3): APIs? doc/apis seems to be nearly (?) the same like the gtk-doc stuff or 
> was my look to that too fast? Adding examples is no problem.
 yes. APIs are already there. Only examples now you need to add.



Comment 5 Parag AN(पराग) 2008-02-04 09:30:07 UTC
and please take care of point 1)

Comment 7 Parag AN(पराग) 2008-02-05 06:34:17 UTC
Koji build failed =>
http://koji.fedoraproject.org/koji/taskinfo?taskID=396090

SHOULD:
   1) Change defattr usage to defattr(-,root,root,-)
   2) -devel description says only "The unicap-devel package includes header
files and libraries necessary for for developing programs which use the unicap
and ucil library." which missed to mention libunicapgtk library. Please add that
to this description line.
   3) Add README.troubleshooting to %docs
   


Comment 8 Robert Scheck 2008-02-05 10:08:15 UTC
I've no 64 bit system around, so I unluckily didn't find that. /usr/lib seems 
somehow to be hardcoded and not /usr/lib(64) depending on the arch. Do you think, 
it fits to do a mv /usr/lib %{_libdir}, if we're on x86_64 etc. during build or 
should I better really fix the code, inclulde as patch and send upstream?

Shoulds are luckily no must, so I don't care about 1) - sorry
2) is accepted, will be corrected for the next build of course
3) seems just useless for non-packagers when reading the file

Comment 9 Parag AN(पराग) 2008-02-05 10:49:45 UTC
(In reply to comment #8)
> I've no 64 bit system around, so I unluckily didn't find that. /usr/lib seems 
> somehow to be hardcoded and not /usr/lib(64) depending on the arch. Do you think, 
> it fits to do a mv /usr/lib %{_libdir}, if we're on x86_64 etc. during build or 
> should I better really fix the code, inclulde as patch and send upstream?

 You better fix this in code and include patch in SRPM and send same to upstream
also.

> 
> Shoulds are luckily no must, so I don't care about 1) - sorry
  ok.

> 2) is accepted, will be corrected for the next build of course
  hope to see that in next SRPM update.
> 3) seems just useless for non-packagers when reading the file
   ohh. I thought it covers also "Runtime issues" which are useful to end user
and also from configure output it said
 ***  Please read the file README.troubleshooting   *** 
 ***  if you have any trouble using this software.  *** 
NOTE:-It said using this software not compiling/packaging this software.

Anyway Ok if you will not include as its not a blocker :)

Comment 10 Parag AN(पराग) 2008-02-08 08:50:53 UTC
You need following patch
=================================================================================
--- unicap-0.2.19/libunicapgtk/Makefile.am      2007-08-30 11:25:42.000000000 +0530
+++ unicap-0.2.19/libunicapgtk/Makefile.am.new  2008-02-08 11:36:51.000000000 +0530
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 INCLUDES = -I../include -I../libucil @GTK_PACKAGE_CFLAGS@
-AM_CPPFLAGS = $(GTK_CPPFLAGS) -DSYSCONFDIR="\"$(sysconfdir)\""
-DBACKENDDIR="\"$(prefix)/lib/unicap$(pkg_version)/backends\""
-DPKG_VERSION="\"@lt_major@\""
+AM_CPPFLAGS = $(GTK_CPPFLAGS) -DSYSCONFDIR="\"$(sysconfdir)\""
-DBACKENDDIR="\"$(libdir)/unicap$(pkg_version)/backends\""
-DPKG_VERSION="\"@lt_major@\""

 if BUILD_UNICAPGTK
 UNICAPGTK_LIB=libunicapgtk.la
================================================================================

But this requires automake in %prep. Can you check this and submit new SRPM?

Comment 11 Parag AN(पराग) 2008-02-08 12:04:18 UTC
Created attachment 294345 [details]
libdir patch

This patch will solve only one issue but you need to look how to solve
hardcoded library issue. In unicap-0.2.19/cpi/vid21394/Makefile.in file, I see
its hardcoded as
libdir = $(prefix)/lib/unicap$(pkg_version)/cpi

Comment 12 Parag AN(पराग) 2008-02-08 12:06:36 UTC
skip comment #10 please

Comment 13 Ralf Corsepius 2008-02-08 13:05:51 UTC
The correct (TM) approach would be
1. To systematically eliminate all local overrides of libdir (such as the stuff
cited in comment #11) and to replace all occurrences of $(prefix)/lib with
$(libdir) in all Makefile.ams.
2. To regenerate the Makefile.ins and create a patch from the results.


Comment 14 Robert Scheck 2008-02-08 14:34:27 UTC
I'll have a look to this likely this evening, because I was at a customer
on-site the last few days where I just had a lack of time.

Comment 15 Robert Scheck 2008-02-14 22:45:47 UTC
libdir = $(prefix)/lib/unicap$(pkg_version)/cpi is my main problem: 

  libdir = $(libdir)/unicap$(pkg_version)/cpi
  libdir := $(libdir)/unicap$(pkg_version)/cpi
  libdir += $(libdir)/unicap$(pkg_version)/cpi

are all three not working. Suggestions?

Comment 16 Parag AN(पराग) 2008-02-15 05:16:56 UTC
(In reply to comment #15)
> libdir = $(prefix)/lib/unicap$(pkg_version)/cpi is my main problem: 
> 
>   libdir = $(libdir)/unicap$(pkg_version)/cpi
>   libdir := $(libdir)/unicap$(pkg_version)/cpi
>   libdir += $(libdir)/unicap$(pkg_version)/cpi
> 
> are all three not working. Suggestions?
Yup. I tried that. Its because when you use $(libdir) it becomes recursive
substitution in above lines.


Comment 17 Ralf Corsepius 2008-02-15 05:32:11 UTC
Created attachment 294976 [details]
Proposed diff (Untested and likely incomplete)

Please read what I wrote in comment #13 and c.f. the patch in the attachment.

You need to eliminate all local redefinitions of libdir, not trying to 
redefine it.

Comment 18 Parag AN(पराग) 2008-02-15 08:15:38 UTC
Ralf,
  I added aclocal and automake to %prep and applied your patch but it looks to
me some problem with autotools.
here is scratch build
http://koji.fedoraproject.org/koji/taskinfo?taskID=428980

What am I missing then?

Comment 19 Parag AN(पराग) 2008-02-15 09:28:26 UTC
well, After 3 to 4 scratch build attempts I got following workaround in SPEC in
addition to Ralf's patch

1)Add BR: automake libtool
2)Add following to %prep
aclocal -I m4
autoconf
automake

Successful scratch build at
http://koji.fedoraproject.org/koji/taskinfo?taskID=429171

Comment 20 Robert Scheck 2008-02-16 15:21:54 UTC
Ralf and Parag, thanks for your efforts.

Spec URL: http://labs.linuxnetz.de/bugzilla/unicap.spec
SRPM URL: http://labs.linuxnetz.de/bugzilla/unicap-0.2.19-3.src.rpm

Comment 21 Parag AN(पराग) 2008-02-18 05:13:45 UTC
Review:
+ package builds in mock (rawhide i386).
koji build=> http://koji.fedoraproject.org/koji/taskinfo?taskID=434209
+ rpmlint is silent for SRPM
- rpmlint is NOT silent for RPM.
unicap-devel.i386: W: dangling-relative-symlink /usr/lib/unicap2/cpi/libv4l2.so
libv4l2.so.0.0.0
unicap-devel.i386: W: dangling-relative-symlink /usr/lib/unicap2/cpi/libdcam.so
libdcam.so.0.0.0
unicap-devel.i386: W: dangling-relative-symlink /usr/lib/unicap2/cpi/libv4l.so
libv4l.so.0.0.0
unicap-devel.i386: W: dangling-relative-symlink
/usr/lib/unicap2/cpi/libvid21394.so libvid21394.so.0.0.0
unicap-devel.i386: E: only-non-binary-in-usr-lib
==> ok to accpet here.
+ source files match upstream.
0ab0a533f5c1ff3a24853d2564ffb14f  unicap-0.2.19.tar.gz
+ package meets naming and packaging guidelines.
+ specfile is properly named, is cleanly written
+ Spec file is written in American English.
+ Spec file is legible.
+ dist tag is present.
+ build root is correct.
+ license is open source-compatible.
+ License text is included in package.
+ %doc files present.
+ BuildRequires are proper.
+ Compiler flags are honoured correctly.
+ defattr usage is correct.
+ %clean is present.
+ package installed properly.
+ Macro use appears rather consistent.
+ Package contains code.
+ no static libraries.
+ libucil.pc, libunicap.pc, libunicapgtk.pc files present.
+ -devel subpackage exists.
+ no .la files.
+ translations are available.
+ Does owns the directories it creates.
+ no duplicates in %files.
+ file permissions are appropriate.
+ ldconfig scriptlets are used.
+ Package unicap-0.2.19-3.fc9 ->
  Provides: libdcam.so.0 libucil.so.2 libunicap.so.2 libunicapgtk.so.2
libv4l.so.0 libv4l2.so.0 libvid21394.so.0
  Requires: libXext.so.6 libXv.so.1 libasound.so.2 libasound.so.2(ALSA_0.9)
libasound.so.2(ALSA_0.9.0rc4) libatk-1.0.so.0 libc.so.6 libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libcairo.so.2 libdcam.so.0
libdl.so.2 libdl.so.2(GLIBC_2.0) libdl.so.2(GLIBC_2.1) libgcc_s.so.1
libgcc_s.so.1(GCC_3.0) libgcc_s.so.1(GCC_3.3.1) libgdk-x11-2.0.so.0
libgdk_pixbuf-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgobject-2.0.so.0
libgtk-x11-2.0.so.0 libm.so.6 libm.so.6(GLIBC_2.0) libogg.so.0 libpango-1.0.so.0
libpangocairo-1.0.so.0 libpangoft2-1.0.so.0 libpthread.so.0
libpthread.so.0(GLIBC_2.0) libpthread.so.0(GLIBC_2.1) libpthread.so.0(GLIBC_2.2)
libraw1394.so.8 librt.so.1 libtheora.so.0 libtheora.so.0(libtheora.so.1.0)
libucil.so.2 libunicap.so.2 libunicapgtk.so.2 libv4l.so.0 libv4l2.so.0
libvid21394.so.0 libvorbis.so.0 libvorbisenc.so.2 rtld(GNU_HASH)
+ Package unicap-devel-0.2.19-3.fc9 ->
  Requires: libdcam.so.0 libucil.so.2 libunicap.so.2 libunicapgtk.so.2
libv4l.so.0 libv4l2.so.0 libvid21394.so.0
+ Not a GUI app.

APPROVED.

Comment 22 Robert Scheck 2008-02-18 07:11:13 UTC
New Package CVS Request
=======================
Package Name: unicap
Short Description: Library to access different kinds of (video) capture devices
Owners: robert
Branches: F-7 F-8 EL-4 EL-5
InitialCC: 
Cvsextras Commits: no

Comment 23 Kevin Fenzi 2008-02-18 17:33:06 UTC
cvs done.

Comment 24 Robert Scheck 2008-02-18 22:40:12 UTC
38378 (unicap): Build on target fedora-5-epel succeeded.

Package: unicap-0.2.19-3.fc7 Tag: dist-fc7-updates-candidate Status: complete
Package: unicap-0.2.19-3.fc8 Tag: dist-f8-updates-candidate Status: complete
Package: unicap-0.2.19-3.fc9 Tag: dist-f9 Status: complete