Bug 601577 - Review Request: liblockfile - This library implements a number of functions found in -lmail on SysV systems
Summary: Review Request: liblockfile - This library implements a number of functions f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pavel Alexeev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 601115
TreeView+ depends on / blocked
 
Reported: 2010-06-08 08:46 UTC by Matthias Runge
Modified: 2015-01-07 13:02 UTC (History)
6 users (show)

Fixed In Version: liblockfile-1.08-9.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-26 00:54:05 UTC
Type: ---
Embargoed:
pahan: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Matthias Runge 2010-06-08 08:46:34 UTC
Spec URL: http://www.matthias-runge.de/fedora/liblockfile.spec
SRPM URL: http://www.matthias-runge.de/fedora/liblockfile-1.08-1.fc13.src.rpm
Description: 
This library implements a number of functions found in -lmail on SysV
systems. These functions are designed to lock the standard mailboxes in
/var/mail (or wherever the system puts them).

In additions, this library adds a number of functions to create,
manage and remove generic lockfiles.

Comment 1 Matthias Runge 2010-06-08 08:54:14 UTC
Building liblockfile requires 3 additional perl packages, I'm going to add as review tonight. (Everything found under http://www.matthias-runge.de/fedora/ ), but those perl packages need some work to be accepted, I know.

Comment 2 Matthias Runge 2010-06-30 09:39:01 UTC
Update:

perl packages are built
perl-IPC-Signal 
perl-Proc-WaitStat 
perl-mime-construct 

Revision 2 substitutes the unnecessary patch by a simple sed invocation.

Spec URL: http://www.matthias-runge.de/fedora/liblockfile.spec
SRPM URL: http://www.matthias-runge.de/fedora/liblockfile-1.08-2.fc13.src.rpm

Comment 3 Pavel Alexeev 2010-07-10 09:33:46 UTC
Do you plan put perl-Proc-WaitStat on review? I do not see link to it in Depends on section.

Comment 4 Till Maas 2010-07-10 09:43:47 UTC
(In reply to comment #3)
> Do you plan put perl-Proc-WaitStat on review? I do not see link to it in
> Depends on section.    

It is not a direct dependency, but in the dependency tree and it is already in testing:
https://bugzilla.redhat.com/showdependencytree.cgi?id=601577&hide_resolved=1
bug 602598

Comment 5 Pavel Alexeev 2010-07-10 11:48:28 UTC
What is "-lmail"? Do you mean system mail library? For what its reimplementation? Or it is only binding?

There review:
Legend: + - Ok.
- - Error, must be fixed.
+/- - It item acceptable, but I strongly recommend enhancement.
= - N/A.


MUST Items

[-] MUST: rpmlint must be run on every package. The output should be posted in the review.

liblockfile.i686: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
liblockfile.i686: W: spelling-error %description -l en_US lmail -> mail, email, l mail
liblockfile.i686: W: spelling-error %description -l en_US lockfiles -> lock files, lock-files, lockboxes
liblockfile-devel.i686: W: spelling-error Summary(en_US) libs -> lobs, lib, lis
liblockfile-devel.i686: W: summary-not-capitalized C header files and libs needed to build apps linked against liblockfile
liblockfile-devel.i686: W: spelling-error %description -l en_US libs -> lobs, lib, lis
liblockfile-devel.i686: W: hidden-file-or-dir /usr/lib/debug/.build-id
liblockfile-devel.i686: W: hidden-file-or-dir /usr/lib/debug/.build-id
liblockfile-devel.i686: W: dangling-relative-symlink /usr/lib/debug/.build-id/67/9f6f9bf9c4afa99632a51a740ed392516bc91c ../../../../bin/dotlockfile
liblockfile-devel.i686: W: dangling-relative-symlink /usr/lib/debug/.build-id/67/9f6f9bf9c4afa99632a51a740ed392516bc91c.debug ../../usr/bin/dotlockfile.debug
3 packages and 0 specfiles checked; 0 errors, 10 warnings.

Spelling errors can be ignored, to others you should pay attantion.

[-] MUST: The package must be named according to the Package Naming Guidelines.
Package named with lib prefix, but contain only one binarie and its man, no libraries there.

[+] MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
[-] MUST: The package must meet the Packaging Guidelines.
Package named liblockfile, but contain also dotlockfile library. Is it really needed bundled here? If so, probably it should be packaged separately? I'm not sure there.

[-] MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines.
[-] MUST: The License field in the package spec file must match the actual license.
File COPYRYGHTS in tarball say it should be LGPLv2+, not GPLv2+, but header of lockfile.c say it should be "GNU Library General Public License" 2+. dotlockfile.c say GPLv2+.
This is need upstream clarification.

[N/A] MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %doc.

See below in SHOULD section.

[+] MUST: The spec file must be written in American English.
[+] MUST: The spec file for the package MUST be legible.
[+] MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.
[+] MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
[+] MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line.
[+] MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
[+] MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
[-] MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun.
[+] MUST: Packages must NOT bundle copies of system libraries.
[N/A] MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker.
[+] MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory.
[+] MUST: A Fedora package must not list a file more than once in the spec file's %files listings.
[+] MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.
[+] MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[-] MUST: Each package must consistently use macros.
You use %{__mkdir} but directly other commands like rm, make etc. Please choose one form - all macroses, or oll direct commands. I prefer now all plain commands.

[+] MUST: The package must contain code, or permissable content.
[+] MUST: Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity).
[+] MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
[+] MUST: Header files must be in a -devel package.
[-] MUST: Static libraries must be in a -static package.
liblockfile.a contained in liblockfile-devel. Is it really needed at all?

[N/A] MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
[N/A] MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
[-] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
[-] MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
[N/A/] MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation.
[+] MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time.
[+] MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[+] MUST: All filenames in rpm packages must be valid UTF-8.
SHOULD Items:

[-] SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.

Please ask upstream to include license file in package.
[N/A] SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
[N/A] SHOULD: The package should compile and build into binary rpms on all supported architectures.
I can't check it now - koji seams unavailable at the moment.

[+] SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
[N/A] SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
[N/A] SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
[N/A] SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
[N/A] SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself.


Please fix all majority issues.

Comment 6 Pavel Alexeev 2010-07-10 11:49:33 UTC
One additional note. Package have not any Requires, but even review request have its. Does it error?

Comment 7 Matthias Runge 2010-07-18 11:58:04 UTC
Thank you for your review and sorry for the delay; I have been on vacation and am currently scanning through my emails. I will correct those issues within the next few days.

Comment 8 Matthias Runge 2010-07-20 10:44:31 UTC
Pavel,

I have taken the description from original package description mentioning "-lmail".

I have uploaded a new version
Spec URL: http://www.matthias-runge.de/fedora/liblockfile.spec
SRPM URL: http://www.matthias-runge.de/fedora/liblockfile-1.08-3.fc13.src.rpm    

I've corrected the exlude for -devel package, excluded statically linked lib, removed the dependency to perl packages from review request.

[mrunge@mrungexp SPECS]$ rpmlint /home/mrunge/rpmbuild/SRPMS/liblockfile-1.08-3.fc13.src.rpm /home/mrunge/rpmbuild/RPMS/i686/liblockfile-1.08-3.fc13.i686.rpm /home/mrunge/rpmbuild/RPMS/i686/liblockfile-devel-1.08-3.fc13.i686.rpm /home/mrunge/rpmbuild/RPMS/i686/liblockfile-debuginfo-1.08-3.fc13.i686.rpm

liblockfile.src: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
liblockfile.src: W: spelling-error %description -l en_US lmail -> mail, email, l mail
liblockfile.src: W: spelling-error %description -l en_US lockfiles -> lock files, lock-files, lockboxes
liblockfile.i686: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
liblockfile.i686: W: spelling-error %description -l en_US lmail -> mail, email, l mail
liblockfile.i686: W: spelling-error %description -l en_US lockfiles -> lock files, lock-files, lockboxes
liblockfile-devel.i686: W: spelling-error Summary(en_US) libs -> lobs, lib, lis
liblockfile-devel.i686: W: spelling-error %description -l en_US libs -> lobs, lib, lis
4 packages and 0 specfiles checked; 0 errors, 8 warnings.

