building a rust program into PPA
the journey:
- install deb building tools like debhelpers
- 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
- write a Makefile
- follow the popsicle repo to modify the debian/rules file for rust
- run debuild this should be build success
- register or login a Launchpad account
- register a GPG key for your account, I was using my Github GPG key for this
- modify the debian/changelog from UNRELEASED to the ubuntu code name, my case is focal
- run debuild -S -k to sign the building
- go to upper level folder then run debsign -k .changes to sign the source.changes file
- now facing the ubuntu build server cannot find cargo command
- found out this article that I need to vendor the compiling tools up to launchpad...
- let me cry for a bit... there must be a easy way to do this...
- after reading this article
- I tried to add the Mozilla Security Team PPA as my building dependency
- modify my control file like this to add cargo as build-depends
- dput a new version then the build success!
referenced articles:
- https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html
- https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#makefile-sh
- https://github.com/pop-os/popsicle
- https://www.debian.org/doc/debian-policy/ch-archive.html
- https://github.com/exelearning/iteexe/wiki/How-to-upload-to-Launchpad-PPA-repository-(.deb-packages)