Bug 668243

Summary: Review Request: libqb - An IPC library for high performance servers.
Product: [Fedora] Fedora Reporter: Angus Salkeld <asalkeld>
Component: Package ReviewAssignee: Ian Weller <ian>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ajia, fdinitto, fedora-package-review, ian, maurizio.antillon, notting, rc040203, sdake
Target Milestone: ---Flags: ian: fedora‑review+
tibbs: fedora‑cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libqb-0.4.1-2.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-06 20:30:48 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Angus Salkeld 2011-01-09 06:34:19 EST
Spec URL: http://libqb.org/html/libqb.spec
SRPM URL: http://libqb.org/html/libqb-0.4.0-1.fc14.src.rpm
Description: libqb provides high performance client server reusable features.
Initially these are IPC and poll.

Hi, this is my first package, and I need a sponsor.


Thanks
Angus Salkeld
Comment 1 Angus Salkeld 2011-01-09 20:26:10 EST
Question:
 libqb does have tests that can run as a part of "make check".
 Is "make check" run as a part of the normal rpm creation?
 If so, is it desirable to run these as a part of building the rpm?

 I would need to add:
 BuildRequires: ... check-devel
Comment 2 Fabio Massimo Di Nitto 2011-01-13 05:14:53 EST
NOTE to others, I can review this simple package, but I am not a sponsor.
Comment 3 Fabio Massimo Di Nitto 2011-01-13 05:31:58 EST
# MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review.[1]

