From 8bba6dfdc5669df1b4aaa8455405c949d6b24f1c Mon Sep 17 00:00:00 2001 From: Anton Farygin Date: Tue, 23 Dec 2025 11:50:04 +0300 Subject: [PATCH] fix: restore tar fallback when makepkg is not available Commit 32f04ae removed the tar fallback in Tgz::build(), requiring /sbin/makepkg (Slackware-specific) for --to-tgz conversion. This broke alien on all non-Slackware systems. Restore the fallback using the same method as the original makepkg script. Fixes: https://github.com/Project-OSS-Revival/alien/issues/4 --- Alien/Package/Tgz.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Alien/Package/Tgz.pm b/Alien/Package/Tgz.pm index 79c0c25..f5b2a8c 100644 --- a/Alien/Package/Tgz.pm +++ b/Alien/Package/Tgz.pm @@ -489,7 +489,10 @@ sub build { $Alien::Package::verbose=$v; } else { - die "Sorry, I cannot generate the .tgz file because /sbin/makepkg is not present.\n" + # Fallback to plain tar when makepkg is not available + # Use same method as makepkg: strip ./ prefix via sed to match Slackware format + $this->do("cd ".$this->unpacked_tree."; find ./ | LC_COLLATE=C sort | sed '2,\$s,^\\./,,' | tar --no-recursion -T - -czf ../$tgz") + or die "Package build failed"; } return $tgz; }