/deb-rust-hello

building a rust program into PPA

Primary LanguageMakefileMIT LicenseMIT

deb-rust-hello

building a rust program into PPA

the journey:

  1. install deb building tools like debhelpers
  2. using debmake to scaffold the project, need to build a deb-rust-hello.tar compression file in the previous folder, the debmake error will tells you how, then simply run debmake
  3. write a Makefile
  4. follow the popsicle repo to modify the debian/rules file for rust
  5. run debuild this should be build success
  6. register or login a Launchpad account
  7. register a GPG key for your account, I was using my Github GPG key for this
  8. modify the debian/changelog from UNRELEASED to the ubuntu code name, my case is focal
  9. run debuild -S -k to sign the building
  10. go to upper level folder then run debsign -k .changes to sign the source.changes file
  11. now facing the ubuntu build server cannot find cargo command
  12. found out this article that I need to vendor the compiling tools up to launchpad...
  13. let me cry for a bit... there must be a easy way to do this...
  14. after reading this article
  15. I tried to add the Mozilla Security Team PPA as my building dependency
  16. modify my control file like this to add cargo as build-depends
  17. dput a new version then the build success!

referenced articles:

  1. https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html
  2. https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#makefile-sh
  3. https://github.com/pop-os/popsicle
  4. https://www.debian.org/doc/debian-policy/ch-archive.html
  5. https://github.com/exelearning/iteexe/wiki/How-to-upload-to-Launchpad-PPA-repository-(.deb-packages)