rpmlint SPECS/libqb.spec SRPMS/libqb-0.4.0-1.fc13.src.rpm RPMS/x86_64/*
libqb.src: W: summary-ended-with-dot C An IPC library for high performance servers.
libqb.x86_64: W: summary-ended-with-dot C An IPC library for high performance servers.
4 packages and 1 specfiles checked; 0 errors, 2 warnings.

pretty minor but please address this warning.

# MUST: The package must be named according to the Package Naming Guidelines .

OK

# MUST: The spec file name must match the base package %{name}, in the format%{name}.spec unless your package has an exemption. [2] .

OK

# MUST: The package must meet the Packaging Guidelines .

OK

# MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .

LGPLv2+ OK

# MUST: The License field in the package spec file must match the actual license. [3]

OK

# 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.[4]

OK

# MUST: The spec file must be written in American English. [5]

OK

# MUST: The spec file for the package MUST be legible. [6]

OK

# 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.

OK

# MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. [7]

OK

[fabbione@daikengo SRPMS]$ koji build dist-rawhide --scratch libqb-0.4.0-1.fc13.src.rpm 
Uploading srpm: libqb-0.4.0-1.fc13.src.rpm
[====================================] 100% 00:00:03  79.28 KiB  25.79 KiB/sec
Created task: 2718693
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2718693
Watching tasks (this may be safely interrupted)...
2718693 build (dist-rawhide, libqb-0.4.0-1.fc13.src.rpm): open (x86-02.phx2.fedoraproject.org)
  2718695 buildArch (libqb-0.4.0-1.fc13.src.rpm, i686): open (x86-15.phx2.fedoraproject.org)
  2718694 buildArch (libqb-0.4.0-1.fc13.src.rpm, x86_64): open (x86-07.phx2.fedoraproject.org)
  2718695 buildArch (libqb-0.4.0-1.fc13.src.rpm, i686): open (x86-15.phx2.fedoraproject.org) -> closed
  0 free  2 open  1 done  0 failed
  2718694 buildArch (libqb-0.4.0-1.fc13.src.rpm, x86_64): open (x86-07.phx2.fedoraproject.org) -> closed
  0 free  1 open  2 done  0 failed
2718693 build (dist-rawhide, libqb-0.4.0-1.fc13.src.rpm): open (x86-02.phx2.fedoraproject.org) -> closed
  0 free  0 open  3 done  0 failed

2718693 build (dist-rawhide, libqb-0.4.0-1.fc13.src.rpm) completed successfully

and tested locally on F13.

# 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. [8]

does NOT apply

# 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.

OK

# MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.[9]

does NOT apply

# 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. [10]

OK

# MUST: Packages must NOT bundle copies of system libraries.[11]

OK

# 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. [12]

does NOT apply

# 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. [13]

OK

# MUST: A Fedora package must not list a file more than once in the spec file's %files listings. (Notable exception: license texts in specific situations)[14]

OK

# 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. [15]

OK

# MUST: Each package must consistently use macros. [16]

not OK.

Please use consistently either %{buildroot} or $RPM_BUILD_ROOT

Also, please document numcomm and dirty variables. I understand what they are for by looking at upstream git repo, but it is worth explaining others why they are there.

# MUST: The package must contain code, or permissable content. [17]

OK

# 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). [18]

does NOT apply

# 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. [18]

OK

# MUST: Header files must be in a -devel package. [19]

OK

# MUST: Static libraries must be in a -static package. [20]

does NOT apply

# 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. [19]

OK

# MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release} [21]

OK

# MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.[20]

OK

# 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. [22]

does NOT apply

# 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. [23]

OK

# MUST: All filenames in rpm packages must be valid UTF-8. [24]

does NOT apply

# 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. [25]

does NOT apply

# SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available. [26]

does NOT apply

# SHOULD: The reviewer should test that the package builds in mock. [27]

OK (see above)

# SHOULD: The package should compile and build into binary rpms on all supported architectures. [28]

OK (see above)

# SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.

See my reply to comment #1

# SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity. [29]

OK

# SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency. [21]

OK (see above)

# 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. [30]

OK

# 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. [31]

does NOT apply

# SHOULD: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense.[32]

does NOT apply
Comment 4 Fabio Massimo Di Nitto 2011-01-13 05:33:15 EST
(In reply to comment #1)
> Question:
>  libqb does have tests that can run as a part of "make check".
>  Is "make check" run as a part of the normal rpm creation?
>  If so, is it desirable to run these as a part of building the rpm?
> 
>  I would need to add:
>  BuildRequires: ... check-devel

I see no reason not to run the make test at build time and check-devel is only a BuildRequires that would not clutter the final rpm with extra dependencies.

So please turn on make check in the build.
Comment 5 Angus Salkeld 2011-01-13 20:50:40 EST
Thanks for the review Fabio!

I have updated the spec & srpm:
http://libqb.org/html/libqb.spec
http://libqb.org/html/libqb-0.4.0-2.fc14.src.rpm

I have built libqb on s390, arm & sparc (but the tests fail)
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=283822
http://sparc.koji.fedoraproject.org/koji/taskinfo?taskID=51371
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=68945

Why does "ps" exist on the other arches but not sparc/arm?
./check_resources.sh: line 11: ps: command not found

There are some issue I want to sort out, are there machines
I can use to debug them?

Thanks
Angus

%changelog
* Fri Jan 14 2011 Angus Salkeld <asalkeld@redhat.com> - 0.4.0-2
- remove "." from Summary
- Add "check-devel to BuildRequires
- Add "make check" to check section
- Changed a buildroot to RPM_BUILD_ROOT
- Document alphatag, numcomm and dirty variables.
Comment 6 Fabio Massimo Di Nitto 2011-01-14 05:17:04 EST
I can confirm that the new package addresses all the reported issues so far.

regarding the secondary arches failures. I don´t know what is the status of the arm port, but sparc is not worth worrying about. sparc is behind due to some toolchain issues. So for now let´s not worry about them in general and move on. Primary/supported architectures are clear.
Comment 7 Ralf Corsepius 2011-01-19 01:25:43 EST
2 MUSTFIXES:

* From my build.log
...
./check_resources.sh: line 11: ps: command not found
...
=> missing BR: /bin/ps


* Package doesn't honor RPM_OPT_FLAGS.

The configure script plays nasty games with *FLAGS in a way they overwrite Fedora's *FLAGS.

Excerpt from my build.log:
... gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -ggdb3 -Wall ....

Note: ... "RPM_OPT_FLAGS"... -O3 -ggdb3.

The later overwrite flags from RPM_OPT_FLAGS.

One way to fix this is to sed out the stuff which is responsible for this from configure.ac: e.g. by adding this before autogen.sh:

sed -i -e 's,OPT_CFLAGS="-O3",OPT_CFLAGS=,' \
 -e 's,GDB_FLAGS="-ggdb3",GDB_FLAGS=,' configure.ac


Should one of you be upstream, I'd seriously advise you to rework the configure.ac and to start making "make dist" working to ship proerly packaged tar-balls instead of .git snapshots.
Comment 8 Fabio Massimo Di Nitto 2011-01-19 03:00:36 EST
(In reply to comment #7)
> 2 MUSTFIXES:
> 
> * From my build.log
> ...
> ./check_resources.sh: line 11: ps: command not found
> ...
> => missing BR: /bin/ps

Yes ACK, I think something has been fluxing in the chroot because in my previous logs I didn´t have this issue at all. Now it is showing up. Probably
an update or something did change, anyway not worth investigating IMHO. The fix
is simple.

> 
> 
> * Package doesn't honor RPM_OPT_FLAGS.
> 
> The configure script plays nasty games with *FLAGS in a way they overwrite
> Fedora's *FLAGS.
> 
> Excerpt from my build.log:
> ... gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -O2 -g -pipe
> -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -ggdb3 -Wall ....
> 
> Note: ... "RPM_OPT_FLAGS"... -O3 -ggdb3.
> 
> The later overwrite flags from RPM_OPT_FLAGS.
> 
> One way to fix this is to sed out the stuff which is responsible for this from
> configure.ac: e.g. by adding this before autogen.sh:
> 
> sed -i -e 's,OPT_CFLAGS="-O3",OPT_CFLAGS=,' \
>  -e 's,GDB_FLAGS="-ggdb3",GDB_FLAGS=,' configure.ac

I disagree with this approach as policy allow flags override.

http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags

If upstream considers -O3 -ggdb3 better suitable for his code, they should simply document that.

According to the build.log only "-O2 -g" are overridden.

> Should one of you be upstream, I'd seriously advise you to rework the
> configure.ac and to start making "make dist" working to ship proerly packaged
> tar-balls instead of .git snapshots.

make dist works just fine upstream, what problem are you experiencing exactly? Random comments without some background information are not very useful.

I think what you miss is that the release script for libqb is capable of handling both real release and snapshots to guarantee that the correct version
information are propagated across the board.

The srpm/rpm have been checked against a release tarball and they match. As long as upstream releases and what is shipped in Fedora do match, I doubt it is Fedora´s job to enforce any kind of release policy to upstream.
Comment 9 Ralf Corsepius 2011-01-19 06:21:23 EST
(In reply to comment #8)
> (In reply to comment #7)
> > 2 MUSTFIXES:

> > * Package doesn't honor RPM_OPT_FLAGS.
> > 
> > The configure script plays nasty games with *FLAGS in a way they overwrite
> > Fedora's *FLAGS.
> > 
> > Excerpt from my build.log:
> > ... gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -O2 -g -pipe
> > -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> > --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -ggdb3 -Wall ....
> > 
> > Note: ... "RPM_OPT_FLAGS"... -O3 -ggdb3.
> > 
> > The later overwrite flags from RPM_OPT_FLAGS.
> > 
> > One way to fix this is to sed out the stuff which is responsible for this from
> > configure.ac: e.g. by adding this before autogen.sh:
> > 
> > sed -i -e 's,OPT_CFLAGS="-O3",OPT_CFLAGS=,' \
> >  -e 's,GDB_FLAGS="-ggdb3",GDB_FLAGS=,' configure.ac
> 
> I disagree with this approach as policy allow flags override.
>
> http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
You are mis-interpreting this.

> If upstream considers -O3 -ggdb3 better suitable for his code, they should
> simply document that.
No. They simply must not override vital *FLAGS.

> According to the build.log only "-O2 -g" are overridden.
Correct  - These are vital and must not be overridden.

In case I was not clear enough: I will insist on this being fixed.

> > Should one of you be upstream, I'd seriously advise you to rework the
> > configure.ac and to start making "make dist" working to ship proerly packaged
> > tar-balls instead of .git snapshots.
> 
> make dist works just fine upstream, what problem are you experiencing exactly?
The tarball is improperly packaged - E.g. its lack all auto*generated files, which forces the Fedora packager to explictly pull in the autotools.
Comment 10 Fabio Massimo Di Nitto 2011-01-19 06:34:35 EST
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > 2 MUSTFIXES:
> 
> > > * Package doesn't honor RPM_OPT_FLAGS.
> > > 
> > > The configure script plays nasty games with *FLAGS in a way they overwrite
> > > Fedora's *FLAGS.
> > > 
> > > Excerpt from my build.log:
> > > ... gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -O2 -g -pipe
> > > -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> > > --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -ggdb3 -Wall ....
> > > 
> > > Note: ... "RPM_OPT_FLAGS"... -O3 -ggdb3.
> > > 
> > > The later overwrite flags from RPM_OPT_FLAGS.
> > > 
> > > One way to fix this is to sed out the stuff which is responsible for this from
> > > configure.ac: e.g. by adding this before autogen.sh:
> > > 
> > > sed -i -e 's,OPT_CFLAGS="-O3",OPT_CFLAGS=,' \
> > >  -e 's,GDB_FLAGS="-ggdb3",GDB_FLAGS=,' configure.ac
> > 
> > I disagree with this approach as policy allow flags override.
> >
> > http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
> You are mis-interpreting this.

On what base sorry?

> 
> > If upstream considers -O3 -ggdb3 better suitable for his code, they should
> > simply document that.
> No. They simply must not override vital *FLAGS.

Where is such definition?

> 
> > According to the build.log only "-O2 -g" are overridden.
> Correct  - These are vital and must not be overridden.
> 
> In case I was not clear enough: I will insist on this being fixed.

If so you need to make your case more complete and explicit.

Explain where the keyword "vital" is defined in fedora policy and why it should be enforced to this level.

None of the gcc security flags are overridden and so far you haven´t given any technical reason on why optimization flags should not.

> 
> > > Should one of you be upstream, I'd seriously advise you to rework the
> > > configure.ac and to start making "make dist" working to ship proerly packaged
> > > tar-balls instead of .git snapshots.
> > 
> > make dist works just fine upstream, what problem are you experiencing exactly?
> The tarball is improperly packaged - E.g. its lack all auto*generated files,
> which forces the Fedora packager to explictly pull in the autotools.

Many upstreams do not ship autogenerated files and pull in autotools at build time. If this is an issue please provide a pointer to the Fedora packaging guideline that enforces upstream to behave as Fedora requires and/or mass-file bugs after policy has been made clear.

Fedora Policy has only one draft to address that issue and it is still under discussion on what the correct behavior should be in those cases. As long the draft is not approved as official Policy, it cannot be enforced.
Comment 11 Ralf Corsepius 2011-01-20 01:37:29 EST
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > 2 MUSTFIXES:
> > 
> > > > * Package doesn't honor RPM_OPT_FLAGS.
> > > > 
> > > > The configure script plays nasty games with *FLAGS in a way they overwrite
> > > > Fedora's *FLAGS.
> > > > 
> > > > Excerpt from my build.log:
> > > > ... gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -O2 -g -pipe
> > > > -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> > > > --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -ggdb3 -Wall ....
> > > > 
> > > > Note: ... "RPM_OPT_FLAGS"... -O3 -ggdb3.
> > > > 
> > > > The later overwrite flags from RPM_OPT_FLAGS.
> > > > 
> > > > One way to fix this is to sed out the stuff which is responsible for this from
> > > > configure.ac: e.g. by adding this before autogen.sh:
> > > > 
> > > > sed -i -e 's,OPT_CFLAGS="-O3",OPT_CFLAGS=,' \
> > > >  -e 's,GDB_FLAGS="-ggdb3",GDB_FLAGS=,' configure.ac
> > > 
> > > I disagree with this approach as policy allow flags override.
> > >
> > > http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
> > You are mis-interpreting this.
> 
> On what base sorry?

Common sense and the fact I know about the intentions behind this paragraph.

> None of the gcc security flags are overridden and so far you haven´t given any
> technical reason on why optimization flags should not.
-OX and -g rsp. -gX are GCC flags which comprise many other GCC flags underneath.

What they exactly do changes over time and is machine/archtecture/OS dependent.

=> Consistent usage of these flags is vital to a distribution.

Openly said, I wonder why I have to explain this.

 
> > 
> > > > Should one of you be upstream, I'd seriously advise you to rework the
> > > > configure.ac and to start making "make dist" working to ship proerly packaged
> > > > tar-balls instead of .git snapshots.
> > > 
> > > make dist works just fine upstream, what problem are you experiencing exactly?
> > The tarball is improperly packaged - E.g. its lack all auto*generated files,
> > which forces the Fedora packager to explictly pull in the autotools.
> 
> Many upstreams do not ship autogenerated files and pull in autotools at build
> time.
Yes, There are many people who are abusing the autotools, like due to lack of understanding.

> If this is an issue please provide a pointer to the Fedora packaging
> guideline that enforces upstream to behave as Fedora requires and/or mass-file
> bugs after policy has been made clear.
This isn't an issue to Fedora - It's an issue to such package's upstreams and to those people who try to maintain such packages in Fedora.

Running the autotools during builds simply means exposing people to non-determinisms. In other words, everytime somebody uses a different version of the autotools than upstream, this person is likely to face issues from this.

Rest assured, these issues are not of a theoretical nature, they are real.

> Fedora Policy has only one draft to address that issue and it is still under
> discussion on what the correct behavior should be in those cases. As long the
> draft is not approved as official Policy, it cannot be enforced.

Not much of a problem - *I* don't have much of a problem with upstream being so rude to expose their user base to avoidable risks nor do I have a problem with fedora maintainers shooting themself into their own foot.
Comment 12 Fabio Massimo Di Nitto 2011-01-20 03:28:39 EST
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > (In reply to comment #8)
> > > > (In reply to comment #7)
> > > > > 2 MUSTFIXES:
> > > 
> > > > > * Package doesn't honor RPM_OPT_FLAGS.
> > > > > 
> > > > > The configure script plays nasty games with *FLAGS in a way they overwrite
> > > > > Fedora's *FLAGS.
> > > > > 
> > > > > Excerpt from my build.log:
> > > > > ... gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -O2 -g -pipe
> > > > > -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> > > > > --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -ggdb3 -Wall ....
> > > > > 
> > > > > Note: ... "RPM_OPT_FLAGS"... -O3 -ggdb3.
> > > > > 
> > > > > The later overwrite flags from RPM_OPT_FLAGS.
> > > > > 
> > > > > One way to fix this is to sed out the stuff which is responsible for this from
> > > > > configure.ac: e.g. by adding this before autogen.sh:
> > > > > 
> > > > > sed -i -e 's,OPT_CFLAGS="-O3",OPT_CFLAGS=,' \
> > > > >  -e 's,GDB_FLAGS="-ggdb3",GDB_FLAGS=,' configure.ac
> > > > 
> > > > I disagree with this approach as policy allow flags override.
> > > >
> > > > http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
> > > You are mis-interpreting this.
> > 
> > On what base sorry?
> 
> Common sense and the fact I know about the intentions behind this paragraph.
> 
> > None of the gcc security flags are overridden and so far you haven´t given any
> > technical reason on why optimization flags should not.
> -OX and -g rsp. -gX are GCC flags which comprise many other GCC flags
> underneath.
> 
> What they exactly do changes over time and is machine/archtecture/OS dependent.

-O2 has changed in time as -O3 did. IME the only real safe option is to disable -O all together (yes I have been hitted several times by -O2 breakage in the past), and this is becoming a very academical discussion as it is clearly senseless to go -O0.

If a piece of software is less performant with -O2 (see some crypto implementation for example), with such strong policy in place (the way you interpret it), will make Fedora a distribution I wouldn´t want to see that software distributed.

-g is used only to generate debugging information with gdb3 increasing the compatibility of the debugging info with gdb. It shouldn´t have any effect on the final code being executed once the exec is stripped. hardly an issue here.

> 
> => Consistent usage of these flags is vital to a distribution.
> 
> Openly said, I wonder why I have to explain this.

I am not asking you to repeat yourself. I am asking you to point me where in the Policy it states that flags *MUST* be treated the way you are suggesting.

"Adding to and overriding or filtering parts of these flags is permitted if there's a good reason to do so; the rationale for doing so should be reviewed and documented in the specfile especially in the override and filter cases."

What part of "is permitted" am I misinterpreting?

> 
> 
> > > 
> > > > > Should one of you be upstream, I'd seriously advise you to rework the
> > > > > configure.ac and to start making "make dist" working to ship proerly packaged
> > > > > tar-balls instead of .git snapshots.
> > > > 
> > > > make dist works just fine upstream, what problem are you experiencing exactly?
> > > The tarball is improperly packaged - E.g. its lack all auto*generated files,
> > > which forces the Fedora packager to explictly pull in the autotools.
> > 
> > Many upstreams do not ship autogenerated files and pull in autotools at build
> > time.
> Yes, There are many people who are abusing the autotools, like due to lack of
> understanding.

See, I have already fixed several upstreams to behave exactly this way (ship all autogenerated files etc), as I share this exact concerns (including the upstream that libqb used as source for this first upstream cut. libqb hasn´t catch up yet but I know that will happen at somepoint).

My point is that from a spec/package review process (since this is what we are doing here), none of the Fedora Policies in place do enforce one way or another. Taking those policy fight on a review is not the right forum or place. Trying to "exploit" a review to leverage a policy change is IMHO not the right way.

Fabio
Comment 13 Angus Salkeld 2011-01-30 23:42:23 EST
Hi guys

Sorry for the delay I have been on holiday.

I have changed upstream to:
1) only add -O and -g options if configured with either
   ./configure --enable-debug (adds -ggdb3 -O0)
   or
   ./configure --enable-coverage (adds -O0)
  So basically it won't override defaults unless requested to.

2) I have added procps and removed automake&autoconf from the BuildRequires

3) I have merged in the release system from corosync
   so we can have the auto*generated files included in the tarball.
4) I have released an upstream 0.4.1 to get theses changes.

The new spec is here:
http://libqb.org/html/libqb.spec
The new srpm here:
http://libqb.org/html/libqb-0.4.1-1.fc14.src.rpm

tests
--------
$ rpmlint -v libqb
libqb.x86_64: I: checking
libqb.x86_64: I: checking-url http://www.libqb.org (timeout 10 seconds)
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
$ rpmlint -v libqb-debuginfo
libqb-debuginfo.x86_64: I: checking
libqb-debuginfo.x86_64: I: checking-url http://www.libqb.org (timeout 10 seconds)
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
$ rpmlint -v libqb-devel
libqb-devel.x86_64: I: checking
libqb-devel.x86_64: I: checking-url http://www.libqb.org (timeout 10 seconds)
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ koji build --scratch dist-f13 /home/asalkeld/rpmbuild/SRPMS/libqb-0.4.1-1.fc14.src.rpm

results: http://koji.fedoraproject.org/koji/taskinfo?taskID=2751358


Thanks for the review, I hope this sorts out everything that needs to be.

Regards
Angus
Comment 14 Fabio Massimo Di Nitto 2011-02-03 03:40:45 EST
Checked the last package and it addresses all the issues mentioned above.

Now we just need a sponsor to do the job.
Comment 15 Ian Weller 2011-02-07 19:03:16 EST
Hi Angus,

I've been asked by Robyn Bergeron to sponsor you for this package, and I am willing to do so. Just had a few questions:

- Do you have any other pending package reviews, or have you done any informal
  reviews of other packages?
- In your spec, you document three variables at the top; are they just not set in
  this release of the spec? (I would recommend having the definitions for each of
  the variables in that comment block, but just commented out when they are not
  in use.)
- Also on those variables, please make sure that they follow the release tag
  guidelines:
    https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Release_Tag
  At first glance, it appears that you may end up breaking some of those
  guidelines if you're not careful.
- Did you make sure that there were no dependencies on other headers in the devel
  subpackage? The devel subpackage only requires pkgconfig.
- Instead of using %dir %{_includedir}/qb/ and listing each file in it
  individually, clean up your %files list by just listing %{_includedir}/qb/ --
  without the %dir command, it will include that directory and everything in it.
  Consider this a blocker.

(Because I'm willing to sponsor you, I'm assigning this request to me.)
Comment 16 Angus Salkeld 2011-02-07 20:09:30 EST
(In reply to comment #15)
> Hi Angus,
> 
> I've been asked by Robyn Bergeron to sponsor you for this package, and I am
> willing to do so. Just had a few questions:

Cool, thanks!

> 
> - Do you have any other pending package reviews, or have you done any informal
>   reviews of other packages?

Nope, just this one.

> - In your spec, you document three variables at the top; are they just not set
> in
>   this release of the spec? (I would recommend having the definitions for each
> of
>   the variables in that comment block, but just commented out when they are not
>   in use.)

They are mainly used upstream, I am just trying to keep this and the upstream
in-sync as much as possible.
I tried adding them to the comment but had an rpmlint warning about having a
variable in a comment.

> - Also on those variables, please make sure that they follow the release tag
>   guidelines:
>     https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Release_Tag
>   At first glance, it appears that you may end up breaking some of those
>   guidelines if you're not careful.

My idea was not to use these in the fedora release number.
(if doing an alpha release, I'll manually edit the "Release" string).

> - Did you make sure that there were no dependencies on other headers in the
> devel
>   subpackage? The devel subpackage only requires pkgconfig.

I believe so, we don't need std headers & man do we?
Is here a way of checking? I have done rpmlint and koji builds without
problems.

> - Instead of using %dir %{_includedir}/qb/ and listing each file in it
>   individually, clean up your %files list by just listing %{_includedir}/qb/ --
>   without the %dir command, it will include that directory and everything in
> it.

OK, thanks - didn't know about that.

>   Consider this a blocker.
> 
> (Because I'm willing to sponsor you, I'm assigning this request to me.)
Comment 17 Ian Weller 2011-02-07 21:17:35 EST
(In reply to comment #16)
> (In reply to comment #15)
> > - Did you make sure that there were no dependencies on other headers in the
> > devel
> >   subpackage? The devel subpackage only requires pkgconfig.
> 
> I believe so, we don't need std headers & man do we?
> Is here a way of checking? I have done rpmlint and koji builds without
> problems.

Well, the reason is so that when you use these header files in code, the compiler doesn't throw an error because an #include file couldn't be found.

I ran the following (very very hacky) shell script from /usr/include in an extracted version of the RPM:

for j in $(for i in $(grep -r '#include <' . | \
    sed -e 's/.*#include <\(.*\)>$/\1/'); do find /usr/include | \
    grep $i; done | less); do rpm -qf $j; done | grep -v kernel-headers | \
    grep -v libstdc++-devel | grep -v glibc-headers

(kernel-headers and glibc-headers are both deps for gcc; libstdc++-devel is a dep for gcc-g++, so those don't need to be included.)

Nothing showed up in the output of that script, so I guess you're good.

>> - Do you have any other pending package reviews, or have you done any
>>   informal reviews of other packages?

> Nope, just this one.

If you have something else you need to package, I would recommend submitting that for review and having me take a look at it. My sponsoring you depends on how well I feel you understand the Fedora packaging guidelines. I think you've got a pretty good grasp on them, but I generally like to see more than one package from any submitter. (Alternatively, you can take any package review, do an informal review of it, and link to that bug here.)
Comment 18 Fabio Massimo Di Nitto 2011-02-08 00:55:15 EST
Hi Ian,

(In reply to comment #15)
> Hi Angus,
> 
> I've been asked by Robyn Bergeron to sponsor you for this package, and I am
> willing to do so. Just had a few questions:

thanks for taking over here.

> - Instead of using %dir %{_includedir}/qb/ and listing each file in it
>   individually, clean up your %files list by just listing %{_includedir}/qb/ --
>   without the %dir command, it will include that directory and everything in
> it.

I have a question about this change. I am really working hard to improve my packaging skills, to eventually become a sponsor, but I am not entirely sure why one way is better than other.

In my head, the one liner is clearly easier to read in a spec file, but listing all files has other benefits, such as detecting possible leaks of unwanted files in there (an upstream build error for example), or possible API changes by moving functions around to new headers, and that would allow the packagers to easily spot them and possible notify the API users (there was a similar, very detailed message - Subject: Poppler soname bump - that I find very polite).

Thanks for your time.
Fabio
Comment 19 Ralf Corsepius 2011-02-08 01:45:02 EST
(In reply to comment #18)
> > - Instead of using %dir %{_includedir}/qb/ and listing each file in it
> >   individually, clean up your %files list by just listing %{_includedir}/qb/ --
> >   without the %dir command, it will include that directory and everything in
> > it.

> In my head, the one liner is clearly easier to read in a spec file, but listing
> all files has other benefits, such as detecting possible leaks of unwanted
> files in there (an upstream build error for example), or possible API changes
> by moving functions around to new headers, and that would allow the packagers
> to easily spot them and possible notify the API users
It's much a matter of personal preference. Some people prefer "this way", others "that way". I for one prefer the "one liner approach", because of its simplicity.
Comment 20 Angus Salkeld 2011-02-08 07:00:51 EST
(In reply to comment #17)
> (In reply to comment #16)
> > (In reply to comment #15)
> > > - Did you make sure that there were no dependencies on other headers in the
> > > devel
> > >   subpackage? The devel subpackage only requires pkgconfig.
> > 
> > I believe so, we don't need std headers & man do we?
> > Is here a way of checking? I have done rpmlint and koji builds without
> > problems.
> 
> Well, the reason is so that when you use these header files in code, the
> compiler doesn't throw an error because an #include file couldn't be found.
> 
> I ran the following (very very hacky) shell script from /usr/include in an
> extracted version of the RPM:
> 
> for j in $(for i in $(grep -r '#include <' . | \
>     sed -e 's/.*#include <\(.*\)>$/\1/'); do find /usr/include | \
>     grep $i; done | less); do rpm -qf $j; done | grep -v kernel-headers | \
>     grep -v libstdc++-devel | grep -v glibc-headers
> 
> (kernel-headers and glibc-headers are both deps for gcc; libstdc++-devel is a
> dep for gcc-g++, so those don't need to be included.)
> 
> Nothing showed up in the output of that script, so I guess you're good.
> 
> >> - Do you have any other pending package reviews, or have you done any
> >>   informal reviews of other packages?
> 
> > Nope, just this one.
> 
> If you have something else you need to package, I would recommend submitting
> that for review and having me take a look at it. My sponsoring you depends on
> how well I feel you understand the Fedora packaging guidelines. I think you've
> got a pretty good grasp on them, but I generally like to see more than one
> package from any submitter. (Alternatively, you can take any package review, do
> an informal review of it, and link to that bug here.)

Here is another package (sanlock) to review: 
https://bugzilla.redhat.com/show_bug.cgi?id=675947
Comment 21 Angus Salkeld 2011-02-08 07:10:00 EST
I have also cleaned up (deleted) the global variables and changed the
include files section to how you suggested.

Here is the new spec & srpm:
http://asalkeld.fedorapeople.org/libqb.spec
http://asalkeld.fedorapeople.org/libqb-0.4.1-2.fc14.src.rpm
Comment 22 Angus Salkeld 2011-02-08 20:29:47 EST
Here is another package (csync2) to review: 
https://bugzilla.redhat.com/show_bug.cgi?id=676187
Comment 23 Ian Weller 2011-02-11 15:18:46 EST
(In reply to comment #21)
> Here is the new spec & srpm:
> http://asalkeld.fedorapeople.org/libqb.spec
> http://asalkeld.fedorapeople.org/libqb-0.4.1-2.fc14.src.rpm

This latest update took care of all of the previous issues.

---------------------------------------------
 This package libqb is APPROVED by ianweller
---------------------------------------------

Let's go and take care of your other two packages, and then we'll get you sponsored. :)
Comment 24 Angus Salkeld 2011-02-14 17:14:18 EST
New Package SCM Request
=======================
Package Name: libqb
Short Description: libqb provides high performance client server reusable features.
Owners: asalkeld
Branches: f15
InitialCC:
Comment 25 Jason Tibbitts 2011-02-15 14:22:34 EST
Git done (by process-git-requests).
Comment 26 Fedora Update System 2011-03-01 17:24:45 EST
Package libqb-0.4.1-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libqb-0.4.1-2.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/libqb-0.4.1-2.fc15
then log in and leave karma (feedback).
Comment 27 Fedora Update System 2011-03-02 22:36:37 EST
libqb-0.4.1-2.fc15 has been pushed to the Fedora 15 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 libqb'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/libqb-0.4.1-2.fc15
Comment 28 Fedora Update System 2011-03-06 20:30:37 EST
libqb-0.4.1-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.