Manually building a distribution package » History » Version 2
neels, 09/16/2020 12:48 PM
1 | 2 | neels | h1. THIS IS WORK IN PROGRESS, unfinished |
---|---|---|---|
2 | |||
3 | 1 | neels | h1. Manually building a distribution package |
4 | |||
5 | This is a complete example showing how I created a .deb package of a custom osmo-msc version. |
||
6 | The aim was to distribute a certain patch of osmo-msc without modifying the official Osmocom package feeds. |
||
7 | |||
8 | h2. lxc container |
||
9 | |||
10 | For a clean build base, create a fresh debian 10 (buster) container. |
||
11 | |||
12 | on lxc host: |
||
13 | |||
14 | <pre> |
||
15 | lxc-create -t download -n neels-deb10 |
||
16 | lxc-start -n neels-deb10 |
||
17 | lxc-attach -n neels-deb10 |
||
18 | </pre> |
||
19 | |||
20 | in neels-deb10 container: |
||
21 | |||
22 | <pre> |
||
23 | apt install openssh-server |
||
24 | useradd -m -s /bin/bash neels |
||
25 | cd /home/neels/ |
||
26 | mkdir .ssh |
||
27 | cd .ssh/ |
||
28 | cat > authorized_keys |
||
29 | # paste my ssh pubkey, hit ctrl-D |
||
30 | cd .. |
||
31 | chown -R neels: .ssh |
||
32 | passwd neels |
||
33 | apt-get install sudo |
||
34 | gpasswd -a neels sudo |
||
35 | apt-get update |
||
36 | apt-get install wget gnupg git tig |
||
37 | wget https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/Release.key_ |
||
38 | sha256sum Release.key | grep b5e2c1df9ff80bc73dd00a0c153ef308e7ec643ddb859e69789fcd4a9b1893d3 |
||
39 | apt-key add Release.key |
||
40 | rm Release.key |
||
41 | cat > /etc/apt/sources.list.d/osmocom-nightly.list <<END |
||
42 | deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/ ./ |
||
43 | deb-src http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/ ./ |
||
44 | END |
||
45 | apt-get update |
||
46 | apt-get install git-buildpackage |
||
47 | apt-get build-depends osmo-msc |
||
48 | |||
49 | git clone git://git.osmocom.org/osmo-msc |
||
50 | cd osmo-msc |
||
51 | git checkout neels/mncc_codecs2 |
||
52 | |||
53 | dpkg-buildpackage -uc -us -tc |
||
54 | </pre> |