The included file COPYRIGHT lists the different licenses for both, liblockfile and dotlockfile. Also, I have contacted the original author for explanation.

I've changed usage of %{__rm} and rm (and also other commands) to beconsistent without %{__...}.

Regarding the name, I'm currently unsure, what to do. This package is an adoption of a debian package, containing both, devel-part and dotlockfile. I think it's really ugly to separate them (because they are maintained both in one tarball). The tarball is named liblockfile, so I would prefer to name the fedora package liblockfile.

Comment 9 Pavel Alexeev 2010-07-28 10:34:22 UTC
Sorry for delay.

Now now any answer regard to licensing?

Regarding to name I do not understand about what library you speak? In RPM you pack only one binarie. There at your choose - include also library (may be in subpackage), or rename package. Now name have some confusing about it content.

Comment 10 Matthias Runge 2010-07-29 11:40:36 UTC
nevermind.

Sadly, I didn't get any answer from upstream yet.

Wouldn't it be possible to do a dual license: LGPLv2+ or GPLv2+ (should it be and?)

As you have seen, I renamed the package to lockfile and created a -libs subpackage. Looking deeper into the library.thing, I found out, the lib was created statically. This is fixed now.

mrunge@sofja SPECS]$ rpmlint ../RPMS/i686/lockfile-1.08-4.fc13.i686.rpm ../RPMS/i686/lockfile-devel-1.08-4.fc13.i686.rpm ../RPMS/i686/lockfile-debuginfo-1.08-4.fc13.i686.rpm ../RPMS/i686/lockfile-libs-1.08-4.fc13.i686.rpm 
lockfile.i686: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
lockfile.i686: W: spelling-error %description -l en_US lmail -> mail, email, l mail
lockfile-libs.i686: E: no-ldconfig-symlink /usr/lib/liblockfile.so.1.0
lockfile-libs.i686: E: shlib-with-non-pic-code /usr/lib/liblockfile.so.1.0
lockfile-libs.i686: W: no-documentation
lockfile-libs.i686: W: devel-file-in-non-devel-package /usr/lib/liblockfile.so
4 packages and 0 specfiles checked; 2 errors, 4 warnings.

sadly, rpmlint complains about two errors; both of them I cannot understand. I provide a symlink and an ldconfig-call. Can you give me a hint?

The second error is strange to me, too, because lib is built with the -fPIC compile-option. 

Fixed SPEC: http://www.matthias-runge.de/fedora/lockfile.spec
SRPM: http://www.matthias-runge.de/fedora/lockfile-1.08-4.fc13.src.rpm

Comment 11 Pavel Alexeev 2010-08-03 13:22:50 UTC
If we don't known exact license, I think we should use most restrictive, in our case GPLv2+. If you are doubt, you can fire FELegal flag to get clarification from Spot.

/usr/lib/liblockfile.so (without number) is devel file and must go to the appropriate sub-package.

Hm, now I see Library, occasionally it did not produced in Fedora 11, where I did try it build before. New package even not build. On Fedora 13 build fine.

Compilation done with command:
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wall -D_GNU_SOURCE -I. -DLIB -DLOCKPROG=\"/usr/bin/dotlockfile\" \
                        -c lockfile.c

As you can see there no -fPIC flag. You have choose patch make scripts (and set it upstream), or try add it to CFLAGS environment with comment.

Libs and devel sub-packages should require versioned main package.

I also do not understand error no-ldconfig-symlink :( . I try ask friends.

Comment 12 Pavel Alexeev 2010-08-03 13:27:21 UTC
With help of my friend (thank you Peter) and tries, I found what error no-ldconfig-symlink happened because there no symlink /usr/lib/liblockfile.so.1 to /usr/lib/liblockfile.so.1.0

Comment 13 Matthias Runge 2010-08-03 20:33:23 UTC
Thank you for your answers.

Finally, I was able to fix both errors. I chose to use GPLv2+ as license.  

rpmlint stays silent, except of those spelling warnings
mrunge@sofja SPECS]$ rpmlint -i ../SRPMS/lockfile-1.08-5.fc13.src.rpm ../RPMS/i686/lockfile-devel-1.08-5.fc13.i686.rpm ../RPMS/i686/lockfile-1.08-5.fc13.i686.rpm 
lockfile.src: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
The value of this tag appears to be misspelled. Please double-check.

