summaryrefslogtreecommitdiff
path: root/pcr/libcgroup
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-10-08 22:20:37 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-10-08 22:20:37 -0300
commitfccf9769e2c26f577f6214ed9d0dbb30cb8c51bd (patch)
treecc5312eeed95e18d8e2c6009c568f3d32501bc01 /pcr/libcgroup
parent69962c022fb4ed68b9163e60183fff714308e4e3 (diff)
parent3a0ad5dc35d5cff379cdfc736b9cae856416fe6a (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/abe/PKGBUILD community/account-plugins/PKGBUILD community/adesklets/PKGBUILD community/aircrack-ng/PKGBUILD community/audit/PKGBUILD community/bchunk/PKGBUILD community/bibutils/PKGBUILD community/cantata/PKGBUILD community/cdck/PKGBUILD community/cinnamon-control-center/PKGBUILD community/clusterssh/PKGBUILD community/consonance/PKGBUILD community/credentials-preferences/PKGBUILD community/dee/PKGBUILD community/dosbox/PKGBUILD community/drbd/PKGBUILD community/dvdisaster/PKGBUILD community/ekg/PKGBUILD community/ekg2/PKGBUILD community/emelfm2/PKGBUILD community/erlang/PKGBUILD community/ettercap/PKGBUILD community/evilwm/PKGBUILD community/fatrat/PKGBUILD community/fcitx-mozc/PKGBUILD community/fcrackzip/PKGBUILD community/ffmpegsource/PKGBUILD community/fssos-nsvs/PKGBUILD community/geda-gaf/PKGBUILD community/gnome-applets/PKGBUILD community/gnome-panel/PKGBUILD community/gnustep-make/PKGBUILD community/gwibber/PKGBUILD community/html2text/PKGBUILD community/intellij-idea-libs/PKGBUILD community/libcgns2/PKGBUILD community/libmatio/PKGBUILD community/librcc/PKGBUILD community/libsignon-glib/PKGBUILD community/linux-tools/PKGBUILD community/minitube/PKGBUILD community/mpdscribble/PKGBUILD community/mplayer2/PKGBUILD community/musepack-tools/PKGBUILD community/nginx/PKGBUILD community/pam_pwcheck/PKGBUILD community/portaudio/PKGBUILD community/portaudio_cpp/PKGBUILD community/prelink/PKGBUILD community/projectm/PKGBUILD community/prosody/PKGBUILD community/python-basemap/PKGBUILD community/qgit/PKGBUILD community/raptor1/PKGBUILD community/sensors-applet/PKGBUILD community/signon-keyring-extension/PKGBUILD community/signon-plugin-oauth2/PKGBUILD community/signon-ui/PKGBUILD community/sshguard/PKGBUILD community/tea/PKGBUILD community/tint2/PKGBUILD community/tremulous/PKGBUILD community/vobcopy/PKGBUILD community/windowlab/PKGBUILD community/xdelta/PKGBUILD community/xmms2/PKGBUILD community/xosd/PKGBUILD core/gdbm/PKGBUILD core/heirloom-mailx/PKGBUILD core/libffi/PKGBUILD core/procps-ng/PKGBUILD core/systemd/PKGBUILD core/tar/PKGBUILD cross/mips64el-unknown-linux-gnu-linux-libre-api-headers/PKGBUILD extra/arj/PKGBUILD extra/audacity/PKGBUILD extra/cdparanoia/PKGBUILD extra/elfutils/PKGBUILD extra/fltk/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/gstreamer/PKGBUILD extra/gtk2/PKGBUILD extra/gvfs/PKGBUILD extra/imagemagick/PKGBUILD extra/indent/PKGBUILD extra/kdepim/PKGBUILD extra/lcms/PKGBUILD extra/lesstif/PKGBUILD extra/libchewing/PKGBUILD extra/libdrm/PKGBUILD extra/libmodplug/PKGBUILD extra/libnotify/PKGBUILD extra/libsm/PKGBUILD extra/libxmu/PKGBUILD extra/libxpm/PKGBUILD extra/mariadb/PKGBUILD extra/mesa/PKGBUILD extra/mkvtoolnix/PKGBUILD extra/neon/PKGBUILD extra/ocaml/PKGBUILD extra/phonon-vlc/PKGBUILD extra/php-xcache/PKGBUILD extra/polkit/PKGBUILD extra/pycups/PKGBUILD extra/python-cairo/PKGBUILD extra/python/PKGBUILD extra/ruby/PKGBUILD extra/sqlite/PKGBUILD extra/talloc/PKGBUILD extra/thunar-archive-plugin/PKGBUILD extra/totem-plparser/PKGBUILD extra/totem/PKGBUILD extra/vinagre/PKGBUILD extra/vino/PKGBUILD extra/vlc/PKGBUILD extra/wget/PKGBUILD extra/xine-lib/PKGBUILD extra/xorg-server/PKGBUILD extra/xorg-twm/PKGBUILD extra/xorg-xclipboard/PKGBUILD extra/xorg-xclock/PKGBUILD extra/xorg-xkill/PKGBUILD extra/xorg-xlsclients/PKGBUILD extra/xorg-xman/PKGBUILD extra/xorg-xrdb/PKGBUILD extra/xpdf/PKGBUILD extra/xvidcore/PKGBUILD extra/yelp/PKGBUILD libre/audacious-plugins-libre/PKGBUILD libre/mc-libre/PKGBUILD libre/python2-reportlab-libre/PKGBUILD
Diffstat (limited to 'pcr/libcgroup')
-rw-r--r--pcr/libcgroup/PKGBUILD57
-rw-r--r--pcr/libcgroup/cgconfig.service17
-rw-r--r--pcr/libcgroup/cgrules.service16
-rw-r--r--pcr/libcgroup/libcgroup.install11
4 files changed, 101 insertions, 0 deletions
diff --git a/pcr/libcgroup/PKGBUILD b/pcr/libcgroup/PKGBUILD
new file mode 100644
index 000000000..849a5c128
--- /dev/null
+++ b/pcr/libcgroup/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
+
+pkgname=libcgroup
+pkgver=0.40rc1
+pkgrel=1
+pkgdesc="Library that abstracts the control group file system in Linux"
+arch=('i686' 'x86_64')
+url="http://libcg.sourceforge.net"
+license=(LGPL)
+backup=('etc/cgconfig.conf'
+ 'etc/cgrules.conf'
+ 'etc/cgsnapshot_blacklist.conf')
+options=('!emptydirs' '!libtool')
+install=libcgroup.install
+source=("http://downloads.sourceforge.net/libcg/${pkgname}-${pkgver/rc/.rc}.tar.bz2"
+ 'cgconfig.service'
+ 'cgrules.service')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver/rc/.rc}"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --sbindir=/usr/bin \
+ --enable-opaque-hierarchy=name=systemd
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver/rc/.rc}"
+
+ make DESTDIR="${pkgdir}" pkgconfigdir="/usr/lib/pkgconfig" install
+
+ install -D -m0644 samples/cgconfig.conf "${pkgdir}/etc/cgconfig.conf"
+ install -D -m0644 samples/cgrules.conf "${pkgdir}/etc/cgrules.conf"
+ install -D -m0644 samples/cgsnapshot_blacklist.conf "${pkgdir}/etc/cgsnapshot_blacklist.conf"
+
+ install -D -m0644 ${srcdir}/cgconfig.service "${pkgdir}/usr/lib/systemd/system/cgconfig.service"
+ install -D -m0644 ${srcdir}/cgrules.service "${pkgdir}/usr/lib/systemd/system/cgrules.service"
+
+ rm -f ${pkgdir}/usr/lib/security/pam_cgroup.{la,so,so.0}
+ mv ${pkgdir}/usr/lib/security/pam_cgroup.so.0.0.0 ${pkgdir}/usr/lib/security/pam_cgroup.so
+
+ rm -rf ${pkgdir}/etc/rc.d
+
+ # Make cgexec setgid cgred
+ chown root:160 ${pkgdir}/usr/bin/cgexec
+ chmod 2755 ${pkgdir}/usr/bin/cgexec
+}
+
+sha256sums=('c2fa2cfdfd1023093afb6de456fc3ac000f92a2f01b905bcdda1c3e36ad44072'
+ '808fc354abf36d7b6673dad790be275309ac57a2606d1be3732b9b3aeb5885eb'
+ '6b1340ff6717f55e5e57dacc72accc0bfaed7e50ef31439271b6ddc893cbf671')
diff --git a/pcr/libcgroup/cgconfig.service b/pcr/libcgroup/cgconfig.service
new file mode 100644
index 000000000..3e6689d77
--- /dev/null
+++ b/pcr/libcgroup/cgconfig.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Control Group configuration service
+
+# The service should be able to start as soon as possible,
+# before any 'normal' services:
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=basic.target shutdown.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/cgconfigparser -l /etc/cgconfig.conf -s 1664
+ExecStop=/usr/bin/cgclear -l /etc/cgconfig.conf -e
+
+[Install]
+WantedBy=sysinit.target
diff --git a/pcr/libcgroup/cgrules.service b/pcr/libcgroup/cgrules.service
new file mode 100644
index 000000000..cd0bf34fb
--- /dev/null
+++ b/pcr/libcgroup/cgrules.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Control Group rules service
+
+# The service should be able to start as soon as possible,
+# before any 'normal' services:
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=basic.target shutdown.target
+After=cgconfig.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/cgrulesengd -n -f -
+
+[Install]
+WantedBy=sysinit.target
diff --git a/pcr/libcgroup/libcgroup.install b/pcr/libcgroup/libcgroup.install
new file mode 100644
index 000000000..a78216add
--- /dev/null
+++ b/pcr/libcgroup/libcgroup.install
@@ -0,0 +1,11 @@
+post_install() {
+ getent group cgred &>/dev/null || groupadd -r -g 160 cgred >/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent group cgred &>/dev/null && groupdel cgred >/dev/null
+}