pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

README (1914B)


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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# pm

A pack manager.

## usage
`pm` has only a few commands in order to keep it simple to use:

	pm [-adfiuv] [packs..]

	# delete packs
	pm -d pack [pack..]

	# update packs
	pm -u pack#0.1.tar.bz2 [pack..]

	# list installed packs
	pm -i

	# list files installed by a pack
	pm -i pack

## pack format
Packs are simple bzip2 compressed tarballs files meant to be extracted to your
$ROOT. Once extracted, the list of files installed (relative to your $ROOT will
be written to a file in your $META directory, under a subdirectory named after
your pack.

	$ ROOT=/ns/pm/rootfs
	$ META=$ROOT/metadata
	$ export ROOT META
	$ pm -a ./pack#0.0.tar.bz2
	$ tree $ROOT
	/ns/pm/rootfs
	|-- bin
	|   `-- pack
	|-- metadata
	|   `-- pack
	|       |-- files
	|       `-- version
	`-- share
	    `-- man
		`-- man1
		    `-- pack.1

The name of a pack should be constructed as follow:

	${NAME}${SEPARATOR}${VERSION}${EXTENSTION}

NAME:       name of the pack
VERSION:    version of the pack
SEPARATOR:  a unique char within the whole pack name
EXTENSTION: whichever extenstion you want

The format used by default is pack#version.tar.bz2
As example, the following pack names are valid:

* pack:0.0-1.tar.bz2
* pack#0.0-1.pkg
* pack,0.0-1:pack
* pack_0.0-1.tar.bz2

On the other side, the following are NOT valid:

* pack-0.0-1.tar.bz2
* pack.0.0-1.pkg
* pack_name_0.0.tar.bz2
* pack#0.0-1#tar.bz2


## goals
0. install
	0.0 recall installed files
	0.1 NEVER overwrite an existing file
	0.2 Multiple archive format?

1. update
	1.0 check versions from a local file
	1.1 check for (st_ctime - st_mtime) == 0
	1.2 remove unneeded file

2. remove
	2.0 remove directories left empty

3. inspect
	3.0 inspect system for installed packs
	3.1 inspect files installed by a pack

4. metadata
	4.0 store pack versions
	4.1 store installed files

## license
This software is licensed under the ISC license, see the LICENSE file provided.