Yavsc.PostIt Debian packaging
  • Shell 58%
  • Makefile 42%
Find a file
Lum 7f57952a92 postit-debian: support POSTIT_GIT_TAG as a tag (not just a branch)
The previous override_dh_auto_build used 'git clone --branch <tag>'
which only accepts branch names. Feeding it 1.0.1-rc02 (a tag,
not yet pushed to origin) failed with 'La branche distante
1.0.1-rc02 n'a pas ete trouvee' and aborted the package build.

Switch to a 'git init + remote add + fetch --depth=1 origin <ref>
+ checkout FETCH_HEAD' sequence, which works for both branches
and tags, including local-only tags fetched via file:// (the
typical RC-staging workflow: 'git tag' on the local checkout,
then 'make POSTIT_GIT_URL=file:///... POSTIT_GIT_TAG=<tag>'
before pushing).

The fetch error now carries a diagnostic that points the operator
at the file:// override and at the missing 'git push'.

Adds tests/test-fetch-upstream.sh with four cases against the
real pazof/yavsc remote and a synthetic local repo: tag on
GitHub, branch on GitHub, .git reuse, and tag via file://.
Wired into 'make test'.
2026-06-28 13:47:15 +01:00
debian postit-debian: support POSTIT_GIT_TAG as a tag (not just a branch) 2026-06-28 13:47:15 +01:00
tests postit-debian: support POSTIT_GIT_TAG as a tag (not just a branch) 2026-06-28 13:47:15 +01:00
.gitignore packaging: derive Debian version from POSTIT_GIT_TAG via a changelog template 2026-06-28 13:20:17 +01:00
Makefile postit-debian: support POSTIT_GIT_TAG as a tag (not just a branch) 2026-06-28 13:47:15 +01:00
README.md debian+makefile: expose POSTIT_RUNTIME override for arm64 builds 2026-06-28 00:51:14 +01:00

postit-debian

Paquet Debian pour PostIt.Desktop, le client desktop Avalonia de la plateforme Yavsc.Org.

Le paquet expose la commande postit sur le système, installe l'entrée .desktop dans le menu, et enregistre le scheme URI postit:// comme MIME handler (utilisé par l'OIDC Authorization Code + PKCE pour le hand-off du callback — RFC 8252 §7.1).

Cible : Debian 13 (trixie). Testé également sur Ubuntu 24.04 LTS (equivalent ABI).

Construction

Pré-requis :

sudo apt install build-essential debhelper imagemagick librsvg2-bin \
    dotnet-sdk-10.0 git

Sur Debian 13, installer .NET 10 depuis le dépôt officiel Microsoft :

wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb \
    -O /tmp/ms-prod.deb
sudo dpkg -i /tmp/ms-prod.deb
sudo apt update
sudo apt install dotnet-sdk-10.0

Puis :

make deb

Le .deb atterrit dans le répertoire parent (ou $POSTIT_OUT_DIR).

Pour bumper la version amont sans modifier ce dépôt :

make deb POSTIT_GIT_TAG=1.0.1
make deb POSTIT_GIT_URL=https://github.com/fork/yavsc.git POSTIT_GIT_TAG=my-branch

Installation

sudo apt install ./postit_1.0.0-1_amd64.deb

ou directement :

sudo dpkg -i postit_1.0.0-1_amd64.deb
sudo apt -f install     # résout les dépendances manquantes

Pour installer sur arm64 :

# Sur une machine arm64 :
make clean && make deb   # le .deb sera _arm64.deb

Le debian/rules publie avec --runtime linux-x64 pour amd64. Pour produire un .deb arm64, override :

make deb POSTIT_RUNTIME=linux-arm64

(le paramètre est exposé par debian/rules ; bump à ajouter si besoin). À noter : un seul runtime par build — le --runtime exclut les autres plateformes, donc le .deb est portable mais mono-architecture.

Vérification

Après installation :

$ which postit
/usr/bin/postit
$ postit --help          # (l'application Avalonia ouvre sa fenêtre)
$ xdg-mime query default x-scheme-handler/postit
postit.desktop
$ xdg-open postit://callback?code=test

Le scheme handler lance PostIt avec l'URL en argument. En interne, PostIt (PostIt.Desktop) appelle SingleInstance.TryHandOffAsync puis sort, transferrant l'URL au process PostIt déjà actif via un named pipe.

Désinstallation

sudo apt remove postit

Le postrm du paquet rafraîchit la base .desktop. Le scheme handler postit:// n'est pas explicitement désenregistré (système — par utilisateur c'est xdg-mime default ...).

Maintenance

  • Bumper debian/changelog à chaque release, conformément à la Debian Policy §4.4 (entries datées, signées par le mainteneur).
  • Mettre à jour POSTIT_GIT_TAG par défaut dans debian/rules et Makefile à chaque release amont.
  • Rebuild après changement de licence amont.

Liens