Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scripts/ci/test_linux_rpm_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ def test_invalid_staging_identity_never_builds_rpm(self):
self.assertNotEqual(result.returncode, 0)
self.assertFalse(self.rpm.exists())

def use_gnu_ar_format(self):
# Debian packages are GNU archives. llvm-ar writes BSD ones on Darwin,
# padding members with bytes that GNU tar rejects after gzip.
ar = shutil.which("ar")
version = subprocess.run([ar, "--version"], capture_output=True, text=True)
if "LLVM" not in version.stdout:
return
tool = self.bin / "ar"
tool.write_text(f'#!{shutil.which("bash")}\nexec "{ar}" --format=gnu "$@"\n')
tool.chmod(0o755)

def test_failed_extraction_is_not_hidden_by_cleanup(self):
result = self.run_shell('''
ar() { return 19; }
Expand Down Expand Up @@ -95,6 +106,7 @@ def test_appimage_extraction_excludes_privileged_xattrs(self):
self.assertTrue((self.tauri / "extracted/AppRun").exists())

def test_deb_normalization_refreshes_checksums_and_verifier_rejects_tampering(self):
self.use_gnu_ar_format()
self.deb.unlink()
payload = self.root / "deb-input"
(payload / "usr/bin").mkdir(parents=True)
Expand Down
Loading