Commit graph

135 commits

Author SHA1 Message Date
c2c2496ad8
Cleaned up display permission module and bounds check
All checks were successful
Build / Check format (push) Successful in 49s
Build / Lint pacwrap (push) Successful in 1m17s
Build / Build pacwrap (push) Successful in 1m32s
- Check `DISPLAY` for colon delimiter to ensure array bounds and avoid
  a runtime panic.
- Set `WAYLAND_DISPLAY` to `wayland-0` inside the container.
2024-11-05 21:06:16 -05:00
jullang
2178eb0a74 fix missing / in WAYLAND_SOCKET 2024-11-03 13:15:30 +01:00
80c6042c3b
Tidy up manifests and inclusion of workspace dependencies
All checks were successful
Build / Check format (push) Successful in 48s
Build / Build pacwrap (push) Successful in 1m40s
- `alpm` and `pacwrap-core` defined as workspace dependencies being
  imported by each crate.
- Set workspace resolver version to `2`
2024-10-31 16:22:08 -04:00
58084985cf
Pre-release 0.8.7
All checks were successful
Build / Check format (push) Successful in 50s
Build / Build pacwrap (push) Successful in 1m41s
Note: This is a test release intended to ensure nothing breaks when the
associated crates are published to crates.io.

- Update to version '0.8.7-pre'.
- Testing new `Cargo.toml` workspace manifest, of which brings manifest
  keys in all three pacwrap crates together. Most package keys now, with
  the exception of crate-specific metadata, are now located in the
  workspace manifest.
- Update common.sh to accomodate this change.
- Update README.md to again use relative paths.
2024-10-30 23:24:48 -04:00
4c1269e458
Use crate's Result type
All checks were successful
Build / Check format (push) Successful in 39s
Build / Build pacwrap (push) Successful in 1m33s
2024-10-13 19:18:46 -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
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
7234f89202
Release 0.8.5 2024-09-14 21:15:59 -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
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
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
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
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
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
e8403c600d
Bug fix for kill_processes function with minor refactoring
- Continue loop in kill_processes and warn instead of returning error
- Removed redundant colon in warn message
- Removed vestigial lifetime expanssion from qualify_process function
2024-05-13 18:16:26 -04:00
c86d24c5a8
Cleaned up directory-acquisition functions and tidyed up agent
- Added expect call in procfs() in the ever unlikely scenario the Linux
  kernel fails to return a UTF-8 string. If this were to happen, it'd
  mean something had gone horribly wrong; either a bug in the kernel, or
  memory corruption as a result of faulty hardware.
- Reference version data from constants in agent.rs
2024-05-09 20:48:06 -04:00
3fe9d41659
Some tidy up curtailing use of lazy-static variables
- lazy-static variables replaced with OnceLock where applicable with
  otherwise redundant usage removed.
- Front-end code no longer makes use of lazy-static variables
2024-05-01 21:32:13 -04:00
aeadbd4aa4
Enablement of experimental lazy database initialization 2024-04-26 23:45:42 -04:00
d8a81436a1
Release 0.8.1 2024-04-24 18:00:28 -04:00
f7f603f37f
Attribution Update 2024-04-24 17:58:24 -04:00
78bbcbef79
Don't synchronize filesystem state during preview
- Prevent filesystem state synchronization when preview flag set
- Disallow container creation when preview flag set
2024-04-21 15:43:01 -04:00
03d942ad22
Bug fixes for database resolution during composition
- Container::stamp function to set new timestamp with compose_handle.
- Restructured and refactored trans_ready function.
- Fixed bug with progress ticker during an aggregate transaction when
  one or more lines are printed to std[out|err].
- Do not print containers as up-to-date upon completion of container
  composition nor creation in aggregate, nor if a container was
  composed.
- TransactionState::Skip state declared and implemented.
- Check for UpdateSchema(..) instead of Prepare for marking a container
  as updated.
2024-04-21 15:34:53 -04:00
5c3b9bdd5d
Attribution update 2024-04-19 18:41:29 -04:00
93a3386571 Partial reversion of 8b286a2dfc to qualify
runtime operation
2024-04-11 20:26:11 -04:00
8b286a2dfc Instance name acquisition fixed 2024-04-11 18:34:43 -04:00