Added readme
This commit is contained in:
1 parent
a942b1c23f
commit
5cc1aa52bf
1 file changed
+65
@@ -0,0 +1,65 @@
|
|||||||
|
# deb-notifier
|
||||||
|
|
||||||
|
Debian package for the [Linux notifier app](https://git.gansejunge.com/notifier/frontend-app-linux).
|
||||||
|
This repository contains no application code, only the packaging and the CI that builds and
|
||||||
|
publishes the `.deb`.
|
||||||
|
|
||||||
|
## How a release happens
|
||||||
|
|
||||||
|
```
|
||||||
|
tag vX.Y.Z in frontend-app-linux
|
||||||
|
-> .gitea/workflows/trigger-deb.yaml (dispatches the workflow below)
|
||||||
|
-> .gitea/workflows/notifier-release.yaml in this repo
|
||||||
|
1. downloads the source archive of the tag
|
||||||
|
2. make -> build/notifier_X.Y.Z-1_all.deb
|
||||||
|
3. uploads it to the Gitea Debian registry
|
||||||
|
```
|
||||||
|
|
||||||
|
To release a new app version, tag it in `frontend-app-linux` (`git tag v1.0.1 && git push --tags`).
|
||||||
|
Nothing needs to be done here.
|
||||||
|
|
||||||
|
To rebuild a version without a new tag (for example after changing the packaging), run the
|
||||||
|
**notifier-release** workflow manually from the Actions tab and increase `revision`.
|
||||||
|
The registry rejects a version/revision pair that already exists (HTTP 409).
|
||||||
|
|
||||||
|
## Repository layout
|
||||||
|
|
||||||
|
```
|
||||||
|
Makefile
|
||||||
|
pkg/
|
||||||
|
DEBIAN/
|
||||||
|
control Version: @VERSION@ is replaced at build time, do not hardcode it
|
||||||
|
postinst enables the user service for all users
|
||||||
|
prerm disables it again on removal
|
||||||
|
usr/
|
||||||
|
bin/notifier wrapper that starts the app
|
||||||
|
lib/systemd/user/notifier.service systemd user unit
|
||||||
|
```
|
||||||
|
|
||||||
|
The Python files are not stored here. The Makefile copies them from the source checkout
|
||||||
|
into `usr/lib/notifier/` inside a staging directory.
|
||||||
|
|
||||||
|
## Build locally
|
||||||
|
|
||||||
|
Needs `make` and `dpkg-deb`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make VERSION=0.0.1 SRC_DIR=../frontend-app-linux/src
|
||||||
|
dpkg-deb -I build/notifier_0.0.1-1_all.deb # control file
|
||||||
|
dpkg-deb -c build/notifier_0.0.1-1_all.deb # file list
|
||||||
|
sudo apt install ./build/notifier_0.0.1-1_all.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
| Variable | Default | Purpose |
|
||||||
|
|---|---|---|
|
||||||
|
| `VERSION` | none, required | App version without the `v` |
|
||||||
|
| `REVISION` | `1` | Packaging revision |
|
||||||
|
| `SRC_DIR` | `src` | Folder containing the Python files |
|
||||||
|
| `SRC_FILES` | the seven modules | Files copied into the package. Add new modules here |
|
||||||
|
|
||||||
|
`make clean` removes `build/`.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- **Upload returns 409**: that version and revision are already published. Bump `revision` or use a new tag.
|
||||||
|
- **New Python module is missing from the package**: add it to `SRC_FILES` in the Makefile.
|
||||||
Reference in new issue
Block a user