aboutsummaryrefslogtreecommitdiff
path: root/deb.wiki
blob: e413bb859446f2d4782158e01fcc2b6e76a48970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
See also [[debian-pkg]]

All commands assume (unless otherwise noted) that PWD is the source
dir of the upstream code, and that there is a `debian` repo in that
directory.

== debmake ==
Creates debian directory

{{{
- `/dir/<pkgname>`
    - `<pkgname>-<version>` ← cwd
    - `<pkgname>-<version>.tar.gz`
}}}

== debuild ==
Builds a pakage.
Runs `debian/rules build` to build package

== debian/watch ==
https://wiki.debian.org/debian/watch

Specifies where to look for an newer version.
By running `uscan`.

It should download `../${PKG}-${NEW-VERSION}.tar.gz`, and sets up some
symlinks for that debian might want.

From there, extract and move the `debian` folder to the new directory.

== Building ==
`debian/rules build` build the binaries, but not the package

apt install debmake build-dep tree

=== Build dependencies ===

`mk-build-deps` :: Generarer ett paket från `debian/control`, vilket
:: inte innehåller någonting, men beror på build-depends.
`dpkg --fix-broken install ./<pkgname>-build-deps_<version>-<pkgrel>_all.deb` ::
`apt install ./<pkgname>-build-deps_<version>-<pkgrel>_all.deb` ::
:: Installerar det lokala paketet, med beroenden
- # apt-get build-dep <pkgname>-build-deps_<version>-<pkgrel>_all.deb

