2006-04-20 16:26:50 +02:00
|
|
|
osc -- opensuse-commander with svn like handling
|
|
|
|
|
|
|
|
|
2009-09-04 20:43:28 +02:00
|
|
|
Patches can be submitted via
|
|
|
|
* mail to opensuse-buildservice@opensuse.org
|
2020-10-14 17:02:34 +02:00
|
|
|
* Bugzilla: https://bugzilla.opensuse.org/enter_bug.cgi?product=openSUSE.org&component=BuildService
|
2011-10-20 20:38:09 +02:00
|
|
|
* or the official Git repository on Github:
|
|
|
|
https://github.com/openSUSE/osc
|
2006-04-20 16:26:50 +02:00
|
|
|
|
|
|
|
|
2006-04-20 16:31:24 +02:00
|
|
|
INSTALLATION:
|
2006-05-10 16:47:27 +02:00
|
|
|
|
2009-09-04 20:43:28 +02:00
|
|
|
RPM packages are here (rpm-md repository):
|
2007-07-16 11:45:17 +02:00
|
|
|
http://download.opensuse.org/repositories/openSUSE:/Tools/
|
2006-05-19 22:13:29 +02:00
|
|
|
|
2015-05-24 19:27:28 +02:00
|
|
|
To install from git, do
|
2010-02-28 02:30:13 +01:00
|
|
|
|
|
|
|
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
|
2006-05-10 16:47:27 +02:00
|
|
|
|
|
|
|
Alternatively, you can directly use osc-wrapper.py from the source dir
|
2006-07-10 18:11:07 +02:00
|
|
|
(which is easier if you develop on osc).
|
2006-05-10 16:47:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CONFIGURATION:
|
2006-04-20 16:26:50 +02:00
|
|
|
|
2006-05-23 11:30:30 +02:00
|
|
|
When you use it for the first time, it will ask you for your username and
|
|
|
|
password, and store it in ~/.oscrc.
|
|
|
|
|
2009-04-06 21:15:32 +02:00
|
|
|
|
|
|
|
CONFIGURATION MIGRATION (only affects versions >= 0.114):
|
|
|
|
|
|
|
|
Version 0.114 got some cleanups for the configfile handling and therefore some
|
|
|
|
options are now deprecated, namely:
|
|
|
|
* apisrv
|
|
|
|
* scheme
|
|
|
|
|
|
|
|
One new option was added:
|
|
|
|
* apiurl = <protocol>://<somehost> # use this as the default apiurl. If this
|
|
|
|
option isn't 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's 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 doesn't work for whatever reason feel free to send me an email
|
|
|
|
or ask on the opensuse-buildservice mailinglist or in the #opensuse-buildservice
|
|
|
|
irc channel.
|
|
|
|
|
|
|
|
=== Migration case I (apisrv only) ===
|
|
|
|
The apisrv option is used to specify the default apihost. If apisrv isn't
|
|
|
|
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.
|
|
|
|
|
|
|
|
=== Migration case II (scheme only) ===
|
|
|
|
The current [general] section looks like this:
|
|
|
|
[general]
|
|
|
|
...
|
|
|
|
scheme = <protocol>
|
|
|
|
|
|
|
|
This means every apiurl section which don't 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).
|
|
|
|
|
|
|
|
=== Migration case III (apisrv and scheme) ===
|
|
|
|
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).
|
2006-04-20 16:26:50 +02:00
|
|
|
|
|
|
|
|
2009-05-11 09:46:01 +02:00
|
|
|
KEYRING USAGE
|
|
|
|
|
2009-09-04 20:43:28 +02:00
|
|
|
Osc now can store passwords in keyrings instead of ~/.oscrc. To use it,
|
|
|
|
you need python-keyring and either python-keyring-kde or -gnome.
|
2009-05-11 09:46:01 +02:00
|
|
|
|
2009-09-04 20:43:28 +02:00
|
|
|
If you want to switch to using a keyring you need to delete apiurl section
|
2009-05-11 09:46:01 +02:00
|
|
|
from ~/.oscrc and you will be asked for credentials again, which will be then
|
2009-09-04 20:43:28 +02:00
|
|
|
stored in the keyring application.
|
2009-05-11 09:46:01 +02:00
|
|
|
|
2006-04-20 16:26:50 +02:00
|
|
|
|
2010-12-06 15:35:07 +01:00
|
|
|
WORKING COPY INCONSISTENT (only affects version >= 0.130)
|
|
|
|
|
|
|
|
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 storedir (.osc/) but it won't 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).
|
|
|
|
|
|
|
|
|
2006-04-20 16:31:24 +02:00
|
|
|
USAGE EXAMPLES:
|
2010-07-27 15:20:35 +02:00
|
|
|
(online at http://en.opensuse.org/openSUSE:OSC )
|
2006-04-20 16:26:50 +02:00
|
|
|
|
2006-05-23 11:30:30 +02:00
|
|
|
To list existing content on the server
|
2010-02-28 02:30:13 +01:00
|
|
|
osc ls # list projects
|
|
|
|
osc ls Apache # list packages in a project
|
|
|
|
osc ls Apache subversion # list files of package of a project
|
2006-05-23 11:30:30 +02:00
|
|
|
|
|
|
|
Check out content
|
2010-02-28 02:30:13 +01:00
|
|
|
osc co Apache # entire project
|
|
|
|
osc co Apache subversion # a package
|
|
|
|
osc co Apache subversion foo # single file
|
2006-05-23 11:30:30 +02:00
|
|
|
|
|
|
|
Update a working copy
|
|
|
|
osc up
|
2010-02-28 02:30:13 +01:00
|
|
|
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
|
2006-05-23 11:30:30 +02:00
|
|
|
|
|
|
|
If an update can't be merged automatically, a file is in 'C' (conflict)
|
2010-02-28 02:30:13 +01:00
|
|
|
state, and conflicts are marked with special <<<<<<< and >>>>>>> lines.
|
2006-05-23 11:30:30 +02:00
|
|
|
After manually resolving the problem, use
|
|
|
|
osc resolved foo
|
|
|
|
|
2006-05-23 15:48:58 +02:00
|
|
|
Upload change content
|
2010-02-28 02:30:13 +01:00
|
|
|
osc ci # current dir
|
2006-05-23 11:30:30 +02:00
|
|
|
osc ci <dir>
|
|
|
|
osc ci file1 file2 ...
|
|
|
|
|
|
|
|
Show the status (which files have been changed locally)
|
|
|
|
osc st
|
|
|
|
osc st <directory>
|
|
|
|
osc st file1 file2 ...
|
|
|
|
|
|
|
|
Mark files to be added or removed on the next 'checkin'
|
|
|
|
osc add file1 file2 ...
|
|
|
|
osc rm file1 file2 ...
|
|
|
|
|
|
|
|
Adds all new files in local copy and removes all disappeared files.
|
|
|
|
osc addremove
|
|
|
|
|
|
|
|
Generates a diff, to view the changes
|
2010-02-28 02:30:13 +01:00
|
|
|
osc diff # current dir
|
2006-05-23 11:30:30 +02:00
|
|
|
osc diff file1 file2 ...
|
|
|
|
|
|
|
|
Shows the build results of the package
|
|
|
|
osc results
|
2009-09-08 10:14:27 +02:00
|
|
|
osc results [repository]
|
2006-05-23 11:30:30 +02:00
|
|
|
|
2006-06-26 17:11:22 +02:00
|
|
|
Shows the log file of a package (you need to be inside a package directory)
|
2009-09-08 10:14:27 +02:00
|
|
|
osc log <repository> <arch>
|
2006-05-23 11:30:30 +02:00
|
|
|
|
2006-06-26 17:11:22 +02:00
|
|
|
Shows the URLs of .repo files which are packages sources for Yum/YaST/smart
|
|
|
|
osc repourls [dir]
|
|
|
|
|
|
|
|
Triggers a package rebuild for all repositories/architectures of a package
|
|
|
|
osc rebuildpac [dir]
|
|
|
|
|
2009-09-08 10:14:27 +02:00
|
|
|
Shows available repository/build targets
|
|
|
|
osc repository
|
2006-05-23 11:30:30 +02:00
|
|
|
|
2009-09-08 10:14:27 +02:00
|
|
|
Shows the configured repository/build targets of a project
|
|
|
|
osc repository <project>
|
2006-05-23 11:30:30 +02:00
|
|
|
|
|
|
|
Shows meta information
|
|
|
|
osc meta Apache
|
|
|
|
osc meta Apache subversion
|
|
|
|
osc id username
|
2006-04-20 16:26:50 +02:00
|
|
|
|
2006-05-23 17:32:55 +02:00
|
|
|
Edit meta information
|
|
|
|
(Creates new package/project if it doesn't exist)
|
|
|
|
osc editmeta Apache
|
|
|
|
osc editmeta Apache subversion
|
2006-05-19 22:13:29 +02:00
|
|
|
|
2006-06-26 17:11:22 +02:00
|
|
|
Update package meta data with metadata taken from spec file
|
|
|
|
osc updatepacmetafromspec <dir>
|
|
|
|
|
2006-05-19 22:13:29 +02:00
|
|
|
|
2006-07-14 19:39:46 +02:00
|
|
|
There are other commands, which you may not need (they may be useful in scripts):
|
|
|
|
osc repos
|
|
|
|
osc buildconfig
|
|
|
|
osc buildinfo
|
|
|
|
|
|
|
|
|
2006-07-17 15:15:42 +02:00
|
|
|
Locally build a package (see 'osc help build' for more info):
|
|
|
|
osc build <repo> <arch> specfile [--clean|--noinit]
|
|
|
|
|
|
|
|
|
2007-07-11 09:58:40 +02:00
|
|
|
Update a package to a different sources (directory foo_package_source):
|
|
|
|
cp -a foo_package_source foo; cd foo; osc init <prj> <pac>; osc addremove; osc ci; cd $OLDPWD; rm -r foo
|
|
|
|
|
|
|
|
|
2006-05-19 22:13:29 +02:00
|
|
|
|
|
|
|
HINT FOR W3M USERS
|
|
|
|
|
|
|
|
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
|
2007-05-16 12:57:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
NOTES about the testsuite
|
|
|
|
|
2011-01-24 08:30:23 +01:00
|
|
|
A new test suite has been created and should run via doing
|
2022-02-17 13:28:47 +01:00
|
|
|
# ./setup.py test
|
2011-01-24 08:30:23 +01:00
|
|
|
|