OBS » History » Version 4
pespin, 02/27/2024 01:55 PM
1 | 1 | laforge | h1. Osmocom OBS |
---|---|---|---|
2 | |||
3 | {{>toc}} |
||
4 | |||
5 | 3 | osmith | The Osmocom [[binary packages]] are built with OBS (Open Build Service) hosted on "obs.osmocom.org":https://obs.osmocom.org. In order to do that, the jenkins jobs "Osmocom_OBS_latest":https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_latest/ / "_nightly":https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/ ("config":https://gitea.osmocom.org/osmocom/osmo-ci/src/branch/master/jobs/osmocom-obs.yml) checkout the source repositories and build debian *source* packages, then upload these to OBS. |
6 | 1 | laforge | |
7 | OBS has a hierarchical namespace of _projects_, of which we currently use |
||
8 | * @osmocom:*@ for official package repositories of osmocom, like the @osmocom:latest@ and @osmocom:nightly@ |
||
9 | * @home:*@ as a personal playground / staging area for developers |
||
10 | |||
11 | h2. OBS access |
||
12 | |||
13 | Osmocom developers can register user accounts on OBS (sadly separate and not via redmine openID provider). This gives access to creating personal _OBS projects_, i.e. additional package feeds for development and testing |
||
14 | |||
15 | h3. The @osc@ command-line client |
||
16 | |||
17 | Many operations are easier when performed via the @osc@ command-line client rather than the web UI of OBS. |
||
18 | |||
19 | In order to make osc access @obs.osmocom.org@ instead of the default @build.opensuse.org@, you can specify the @-A https://obs.osmocom.org@ command-line option. See the man pages for more details. |
||
20 | |||
21 | h2. The @osmocom:*@ projects |
||
22 | |||
23 | For more information on these builds, how they are created, see [[OBS_Maintenance]]. |
||
24 | |||
25 | All packages marked as _publish_ in their configuration are rsync'ed over to https://downloads.sysmocom.de/packages |
||
26 | |||
27 | Write access to the @osmocom:@ projects requires respective group membership, please contact @laforge in case you need it. |
||
28 | |||
29 | h2. The @home:*@ projects |
||
30 | |||
31 | Every OBS user automatically gets their own @home:@ project, for example if your user name was foo, your home project would be @home:foo@ |
||
32 | |||
33 | You can build packages either directly in that home project, or you can create any number of sub-projects below, like @home:foo:bar@. |
||
34 | |||
35 | All packages marked as _publish_ in their configuration are rsync'ed over to https://people.osmocom.org/packages/home%3A/ |
||
36 | 4 | pespin | |
37 | |||
38 | h3. Build and publish your own (modified) packages |
||
39 | |||
40 | Sign up / sign in to obs.osmocom.org and create the "test" project under the "Home Project" link (right next to the "Logout" link on the OBS web interface), so that https://obs.osmocom.org/project/show/home:YourUser:test exists. |
||
41 | |||
42 | Then make sure to create whatever package you want (eg. "open5gs"). You can fork it from the existing related package under osmocom:nightly. |
||
43 | Next, under that package web UI, add build targets for the distributions you want to build for. |
||
44 | |||
45 | Make sure that you can indeed list the project using the 'osc' tool. That requires an osc config file. Easiest is to let osc create one: |
||
46 | |||
47 | $ osc -A https://obs.osmocom.org list home:YourUser:test |
||
48 | |||
49 | The config file usually ends up under /home/$USER/.config/osc/oscrc. It has a structure similar to this one: |
||
50 | <pre> |
||
51 | [general] |
||
52 | apiurl = https://obs.osmocom.org |
||
53 | |||
54 | [https://obs.osmocom.org] |
||
55 | user=YourUser |
||
56 | pass=*********** |
||
57 | credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManage |
||
58 | </pre> |
||
59 | |||
60 | To checkout the repository and submit a new package version for build & publish, you can use the script under osmo-ci/scripts/obs/./update_obs_project.py. |
||
61 | Run it with "-d" to run it under docker so that you don't need to install multiple dependencies. |
||
62 | |||
63 | <pre> |
||
64 | OSCRC=/home/$USER/.config/osc/oscrc ./update_obs_project.py -d -b your-branch home:YourUser:test open5gs |
||
65 | </pre> |
||
66 | |||
67 | Where the "-b your-branch" specifies the git branch that will be checked out upon fetching the git repository. |
||
68 | The repository is cloned under "_cache/open5gs/". One can clone the repository manually, and/or modify the origin remote to point to a local development git repository in the same host. |
||
69 | Alternatively, before first clone, one can change the default URL of each repository, which is defined in osmo-ci/scripts/obs/lib/config.py "git_url_other". |