=== Update changelog ===
==== Creates new entry with verssion number ====
> dch --newversion <version>-2.1
`-2` :: is debian package version, start at 2 to avoid lintian issue about [[https://wiki.debian.org/ITP|ITP]]
`.1` :: Shows that this is an [[https://www.debian.org/doc/manuals/developers-reference/pkgs.html#nmus-and-debian-changelog|NMU]], since we aren't a Debian maintainer

=== Figure out runtime dependencies ===

`objdump -p <build-binary> | grep NEEDED`





{{{
gandalf [~/puppet/production/modules] $ git commit -m 'Change repo-url.'
[production 9cd4251] Change repo-url.
 1 file changed, 1 insertion(+), 1 deletion(-)
(failed reverse-i-search)`machinectl ': ^Cchinectl
gandalf [~/puppet/production/modules] $ sudo machinectl -M raspberry-builder shell
[sudo] password for hugo:
Connected to the local host. Press ^] three times within 1s to exit session.
root@raspberry-builder:~# cd /tmp/
root@raspberry-builder:/tmp# ls
a     stupan_1.12-1.diff.67wjMg  stupan_1.12-1.diff.HILORd  stupan_1.12-1.diff.YQrd1o
file  stupan_1.12-1.diff.csArgg  stupan_1.12-1.diff.nCSB3m  systemd-private-d6720196d8b74cd481576c3320271375-systemd-logind.service-Mgt66f
root@raspberry-builder:/tmp# mkdir b
root@raspberry-builder:/tmp# cd b
root@raspberry-builder:/tmp/b# apt source xterm
Reading package lists... Done
NOTICE: 'xterm' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/xorg-team/app/xterm.git
Please use:
git clone https://salsa.debian.org/xorg-team/app/xterm.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 1,561 kB of source archives.
Get:1 https://deb.debian.org/debian bullseye/main xterm 366-1 (dsc) [2,478 B]
Get:2 https://deb.debian.org/debian bullseye/main xterm 366-1 (tar) [1,446 kB]
Get:3 https://deb.debian.org/debian bullseye/main xterm 366-1 (asc) [265 B]
Get:4 https://deb.debian.org/debian bullseye/main xterm 366-1 (diff) [113 kB]
Fetched 1,561 kB in 0s (8,047 kB/s)
dpkg-source: info: extracting xterm in xterm-366
dpkg-source: info: unpacking xterm_366.orig.tar.gz
dpkg-source: info: unpacking xterm_366-1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 900_debian_xterm.diff
dpkg-source: info: applying 902_windowops.diff
dpkg-source: info: applying 904_fontops.diff
W: No sandbox user '_apt' on the system, can not drop privileges
root@raspberry-builder:/tmp/b# ls
xterm-366  xterm_366-1.debian.tar.xz  xterm_366-1.dsc  xterm_366.orig.tar.gz  xterm_366.orig.tar.gz.asc
root@raspberry-builder:/tmp/b# ls --color
xterm-366  xterm_366-1.debian.tar.xz  xterm_366-1.dsc  xterm_366.orig.tar.gz  xterm_366.orig.tar.gz.asc
root@raspberry-builder:/tmp/b# cat *.dsc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 3.0 (quilt)
Source: xterm
Binary: xterm
Architecture: any
Version: 366-1
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Sven Joachim <svenjoac@gmx.de>
Homepage: https://invisible-island.net/xterm/xterm.html
Standards-Version: 4.5.1
Vcs-Browser: https://salsa.debian.org/xorg-team/app/xterm
Vcs-Git: https://salsa.debian.org/xorg-team/app/xterm.git
Testsuite: autopkgtest
Testsuite-Triggers: xauth, xvfb
Build-Depends: libncurses-dev, libxft-dev (>> 2.1.2), libxrender-dev (>> 1:0.9.0), libxaw7-dev, libxkbfile-dev, libutempter-dev, libxcursor-dev, libxinerama-dev, debhelper-compat (= 13), debhelper (>= 13.1~), autoconf-dickey (>= 2.52+20210105), groff, bsdextrautils | bsdmainutils (<< 12.1.1~), lynx, xorg-docs-core, desktop-file-utils
Package-List:
 xterm deb x11 optional arch=any
Checksums-Sha1:
 1ec2fc8b5ee63d5a0d1c69cf7898624f280f6342 1445992 xterm_366.orig.tar.gz
 6a413f3b2eecf76815e40ade93b146a99f7eea75 265 xterm_366.orig.tar.gz.asc
 e83522fb158ca1b6c18dc0bd0f84c4daf02edfd1 112760 xterm_366-1.debian.tar.xz
Checksums-Sha256:
 858b2885963fe97e712739066aadc1baeba2b33a0016303a7fec7d38bc73bf6e 1445992 xterm_366.orig.tar.gz
 a7cbbc6bf7c1de5d8414c4c5d109aff733f1846ed8d2dea4fba2980126cf8896 265 xterm_366.orig.tar.gz.asc
 fe86ea2728bc07c5bbac53fdddc95f71b700a1e1452f7d2312e248a18a34bf3d 112760 xterm_366-1.debian.tar.xz
Files:
 defa46224efc2384f030750ceb2252ec 1445992 xterm_366.orig.tar.gz
 4d95cf7d665bb8e34552a1fdb0837e49 265 xterm_366.orig.tar.gz.asc
 3a1d741fe6a86809c20ddcb7cc747332 112760 xterm_366-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEVXgdqzTmGgnvuIvhnbAjVVb4z60FAmAk+tYUHGpjcmlzdGF1
QGRlYmlhbi5vcmcACgkQnbAjVVb4z61Vjw//SXT01F7G505cso6PonWUeo1ub0Yt
N/k5VWMCAnCU+mlYGq64y421LP/cSyfDWCQ3VSKmvnbapMSp7a4NRyPFCnLMK2ut
xkrCNPD69K7G6jFPORAwsfC17oRwngcFPnwoYAIH8oDvcrePCvztfeLqaCrnrf2T
Uv/R0o9PEKKPWbtYgjvZ4Djhx+aJF9couEQ8g2rXt1PbzeNfpWA9Wjwg3xw/nQ7x
0+lajDgsSYATmeBS0oC8Km6+f92Raexe11uWFwp73xWJ5HrwwyVe5gosprh/2vI0
4v5K7rL4p5SIPEk8Xr46YADqanczqWJro4hd90QhKZ7XPHJBQf/YPisWTd00ZJ4p
lzq9cIcgCdm4J9DJ9zSzusZvdR8JExwhux5QeTn11/FwR1QLZtImKqPqzfMqhZMS
A4hZZb0v0MpJUWL3gD/c38m6erPr/ZRUUeFajRmeXqs/L006DsljX43rF107ZFdG
Paivyt6IdDM9P9VNcUwSPx2JjgMha6YBudp0XGBntHuXnAMalCuvlgBSQ86ldf9M
}}}


git-dch

== Reprepro ==
Cutom repo

=== Deb ===
{{{sh
reprepro -Vb /usr/net/repo/debian/ includedeb una <path-to-deb>
}}}

== Dsc ==
Also include relevant `.debian.tar.xz` and `.orig.tar.gz`.
{{{sh
reprepro -Vb /usr/net/repo/debian/ includedsc una <path-to-dsc>
}}}

== Build from Source ==

*TODO* hur får man tag i filerna? `apt source <paketnamn>`?

Stå in en katalog med
- *.debian.tar.xz
- *.dsc
- *.orig.tar.gz

- Kör `dpkg-source -x *.dsc`
- `cd <paketnamn>`
- `debuild`

== Om allting finns i repona ==
Se till att devscripts är installerat

- apt build-dep <pkgname>
- apt source <pkgname>
- cd <pkgname>-version
- debuild


== licensecheck ==
Possibly checks the debian/copyright file


== Other files ==
https://www.debian.org/doc/manuals/maint-guide/dother.en.html#install

== All lintian errors ==
https://lintian.debian.org/tags

== No signing ==
{{{
debuild -u -uc
}}}
builds without signing