fix(ci): install libarchive-tools for repo-add bsdtar dependency
repo-add uses bsdtar to validate packages, which requires libarchive-tools. The .archlinux extension works fine with repo-add so the rename to .pkg.tar.zst was unnecessary. Also removes debug steps.
This commit is contained in:
parent
2a2b3c787e
commit
136fafdf37
|
|
@ -245,27 +245,6 @@ jobs:
|
|||
cp dist/repo-work/incoming-desktop/*."$ext" dist/repo-work/incoming/ 2>/dev/null || true
|
||||
done
|
||||
|
||||
- name: Debug - list incoming files
|
||||
run: |
|
||||
echo "=== incoming directory ==="
|
||||
ls -lah dist/repo-work/incoming/ || true
|
||||
echo "=== incoming-desktop directory ==="
|
||||
ls -lah dist/repo-work/incoming-desktop/ || true
|
||||
echo "=== file types ==="
|
||||
file dist/repo-work/incoming/* || true
|
||||
echo "=== archlinux package contents (first x86_64) ==="
|
||||
pkg=$(ls dist/repo-work/incoming/*-x86_64.archlinux 2>/dev/null | head -1)
|
||||
if [ -n "$pkg" ]; then
|
||||
echo "Inspecting: $pkg"
|
||||
zstd -d "$pkg" -o /tmp/pkg.tar 2>&1 && tar tf /tmp/pkg.tar | head -20 || true
|
||||
fi
|
||||
echo "=== desktop pacman package contents ==="
|
||||
dpkg=$(ls dist/repo-work/incoming-desktop/*.pacman 2>/dev/null | head -1)
|
||||
if [ -n "$dpkg" ]; then
|
||||
echo "Inspecting: $dpkg"
|
||||
xz -d -c "$dpkg" | tar tf - | head -20 || true
|
||||
fi
|
||||
|
||||
- name: Install repository tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
|
@ -273,7 +252,8 @@ jobs:
|
|||
reprepro \
|
||||
createrepo-c \
|
||||
pacman-package-manager \
|
||||
makepkg
|
||||
makepkg \
|
||||
libarchive-tools
|
||||
|
||||
- name: GPG setup
|
||||
uses: kolaente/action-gpg@main
|
||||
|
|
|
|||
|
|
@ -1457,9 +1457,7 @@ func (Release) RepoPacman(ctx context.Context) error {
|
|||
}
|
||||
for _, pkg := range pkgs {
|
||||
abs, _ := filepath.Abs(pkg)
|
||||
// repo-add requires .pkg.tar.zst extension, nfpm archlinux files are .archlinux
|
||||
base := strings.TrimSuffix(filepath.Base(pkg), ".archlinux") + ".pkg.tar.zst"
|
||||
dst := filepath.Join(repoDir, base)
|
||||
dst := filepath.Join(repoDir, filepath.Base(pkg))
|
||||
os.Remove(dst)
|
||||
if err := os.Symlink(abs, dst); err != nil {
|
||||
return err
|
||||
|
|
@ -1468,7 +1466,7 @@ func (Release) RepoPacman(ctx context.Context) error {
|
|||
|
||||
// repo-add creates vikunja.db.tar.gz and vikunja.files.tar.gz
|
||||
dbPath := filepath.Join(repoDir, "vikunja.db.tar.gz")
|
||||
repoPkgs, _ := filepath.Glob(filepath.Join(repoDir, "*.pkg.tar.zst"))
|
||||
repoPkgs, _ := filepath.Glob(filepath.Join(repoDir, "*.archlinux"))
|
||||
repoAddArgs := append([]string{dbPath}, repoPkgs...)
|
||||
if err := runAndStreamOutput(ctx, "repo-add", repoAddArgs...); err != nil {
|
||||
return fmt.Errorf("repo-add for %s: %w", repoArch, err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue