Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

building aur fail which is caused by file extension name #7

Closed
jackyzy823 opened this issue Sep 1, 2020 · 5 comments
Closed

building aur fail which is caused by file extension name #7

jackyzy823 opened this issue Sep 1, 2020 · 5 comments

Comments

@jackyzy823
Copy link

Running

/bin/bash -c '/build-aur standardnotes-desktop'

result:

mv: cannot stat '*.pkg.tar.xz': No such file or directory

After digging into container, i found that the built package ends with "pkg.tar.zst" not ".tar.xz"

Reference: https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/

@maximbaz
Copy link
Owner

maximbaz commented Sep 1, 2020

Good catch, thanks!

@maximbaz
Copy link
Owner

maximbaz commented Sep 1, 2020

I went for a hopefully future-proof approach, let me know if you still experience any issues!

@jannikw
Copy link
Contributor

jannikw commented Sep 21, 2020

The . after tar prevents using no compression at all.

mv $package*.pkg.tar.* /pkg

So when specifying PKGEXT=.pkg.tar moving the package fails again.

I also noticed a related problem that is caused by the asterisks for moving the package. For example the AUR package zoom downloads an archive and calls it "${pkgname}-${pkgver}_orig_x86_64.pkg.tar.xz". After building the package (which basically repackages the archive) one is left with two archives called zoom-5.2.458699.0906-1-x86_64.pkg.tar.xz and zoom-5.2.458699.0906_orig_x86_64.pkg.tar.xz. Since both match the pattern, they will both be moved to the target directory. This isn't too bad, but not perfect either.

A possible solution I can think of is using PKGDEST from makepkg.conf. Since the makepkg user will probably have no write access to the /pkg directory, the directory cannot be specified directly using the variable. But one could specify a temporary empty directory. After building the packages that directory should only contain the package file, which means all files in that directory can be moved to /pkg, simplifying the glob pattern for moving the package further and avoiding problems with the file extension.

@maximbaz
Copy link
Owner

Sounds good, would you be able to submit a PR? I don't want to over-complicate the scripts but your proposal sounds like it could be just one or two extra lines, so why not 😉

@jannikw
Copy link
Contributor

jannikw commented Sep 21, 2020

Sure, i will give it a shot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants