[arch-commits] Commit in jack/trunk (5 files)

Ray Rashif schiv at archlinux.org
Thu Oct 13 19:41:57 UTC 2011


    Date: Thursday, October 13, 2011 @ 15:41:56
  Author: schiv
Revision: 140417

upgpkg: jack 0.121.3-2

implement FS#26343; remove changelog

Added:
  jack/trunk/40-hpet-permissions.rules
  jack/trunk/99-realtime.conf
  jack/trunk/jack.install
Modified:
  jack/trunk/PKGBUILD
Deleted:
  jack/trunk/jack.changelog

---------------------------+
 40-hpet-permissions.rules |    2 +
 99-realtime.conf          |    2 +
 PKGBUILD                  |   18 +++++++++++---
 jack.changelog            |   21 ----------------
 jack.install              |   56 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 74 insertions(+), 25 deletions(-)

Added: 40-hpet-permissions.rules
===================================================================
--- 40-hpet-permissions.rules	                        (rev 0)
+++ 40-hpet-permissions.rules	2011-10-13 19:41:56 UTC (rev 140417)
@@ -0,0 +1,2 @@
+KERNEL=="rtc0", GROUP="realtime"
+KERNEL=="hpet", GROUP="realtime"

Added: 99-realtime.conf
===================================================================
--- 99-realtime.conf	                        (rev 0)
+++ 99-realtime.conf	2011-10-13 19:41:56 UTC (rev 140417)
@@ -0,0 +1,2 @@
+ at realtime 	- rtprio 	99
+ at realtime 	- memlock 	unlimited

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-10-13 18:13:21 UTC (rev 140416)
+++ PKGBUILD	2011-10-13 19:41:56 UTC (rev 140417)
@@ -6,7 +6,7 @@
 pkgname=jack
 _longname=jack-audio-connection-kit
 pkgver=0.121.3
-pkgrel=1
+pkgrel=2
 pkgdesc="A low-latency audio server"
 arch=('i686' 'x86_64')
 license=('GPL' 'LGPL')
@@ -15,13 +15,15 @@
 optdepends=('libffado: FireWire support'
             'celt: NetJACK driver')
 url="http://jackaudio.org/"
+backup=(etc/security/limits.d/99-realtime.conf)
 options=('!libtool')
 provides=("$_longname=$pkgver")
 conflicts=("$_longname")
 replaces=("$_longname")
-changelog=$pkgname.changelog
-source=("http://jackaudio.org/downloads/$_longname-$pkgver.tar.gz")
-md5sums=('35f470f7422c37b33eb965033f7a42e8')
+install=$pkgname.install
+source=("http://jackaudio.org/downloads/$_longname-$pkgver.tar.gz"
+        "99-realtime.conf"
+        "40-hpet-permissions.rules")
 
 build() {
   cd "$srcdir/$_longname-$pkgver"
@@ -35,6 +37,14 @@
   cd "$srcdir/$_longname-$pkgver"
 
   make DESTDIR="$pkgdir" install
+
+  # configure realtime access/scheduling
+  # see https://bugs.archlinux.org/task/26343
+  install -Dm644 "$srcdir/99-realtime.conf" \
+    "$pkgdir/etc/security/limits.d/99-realtime.conf"
+
+  install -Dm644 "$srcdir/40-hpet-permissions.rules" \
+    "$srcdir/lib/udev/rules.d/40-hpet-permissions.rules"
 }
 
 # vim:set ts=2 sw=2 et:

Deleted: jack.changelog
===================================================================
--- jack.changelog	2011-10-13 18:13:21 UTC (rev 140416)
+++ jack.changelog	2011-10-13 19:41:56 UTC (rev 140417)
@@ -1,21 +0,0 @@
-29 Jul 2011 (GMT+8) Ray Rashif <schiv at archlinux.org>
-
-	* 0.121.2-2:
-	Added celt support with celt-0.7 from community
-	Will not bring celt to extra as it's very unstable
-
-8 Aug 2010 (GMT+8) Ray Rashif <schiv at archlinux.org>
-
-	* 0.118.0-4 :
-	Built against libffado
-		- for FireWire support (see FS#19626)
-	Removed init scripts (no longer in tarball; unsupported).
-
-	* PKGBUILD :
-	URL updated.
-	Licenses now GPL, LGPL according to 2-or-later convention
-		- removed custom installation (both are common)
-
-	* jack.changelog :
-	Added this changelog.
-	Only important changes will be logged.

Added: jack.install
===================================================================
--- jack.install	                        (rev 0)
+++ jack.install	2011-10-13 19:41:56 UTC (rev 140417)
@@ -0,0 +1,56 @@
+_addgroup() {
+  # _addgroup $GROUPNAME $GID
+  [ ${#@} -ne 2 ] && return 1
+
+  echo -n "  > Checking if '$1' group exists..."
+  if ! getent group $1 > /dev/null; then
+    echo "no"
+    echo "  > Add '$1' group"
+    echo -n "    >> checking if GID is in use..."
+		# no other package or user is supposed to use this gid
+		# delete the group and re-add it at the end without static gid
+		if getent group $2 > /dev/null; then
+      echo "yes"
+			firstgroup=$(getent group $2 | sed 's/:.*//')
+      firstusers=$(getent group $2 | sed 's/.*://')
+      echo "    >> delete group '$firstgroup'"
+			groupdel $firstgroup
+    else
+      echo "no"
+		fi
+
+    echo "    >> add our group with proper GID"
+		groupadd -g $2 $1
+
+		if [ -n "$firstgroup" ]; then
+      echo "    >> restore group '$firstgroup' with dynamic GID"
+      groupadd $firstgroup
+      [ -n "$firstusers" ] && gpasswd -M $firstusers $firstgroup
+    fi
+  else
+    echo "yes (all good)"
+  fi
+}
+
+post_install() {
+  _addgroup realtime 112
+  echo
+  echo "  * You must be part of the 'realtime' group to use RT scheduling"
+  echo "  * You don't need an 'RT kernel' to use RT scheduling"
+  echo "  * If you don't need RT start jack with '--no-realtime'"
+  echo "  * If you don't record or sequence audio you don't need RT"
+}
+
+post_upgrade() {
+  _addgroup realtime 112
+  echo
+  echo "  * Configuring RT through limits.conf has been deprecated"
+  echo "  * See /etc/security/limits.d/99-realtime.conf instead"
+}
+
+post_remove() {
+	[ "$(getent group realtime | cut -d ':' -f 3)" = '112' ] && \
+		groupdel realtime || true
+}
+
+# vim:set ts=2 sw=2 et:




More information about the arch-commits mailing list