A VSCode devcontainer setup for Debian/Ubuntu packaging.
If WSL is used, make sure gpg works.
echo "test" | gpg --clearsign
https://www.39digits.com/signed-git-commits-on-wsl2-using-visual-studio-code
- create
.envrc
, replace the values as appropriateexport DEBEMAIL='andy@onthewings.net' export DEBFULLNAME='Andy Li'
mk-sbuild unstable
git config --global --add safe.directory '*'
to avoidgit
/gbp
triggeringfatal: detected dubious ownership in repository
sudo sbuild-update unstable
sudo sbuild-update --upgrade unstable
-
cd projects
-
git clone git@github.com:HaxeFoundation/haxe-debian.git
-
cd haxe-debian
-
update
debian/changelog
withdch
, particularly the new version string1:x.x.x-1
-
get source archive
./debian/rules get-orig-source
for new versions -
git stash
to store the changelog change, keep the git status clean forgbp
-
make sure there is a local
upstream
branch and it's up-to-date -
gbp import-orig ../haxe_*.orig.tar.gz
-
git stash pop
-
modify files under
debian
as needed -
sbuild .
-
when everything is fine, build and sign the package with
sbuild . -k $KEYFINGERPRING
, where the 40-character$KEYFINGERPRING
can be found bygpg --list-keys
-
dput ../haxe_*_source.changes
-
git commit
,git tag debian/...
,git push --all
,git push --tags
-
cd projects
-
git clone git@salsa.debian.org:ocaml-team/$LIBNAME.git
-
cd $LIBNAME
-
uscan
to get source archive -
gbp import-orig --pristine-tar ../$LIBNAME_*.orig.tar.gz
-
modify files under
debian
as needed -
sbuild .
-
when everything is fine, build and sign the package with
sbuild . -k $KEYFINGERPRING
, where the 40-character$KEYFINGERPRING
can be found bygpg --list-keys
-
dput ../$LIBNAME_*_source.changes
-
git commit
,git tag debian/...
,git push --all
,git push --tags
Similar to the above, but download source archive haxe_*.orig.tar.gz
from https://deb.debian.org/debian/pool/main/h/haxe/
gbp export-orig
can also generate the source archive from git repo.
https://wiki.debian.org/UsingQuilt
https://manpages.debian.org/unstable/ubuntu-dev-tools/backportpackage.1.en.html
# $SOURCE and $DEST should be release code names
# Debian: https://www.debian.org/releases/
# Ubuntu: https://wiki.ubuntu.com/Releases
export SOURCE=unstable
export DEST=jammy
# $PPA should be a host name defined in .devcontainer/dput.cf
export PPA=onthewings-ocaml
# edit .devcontainer/.sbuildrc if needed:
# - set $extra_repositories to use ubuntu backports and/or PPA
# - set $force_orig_source = 1 if it's a new version
mk-sbuild $DEST
backportpackage --source=$SOURCE --destination=$DEST --release-pocket --build --upload=$PPA