[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#716783: weston: Create weston-launch group



Package: weston
Tags: patch
Followup-For: Bug #716783

Hello,

  Find attached patch for fixing the issue.

Regards

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.10-1-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages weston depends on:
ii  libc6                     2.17-7
ii  libcairo2                 1.12.14-5
ii  libcolord1                1.0.1-1
ii  libdrm2                   2.4.45-3
ii  libegl1-mesa              9.1.4-1
ii  libegl1-mesa-drivers      9.1.4-1
ii  libgbm1                   9.1.4-1
ii  libgl1-mesa-glx [libgl1]  9.1.4-1
ii  libgles2-mesa             9.1.4-1
ii  libglib2.0-0              2.36.3-3
ii  libglu1-mesa [libglu1]    9.0.0-1
ii  libjpeg8                  8d-1
ii  liblcms2-2                2.2+git20110628-2.2
ii  libmtdev1                 1.1.3-1
ii  libpam0g                  1.1.3-9
ii  libpixman-1-0             0.26.0-4
ii  libpng12-0                1.2.49-4
ii  libsystemd-login0         200-0~0.1
ii  libudev1                  200-0~0.1
ii  libwayland-client0        1.2.0-1
ii  libwayland-cursor0        1.2.0-1
ii  libwayland-server0        1.2.0-1
ii  libx11-6                  2:1.6.0-1
ii  libx11-xcb1               2:1.6.0-1
ii  libxcb-render0            1.9.1-3
ii  libxcb-shape0             1.9.1-3
ii  libxcb-shm0               1.9.1-3
ii  libxcb-xfixes0            1.9.1-3
ii  libxcb1                   1.9.1-3
ii  libxcursor1               1:1.1.14-1
ii  libxkbcommon0             0.3.1-1

Versions of packages weston recommends:
ii  libgl1-mesa-dri  9.1.4-1

weston suggests no packages.

-- no debconf information
>From 1145f7c1d4870befdc3f0007d472865af03bd3bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9ctor=20Or=C3=B3n=20Mart=C3=ADnez?= <zumbi@debian.org>
Date: Thu, 8 Aug 2013 20:04:34 +0200
Subject: [PATCH 1/1] Add weston-launch group
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

  In order to run weston-launch, users should be part of
  weston-launch group.

Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
---
 debian/weston.postinst | 27 +++++++++++++++++++++++++++
 debian/weston.prerm    |  8 ++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 debian/weston.postinst
 create mode 100644 debian/weston.prerm

diff --git a/debian/weston.postinst b/debian/weston.postinst
new file mode 100644
index 0000000..0212664
--- /dev/null
+++ b/debian/weston.postinst
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+
+        # create weston-launch group if not already present
+        if ! getent group weston-launch > /dev/null; then
+            addgroup --system --quiet weston-launch
+        fi
+
+        if [ -u `which weston-launch` ]; then
+            chmod +s `which weston-launch`
+        fi
+
+        ;;
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/weston.prerm b/debian/weston.prerm
new file mode 100644
index 0000000..194337e
--- /dev/null
+++ b/debian/weston.prerm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+if [ "$1" = "remove" ]; then
+    delgroup --system --quiet weston-launch
+fi
+
-- 
1.8.3.2


Reply to: