GNOME/Packaging/Quirks
From openSUSE
| Revision as of 11:10, 4 May 2009 Vuntz (Talk | contribs) � Previous diff |
Revision as of 01:02, 29 June 2009 MBoman (Talk | contribs) Swap order Obsoletes/Provides Next diff → |
||
| Line 45: | Line 45: | ||
| 3. Add the following to the -devel package (replace ''packagename'' with the name of the package. The %{name} macro should not be used): | 3. Add the following to the -devel package (replace ''packagename'' with the name of the package. The %{name} macro should not be used): | ||
| - | Obsoletes: ''packagename''-doc <= %{version} | ||
| Provides: ''packagename''-doc = %{version} | Provides: ''packagename''-doc = %{version} | ||
| + | Obsoletes: ''packagename''-doc <= %{version} | ||
| See http://en.opensuse.org/Package_Dependencies#Merging_a_package for more information about merging packages | See http://en.opensuse.org/Package_Dependencies#Merging_a_package for more information about merging packages | ||
Revision as of 01:02, 29 June 2009
Contents |
sr@Latn
Upstream have gone from using sr@Latn to sr@latin. This might cause build failures. To workaround this issue, insert the following before %find_lang in the .spec file
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
ha/ig
We are currently missing locale/ha and locale/ig in the filesystem package. This causes build failures. A workaround is to add this to your .spec file in the %files lang section
## ha/ig does not exist in Factory currently
##%if %suse_version <= 1110
# exclude locales which don't exist on old versions of openSUSE
%exclude %{_datadir}/locale/ha/LC_MESSAGES/*
%exclude %{_datadir}/locale/ig/LC_MESSAGES/*
##%endif
When you use this workaround, please make sure that add the package name to https://bugzilla.novell.com/show_bug.cgi?id=470409 as well so that we can go back and clean it up once it's been included in the filesystem package.
autoreconf vs gnome-common
When a patch changes some files (eg, Makefile.am or configure.in), we usually need to call autoreconf before %configure. However, for GNOME modules, it might be better to use gnome-common because it comes with some Requires that might be needed (gtk-doc, for example). So do the following:
- Add "BuildRequires: gnome-common" to the package, with a comment explaining that it's needed for a specific patch.
- call "NOCONFIGURE=1 gnome-autogen.sh" before %configure, again with a comment.
Note: you need to make sure that the module uses gnome-autogen.sh in its autogen.sh script. This is generally true for GNOME modules, but you should check it by looking at the autogen.sh script in git.
gtk-doc/gnome-common
Always try to see if gtk-doc/gnome-common can be removed from BuildRequires. They 'might' be needed if the package is doing autoreconf. If it's determined that they can be removed, it's likely to see build failures due to directories not owned by the package. A workaround for that is to add the following in the %files doc section;
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
gtk-doc in -doc package
gtk-doc is development documentation only, hence, they should not be in a -doc package, but in a -devel package. If the -doc package only contains gtk-doc, then the following should be done;
1. Move the files section from -doc to -devel
2. Remove all traces of -doc
3. Add the following to the -devel package (replace packagename with the name of the package. The %{name} macro should not be used):
Provides: packagename-doc = %{version}
Obsoletes: packagename-doc <= %{version}
See http://en.opensuse.org/Package_Dependencies#Merging_a_package for more information about merging packages
%{_libdir} vs %{_prefix}/lib
We need confirmation, but %{_libdir} is usually needed for libraries while %{_prefix}/lib is used to host programs that shouldn't be in the path. Think about it as libdir vs libexecdir.
CFLAGS
CFLAGS="$RPM_OPT_FLAGS" should be removed from the .spec file if;
- It does not contain any other option and the package uses %configure
If CFLAGS contains -fno-strict-aliasing, try to remove it. If the build fails (or you get warnings), try to fix them with a patch and file it upstream. If you are unable to create this patch, file a bug upstream and add the following above CFLAGS;
# FIXME: -fno-strict-aliasing can not be removed due to bgo#<your bug>
omf
If a package have a -lang sub package, do not package the omf files in the main package. Buildlog will warn about these files being packaged twice if that's the case.

