Commit Graph

104 Commits

Author SHA1 Message Date
Nathan Fisher 150b728172 Merge branch 'odin' of codeberg.org:jeang3nie/hpk into odin 2023-07-08 18:42:27 -04:00
Nathan Fisher 3e65c13a5b Add `Extended` to version enum 2023-07-08 18:40:06 -04:00
Nathan Fisher 35dfc99176 Make it possible to compile on FreeBSD by conditionally using
std::os::<linux,freebsd>::fs::MetadataExt. Not intending to use hpk on
FreeBSD but this enables development from either platform
2023-06-24 10:18:48 -04:00
Nathan Fisher 6ca276c125 Update bootstrap 2023-05-07 22:05:57 -04:00
Nathan Fisher af41d1c006 Fix bug introduced revolving around the ustar `prefix` field. GNU tar
was not giving the full path to each file and ignoring the `prefix`
field. On investigation, the field is only to be used if the filename
is longer than 100 bytes. Since the library code had been simplified to
always use the prefix field this caused all filenames shorter than 100
bytes to fail.

Also updated `package-bootstrap` to the latest patch release, which has
a fix for completions being installed into the base directory rather
than the appropriate subdirectory.
2023-05-05 19:07:44 -04:00
Nathan Fisher ccf6d5301a Add shells hook 2023-04-29 23:40:17 -04:00
Nathan Fisher 5544418184 Add LICENSE file 2023-04-26 07:53:16 -04:00
Nathan Fisher 823ae06e2e Rethink Hooks as a struct 2023-04-26 07:48:05 -04:00
Nathan Fisher 1d595e0f1e Add `push` method for Cleanup struct, slightly simplifying code in the
installer
2023-04-19 07:35:38 -04:00
Nathan Fisher bd5090069d Add `Cleanup` struct to run all hooks 2023-04-19 00:43:36 -04:00
Nathan Fisher 641eff3378 Fix some clippy lints 2023-04-18 17:48:40 -04:00
Nathan Fisher 6037836f6b Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/hpk into odin 2023-04-17 00:29:37 -04:00
Nathan Fisher 13a97ff1d8 Adjust package installer to take &mut hooks as a parameter, which will
be passed to each package is it is installed with all hooks being run
after all packages have finished installation. Also fix some ordering
issues with package installation so that post install scripts and
appstream data are not included in the number of archive members for the
sake of progress bars, etc.
2023-04-16 19:15:12 -04:00
Nathan Fisher 1e7a02e33d Moved hpk-package all the way back into tree, fixed some clippy lints 2023-04-16 10:36:43 -04:00
Nathan Fisher b1fcbd1f9f Merge hpk-package back in 2023-04-16 09:59:04 -04:00
Nathan Fisher f479dd28ad Add `install_local` function to cli app 2023-04-15 01:21:12 -04:00
Nathan Fisher 7fe884cd3e Add method to create an Installer struct from an archive path 2023-04-14 01:03:52 -04:00
Nathan Fisher c36b3b14ab Use `try_for_each_with` in `Installer::install` to avoid using a mutex
on the Sender.
2023-04-12 11:25:12 -04:00
Nathan Fisher d3b5d096e5 Use `try_for_each_with` in Creator::create in order to avoid putting
Sender in a mutex and return errors rather than passing messages
2023-04-12 11:15:13 -04:00
Nathan Fisher be0c8dc6e7 Massage Installer for better code readability 2023-04-11 22:37:02 -04:00
Nathan Fisher e6f392bd7a Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/hpk-package into odin 2023-04-11 22:04:54 -04:00
Nathan Fisher e0f497cb89 Writer for tar nodes takes `&self` instead of `self` 2023-04-11 22:03:09 -04:00
Nathan Fisher 13dff6bd96 Get basic package installation implemented, with several TODOS left. 2023-04-11 14:05:37 -04:00
Nathan Fisher 00683722d6 Make Archive::remove parallel; Add Archive::pop method; 2023-04-10 19:17:26 -04:00
Nathan Fisher 43d8c82c08 Remove appstream from Specs and Package structs 2023-04-10 18:41:23 -04:00
Nathan Fisher f4e87ee500 Merge remote-tracking branch 'hpk-cli/odin' into odin;
This commit brings the cli `hpk` binary back into the `hpk` crate and
places it behind a feature flag, enabling development to take place in a
single repository.
2023-04-10 01:06:01 -04:00
Nathan Fisher 89d36281e3 Added some testing for version comparison and implemented PartialEq for
Version manually
2023-04-09 19:14:16 -04:00
Nathan Fisher 407d12a711 Remove stale backup of version::mod.rs 2023-04-09 01:38:39 -04:00
Nathan Fisher 4cede60a80 Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/hpk-package into odin 2023-04-09 01:36:26 -04:00
Nathan Fisher 32b4f80715 Fix some issues with getting tar header fields; Add some doc tests in
tar module; Add some tests for version checks;
2023-04-08 19:10:30 -04:00
Nathan Fisher 1a4d202989 Expand InstallerError enum; 2023-04-08 11:45:39 -04:00
Nathan Fisher ae099d94aa Fix Header::filename() method;
TODO: fix other related methods, fix Archive::get() method.
2023-04-08 11:44:09 -04:00
Nathan Fisher 784069402d Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/hpk into odin 2023-04-08 10:16:10 -04:00
Nathan Fisher ab6e7441f1 Create `Installer` struct 2023-04-07 19:12:28 -04:00
Nathan Fisher acbdf2d992 Cargo fmt 2023-04-07 19:11:35 -04:00
Nathan Fisher 0ab84def2e Make `package::User` and `package::Group` public 2023-04-07 19:08:23 -04:00
Nathan Fisher a07166375a Add `Arch` to `Update` struct 2023-04-06 18:47:53 -04:00
Nathan Fisher 723d697e90 Export `Arch` enum 2023-04-06 18:31:52 -04:00
Nathan Fisher ca9c0d7cdb Skip directories when creating a package from directory; Take an
optional directory when creating a package from file list;
2023-04-06 10:41:10 -04:00
Nathan Fisher c5450c34ef Update `package-bootstrap` crate 2023-04-05 22:37:25 -04:00
Nathan Fisher 8a06b3c628 Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/hpk into odin 2023-04-04 22:52:42 -04:00
Nathan Fisher 8907831877 Update `hpk-package` 2023-04-04 22:52:19 -04:00
Nathan Fisher 9cf9d469f6 Add `any` arch; Add `archive_name` method for `Package`; Ensure
architecture matches when checking if a package is an upgrade;
2023-04-04 22:02:58 -04:00
Nathan Fisher 7d6376d5c4 Store target arch as `HOST_ARCH` const, use this as default value for
`Package` struct
2023-04-04 21:52:29 -04:00
Nathan Fisher a58150cc9c Add `arch` field to `Package` 2023-04-04 20:45:43 -04:00
Nathan Fisher c099790f5a Remove .cargo from git 2023-04-04 20:18:29 -04:00
Nathan Fisher 1e101f7e70 Update hpk crate, which now has hpk-package split out 2023-04-03 19:04:37 -04:00
Nathan Fisher 082c215b44 Split out hpk-package into separate crate; Implement Repository::build() 2023-04-03 19:02:15 -04:00
Nathan Fisher 90b163eb1b Add deku, ron and sha2 to re-exports 2023-04-03 18:43:58 -04:00
Nathan Fisher 218abdaa87 Adjust re-exports 2023-04-03 18:36:54 -04:00