Commit graph

381 commits

Author SHA1 Message Date
7a2365bb06
Support symlinks and provide valid TryFrom fields for desktop entries
- Support desktop entries referenced by a symbolic link
- Provide a general purpose path canonicalization API for containers
  with the `exec::path::resolve_path` function.
- TryExec fields are now replaced with a valid entry referring to the
  pacwrap binary
2024-12-25 18:01:44 -05:00
fb65029371
Few bugs fixes for xdg_home
- Qualify and only warn if XDG directories are missing, otherwise
  disqualify with an error.
- Fix registration iter chain to ensure location is qualified.
2024-12-26 18:16:17 -05:00
8e2a1a5b5e
Unit test implemented for args module 2024-12-25 14:27:59 -05:00
b5bdce84a7
Omit timezone offset for UTC timezone 2024-12-25 02:38:36 -05:00
62f8c0923a
Use lifetime elision for PermissionVisitor impl in config::filesystem 2024-12-25 02:36:06 -05:00
f20f46b28e
Genericised From<T> trait impl for Error types
- Error type in the error module now implements a broadly generic From<T>
  impl for error conversion into the pacwrap-core library's Error type.
- `ErrorGeneric::prepend` and `ErrorGeneric::prepend_io` both now accept
  borrowed or heap-allocated String return types without additional sugar.
- A lone unary postfix operator has been applied to external function calls
  where deemed most appropriate, removing unnecessary function calls to
  `ErrorGeneric::prepend` and `ErrorGeneric::prepend_io`.
2024-12-25 02:00:04 -05:00
6e5bb8df5a
Implement xdg_runtime filesystem module
Provides a shortcut to easily mount sockets and other miscelleny from
the $XDG_RUNTIME_DIR location into containers. With the use of the
`to_run` key, with a standard key/value structure for filesystem
volume mounts.
2024-12-24 21:09:34 -05:00
b14b1fd22f
Clean up of pipewire and pulseaudio filesystem modules
- Make use of `skip_serializing_none` macro, from the serde_with crate,
  in both the `pipewire` and `pulseaudio` filesystem modules to clean up
  the data structure.
- Utilise the `split_whitespace()` in function chain for the
  `AlpmConfiguration::sig_level(&self)` function.
- In gpu module, use any instead of filter and is_empty in iter chain
  for the nvidia variable.
2024-12-24 20:59:36 -05:00
fc0ea7dd62
Deserialize 'ro' and 'rw' strs into Permission enum
- Implement serde Serializer and Deserializer for the Permission enum in
  Filesystem module.
- Breaking: Refactor ExecutionArgs API, combining the 'robind' and
  'bind' functions into a single function named 'bind'.
2024-11-11 00:11:51 -05:00
36ed2db1d2
tmp filesystem module 2024-11-10 19:47:30 -05:00
dfc3d7059c
xdg_home permissions module and some refactoring 2024-11-10 19:38:53 -05:00
a9d85bcc16
-h/--help option in command submodules 2024-12-18 19:56:25 -05:00
7745598117
Fix elided lifetimes
All checks were successful
Build / Check format (push) Successful in 50s
Build / Lint pacwrap (push) Successful in 1m23s
Build / Build pacwrap (push) Successful in 1m35s
2024-12-18 19:44:23 -05:00
3f4b842e14
Update Cargo.lock
Some checks failed
Build / Check format (push) Successful in 53s
Build / Lint pacwrap (push) Failing after 1m17s
Build / Build pacwrap (push) Successful in 1m38s
2024-12-18 19:28:44 -05:00
1287f1eb60
Add Update container step
All checks were successful
Build / Check format (push) Successful in 42s
Build / Lint pacwrap (push) Successful in 1m6s
Build / Build pacwrap (push) Successful in 1m23s
Since the Arch Linux OCI image can sometimes be out-of-sync, update the
keyring and base packages prior to installing the requisite packages.
This will hopefully ensure a cached container image can no longer
trigger a pipeline failure.
2024-11-16 23:41:45 -05:00
293ebaa788
Release 0.8.7
All checks were successful
Build / Check format (push) Successful in 49s
Build / Lint pacwrap (push) Successful in 1m20s
Build / Build pacwrap (push) Successful in 1m33s
2024-11-08 18:53:48 -05:00
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
45c349aa6e
Merge pull request #4 from jullanggit/master
All checks were successful
Build / Check format (push) Successful in 48s
Build / Lint pacwrap (push) Successful in 1m16s
Build / Build pacwrap (push) Successful in 1m33s
Fix missing / in WAYLAND_SOCKET
2024-11-06 00:32:03 +00:00
e8acbc5ea8
Require 1 instead of boolean for PACWRAP_SCHEMA_BUILT
All checks were successful
Build / Check format (push) Successful in 49s
Build / Lint pacwrap (push) Successful in 1m19s
Build / Build pacwrap (push) Successful in 1m32s
2024-11-05 18:20:27 -05:00
jullang
2178eb0a74 fix missing / in WAYLAND_SOCKET 2024-11-03 13:15:30 +01:00
3c685c617a
Update Cargo.lock
All checks were successful
Build / Check format (push) Successful in 49s
Build / Lint pacwrap (push) Successful in 1m13s
Build / Build pacwrap (push) Successful in 1m31s
2024-11-02 02:25:01 -04:00
660ab2b910
Separate lint job
- Separate Build and Lint jobs for better clarity
- Fixed PACWRAP_SCHEMA_BUILT envvar check in pacwrap build script
2024-11-02 02:22:42 -04: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
ed2a8ac1ca
Validate version string and clean up of subshell cmd sequences 2024-10-31 16:12:47 -04:00
e7fb0e3ca6
Revert README.md
All checks were successful
Build / Check format (push) Successful in 45s
Build / Build pacwrap (push) Successful in 1m42s
2024-10-30 23:55:52 -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
20f7ed7d8d
Enable workflow dispatch
All checks were successful
Build / Check format (push) Successful in 42s
Build / Build pacwrap (push) Successful in 1m33s
2024-10-20 20:08:16 -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
33dd4911ff
Formatting
All checks were successful
Build / Check format (push) Successful in 47s
Build / Build pacwrap (push) Successful in 1m32s
2024-10-11 19:54:49 -04:00
27845d8188
Modify scope and synchronise workflows
All checks were successful
Build / Check format (push) Successful in 41s
Build / Build pacwrap (push) Successful in 1m37s
2024-10-06 23:28:14 -04:00
ffabc563e8
Merge pull request #3 from pacwrap/readme_test
All checks were successful
Build / Check format (push) Successful in 41s
Build / Build pacwrap (push) Successful in 1m33s
Update README.md
2024-10-07 02:51:25 +00:00
52ca04a5cf
Update README.md 2024-10-06 22:31:35 -04:00
1c66a7e4a4
Github workflow
All checks were successful
Build / Check format (push) Successful in 41s
Build / Build pacwrap (push) Successful in 1m36s
2024-10-06 20:36:15 -04:00
878db06495
Lint with clippy and tidy up names
All checks were successful
Build / Check format (push) Successful in 42s
Build / Build pacwrap (push) Successful in 1m33s
2024-10-06 01:25:28 -04:00
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