You are not logged in.

#1 2021-04-27 16:29:39

daw538
Member
Registered: 2021-04-27
Posts: 1

PKGBUILD (from .rpm) - conflicting files upon install attempt.

I've recently attempted to try and construct my own package based off an .rpm file using PKGBUILD. Now ideally the source code would be available to compile from scratch, however .rpm and .deb are the only two options available for download for the software I need to use (Aruba Via VPN). Using a combination of existing threads from this forum and elsewhere, I have so far managed to cobble together a PKGBUILD file that to me at least appears mostly correct -- this is not something I've had any previous experience in doing so apologies if my subsequent questions seem a bit naïve. I'm able to construct a package using makepkg but when I attempt to install using pacman -U <package>, I am greeted with a message from the terminal informing me that there are conflicting files with those in the filesystem.

~/Downloads/aruba >>> sudo pacman -U via-4.1.0_2012076-1-x86_64.pkg.tar.zst    
[sudo] password for daniel: 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) via-4.1.0_2012076-1

Total Installed Size:  15.60 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
error: failed to commit transaction (conflicting files)
via: /lib64 exists in filesystem (owned by filesystem)
via: /usr/lib64 exists in filesystem (owned by filesystem)
Errors occurred, no packages were upgraded.

I think I understand where this is being caused by my PKGBUILD file, but I don't quite get what I need to put (compared to what is currently in place) or why it needs to be done, other than I gather it's a bad idea to simply copy into /lib64. Again this is not an area I'm familiar with.

I've posted the PKGBUILD file below. For context the extracted .rpm has three directories, /etc, /lib64 and /usr which contain all the files.

pkgname=via
pkgver=4.1.0_2012076
pkgrel=1
pkgdesc="Aruba VIA VPN client"
arch=('x86_64')
url="https://www.arubanetworks.com/products/security/vpn-services/"
license=('unknown')
depends=()
makedepends=(rpmextract)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("http://www.exeter.ac.uk/media/level1/academicserviceswebsite/it/documents/networks/vpn/via-4.1.0-2012076.rhel6.x86_64.rpm")
noextract=()
md5sums=('6489f98d0a538acfbdd53f959b330d32')
validpgpkeys=()

build() {
	cd "$srcdir"
	rpmextract.sh via-4.1.0-2012076.rhel6.x86_64.rpm
}

package() {
	cd "$pkgdir"
	echo "Test: this bit works"
	cp -r "$srcdir/etc/." "etc/"
	cp -r "$srcdir/lib64/." "lib64/"
	cp -r "$srcdir/usr/." "usr/"
	#make DESTDIR="$pkgdir" PREFIX=usr install
	
}

If anyone could point me in the correct direction in terms of what corrections need to be made that would be greatly appreciated. I've looked at a few other build files for other packages but I've hit a bit of a wall in my own understanding. Many thanks.

Offline

#2 2021-04-27 16:40:59

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,494

Re: PKGBUILD (from .rpm) - conflicting files upon install attempt.

You can't install any files to symlinks; /lib64 and /usr/lib64 are symlinks on Arch. You need to move them to /usr/lib.

Side note, rpmextract isn't doing anything useful. Get rid of it completely.

Offline

Board footer

Powered by FluxBB