Let’s assume that you find the source code of a software for Debian with a debian/ directory included. How to prepare the .dsc package (Debian source package) used for upload quickly? I will show you here.
- Extract the software into a certain directory, let’s say foobar/.
- Repack original tarball and exclude debian/ dir using
tar
. Rename orig tarball as<PKGNAME>_<PKGVER>.orig.tar.{bz2,gz,lzma,xz}
. Note that if your package is Debian native, you should skip this step. cd foobar/
dpkg-source -b .
(cd ..; debsign ./*.dsc -k<YOUR_GPG_KEY_FINGERPRINT>)
dpkg-genchanges -S > ../<PKGNAME>_<PKGVER>.changes
cd ..; debsign ./*.changes -k<YOUR_GPG_KEY_FINGERPRINT>
All done. You may now upload the source package with dput
tool.
One thought to “Fast preparation of a source-only upload for Debian”