File: README.source

package info (click to toggle)
linuxcnc 1%3A2.9.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 282,780 kB
  • sloc: python: 201,110; ansic: 106,370; cpp: 99,219; tcl: 16,054; xml: 10,617; sh: 10,258; makefile: 1,251; javascript: 138; sql: 72; asm: 15
file content (178 lines) | stat: -rw-r--r-- 5,143 bytes parent folder | download | duplicates (2)
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
# Debian packaging of LinuxCNC

## Introduction

LinuxCNC is packaged in two different ways:

 1. a simple way for the builds on the LinxuCNC buildbot
    CI system (<http://buildbot.linuxcnc.org>), and
 2. a different (more complicated) way for official debian.org packages.

Packaging by the LinuxCNC CI system is not covered in this document, see
<http://linuxcnc.org/docs/devel/html/code/building-linuxcnc.html#_building_debian_packages>
for a brief description on that.

This document describes the official packaging for debian.org.
Packaging of LinuxCNC for debian.org is split between:

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

## debian/copyright

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


## Build a new DSC for upload to debian.org


### Make the new orig tarball

Do this step in `linuxcnc.git`.

```
git checkout ${COMMIT}  # check out the commit you want
git reset --hard
git clean -fdx .
VERSION=$(head -n1 debian/changelog |cut -f2 -d' ' | tr -d "()" | sed -e 's/^[0-9]://' )
```
If you are not uploading the exact same version of what is in the release tarball,
then also specify the git tag as part of the version:

```
VERSION=$(git log --date=format:%Y%m%d --pretty=${VERSION}+git%cd.%h| head -n1)
```
Inspect the version and create the file VERSION.
```
echo ${VERSION} | tee VERSION
```

We use `--exclude=.git` instead of `--exclude-vcs` because the linuxcnc
git repo uses .gitignore to keep otherwise-empty directories around,
and the build system is too lazy to mkdir them as needed.

```
tar --create --xz --exclude=.git --exclude=.github --transform "flags=r;s|^./|linuxcnc-${VERSION}/|" --file ../debian-packaging/linuxcnc_${VERSION}.orig.tar.xz .
```

### Start the new gbp version

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

Import the new orig tarball into gbp `upstream` branch, but *don't*
let gbp auto-merge it into `debian/unstable`.

```
git fetch

git checkout upstream
git merge --ff-only origin/upstream

git checkout debian/unstable
git merge --ff-only origin/debian/unstable

gbp import-orig --no-merge ../linuxcnc_${VERSION}.orig.tar.xz
git merge --no-commit upstream
# verify contents of debian/*, especially changelog
git commit
```


### Update the debian/ files

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

Run `debian/configure` in a clean, minimal instance of the distro we're building for:

```
export IMAGE="debian:bookworm"
docker pull ${IMAGE}
docker run --rm --interactive --tty --volume ${PWD}:${PWD} --workdir ${PWD} ${IMAGE}
apt-get --quiet update
apt-get --quiet --yes install --no-install-recommends --no-install-suggests \
    git \
    lsb-release \
    python3
debian/configure
exit
```

Update d/changelog (preserve entries from previous debs), include "New
upstream version", close any fixed bugs:

```
gbp dch
dch -e
```

Commit all changes to the debian/ directory:

```
git commit
```

### Test the new debian package

`gbp buildpackage` should work in a minimal installation of the target distro:

```
docker run --rm --interactive --tty --volume ${PWD}:${PWD} --workdir ${PWD} ${IMAGE}
apt-get --quiet update
apt-get --quiet --yes install --no-install-recommends --no-install-suggests git-buildpackage
apt-get --quiet --yes build-dep .
gbp buildpackage --build=full --no-sign
```

In addition to `--build=full` (build source, architecture-specific,
and architecture-independent packages), `--build=any`
(build architecture-specific packages) and `--build=all` (build
architecture-independent packages) should also build from scratch in a
clean minimal environment.

(The docker build environment described above is just one option, other
possibilities are cowbuilder, pbuilder, etc., etc.)

Run lintian to verify the build products:

```
apt-get --quiet --yes install lintian
lintian -i ../linuxcnc_*.changes
```


### Release

```
gbp dch --release
gbp tag

git push --tags origin debian/unstable upstream
```

Build & sign the dsc:

`dpkg-buildpackage --build=source -k${KEY_ID}`


## How to contribute

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