Fast preparation of a source-only upload for Debian

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.

  1. Extract the software into a certain directory, let’s say foobar/.
  2. 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.
  3. cd foobar/
  4. dpkg-source -b .
  5. (cd ..; debsign ./*.dsc -k<YOUR_GPG_KEY_FINGERPRINT>)
  6. dpkg-genchanges -S > ../<PKGNAME>_<PKGVER>.changes
  7. cd ..; debsign ./*.changes -k<YOUR_GPG_KEY_FINGERPRINT>

All done. You may now upload the source package with dput tool.

hosiet

一个学生。May be neither too young nor simple, but sometimes can be naive.

One thought to “Fast preparation of a source-only upload for Debian”

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据