lockfile.src: W: spelling-error %description -l en_US lmail -> mail, email, l mail
The value of this tag appears to be misspelled. Please double-check.

lockfile.i686: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
The value of this tag appears to be misspelled. Please double-check.

lockfile.i686: W: spelling-error %description -l en_US lmail -> mail, email, l mail
The value of this tag appears to be misspelled. Please double-check.

3 packages and 0 specfiles checked; 0 errors, 4 warnings.
 
Sadly, this package does not build for x86_64 in koji (F12, F13)
http://koji.fedoraproject.org/koji/taskinfo?taskID=2377548

I'll inspect this tomorrow.

SPEC: http://www.matthias-runge.de/fedora/lockfile.spec
SRPM: http://www.matthias-runge.de/fedora/lockfile-1.08-5.fc13.src.rpm

Comment 14 Matthias Runge 2010-08-04 07:47:01 UTC
After a minimal change (creating %{_lib}/debug in buildroot), lockfile builds fine in koji.

http://koji.fedoraproject.org/koji/taskinfo?taskID=2378562 (for F13),
http://koji.fedoraproject.org/koji/taskinfo?taskID=2378565 (for F12)

Comment 15 Till Maas 2010-08-04 12:08:59 UTC
(In reply to comment #14)
> After a minimal change (creating %{_lib}/debug in buildroot), lockfile builds
> fine in koji.

I guess the build error came from this line in the devel subpackage files section:
%exclude %{_libdir}/debug/

Why is it there in the first place?

Also the file COPYRIGHT needs to be included in both packages (the main package and the devel subpackage) since a recent policy change.

Why do you do this in %install:
ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so
ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so.1

and remove at least one of these commands from Makefile.in in %prep?
liblockfile.so.\$(VER) \$(ROOT)\$(libdir)\/liblockfile.so//" Makefile.in
file.in in %prep?

Comment 16 Matthias Runge 2010-08-05 07:00:42 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > After a minimal change (creating %{_lib}/debug in buildroot), lockfile builds
> > fine in koji.
> 
> I guess the build error came from this line in the devel subpackage files
> section:
> %exclude %{_libdir}/debug/
I'm not sure about this. Those two lines from koji build.log:
extracting debug info from /builddir/build/BUILDROOT/lockfile-1.08-5.fc13.x86_64/usr/bin/dotlockfile
symlinked /usr/lib/debug/usr/lib64/liblockfile.so.1.0.debug to /usr/lib/debug/usr/lib64/liblockfile.so.debug

look some strange to me. I could not figure out, why this happens. Anyway, it's fixed in actual version.

> 
> Why is it there in the first place?
> 
It's removed now; in an older version of this package was debuginfo included in a hidden path.

> Also the file COPYRIGHT needs to be included in both packages (the main package
> and the devel subpackage) since a recent policy change.

fixed.

> 
> Why do you do this in %install:
> ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so
> ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so.1
> 
> and remove at least one of these commands from Makefile.in in %prep?
> liblockfile.so.\$(VER) \$(ROOT)\$(libdir)\/liblockfile.so//" Makefile.in
> file.in in %prep?    
In Makefile.in is only one link included. I tried to keep them both together. Another solution would change Makefile to include the corresponding other link. Do you think, it's should go there?

diff -u:
--- lockfile.spec-5	2010-08-05 08:36:31.000000000 +0200
+++ lockfile.spec	2010-08-05 08:55:46.000000000 +0200
@@ -1,6 +1,6 @@
 Name:           lockfile
 Version:        1.08
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        This implements a number of functions found in -lmail on SysV systems
 
 Group:          Applications/System
@@ -33,6 +33,7 @@
 # remove -g root from install
 sed -i "s/install -g root -m 755 dotlockfile \$(ROOT)\$(bindir);/install -m 755 dotlockfile \$(ROOT)\$(bindir);/" Makefile.in
 
+# remove link-creation from Makefile (to be done later during install)
 sed -i "s/ln -s liblockfile.so.\$(VER) \$(ROOT)\$(libdir)\/liblockfile.so//" Makefile.in
 
 %build
@@ -49,6 +50,8 @@
 %{__mkdir} -p %{buildroot}/%{_mandir}/man1
 %{__mkdir} -p %{buildroot}/%{_mandir}/man3
 make ROOT=%{buildroot} install_shared
+
+# create links for ldconfig
 ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so
 ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so.1
 
@@ -75,10 +78,11 @@
 %doc COPYRIGHT 
 
 
-
 %changelog
 * Thu Aug 5 2010 Matthias Runge <mrunge> 1.08-6
+- include COPYRIGHT in -devel, too
+- remove unnecessary exclude
+
 * Tue Aug 3 2010 Matthias Runge <mrunge> 1.08-5
 - fix shared lib warning, sort lib to devel

Fixed versions are:
SPEC: http://www.matthias-runge.de/fedora/lockfile.spec
SRPM: http://www.matthias-runge.de/fedora/lockfile-1.08-6.fc13.src.rpm

Comment 17 Pavel Alexeev 2010-08-06 07:20:40 UTC
(In reply to comment #15)
> Also the file COPYRIGHT needs to be included in both packages (the main package
> and the devel subpackage) since a recent policy change.
It is not needed, if one package require other what have it. In -devel must require main package with version. I have wrote about it before.

Comment 18 Pavel Alexeev 2010-08-06 07:31:35 UTC
In last package I don't see any libraries now. Is it normal? Why you remove -libs subpackage?

Comment 19 Till Maas 2010-08-06 07:48:25 UTC
(In reply to comment #17)
> (In reply to comment #15)
> > Also the file COPYRIGHT needs to be included in both packages (the main package
> > and the devel subpackage) since a recent policy change.
> It is not needed, if one package require other what have it. In -devel must
> require main package with version. I have wrote about it before.    

Yes, I forgot about that. But iirc previously the COPYRIGHT file was only in the devel subpackage, but it needs to be in the main package.

(In reply to comment #16)
> (In reply to comment #15)
> > (In reply to comment #14)
> > > After a minimal change (creating %{_lib}/debug in buildroot), lockfile builds
> > > fine in koji.
> > 
> > I guess the build error came from this line in the devel subpackage files
> > section:
> > %exclude %{_libdir}/debug/
> I'm not sure about this. Those two lines from koji build.log:
> extracting debug info from
> /builddir/build/BUILDROOT/lockfile-1.08-5.fc13.x86_64/usr/bin/dotlockfile
> symlinked /usr/lib/debug/usr/lib64/liblockfile.so.1.0.debug to
> /usr/lib/debug/usr/lib64/liblockfile.so.debug
> 
> look some strange to me. I could not figure out, why this happens. Anyway, it's
> fixed in actual version.

What is strange there? The debuginfo creation usually works without problems.

> > Why do you do this in %install:
> > ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so
> > ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so.1
> > 
> > and remove at least one of these commands from Makefile.in in %prep?
> > liblockfile.so.\$(VER) \$(ROOT)\$(libdir)\/liblockfile.so//" Makefile.in
> > file.in in %prep?    
> In Makefile.in is only one link included. I tried to keep them both together.
> Another solution would change Makefile to include the corresponding other link.
> Do you think, it's should go there?

It should be reported upstream and in the meantime it is ok to create the missing symlink in the spec, but the correct one should just stay in Makefile.in.

Comment 20 Matthias Runge 2010-08-06 10:21:14 UTC
OK, as Till suggested, the missing link gets created from spec.

-devel-subpackage requires the main package; main package contains COPYRIGHT etc.


lockfile builds just one library (liblockfile.so)
a link is generated to liblockfile.so.1.0 and a link to liblockfile.so.1

If I understand the packaging guide correctly,
lockfile.so should go to -devel subpackage
and versioned libs should go to -libs.

The -libs-subpackage would contain only 2 links to lockfile.so 
and should require -devel subpackage. This wouldn't make sense.

Where should I place liblockfile and its links?
Currently, they are packed in -devel

rpm -qpvl ../RPMS/i686/lockfile-devel-1.08-7.fc13.i686.rpm 

-rw-r--r--    1 root    root                     1469 Aug  6 12:05 /usr/include/lockfile.h
-rw-r--r--    1 root    root                      878 Aug  6 12:05 /usr/include/maillock.h
lrwxrwxrwx    1 root    root                       18 Aug  6 12:05 /usr/lib/liblockfile.so -> liblockfile.so.1.0
lrwxrwxrwx    1 root    root                       27 Aug  6 12:05 /usr/lib/liblockfile.so.1 -> /usr/lib/liblockfile.so.1.0
-rwxr-xr-x    1 root    root                     7736 Aug  6 12:05 /usr/lib/liblockfile.so.1.0
-rw-r--r--    1 root    root                     2960 Aug  6 12:05 /usr/share/man/man3/lockfile_create.3.gz
-rw-r--r--    1 root    root                     1234 Aug  6 12:05 /usr/share/man/man3/maillock.3.gz

-------
diff -u 

--- lockfile.spec-6	2010-08-06 10:46:39.000000000 +0200
+++ lockfile.spec	2010-08-06 12:04:11.000000000 +0200
@@ -1,6 +1,6 @@
 Name:           lockfile
 Version:        1.08
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        This implements a number of functions found in -lmail on SysV systems
 
 Group:          Applications/System
@@ -33,8 +33,6 @@
 # remove -g root from install
 sed -i "s/install -g root -m 755 dotlockfile \$(ROOT)\$(bindir);/install -m 755 dotlockfile \$(ROOT)\$(bindir);/" Makefile.in
 
-# remove link-creation from Makefile (to be done later during install)
-sed -i "s/ln -s liblockfile.so.\$(VER) \$(ROOT)\$(libdir)\/liblockfile.so//" Makefile.in
 
 %build
 %configure --enable-shared
@@ -52,7 +50,6 @@
 make ROOT=%{buildroot} install_shared
 
 # create links for ldconfig
-ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so
 ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so.1
 
 %clean
@@ -75,10 +72,13 @@
 %{_libdir}/*.so*
 %{_includedir}/*
 %{_mandir}/man3/*
-%doc COPYRIGHT 
 
 
 %changelog
+* Fri Aug 6 2010 Matthias Runge <mrunge> 1.08-7
+- remove COPYRIGHT from devel
+- just fix one missing link from upstream
+
 * Thu Aug 5 2010 Matthias Runge <mrunge> 1.08-6
 - include COPYRIGHT in -devel, too
 - remove unnecessary exclude

----------
[mrunge@mrungexp SPECS]$ rpmlint /home/mrunge/rpmbuild/SRPMS/lockfile-1.08-7.fc13.src.rpm /home/mrunge/rpmbuild/RPMS/i686/lockfile-1.08-7.fc13.i686.rpm /home/mrunge/rpmbuild/RPMS/i686/lockfile-devel-1.08-7.fc13.i686.rpm /home/mrunge/rpmbuild/RPMS/i686/lockfile-debuginfo-1.08-7.fc13.i686.rpm
lockfile.src: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
lockfile.src: W: spelling-error %description -l en_US lmail -> mail, email, l mail
lockfile.i686: W: spelling-error Summary(en_US) lmail -> mail, email, l mail
lockfile.i686: W: spelling-error %description -l en_US lmail -> mail, email, l mail
4 packages and 0 specfiles checked; 0 errors, 4 warnings.

SPEC: http://www.matthias-runge.de/fedora/lockfile.spec
SRPM: http://www.matthias-runge.de/fedora/lockfile-1.08-7.fc13.src.rpm

Comment 21 Till Maas 2010-08-06 10:43:32 UTC
(In reply to comment #20)
> OK, as Till suggested, the missing link gets created from spec.
> 
> -devel-subpackage requires the main package; main package contains COPYRIGHT
> etc.
> 
> 
> lockfile builds just one library (liblockfile.so)
> a link is generated to liblockfile.so.1.0 and a link to liblockfile.so.1

Actually the lib is liblockfile.so.1.0 and the two other files are symlinks.

> If I understand the packaging guide correctly,
> lockfile.so should go to -devel subpackage
> and versioned libs should go to -libs.
> 
> The -libs-subpackage would contain only 2 links to lockfile.so 
> and should require -devel subpackage. This wouldn't make sense.
> 
> Where should I place liblockfile and its links?
> Currently, they are packed in -devel

Since the library seems to be build now properly, the package should be named back to "liblockfile", the liblockfile.so.1.0 file, the liblockfile.so.1 symlink, the binary and the man1 manpage(s) go into the main package. The .so symlink, the man3 manpage(s) and the header files into the devel package.

Some more remarks:
- you can just use mkdir instead of %{__mkdir} 
- %{__mkdir} -p %{buildroot}/%{_libdir}/debug should not be needed
- the spec is more readable if you do not use just plain globbings like "%{_bindir}/*" but use one entry for each binary. This way you will also catch changes there. For the manpages it is helpful to use "*" instead of ".gz" as a suffix, because the manpages might be compressed somehow else in the future.

Comment 22 Matthias Runge 2010-08-06 11:39:47 UTC
This sounds sane to me, it fits really better this way.

If Pavel does not complain, I'll rename.

The files section now lists each file explicit, files go to main and -devel subpackage, as Till mentioned.

SRPM: http://www.matthias-runge.de/fedora/liblockfile-1.08-8.fc13.src.rpm
SPEC: http://www.matthias-runge.de/fedora/liblockfile.spec

Comment 23 Till Maas 2010-08-06 12:18:32 UTC
Ok, the spec looks very good now. Two minor changes you can do in case there is some other major change or if you import it into Fedora:

- Please use %{_mandir}/man1/dotlockfile.1* and not %{_mandir}/man1/dotlockfile.1.* - there is one less fullstop, which makes the globbing pattern match even if the manpage is not compressed at all
- Please change the description / summary for the devel package to:
Summary:        Development files for %{name}
%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

These are the default values created by rpmdev-newspec and the current one only mentions the header files, but there is also the .so symlink included.

Comment 24 Matthias Runge 2010-08-06 14:01:30 UTC
The actual version contains the following changes:

SPEC: http://www.matthias-runge.de/fedora/liblockfile.spec
SRPM: http://www.matthias-runge.de/fedora/liblockfile-1.08-9.fc13.src.rpm

[mrunge@sofja SPECS]$ diff -u liblockfile.spec-8 liblockfile.spec
--- liblockfile.spec-8	2010-08-06 15:49:23.141691811 +0200
+++ liblockfile.spec	2010-08-06 15:57:21.310859929 +0200
@@ -1,6 +1,6 @@
 Name:           liblockfile
 Version:        1.08
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        This implements a number of functions found in -lmail on SysV systems
 
 Group:          Applications/System
@@ -19,12 +19,13 @@
 manage and remove generic lockfiles.
 
 %package devel
-Summary: Header files needed to build apps linked against lockfile
+Summary: Development files for %{name}
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 
 %description devel 
-header files needed to build apps linked against lockfile
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
 
 
 %prep
@@ -64,7 +65,7 @@
 %{_bindir}/dotlockfile
 %{_libdir}/liblockfile.so.1.0
 %{_libdir}/liblockfile.so.1
-%{_mandir}/man1/dotlockfile.1.*
+%{_mandir}/man1/dotlockfile.1*
 %doc README COPYRIGHT Changelog
 
 
@@ -73,11 +74,15 @@
 %{_libdir}/liblockfile.so
 %{_includedir}/maillock.h
 %{_includedir}/lockfile.h
-%{_mandir}/man3/lockfile_create.3.*
-%{_mandir}/man3/maillock.3.*
+%{_mandir}/man3/lockfile_create.3*
+%{_mandir}/man3/maillock.3*
 
 
 %changelog
+* Fri Aug 6 2010 Matthias Runge <mrunge> 1.08-9
+- change description and summary of -devel-subpackage
+- make wildcard for man-pages even match against uncompressed files
+
 * Fri Aug 6 2010 Matthias Runge <mrunge> 1.08-8
 - rename to liblockfile
 - sorting file to main and -devel package

Comment 25 Pavel Alexeev 2010-08-09 13:10:33 UTC
I do not see what you do with -fPIC option? rpmlint silent, but it still is not there...

Mostly package fine to me. Till thank you for the help.

APPROVED.

Comment 26 Matthias Runge 2010-08-09 18:47:26 UTC
Thank you both!

As far as I understand, make compiles liblockfile.so during make.

[mrunge@sofja liblockfile-1.08]$ make liblockfile.so
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wall -D_GNU_SOURCE -fPIC -D_REENTRANT -I. -DLIB -DLOCKPROG=\"/usr/bin/dotlockfile\" \
			-c lockfile.c
lockfile.c: In function ‘lockfile_create’:
lockfile.c:279: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result
ar rv liblockfile.a lockfile.o
ar: creating liblockfile.a
a - lockfile.o
gcc -fPIC -shared -Wl,-soname,liblockfile.so.1 \
			-o liblockfile.so lockfile.o -lc

Comment 27 Matthias Runge 2010-08-09 18:53:31 UTC
New Package SCM Request
=======================
Package Name: liblockfile
Short Description: This library implements a number of functions found in -lmail on SysV 
Owners: mrunge
Branches: F13 F14 EL5 EL6 devel

Comment 28 Kevin Fenzi 2010-08-10 17:55:37 UTC
Git done (by process-git-requests).

Comment 29 Fedora Update System 2010-08-11 07:34:34 UTC
liblockfile-1.08-9.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/liblockfile-1.08-9.fc14

Comment 30 Fedora Update System 2010-08-11 07:37:00 UTC
liblockfile-1.08-9.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/liblockfile-1.08-9.fc13

Comment 31 Fedora Update System 2010-08-11 08:20:55 UTC
liblockfile-1.08-9.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/liblockfile-1.08-9.el5

Comment 32 Fedora Update System 2010-08-12 04:11:24 UTC
liblockfile-1.08-9.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update liblockfile'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/liblockfile-1.08-9.fc13

Comment 33 Fedora Update System 2010-08-12 17:54:48 UTC
liblockfile-1.08-9.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update liblockfile'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/liblockfile-1.08-9.el5

Comment 34 Fedora Update System 2010-08-12 19:56:23 UTC
liblockfile-1.08-9.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update liblockfile'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/liblockfile-1.08-9.fc14

Comment 35 Michael Schwendt 2010-08-13 21:39:25 UTC
There's a cheaper way to create shared lib symlinks (it also creates local links instead of links to an absolute path):

--- liblockfile.spec.orig       2010-08-13 23:32:18.000000000 +0200
+++ liblockfile.spec    2010-08-13 23:36:49.000000000 +0200
@@ -49,8 +49,7 @@
 mkdir -p %{buildroot}/%{_mandir}/man3
 make ROOT=%{buildroot} install
 
-# create links for ldconfig
-ln -s %{_libdir}/liblockfile.so.1.0 %{buildroot}/%{_libdir}/liblockfile.so.1
+ldconfig -N %{buildroot}/%{_libdir}
 
 %clean
 rm -rf %{buildroot}

Comment 36 Michael Schwendt 2010-08-13 21:42:57 UTC
Um, -n was missing:

ldconfig -N -n %{buildroot}/%{_libdir}

Comment 37 Pavel Alexeev 2010-08-14 05:51:41 UTC
Michael, thank you. I found it useful and try remember. But have we it explained anywhere in wiki?

Comment 38 Matthias Runge 2010-08-14 19:24:55 UTC
Michael,
great, thank you. 
Your solution is real nifty. I'll try to remember this for later use.

Comment 39 Fedora Update System 2010-08-26 00:54:00 UTC
liblockfile-1.08-9.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 40 Fedora Update System 2010-08-26 03:25:52 UTC
liblockfile-1.08-9.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 41 Fedora Update System 2010-08-30 17:55:39 UTC
liblockfile-1.08-9.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 42 Matthias Runge 2015-01-07 12:26:09 UTC
Package Change Request
======================
Package Name: liblockfile
New Branches: epel7
Owners: mrunge

Comment 43 Gwyn Ciesla 2015-01-07 13:02:49 UTC
Git done (by process-git-requests).


Note You need to log in before you can comment on or make changes to this bug.