If you did not migrate your account yet, visit https://idp-portal-info.suse.com/
Vind het pakket dat u nodig hebt voor uw werk
|Dit artikel is nog maar gedeeltelijk vertaald. Als u mee wilt helpen met vertalen lees dan Wiki vertalen naar het Nederlands.|
The build service contains many different versions of packages. Some may be official releases and others may under development by users in their home projects. The easiest way to do that is by using the osc search command. The --maintained switch restricts the output to projects that have a special attribute set to indicate maintained openSUSE products. We'll use the nfs-utils package as an example.
$ osc search --maintained nfs-utils
matches for 'nfs-utils' in packages: # Package # Project openSUSE:11.0 nfs-utils openSUSE:11.1 nfs-utils openSUSE:11.2 nfs-utils
Create a branch
The build service provides an easy way to work on packages without having to unnecessarily contaminate the original package. It allows the user to check out a private version of the package into their home project. Any changes committed to it will be stored as a set of changes to the original. This has the advantage of making the differences between the two projects obvious when the branch is eventually submitted back to the original project.
The process for creating a branch is simple:
$ osc branch openSUSE:11.1 nfs-utils
Note: The branch has been created of a different project, openSUSE:11.1:Update, [...]
A working copy of the branched package can be checked out with: osc co home:jeff_mahoney:branches:openSUSE:11.1:Update/nfs-utils
In this case an update for nfs-utils was released previously already. The updated sources got stored in a different project, openSUSE:11.1:Update. You don't have to bother about that detail. osc automatically does the right thing and uses the updated sources. So just follow the instructions provided and check out your branched copy of the package:
$ osc co home:jeff_mahoney:branches:openSUSE:11.1:Update/nfs-utils
A home:jeff_mahoney:branches:openSUSE:11.1:Update A home:jeff_mahoney:branches:openSUSE:11.1:Update/nfs-utils A home:jeff_mahoney:branches:openSUSE:11.1:Update/nfs-utils/README.NFSv4 A home:jeff_mahoney:branches:openSUSE:11.1:Update/nfs-utils/fork-start-statd.patch [...]
If you already have a branch for this package, you should remove and recreate it. The branch point exists from the point in time that you created it. If other changes have been committed in the interim, they will be lost if you use your existing branch. You can delete the branch by deleting the package with the osc rdelete project package command. For the our example, it would be osc rdelete home:jeff_mahoney:branches:openSUSE:11.1:Update nfs-utils.
Branching all code streams at once
Sometimes you need to update a package for all maintained code streams, e.g. for a security fix. With the method described above you'd have to branch and check out the package three times, once for 11.0, 11.1 and 11.2. The osc mbranch command makes that more convenient. It finds all maintained copies of the package automatically and creates branches of those packages in one project:
$ osc mbranch nfs-utils
Project home:jeff_mahoney:branches:OBS_Maintained:nfs-utils created.
$ osc co home:jeff_mahoney:branches:OBS_Maintained:nfs-utils
A home:jeff_mahoney:branches:OBS_Maintained:nfs-utils A home:jeff_mahoney:branches:OBS_Maintained:nfs-utils/nfs-utils.openSUSE_11.0_Update [...] A home:jeff_mahoney:branches:OBS_Maintained:nfs-utils/nfs-utils.openSUSE_11.1_Update [...] A home:jeff_mahoney:branches:OBS_Maintained:nfs-utils/nfs-utils.openSUSE_11.2_Update
Make your changes
Now that you have a private copy of the package, you can make whatever changes you need to the package. The easiest way to handle updating the file list is to ensure that you don't have any temporary files still in the source package directory and use the osc addremove command.
Once you've completed your changes, add an entry to the .changes files using osc vc.
- briefly describe the problem, one line per problem
- include a reference to the bug number in the form (bnc#12345)
- for security fixes include the CVE number if possible
Finally commit your changes to your branch with the osc commit command.
Create a patch info file
For publishing updates additional information is required. That information is stored in a so called patch info file. Run osc patchinfo in the project directory to create one:
$ osc patchinfo
Creating initial patchinfo... A /obs/home:jeff_mahoney:branches:OBS_Maintained:nfs-utils/_patchinfo: A /obs/home:jeff_mahoney:branches:OBS_Maintained:nfs-utils/_patchinfo:/_patchinfo
An editor opens. Fill in all needed information, then check in everthing using osc ci
Submit your changes
Your branch is now a separate package and will build independently in your home project. It's generally a good idea to ensure that it builds within the tight constraints of the build system and is tested properly before submitting it. The submit process is simple.
From your checked-out project directory:
$ osc sr
created request id 22864
Osc will prompt you for a message for the submit request. Usually you just use the same message as for the .changes file.