From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sys-auth/nss-pam-ldapd/files/nslcd-init-r1 | 36 ++++++++++++++++++++++ sys-auth/nss-pam-ldapd/files/nslcd-init-r2 | 28 +++++++++++++++++ sys-auth/nss-pam-ldapd/files/nslcd-run-s6 | 3 ++ sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf | 1 + sys-auth/nss-pam-ldapd/files/nslcd.service | 14 +++++++++ ...-pam-ldapd-0.9.4-disable-py3-only-linters.patch | 13 ++++++++ .../nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch | 25 +++++++++++++++ sys-auth/nss-pam-ldapd/files/pynslcd.initd | 28 +++++++++++++++++ 8 files changed, 148 insertions(+) create mode 100644 sys-auth/nss-pam-ldapd/files/nslcd-init-r1 create mode 100644 sys-auth/nss-pam-ldapd/files/nslcd-init-r2 create mode 100644 sys-auth/nss-pam-ldapd/files/nslcd-run-s6 create mode 100644 sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf create mode 100644 sys-auth/nss-pam-ldapd/files/nslcd.service create mode 100644 sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch create mode 100644 sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch create mode 100644 sys-auth/nss-pam-ldapd/files/pynslcd.initd (limited to 'sys-auth/nss-pam-ldapd/files') diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-init-r1 b/sys-auth/nss-pam-ldapd/files/nslcd-init-r1 new file mode 100644 index 000000000000..776a7b3009e0 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nslcd-init-r1 @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="checkconfig" +cfg="/etc/nslcd.conf" + +depend() { + need net + use dns logger +} + +checkconfig() { + if [ ! -f "$cfg" ] ; then + eerror "Please create $cfg" + eerror "Example config: /usr/share/nss-ldapd/nslcd.conf" + return 1 + fi + return 0 +} + +start() { + checkpath -q -d /run/nslcd -o nslcd:nslcd + checkconfig || return $? + + ebegin "Starting nslcd" + start-stop-daemon --start --pidfile /var/run/nslcd/nslcd.pid \ + --exec /usr/sbin/nslcd + eend $? "Failed to start nslcd" +} + +stop() { + ebegin "Stopping nslcd" + start-stop-daemon --stop --pidfile /var/run/nslcd/nslcd.pid + eend $? "Failed to stop nslcd" +} diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-init-r2 b/sys-auth/nss-pam-ldapd/files/nslcd-init-r2 new file mode 100644 index 000000000000..55ef9a53774f --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nslcd-init-r2 @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/sbin/nslcd +pidfile=/var/run/nslcd/nslcd.pid +extra_commands="checkconfig" +cfg="/etc/nslcd.conf" + +depend() { + need net + use dns logger +} + +checkconfig() { + if [ ! -f "$cfg" ] ; then + eerror "Please create $cfg" + eerror "Example config: /usr/share/nss-ldapd/nslcd.conf" + return 1 + fi + return 0 +} + +start_pre() { + checkpath -q -d /run/nslcd -o nslcd:nslcd + checkconfig + return $? +} diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-run-s6 b/sys-auth/nss-pam-ldapd/files/nslcd-run-s6 new file mode 100644 index 000000000000..264da009ba11 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nslcd-run-s6 @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/nslcd -n diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf b/sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf new file mode 100644 index 000000000000..ac4ee0ad8649 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf @@ -0,0 +1 @@ +d /run/nslcd 0755 nslcd nslcd - diff --git a/sys-auth/nss-pam-ldapd/files/nslcd.service b/sys-auth/nss-pam-ldapd/files/nslcd.service new file mode 100644 index 000000000000..030cc2c90eb1 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nslcd.service @@ -0,0 +1,14 @@ +[Unit] +Description=NSS and PAM LDAP client daemon +After=network-online.target +Wants=network-online.target nss-lookup.target syslog.service +Before=nss-user-lookup.target + +[Service] +Type=forking +PIDFile=/var/run/nslcd/nslcd.pid +ExecStart=/usr/sbin/nslcd + +[Install] +WantedBy=multi-user.target +RequiredBy=nss-user-lookup.target diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch new file mode 100644 index 000000000000..06dcc2513a39 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch @@ -0,0 +1,13 @@ +diff --git a/tests/pylint.rc b/tests/pylint.rc +index 7f0bc13..b66d018 100644 +--- a/tests/pylint.rc ++++ b/tests/pylint.rc +@@ -19,7 +19,7 @@ enable= + # can either give multiple identifier separated by comma (,) or put this option + # multiple time (only on the command line, not in the configuration file where + # it should appear only once). +-disable=E1101 ++disable=E1101,E1608,E1606,E1601 + + + [REPORTS] diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch new file mode 100644 index 000000000000..11c86eff2e24 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch @@ -0,0 +1,25 @@ +diff --git a/pynslcd/pynslcd.py b/pynslcd/pynslcd.py +index d367a8c..9a52120 100755 +--- a/pynslcd.py ++++ b/pynslcd.py +@@ -30,13 +30,13 @@ import threading + import daemon + import ldap + +-from tio import TIOStream +-import cfg +-import common +-import constants +-import invalidator +-import mypidfile +-import search ++from pynslcd.tio import TIOStream ++import pynslcd.cfg as cfg ++import pynslcd.common as common ++import pynslcd.constants as constants ++import pynslcd.invalidator as invalidator ++import pynslcd.mypidfile as mypidfile ++import pynslcd.search as search + + + # the name of the program diff --git a/sys-auth/nss-pam-ldapd/files/pynslcd.initd b/sys-auth/nss-pam-ldapd/files/pynslcd.initd new file mode 100644 index 000000000000..7b6540810aed --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/pynslcd.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/sbin/pynslcd +pidfile=/var/run/nslcd/nslcd.pid +extra_commands="checkconfig" +cfg="/etc/nslcd.conf" + +depend() { + need net + use dns logger +} + +checkconfig() { + if [ ! -f "$cfg" ] ; then + eerror "Please create $cfg" + eerror "Example config: /usr/share/nss-ldapd/nslcd.conf" + return 1 + fi + return 0 +} + +start_pre() { + checkpath -q -d /run/nslcd -o nslcd:nslcd + checkconfig + return $? +} -- cgit v1.2.3