diff --git a/system/auth/elogind/actions.py b/system/auth/elogind/actions.py new file mode 100644 index 0000000000..7630629ecd --- /dev/null +++ b/system/auth/elogind/actions.py @@ -0,0 +1,30 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import mesontools + +def setup(): + mesontools.configure("-Drootlibdir=/usr/lib \ + --prefix=/usr \ + -Dpolkit=true \ + -Dsplit-bin=true \ + -Dsplit-usr=false \ + -Dhalt-path=/sbin/halt \ + -Dpamlibdir=/lib/security \ + -Dreboot-path=/sbin/reboot \ + -Dcgroup-controller=elogind \ + -Ddefault-hierarchy=unified \ + -Dpoweroff-path=/sbin/poweroff \ + -Ddocdir=/usr/share/doc/elogind \ + -Drootlibexecdir=/usr/lib/elogind \ + -Ddefault-kill-user-processes=false \ + -Ddbuspolicydir=/usr/share/dbus-1/system.d") + +def build(): + mesontools.build() + +def install(): + mesontools.install() \ No newline at end of file diff --git a/system/auth/elogind/comar/package.py b/system/auth/elogind/comar/package.py new file mode 100644 index 0000000000..03a572c2ff --- /dev/null +++ b/system/auth/elogind/comar/package.py @@ -0,0 +1,33 @@ +#!/usr/bin/python + +import os, re +import shutil + +OUR_ID = 95 +OUR_NAME = "elogind" +OUR_DESC = "elogind" +OUR_GRP ="wheel" + +DATADIR = "/var/lib/elogind" +DATADIRMODE = 0755 + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): + + # On first install... + if not os.path.exists(DATADIR): + os.makedirs(DATADIR, DATADIRMODE) + + try: + os.system ("groupadd -g %d %s" % (OUR_ID, OUR_NAME)) + os.system ("useradd -m -d /var/lib/elogind -r -s /bin/false -u %d -g %d %s -c %s" % (OUR_ID, OUR_ID, OUR_NAME, OUR_DESC)) + os.system ("passwd -l elogind > /dev/null") + os.system("/bin/chown -R elogind:elogind %s" % DATADIR) + except: + pass + +def postRemove(): + try: + os.system ("userdel %s" % OUR_NAME) + os.system ("groupdel %s" % OUR_NAME) + except: + pass diff --git a/system/auth/elogind/comar/service.py b/system/auth/elogind/comar/service.py new file mode 100644 index 0000000000..f26b755d15 --- /dev/null +++ b/system/auth/elogind/comar/service.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from comar.service import * +import os + +serviceType="server" +serviceDesc=_({"en": "Session Manager", + "tr": "Oturum Yöneticisi"}) +serviceDefault="on" +PIDFILE="/run/elogind.pid" +DAEMON="/usr/lib/elogind/elogind" + +@synchronized +def start(): + startService(command=DAEMON, + pidfile=PIDFILE, + detach=True, + donotify=True) + + +@synchronized +def stop(): + stopService(pidfile=PIDFILE, + donotify=True) + + try: + os.unlink(PIDFILE) + except OSError: + pass + +def status(): + return isServiceRunning(PIDFILE) diff --git a/system/auth/elogind/files/25-elogind.rules b/system/auth/elogind/files/25-elogind.rules new file mode 100644 index 0000000000..bdb4fcf5b2 --- /dev/null +++ b/system/auth/elogind/files/25-elogind.rules @@ -0,0 +1,8 @@ +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.libelogind.system.stop" || + action.id == "org.freedesktop.libelogind.system.restart" || + action.id == "org.freedesktop.libelogind.system.hibernate" || + action.id == "org.freedesktop.libelogind.system.suspend") { + return polkit.Result.YES; + } +}); diff --git a/system/auth/elogind/files/elogind-user b/system/auth/elogind/files/elogind-user new file mode 100644 index 0000000000..418cd2fecf --- /dev/null +++ b/system/auth/elogind/files/elogind-user @@ -0,0 +1,13 @@ +# Begin /etc/pam.d/elogind-user + +#%PAM-1.0 +auth required pam_unix.so +auth required pam_nologin.so +account required pam_unix.so +password required pam_unix.so +session required pam_unix.so +session required pam_loginuid.so +session required pam_elogind.so + + +# End /etc/pam.d/elogind-user diff --git a/system/auth/elogind/files/elogind-user2 b/system/auth/elogind/files/elogind-user2 new file mode 100644 index 0000000000..d1a30733f0 --- /dev/null +++ b/system/auth/elogind/files/elogind-user2 @@ -0,0 +1,16 @@ +# Begin /etc/pam.d/elogind-user + +account required pam_access.so +account include system-account + +session required pam_env.so +session required pam_limits.so +session required pam_unix.so +session required pam_loginuid.so +session optional pam_keyinit.so force revoke +session optional pam_elogind.so + +auth required pam_deny.so +password required pam_deny.so + +# End /etc/pam.d/elogind-user diff --git a/system/auth/elogind/files/elogind.pamd b/system/auth/elogind/files/elogind.pamd new file mode 100644 index 0000000000..ae42b35096 --- /dev/null +++ b/system/auth/elogind/files/elogind.pamd @@ -0,0 +1,7 @@ +#%PAM-1.0 + +auth include system-login +account include system-login +session include system-login +password include system-login +session optional libelogind.so diff --git a/system/auth/elogind/files/system-login b/system/auth/elogind/files/system-login new file mode 100644 index 0000000000..c347a4b39d --- /dev/null +++ b/system/auth/elogind/files/system-login @@ -0,0 +1,6 @@ +# Begin elogind addition + +session required pam_loginuid.so +session optional pam_elogind.so + +# End elogind addition diff --git a/system/auth/elogind/files/tmpfiles.conf b/system/auth/elogind/files/tmpfiles.conf new file mode 100644 index 0000000000..b4c29a0c3d --- /dev/null +++ b/system/auth/elogind/files/tmpfiles.conf @@ -0,0 +1 @@ +d /run/elogind 0755 elogind elogind diff --git a/system/auth/elogind/pspec.xml b/system/auth/elogind/pspec.xml new file mode 100644 index 0000000000..eba145f6f9 --- /dev/null +++ b/system/auth/elogind/pspec.xml @@ -0,0 +1,123 @@ + + + + + elogind + https://github.com/elogind + + PisiLinux Community + admins@pisilinux.org + + GPLv2.1 + app:console + Elogind User, Seat and Session Manager + Elogind is the systemd project's "logind", extracted out to be a standalone daemon. It integrates with PAM to know the set of users that are logged in to a system and whether they are logged in graphically, on the console, or remotely. + https://github.com/elogind/elogind/archive/v246.9.2.tar.gz + + gperf + meson + ninja + libxslt + sysvinit + kauth-devel + kcoreaddons-devel + acl-devel + pam-devel + dbus-devel + audit-devel + docbook-xsl + eudev-devel + glib2-devel + libcap-devel + polkit-devel + cgmanager-devel + libevdev + p11-kit-devel + kernel-headers + libpcre2-devel + bash-completion + + + + + + + + elogind + Elogind User, Seat and Session Manager + + acl + pam + audit + kauth + kcoreaddons + eudev + libevdev + dbus + polkit + cgmanager + libcap + bash-completion + + + /etc + /lib + /bin + /usr/lib + /usr/share/doc + /usr/share/man + /usr/share/zsh + /usr/bin + /usr/share/dbus-1 + /usr/share/factory + /usr/share/polkit-1 + /usr/share/locale + /usr/share/bash-completion + + + + 25-elogind.rules + 25-elogind.rules + elogind-user + system-login + elogind.pamd + + + System.Service + System.Package + + + + + + + + elogind-devel + Development files for elogind + + elogind + + + /usr/include + /usr/lib/pkgconfig + + + + + + 2021-01-31 + 246.9.2 + Version Bump. + Ali Cengiz Kurt + alicengizkurt@gmail.com + + + 2020-02-28 + 243.7 + First Release. + Ayhan Yalçınsoy + ayhanyalcinsoy@pisilinux.org + + + diff --git a/system/auth/elogind/translations.xml b/system/auth/elogind/translations.xml new file mode 100644 index 0000000000..7ae6510f77 --- /dev/null +++ b/system/auth/elogind/translations.xml @@ -0,0 +1,16 @@ + + + + elogind + Elogind; kullanıcı, oturum ve seat Yöneticisi + Elogind kullanıcıların oturum açma kapama durumlarını denetlerken çoklu oturumlara da izin veren hizmettir. + Elogind User, Seat and Session Manager + Elogind is the systemd project's "logind", extracted out to be a standalone daemon. It integrates with PAM to know the set of users that are logged in to a system and whether they are logged in graphically, on the console, or remotely. + + + + elogind-devel + elogind için geliştirme dosyaları + elogind-devel, elogind için geliştirme dosyalarını içerir. + + \ No newline at end of file