You are not logged in.
Hi there,
I'm using the gmrender-ressurect-git package from AUR, thanks to hzeller and drewofdoom for that! :-)
drewofdoom recently decided to no longer maintain the package. I had a few suggestions for the PKGBUILD and posted them to the comments. Now that the package is unmaintained, I'm thinking about submitting my modified PKGBUILD for that package.
My first question is: Is there a way to specify that the package can be built for all arches, but the resulting binary package is arch-specific? I know ('any') is incorrect because that's for arch-independent stuff like scripts. ('i686' 'x86_64') works, but it's not really future-proof in case arm etc. become first-class citizens in a few years. Debian has 'all' and 'any' to differentiate between the "binary is arch dependent, source is not" and "both binary and source are arch-independent" cases, which is confusing and 'any' appears to be what 'all' is in Debian. I've tested arch=($CARCH) which seems to work– I assume this is not acceptable though?
Since I have no previous experience with creating PKGBUILDs, I want to be extra sure I'm not harming package quality, so I'd be glad if someone could have a look at my changes and the PKGBUILD in general.
Relevant diff: (checksums snipped, I'll get rid of $CARCH unless someone confirms this is a good thing)
@@ -7,11 +8,16 @@
pkgrel=1
pkgdesc="Application to stream music from a UPnP server using gstreamer."
-arch=('any')
+arch=($CARCH)
url="https://github.com/hzeller/gmrender-resurrect"
license=('GPL2')
conflicts=('gmediarender')
-depends=('gnome-icon-theme' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'gst-plugins-ugly' 'libupnp')
-makedepends=('git' 'autoconf' 'automake' 'libtool' 'libxml2')
-backup=(etc/conf.d/gmediarender)
+depends=('gnome-icon-theme' 'libupnp' 'gst-plugins-good' 'gst-plugins-base')
+optdepends=(
+ 'gst-libav: Extra media codecs'
+ 'gst-plugins-bad: Extra media codecs'
+ 'gst-plugins-ugly: Extra media codecs'
+)
+makedepends=('git')
+backup=('etc/conf.d/gmediarender')
install='gmrender-resurrect.install'
source=('git+https://github.com/hzeller/gmrender-resurrect.git'
@@ -32,5 +37,5 @@
cd $_gitname
./autogen.sh
- ./configure
+ ./configure --prefix=/usr/
make
}The gnome-icon-theme dependency seems questionable and namcap warns about it being unused. This software has no visible UI. The icon served to clients is included with the package. Maybe it's related to a gtk-update-icon-cache call in post_install(), because gmediarender doesn't even use GTK AFAICT. I'm afraid of removing the dependecy though, there must be a reason for it. :-) And I can't test my system without gnome-icon-theme because it's required by Unity. Maybe it's time to setup an Arch VM, I'll just keep the dep for now.
The gst-plugins-* are not strictly required to start gmediarender and namcap warns about that, but I'm not sure if it can play any files without them. Is it okay to have both of them in depends? Rhythmbox depends on those as well. The -bad, -ugly, -libav are in optdepends now.
I also have a question about user management. Right now, the gmediarender service is supposed to be run as root, which is suboptimal. I thought about adding User=nobody to the service file, but nobody can't play audio. For my system, I added a new gmediarender user and added that user to the audio group. I know packages like avahi or jenkins automate this in their install files. What is the recommended way to handle this situation, should I copy and adapt the avahi way to create a new user or is there some established way to have a daemon with audio support already?
Here's the full PKGBUILD, I'll get rid of $CARCH unless someone confirms this is a good thing:
# Original Author: Henner Zeller <h.zeller at acm dot org>
# Maintainer: Florian Will <florian dot will at gmail dot com>
# Contributor: Drew DeVore <w.drew.devore at gmail dot com>
pkgname=gmrender-resurrect-git
_gitname=gmrender-resurrect
pkgver=260.6d66c7b
pkgrel=1
pkgdesc="Application to stream music from a UPnP server using gstreamer."
arch=($CARCH)
url="https://github.com/hzeller/gmrender-resurrect"
license=('GPL2')
conflicts=('gmediarender')
depends=('gnome-icon-theme' 'libupnp' 'gst-plugins-good' 'gst-plugins-base')
optdepends=(
'gst-libav: Extra media codecs'
'gst-plugins-bad: Extra media codecs'
'gst-plugins-ugly: Extra media codecs'
)
makedepends=('git')
backup=('etc/conf.d/gmediarender')
install='gmrender-resurrect.install'
source=('git+https://github.com/hzeller/gmrender-resurrect.git'
'gmediarender.service'
'gmediarender')
md5sums=('SKIP'
'ad4ec88b4cd7984c0027131f69478c1c'
'979798ff9cac610930f13fb922ca95d4')
pkgver() {
cd $_gitname
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
build() {
cd $_gitname
./autogen.sh
./configure --prefix=/usr/
make
}
package() {
cd $_gitname
make DESTDIR=$pkgdir install
install -D -m 644 $srcdir/gmediarender.service "$pkgdir/usr/lib/systemd/system/gmediarender.service"
install -D -m 644 $srcdir/gmediarender "$pkgdir/etc/conf.d/gmediarender"
}Last edited by w-flo (2014-07-14 21:58:44)
Offline
Arch supports only 2 architectures - i686 and x86_64. And it does not support ARM. All ARM users should use "makepkg -A" flag that just skips supported arch check.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
Alright, thanks anatolik. I will hardcode that. If there are no further comments, I'll use the avahi way to create a new user.
Offline
There is other thing... not supported by arch but....
PKGBUILD are bash script so you could add 'x86_64' 'i686' 'armv7h' 'armv7' 'armv6' and so on to arch, but you shall not post them on AUR cause this is a non support by AUR/arch thing.
I never test if pacman complain or not about that, but there is the hack ised in arch arm
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline
AUR has packages with arm arch in there: https://aur.archlinux.org/packages/st/st-git/PKGBUILD
Offline
You could suggest a new architecture term on the pacman-dev mailing list.
To avoid further confusion with debian's any and all, I would suggest * as a pseudo-glob pattern. You could even suggest that they implement true globbing (e.g for arm*).
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks for the architecture comments. I'm interested in this topic because ALARM brought me to arch (although I've replaced the raspberry pi with an Intel-based machine now).
Well, I'm afraid of starting some kind of flame war by suggesting this officially as a lowly arch noob. I'll leave it up to the people who might profit by something like this (i.e. ALARM – or maybe they don't care and are fine with the current solution, in which case the change is not required at all). For the record, I like the glob solution. It's more flexible than just 'all' and it's easier to memorize the difference between 'any' and '*' compared to 'any' and 'all'.
It turned out the "adding users" topic is not an issue, because I realized I can simply set "User=nobody / Group=audio" in the systemd unit file to get rid of root privileges while keeping the permission to play audio without logging in. I also set up a minimal Arch VM to test if gnome-icon-theme can be dropped. I found no problems without that package, so I think I'm now ready to upload the modified PKGBUILD (and related files) to the AUR.
I'll flag this topic as solved. Feel free to add more comments though. Thanks everyone ![]()
Offline