1 osc -- opensuse-commander with svn like handling
4 Please send patches to poeml@suse.de, or work directly on
5 https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/clientlib/python/osc/
10 RPM packages are here (yum repository):
11 http://software.opensuse.org/download/openSUSE:/Tools/
13 To install from svn, do
15 python setup.py install
16 # create a symlink 'osc' in your path pointing to osc.py.
17 ln -s osc-wrapper.py /usr/bin/osc
19 Alternatively, you can directly use osc-wrapper.py from the source dir
20 (which is easier if you develop on osc).
23 The program needs the cElementTree python module installed. On SUSE, the
24 respective package is called python-elementtree (before 10.2: python-xml).
25 For local building, you will need python-urlgrabber in addition. Those are
26 standard package on SUSE Linux since a while. If your version is too old, you
27 can find python-elementtree and python-urlgrabber here:
28 http://software.opensuse.org/download/devel:/languages:/python/
34 When you use it for the first time, it will ask you for your username and
35 password, and store it in ~/.oscrc.
37 If authentication data is found in .netrc, it will also be used.
42 (online at http://en.opensuse.org/Build_Service/CLI )
44 To list existing content on the server
45 osc ls # list projects
46 osc ls Apache # list packages in a project
47 osc ls Apache subversion # list files of package of a project
50 osc co Apache # entire project
51 osc co Apache subversion # a package
52 osc co Apache subversion foo # single file
56 osc up [pac_dir] # update a single package by its path
57 osc up * # from within a project dir, update all packages
58 osc up # from within a project dir, update all packages
59 AND check out all newly added packages
61 If an update can't be merged automatically, a file is in 'C' (conflict)
62 state, and conflicts are marked with special <<<<<<< and >>>>>>> lines.
63 After manually resolving the problem, use
69 osc ci file1 file2 ...
71 Show the status (which files have been changed locally)
74 osc st file1 file2 ...
76 Mark files to be added or removed on the next 'checkin'
77 osc add file1 file2 ...
78 osc rm file1 file2 ...
80 Adds all new files in local copy and removes all disappeared files.
83 Generates a diff, to view the changes
84 osc diff # current dir
85 osc diff file1 file2 ...
87 Shows the build results of the package
89 osc results [platform]
91 Shows the log file of a package (you need to be inside a package directory)
92 osc log <platform> <arch>
94 Shows the URLs of .repo files which are packages sources for Yum/YaST/smart
97 Triggers a package rebuild for all repositories/architectures of a package
100 Shows available platforms/build targets
103 Shows the configured platforms/build targets of a project
104 osc platforms <project>
106 Shows meta information
108 osc meta Apache subversion
111 Edit meta information
112 (Creates new package/project if it doesn't exist)
114 osc editmeta Apache subversion
116 Update package meta data with metadata taken from spec file
117 osc updatepacmetafromspec <dir>
120 There are other commands, which you may not need (they may be useful in scripts):
126 Locally build a package (see 'osc help build' for more info):
127 osc build <repo> <arch> specfile [--clean|--noinit]
133 Putting the following in the file ~/.w3m/passwd will make
134 w3m know the credentials for the buildservice servers:
137 host api.opensuse.org
139 realm Authentication required
143 host build.opensuse.org
145 realm openSUSE Build Service
150 chmod 0600 ~/.w3m/passwd