Patches can be submitted
via e-mail,
from RPM packages (rpm-md repository).
To install from svn, do
python setup.py build python setup.py install # create a symlink 'osc' in your path pointing to osc.py. ln -s osc-wrapper.py /usr/bin/osc
Alternatively, you can directly use osc-wrapper.py from the source dir (which is easier if you develop on OSC).
The program needs the cElementTree python module installed. At SUSE, the respective package is called python-elementtree (before 10.2: python-xml). For local building, you will need python-urlgrabber in addition. Those are standard package on SUSE Linux since a while. If your version is too old, you can find python-elementtree and python-urlgrabber at the openSUSE project.
When you use it for the first time, it will ask you for your username and password, and store it in ~/.oscrc.
Version 0.114 got some cleanups for the configuration file handling and therefore some options are now deprecated, namely:
One new option was added:
# use this as the default apiurl. If this option is not specified the default (https://api.opensuse.org) is used.
So far osc still has some backward compatibility for these options but it might get removed in the future, that is why it issues a deprecation warning in case one of those options is still in use.
The new configuration scheme looks like the following:
# entry for an apiurl [protocol://apiurl] user = username password = password ...
Before starting the migration please save your ~/.oscrc file!
If the migration does not work for whatever reason, feel free to send me an e-mail or ask on the opensuse-buildservice mailinglist or in the #opensuse-buildservice IRC channel.
The apisrv option is used to specify the default API host. If apisrv is not specified at all the default (api.opensuse.org) is used. The current [general] section looks like this:
[general] ... apisrv = somehost # or apisrv = protocol://somehost
apisrv got superseded by the new apiurl option which looks like this:
[general] ... apiurl = protocol://somehost
If apisrv has no protocol, https is used. Make sure all apiurl sections have the new format which is described above. Afterwards apisrv can be removed.
The current [general] section looks like this:
[general] ... scheme = protocol
This means every apiurl section which does not have the new format which is described above, for instance
[somehost] user = username password = password ...
has to be converted to
[protocol://somehost] user = username password = password ...
Afterwards the scheme option can be removed from the [general] section (it might be the case that some sections already have the correct format).
The current [general] section looks like this:
[general] ... apisrv = somehost scheme = protocol
Both options can be removed if all apiurl sections have the new format which is described above. So basically just adjust all apiurl sections (it might be the case that some sections already have the correct format).
OSC now can store passwords in keyrings instead of ~/.oscrc. To use it, you need python-keyring and either python-keyring-kde or "-gnome.
If you want to switch to using a keyring you need to delete [apiurl] section from ~/.oscrc and you will be asked for credentials again, which will be then stored in the keyring application.
OSC’s working copy handling was rewritten in 0.130. Thus some consistency checks were added. As a result osc might complain that some old working copies are in an inconsistent state:
Your working copy . is in an inconsistent state. Please run { osc repairwc .; } (Note this might remove files from the .osc/ dir). Please check the state of the working copy afterwards (via { osc status .; })
To fix this simply run { osc repairwc .; } as suggested in the error message. Note that { osc repairwc .; } might need to contact the API in order to fetch some missing files. Also it might remove some files from the storage directory (.osc/.) but it will not touch any locally modified files.
If it does not fix the problem please create a bug report and attach your working copy to the bug (if possible).
osc ls # list projects osc ls Apache # list packages in a project osc ls Apache subversion # list files of package of a project
osc co Apache # entire project osc co Apache subversion # a package osc co Apache subversion foo # single file
osc up osc up [pac_dir] # update a single package by its path osc up * # from within a project dir, update all packages osc up # from within a project dir, update all packages # AND check out all newly added packages
osc resolved foo
osc ci # current dir osc ci dir osc ci file₁ file₂ ...
osc st osc st directory osc st file₁ file₂ ...
osc add file₁ file₂ ... osc rm file₁ file₂ ...
osc addremove
osc diff # current dir osc diff file₁ file₂ ...
osc results osc results repository
osc log repository arch
osc repourls [dir]
osc rebuildpac [dir]
osc repository
osc repository project
osc meta Apache osc meta Apache subversion osc id username
osc editmeta Apache osc editmeta Apache subversion
osc updatepacmetafromspec dir
osc repos osc buildconfig osc buildinfo
osc build repo arch specfile [--clean|--noinit]
cp -a foo_package_source foo && cd foo && osc init prj pac && osc addremove && osc ci && cd "${OLDPWD}" && rm -r foo
Putting the following in the file ~/.w3m/passwd will make w3m know the credentials for the buildservice servers:
host api.opensuse.org port 80 realm Authentication required login foo password bar host build.opensuse.org port 80 realm openSUSE Build Service login foo password bar
chmod 0600 ~/.w3m/passwd
A new test suite has been created and should run via doing
# cd tests # python suite.py