Commit graph

347 commits

Author SHA1 Message Date
aedd16d127
Enable ANSI escape sequences for CI/CD output
All checks were successful
Cargo build (Arch Linux) / Check Formatting (push) Successful in 52s
Cargo build (Arch Linux) / Build pacwrap (push) Successful in 1m23s
2024-10-06 00:11:34 -04:00
106a5d88d6
Self-hosted action runner
All checks were successful
Cargo build (Arch Linux) / Check Formatting (push) Successful in 41s
Cargo build (Arch Linux) / Build pacwrap (push) Successful in 1m26s
2024-10-05 23:29:53 -04:00
017a994529
Fixed indentation 2024-09-28 20:53:54 -04:00
ef4c343826
Release transaction upon SyncState::NotRequired 2024-09-28 19:36:44 -04:00
acbe177b60
Release 0.8.6 2024-09-26 16:38:38 -04:00
47dfcc8fc4
Only forcibly attempt to call trans_release upon an error
- Up until this point, attempting to release a transaction via a call to
  `trans_release` was done liberally and unnecessarily so; this has now
  been fixed.
- Added whitespace character in `aggregator` module to println statement.
- Renamed `NoCompatibleRemotes` to `NoCompatibleContainers` in the
  `SyncError` error enum.
2024-09-25 21:06:33 -04:00
828da40579
Proper Result and error structure for input prompts 2024-09-25 20:18:06 -04:00
8844bafd64
Cleanup state handling 2024-09-25 20:15:51 -04:00
8191764098
Increased log coverage and refactored error module
- Error logging is now present in pacwrap-agent
- Agent error code handling now correctly traps runtime panics.
- impl of DisplayTrait for TransactionError no longer handles the
  display of transaction failure messages.
- Error handling for TransactionAggregation is split into three
  categories: Fatal, Error, and Non-Fatal Error. While two former are
  immediately trapped and the program is terminated, the latter can
  safely terminate the program without consequence.
2024-09-23 19:59:36 -04:00
2f45f12b3e
Fix invocation of xdg-dbus-proxy to include --filter arg
- This option was ommitted by mistake during some refactoring work and
  now the `exec` module in pacwrap has been revised to include this
  option.
- AppIndicator module has had the talk option re-added.
- Specifiying the `-v` option twice will invoke `--log` on
  xdg-dbus-proxy for easy debugging.
2024-09-23 18:45:41 -04:00
07d3963196
Update to alpm.rs 4.0.1 with partial reversion of b621c34
- Updated to alpm.rs 4.0.1
- Changes made with b621c34 were made as a result of a regression,
  introduced with alpm.rs 3.0.x, of which has now been fixed upstream.
  They've now since been reverted.
2024-09-21 00:03:52 -04:00
d1622eb0b4
Revised error handling and some cleanup
- `fatal()` function for handling the termination of the program when a
  fatal human-readable error digestable error occurs. This function
  terminates the program and will never return a value.
- Much like the aforementioned function, the `error()` function now
  prints the error and terminates the program, instead of printing the
  error and returning the error code as an i32 integer.
- ErrorType enum implemented as an encapsulate to delineate error type.
- Display trait implemented for ErrorType enum for use cases whereby
  the program being terminated is inconvenient for the given code path.
- `generic()` function added to GenericError trait for handling errors
  of which do not require a message to be prepended.
- Global configuration is now statically cached with OnceLock instead of
  lazy_static, and is loaded on-demand instead of during the invocation
  of the `init()` function from the init module upon program startup.
- Use of lazy_static was also eliminated in pacwrap-core's sync module.
2024-09-19 23:19:26 -04:00
ed5b112538
Fix clippy warning 2024-09-19 21:13:30 -04:00
062d313d00
Fix apply_configuration function
Accidental removal of filter call leading to a regression, which output
the full package list for each container configuration. The original
intention was to remove a conditional statement from the filter.
2024-09-18 19:45:51 -04:00
adf9686ec3
Filter process file metadata instead of panicking
Gracefully filter process file metadata instead of panicking, because
there's a non-zero chance this error will be encountered when processes
are being added or removed from procfs.
2024-09-18 16:10:24 -04:00
974307a22d
Direct links in README.md
- Since markdown parsers are unable to resolve absolute resources in
  any consistent, correct way, use direct URLs for resources and links.
