You are not logged in.

#1 2020-09-03 09:23:48

Mr. Tao
Member
Registered: 2020-06-27
Posts: 13

How to set provides/conflicts in PKGBUILD to avoid conflicting package

I have a version of pulseaudio with AirPlay 2 support in AUR.

I am able to build, install and use this package fine. But on a system update, whenever e.g. Chromium or Firefox, probably any package dependent on libpulse is to be updated, there is a conflict between libpulse and libpulse-airplay:

❯ sudo pacman -S chromium
resolving dependencies...
looking for conflicting packages...
:: libpulse and libpulse-airplay are in conflict. Remove libpulse-airplay? [y/N]

There are provides and conflicts set in the package:

package_libpulse-airplay() {
  provides=('libpulse=13.99.1')
  conflicts=(libpulse)
 ⋮

How do I make libpulse-airplay a proper substitute for libpulse?

Offline

#2 2020-09-03 10:31:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

What if you modify the PKGBUILD for libpulse-airplay to include the similar line as the official package: https://github.com/archlinux/svntogit-p … BUILD#L121

You can retain the conflicts=


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2020-09-03 10:56:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

Adding the .so objects to provides does look like a good idea but it won't solve the issue.
(I've been bitten by this same issue in the past)

chromium depends on libpulse, your package provides libpulse=13.99.1 .
pacman dependency logic* concludes your package doesn't satisfy chromium requirements.

Remove the version number from the provides array and just provide libpulse .


*
for pkgver comparisons pacman uses vercmp , no idea if that's also used/suitable for libpulse vs libpulse=13.99.1  type comparisons .

Last edited by Lone_Wolf (2020-09-03 10:57:12)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2020-09-03 11:01:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

@Lone_Wolf - Agreed, my point was to follow the official PKGBUILD as closely as possible.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2020-09-03 15:08:25

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

Lone_Wolf wrote:

Adding the .so objects to provides does look like a good idea but it won't solve the issue.
(I've been bitten by this same issue in the past)

chromium depends on libpulse, your package provides libpulse=13.99.1 .
pacman dependency logic* concludes your package doesn't satisfy chromium requirements.

Remove the version number from the provides array and just provide libpulse .


*
for pkgver comparisons pacman uses vercmp , no idea if that's also used/suitable for libpulse vs libpulse=13.99.1  type comparisons .

provides=('libpulse=13.99.1') means pacman considers that libpulse is installed with a pkgver of 13.99.1, removing the version number *never* makes it more compatible.

chromium doesn't depend on a specific version of libpulse, so this cannot have anything to do with it.

@Mr. Tao,

What's the exact error message if you answer "N" at the prompt? What's the output of pacman -Qi libpulse-airplay?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2020-09-09 10:23:28

Mr. Tao
Member
Registered: 2020-06-27
Posts: 13

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

In the past I’ve had requires without versions. I’ve tried adding version in a (obviously futile) attempt to work around this issue.

sudo pacman -Suuy
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 extra-alucryd is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
:: libpulse and libpulse-airplay are in conflict. Remove libpulse-airplay? [y/N] n
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: libpulse and libpulse-airplay are in conflict
pacman -Qi libpulse-airplay
Name            : libpulse-airplay
Version         : 13.99.1+104+gcc93eb360-1
Description     : A featureful, general-purpose sound server (client library)
Architecture    : x86_64
URL             : https://www.freedesktop.org/wiki/Software/PulseAudio/
Licenses        : LGPL
Groups          : None
Provides        : libpulse.so=0-64  libpulse-simple.so=0-64  libpulse-mainloop-glib.so=0-64
Depends On      : dbus  libasyncns  libcap  libxtst  libsm  libsndfile  systemd
Optional Deps   : None
Required By     : libao  pulseaudio-airplay
Optional For    : None
Conflicts With  : libpulse
Replaces        : None
Installed Size  : 1458.98 KiB
Packager        : Unknown Packager
Build Date      : Thu Sep 3 10:54:27 2020
Install Date    : Sun Sep 6 21:59:07 2020
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : None

Offline

#7 2020-09-09 11:29:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

Provides        : libpulse.so=0-64  libpulse-simple.so=0-64  libpulse-mainloop-glib.so=0-64

Do you notice how it does not provide libpulse at *all*?

Look more closely at your PKGBUILD, it clearly isn't doing what you think it is doing.

In fact...

  provides=('libpulse=13.99.1')
[...]
  provides=(libpulse{,-simple,-mainloop-glib}.so)

Last edited by eschwartz (2020-09-09 11:29:51)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2020-09-09 18:25:55

Mr. Tao
Member
Registered: 2020-06-27
Posts: 13

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

The line comes from the original PKGBUILD. Does it mean that the original package provides libpulse implicitly because of the contents of pkgname array?

I’ve just rebuilt the package with provides you suggested and subsequent upgrade of chromium passed without a complaint! Thank you.

Last edited by Mr. Tao (2020-09-09 18:38:08)

Offline

#9 2020-09-09 18:31:36

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

No. Packages don't provide themselves.

"provides" is a list of additional names, on top of the pkgname, which can be used to satisfy dependencies. But that doesn't mean every package needs to

provides = $pkgname

Your problem is completely unrelated. Do you understand why, in bash,

provides=(one)
provides=(two)

completely throws away the first line and never uses it?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2020-09-09 19:04:08

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

Missing dependency on gst-plugins-base-libs.  Could you not adjust the patch to apply cleanly without using three way merge?

==> Retrieving sources...
  -> Found 0001-meson-Define-TUNNEL_SINK-for-module-tunnel-sink.patch
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Creating working copy of pulseaudio git repo...
Cloning into 'pulseaudio'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
error: patch failed: src/modules/meson.build:55
Falling back to three-way merge...
Applied patch to 'src/modules/meson.build' cleanly.
==> Starting pkgver()...
==> Starting build()...
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true pulseaudio build -D gcov=false -D 'pulsedsp-location=/usr/\$LIB/pulseaudio' -D udevrulesdir=/usr/lib/udev/rules.d
The Meson build system
Version: 0.55.1
Source dir: /build/pulseaudio-airplay/src/pulseaudio
Build dir: /build/pulseaudio-airplay/src/build
Build type: native build
Program git-version-gen found: YES
Project name: pulseaudio
Project version: 13.99.1-104-gcc93e
Using 'CFLAGS' from environment with value: '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
Using 'LDFLAGS' from environment with value: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Using 'CPPFLAGS' from environment with value: '-D_FORTIFY_SOURCE=2'
Using 'CXXFLAGS' from environment with value: '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
Using 'LDFLAGS' from environment with value: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Using 'CPPFLAGS' from environment with value: '-D_FORTIFY_SOURCE=2'
Using 'CFLAGS' from environment with value: '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
Using 'LDFLAGS' from environment with value: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Using 'CPPFLAGS' from environment with value: '-D_FORTIFY_SOURCE=2'
C compiler for the host machine: cc (gcc 10.2.0 "cc (GCC) 10.2.0")
C linker for the host machine: cc ld.bfd 2.35
Using 'CXXFLAGS' from environment with value: '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
Using 'LDFLAGS' from environment with value: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Using 'CPPFLAGS' from environment with value: '-D_FORTIFY_SOURCE=2'
C++ compiler for the host machine: c++ (gcc 10.2.0 "c++ (GCC) 10.2.0")
C++ linker for the host machine: c++ ld.bfd 2.35
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (1.7.3)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency bash-completion found: NO (tried pkgconfig and cmake)
Checking for type "_Bool" : YES 
Has header "arpa/inet.h" : YES 
Has header "byteswap.h" : YES 
Has header "cpuid.h" : YES 
Has header "dlfcn.h" : YES 
Has header "execinfo.h" : YES 
Has header "grp.h" : YES 
Has header "langinfo.h" : YES 
Has header "linux/sockios.h" : YES 
Has header "locale.h" : YES 
Has header "netdb.h" : YES 
Has header "netinet/in.h" : YES 
Has header "netinet/in_systm.h" : YES 
Has header "netinet/ip.h" : YES 
Has header "netinet/tcp.h" : YES 
Has header "pcreposix.h" : YES 
Has header "poll.h" : YES 
Has header "pwd.h" : YES 
Has header "regex.h" : YES 
Has header "sched.h" : YES 
Has header "stdint.h" : YES 
Has header "sys/atomic.h" : NO 
Has header "sys/capability.h" : YES 
Has header "sys/conf.h" : NO 
Has header "sys/dl.h" : NO 
Has header "sys/eventfd.h" : YES 
Has header "sys/filio.h" : NO 
Has header "sys/ioctl.h" : YES 
Has header "sys/mman.h" : YES 
Has header "sys/prctl.h" : YES 
Has header "sys/resource.h" : YES 
Has header "sys/select.h" : YES 
Has header "sys/socket.h" : YES 
Has header "sys/syscall.h" : YES 
Has header "sys/uio.h" : YES 
Has header "sys/un.h" : YES 
Has header "sys/wait.h" : YES 
Has header "syslog.h" : YES 
Has header "valgrind/memcheck.h" : NO 
Has header "xlocale.h" : NO 
Has header "pthread.h" : YES 
Header <pthread.h> has symbol "PTHREAD_PRIO_INHERIT" : YES 
Checking for function "accept4" : YES 
Checking for function "clock_gettime" : YES 
Checking for function "ctime_r" : YES 
Checking for function "fchmod" : YES 
Checking for function "fchown" : YES 
Checking for function "fork" : YES 
Checking for function "fstat" : YES 
Checking for function "getaddrinfo" : YES 
Checking for function "getgrgid_r" : YES 
Checking for function "getgrnam_r" : YES 
Checking for function "getpwnam_r" : YES 
Checking for function "getpwuid_r" : YES 
Checking for function "gettimeofday" : YES 
Checking for function "getuid" : YES 
Checking for function "lrintf" : YES 
Checking for function "lstat" : YES 
Checking for function "memfd_create" : YES 
Checking for function "mkfifo" : YES 
Checking for function "mlock" : YES 
Checking for function "nanosleep" : YES 
Checking for function "open64" : YES 
Checking for function "paccept" : NO 
Checking for function "pipe" : YES 
Checking for function "pipe2" : YES 
Checking for function "posix_fadvise" : YES 
Checking for function "posix_madvise" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "ppoll" : YES 
Checking for function "readlink" : YES 
Checking for function "setegid" : YES 
Checking for function "seteuid" : YES 
Checking for function "setpgid" : YES 
Checking for function "setregid" : YES 
Checking for function "setresgid" : YES 
Checking for function "setresuid" : YES 
Checking for function "setreuid" : YES 
Checking for function "setsid" : YES 
Checking for function "sig2str" : NO 
Checking for function "sigaction" : YES 
Checking for function "strerror_r" : YES 
Checking for function "strtod_l" : YES 
Checking for function "strtof" : YES 
Checking for function "symlink" : YES 
Checking for function "sysconf" : YES 
Checking for function "uname" : YES 
Header <sys/syscall.h> has symbol "SYS_memfd_create" : YES 
Checking for function "dgettext" : YES 
Header <signal.h> has symbol "SIGXCPU" : YES 
Header <netinet/in.h> has symbol "INADDR_NONE" : YES 
Header <unistd.h> has symbol "environ" : YES 
Header <sys/soundcard.h> has symbol "SOUND_PCM_READ_RATE" : YES 
Header <sys/soundcard.h> has symbol "SOUND_PCM_READ_CHANNELS" : YES 
Header <sys/soundcard.h> has symbol "SOUND_PCM_READ_BITS" : YES 
Library m found: YES
Run-time dependency threads found: YES
Checking for function "pthread_getname_np" with dependency threads: YES 
Checking for function "pthread_setaffinity_np" with dependency threads: YES 
Checking for function "pthread_setname_np" with dependency threads: YES 
Library cap found: YES
Library rt found: YES
Library dl found: YES
Checking for function "iconv_open" : YES 
Library ltdl found: YES
Run-time dependency tdb found: YES 1.4.3
Run-time dependency alsa found: YES 1.2.3.2
Run-time dependency libasyncns found: YES 0.8
Run-time dependency dbus-1 found: YES 1.12.20
Run-time dependency gio-2.0 found: YES 2.64.5
Run-time dependency glib-2.0 found: YES 2.64.5
Run-time dependency gtk+-3.0 found: YES 3.24.23
Run-time dependency orc-0.4 found: YES 0.4.31
Program orcc found: YES
Dependency samplerate skipped: feature samplerate disabled
Run-time dependency sndfile found: YES 1.0.28
Run-time dependency soxr found: YES 0.1.3
Run-time dependency libsystemd found: YES 246
Run-time dependency systemd found: YES 246
Run-time dependency x11-xcb found: YES 1.6.12
Run-time dependency xcb found: YES 1.14
Run-time dependency ice found: YES 1.0.10
Run-time dependency sm found: YES 1.2.3
Run-time dependency xtst found: YES 1.2.3
Has header "sys/soundcard.h" : YES 
Run-time dependency avahi-client found: YES 0.8
Run-time dependency sbc found: YES 1.4
Run-time dependency fftw3f found: YES 3.3.8
Run-time dependency jack found: YES 1.9.14
Run-time dependency lirc found: YES 0.10.1
Run-time dependency openssl found: YES 1.1.1g
Run-time dependency speexdsp found: YES 1.2.0
Run-time dependency libudev found: YES 246
Run-time dependency webrtc-audio-processing found: YES 0.3.1
Run-time dependency gstreamer-1.0 found: NO (tried pkgconfig)

pulseaudio/meson.build:681:0: ERROR: Dependency "gstreamer-1.0" not found, tried pkgconfig

A full log can be found at /build/pulseaudio-airplay/src/build/meson-logs/meson-log.txt
==> ERROR: A failure occurred in build().
    Aborting...

Offline

#11 2020-09-10 09:20:29

Mr. Tao
Member
Registered: 2020-06-27
Posts: 13

Re: How to set provides/conflicts in PKGBUILD to avoid conflicting package

I’ve added gst-plugins-base-libs dependency.
I think that the original author of the patch would the proper person to make adjustments. I am not familiar with pulseaudio at all.

Offline

Board footer

Powered by FluxBB