Project

General

Profile

OBS Maintenance » History » Version 6

osmith, 05/25/2020 08:15 AM

1 3 osmith
h1. OBS Maintenance
2
3 2 osmith
{{>toc}}
4 1 osmith
5
6
The Osmocom [[binary packages]] are built with OBS, the "openSUSE build service":https://build.opensuse.org/project/show/network:osmocom. 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://git.osmocom.org/osmo-ci/tree/jobs/osmocom-obs.yml) checkout the source repositories and build debian *source* packages, then upload these to OBS.
7
8
h2. Install osc
9
10
Get the command-line client for managing OBS. When using for the first time, it will ask for the credentials.
11
12
<pre>
13
$ sudo apt install osc
14
$ osc ls
15
</pre>
16
17 5 osmith
h2. Rebuilding network:osmocom:next
18
19 6 osmith
"network:osmocom:next":https://build.opensuse.org/project/show/network:osmocom:next is for a mix of packages built from master, and from experimental branches. Which branches are built is defined in "osmocom-nightly-packages.sh":https://git.osmocom.org/osmo-ci/tree/scripts/osmocom-nightly-packages.sh?h=obs-next of the obs-next branch in osmo-ci.git, next to the "checkout" lines. The "git log":https://git.osmocom.org/osmo-ci/log/scripts/osmocom-nightly-packages.sh?h=obs-next should give a clear overview of the changes. As only the branches and the PROJ variable are changed, it should be easy to rebase this on master as needed.
20 5 osmith
21
The package repository is built manually by clicking "Build with Parameters" at "Osmocom_OBS_nightly":https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly and tying in "obs-next" as branch.
22
23 1 osmith
h2. Workflow for testing OBS configurations
24
25 4 osmith
OBS has a "project configuration":https://en.opensuse.org/openSUSE:Build_Service_prjconf, which may need to be adjusted to state preferred dependencies for example. Before we apply project configurations to the official Osmocom OBS projects, we can test them in our own OBS project. Copy the relevant package first (adjust the username accordingly in all following examples):
26 1 osmith
27
<pre>
28
$ osc copypac network:osmocom:nightly osmo-gsm-manuals home:osmith42
29
</pre>
30
31
Visit the site in your browser:
32
* https://build.opensuse.org/package/show/home:osmith42/osmo-gsm-manuals
33
34
Set up build targets:
35
* https://build.opensuse.org/project/add_repository_from_default_list/home:osmith42
36
37
The package should get added to the queue already.
38
39
Open your project config next to the osmocom:nightly one:
40
* https://build.opensuse.org/project/prjconf/home:osmith42
41
* https://build.opensuse.org/project/prjconf/network:osmocom:nightly
42
43
First copy everything from the Osmocom project over to your own project. Then make changes to your config, until the builds are working as expected (dependency problems are resolved etc.). Whenever you change the config, OBS will immediately re-evaluate the build dependencies, no need to upload the source packages again.
44
45
When everything works as expected, copy the config changes you have made to the Osmocom project (nightly and latest).
46
47
Note that changing network:osmocom's project config did not seem to have any effect. It seems that we really must change both network:osmocom:nightly and :latest instead.
48
49
h2. Workflow for modifying packages
50
51
h3. (Optional) modify the debian dir
52
53
* clone the source git repository
54
* make changes to the debian dir
55
* commit your changes
56
* push to a "user/..." branch
57
58
h3. Build source packages and upload to your own OBS project
59
60
* clone osmo-ci.git
61
* open "osmo-nightly-packages.sh":https://git.osmocom.org/osmo-ci/tree/scripts/osmocom-nightly-packages.sh
62
* if you intend to make changes to the script, do them and commit the changes
63
* change "PROJ":https://git.osmocom.org/osmo-ci/tree/scripts/osmocom-nightly-packages.sh?id=dc5fc51c1fa76e64db774ecb9e71fc25ad6c46cd#n10 to home:USERNAME
64
* if you made changes to the debian dir, insert your branch name after the related "checkout line":https://git.osmocom.org/osmo-ci/tree/scripts/osmocom-nightly-packages.sh?id=dc5fc51c1fa76e64db774ecb9e71fc25ad6c46cd#n172 (e.g. <code>checkout osmo-gsm-manuals osmith/some-random-change</code>)
65
* run osmocom-nightly-packages.sh
66
* check in your browser if all packages have been built by OBS as expected (iterate until you get everything right)
67
68
When everything works fine, contribute your patches with [[Gerrit]] as usually.
69
70
71
h2. Troubleshooting
72
73
h3. Debian dir doesn't work for multiple debian versions
74
75
Following what has been done for osmo-trx:
76
* create the debian dir to work with the latest debian stable
77
* create a patch that would make it work with an earlier release (debian 8) and save it as debian/patches/build-for-debian8.patch
78
* adjust the osmocom-*-packages.sh scripts to upload a second debian source package, which has the patch applied
79
* configure OBS to build the patched package only for the older debian releases, and the unpatched package only for the stable release
80
81
h3. Package is not resolvable
82
83
84
<pre>
85
have choice for jadetex needed by docbook-utils: jadetex texlive-formats-extra
86
</pre>
87
88
You'll need to adjust the OBS project configuration (mind the testing workflow above):
89
<pre>
90
Prefer: texlive-htmlxml
91
</pre>
92
93
94
h2. See also
95
96
* https://en.opensuse.org/Portal:Build_Service
97
* https://en.opensuse.org/openSUSE:Build_Service_prjconf
Add picture from clipboard (Maximum size: 48.8 MB)