PAM & PAM-related packages renewed
This commit is contained in:
@@ -1,31 +1,38 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/copyleft/gpl.txt
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import pisitools
|
||||
|
||||
def setup():
|
||||
# shelltools.export("MOC5", "moc-qt5")
|
||||
#shelltools.export("MOC5", "moc-qt5")
|
||||
shelltools.system("sed -i s/systemd/elogind/ data/pam/*")
|
||||
|
||||
autotools.configure("--prefix=/usr \
|
||||
--localstatedir=/var \
|
||||
--sysconfdir=/etc \
|
||||
--sbindir=/usr/bin \
|
||||
--libexecdir=/usr/lib \
|
||||
--libexecdir=/usr/lib/lightdm \
|
||||
--disable-static \
|
||||
--disable-tests \
|
||||
--enable-liblightdm-qt5 \
|
||||
--with-greeter-user=lightdm \
|
||||
--with-greeter-session=pisi-lightdm-greeter")
|
||||
|
||||
|
||||
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
shelltools.system("cp tests/src/lightdm-session " + get.installDIR() + "/usr/bin")
|
||||
shelltools.system("sed -i '1 s/sh/bash --login/' " + get.installDIR() + "/usr/bin/lightdm-session")
|
||||
|
||||
pisitools.removeDir("/etc/init")
|
||||
pisitools.remove("/usr/lib/liblightdm-gobject-1.la")
|
||||
@@ -19,7 +19,6 @@ def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
if not os.path.exists(Cache):
|
||||
os.makedirs(Cache, mode=0755)
|
||||
@@ -28,20 +27,20 @@ def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
os.makedirs(Libdir, mode=0770)
|
||||
os.system("chown -R lightdm:lightdm /var/lib/lightdm-data")
|
||||
|
||||
|
||||
|
||||
if not os.path.exists(Libdir1):
|
||||
os.makedirs(Libdir1, mode=0770)
|
||||
os.system("chown -R lightdm:lightdm /var/lib/lightdm")
|
||||
|
||||
|
||||
if not os.path.exists(Logdir):
|
||||
os.makedirs(Logdir, mode=0711)
|
||||
|
||||
os.system("/bin/chgrp -R lightdm /var/log/lightdm")
|
||||
os.system("chmod +t /var/{cache/lightdm,lib/lightdm{,-data}}")
|
||||
os.system("chmod 755 /var/{cache/lightdm,lib/lightdm{,-data}}")
|
||||
|
||||
def postRemove():
|
||||
try:
|
||||
os.system ("userdel %s" % OUR_NAME)
|
||||
os.system ("groupdel %s" % OUR_NAME)
|
||||
except:
|
||||
pass
|
||||
pass
|
||||
|
||||
@@ -15,7 +15,7 @@ diff -Nuar a/data/lightdm.conf b/data/lightdm.conf
|
||||
#allow-guest=true
|
||||
#guest-session=
|
||||
-#session-wrapper=lightdm-session
|
||||
+session-wrapper=/usr/bin/wrapper
|
||||
+#session-wrapper=/usr/bin/wrapper
|
||||
#greeter-wrapper=
|
||||
#guest-wrapper=
|
||||
#display-setup-script=
|
||||
|
||||
@@ -27,10 +27,13 @@
|
||||
<Dependency>libxcb-devel</Dependency>
|
||||
<Dependency>libXdmcp-devel</Dependency>
|
||||
<Dependency>qt5-base-devel</Dependency>
|
||||
<Dependency>vala-devel</Dependency>
|
||||
<Dependency>libpcre-devel</Dependency>
|
||||
<Dependency>accountsservice-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">lightdm-default-config.patch</Patch>
|
||||
<Patch level="1">lightdm-pam_systemd-disable.patch</Patch>
|
||||
<!--Patch level="1">lightdm-pam_systemd-disable.patch</Patch-->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -56,7 +59,7 @@
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="library">/usr/lib/liblightdm-gobject-1.so*</Path>
|
||||
<Path fileType="library">/usr/libexec</Path>
|
||||
<Path fileType="library">/usr/lib/lightdm-guest-session</Path>
|
||||
<Path fileType="library">/usr/lib/lightdm/lightdm-guest-session</Path>
|
||||
<Path fileType="library">/usr/lib/tmpfiles.d</Path>
|
||||
<Path fileType="library">/usr/lib/girepository-1.0</Path>
|
||||
<Path fileType="data">/usr/share/accountsservice</Path>
|
||||
@@ -67,21 +70,20 @@
|
||||
<Path fileType="localedata">/usr/share/locale</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
<Path fileType="data">/usr/share/polkit-1</Path>
|
||||
<Path fileType="data">/usr/share/vala</Path>
|
||||
</Files>
|
||||
|
||||
<AdditionalFiles>
|
||||
<!--AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/lightdm.conf">lightdm.tmpfiles</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/lightdm">lightdm</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0755" target="/usr/bin/wrapper">wrapper</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
</AdditionalFiles-->
|
||||
|
||||
<Provides>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
<COMAR script="package.py">System.Package</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
|
||||
|
||||
<Package>
|
||||
<Name>lightdm-devel</Name>
|
||||
<Summary>LightDM is a cross-desktop display manager.</Summary>
|
||||
@@ -95,9 +97,10 @@
|
||||
<Path fileType="header">/usr/include/lightdm-gobject-1</Path>
|
||||
<Path fileType="library">/usr/lib/pkgconfig/liblightdm-gobject-1.pc</Path>
|
||||
<Path fileType="data">/usr/share/gir-1.0</Path>
|
||||
<Path fileType="data">/usr/share/vala</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
|
||||
<Package>
|
||||
<Name>liblightdm-qt5</Name>
|
||||
<Summary>Qt5 library for LightDM.</Summary>
|
||||
@@ -110,7 +113,7 @@
|
||||
<Path fileType="library">/usr/lib/liblightdm-qt5-3.so*</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
|
||||
<Package>
|
||||
<Name>liblightdm-qt5-devel</Name>
|
||||
<Summary>LightDM is a cross-desktop display manager.</Summary>
|
||||
@@ -126,6 +129,13 @@
|
||||
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2021-06-05</Date>
|
||||
<Version>1.30.0</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Berk Çakar</Name>
|
||||
<Email>berk2238@hotmail.com</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2021-05-04</Date>
|
||||
<Version>1.30.0</Version>
|
||||
|
||||
@@ -11,10 +11,12 @@ from pisi.actionsapi import shelltools
|
||||
def setup():
|
||||
autotools.autoreconf("-fiv")
|
||||
#shelltools.system("./autogen.sh")
|
||||
autotools.configure("--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--with-pam \
|
||||
--enable-gtk3")
|
||||
autotools.configure("--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--with-pam \
|
||||
--enable-gtk3 \
|
||||
--disable-consolekit \
|
||||
--with-systemdsystemunitdir=no")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Begin /etc/pam.d/lxdm
|
||||
|
||||
auth requisite pam_nologin.so
|
||||
auth required pam_env.so
|
||||
auth required pam_succeed_if.so uid >= 0 quiet
|
||||
auth include system-auth
|
||||
|
||||
account include system-account
|
||||
|
||||
password include system-password
|
||||
|
||||
session required pam_limits.so
|
||||
session include system-session
|
||||
|
||||
# End /etc/pam.d/lxdm
|
||||
+19
-12
@@ -19,24 +19,24 @@
|
||||
<Dependency>intltool</Dependency>
|
||||
<Dependency>iso-codes-devel</Dependency>
|
||||
<Dependency>gtk3-devel</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<Dependency>pam-devel</Dependency>
|
||||
<Dependency>elogind-devel</Dependency>
|
||||
<Dependency>cairo-devel</Dependency>
|
||||
<Dependency>pango-devel</Dependency>
|
||||
<Dependency>dbus-devel</Dependency>
|
||||
<Dependency>glib2-devel</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<Dependency>glib2-devel</Dependency>>
|
||||
<Dependency>libX11-devel</Dependency>
|
||||
<Dependency>libxcb-devel</Dependency>
|
||||
<Dependency>ConsoleKit-devel</Dependency>
|
||||
<Dependency>pam-devel</Dependency>
|
||||
<Dependency>gdk-pixbuf-devel</Dependency>
|
||||
<Dependency>at-spi2-atk-devel</Dependency>
|
||||
<Dependency>at-spi2-core-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>onscreenkeyboard.patch</Patch>
|
||||
<Patch>customizetion_for_pisilinux.patch</Patch>
|
||||
<Patch>customization-for-pisilinux.patch</Patch>
|
||||
<Patch>lxdm-0.5.3-upstream-fixes.patch</Patch>
|
||||
<Patch>lxdm-0.5.3-pam_console_selinux-disable.patch</Patch>
|
||||
<!--Patch>lxdm-0.5.3-pam_console_selinux-disable.patch</Patch-->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -55,12 +55,11 @@
|
||||
<Dependency>gtk3</Dependency>
|
||||
<Dependency>cairo</Dependency>
|
||||
<Dependency>pango</Dependency>
|
||||
<Dependency>gdk-pixbuf</Dependency>
|
||||
<Dependency>dbus</Dependency>
|
||||
<Dependency>glib2</Dependency>
|
||||
<Dependency>gdk-pixbuf</Dependency>
|
||||
<Dependency>libX11</Dependency>
|
||||
<Dependency>libxcb</Dependency>
|
||||
<Dependency>ConsoleKit</Dependency>
|
||||
<Dependency>elogind</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -72,7 +71,8 @@
|
||||
<Path fileType="data">/etc/conf.d/xdm</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/display-managers/lxdm.desktop">lxdm.desktop</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/display-managers/lxdm.desktop">lxdm.desktop</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/lxdm">lxdm</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
@@ -80,20 +80,27 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="12">
|
||||
<Date>2021-06-04</Date>
|
||||
<Version>0.5.3</Version>
|
||||
<Comment>LXDM rebuild</Comment>
|
||||
<Name>Berk Çakar</Name>
|
||||
<Email>berk2238@hotmail.com</Email>
|
||||
</Update>
|
||||
<Update release="11">
|
||||
<Date>2021-02-11</Date>
|
||||
<Version>0.5.3</Version>
|
||||
<Comment>Added new pisilinux theme</Comment>
|
||||
<Name>Ayhan Yalçınsoy</Name>
|
||||
<Email>ayhanyalcinsoy@pisilinux.org</Email>
|
||||
</Update>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2021-02-10</Date>
|
||||
<Version>0.5.3</Version>
|
||||
<Comment>Added new pisilinux theme</Comment>
|
||||
<Name>Ayhan Yalçınsoy</Name>
|
||||
<Email>ayhanyalcinsoy@pisilinux.org</Email>
|
||||
</Update>
|
||||
</Update>
|
||||
<Update release="9">
|
||||
<Date>2019-04-21</Date>
|
||||
<Version>0.5.3</Version>
|
||||
|
||||
@@ -12,16 +12,14 @@ from pisi.actionsapi import get
|
||||
def setup():
|
||||
#shelltools.export("PYTHON", "/usr/bin/python3")
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DUSE_QT5=ON \
|
||||
-DNO_SYSTEMD=ON \
|
||||
-DDBUS_CONFIG_DIR=/usr/share/dbus-1/system.d \
|
||||
-DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \
|
||||
-DUSE_WAYLAND=ON \
|
||||
-DDBUS_CONFIG_DIR=/usr/share/dbus-1/system.d \
|
||||
-DNO_SYSTEMD=ON \
|
||||
-DUSE_ELOGIND=ON \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/sddm \
|
||||
-DBUILD_MAN_PAGES=ON", sourceDir=".." )
|
||||
|
||||
@@ -36,10 +34,12 @@ def install():
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.install()
|
||||
|
||||
|
||||
shelltools.system('sed -i "s@system-local-login@system-login@" ' + get.installDIR() + "/etc/pam.d/sddm-autologin")
|
||||
|
||||
pisitools.insinto("/usr/share/sddm/themes/Sweet-Cat", "../Sweet-Cat-0.1/*")
|
||||
|
||||
pisitools.dodoc("../LICENSE")
|
||||
|
||||
|
||||
## If you don't like to see any character at all not even while being entered set this to true.
|
||||
pisitools.dosed("%s/usr/share/sddm/themes/Sweet-Cat/theme.conf" % get.installDIR(), 'ForceHideCompletePassword="false"', 'ForceHideCompletePassword="true"')
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
Fixes a build issue with the latest Qt 5.15 patches
|
||||
|
||||
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
|
||||
index 5f93a1b..d5f29a9 100644
|
||||
--- a/src/daemon/XorgDisplayServer.cpp
|
||||
+++ b/src/daemon/XorgDisplayServer.cpp
|
||||
@@ -65,7 +65,7 @@ namespace SDDM {
|
||||
// create a random hexadecimal number
|
||||
const char *digits = "0123456789abcdef";
|
||||
for (int i = 0; i < 32; ++i)
|
||||
- m_cookie[i] = digits[dis(gen)];
|
||||
+ m_cookie[i] = QLatin1Char(digits[dis(gen)]);
|
||||
}
|
||||
|
||||
XorgDisplayServer::~XorgDisplayServer() {
|
||||
@@ -0,0 +1,327 @@
|
||||
diff -Naur a/data/scripts/Xsession b/data/scripts/Xsession
|
||||
--- a/data/scripts/Xsession 2020-11-03 10:55:31.000000000 +0100
|
||||
+++ b/data/scripts/Xsession 2021-04-03 18:59:31.051127925 +0200
|
||||
@@ -62,7 +62,10 @@
|
||||
fi
|
||||
done
|
||||
fi
|
||||
-
|
||||
+if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS";
|
||||
+then
|
||||
+ eval "$(dbus-launch --sh-syntax --exit-with-session)"
|
||||
+fi
|
||||
# Load Xsession scripts
|
||||
# OPTIONFILE, USERXSESSION, USERXSESSIONRC and ALTUSERXSESSION are required
|
||||
# by the scripts to work
|
||||
diff -Naur a/services/sddm-autologin.pam b/services/sddm-autologin.pam
|
||||
--- a/services/sddm-autologin.pam 2020-11-03 10:55:31.000000000 +0100
|
||||
+++ b/services/sddm-autologin.pam 2021-04-03 19:02:11.514619253 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#%PAM-1.0
|
||||
auth required pam_env.so
|
||||
-auth required pam_tally2.so file=/var/log/tallylog onerr=succeed
|
||||
+auth required pam_faillock.so preauth
|
||||
auth required pam_shells.so
|
||||
auth required pam_nologin.so
|
||||
auth required pam_permit.so
|
||||
diff -Naur a/src/common/Session.cpp b/src/common/Session.cpp
|
||||
--- a/src/common/Session.cpp 2020-11-03 10:55:31.000000000 +0100
|
||||
+++ b/src/common/Session.cpp 2021-04-03 19:00:30.843278097 +0200
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
QString Session::desktopSession() const
|
||||
{
|
||||
- return fileName().replace(s_entryExtention, QString());
|
||||
+ return QFileInfo(m_fileName).completeBaseName();
|
||||
}
|
||||
|
||||
QString Session::desktopNames() const
|
||||
diff -Naur a/src/daemon/Seat.cpp b/src/daemon/Seat.cpp
|
||||
--- a/src/daemon/Seat.cpp 2020-11-03 10:55:31.000000000 +0100
|
||||
+++ b/src/daemon/Seat.cpp 2021-04-03 19:00:20.073491217 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
+#include <QTimer>
|
||||
|
||||
#include <functional>
|
||||
|
||||
@@ -52,7 +53,7 @@
|
||||
return m_name;
|
||||
}
|
||||
|
||||
- bool Seat::createDisplay(int terminalId) {
|
||||
+ void Seat::createDisplay(int terminalId) {
|
||||
//reload config if needed
|
||||
mainConfig.load();
|
||||
|
||||
@@ -84,12 +85,24 @@
|
||||
m_displays << display;
|
||||
|
||||
// start the display
|
||||
- if (!display->start()) {
|
||||
- qCritical() << "Could not start Display server on vt" << terminalId;
|
||||
- return false;
|
||||
+ startDisplay(display);
|
||||
+ }
|
||||
+
|
||||
+ void Seat::startDisplay(Display *display, int tryNr) {
|
||||
+ if (display->start())
|
||||
+ return;
|
||||
+
|
||||
+ // It's possible that the system isn't ready yet (driver not loaded,
|
||||
+ // device not enumerated, ...). It's not possible to tell when that changes,
|
||||
+ // so try a few times with a delay in between.
|
||||
+ qWarning() << "Attempt" << tryNr << "starting the Display server on vt" << display->terminalId() << "failed";
|
||||
+
|
||||
+ if(tryNr >= 3) {
|
||||
+ qCritical() << "Could not start Display server on vt" << display->terminalId();
|
||||
+ return;
|
||||
}
|
||||
|
||||
- return true;
|
||||
+ QTimer::singleShot(2000, display, [=] { startDisplay(display, tryNr + 1); });
|
||||
}
|
||||
|
||||
void Seat::removeDisplay(Display* display) {
|
||||
diff -Naur a/src/daemon/Seat.h b/src/daemon/Seat.h
|
||||
--- a/src/daemon/Seat.h 2020-11-03 10:55:31.000000000 +0100
|
||||
+++ b/src/daemon/Seat.h 2021-04-03 19:00:20.073491217 +0200
|
||||
@@ -35,13 +35,15 @@
|
||||
const QString &name() const;
|
||||
|
||||
public slots:
|
||||
- bool createDisplay(int terminalId = -1);
|
||||
+ void createDisplay(int terminalId = -1);
|
||||
void removeDisplay(SDDM::Display* display);
|
||||
|
||||
private slots:
|
||||
void displayStopped();
|
||||
|
||||
private:
|
||||
+ void startDisplay(SDDM::Display *display, int tryNr = 1);
|
||||
+
|
||||
QString m_name;
|
||||
|
||||
QVector<Display *> m_displays;
|
||||
diff -Naur a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
|
||||
--- a/src/daemon/XorgDisplayServer.cpp 2020-11-03 10:55:31.000000000 +0100
|
||||
+++ b/src/daemon/XorgDisplayServer.cpp 2021-04-03 19:00:20.076824484 +0200
|
||||
@@ -118,6 +118,11 @@
|
||||
if (m_started)
|
||||
return false;
|
||||
|
||||
+ if (process) {
|
||||
+ qCritical() << "Tried to start Xorg before previous instance exited";
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
// create process
|
||||
process = new QProcess(this);
|
||||
|
||||
@@ -136,106 +141,97 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (daemonApp->testing()) {
|
||||
- QStringList args;
|
||||
- QDir x11socketDir(QStringLiteral("/tmp/.X11-unix"));
|
||||
- int display = 100;
|
||||
- while (x11socketDir.exists(QStringLiteral("X%1").arg(display))) {
|
||||
- ++display;
|
||||
- }
|
||||
- m_display = QStringLiteral(":%1").arg(display);
|
||||
- args << m_display << QStringLiteral("-auth") << m_authPath << QStringLiteral("-br") << QStringLiteral("-noreset") << QStringLiteral("-screen") << QStringLiteral("800x600");
|
||||
- process->start(mainConfig.X11.XephyrPath.get(), args);
|
||||
-
|
||||
-
|
||||
- // wait for display server to start
|
||||
- if (!process->waitForStarted()) {
|
||||
- // log message
|
||||
- qCritical() << "Failed to start display server process.";
|
||||
-
|
||||
- // return fail
|
||||
- return false;
|
||||
- }
|
||||
- emit started();
|
||||
- } else {
|
||||
- // set process environment
|
||||
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
- env.insert(QStringLiteral("XCURSOR_THEME"), mainConfig.Theme.CursorTheme.get());
|
||||
- process->setProcessEnvironment(env);
|
||||
-
|
||||
- //create pipe for communicating with X server
|
||||
- //0 == read from X, 1== write to from X
|
||||
- int pipeFds[2];
|
||||
- if (pipe(pipeFds) != 0) {
|
||||
- qCritical("Could not create pipe to start X server");
|
||||
- }
|
||||
+ // set process environment
|
||||
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
+ env.insert(QStringLiteral("XCURSOR_THEME"), mainConfig.Theme.CursorTheme.get());
|
||||
+ process->setProcessEnvironment(env);
|
||||
+
|
||||
+ //create pipe for communicating with X server
|
||||
+ //0 == read from X, 1== write to from X
|
||||
+ int pipeFds[2];
|
||||
+ if (pipe(pipeFds) != 0) {
|
||||
+ qCritical("Could not create pipe to start X server");
|
||||
+ }
|
||||
|
||||
- // start display server
|
||||
- QStringList args = mainConfig.X11.ServerArguments.get().split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
- args << QStringLiteral("-auth") << m_authPath
|
||||
+ // start display server
|
||||
+ QStringList args;
|
||||
+ if (!daemonApp->testing()) {
|
||||
+ process->setProgram(mainConfig.X11.ServerPath.get());
|
||||
+ args << mainConfig.X11.ServerArguments.get().split(QLatin1Char(' '), QString::SkipEmptyParts)
|
||||
<< QStringLiteral("-background") << QStringLiteral("none")
|
||||
- << QStringLiteral("-noreset")
|
||||
- << QStringLiteral("-displayfd") << QString::number(pipeFds[1])
|
||||
<< QStringLiteral("-seat") << displayPtr()->seat()->name();
|
||||
|
||||
if (displayPtr()->seat()->name() == QLatin1String("seat0")) {
|
||||
args << QStringLiteral("vt%1").arg(displayPtr()->terminalId());
|
||||
}
|
||||
- qDebug() << "Running:"
|
||||
- << qPrintable(mainConfig.X11.ServerPath.get())
|
||||
- << qPrintable(args.join(QLatin1Char(' ')));
|
||||
- process->start(mainConfig.X11.ServerPath.get(), args);
|
||||
-
|
||||
- // wait for display server to start
|
||||
- if (!process->waitForStarted()) {
|
||||
- // log message
|
||||
- qCritical() << "Failed to start display server process.";
|
||||
-
|
||||
- // return fail
|
||||
- close(pipeFds[0]);
|
||||
- return false;
|
||||
- }
|
||||
+ } else {
|
||||
+ process->setProgram(mainConfig.X11.XephyrPath.get());
|
||||
+ args << QStringLiteral("-br")
|
||||
+ << QStringLiteral("-screen") << QStringLiteral("800x600");
|
||||
+ }
|
||||
|
||||
- // close the other side of pipe in our process, otherwise reading
|
||||
- // from it may stuck even X server exit.
|
||||
- close(pipeFds[1]);
|
||||
+ args << QStringLiteral("-auth") << m_authPath
|
||||
+ << QStringLiteral("-noreset")
|
||||
+ << QStringLiteral("-displayfd") << QString::number(pipeFds[1]);
|
||||
+
|
||||
+ process->setArguments(args);
|
||||
+ qDebug() << "Running:"
|
||||
+ << qPrintable(process->program())
|
||||
+ << qPrintable(process->arguments().join(QLatin1Char(' ')));
|
||||
+ process->start();
|
||||
+
|
||||
+ // wait for display server to start
|
||||
+ if (!process->waitForStarted()) {
|
||||
+ // log message
|
||||
+ qCritical() << "Failed to start display server process.";
|
||||
|
||||
- QFile readPipe;
|
||||
+ // return fail
|
||||
+ close(pipeFds[0]);
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
- if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
|
||||
- qCritical("Failed to open pipe to start X Server");
|
||||
+ // close the other side of pipe in our process, otherwise reading
|
||||
+ // from it may stuck even X server exit.
|
||||
+ close(pipeFds[1]);
|
||||
|
||||
- close(pipeFds[0]);
|
||||
- return false;
|
||||
- }
|
||||
- QByteArray displayNumber = readPipe.readLine();
|
||||
- if (displayNumber.size() < 2) {
|
||||
- // X server gave nothing (or a whitespace).
|
||||
- qCritical("Failed to read display number from pipe");
|
||||
+ QFile readPipe;
|
||||
|
||||
- close(pipeFds[0]);
|
||||
- return false;
|
||||
- }
|
||||
- displayNumber.prepend(QByteArray(":"));
|
||||
- displayNumber.remove(displayNumber.size() -1, 1); // trim trailing whitespace
|
||||
- m_display = QString::fromLocal8Bit(displayNumber);
|
||||
+ if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
|
||||
+ qCritical("Failed to open pipe to start X Server");
|
||||
|
||||
- // close our pipe
|
||||
close(pipeFds[0]);
|
||||
+ stop();
|
||||
+ return false;
|
||||
+ }
|
||||
+ QByteArray displayNumber = readPipe.readLine();
|
||||
+ if (displayNumber.size() < 2) {
|
||||
+ // X server gave nothing (or a whitespace).
|
||||
+ qCritical("Failed to read display number from pipe");
|
||||
|
||||
- emit started();
|
||||
+ close(pipeFds[0]);
|
||||
+ stop();
|
||||
+ return false;
|
||||
}
|
||||
+ displayNumber.prepend(QByteArray(":"));
|
||||
+ displayNumber.remove(displayNumber.size() -1, 1); // trim trailing whitespace
|
||||
+ m_display = QString::fromLocal8Bit(displayNumber);
|
||||
+
|
||||
+ // close our pipe
|
||||
+ close(pipeFds[0]);
|
||||
|
||||
// The file is also used by the greeter, which does care about the
|
||||
// display number. Write the proper entry, if it's different.
|
||||
if(m_display != QStringLiteral(":0")) {
|
||||
if(!addCookie(m_authPath)) {
|
||||
qCritical() << "Failed to write xauth file";
|
||||
+ stop();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
changeOwner(m_authPath);
|
||||
|
||||
+ emit started();
|
||||
+
|
||||
// set flag
|
||||
m_started = true;
|
||||
|
||||
@@ -244,8 +240,7 @@
|
||||
}
|
||||
|
||||
void XorgDisplayServer::stop() {
|
||||
- // check flag
|
||||
- if (!m_started)
|
||||
+ if (!process)
|
||||
return;
|
||||
|
||||
// log message
|
||||
@@ -260,6 +255,12 @@
|
||||
}
|
||||
|
||||
void XorgDisplayServer::finished() {
|
||||
+ // clean up
|
||||
+ if (process) {
|
||||
+ process->deleteLater();
|
||||
+ process = nullptr;
|
||||
+ }
|
||||
+
|
||||
// check flag
|
||||
if (!m_started)
|
||||
return;
|
||||
@@ -295,10 +296,6 @@
|
||||
displayStopScript->deleteLater();
|
||||
displayStopScript = nullptr;
|
||||
|
||||
- // clean up
|
||||
- process->deleteLater();
|
||||
- process = nullptr;
|
||||
-
|
||||
// remove authority file
|
||||
QFile::remove(m_authPath);
|
||||
|
||||
@@ -4,7 +4,7 @@ auth required pam_env.so
|
||||
|
||||
auth required pam_permit.so
|
||||
|
||||
auth sufficient pam_succeed_if.so uid >= 1000 quiet
|
||||
auth sufficient pam_succeed_if.so uid >= 0 quiet
|
||||
auth required pam_deny.so
|
||||
|
||||
account required pam_access.so
|
||||
|
||||
@@ -25,14 +25,17 @@
|
||||
<Dependency>extra-cmake-modules</Dependency>
|
||||
<Dependency>docutils</Dependency>
|
||||
<Dependency>python-docutils</Dependency>
|
||||
<Dependency>elogind-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>sddm-respect-user-flags.patch</Patch>
|
||||
<Patches>
|
||||
<!--Patch>sddm-respect-user-flags.patch</Patch>
|
||||
<Patch>sddm-0.14.0-consolekit.patch</Patch>
|
||||
<Patch>sddm-0.16.0-ck2-revert.patch</Patch>
|
||||
<Patch>pam-faillock.patch</Patch>
|
||||
<Patch>sddm-fix-race-pre.patch</Patch>
|
||||
<Patch>sddm-fix-race.patch</Patch>
|
||||
<Patch>sddm-fix-race.patch</Patch-->
|
||||
<Patch>sddm-0.19.0-consolidate-1.patch</Patch>
|
||||
<Patch>0002-sddm-fix-build.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -51,6 +54,7 @@
|
||||
<Dependency>pam</Dependency>
|
||||
<Dependency>libgcc</Dependency>
|
||||
<Dependency>libxcb</Dependency>
|
||||
<Dependency>elogind</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -63,8 +67,9 @@
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/sddm.conf">sddm.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm">sddm</AdditionalFile>
|
||||
<!--AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm">sddm</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm-autologin">sddm-autologin</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm-greeter">sddm-greeter</AdditionalFile-->
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/polkit-1/rules.d/10-backlight.rules">10-backlight.rules</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
@@ -74,6 +79,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="16">
|
||||
<Date>2021-06-04</Date>
|
||||
<Version>0.19.0</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Berk Çakar</Name>
|
||||
<Email>berk2238@hotmail.com</Email>
|
||||
</Update>
|
||||
<Update release="15">
|
||||
<Date>2021-01-09</Date>
|
||||
<Version>0.19.0</Version>
|
||||
|
||||
Reference in New Issue
Block a user