summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothée Ravier2013-11-03 19:42:41 +0100
committerTimothée Ravier2013-11-03 19:42:41 +0100
commitce7cb98c730b2e8292f01e45a3f94785812834b5 (patch)
treeb57e1fe3549f69fdfbfb61e6dd96af030e2980a0
downloadaur-ce7cb98c730b2e8292f01e45a3f94785812834b5.tar.gz
General update: SELinux userspace & pkg renaming
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD92
-rw-r--r--pam-common6
-rw-r--r--pam-login7
-rw-r--r--pam-su9
-rw-r--r--util-linux.install21
-rw-r--r--uuidd.tmpfiles1
7 files changed, 180 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2839ddee89fa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,44 @@
+pkgbase = util-linux-selinux
+ pkgdesc = Miscellaneous system utilities for Linux
+ pkgver = 2.24
+ pkgrel = 1
+ url = http://www.kernel.org/pub/linux/utils/util-linux/
+ install = util-linux.install
+ arch = i686
+ arch = x86_64
+ groups = selinux
+ license = GPL2
+ makedepends = systemd
+ makedepends = python
+ depends = pam-selinux
+ depends = shadow-selinux
+ depends = coreutils
+ depends = glibc
+ depends = libselinux
+ optdepends = python: python bindings to libmount
+ provides = util-linux-ng=2.24
+ provides = eject
+ provides = util-linux=2.24-
+ conflicts = util-linux-ng
+ conflicts = eject
+ conflicts = util-linux
+ options = strip
+ options = debug
+ backup = etc/pam.d/chfn
+ backup = etc/pam.d/chsh
+ backup = etc/pam.d/login
+ backup = etc/pam.d/su
+ backup = etc/pam.d/su-l
+ source = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.xz
+ source = uuidd.tmpfiles
+ source = pam-login
+ source = pam-common
+ source = pam-su
+ md5sums = 4fac6443427f575fc5f3531a4ad2ca01
+ md5sums = a39554bfd65cccfd8254bb46922f4a67
+ md5sums = 4368b3f98abd8a32662e094c54e7f9b1
+ md5sums = a31374fef2cba0ca34dfc7078e2969e4
+ md5sums = fa85e5cce5d723275b14365ba71a8aad
+
+pkgname = util-linux-selinux
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a0afc20c0d28
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# $Id$
+# Maintainer: Tom Gundersen <teg@jklm.no>
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# SELinux Maintainer: Timothée Ravier <tim@siosm.fr>
+# SELinux Contributor: Nicky726 <nicky726@gmail.com>
+
+pkgname=util-linux-selinux
+pkgver=2.24
+pkgrel=1
+pkgdesc="Miscellaneous system utilities for Linux"
+url='http://www.kernel.org/pub/linux/utils/util-linux/'
+arch=('i686' 'x86_64')
+groups=('selinux')
+depends=('pam-selinux' 'shadow-selinux' 'coreutils' 'glibc' 'libselinux')
+optdepends=('python: python bindings to libmount')
+makedepends=('systemd' 'python')
+# checkdepends=('bc')
+conflicts=('util-linux-ng' 'eject' "${pkgname/-selinux}")
+provides=("util-linux-ng=$pkgver" 'eject' "${pkgname/-selinux}=${pkgver}-${pkrel}")
+license=('GPL2')
+options=('strip' 'debug')
+source=("ftp://ftp.kernel.org/pub/linux/utils/${pkgname/-selinux}/v2.24/${pkgname/-selinux}-$pkgver.tar.xz"
+ uuidd.tmpfiles
+ pam-login
+ pam-common
+ pam-su)
+backup=(etc/pam.d/chfn
+ etc/pam.d/chsh
+ etc/pam.d/login
+ etc/pam.d/su
+ etc/pam.d/su-l)
+install=util-linux.install
+md5sums=('4fac6443427f575fc5f3531a4ad2ca01'
+ 'a39554bfd65cccfd8254bb46922f4a67'
+ '4368b3f98abd8a32662e094c54e7f9b1'
+ 'a31374fef2cba0ca34dfc7078e2969e4'
+ 'fa85e5cce5d723275b14365ba71a8aad')
+
+build() {
+ cd "${pkgname/-selinux}-$pkgver"
+
+ ./configure --prefix=/usr \
+ --libdir=/usr/lib \
+ --bindir=/usr/bin \
+ --localstatedir=/run \
+ --enable-fs-paths-extra=/usr/bin \
+ --enable-raw \
+ --enable-vipw \
+ --enable-newgrp \
+ --enable-chfn-chsh \
+ --enable-write \
+ --enable-mesg \
+ --enable-socket-activation \
+ --with-python=3 \
+ --with-selinux
+
+# --enable-reset \ # part of ncurses
+# --enable-last \ # not compat
+
+ make
+}
+
+#check() {
+# fails for some reason in chroot, works outside
+# make -C "${pkgname/-selinux}-$pkgver" check
+#}
+
+package() {
+ cd "${pkgname/-selinux}-$pkgver"
+
+ make DESTDIR="${pkgdir}" install
+
+ # setuid chfn and chsh
+ chmod 4755 "$pkgdir"/usr/bin/{newgrp,ch{sh,fn}}
+
+ # install PAM files for login-utils
+ install -Dm644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chfn"
+ install -m644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chsh"
+ install -m644 "$srcdir/pam-login" "$pkgdir/etc/pam.d/login"
+ install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su"
+ install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su-l"
+
+ # include tmpfiles fragment for uuidd
+ # TODO(dreisner): offer this upstream?
+ install -Dm644 "$srcdir/uuidd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/uuidd.conf"
+
+ # usrmove
+ cd "$pkgdir"
+ mv {,usr/}sbin/* usr/bin
+ rmdir sbin usr/sbin
+}
diff --git a/pam-common b/pam-common
new file mode 100644
index 000000000000..a7bf8a4a5b08
--- /dev/null
+++ b/pam-common
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/pam-login b/pam-login
new file mode 100644
index 000000000000..1960d9497c08
--- /dev/null
+++ b/pam-login
@@ -0,0 +1,7 @@
+#%PAM-1.0
+
+auth required pam_securetty.so
+auth requisite pam_nologin.so
+auth include system-local-login
+account include system-local-login
+session include system-local-login
diff --git a/pam-su b/pam-su
new file mode 100644
index 000000000000..cf15f40f1ae7
--- /dev/null
+++ b/pam-su
@@ -0,0 +1,9 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+# Uncomment the following line to implicitly trust users in the "wheel" group.
+#auth sufficient pam_wheel.so trust use_uid
+# Uncomment the following line to require a user to be in the "wheel" group.
+#auth required pam_wheel.so use_uid
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/util-linux.install b/util-linux.install
new file mode 100644
index 000000000000..4c0bb107c08a
--- /dev/null
+++ b/util-linux.install
@@ -0,0 +1,21 @@
+post_install() {
+ # we don't want use systemd-tmpfiles here because
+ # the package dependency would create a circular dep.
+ if [ ! -d run/uuidd ]; then
+ # refer to uid/gid by number to avoid dependency on filesystem
+ install -o 68 -g 68 -dm755 run/uuidd
+ fi
+}
+
+post_upgrade() {
+ if [ "$(vercmp $2 2.21.2-4)" -lt 0 ]; then
+ if [ -f /var/lib/hwclock/adjtime ]; then
+ mv /var/lib/hwclock/adjtime /etc/adjtime
+ fi
+ if [ -d /var/lib/hwclock ]; then
+ rmdir /var/lib/hwclock
+ fi
+ fi
+
+ post_install
+}
diff --git a/uuidd.tmpfiles b/uuidd.tmpfiles
new file mode 100644
index 000000000000..b059cfe658d8
--- /dev/null
+++ b/uuidd.tmpfiles
@@ -0,0 +1 @@
+d /run/uuidd 0755 uuidd uuidd