You are not logged in.

#1 2021-03-26 15:51:51

Debasish Patra
Member
Registered: 2014-03-06
Posts: 57

PKGBUILD Request for custom NetworkManager-openconnect

Hi Guys,
I am trying to build support for networkmanager-openconnect package with custom UserAgent support.

I have defined the PKGBUILD like this.

pkgname=networkmanager-openconnect-useragent
pkgver=1.2.7
pkgrel=1
epoch=
pkgdesc="Network Manager Openconnect with support for custom UserString"
arch=(x86_64)
url="https://gitlab.gnome.org/patradebasish1987/NetworkManager-openconnect"
license=('GPL')
groups=()
depends=()
makedepends=(git make)
checkdepends=()
optdepends=()
provides=(networkmanager-openconnect=1.2.7dev+49+gc512d5a-1)
conflicts=(networkmanager-openconnect=1.2.7dev+49+gc512d5a-1)
replaces=(networkmanager-openconnect=1.2.7dev+49+gc512d5a-1)
backup=()
options=()
install=
changelog=
source=("git+$url")
noextract=()
md5sums=(SKIP)
validpgpkeys=()

prepare() {
	cd "NetworkManager-openconnect"
}

build() {
	cd "NetworkManager-openconnect"
	./autogen.sh
	./configure --prefix=/usr
	make
}

check() {
	cd "NetworkManager-openconnect"
	make -k check
}

package() {
	cd "NetworkManager-openconnect"
	make DESTDIR="$pkgdir/" install
}

I am getting the below error even though the networkmanager-openconnect package is asked to be replaced.

❯ sudo pacman -U networkmanager-openconnect-useragent-1.2.7-1-x86_64.pkg.tar.zst                                                                                                                                                                                                ⏎
loading packages...
resolving dependencies...
looking for conflicting packages...
:: networkmanager-openconnect-useragent and networkmanager-openconnect are in conflict. Remove networkmanager-openconnect? [y/N] y

Packages (2) networkmanager-openconnect-1.2.7dev+49+gc512d5a-1 [removal]  networkmanager-openconnect-useragent-1.2.7-1

Total Installed Size:  2.82 MiB
Net Upgrade Size:      0.08 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)
networkmanager-openconnect-useragent: /usr/etc/dbus-1/system.d/nm-openconnect-service.conf exists in filesystem
networkmanager-openconnect-useragent: /usr/libexec/nm-openconnect-auth-dialog exists in filesystem
networkmanager-openconnect-useragent: /usr/libexec/nm-openconnect-service exists in filesystem
networkmanager-openconnect-useragent: /usr/libexec/nm-openconnect-service-openconnect-helper exists in filesystem
Errors occurred, no packages were upgraded.

I tried to do some research on this. But how can i ignore or possibly replace the existing files if any to install sucessfully.

Thanks in advance.


Keep Calm, And Enjoy Life smile

Offline

#2 2021-03-27 01:15:11

yochananmarqos
Member
Registered: 2020-02-05
Posts: 30
Website

Re: PKGBUILD Request for custom NetworkManager-openconnect

First start by basing it on the networkmanager-openconnect PKGBUILD.

It should not replace anything, it's just an alternative package. Providing and conflicting with networkmanager-openconnect is enough, no version # is required.

Not a single Arch package installs anything to /usr/libexec/, you missed the --libexecdir=/usr/lib build flag. Remove whatever you installed, then try again once you've sorted the PKGBUILD.

Offline

Board footer

Powered by FluxBB