aboutsummaryrefslogtreecommitdiff
path: root/deb.wiki
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-02-11 18:59:48 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-02-11 18:59:48 +0100
commited4ee7d3a6720279898bbf6bc920f1b6f4ddbe66 (patch)
tree0e6fd1f70ad856d7c7f57d18b2ba3ef35d548116 /deb.wiki
parentfre 4 feb 2022 18:27:54 CET (diff)
downloadwiki-public-ed4ee7d3a6720279898bbf6bc920f1b6f4ddbe66.tar.gz
wiki-public-ed4ee7d3a6720279898bbf6bc920f1b6f4ddbe66.tar.xz
fre 11 feb 2022 18:59:48 CET
Diffstat (limited to 'deb.wiki')
-rw-r--r--deb.wiki146
1 files changed, 146 insertions, 0 deletions
diff --git a/deb.wiki b/deb.wiki
index 735664f..b2b272c 100644
--- a/deb.wiki
+++ b/deb.wiki
@@ -5,6 +5,12 @@ 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
@@ -22,3 +28,143 @@ 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.
+`apt --fix-broken 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 ==
+
+=== 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`
+