Jan 2, 2012

Cleaning up Factory Packages

It's now the beginning of a new year (happy 2012 everybody!) and I'm writing about some changes that happened at the end of the last year and the period right after the openSUSE 12.1 release. Especially Coolo has used this to do a big cleaning up of our factory distribution touching most of openSUSE's 4000+ source packages this way.

Automake, autoconf, libtool removal from default build environment

Automake, autoconf and libtool are currently installed with every build and many packages don't need it. Removing unneeded packages from the default installation will make the build process faster. Therefore Coolo has started to add explicit BuildRequires lines to packages that need either of the tools and now removed these three packages from the default installation.

Packaging files twice is a bug

Some packages installed the same file in different sub packages or as another package - without adding a conflict on the other package. Coolo made the check fatal that checks for this situation to avoid packaging bugs.

Removing old %suse_update_config macro

As Coolo said:
"...I made the %suse_update_config macro a wrapper for autoreconf --force --install and removed it from all packages that crossed my way (with a SR to the devel project of course . The macro was used by SUSE when porting SLES7 (yes, that was the first sles actually  to s390 and power. But in the last 10 years most packages should have seen an update of their config - but the macro stayed. It's time to give the macro a rest in macro heaven."

Use SPDX license tag

We're using in the "License:" header now the SPDX definition.

Stricter checks for submission to Factory

Before a package gets checked into openSUSE:Factory, some automatic checks are done before the review team reviews the package. These checks have now been enhanced. A major change is that the URL given for source files is now used to verify that the downloaded file is really the one on the given URL. If this fails, you can run the service manually (use "osc service localrun download_files") to check for failures.

New format_spec files service

A new format_spec files service has been implemented by Coolo and was used in his submit requests introducing other changes. Included are the following changes to the spec file:
  • remove obsolete #norootforbuild lines
  • remove duplicated group and license from sub packages if all sub-packages have the same license
  • patch license field to apply to spdx.org
  • split buildrequires in single lines
He also changed a couple of packages directly where
  • license can be autoconverted (otherwise legal needs to review anyway)
  • devel project has unmodified branch
  • devel project is not in black list

Getting rid of /etc/tmpdirs.d

In the past /etc/tmpdirs.d was used with SysV init scripts and systemd used tmpfiles.d. Now the SysV init scripts call tmpfiles.d as well - and do not handle tmpdirs.d anymore. All packages with tmpdirs.d usage have been adjusted.

Obsoleted %suse_update_desktop_file

Coolo changed the way the openSUSE desktop files which are used by the application menus of the desktops can be translated and changed. Instead of manually calling %suse_update_desktop, a check script collects all desktop files and makes them available for translation. So, if a package only calls %suse_update_desktop_file without any options, the call can be removed completely.
[Update 2012-01-03] Since other distributions are using "desktop-file-install" and "desktop-file-edit", packages can use that one as well to edit the desktop files. These are part of the package desktop-file-utils that need to be installed via "BuildRequires". [End update]