Bug 225804 - Merge Review: glib2
Merge Review: glib2
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bastien Nocera
Fedora Package Reviews List
:
Depends On:
Blocks: F9MergeReviewTarget
  Show dependency treegraph
 
Reported: 2007-01-31 13:45 EST by Nobody's working on this, feel free to take it
Modified: 2008-04-01 11:38 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-01 11:38:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
bnocera: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Nobody's working on this, feel free to take it 2007-01-31 13:45:06 EST
Fedora Merge Review: glib2

http://cvs.fedora.redhat.com/viewcvs/devel/glib2/
Initial Owner: mclasen@redhat.com
Comment 1 Roozbeh Pournader 2007-02-03 12:16:27 EST
Passed
======
MUST: NVR is fine (assuming that renaming the package to glib breaks various things)
MUST: spec filename matches package name
MUST: license is fine (LGPL)
MUST: license field is fine
MUST: license in upstream tarball and marked as %doc
MUST: spec in American English, as far as I can tell
MUST: source matches upstream (both md5sum and sha1sum)
MUST: compiled and built binaries on FC6
MUST: no ExcludeArch
MUST: locales handled finely by %find_lang
MUST: ldconfig called in %post and %postun
MUST: no relocation
MUST: no duplicate files
MUST: file permissions fine
MUST: %clean section exists and fine
MUST: macros fine
MUST: contains code
MUST: no large docs
MUST: %doc files should not be needed to run
MUST: header files and static libs are in -devel
MUST: -devel require pkgconfig
MUST: *.so files are in -devel
MUST: -devel has fully versioned dependency
MUST: *.la file are removed
MUST: not a GUI app
MUST: does not seem to own dirs owned by others

Suggestions and improvements
============================
* rpmlint gives the following errors:

for glib2:
E: glib2 obsolete-not-provided glib-gtkbeta
E: glib2 executable-sourced-script /etc/profile.d/glib2.sh 0755
E: glib2 executable-sourced-script /etc/profile.d/glib2.csh 0755

for glib2-devel:
E: glib2-devel obsolete-not-provided glib-gtkbeta-devel
E: glib2-devel only-non-binary-in-usr-lib

I believe all should be fixed.

* The CVS contains several dropped patches that may need to be removed
(depending on how a merge would happen)

* The line BuildRequires: pkgconfig >= 0.8 doesn't make sense, specially since
rawhide has had a newer version since Feb 2002 and also that since it has had
that, it also had an epoch of 1. From the requirement from the configure.in
file, it should perhaps be pkgconfig >= 1:0.14. Also update the "Requires" in
-devel to 1:0.14.

* The viewpoint of the summary for the devel sub-package does not match the
viewpoint of the summary of the main package. They should be aligned.

* The Conflicts lines are probably wrong or unnecessary. Even if it's required,
the reason should be documented and the line probably be changed to "Requires".
See http://www.fedoraproject.org/wiki/PackagingDrafts/Conflicts for details

* Static libraries are enabled, contrary to the Packaging Guidelines. I guess
the reason should be documented (anaconda?).

* The make line in %build does not have %{?_smp_mflags}.

* %check is empty for ppc and ppc64. The reason should perhaps be documented.

* %defattr line should perhaps have an extra dash at the end:
"%defattr(-,root,root,-)"

* Package places files in /etc/profile.d (which is not in FHS), without owning
the directory itself or having a Requires on a package that does.

