cd79a4fccf
make file list sorting more robust
...
If entries are sorted by length and some have the same length, sort
them asciibetically.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-17 16:30:01 +02:00
eadeee25d9
pkg2sqfs: move some functions to more approrpiate places
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-17 16:30:01 +02:00
025ab1007b
pkg2sqfs: Add command line options for default inode settings
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-17 16:29:59 +02:00
db25ddc108
pkg2sqfs: always padd image file to device block size
...
The kernel implementation apparently requires that.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-17 16:29:22 +02:00
858779e42c
Add pkg2sqfs utility stub
...
The goal is to transform a package file to a squashfs image. The mksquashfs
utility is a PITA with all kinds of idiotic not-thought-through corner
cases (e.g. the way "pseudo file definitions" have been tacked on, the
inabillity to set UID/GID for / *AND* have files not owned by root, the
way xattrs are handled, .....).
It would be preferable to fix mksquashfs itself, but the source code itself
is a horrid, unmaintained garbage pile. Its easier to write a small utility
instead that can turn a pkg file into a squashfs image in a way that
propperly treats file permissions and ownership, and is deterministic
(i.e. reproducable).
The utility currently generates an uncompressed squashfs image that
unsquashfs can unpack, but the kernel refuses the mount. The exact
problem still needs to be determined.
Furthermore, compression has to be implemented and some cleanup shoul
be done.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-17 01:33:57 +02:00
c78dc2255f
pkg reader: try to read *entire* requested chunk
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-09 16:02:31 +02:00
aa6bbf2ef4
Move pkg-tool internal headers out of global include directory
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-05 12:36:47 +02:00
6cfd9a37bf
Move all the package I/O code to libpkg library
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-05 12:33:50 +02:00
1205ca0f3b
Move compressors to utility library
...
- Remove compressor registration interface. Doesn't work in a static
library, since all the files containing no exported members are
optimized away at link time.
- Repack as seperate utility library.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-05 12:22:47 +02:00
63bad9786a
Release version 0.3
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-31 13:39:21 +02:00
4d48e374d8
Add option to buildstrategy to produce a dot graph
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-30 23:40:19 +01:00
52f7bdc5c8
minor cleanup
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-30 18:31:40 +01:00
b7e81c081b
cleanup: split package provider code out of buildstrategy.c
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-30 18:20:33 +01:00
46f340b20f
cleanup: split source package code out of buildstrategy.c
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-30 17:57:34 +01:00
8a52ea6717
Allow multiple source packages to provide the same binary package
...
In build strategy, record a linked list of providers instead of just
one per binary package. Add an option to scan a preference list in
addition.
When looking up the provider and there is more than one, choose the
preferred one. Produce an error if none is given.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 23:55:12 +01:00
b2f1b5ef58
cleanup: buildstrategy
...
Split utility function to get a source package by name out from
handle provides.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 21:57:48 +01:00
48d74777e7
Fix buildstrategy command argument handlin
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 21:54:08 +01:00
680b1bb7f9
Bump version number
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 15:25:34 +01:00
db6c2118c4
Add missing colon to optarg listing flag
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 15:25:34 +01:00
19e2f8aa8c
Fix file list removal of input line
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 14:57:59 +01:00
bba2e4c536
Update e-mail address
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 14:00:19 +01:00
d71366bbdd
Distribute LICENSE and README.md with source packages
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 13:52:22 +01:00
e3edcea895
Add missing options to install documentation
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 13:51:44 +01:00
88f4dd00d7
Add README file
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 13:51:33 +01:00
1a84276bf6
Add writeup on package file structure
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 12:31:16 +01:00
f11c9df330
Add a pkg command for producing a dependency graph
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 00:56:32 +01:00
90667fbf8a
Move dependency graph handling out of install command
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 00:23:06 +01:00
f038cc52b3
cleanup: merge listing & format flags for dump and install commands
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 23:53:30 +01:00
20aea96396
Add license
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 18:18:31 +01:00
4a682b83f1
cleanup: reimplement process_file using foreach_line_in_file
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 17:32:59 +01:00
b688a39149
cleanup: move input file open/close into process_file function
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 17:32:59 +01:00
f7e4aec2ea
Add utility function to iterate over lines in a file
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 17:32:59 +01:00
af7c6f09df
Add buildstrategy command
...
Basically an improved port of the makeshift depgraph from the pygos build
system.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 00:39:05 +01:00
6dd9ae94bd
Add simple hash table implementation
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 00:28:41 +01:00
00c8946497
pack: deduce package name from input file name
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-07 15:17:19 +01:00
55b2d2f0c0
Allow '+' characters in package names
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-01 09:58:44 +01:00
82c888bcbf
install: make sure package dependencies have no trivial cycles
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-21 15:11:32 +01:00
98b655f133
Cleanup: split sort_by_dependencies function up
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-21 15:04:27 +01:00
f2627b8933
Add option to forcefully overwrite packages in pack command
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-15 09:05:12 +01:00
4141e666b6
Move file compressors details from command line to desc file instead
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-08 11:20:12 +01:00
95c7302d25
Allow empty packages, i.e. packages not containing any files
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-08 11:20:12 +01:00
d55ee9bd72
Add a toc format that is also valid input for pkg pack
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 18:52:11 +01:00
27c802fed0
Cleanup/fix order of toc entries
...
- Make sure we always sort the list when reading it from a package
- Cleanup and clarify order of elements
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 18:08:32 +01:00
16bf7172fe
Add support for device special files in packages
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 17:57:10 +01:00
6f32c6b883
Add flag to surpress creation of symlinks when unpacking
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 16:26:47 +01:00
deb7bb0d4e
Cleanup automakefile structure
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 15:51:55 +01:00
6a80140c59
Move abstract file list handling code to seperate utility library
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 15:39:43 +01:00
4d8b8f52d5
Split utility code up into translation-unit per function
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 15:29:16 +01:00
16f3e4d97c
Move utility source code to libuitil.a
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 15:26:31 +01:00
618aaf4278
Make sure toc printers and IDs are propperly assigned
...
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-02-04 15:12:06 +01:00