feat: add bread-sync module for snapshot and restore functionality
- Introduced `bread-sync` module with core functionalities for syncing system state via Git. - Implemented `MachineProfile` struct for managing machine profiles, including methods for reading and writing profiles. - Added package management support with snapshot capabilities for `pacman`, `pip`, `npm`, and `cargo`. - Created comprehensive tests for sync operations, package parsing, and machine profile management. - Enhanced `udev` adapter to include vendor and product IDs for scanned devices. - Updated state engine to handle module clearing commands. - Introduced Lua integration for accessing machine information and file system operations. - Improved packaging documentation for Arch Linux and systemd service setup.
This commit is contained in:
parent
251c586b6f
commit
364a35142e
25 changed files with 3930 additions and 92 deletions
|
|
@ -1,5 +1,47 @@
|
|||
Packaging notes
|
||||
================
|
||||
Packaging
|
||||
=========
|
||||
|
||||
This repo targets Arch packaging. The Arch PKGBUILD skeleton lives under
|
||||
`packaging/arch/`.
|
||||
This directory contains distribution packaging for Bread.
|
||||
|
||||
```
|
||||
packaging/
|
||||
├── arch/
|
||||
│ └── PKGBUILD ← Arch Linux package build script
|
||||
└── systemd/
|
||||
└── breadd.service ← systemd user service unit
|
||||
```
|
||||
|
||||
## Arch Linux
|
||||
|
||||
```bash
|
||||
cd packaging/arch
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
The PKGBUILD builds both `breadd` and `bread` from source and installs them to `/usr/bin`. It also installs the systemd user service unit to `/usr/lib/systemd/user/`.
|
||||
|
||||
Before publishing to the AUR, update `pkgver`, `source`, and `sha256sums` to point at a tagged release tarball.
|
||||
|
||||
## systemd user service
|
||||
|
||||
The service unit starts `breadd` as a user service after the graphical session is available.
|
||||
|
||||
```bash
|
||||
# Install and enable manually (if not using the PKGBUILD)
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp systemd/breadd.service ~/.config/systemd/user/
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now breadd
|
||||
|
||||
# Check status
|
||||
systemctl --user status breadd
|
||||
journalctl --user -u breadd -f
|
||||
```
|
||||
|
||||
The service sets `RUST_LOG=info` by default. To increase verbosity, override it in a drop-in:
|
||||
|
||||
```ini
|
||||
# ~/.config/systemd/user/breadd.service.d/debug.conf
|
||||
[Service]
|
||||
Environment=RUST_LOG=debug
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,9 +1,29 @@
|
|||
Arch packaging
|
||||
==============
|
||||
|
||||
This is a minimal PKGBUILD skeleton.
|
||||
`PKGBUILD` builds and installs both `breadd` and `bread` from source.
|
||||
|
||||
Steps to use:
|
||||
- Update `pkgver`, `source`, `sha256sums`, and `url`.
|
||||
- Set the correct license and dependencies.
|
||||
- Ensure the release tarball includes `packaging/systemd/breadd.service`.
|
||||
## Local build
|
||||
|
||||
```bash
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
## Before publishing to AUR
|
||||
|
||||
1. Tag a release on GitHub.
|
||||
2. Update `pkgver` to match the tag.
|
||||
3. Update `source` to the release tarball URL.
|
||||
4. Run `updpkgsums` (or manually set `sha256sums`).
|
||||
5. Update `url` if the repository has moved.
|
||||
6. Set `depends` accurately — at minimum: `glibc`. Add `udev` and `libgit2` if not linking statically.
|
||||
|
||||
## Runtime dependencies
|
||||
|
||||
| Package | Required | Notes |
|
||||
|---------|----------|-------|
|
||||
| `glibc` | yes | always |
|
||||
| `udev` | yes | device events |
|
||||
| `dbus` | optional | UPower battery events |
|
||||
| `libnotify` | optional | `bread.notify()` (uses `notify-send`) |
|
||||
| `git` | optional | `bread sync` push/pull |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue