Skip to content

Commit 7f088d8

Browse files
authored
Merge pull request #2711 from smoe/debian_package_upload_instructions
debian: review of build instructions
2 parents 15bf151 + 23506af commit 7f088d8

1 file changed

Lines changed: 49 additions & 36 deletions

File tree

debian/README.source

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,50 @@
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>
1413
for a brief description on that.
1514

1615
This document describes the official packaging for debian.org.
17-
Packaging of LinuxCNC for debian.org is split between linuxcnc.git
18-
(in <https://github.com/LinuxCNC/linuxcnc.git>) and linuxcnc-gbp.git
19-
(in <https://github.com/LinuxCNC/linuxcnc-gbp.git>).
16+
Packaging of LinuxCNC for debian.org is split between:
2017

18+
linuxcnc.git (in <https://github.com/LinuxCNC/linuxcnc.git>)::
19+
This is the regular LinuxCNC repository. This already provides instructions
20+
to build a Debian package in the subdirectory "debian/".
21+
Branches for this repository reflect the ongoing developments for LinuxCNC.
22+
linuxcnc-gbp.git (in <https://github.com/LinuxCNC/linuxcnc-gbp.git>)::
23+
This repository has the same content as the release version, just that
24+
branches now describe the release of Debian that the package shall be
25+
used for. In particular, the script debian/configure was already executed.
26+
Default uploads go to Debian unstable, aka "sid", which needs
27+
to be stated in the file debian/changelog. Also the version number of the
28+
uploads to Debian are sligtly different, so that multiple revisions of the
29+
Debian package is possible for the same release of LinuxCNC.
30+
```
31+
$ git branch
32+
* debian/unstable
33+
upstream
34+
```
2135

22-
debian/copyright
23-
----------------
36+
## debian/copyright
2437

2538
Automated tools to check licenses within the source tree will likely find
2639
CC-2.5 referenced. But this refers only to some image files that were
2740
not adopted by the source tree, only the README describing them was
2841
intentionally left unchanged.
2942

3043

31-
Build a new DSC for upload to debian.org
32-
----------------------------------------
44+
## Build a new DSC for upload to debian.org
3345

3446

35-
Make the new orig tarball
36-
~~~~~~~~~~~~~~~~~~~~~~~~~
47+
### Make the new orig tarball
3748

3849
Do this step in `linuxcnc.git`.
3950

@@ -42,18 +53,27 @@ git checkout ${COMMIT} # check out the commit you want
4253
git reset --hard
4354
git clean -fdx .
4455
VERSION=$(head -n1 debian/changelog |cut -f2 -d' ' | tr -d "()" | sed -e 's/^[0-9]://' )
56+
```
57+
If you are not uploading the exact same version of what is in the release tarball,
58+
then also specify the git tag as part of the version:
59+
60+
```
4561
VERSION=$(git log --date=format:%Y%m%d --pretty=${VERSION}+git%cd.%h| head -n1)
62+
```
63+
Inspect the version and create the file VERSION.
64+
```
4665
echo ${VERSION} | tee VERSION
66+
```
67+
68+
We use `--exclude=.git` instead of `--exclude-vcs` because the linuxcnc
69+
git repo uses .gitignore to keep otherwise-empty directories around,
70+
and the build system is too lazy to mkdir them as needed.
4771

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.
72+
```
5173
tar --create --xz --exclude=.git --exclude=.github --transform "flags=r;s|^./|linuxcnc-${VERSION}/|" --file ../debian-packaging/linuxcnc_${VERSION}.orig.tar.xz .
5274
```
5375

54-
55-
Start the new gbp version
56-
~~~~~~~~~~~~~~~~~~~~~~~~~
76+
### Start the new gbp version
5777

5878
Do this step in `linuxcnc-gbp.git`.
5979

@@ -76,13 +96,11 @@ git commit
7696
```
7797

7898

79-
Update the debian/ files
80-
~~~~~~~~~~~~~~~~~~~~~~~~
99+
### Update the debian/ files
81100

82101
Do this step in `linuxcnc-gbp.git`.
83102

84-
Run `debian/configure` in a clean, minimal instance of the distro we're
85-
building for:
103+
Run `debian/configure` in a clean, minimal instance of the distro we're building for:
86104

87105
```
88106
export IMAGE="debian:bookworm"
@@ -111,12 +129,9 @@ Commit all changes to the debian/ directory:
111129
git commit
112130
```
113131

132+
### Test the new debian package
114133

115-
Test the new debian package
116-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
117-
118-
`gbp buildpackage` should work in a minimal installation of the target
119-
distro:
134+
`gbp buildpackage` should work in a minimal installation of the target distro:
120135

121136
```
122137
docker run --rm --interactive --tty --volume ${PWD}:${PWD} --workdir ${PWD} ${IMAGE}
@@ -133,7 +148,7 @@ architecture-independent packages) should also build from scratch in a
133148
clean minimal environment.
134149

135150
(The docker build environment described above is just one option, other
136-
possibilities are cowbuilder, pbuilder, etc etc.)
151+
possibilities are cowbuilder, pbuilder, etc., etc.)
137152

138153
Run lintian to verify the build products:
139154

@@ -143,8 +158,7 @@ lintian -i ../linuxcnc_*.changes
143158
```
144159

145160

146-
Release
147-
~~~~~~~
161+
### Release
148162

149163
```
150164
gbp dch --release
@@ -158,8 +172,7 @@ Build & sign the dsc:
158172
`dpkg-buildpackage --build=source -k${KEY_ID}`
159173

160174

161-
How to contribute
162-
-----------------
175+
## How to contribute
163176

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

0 commit comments

Comments
 (0)