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