Commit Graph

7 Commits

Author SHA1 Message Date
Clayton Craft
93333dbb25 pkgs/archive: fix linting 2021-08-10 19:13:32 -07:00
Clayton Craft
a381516e53 rename project to postmarketos-mkinitfs
To help prevent any confusion about which distro this 'mkinitfs' is
intended for
2021-08-10 14:03:34 -07:00
Clayton Craft
f0bf13c9f2 pkg/archive/Write: implement writing of archive with verification
This adds several steps to the "write" action, by writing it to a temp
location, extracting it, checksumming it, copying to destination,
verifying checksum, and using Rename to atomically replace any existing
file in the destination.
2021-08-10 13:23:56 -07:00
Clayton Craft
1716445e9d pkg/archive: drop renameio dependency
renameio basically just does: Sync(), Close(), Rename(). This will be
done here instead of using an external dependency
2021-08-10 13:22:22 -07:00
Clayton Craft
2633f0bde9 pkg/archive: add function to extract archive
This will be used to test archive integrity by extracting it
2021-08-10 13:21:42 -07:00
Clayton Craft
766da6a0dc pkg/archive: add function for checksumming a file
This uses sha256 which, after benchmarking, doesn't seem to be any
faster or slower than sha1. md5 was surprisingly slower (on aarch64),
maybe because there are some CPU accelerated things in sha* ?
2021-08-10 13:19:26 -07:00
Clayton Craft
64195a5f83 initial commit 2021-08-09 15:23:39 -07:00