Add Fedora and Arch package recipes (#24)

* Package Ferese for Fedora and Arch releases

* Build release packages alongside workspace checks

* Include dependency licenses and software GPU test drivers

* Limit package checks to release PRs and fix Arch Cargo dependency

* Prepare Ferese 0.1.0-beta

* Release config locks before closing inherited file descriptions

* Install the lock PAM policy for native release checks

* Include xauth in distribution package test dependencies

* Regenerate Arch Git package metadata

* Run package checks with an explicit UTC timezone

* Remove unused bundled fonts and accept installed license receipts

* Format the system font test helper

* Load an installed font for headless text rendering checks

* Isolate package test runtimes and reap container child processes
This commit is contained in:
Samuel Onoja authored and GitHub committed 2026-10-11 14:16:00 +01:00
1 parent 587602b493
commit 1b9fabbbe4
25 files changed
+1019 -170

No files matched your search

+16 -5
View File
@@ -44,13 +44,13 @@ impl ConfigFile {
fs::TryLockError::Error(error) => error.to_string(),
})?;
let source = read(&path)?;
Ok(Self {
let mut file = Self {
path,
source,
source: String::new(),
_lock: lock,
})
};
file.source = read(&file.path)?;
Ok(file)
}
pub fn source(&self) -> &str {
@@ -102,6 +102,14 @@ impl ConfigFile {
}
}
impl Drop for ConfigFile {
fn drop(&mut self) {
// A spawned child can briefly retain the open-file description after our
// descriptor closes. Release the lock before closing the owner's handle.
let _ = self._lock.unlock();
}
}
fn read(path: &Path) -> Result<String, String> {
let file = match File::open(path) {
Ok(file) => file,
@@ -161,6 +169,8 @@ mod tests {
std::os::unix::fs::symlink(&path, &alias).unwrap();
let file = ConfigFile::open(&path).unwrap();
assert!(ConfigFile::open(&alias).is_err());
// A concurrent process spawn can briefly inherit this open-file description.
let inherited = file._lock.try_clone().unwrap();
drop(file);
ConfigFile::open(&alias)
.unwrap()
@@ -168,6 +178,7 @@ mod tests {
.unwrap();
assert!(alias.is_symlink());
assert_eq!(fs::read_to_string(path).unwrap(), "// updated");
drop(inherited);
}
#[test]