Novell Home

Education/Packaging

From Developer Community

Wherewith do you teach tomorrow?

Packaging

Currently we built all packages on the media in the openSUSE Buildservice following the SUSE Build Tutorial and the Build Service Tutorial. So everyone who wants to help us packaging needs a buildservice account first.

Afterwards you can write an email to Lars or the mailinglist and we'll add you as maintainer of your package in the openSUSE-Education Buildservice Repository.


Contents


Education Packaging Policy

We enhance the general Packaging Guidelines and Conventions a bit for packages in the Education repositories.

Vendor-Tag

Add the line
Vendor: openSUSE-Education
to your specfile. So zypper knows that this package comes from the same vendor as all other packages and allows updating this package. This includes some kind of "quality" for our packages. We add this string to trustedVendors (for details see Bug 186636) so our packages are unlocked and can be updated later.

Package description in the openSUSE-Wiki

Add a description in the openSUSE wiki. We use a special template] so users can find education packages easily.

The Upstream Authors

  • Add the Authors to the description in your specfile. As RPM currently has no extra field for this, we like to inform our users about the real Authors of a software by adding them to the description field. Use the following form at the end of your %description tag (please note the four whitespaces before the Name):
%description
[...]

Author(s):
-------------
    Name <email>

Desktop menu entries

You can find a list of possible Menu Categories here.

openSUSE uses a special macro to handle entries in the desktop menues. Please refer to "The packaging guideline" for details. This is just a short enhancement of this description.

openSUSE uses a special way to handle translations in desktop files:

  1. spec files use the macro %suse_update_desktop_file, which will
    1. mark the desktop file for the translation process
    2. update the desktop files against package desktop-translations
  2. the package collect-desktop-files is built against all packages with desktop files, this will collect all upstream translations from the desktop files
  3. The Translation-Teams are updating the lcn SVN to merge the openSUSE translations with the upstream translations (upstream translations win)
  4. The Translation-Team submits new desktop-translations to start the process over

This allows openSUSE to:

  • update the translations - unknown translations can be filled up
  • update translations by an online update - translations unknown will be erased from the desktop files to allow GNOME and KDE to look into desktop_translations.mo file

Problems:

  • older released distributions might not know all translations of a package or the package at all (in this case, use the -n switch in your %suse_update_desktop_file call)
  • other distributions don't have this macro, so it must be encapsulated with a distribution specific macro:
%if 0%{?suse_version}
%suse_update_desktop_file -n %{name}
%endif


Changelog handling

Use a separate Changelog file. You have to enter a
%changelog
tag in your specfile to be consistent with the general RPM guidelines. But for some later enhancements (packaging also debian packages), it is necessary to have the changes of a package in a separate file. The buildservice already handles this files automatically, if the %changelog entry in the specfile is empty and a file named echo $(basename *.spec .spec).changes is present. (So for example: you have a specfile called mypackage.spec and a changelog file called mypackage.changes). The format of this mypackage.changes is
-------------------------------------------------------------------
Tue Apr 22 20:54:26 CEST 2008 - your@email.com

-

 

If you like, you can use this small script to produce a changelog entry like above.

Just save this script, give him execute rights (chmod +x), change the email-Variable and call it with the name of the specfile.

Other important notes about the changelog entries:

  • Add a valid changelog entry each time you do something with the package! Even if it's just fixing a typo: please add it to the changelog, so users outsite can see that the new release number of your package is the result of a real change and not of a simple rebuild.
  • If you update to a new version, please don't enter just the new version number in your package changelog. Give the user a short summary of the changes (just think: "Why should a user upgrade to the newer version of the package?"). 10 lines should be enough. You can use the original changelog as reference, but remember: telling Linux users about changes in the windows part of the package is _not_ usefull...
  • Please refer to the official packaging guidline how to handle changelogs.

Packages in the Build Service

Build "ready to use packages" in the Education Repositories. Means: normally you like to "develop" a package by changing it's specfile, adding scripts, updating the tarball and so on. As the Education repositories should always in an installable state, this development would perhaps break the installation for endusers. So you have two options here:

  1. develop your package in your home project and afterwards copy the source back to the Education repository
  2. use the "publish enabled/disabled" switch for your package in the Education Repository. But be warned: "publish disabled" means that an already build package in the outside repositories will stay there until it's replaced when you enabled publishing again for your package.

You need packages from other repositories? Thats a real problem, hugh! Two options here:

  1. using aggregates will automatical copy the build packages of the original project without any rebuild. BUT: until all packages in the original project have build, the Education repository will be blocked! So this is currently no option for us.
  2. using links will create a link an the package is normally (if you didn't patch it) rebuilded in the education repository each time the original package changed. This is unfriendly to the build hosts - as they have to build the same package again and again. But it would only block the packages depending on this package and not the whole project. Image:22px-Tick.png

Wishlist

Don't know where to start? Don't know which package interests most of our users?

Have a look at the wishlist and try to build a package from this list in the buildservice. Please: don't create just a new package without any content than the source and the pseudo specfile. We expect that a user who creates a new package will work on it until he is finished...

Also: Please Login and assign the related "bugreport" to your account, so other people (means: even the requester) knows that you start working on the package. Give the requester a warm "Welcome Message" in the bugreport and inform him that you start working on the package. Ask him to test your new package - we neeed feedback from our "customers".

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.