2024-09-17 18:52:52 -04:00
e25d807bd7
Debug logging for transaction state and all clippy warnings fixed 2024-09-17 18:52:43 -04:00
a2a8d0651a
Fix resolv.conf path 2024-09-15 18:46:41 -04:00
04473dc27e
Hook to configure pacman.conf inside containers 2024-09-15 18:45:07 -04:00
7234f89202
Release 0.8.5 2024-09-14 21:15:59 -04:00
73697a4060
Update doucmentation to reflect e4b8a85ccd 2024-09-14 21:13:37 -04:00
e4b8a85ccd
--disable-sandbox for disabling libalpm sandbox
- Ability to instruct libalpm to disable its own sandboxing mechanism by
  engaging `--disable-sandbox` at the command line.
- Updated manuals to reflect new command-line options.
- Disable sandbox user when disabling libalpm's sandbox
2024-09-14 21:11:46 -04:00
2819f5d216
--debug to trigger logging verbosity
- Logging verbosity triggered by `--debug` command-line option.
- Implemented callback function for libalpm's logging callback.
- Increased TransactionFlags to 16 bits from 8 bits to accomodate the
  bitlength required for additional transaction flags.
2024-09-11 22:20:55 -04:00
024bab1d7f
Remove redundant flag 2024-09-11 22:03:35 -04:00
9e4537fded
disable_sandbox option for global configuration 2024-09-10 20:05:17 -04:00
4fb2ac7ef8
Better handle transactional errors originating from agent 2024-09-10 19:55:08 -04:00
956f0ce176
Update to README.md
- Remove relative paths
2024-09-09 23:06:01 -04:00
caa9d05041
Deduplicate pacwrap/README.md, symlinking to ../README.md 2024-09-09 23:05:00 -04:00
c75c26eb48
Support libalpm 15 via alpm-rs 4.0.0
- exec.rs: Remove libfakeroot.so from LD_PRELOAD environment variable set
  in the transaction_agent function, when creating the ephemeral
  container with bubblewrap utilised for sandboxed transactions.
- Update Cargo.lock
- Cargo.toml: Change alpm-rs 3.0.5 to 4.0.0
2024-09-09 23:04:22 -04:00
e67cbd56ab
Parse empty operators 2024-09-03 17:08:22 -04:00
276e72ac7d
Bespoke pseudorandom_string function replaced with sample_string 2024-08-29 00:03:02 -04:00
fe3d060383
Add file extension to temporary files for editing
- Added ext function to the FileType impl to return a FileType extension
  for the relevant FileType.
- In the edit function, derive the file extension from said ext function.
- Simplified can_edit function with matches macro.
2024-08-28 16:43:22 -04:00
2c190b83c0
Use thread_prng from the rand crate instead of calling /dev/urandom 2024-08-28 16:12:00 -04:00
556ece1256
Additional length validation 2024-07-20 22:26:25 -04:00
e988b90c11
Release 0.8.4 2024-06-14 17:31:52 -04:00
8b3d4ee651
Cleaned up error handling in dist scripting 2024-06-14 17:31:38 -04:00
ae8c37e951
Addition of Process mtime function and expect calls 2024-06-11 20:51:32 -04:00
c956e7761f
Breaking change with nvidia driver 550.90.07 fixed 2024-06-11 17:38:26 -04:00
aa59e578e1
Process hierarchy in descending order sorted by mtime 2024-06-10 22:42:47 -04:00
4d037afbae
Target dependents during composition
- Along with some minor tweaks
2024-06-10 18:05:50 -04:00
9e979ab0b1
Corrected typo of command-line-utilities category slug 2024-06-07 19:02:29 -04:00
64b9d96ea5
Release 0.8.3 2024-06-07 18:54:26 -04:00
2a2c3cd3dc
Agent error handling and initialize trustdb during composition
- Initialize gnupg database during container composition
- Handle exit code 1 of agent as a general failure and changed resulting
  verbiage to 'general agent fault'. Shifted error codes up by one.
- Check if FD 1 is a terminal for colour detection in pacwrap-key
2024-05-31 17:30:55 -04:00
b30ffbc14b
More legible data structure for representing repositories
- AlpmRepository struct to increase legibility of repository data
  structure for future work.
2024-05-30 20:57:41 -04:00
736dae7aeb
Rework of synchronize_database function and handle empty queue
- Cleaned up synchronize_database function and use filter_handle prior
  to acquisition of handle iterator.
- In aggregate module when queue is empty, error with
  SyncError::NothingToDo.
2024-05-28 16:34:24 -04:00
21b4fa6c32
Handle Symbolic containers properly 2024-05-27 18:12:06 -04:00
2dd3f1dbf1
Include symlinked root directories in enumeration 2024-05-27 16:33:32 -04:00
45d9376ab0
Release 0.8.2 2024-05-21 19:04:37 -04:00
1f6e04c4ff
Update Cargo.lock 2024-05-21 19:01:58 -04:00
d2c71a230e
Revision to 1385021b0f 2024-05-14 23:31:34 -04:00