blob: 5282069b15d30df25cbee635f18120b15e7bad28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# SNAGGLE Package Manager (snag)
## Useful Subcommands
install/inst - install the specified package(s) (default)
remove - uninstall the specified package(s)
update/up - update the package database
find/search - list packages whose metadata matches specified search string (flag to limit to installed)
info/desc - describe the metadata (and install data) of the specified package(s)
log - open your pager to the build log of the specified package
files - list the installed files of the specified package(s)
why - list why this package is installed (manually installed, as a dependency, from a group)
## Important Directories
Package Database - /var/snag/pkgs/
Install Database - /var/snag/installs/
Source Database - /var/snag/sources/
Logs/In Progress Builds - /var/snag/builds/
SNAG Configuration - /etc/snag/
## Terminology
Package Database - the directory containing package descriptions
Package Description - the directory and script containing build instructions for a package
Package Info/Metadata - the metadata encoded in the package description
Package Attribute - a single key value property of the package info
Install Database - the directory containing information on installed package
Install Description - the data stored about a package in the install database
Source Database - the directory where package sources are stored and cached
## Interesting Features
- switch between cli and tui mode mid run
- build packages that aren't in the database
## Package Database and Description Format
Each package has a directory in the package database, named by its `id`.
Inside each package directory is the description script named `{id}.sh`
The description script can contain functions for `unpack`, `configure`, `build`, and `install`
The description script should define variables for attributes with the name `pkg_{attr}`
Packages have the following attributes:
id - the identifier name of the package. everything uses this
name - the display name of package (no spaces allowed)
desc - the short description of the package
webpage - url to home website
license - spdx identifer for package license (https://spdx.org/licenses/)
version - software version, in whatever format is needed. commit hashes are allowed
### Snag Shell API
Probably just sent over a pipe with response sent over another pipe.
## Source Database
TBD
## Build Database
Each build iteration gets its own directory in the build database, named "id-version-time".
A symlink named "id-latest" will point to the newest build for that package.
The build iteration directory contains:
- the package source trees (if applicable)
- a copy of the package description directory
- the build logs
- an executable script to rebuild
## Install Database and Description Format
TBD. Will contain at least:
- date installed
- flists
- install reason
- link to the build iteration directory
## Developer Subcommands
`validate` - check a package description and check for format errors or warnings
https://www.labri.fr/perso/nrougier/GTD/index.html#orgfb65d8f
|