You are not logged in.
Hello everyone,
I want to build the package xz-static-git [1] which aims to be the Arch version of the xz-static rpm [2].
Since the rpm contains only two files, "liblzma.a" and "COPYING", I defined the package() function as follows:
package() {
cd xz/
mkdir -p "$pkgdir/usr/lib64/"
mkdir -p "$pkgdir/usr/share/doc/xz/"
install -Dm755 src/liblzma/.libs/liblzma.a "${pkgdir}/usr/lib64/"
install -Dm644 COPYING "${pkgdir}/usr/share/doc/xz/"
}
However, when I tried to installing the package, pacman fails with:
error: failed to commit transaction (conflicting files)
xz-static-git: /usr/lib64 exists in filesystem (owned by filesystem)
xz-static-git: /usr/share/doc/xz/COPYING exists in filesystem (owned by xz)
Errors occurred, no packages were upgraded.
If I remove the "mkdir" operations from package() then makepkg fails with
install: target ... xz-static-PKGBUILD/pkg/xz-static-git/usr/lib64/' is not a directory: No such file or directory
What is the proper way to resolve this issue?
[1] https://aur.archlinux.org/packages/xz-static-git/
[2] https://fedora.pkgs.org/28/fedora-updat … 4.rpm.html
Last edited by rstoyanov (2018-10-26 02:29:05)
Offline
You're specifically telling it to install a file to /usr/lib64/. Don't do that.
Offline
As above, but you also cant replace files in packages. Just do a full make install and replace the xz package.
Offline
@Scimmia and @Allan thank you for the feedback!
I changed the PKGBUILD to do a full install and therefore replace the xz package.
Offline
Why do you even want xz-static in the first place? That being said, I see no reason why you should need to install docs at all. If you just wanted to install a static library, nothing was stopping you from *only* packaging the liblzma.a file.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Hi @eschwartz,
I need the liblzma.a file because it is a dependency for libvirt-sandbox to enable lzma support.
Do you think that it is a good idea to push the liblzma.a file instead of building xz from source?
Offline
That's... exciting. The program in question seems to be designed for deploying as a statically linked binary into a chroot. In which case, why does it make assumptions about its compilation environment...
I have a pacman-static package in the AUR, which does the needful by building its own liblzma.a and other libraries during build. It also builds a very custom libcurl with options unsuitable for general-purpose use...
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline