As you may know, SUSE was originally based on Slackware. And some some relics from those early days if SUSE survives to present. The biggest example visible for end-users was packaging of desktop environment to /opt. Gnome was switched few years ago and KDE3 packages still remains in it, because packagers decided to focus on KDE4, so only those packages are comfortable with FHS and are installed into /usr.
With opening of SUSE development towards community via BuildService’s collaboration, or Contrib, the another relict of Slackware days was raised – which I mentioned in my previous post – a .changes file.
This file is used in SUSE for tracing of package changes and rpm %changelog is created from this file during build. As it has a consistent format, we used an internal command called vc for add a new entry to it and this tool generates a proper header of changes file. So after my last patch, implementation of osc vc was a logical (but not straightforward) job.
After some discussions with Ludwig Nussel and on opensuse-buildservice mailing lists, I implemented and committed an osc vc command. This is based on buildvc script written by Ludwig and is available in build.rpm (from version 2009.04.17). It has the same behavior as an old vc command.
Basic usage of this command is simple:
user@host:some:project/package/ $ osc vc
Command will find a changes file, open it in EDITOR (default is vim) and fill a header. You can also use it in non-interactive mode using -m MESSAGE. You can also specify a file to edit, or edit a file in other directory than current, … – see osc vc –help
The main difference between buildvc and osc variant is in e-mail address handling. The osc implementation has more sources of it, so it try to
- use content of mailaddr variable (same as buildvc)
- read a configuration from ~/.oscrc
- read an email from user’s metadata (see osc meta user your_login)
This is because many users want to use a different e-mail for changelogs than iChain one, so osc allows configure an email for each instance of BuildService. Appropriate part of ~/.oscrc looks like
user = login
pass = password
email = firstname.lastname@example.org