User:MBoman/Packaging
From openSUSE
Current revision
How to get started
Create yourself an OBS account by going to https://build.opensuse.org/, then click “Register | Login”
Install the osc, and osc gnome package. Easiest way to do that, is by browsing to http://software.opensuse.org/search, search for osc, then use the 1-Click Install for the openSUSE:Tools:Devel repository.
Find a package that you want to contribute to;
osc gnome t --xr --xs mboman@mblxsrv01:~/dev/next> osc gnome t --xr --xs Downloading data in a cache. It might take a few seconds... Package | openSUSE:Factory | GNOME:Factory | Upstream -----------------------+------------------+------------------+----------------- NetworkManager | 0.7.0.r4359 | 0.7.0.r4359 | 0.7.1 NetworkManager-gnome | 0.7.0.r1053 | 0.7.0.r1053 | 0.7.1 NetworkManager-openvpn | 0.7.0.r4274 | 0.7.0.r4274 | 0.7.1 NetworkManager-pptp | 0.7.0.r4274 | 0.7.0.r4274 | 0.7.1 NetworkManager-vpnc | 0.7.0.r4274 | 0.7.0.r4274 | 0.7.1 brasero | 2.26.1 | 2.26.1 | 2.27.1 epiphany | 2.26.0 | 2.26.0 | 2.27.1 gnome-do | 0.8.0 | 0.8.0 | 0.8.1 gnome-games | 2.26.1 | 2.26.1 | 2.27.1 libgda | 4.0.1 | 4.0.1 | 4.1.0 nautilus-sendto | 1.1.4.1 | 1.1.4.1 | 1.1.5 transmission | 1.52 | 1.52 | 1.60
The above command will list all packages that are in need of an update. --xr excludes packages that other people are working on, and --xs excludes packages that have already been submitted for an update.
Now that you found a package, do the following (I will use nautilus-sendto as an example package. Also, whenever you see “MBoman”, it should be replaced with your OBS user name);
1. Check out the package
mboman@mblxsrv01:/data/dev/next> osc gnome up nautilus-sendto Package nautilus-sendto has been branched in project home:MBoman:branches:GNOME:Factory. A /data/dev/next/nautilus-sendto A /data/dev/next/nautilus-sendto/nautilus-sendto-1.1.4.1.tar.bz2 A /data/dev/next/nautilus-sendto/nautilus-sendto.changes A /data/dev/next/nautilus-sendto/nautilus-sendto.spec A /data/dev/next/nautilus-sendto/ready
2. Check out the package
> osc co home:MBoman:branches:GNOME:Factory/cheese A home:MBoman:branches:GNOME:Factory/cheese/cheese-2.22.3.tar.bz2 A home:MBoman:branches:GNOME:Factory/cheese/cheese.changes A home:MBoman:branches:GNOME:Factory/cheese/cheese.spec A home:MBoman:branches:GNOME:Factory/cheese/ready
3. Download the latest package (most of the GNOME packages can be found at http://ftp.gnome.org/pub/GNOME/sources/) to home:MBoman:branches:GNOME:Factory/cheese
4. Change to the package directory
> cd home\:MBoman\:branches\:GNOME\:Factory/cheese/
Let’s say that the package in GNOME:Factory was cheese-2.22.3.tar.bz2 and we downloaded cheese-2.23.6.tar.bz2 1. We need to delete the older version from this project (note! *Never* use rm when deleting files here)
> osc del cheese-2.22.3.tar.bz2 D cheese-2.22.3.tar.bz2
2. Then add the new version
> osc add cheese-2.23.6.tar.bz2 A cheese-2.23.6.tar.bz2
3. We then need to change the .spec file to reflect this new version Open up cheese.spec in your favorite editor, then find the line starting with “Version:” For this example, you should see something like this; Version: 2.22.3 Replace the above version with the version of the new package, so it looks like this; Version: 2.23.6
4. Next, we need to find out what changed between 2.22.3 and 2.23.6. There are a couple of ways to do this, and not all of them works for every package :-/
1) See if you can find a news file for all versions between 2.22.3 and 2.23.6 on the ftp server where you download the package from 2) See if there is a usable NEWS file in svn (http://svn.gnome.org/viewvc/cheese/trunk/) 3) Unpack the tar ball and see if there is a usable NEWS and/or ChangeLog file in there
5. Once you found out what changed, open up cheese.changes in your favorite editor Couple of things to remember;
* Follow the same format as previous entries * Wrap lines that exceeds 76 characters * Don’t use more that 40-50 lines to describe the changes as rpm copies the entire changelog to rpmdb. * If there are bug entries (ie, #123456), figure out what bugzilla the bugentry comes from, and then change from #123456 to bgo#12346. Note that bgo should be replaced with the proper bugzilla entry from the list at http://en.opensuse.org/SUSE_Package_Conventions/Changelogs#11.1_Bugnumbers_in_changelog
6. I found it very useful to run ‘osc st’ at this stage. It’ll list all changes you’ve done. For a version upgrade, we will want to see 1 or more adds, 1 or more deletes and both .spec and .changes files modified;
> osc st D cheese-2.22.3.tar.bz2 A cheese-2.23.6.tar.bz2 M cheese.changes M cheese.spec
7. Commit your changes and see if the package builds. Describe what you’ve done with the -m switch;
> osc commit -m “Updated to 2.23.6″
8. Check the status to make sure the package builds;
> osc r
9. Once the package builds, submit it to the GNOME maintainers (again, use the -m switch to describe your changes);
> osc submitreq create -m ‘Updated to 2.23.6′
The GNOME maintainers will get a notification that you submitted this request. Once they act upon it, you will get an email back. Basically, it’ll be approved or declined. You can list existing submissions using this command;
> osc submitreq list GNOME:Factory 666 new (mboman) home:MBoman:branches:GNOME:Factory/cheese -> GNOME:Factory ‘Updated to 2.23.6′
Other things to note; If you delete or add patches, make sure that you note that in the .changes file as well. Clarify why a patch was deleted.

