Skip to content

Commit abb35b1

Browse files
committed
debian: review of build instructions
1 parent 5499ddc commit abb35b1

File tree

1 file changed

+31
-33
lines changed

1 file changed

+31
-33
lines changed

debian/README.source

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
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

1211
Packaging 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

2523
Automated tools to check licenses within the source tree will likely find
2624
CC-2.5 referenced. But this refers only to some image files that were
2725
not adopted by the source tree, only the README describing them was
2826
intentionally 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

3834
Do this step in `linuxcnc.git`.
3935

@@ -42,18 +38,27 @@ git checkout ${COMMIT} # check out the commit you want
4238
git reset --hard
4339
git clean -fdx .
4440
VERSION=$(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+
```
4546
VERSION=$(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+
```
4650
echo ${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+
```
5158
tar --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

5863
Do 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

8286
Do 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
```
8891
export IMAGE="debian:bookworm"
@@ -111,12 +114,9 @@ Commit all changes to the debian/ directory:
111114
git 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
```
122122
docker run --rm --interactive --tty --volume ${PWD}:${PWD} --workdir ${PWD} ${IMAGE}
@@ -133,7 +133,7 @@ architecture-independent packages) should also build from scratch in a
133133
clean 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

138138
Run 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
```
150149
gbp 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

164162
LinuxCNC does not have a representation on salsa.debian.org.
165163
Please join us on https://github.com/LinuxCNC/linuxcnc/ .

0 commit comments

Comments
 (0)