complete last change (mention python-xml)
[opensuse:osc.git] / README
1 osc -- opensuse-commander with svn like handling
2
3
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/
6
7
8 INSTALLATION:
9
10 RPM packages are here (yum repository):
11 http://software.opensuse.org/download/openSUSE:/Tools/
12
13 To install from svn, do
14         python setup.py build
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
18
19 Alternatively, you can directly use osc-wrapper.py from the source dir
20 (which is easier if you develop on osc).
21
22
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/
29
30
31
32 CONFIGURATION:
33
34 When you use it for the first time, it will ask you for your username and
35 password, and store it in ~/.oscrc.
36
37 If authentication data is found in .netrc, it will also be used.
38
39
40
41 USAGE EXAMPLES:
42 (online at http://en.opensuse.org/Build_Service/CLI )
43
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
48
49 Check out content
50  osc co Apache                  # entire project
51  osc co Apache subversion       # a package
52  osc co Apache subversion foo   # single file
53
54 Update a working copy
55  osc up
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
60
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
64  osc resolved foo
65
66 Upload change content
67  osc ci                         # current dir
68  osc ci <dir>
69  osc ci file1 file2 ...
70
71 Show the status (which files have been changed locally)
72  osc st
73  osc st <directory>
74  osc st file1 file2 ...
75
76 Mark files to be added or removed on the next 'checkin'
77  osc add file1 file2 ...
78  osc rm file1 file2 ...
79
80 Adds all new files in local copy and removes all disappeared files.
81  osc addremove
82
83 Generates a diff, to view the changes
84  osc diff                       # current dir
85  osc diff file1 file2 ...
86
87 Shows the build results of the package
88  osc results
89  osc results [platform]
90
91 Shows the log file of a package (you need to be inside a package directory)
92  osc log <platform> <arch>
93
94 Shows the URLs of .repo files which are packages sources for Yum/YaST/smart
95  osc repourls [dir]
96
97 Triggers a package rebuild for all repositories/architectures of a package
98  osc rebuildpac [dir]
99
100 Shows available platforms/build targets
101  osc platforms
102
103 Shows the configured platforms/build targets of a project
104  osc platforms <project>
105
106 Shows meta information
107  osc meta Apache
108  osc meta Apache subversion
109  osc id username
110
111 Edit meta information
112 (Creates new package/project if it doesn't exist)
113  osc editmeta Apache
114  osc editmeta Apache subversion
115
116 Update package meta data with metadata taken from spec file
117  osc updatepacmetafromspec <dir>
118
119
120 There are other commands, which you may not need (they may be useful in scripts):
121  osc repos
122  osc buildconfig
123  osc buildinfo
124
125
126 Locally build a package (see 'osc help build' for more info):
127  osc build <repo> <arch> specfile [--clean|--noinit]
128
129
130
131 HINT FOR W3M USERS
132
133 Putting the following in the file ~/.w3m/passwd will make
134 w3m know the credentials for the buildservice servers:
135
136 """
137 host api.opensuse.org
138   port 80
139   realm Authentication required
140   login foo
141   password bar
142
143 host build.opensuse.org
144   port 80
145   realm openSUSE Build Service
146   login foo
147   password bar
148 """
149
150 chmod 0600 ~/.w3m/passwd