Debian Packaging: From Source to Repository
Changelog and Copyright
A practical Debian packaging course lesson covering changelog and copyright.
Changelog and Copyright
Debian packages carry a version history and licensing information. These are not decorative documents: package managers, maintainers, and users rely on them to understand what changed and under which terms the software may be distributed.
In this lesson, we will create debian/changelog and debian/copyright for Syspeek.
Learning Objectives
- Understand Debian package version syntax.
- Create a valid Debian changelog entry.
- Use
dchto manage changelog updates. - Document copyright and licensing information.
- Understand why licensing details must be accurate.
1. Create the Changelog
From the project root:
1
2
cd ~/packaging-lab/syspeek
nano debian/changelog
Add an initial entry:
1
2
3
4
5
syspeek (0.1.0-1) unstable; urgency=medium
* Initial Debian packaging.
-- Example Maintainer <[email protected]> Thu, 03 Dec 2026 12:00:00 +0000
Replace the example maintainer and timestamp with your actual details. The timestamp must be a valid RFC 2822 date.
The version 0.1.0-1 contains two parts:
0.1.0is the upstream version.1is the Debian revision.
If Debian packaging changes while the upstream software version remains the same, the Debian revision can be incremented, for example from 0.1.0-1 to 0.1.0-2.
2. Use dch Instead of Editing Repeatedly
The dch command from devscripts can create and update changelog entries.
For example:
1
dch --newversion 0.1.1-1 "Prepare the next upstream release"
Review the generated entry before committing or building. dch uses your configured maintainer identity and current date.
Inspect the parsed changelog:
1
dpkg-parsechangelog
This command should report the source name, version, distribution, and urgency.
3. Create the Copyright File
Debian source packages document copyright and licensing in debian/copyright. The commonly used machine-readable format is DEP-5.
Create the file:
1
nano debian/copyright
Use this template only after verifying that the statements match the actual source and author information:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Syspeek
Source: https://example.com/syspeek
Files: *
Copyright: 2026 Example Author
License: MIT
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files, to deal in the Software
without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
This example assumes you choose the MIT license and own or are authorized to license the code under it. Do not copy the license declaration blindly if your project uses different terms.
If files have different copyright holders or licenses, add separate Files paragraphs.
4. Why Accuracy Matters
A package maintainer must not guess about:
- Copyright holders.
- Years of copyright.
- License identifiers.
- License text.
- The origin of bundled third-party code.
Review the actual source files and any third-party components. Debian’s copyright format is designed to make this information easier to inspect automatically.
5. Inspect the Metadata
Run:
1
dpkg-parsechangelog
Then inspect the files:
1
2
cat debian/changelog
cat debian/copyright
Later, we will use lintian to check the resulting source and binary packages for common packaging issues.
6. What We Learned
The changelog records Debian package versions and changes. The copyright file documents the origin and licensing of the source files.
Both are required parts of a well-maintained Debian source package.
Exercises
- Change the Debian revision and explain what it represents.
- Add a second changelog bullet.
- Review the license of every source file in your project.
- Read the DEP-5 specification and identify how it represents files with different licenses.
What’s Next?
We have described the package and documented its history and license. Next, we will write debian/rules, the build script that connects our source code to debhelper.
Next: Rules and debhelper