* May need to mark %{_datadir}/gtk-doc/html/* as %doc

Review TODO
===========
* Thorough consideration of packaging guidelines (a MUST item)
* Theoretically, all dependenies may not be listed (a MUST item), as I did not
do a Rawhide mock build.
Comment 2 Matthias Clasen 2007-02-03 12:34:13 EST
> * Theoretically, all dependenies may not be listed (a MUST item), as I did not
> do a Rawhide mock build.

Considering that this package has been built many times in brew, you can assume
that the BRs are sufficient.
Comment 3 Jose Pedro Oliveira 2007-02-03 12:47:40 EST
(In reply to comment #1)
> ...
> * Static libraries are enabled, contrary to the Packaging Guidelines. I guess
> the reason should be documented (anaconda?).
> ...

One package that needs the glib2 static library is syslog-ng v2 (a sysklogd
replacement).

jpo

PS - See #219771 for more information regarding syslog-ng 2.0.x. 
Comment 4 Matthias Clasen 2007-02-03 12:52:30 EST
> * rpmlint gives the following errors:
>
> E: glib2 executable-sourced-script /etc/profile.d/glib2.sh 0755
> E: glib2 executable-sourced-script /etc/profile.d/glib2.csh 0755

Every single file in /etc/profile.d is currently executable. 
If that is supposed to be changed, we should probably have a guideline
addition about it.

> E: glib2-devel only-non-binary-in-usr-lib

That is clearly a misleading rpmlint error. This is caused by glib living
in /lib now, but the development stuff still being in /usr/lib. I hope
nobody advocates moving /usr/lib/glib-2.0/include to /lib
Comment 5 Matthias Clasen 2007-02-03 13:21:10 EST
> One package that needs the glib2 static library is syslog-ng v2 (a sysklogd
> replacement).

I'd consider that a bug of syslog-ng. I did remove the static libraries from
glib2 during the FC6 devel cycle, and then various people came out of the woods
and admitted that they had linked to glib2 statically (some initscripts things,
and at least one pam module). That was the reason we moved glib2 to /lib, so 
that we can stop shipping 5 statically linked copies of glib in /bin. But then
Jeremy said that static glib libraries are also needed for anaconda. Since it is
much harder to avoid static linking there, the static libaries were added back.

I would be willing to move the static libraries to a -static subpackage if that
helps.

One bug relevant to this is bug 191678. 
Comment 6 Matthias Clasen 2007-02-03 13:24:00 EST
/etc/profile.d is owned by setup, btw. I don't think we need to explicitly
require that.
Comment 7 Matthias Clasen 2007-02-03 14:40:56 EST
glib2-2.12.9-2.fc7 fixes quite a few of the initial comments.
Comment 8 Jose Pedro Oliveira 2007-02-03 16:26:55 EST
(In reply to comment #5)
> > One package that needs the glib2 static library is syslog-ng v2 (a sysklogd
> > replacement).
> 
> I'd consider that a bug of syslog-ng. I did remove the static libraries from
> glib2 during the FC6 devel cycle, and then various people came out of the woods
> and admitted that they had linked to glib2 statically (some initscripts things,
> and at least one pam module). That was the reason we moved glib2 to /lib, so 
> that we can stop shipping 5 statically linked copies of glib in /bin. But then
> Jeremy said that static glib libraries are also needed for anaconda. Since it is
> much harder to avoid static linking there, the static libaries were added back.

Syslog-ng v2 links glib2 and eventlog statically by default. There is a 
configure option to enable the dynamic linking of the above libraries.
I will try it and also try to have the eventlog dynamic library installed
in /lib.
 
> I would be willing to move the static libraries to a -static subpackage if that
> helps.
>
> One bug relevant to this is bug 191678. 

Thanks for the reference.
Comment 9 Jose Pedro Oliveira 2007-02-03 16:33:24 EST
(In reply to comment #7)
> glib2-2.12.9-2.fc7 fixes quite a few of the initial comments.

Thanks for the static subpackage.


A couple more of pedantic requests:

 * preserve the timestamps of the .sh/.csh scripts
   (install -p -m 755 ...)

 * move the URL: line closer to the Source: line
   it's hard to spot it after the build requires
 
jpo
Comment 10 Roozbeh Pournader 2007-02-03 17:26:53 EST
Another suggestion (over Pedro's) is to make the "1:0.14" requirement a macro,
as it's used two times, the second time being in the middle of the spec file
where one may forget to update:

%define pkgconfig_version 1:0.14
[...] pkgconfig >= %{pkgconfig_version}

I skimmed the Packaging Guidelines also. All looks either good or
don't-know-what-to-do now. As for setup requirement, since there is a requires
chain of "setup -> basesystem -> glibc -> glib2", it's fine. For the executable
files in /etc/profile.d, I will ping the authorities!
Comment 11 Matthias Clasen 2007-02-03 19:45:36 EST
I can handle updating the version number in two places. 
Please try to restrict yourself to real packaging bugs,
the pedantic requests can wait until later.
We have hundreds of packages in the queue...
Comment 12 Roozbeh Pournader 2007-02-04 13:58:07 EST
OK, trying to restrict myself, these are the final rants. I also went over the
Packaging Guidelines. Summarizing the status of things as they stand, and I
believe they are all:

Blockers
--------
* The executable-sourced-scripts errors by rpmlint are definitely errors.
Reading the rpmlint source code it only checks two directories for such things,
/etc/bash_completion.d and /etc/profile.d. Bug here:
<http://rpmlint.zarb.org/cgi-bin/trac.cgi/ticket/17>. I guess Separate bugs need
to be filed for other packages that put execuatble files there.

* The two "Conflicts"es are fine, but should be documented. Quote from
<http://fedoraproject.org/wiki/PackagingDrafts/Conflicts>: "Remember, whenever
you use Conflicts:, you are also required to include the reasoning in a comment
next to the Conflicts: entry, so that it will be abundantly clear why it needed
to exist."

* From <http://fedoraproject.org/wiki/Packaging/ReviewGuidelines>: "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." glib2 puts files in /usr/share/gtk-doc/html/. That means that it
should at least depend on gtk-doc that owns /usr/share/gtk-doc. The html
subdirectory is more problematic, but I think gtk-doc should be changed to own
it. Already mentioned in bug 225870.

* Please use the "-p" option of install for copying files to /etc/profile.d. See
<http://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps>

Possible improvements
---------------------
* I believe the summary lines should be a little different for each sub-package.
My raw suggestion is "developement files for glib2" and "static libaries for
glib2", but anything that makes the three a little different is fine. A user is
supposed to be able to distinguish the packages based on their description
sometimes. Same description doesn't help.

* Please mark %{_datadir}/gtk-doc/html/* as documents. Just add a %doc at the
beginning of the line.

rpmlint output
--------------
E: glib2 executable-sourced-script /etc/profile.d/glib2.sh 0755
E: glib2 executable-sourced-script /etc/profile.d/glib2.csh 0755
E: glib2-devel only-non-binary-in-usr-lib
E: glib2-static devel-dependency glib2-devel
W: glib2-static no-documentation
W: glib2-static devel-file-in-non-devel-package /lib/libglib-2.0.a
W: glib2-static devel-file-in-non-devel-package /lib/libgobject-2.0.a
W: glib2-static devel-file-in-non-devel-package /lib/libgthread-2.0.a
W: glib2-static devel-file-in-non-devel-package /lib/libgmodule-2.0.a

All are fine except the executable-sourced-script ones, already mentioned above.
Comment 13 Matthias Clasen 2007-02-04 17:36:56 EST
Some more fixes in -3.fc7. I haven't added a gtk-doc dependency, since that
would be a bit backwards. gtk-doc is the tool used to create the documentation.
There is very little reason to require gtk-doc at runtime, just for the sake of
directory ownership. It would make a lot more sense to give the package to e.g.
devhelp, which can actually use the content of those directories at runtime.
Comment 14 Roozbeh Pournader 2007-02-06 05:39:27 EST
(In reply to comment #13)
> Some more fixes in -3.fc7.

Thanks a lot.

> It would make a lot more sense to give the package to e.g.
> devhelp, which can actually use the content of those directories at runtime.

Considering the discussions on bug 225875 (see comments by Patrice Dumas and
Ralf Corsepius), please either own the directory or depend on something that
does. I believe this is mostly to make sure that installing the package and then
removing it doesn't leave empty directories around.

All other blockers are fixed now. The package is fine if this problem gets fixed
either way.

Final rpmlint output:
W: glib2 non-conffile-in-etc /etc/profile.d/glib2.sh
W: glib2 non-conffile-in-etc /etc/profile.d/glib2.csh
E: glib2-devel only-non-binary-in-usr-lib
E: glib2-static devel-dependency glib2-devel
W: glib2-static no-documentation
W: glib2-static devel-file-in-non-devel-package /lib/libglib-2.0.a
W: glib2-static devel-file-in-non-devel-package /lib/libgobject-2.0.a
W: glib2-static devel-file-in-non-devel-package /lib/libgthread-2.0.a
W: glib2-static devel-file-in-non-devel-package /lib/libgmodule-2.0.a

(All are fine)
Comment 15 Ralf Corsepius 2007-02-06 06:03:27 EST
(In reply to comment #14)
> (In reply to comment #13)

> Considering the discussions on bug 225875 (see comments by Patrice Dumas and
> Ralf Corsepius), please either own the directory or depend on something that
> does. I believe this is mostly to make sure that installing the package and then
> removing it doesn't leave empty directories around.
You are right on the spot - This is what this is all about.
 
> All other blockers are fixed now. The package is fine
In addition to what has already been said: When building the fc7/devel glib2
package on fc6, the test-suite hangs.

> Final rpmlint output:
> W: glib2 non-conffile-in-etc /etc/profile.d/glib2.sh
> W: glib2 non-conffile-in-etc /etc/profile.d/glib2.csh
These are OK.

> E: glib2-devel only-non-binary-in-usr-lib
> E: glib2-static devel-dependency glib2-devel
> W: glib2-static no-documentation
> W: glib2-static devel-file-in-non-devel-package /lib/libglib-2.0.a
> W: glib2-static devel-file-in-non-devel-package /lib/libgobject-2.0.a
> W: glib2-static devel-file-in-non-devel-package /lib/libgthread-2.0.a
> W: glib2-static devel-file-in-non-devel-package /lib/libgmodule-2.0.a

These are not fine. glib2 can install its runtime libs into /lib if it needs to,
but installing devel-libs there is NOT OK.

Matthias, please check how glibc is being packaged. They install the
runtime-parts into /lib and install the devel parts to %{_libdir}
(Technically this should not be much more than an ordinary %configure plus
moving the lib*.so.* in %install)
Comment 16 Roozbeh Pournader 2007-02-06 06:35:56 EST
(In reply to comment #15)
> In addition to what has already been said: When building the fc7/devel glib2
> package on fc6, the test-suite hangs.

Then there was a problem! It doesn't always happen, but yes, it sometimes hanged
on me (during or after the thread-related tests, IIRC). I thought it's because
of not clean build environment, because of its sometimes-happening-sometimes-not
nature.
Comment 17 Matthias Clasen 2007-02-06 08:38:17 EST
glibc doesn't install a .so symlink at all, /usr/lib/libc.so is a linker script,
I don't think looking at glibc packaging will be very instructive.

Moving everything in -devel and -static to /usr will take some experimenting,
and has the potential to break things, but sure, I can do that.
Comment 18 Ralf Corsepius 2007-02-06 08:48:17 EST
The fact /usr/lib/libc.so is a linker script is irrelevant, the package layout is.
Comment 19 Matthias Clasen 2007-02-10 00:01:51 EST
* Fri Feb  9 2007 Matthias Clasen <mclasen@redhat.com> - 2.12.9-4
- More package review demands:
 * keep all -devel content in /usr/lib

Comment 20 Matthias Clasen 2007-02-21 19:43:26 EST
Is anything going to happen here ?
Comment 21 Matthias Clasen 2007-06-17 00:17:17 EDT
Definitively a stalled review here.
Comment 22 Bastien Nocera 2008-01-15 13:27:16 EST
> MUST: rpmlint must be run on every package. The output should be posted in the
review.

$ rpmlint /home/hadess/Projects/Fedora/glib2/devel/glib2-2.15.2-1.fc9.src.rpm
$ rpmlint /home/hadess/Projects/Fedora/glib2/devel/i686/glib2-2.15.2-1.fc9.i686.rpm
glib2.i686: W: non-conffile-in-etc /etc/profile.d/glib2.csh
glib2.i686: W: non-conffile-in-etc /etc/profile.d/glib2.sh
$ rpmlint
/home/hadess/Projects/Fedora/glib2/devel/i686/glib2-static-2.15.2-1.fc9.i686.rpm
glib2-static.i686: W: no-documentation
$ 

The few errors are fine.

> - 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 on Package Naming Guidelines.

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.

OK.

> - MUST: The License field in the package spec file must match the actual license.

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.

OK.

> - MUST: The spec file must be written in American English.

OK.

> - MUST: The spec file for the package MUST be legible. If the reviewer is
unable to read the spec file, it will be impossible to perform a review. Fedora
is not the place for entries into the Obfuscated Code Contest
(http://www.ioccc.org/).

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.

$ sha1sum glib-2.15.2.tar.bz2
8f2868834deab0ca1e73d647607e2808c2a75a48  glib-2.15.2.tar.bz2
$ wget -q -O glib-2.15.2.tar.bz2
http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.15/glib-2.15.2.tar.bz2
$ sha1sum glib-2.15.2.tar.bz2
8f2868834deab0ca1e73d647607e2808c2a75a48  glib-2.15.2.tar.bz2

OK.

> - MUST: The package must successfully compile and build into binary rpms on at
least one supported architecture.

OK.

> - MUST: If the package does not successfully compile, build or work on an
architecture<snip>

OK.

> - MUST: All build dependencies must be listed in BuildRequires, except for any
that are listed in the exceptions section of 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.

OK.

> - MUST: Every binary RPM package which stores shared library files (not just
symlinks) in any of the dynamic linker's default paths, must call ldconfig in
%post and %postun. If the package has multiple subpackages with libraries, each
subpackage should also have a %post/%postun section that calls /sbin/ldconfig.

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.

N/A.

> - 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. Refer to the Guidelines for examples.

OK.

> - MUST: A package must not contain any duplicate files in the %files listing.

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.

OK.

> - MUST: Each package must have a %clean section, which contains rm -rf
%{buildroot} (or $RPM_BUILD_ROOT).

OK.

> - MUST: Each package must consistently use macros, as described in the macros
section of Packaging Guidelines.

OK.

> - MUST: The package must contain code, or permissable content. This is
described in detail in the code vs. content section of Packaging Guidelines.

OK.

> - MUST: Large documentation files should 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)

Not done. I think it makes sense to keep it in devel, as it allows for easy
integration in devhelp.

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

OK.

> - MUST: Header files must be in a -devel package.

OK.

> - MUST: Static libraries must be in a -static package.

OK.

> - MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig'
(for directory ownership and usability).

OK.

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

OK.

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

OK.

> - MUST: Packages must NOT contain any .la libtool archives, these should be
removed in the spec.

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. This is described in detail in the desktop files section of
Packaging Guidelines. 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.

N/A.

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

OK.

> - MUST: At the beginning of %install, each package MUST run rm -rf
%{buildroot} (or $RPM_BUILD_ROOT). See Prepping BuildRoot For %install for details.

OK.

> - MUST: All filenames in rpm packages must be valid UTF-8.

OK.

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

OK.

> - 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 reviewer should test that the package builds in mock. See
MockTricks for details on how to do this.

OK.

> - SHOULD: The package should compile and build into binary rpms on all
supported architectures.

OK.

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

OK.

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

OK.

> - SHOULD: Usually, subpackages other than devel should require the base
package using a fully versioned dependency.

OK.

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

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. Please see File Dependencies in the Guidelines for
further information.

N/A.

Looks good to me.

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