1- Debian packaging of LinuxCNC
2- ============================
1+ # Debian packaging of LinuxCNC
32
3+ ## Introduction
44
5- Introduction
6- ------------
5+ LinuxCNC is packaged in two different ways:
76
8- LinuxCNC is packaged in two different ways: a simple way for the builds
9- on the LinxuCNC buildbot CI system (<http://buildbot.linuxcnc.org>),
10- and a different (more complicated) way for official debian.org packages.
7+ 1. a simple way for the builds on the LinxuCNC buildbot
8+ CI system (<http://buildbot.linuxcnc.org>), and
9+ 2. a different (more complicated) way for official debian.org packages.
1110
1211Packaging by the LinuxCNC CI system is not covered in this document, see
1312<http://linuxcnc.org/docs/devel/html/code/building-linuxcnc.html#_building_debian_packages>
@@ -19,21 +18,18 @@ Packaging of LinuxCNC for debian.org is split between linuxcnc.git
1918(in <https://github.com/LinuxCNC/linuxcnc-gbp.git>).
2019
2120
22- debian/copyright
23- ----------------
21+ ## debian/copyright
2422
2523Automated tools to check licenses within the source tree will likely find
2624CC-2.5 referenced. But this refers only to some image files that were
2725not adopted by the source tree, only the README describing them was
2826intentionally left unchanged.
2927
3028
31- Build a new DSC for upload to debian.org
32- ----------------------------------------
29+ ## Build a new DSC for upload to debian.org
3330
3431
35- Make the new orig tarball
36- ~~~~~~~~~~~~~~~~~~~~~~~~~
32+ ### Make the new orig tarball
3733
3834Do this step in `linuxcnc.git`.
3935
@@ -42,18 +38,27 @@ git checkout ${COMMIT} # check out the commit you want
4238git reset --hard
4339git clean -fdx .
4440VERSION=$(head -n1 debian/changelog |cut -f2 -d' ' | tr -d "()" | sed -e 's/^[0-9]://' )
41+ ```
42+ If you are not uploading the exact same version of what is in the release tarball,
43+ then also specify the git tag as part of the version:
44+
45+ ```
4546VERSION=$(git log --date=format:%Y%m%d --pretty=${VERSION}+git%cd.%h| head -n1)
47+ ```
48+ Inspect the version and create the file VERSION.
49+ ```
4650echo ${VERSION} | tee VERSION
51+ ```
52+
53+ We use `--exclude=.git` instead of `--exclude-vcs` because the linuxcnc
54+ git repo uses .gitignore to keep otherwise-empty directories around,
55+ and the build system is too lazy to mkdir them as needed.
4756
48- # We use `--exclude=.git` instead of `--exclude-vcs` because the linuxcnc
49- # git repo uses .gitignore to keep otherwise-empty directories around,
50- # and the build system is too lazy to mkdir them as needed.
57+ ```
5158tar --create --xz --exclude=.git --exclude=.github --transform "flags=r;s|^./|linuxcnc-${VERSION}/|" --file ../debian-packaging/linuxcnc_${VERSION}.orig.tar.xz .
5259```
5360
54-
55- Start the new gbp version
56- ~~~~~~~~~~~~~~~~~~~~~~~~~
61+ ### Start the new gbp version
5762
5863Do this step in `linuxcnc-gbp.git`.
5964
@@ -76,13 +81,11 @@ git commit
7681```
7782
7883
79- Update the debian/ files
80- ~~~~~~~~~~~~~~~~~~~~~~~~
84+ ### Update the debian/ files
8185
8286Do this step in `linuxcnc-gbp.git`.
8387
84- Run `debian/configure` in a clean, minimal instance of the distro we're
85- building for:
88+ Run `debian/configure` in a clean, minimal instance of the distro we're building for:
8689
8790```
8891export IMAGE="debian:bookworm"
@@ -111,12 +114,9 @@ Commit all changes to the debian/ directory:
111114git commit
112115```
113116
117+ ### Test the new debian package
114118
115- Test the new debian package
116- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
117-
118- `gbp buildpackage` should work in a minimal installation of the target
119- distro:
119+ `gbp buildpackage` should work in a minimal installation of the target distro:
120120
121121```
122122docker run --rm --interactive --tty --volume ${PWD}:${PWD} --workdir ${PWD} ${IMAGE}
@@ -133,7 +133,7 @@ architecture-independent packages) should also build from scratch in a
133133clean minimal environment.
134134
135135(The docker build environment described above is just one option, other
136- possibilities are cowbuilder, pbuilder, etc etc.)
136+ possibilities are cowbuilder, pbuilder, etc., etc.)
137137
138138Run lintian to verify the build products:
139139
@@ -143,8 +143,7 @@ lintian -i ../linuxcnc_*.changes
143143```
144144
145145
146- Release
147- ~~~~~~~
146+ ### Release
148147
149148```
150149gbp dch --release
@@ -158,8 +157,7 @@ Build & sign the dsc:
158157`dpkg-buildpackage --build=source -k${KEY_ID}`
159158
160159
161- How to contribute
162- -----------------
160+ ## How to contribute
163161
164162LinuxCNC does not have a representation on salsa.debian.org.
165163Please join us on https://github.com/LinuxCNC/linuxcnc/ .
0 commit comments