GNU bug report logs - #67818
[PATCH] gnu: slim: Update to 1.4.0.

Previous Next

Package: guix-patches;

Reported by: Feng Shu <tumashu <at> 163.com>

Date: Thu, 14 Dec 2023 02:42:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67818 in the body.
You can then email your comments to 67818 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67818; Package guix-patches. (Thu, 14 Dec 2023 02:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Feng Shu <tumashu <at> 163.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 14 Dec 2023 02:42:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Feng Shu <tumashu <at> 163.com>
To: "guix-patches" <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: slim: Update to 1.4.0.
Date: Thu, 14 Dec 2023 09:28:44 +0800
From f433c6880782b2830c5295596b091fb493a99f61 Mon Sep 17 00:00:00 2001

* gnu/packages/display-managers.scm (slim)[version]: Update to 1.4.0.
[inputs]: Remove input label.
[arguments]: Use gexp and remove fix-0-pointer-comparison.
[home-pages]: Update to slim-fork's url.

* gnu/packages/patches/slim-config.patch: Port to slim-1.4.0.
* gnu/packages/patches/slim-display.patch: Port to slim-1.4.0.
* gnu/packages/patches/slim-reset.patch: Deleted, no ablilty to port this
patch for big change in v1.4.0.
* gnu/packages/patches/slim-session.patch: Deleted. seem to work without this
patch, further observation is needed.
* gnu/packages/patches/slim-sigusr1.patch: Deleted, fixed in upstream.

* gnu/local.mk: Remove slim-reset.patch, slim-session.patch, slim-sigur1.patch.
---
 gnu/local.mk                            |  5 +-
 gnu/packages/display-managers.scm       | 89 +++++++++++--------------
 gnu/packages/patches/slim-config.patch  | 43 +++++++-----
 gnu/packages/patches/slim-display.patch | 74 ++++++++++++--------
 gnu/packages/patches/slim-reset.patch   | 33 ---------
 gnu/packages/patches/slim-session.patch | 17 -----
 gnu/packages/patches/slim-sigusr1.patch | 33 ---------
 7 files changed, 112 insertions(+), 182 deletions(-)
 delete mode 100644 gnu/packages/patches/slim-reset.patch
 delete mode 100644 gnu/packages/patches/slim-session.patch
 delete mode 100644 gnu/packages/patches/slim-sigusr1.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8b4e525206..6672dc7cea 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1996,11 +1996,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/serf-python3.patch			\
   %D%/packages/patches/shakespeare-spl-fix-grammar.patch		\
   %D%/packages/patches/sharutils-CVE-2018-1000097.patch		\
-  %D%/packages/patches/slim-session.patch			\
   %D%/packages/patches/slim-config.patch			\
-  %D%/packages/patches/slim-sigusr1.patch			\
-  %D%/packages/patches/slim-reset.patch				\
-  %D%/packages/patches/slim-login.patch				\
+g  %D%/packages/patches/slim-login.patch				\
   %D%/packages/patches/slim-display.patch			\
   %D%/packages/patches/stex-copy-from-immutable-store.patch	\
   %D%/packages/patches/syslinux-gcc10.patch			\
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 935563c94c..7120c2ad75 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -486,59 +486,46 @@ (define-public lightdm-gtk-greeter
 (define-public slim
   (package
     (name "slim")
-    (version "1.3.6")
-    (source (origin
-	     (method url-fetch)
-             ;; Used to be available from download.berlios.de.
-	     (uri (string-append
-                   "mirror://sourceforge/slim.berlios/slim-"
-                   version ".tar.gz"))
-	     (sha256
-	      (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
-             (patches (search-patches "slim-config.patch"
-                                      "slim-reset.patch"
-                                      "slim-login.patch"
-                                      "slim-session.patch"
-                                      "slim-sigusr1.patch"
-                                      "slim-display.patch"))))
+    (version "1.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/slim-fork/slim-" version
+                           ".tar.gz"))
+       (sha256
+        (base32 "011jfmksy0kgw4z0y70mc80bm5kmz5i1sgm6krrfj0h00zak22rm"))
+       (patches (search-patches "slim-config.patch"
+                                "slim-login.patch"
+                                "slim-display.patch"))))
     (build-system cmake-build-system)
-    (inputs `(("linux-pam" ,linux-pam)
-	      ("libpng" ,libpng)
-	      ("libjpeg" ,libjpeg-turbo)
-	      ("freeglut" ,freeglut)
-	      ("libxrandr" ,libxrandr)
-	      ("libxrender" ,libxrender)
-	      ("freetype" ,freetype)
-	      ("fontconfig" ,fontconfig)
-              ("libx11" ,libx11)
-	      ("libxft" ,libxft)
-	      ("libxmu" ,libxmu)
-	      ("xauth" ,xauth)))
-    (native-inputs
-     (list pkg-config))
+    (inputs (list fontconfig
+                  freeglut
+                  freetype
+                  libjpeg-turbo
+                  libpng
+                  libx11
+                  libxft
+                  libxmu
+                  libxrandr
+                  libxrender
+                  linux-pam
+                  xauth))
+    (native-inputs (list pkg-config))
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-new-etc-location
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("/etc")
-                (string-append (assoc-ref %outputs "out") "/etc"))
-               (("install.*systemd.*")
-               ;; The build system's logic here is: if "Linux", then
-                ;; "systemd".  Strip that.
-                ""))
-             #t))
-         (add-before 'configure 'fix-0-pointer-comparison
-           (lambda _
-             (substitute* "panel.cpp"
-               (("WinGC < 0") "WinGC == NULL")))))
-       #:configure-flags '("-DUSE_PAM=yes"
-                           "-DUSE_CONSOLEKIT=no")
-       #:tests? #f))
-
-    ;; This used to be at <http://slim.berlios.de/>.
-    (home-page "https://github.com/iwamatsu/slim")
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'set-new-etc-location
+            (lambda _
+              (substitute* "CMakeLists.txt"
+                (("/etc")
+                 (string-append #$output "/etc"))))))
+      #:configure-flags
+      #~(list "-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no")
+      #:tests? #f))
+    ;; The original project (https://github.com/iwamatsu/slim) has not been
+    ;; maintained since 2013, so we use slim-fork instead.
+    (home-page "https://slim-fork.sourceforge.io/")
     (synopsis "Desktop-independent graphical login manager for X11")
     (description
      "SLiM is a Desktop-independent graphical login manager for X11, derived
diff --git a/gnu/packages/patches/slim-config.patch b/gnu/packages/patches/slim-config.patch
index 5e6135d75c..91eeb5f56c 100644
--- a/gnu/packages/patches/slim-config.patch
+++ b/gnu/packages/patches/slim-config.patch
@@ -1,27 +1,36 @@
 Allow the configuration file and theme directory to be specified at run time.
+
 Patch by Eelco Dolstra, from Nixpkgs.
+---
+ app.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
 
---- slim-1.3.6/app.cpp	2013-10-02 00:38:05.000000000 +0200
-+++ slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
-@@ -200,7 +200,9 @@
- 
- 	/* Read configuration and theme */
- 	cfg = new Cfg;
--	cfg->readConf(CFGFILE);
-+	char *cfgfile = getenv("SLIM_CFGFILE");
-+	if (!cfgfile) cfgfile = CFGFILE;
-+	cfg->readConf(cfgfile);
+diff --git a/app.cpp b/app.cpp
+index 237477d..735df9c 100644
+--- a/app.cpp
++++ b/app.cpp
+@@ -285,7 +285,9 @@ void App::Run()
+ 	if ( cfg == 0 )
+ 	{
+ 		cfg = new Cfg;
+-		cfg->readConf(CFGFILE);
++		const char* cfgfile = getenv("SLIM_CFGFILE");
++		if (!cfgfile) cfgfile = CFGFILE;
++		cfg->readConf(cfgfile);
+ 	}
  	string themebase = "";
  	string themefile = "";
- 	string themedir = "";
-@@ -208,7 +210,9 @@
- 	if (testing) {
- 		themeName = testtheme;
- 	} else {
+@@ -297,7 +299,9 @@ void App::Run()
+ 	}
+ 	else
+ 	{
 -		themebase = string(THEMESDIR) + "/";
-+		char *themesdir = getenv("SLIM_THEMESDIR");
++		const char* themesdir = getenv("SLIM_THEMESDIR");
 +		if (!themesdir) themesdir = THEMESDIR;
 +		themebase = string(themesdir) + "/";
  		themeName = cfg->getOption("current_theme");
  		string::size_type pos;
- 		if ((pos = themeName.find(",")) != string::npos) {
+ 		if ((pos = themeName.find(",")) != string::npos)
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/slim-display.patch b/gnu/packages/patches/slim-display.patch
index f68604a94b..b59e20c25c 100644
--- a/gnu/packages/patches/slim-display.patch
+++ b/gnu/packages/patches/slim-display.patch
@@ -1,39 +1,52 @@
-Add "display_name" configuration option and use its value instead of
-the hard coded one.
+Add "display_name" configuration option and use its value instead of the hard
+coded one.
 
 Patch by Diego N. Barbato
+---
+ app.cpp        | 23 ++++++++++-------------
+ cfg.cpp        |  1 +
+ switchuser.cpp |  2 +-
+ 3 files changed, 12 insertions(+), 14 deletions(-)
 
---- a/app.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/app.cpp	2019-04-27 13:48:23.479133531 +0200
-@@ -190,7 +190,13 @@
- }
+diff --git a/app.cpp b/app.cpp
+index b840e60..4f72da0 100644
+--- a/app.cpp
++++ b/app.cpp
+@@ -270,7 +270,16 @@ App::App(int argc, char** argv)
  
- void App::Run() {
+ void App::Run()
+ {
 -	DisplayName = DISPLAY;
 +	/* Read configuration */
-+	cfg = new Cfg;
-+	char *cfgfile = getenv("SLIM_CFGFILE");
-+	if (!cfgfile) cfgfile = CFGFILE;
-+	cfg->readConf(cfgfile);
++	if ( cfg == 0 )
++	{
++		cfg = new Cfg;
++		const char *cfgfile = getenv("SLIM_CFGFILE");
++		if (!cfgfile) cfgfile = CFGFILE;
++		cfg->readConf(cfgfile);
 +
-+	DisplayName = cfg->getOption("display_name").c_str();
++		DisplayName = cfg->getOption("display_name").c_str();
++	}
  
  #ifdef XNEST_DEBUG
  	char* p = getenv("DISPLAY");
-@@ -200,11 +206,7 @@
+@@ -281,14 +287,7 @@ void App::Run()
  	}
  #endif
  
 -	/* Read configuration and theme */
--	cfg = new Cfg;
--	char *cfgfile = getenv("SLIM_CFGFILE");
--	if (!cfgfile) cfgfile = CFGFILE;
--	cfg->readConf(cfgfile);
-+	/* Read theme */
+-	if ( cfg == 0 )
+-	{
+-		cfg = new Cfg;
+-		const char* cfgfile = getenv("SLIM_CFGFILE");
+-		if (!cfgfile) cfgfile = CFGFILE;
+-		cfg->readConf(cfgfile);
+-	}
++        /* Read theme */
  	string themebase = "";
  	string themefile = "";
  	string themedir = "";
-@@ -911,9 +913,7 @@
+@@ -1115,9 +1114,7 @@ int App::StartServer()
  	static const int MAX_XSERVER_ARGS = 256;
  	static char* server[MAX_XSERVER_ARGS+2] = { NULL };
  	server[0] = (char *)cfg->getOption("default_xserver").c_str();
@@ -44,7 +57,7 @@ Patch by Diego N. Barbato
  	char* args = new char[argOption.length()+2]; /* NULL plus vt */
  	strcpy(args, argOption.c_str());
  
-@@ -1233,7 +1233,7 @@
+@@ -1424,7 +1421,7 @@ void App::CreateServerAuth()
  	authfile = cfg->getOption("authfile");
  	remove(authfile.c_str());
  	putenv(StrConcat("XAUTHORITY=", authfile.c_str()));
@@ -53,9 +66,11 @@ Patch by Diego N. Barbato
  	  authfile);
  }
  
---- a/cfg.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/cfg.cpp	2019-04-27 13:49:40.511773743 +0200
-@@ -31,6 +31,7 @@
+diff --git a/cfg.cpp b/cfg.cpp
+index 37fb10d..a0c9bf1 100644
+--- a/cfg.cpp
++++ b/cfg.cpp
+@@ -40,6 +40,7 @@ Cfg::Cfg()
  	/* Configuration options */
  	options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
  	options.insert(option("default_xserver","/usr/bin/X"));
@@ -63,13 +78,18 @@ Patch by Diego N. Barbato
  	options.insert(option("xserver_arguments",""));
  	options.insert(option("numlock",""));
  	options.insert(option("daemon",""));
---- a/switchuser.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/switchuser.cpp	2019-04-27 13:50:19.380096651 +0200
-@@ -54,6 +54,6 @@
+diff --git a/switchuser.cpp b/switchuser.cpp
+index ca936ae..255f5d9 100644
+--- a/switchuser.cpp
++++ b/switchuser.cpp
+@@ -69,6 +69,6 @@ void SwitchUser::SetClientAuth(const char* mcookie)
  	string home = string(Pw->pw_dir);
  	string authfile = home + "/.Xauthority";
  	remove(authfile.c_str());
 -	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
-+	Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"),
++	Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"),
  	  authfile);
  }
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/slim-reset.patch
deleted file mode 100644
index eebee6b7b5..0000000000
--- a/gnu/packages/patches/slim-reset.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Do not reset chosen session and maintain the session-choser dialog after a
-failed login attempt.
-
-Patch by E. Bavier
-
---- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
-+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
-@@ -260,13 +260,12 @@
- }
- 
- void Panel::ClearPanel() {
--	session_name = "";
--    session_exec = "";
- 	Reset();
- 	XClearWindow(Dpy, Root);
- 	XClearWindow(Dpy, Win);
- 	Cursor(SHOW);
- 	ShowText();
-+	ShowSession();
- 	XFlush(Dpy);
- }
- 
-@@ -760,9 +760,7 @@
-         pair<string,string> ses = cfg->nextSession();
-         session_name = ses.first;
-         session_exec = ses.second;
--        if (session_name.size() > 0) {
--                ShowSession();
--        }
-+        ShowSession();
-  }
- 
- /* Display session type on the screen */
diff --git a/gnu/packages/patches/slim-session.patch b/gnu/packages/patches/slim-session.patch
deleted file mode 100644
index b85d3f7dd0..0000000000
--- a/gnu/packages/patches/slim-session.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Exit after the user's session has finished.  This works around slim's broken
-PAM session handling (see
-http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).
-
-Patch by Eelco Dolstra, from Nixpkgs.
-
---- slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
-+++ slim-1.3.6/app.cpp	2013-10-15 13:00:10.141210784 +0200
-@@ -816,7 +822,7 @@
- 	StopServer();
- 	RemoveLock();
- 	while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
--	Run();
-+	exit(OK_EXIT);
- }
- 
- void App::KillAllClients(Bool top) {
diff --git a/gnu/packages/patches/slim-sigusr1.patch b/gnu/packages/patches/slim-sigusr1.patch
deleted file mode 100644
index 344b02933e..0000000000
--- a/gnu/packages/patches/slim-sigusr1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This patch fixes SLiM so it really waits for the X server to be ready
-before attempting to connect to it.  Indeed, the X server notices that
-its parent process has a handler for SIGUSR1, and consequently sends it
-SIGUSR1 when it's ready to accept connections.
-
-The problem was that SLiM doesn't pay attention to SIGUSR1.  So in practice,
-if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on
-/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000,
-where nobody answers; eventually, it times out and tries again on
-/tmp/.X11-unix/X0, and finally it shows up on the screen.
-
-Patch by L. Courtès.
-
---- slim-1.3.6/app.cpp	2014-02-05 15:27:20.000000000 +0100
-+++ slim-1.3.6/app.cpp	2014-02-09 22:42:04.000000000 +0100
-@@ -119,7 +119,9 @@ void CatchSignal(int sig) {
- 	exit(ERR_EXIT);
- }
- 
-+static volatile int got_sigusr1 = 0;
- void User1Signal(int sig) {
-+	got_sigusr1 = 1;
- 	signal(sig, User1Signal);
- }
- 
-@@ -884,6 +886,7 @@ int App::WaitForServer() {
- 	int	ncycles	 = 120;
- 	int	cycles;
- 
-+	while (!got_sigusr1);
- 	for(cycles = 0; cycles < ncycles; cycles++) {
- 		if((Dpy = XOpenDisplay(DisplayName))) {
- 			XSetIOErrorHandler(xioerror);
-- 
2.39.2



-- 





Information forwarded to guix-patches <at> gnu.org:
bug#67818; Package guix-patches. (Fri, 15 Dec 2023 00:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 67818 <at> debbugs.gnu.org (full text, mbox):

From: Feng Shu <tumashu <at> 163.com>
To: 67818 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: slim: Update to 1.4.0.
Date: Fri, 15 Dec 2023 08:33:49 +0800
[v2-0001-gnu-slim-Update-to-1.4.0.patch (text/x-patch, inline)]
From 158553a6e263817fd6afd18ad26b31d40c55aa0c Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu <at> 163.com>
Date: Thu, 14 Dec 2023 09:28:44 +0800
Subject: [PATCH v2] gnu: slim: Update to 1.4.0.

* gnu/packages/display-managers.scm (slim)[version]: Update to 1.4.0.
[inputs]: Remove input label.
[arguments]: Use gexp and remove fix-0-pointer-comparison.
[home-pages]: Update to slim-fork's url.

* gnu/packages/patches/slim-config.patch: Port to slim-1.4.0.
* gnu/packages/patches/slim-display.patch: Port to slim-1.4.0.
* gnu/packages/patches/slim-reset.patch: Deleted, no ablilty to port this
patch for big change in v1.4.0.
* gnu/packages/patches/slim-session.patch: Deleted. seem to work without this
patch, further observation is needed.
* gnu/packages/patches/slim-sigusr1.patch: Deleted, fixed in upstream.

* gnu/local.mk: Remove slim-reset.patch, slim-session.patch, slim-sigur1.patch.
---
 gnu/local.mk                            |  3 -
 gnu/packages/display-managers.scm       | 89 +++++++++++--------------
 gnu/packages/patches/slim-config.patch  | 43 +++++++-----
 gnu/packages/patches/slim-display.patch | 74 ++++++++++++--------
 gnu/packages/patches/slim-reset.patch   | 33 ---------
 gnu/packages/patches/slim-session.patch | 17 -----
 gnu/packages/patches/slim-sigusr1.patch | 33 ---------
 7 files changed, 111 insertions(+), 181 deletions(-)
 delete mode 100644 gnu/packages/patches/slim-reset.patch
 delete mode 100644 gnu/packages/patches/slim-session.patch
 delete mode 100644 gnu/packages/patches/slim-sigusr1.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8b4e525206..5632c28b2d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1996,10 +1996,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/serf-python3.patch			\
   %D%/packages/patches/shakespeare-spl-fix-grammar.patch		\
   %D%/packages/patches/sharutils-CVE-2018-1000097.patch		\
-  %D%/packages/patches/slim-session.patch			\
   %D%/packages/patches/slim-config.patch			\
-  %D%/packages/patches/slim-sigusr1.patch			\
-  %D%/packages/patches/slim-reset.patch				\
   %D%/packages/patches/slim-login.patch				\
   %D%/packages/patches/slim-display.patch			\
   %D%/packages/patches/stex-copy-from-immutable-store.patch	\
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 935563c94c..7120c2ad75 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -486,59 +486,46 @@ (define-public lightdm-gtk-greeter
 (define-public slim
   (package
     (name "slim")
-    (version "1.3.6")
-    (source (origin
-	     (method url-fetch)
-             ;; Used to be available from download.berlios.de.
-	     (uri (string-append
-                   "mirror://sourceforge/slim.berlios/slim-"
-                   version ".tar.gz"))
-	     (sha256
-	      (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
-             (patches (search-patches "slim-config.patch"
-                                      "slim-reset.patch"
-                                      "slim-login.patch"
-                                      "slim-session.patch"
-                                      "slim-sigusr1.patch"
-                                      "slim-display.patch"))))
+    (version "1.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/slim-fork/slim-" version
+                           ".tar.gz"))
+       (sha256
+        (base32 "011jfmksy0kgw4z0y70mc80bm5kmz5i1sgm6krrfj0h00zak22rm"))
+       (patches (search-patches "slim-config.patch"
+                                "slim-login.patch"
+                                "slim-display.patch"))))
     (build-system cmake-build-system)
-    (inputs `(("linux-pam" ,linux-pam)
-	      ("libpng" ,libpng)
-	      ("libjpeg" ,libjpeg-turbo)
-	      ("freeglut" ,freeglut)
-	      ("libxrandr" ,libxrandr)
-	      ("libxrender" ,libxrender)
-	      ("freetype" ,freetype)
-	      ("fontconfig" ,fontconfig)
-              ("libx11" ,libx11)
-	      ("libxft" ,libxft)
-	      ("libxmu" ,libxmu)
-	      ("xauth" ,xauth)))
-    (native-inputs
-     (list pkg-config))
+    (inputs (list fontconfig
+                  freeglut
+                  freetype
+                  libjpeg-turbo
+                  libpng
+                  libx11
+                  libxft
+                  libxmu
+                  libxrandr
+                  libxrender
+                  linux-pam
+                  xauth))
+    (native-inputs (list pkg-config))
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-new-etc-location
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("/etc")
-                (string-append (assoc-ref %outputs "out") "/etc"))
-               (("install.*systemd.*")
-               ;; The build system's logic here is: if "Linux", then
-                ;; "systemd".  Strip that.
-                ""))
-             #t))
-         (add-before 'configure 'fix-0-pointer-comparison
-           (lambda _
-             (substitute* "panel.cpp"
-               (("WinGC < 0") "WinGC == NULL")))))
-       #:configure-flags '("-DUSE_PAM=yes"
-                           "-DUSE_CONSOLEKIT=no")
-       #:tests? #f))
-
-    ;; This used to be at <http://slim.berlios.de/>.
-    (home-page "https://github.com/iwamatsu/slim")
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'set-new-etc-location
+            (lambda _
+              (substitute* "CMakeLists.txt"
+                (("/etc")
+                 (string-append #$output "/etc"))))))
+      #:configure-flags
+      #~(list "-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no")
+      #:tests? #f))
+    ;; The original project (https://github.com/iwamatsu/slim) has not been
+    ;; maintained since 2013, so we use slim-fork instead.
+    (home-page "https://slim-fork.sourceforge.io/")
     (synopsis "Desktop-independent graphical login manager for X11")
     (description
      "SLiM is a Desktop-independent graphical login manager for X11, derived
diff --git a/gnu/packages/patches/slim-config.patch b/gnu/packages/patches/slim-config.patch
index 5e6135d75c..91eeb5f56c 100644
--- a/gnu/packages/patches/slim-config.patch
+++ b/gnu/packages/patches/slim-config.patch
@@ -1,27 +1,36 @@
 Allow the configuration file and theme directory to be specified at run time.
+
 Patch by Eelco Dolstra, from Nixpkgs.
+---
+ app.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
 
---- slim-1.3.6/app.cpp	2013-10-02 00:38:05.000000000 +0200
-+++ slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
-@@ -200,7 +200,9 @@
- 
- 	/* Read configuration and theme */
- 	cfg = new Cfg;
--	cfg->readConf(CFGFILE);
-+	char *cfgfile = getenv("SLIM_CFGFILE");
-+	if (!cfgfile) cfgfile = CFGFILE;
-+	cfg->readConf(cfgfile);
+diff --git a/app.cpp b/app.cpp
+index 237477d..735df9c 100644
+--- a/app.cpp
++++ b/app.cpp
+@@ -285,7 +285,9 @@ void App::Run()
+ 	if ( cfg == 0 )
+ 	{
+ 		cfg = new Cfg;
+-		cfg->readConf(CFGFILE);
++		const char* cfgfile = getenv("SLIM_CFGFILE");
++		if (!cfgfile) cfgfile = CFGFILE;
++		cfg->readConf(cfgfile);
+ 	}
  	string themebase = "";
  	string themefile = "";
- 	string themedir = "";
-@@ -208,7 +210,9 @@
- 	if (testing) {
- 		themeName = testtheme;
- 	} else {
+@@ -297,7 +299,9 @@ void App::Run()
+ 	}
+ 	else
+ 	{
 -		themebase = string(THEMESDIR) + "/";
-+		char *themesdir = getenv("SLIM_THEMESDIR");
++		const char* themesdir = getenv("SLIM_THEMESDIR");
 +		if (!themesdir) themesdir = THEMESDIR;
 +		themebase = string(themesdir) + "/";
  		themeName = cfg->getOption("current_theme");
  		string::size_type pos;
- 		if ((pos = themeName.find(",")) != string::npos) {
+ 		if ((pos = themeName.find(",")) != string::npos)
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/slim-display.patch b/gnu/packages/patches/slim-display.patch
index f68604a94b..b59e20c25c 100644
--- a/gnu/packages/patches/slim-display.patch
+++ b/gnu/packages/patches/slim-display.patch
@@ -1,39 +1,52 @@
-Add "display_name" configuration option and use its value instead of
-the hard coded one.
+Add "display_name" configuration option and use its value instead of the hard
+coded one.
 
 Patch by Diego N. Barbato
+---
+ app.cpp        | 23 ++++++++++-------------
+ cfg.cpp        |  1 +
+ switchuser.cpp |  2 +-
+ 3 files changed, 12 insertions(+), 14 deletions(-)
 
---- a/app.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/app.cpp	2019-04-27 13:48:23.479133531 +0200
-@@ -190,7 +190,13 @@
- }
+diff --git a/app.cpp b/app.cpp
+index b840e60..4f72da0 100644
+--- a/app.cpp
++++ b/app.cpp
+@@ -270,7 +270,16 @@ App::App(int argc, char** argv)
  
- void App::Run() {
+ void App::Run()
+ {
 -	DisplayName = DISPLAY;
 +	/* Read configuration */
-+	cfg = new Cfg;
-+	char *cfgfile = getenv("SLIM_CFGFILE");
-+	if (!cfgfile) cfgfile = CFGFILE;
-+	cfg->readConf(cfgfile);
++	if ( cfg == 0 )
++	{
++		cfg = new Cfg;
++		const char *cfgfile = getenv("SLIM_CFGFILE");
++		if (!cfgfile) cfgfile = CFGFILE;
++		cfg->readConf(cfgfile);
 +
-+	DisplayName = cfg->getOption("display_name").c_str();
++		DisplayName = cfg->getOption("display_name").c_str();
++	}
  
  #ifdef XNEST_DEBUG
  	char* p = getenv("DISPLAY");
-@@ -200,11 +206,7 @@
+@@ -281,14 +287,7 @@ void App::Run()
  	}
  #endif
  
 -	/* Read configuration and theme */
--	cfg = new Cfg;
--	char *cfgfile = getenv("SLIM_CFGFILE");
--	if (!cfgfile) cfgfile = CFGFILE;
--	cfg->readConf(cfgfile);
-+	/* Read theme */
+-	if ( cfg == 0 )
+-	{
+-		cfg = new Cfg;
+-		const char* cfgfile = getenv("SLIM_CFGFILE");
+-		if (!cfgfile) cfgfile = CFGFILE;
+-		cfg->readConf(cfgfile);
+-	}
++        /* Read theme */
  	string themebase = "";
  	string themefile = "";
  	string themedir = "";
-@@ -911,9 +913,7 @@
+@@ -1115,9 +1114,7 @@ int App::StartServer()
  	static const int MAX_XSERVER_ARGS = 256;
  	static char* server[MAX_XSERVER_ARGS+2] = { NULL };
  	server[0] = (char *)cfg->getOption("default_xserver").c_str();
@@ -44,7 +57,7 @@ Patch by Diego N. Barbato
  	char* args = new char[argOption.length()+2]; /* NULL plus vt */
  	strcpy(args, argOption.c_str());
  
-@@ -1233,7 +1233,7 @@
+@@ -1424,7 +1421,7 @@ void App::CreateServerAuth()
  	authfile = cfg->getOption("authfile");
  	remove(authfile.c_str());
  	putenv(StrConcat("XAUTHORITY=", authfile.c_str()));
@@ -53,9 +66,11 @@ Patch by Diego N. Barbato
  	  authfile);
  }
  
---- a/cfg.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/cfg.cpp	2019-04-27 13:49:40.511773743 +0200
-@@ -31,6 +31,7 @@
+diff --git a/cfg.cpp b/cfg.cpp
+index 37fb10d..a0c9bf1 100644
+--- a/cfg.cpp
++++ b/cfg.cpp
+@@ -40,6 +40,7 @@ Cfg::Cfg()
  	/* Configuration options */
  	options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
  	options.insert(option("default_xserver","/usr/bin/X"));
@@ -63,13 +78,18 @@ Patch by Diego N. Barbato
  	options.insert(option("xserver_arguments",""));
  	options.insert(option("numlock",""));
  	options.insert(option("daemon",""));
---- a/switchuser.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/switchuser.cpp	2019-04-27 13:50:19.380096651 +0200
-@@ -54,6 +54,6 @@
+diff --git a/switchuser.cpp b/switchuser.cpp
+index ca936ae..255f5d9 100644
+--- a/switchuser.cpp
++++ b/switchuser.cpp
+@@ -69,6 +69,6 @@ void SwitchUser::SetClientAuth(const char* mcookie)
  	string home = string(Pw->pw_dir);
  	string authfile = home + "/.Xauthority";
  	remove(authfile.c_str());
 -	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
-+	Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"),
++	Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"),
  	  authfile);
  }
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/slim-reset.patch
deleted file mode 100644
index eebee6b7b5..0000000000
--- a/gnu/packages/patches/slim-reset.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Do not reset chosen session and maintain the session-choser dialog after a
-failed login attempt.
-
-Patch by E. Bavier
-
---- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
-+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
-@@ -260,13 +260,12 @@
- }
- 
- void Panel::ClearPanel() {
--	session_name = "";
--    session_exec = "";
- 	Reset();
- 	XClearWindow(Dpy, Root);
- 	XClearWindow(Dpy, Win);
- 	Cursor(SHOW);
- 	ShowText();
-+	ShowSession();
- 	XFlush(Dpy);
- }
- 
-@@ -760,9 +760,7 @@
-         pair<string,string> ses = cfg->nextSession();
-         session_name = ses.first;
-         session_exec = ses.second;
--        if (session_name.size() > 0) {
--                ShowSession();
--        }
-+        ShowSession();
-  }
- 
- /* Display session type on the screen */
diff --git a/gnu/packages/patches/slim-session.patch b/gnu/packages/patches/slim-session.patch
deleted file mode 100644
index b85d3f7dd0..0000000000
--- a/gnu/packages/patches/slim-session.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Exit after the user's session has finished.  This works around slim's broken
-PAM session handling (see
-http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).
-
-Patch by Eelco Dolstra, from Nixpkgs.
-
---- slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
-+++ slim-1.3.6/app.cpp	2013-10-15 13:00:10.141210784 +0200
-@@ -816,7 +822,7 @@
- 	StopServer();
- 	RemoveLock();
- 	while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
--	Run();
-+	exit(OK_EXIT);
- }
- 
- void App::KillAllClients(Bool top) {
diff --git a/gnu/packages/patches/slim-sigusr1.patch b/gnu/packages/patches/slim-sigusr1.patch
deleted file mode 100644
index 344b02933e..0000000000
--- a/gnu/packages/patches/slim-sigusr1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This patch fixes SLiM so it really waits for the X server to be ready
-before attempting to connect to it.  Indeed, the X server notices that
-its parent process has a handler for SIGUSR1, and consequently sends it
-SIGUSR1 when it's ready to accept connections.
-
-The problem was that SLiM doesn't pay attention to SIGUSR1.  So in practice,
-if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on
-/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000,
-where nobody answers; eventually, it times out and tries again on
-/tmp/.X11-unix/X0, and finally it shows up on the screen.
-
-Patch by L. Courtès.
-
---- slim-1.3.6/app.cpp	2014-02-05 15:27:20.000000000 +0100
-+++ slim-1.3.6/app.cpp	2014-02-09 22:42:04.000000000 +0100
-@@ -119,7 +119,9 @@ void CatchSignal(int sig) {
- 	exit(ERR_EXIT);
- }
- 
-+static volatile int got_sigusr1 = 0;
- void User1Signal(int sig) {
-+	got_sigusr1 = 1;
- 	signal(sig, User1Signal);
- }
- 
-@@ -884,6 +886,7 @@ int App::WaitForServer() {
- 	int	ncycles	 = 120;
- 	int	cycles;
- 
-+	while (!got_sigusr1);
- 	for(cycles = 0; cycles < ncycles; cycles++) {
- 		if((Dpy = XOpenDisplay(DisplayName))) {
- 			XSetIOErrorHandler(xioerror);
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#67818; Package guix-patches. (Fri, 15 Dec 2023 00:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 67818 <at> debbugs.gnu.org (full text, mbox):

From: Feng Shu <tumashu <at> 163.com>
To: 67818 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: slim: Update to 1.4.0.
Date: Fri, 15 Dec 2023 08:42:49 +0800
From 158553a6e263817fd6afd18ad26b31d40c55aa0c Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu <at> 163.com>
Date: Thu, 14 Dec 2023 09:28:44 +0800
Subject: [PATCH v2] gnu: slim: Update to 1.4.0.

* gnu/packages/display-managers.scm (slim)[version]: Update to 1.4.0.
[inputs]: Remove input label.
[arguments]: Use gexp and remove fix-0-pointer-comparison.
[home-pages]: Update to slim-fork's url.

* gnu/packages/patches/slim-config.patch: Port to slim-1.4.0.
* gnu/packages/patches/slim-display.patch: Port to slim-1.4.0.
* gnu/packages/patches/slim-reset.patch: Deleted, no ablilty to port this
patch for big change in v1.4.0.
* gnu/packages/patches/slim-session.patch: Deleted. seem to work without this
patch, further observation is needed.
* gnu/packages/patches/slim-sigusr1.patch: Deleted, fixed in upstream.

* gnu/local.mk: Remove slim-reset.patch, slim-session.patch, slim-sigur1.patch.
---
 gnu/local.mk                            |  3 -
 gnu/packages/display-managers.scm       | 89 +++++++++++--------------
 gnu/packages/patches/slim-config.patch  | 43 +++++++-----
 gnu/packages/patches/slim-display.patch | 74 ++++++++++++--------
 gnu/packages/patches/slim-reset.patch   | 33 ---------
 gnu/packages/patches/slim-session.patch | 17 -----
 gnu/packages/patches/slim-sigusr1.patch | 33 ---------
 7 files changed, 111 insertions(+), 181 deletions(-)
 delete mode 100644 gnu/packages/patches/slim-reset.patch
 delete mode 100644 gnu/packages/patches/slim-session.patch
 delete mode 100644 gnu/packages/patches/slim-sigusr1.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8b4e525206..5632c28b2d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1996,10 +1996,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/serf-python3.patch			\
   %D%/packages/patches/shakespeare-spl-fix-grammar.patch		\
   %D%/packages/patches/sharutils-CVE-2018-1000097.patch		\
-  %D%/packages/patches/slim-session.patch			\
   %D%/packages/patches/slim-config.patch			\
-  %D%/packages/patches/slim-sigusr1.patch			\
-  %D%/packages/patches/slim-reset.patch				\
   %D%/packages/patches/slim-login.patch				\
   %D%/packages/patches/slim-display.patch			\
   %D%/packages/patches/stex-copy-from-immutable-store.patch	\
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 935563c94c..7120c2ad75 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -486,59 +486,46 @@ (define-public lightdm-gtk-greeter
 (define-public slim
   (package
     (name "slim")
-    (version "1.3.6")
-    (source (origin
-	     (method url-fetch)
-             ;; Used to be available from download.berlios.de.
-	     (uri (string-append
-                   "mirror://sourceforge/slim.berlios/slim-"
-                   version ".tar.gz"))
-	     (sha256
-	      (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
-             (patches (search-patches "slim-config.patch"
-                                      "slim-reset.patch"
-                                      "slim-login.patch"
-                                      "slim-session.patch"
-                                      "slim-sigusr1.patch"
-                                      "slim-display.patch"))))
+    (version "1.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/slim-fork/slim-" version
+                           ".tar.gz"))
+       (sha256
+        (base32 "011jfmksy0kgw4z0y70mc80bm5kmz5i1sgm6krrfj0h00zak22rm"))
+       (patches (search-patches "slim-config.patch"
+                                "slim-login.patch"
+                                "slim-display.patch"))))
     (build-system cmake-build-system)
-    (inputs `(("linux-pam" ,linux-pam)
-	      ("libpng" ,libpng)
-	      ("libjpeg" ,libjpeg-turbo)
-	      ("freeglut" ,freeglut)
-	      ("libxrandr" ,libxrandr)
-	      ("libxrender" ,libxrender)
-	      ("freetype" ,freetype)
-	      ("fontconfig" ,fontconfig)
-              ("libx11" ,libx11)
-	      ("libxft" ,libxft)
-	      ("libxmu" ,libxmu)
-	      ("xauth" ,xauth)))
-    (native-inputs
-     (list pkg-config))
+    (inputs (list fontconfig
+                  freeglut
+                  freetype
+                  libjpeg-turbo
+                  libpng
+                  libx11
+                  libxft
+                  libxmu
+                  libxrandr
+                  libxrender
+                  linux-pam
+                  xauth))
+    (native-inputs (list pkg-config))
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-new-etc-location
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("/etc")
-                (string-append (assoc-ref %outputs "out") "/etc"))
-               (("install.*systemd.*")
-               ;; The build system's logic here is: if "Linux", then
-                ;; "systemd".  Strip that.
-                ""))
-             #t))
-         (add-before 'configure 'fix-0-pointer-comparison
-           (lambda _
-             (substitute* "panel.cpp"
-               (("WinGC < 0") "WinGC == NULL")))))
-       #:configure-flags '("-DUSE_PAM=yes"
-                           "-DUSE_CONSOLEKIT=no")
-       #:tests? #f))
-
-    ;; This used to be at <http://slim.berlios.de/>.
-    (home-page "https://github.com/iwamatsu/slim")
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'set-new-etc-location
+            (lambda _
+              (substitute* "CMakeLists.txt"
+                (("/etc")
+                 (string-append #$output "/etc"))))))
+      #:configure-flags
+      #~(list "-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no")
+      #:tests? #f))
+    ;; The original project (https://github.com/iwamatsu/slim) has not been
+    ;; maintained since 2013, so we use slim-fork instead.
+    (home-page "https://slim-fork.sourceforge.io/")
     (synopsis "Desktop-independent graphical login manager for X11")
     (description
      "SLiM is a Desktop-independent graphical login manager for X11, derived
diff --git a/gnu/packages/patches/slim-config.patch b/gnu/packages/patches/slim-config.patch
index 5e6135d75c..91eeb5f56c 100644
--- a/gnu/packages/patches/slim-config.patch
+++ b/gnu/packages/patches/slim-config.patch
@@ -1,27 +1,36 @@
 Allow the configuration file and theme directory to be specified at run time.
+
 Patch by Eelco Dolstra, from Nixpkgs.
+---
+ app.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
 
---- slim-1.3.6/app.cpp	2013-10-02 00:38:05.000000000 +0200
-+++ slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
-@@ -200,7 +200,9 @@
- 
- 	/* Read configuration and theme */
- 	cfg = new Cfg;
--	cfg->readConf(CFGFILE);
-+	char *cfgfile = getenv("SLIM_CFGFILE");
-+	if (!cfgfile) cfgfile = CFGFILE;
-+	cfg->readConf(cfgfile);
+diff --git a/app.cpp b/app.cpp
+index 237477d..735df9c 100644
+--- a/app.cpp
++++ b/app.cpp
+@@ -285,7 +285,9 @@ void App::Run()
+ 	if ( cfg == 0 )
+ 	{
+ 		cfg = new Cfg;
+-		cfg->readConf(CFGFILE);
++		const char* cfgfile = getenv("SLIM_CFGFILE");
++		if (!cfgfile) cfgfile = CFGFILE;
++		cfg->readConf(cfgfile);
+ 	}
  	string themebase = "";
  	string themefile = "";
- 	string themedir = "";
-@@ -208,7 +210,9 @@
- 	if (testing) {
- 		themeName = testtheme;
- 	} else {
+@@ -297,7 +299,9 @@ void App::Run()
+ 	}
+ 	else
+ 	{
 -		themebase = string(THEMESDIR) + "/";
-+		char *themesdir = getenv("SLIM_THEMESDIR");
++		const char* themesdir = getenv("SLIM_THEMESDIR");
 +		if (!themesdir) themesdir = THEMESDIR;
 +		themebase = string(themesdir) + "/";
  		themeName = cfg->getOption("current_theme");
  		string::size_type pos;
- 		if ((pos = themeName.find(",")) != string::npos) {
+ 		if ((pos = themeName.find(",")) != string::npos)
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/slim-display.patch b/gnu/packages/patches/slim-display.patch
index f68604a94b..b59e20c25c 100644
--- a/gnu/packages/patches/slim-display.patch
+++ b/gnu/packages/patches/slim-display.patch
@@ -1,39 +1,52 @@
-Add "display_name" configuration option and use its value instead of
-the hard coded one.
+Add "display_name" configuration option and use its value instead of the hard
+coded one.
 
 Patch by Diego N. Barbato
+---
+ app.cpp        | 23 ++++++++++-------------
+ cfg.cpp        |  1 +
+ switchuser.cpp |  2 +-
+ 3 files changed, 12 insertions(+), 14 deletions(-)
 
---- a/app.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/app.cpp	2019-04-27 13:48:23.479133531 +0200
-@@ -190,7 +190,13 @@
- }
+diff --git a/app.cpp b/app.cpp
+index b840e60..4f72da0 100644
+--- a/app.cpp
++++ b/app.cpp
+@@ -270,7 +270,16 @@ App::App(int argc, char** argv)
  
- void App::Run() {
+ void App::Run()
+ {
 -	DisplayName = DISPLAY;
 +	/* Read configuration */
-+	cfg = new Cfg;
-+	char *cfgfile = getenv("SLIM_CFGFILE");
-+	if (!cfgfile) cfgfile = CFGFILE;
-+	cfg->readConf(cfgfile);
++	if ( cfg == 0 )
++	{
++		cfg = new Cfg;
++		const char *cfgfile = getenv("SLIM_CFGFILE");
++		if (!cfgfile) cfgfile = CFGFILE;
++		cfg->readConf(cfgfile);
 +
-+	DisplayName = cfg->getOption("display_name").c_str();
++		DisplayName = cfg->getOption("display_name").c_str();
++	}
  
  #ifdef XNEST_DEBUG
  	char* p = getenv("DISPLAY");
-@@ -200,11 +206,7 @@
+@@ -281,14 +287,7 @@ void App::Run()
  	}
  #endif
  
 -	/* Read configuration and theme */
--	cfg = new Cfg;
--	char *cfgfile = getenv("SLIM_CFGFILE");
--	if (!cfgfile) cfgfile = CFGFILE;
--	cfg->readConf(cfgfile);
-+	/* Read theme */
+-	if ( cfg == 0 )
+-	{
+-		cfg = new Cfg;
+-		const char* cfgfile = getenv("SLIM_CFGFILE");
+-		if (!cfgfile) cfgfile = CFGFILE;
+-		cfg->readConf(cfgfile);
+-	}
++        /* Read theme */
  	string themebase = "";
  	string themefile = "";
  	string themedir = "";
-@@ -911,9 +913,7 @@
+@@ -1115,9 +1114,7 @@ int App::StartServer()
  	static const int MAX_XSERVER_ARGS = 256;
  	static char* server[MAX_XSERVER_ARGS+2] = { NULL };
  	server[0] = (char *)cfg->getOption("default_xserver").c_str();
@@ -44,7 +57,7 @@ Patch by Diego N. Barbato
  	char* args = new char[argOption.length()+2]; /* NULL plus vt */
  	strcpy(args, argOption.c_str());
  
-@@ -1233,7 +1233,7 @@
+@@ -1424,7 +1421,7 @@ void App::CreateServerAuth()
  	authfile = cfg->getOption("authfile");
  	remove(authfile.c_str());
  	putenv(StrConcat("XAUTHORITY=", authfile.c_str()));
@@ -53,9 +66,11 @@ Patch by Diego N. Barbato
  	  authfile);
  }
  
---- a/cfg.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/cfg.cpp	2019-04-27 13:49:40.511773743 +0200
-@@ -31,6 +31,7 @@
+diff --git a/cfg.cpp b/cfg.cpp
+index 37fb10d..a0c9bf1 100644
+--- a/cfg.cpp
++++ b/cfg.cpp
+@@ -40,6 +40,7 @@ Cfg::Cfg()
  	/* Configuration options */
  	options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
  	options.insert(option("default_xserver","/usr/bin/X"));
@@ -63,13 +78,18 @@ Patch by Diego N. Barbato
  	options.insert(option("xserver_arguments",""));
  	options.insert(option("numlock",""));
  	options.insert(option("daemon",""));
---- a/switchuser.cpp	1970-01-01 01:00:00.000000000 +0100
-+++ b/switchuser.cpp	2019-04-27 13:50:19.380096651 +0200
-@@ -54,6 +54,6 @@
+diff --git a/switchuser.cpp b/switchuser.cpp
+index ca936ae..255f5d9 100644
+--- a/switchuser.cpp
++++ b/switchuser.cpp
+@@ -69,6 +69,6 @@ void SwitchUser::SetClientAuth(const char* mcookie)
  	string home = string(Pw->pw_dir);
  	string authfile = home + "/.Xauthority";
  	remove(authfile.c_str());
 -	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
-+	Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"),
++	Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"),
  	  authfile);
  }
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/slim-reset.patch
deleted file mode 100644
index eebee6b7b5..0000000000
--- a/gnu/packages/patches/slim-reset.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Do not reset chosen session and maintain the session-choser dialog after a
-failed login attempt.
-
-Patch by E. Bavier
-
---- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
-+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
-@@ -260,13 +260,12 @@
- }
- 
- void Panel::ClearPanel() {
--	session_name = "";
--    session_exec = "";
- 	Reset();
- 	XClearWindow(Dpy, Root);
- 	XClearWindow(Dpy, Win);
- 	Cursor(SHOW);
- 	ShowText();
-+	ShowSession();
- 	XFlush(Dpy);
- }
- 
-@@ -760,9 +760,7 @@
-         pair<string,string> ses = cfg->nextSession();
-         session_name = ses.first;
-         session_exec = ses.second;
--        if (session_name.size() > 0) {
--                ShowSession();
--        }
-+        ShowSession();
-  }
- 
- /* Display session type on the screen */
diff --git a/gnu/packages/patches/slim-session.patch b/gnu/packages/patches/slim-session.patch
deleted file mode 100644
index b85d3f7dd0..0000000000
--- a/gnu/packages/patches/slim-session.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Exit after the user's session has finished.  This works around slim's broken
-PAM session handling (see
-http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).
-
-Patch by Eelco Dolstra, from Nixpkgs.
-
---- slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
-+++ slim-1.3.6/app.cpp	2013-10-15 13:00:10.141210784 +0200
-@@ -816,7 +822,7 @@
- 	StopServer();
- 	RemoveLock();
- 	while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
--	Run();
-+	exit(OK_EXIT);
- }
- 
- void App::KillAllClients(Bool top) {
diff --git a/gnu/packages/patches/slim-sigusr1.patch b/gnu/packages/patches/slim-sigusr1.patch
deleted file mode 100644
index 344b02933e..0000000000
--- a/gnu/packages/patches/slim-sigusr1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This patch fixes SLiM so it really waits for the X server to be ready
-before attempting to connect to it.  Indeed, the X server notices that
-its parent process has a handler for SIGUSR1, and consequently sends it
-SIGUSR1 when it's ready to accept connections.
-
-The problem was that SLiM doesn't pay attention to SIGUSR1.  So in practice,
-if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on
-/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000,
-where nobody answers; eventually, it times out and tries again on
-/tmp/.X11-unix/X0, and finally it shows up on the screen.
-
-Patch by L. Courtès.
-
---- slim-1.3.6/app.cpp	2014-02-05 15:27:20.000000000 +0100
-+++ slim-1.3.6/app.cpp	2014-02-09 22:42:04.000000000 +0100
-@@ -119,7 +119,9 @@ void CatchSignal(int sig) {
- 	exit(ERR_EXIT);
- }
- 
-+static volatile int got_sigusr1 = 0;
- void User1Signal(int sig) {
-+	got_sigusr1 = 1;
- 	signal(sig, User1Signal);
- }
- 
-@@ -884,6 +886,7 @@ int App::WaitForServer() {
- 	int	ncycles	 = 120;
- 	int	cycles;
- 
-+	while (!got_sigusr1);
- 	for(cycles = 0; cycles < ncycles; cycles++) {
- 		if((Dpy = XOpenDisplay(DisplayName))) {
- 			XSetIOErrorHandler(xioerror);
-- 
2.39.2


-- 





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sat, 23 Dec 2023 10:12:02 GMT) Full text and rfc822 format available.

Notification sent to Feng Shu <tumashu <at> 163.com>:
bug acknowledged by developer. (Sat, 23 Dec 2023 10:12:02 GMT) Full text and rfc822 format available.

Message #16 received at 67818-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Feng Shu <tumashu <at> 163.com>
Cc: 67818-done <at> debbugs.gnu.org
Subject: Re: [bug#67818] [PATCH v2] gnu: slim: Update to 1.4.0.
Date: Sat, 23 Dec 2023 11:10:47 +0100
Hi,

Feng Shu <tumashu <at> 163.com> skribis:

>>From 158553a6e263817fd6afd18ad26b31d40c55aa0c Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu <at> 163.com>
> Date: Thu, 14 Dec 2023 09:28:44 +0800
> Subject: [PATCH v2] gnu: slim: Update to 1.4.0.
>
> * gnu/packages/display-managers.scm (slim)[version]: Update to 1.4.0.
> [inputs]: Remove input label.
> [arguments]: Use gexp and remove fix-0-pointer-comparison.
> [home-pages]: Update to slim-fork's url.
>
> * gnu/packages/patches/slim-config.patch: Port to slim-1.4.0.
> * gnu/packages/patches/slim-display.patch: Port to slim-1.4.0.
> * gnu/packages/patches/slim-reset.patch: Deleted, no ablilty to port this
> patch for big change in v1.4.0.
> * gnu/packages/patches/slim-session.patch: Deleted. seem to work without this
> patch, further observation is needed.
> * gnu/packages/patches/slim-sigusr1.patch: Deleted, fixed in upstream.
>
> * gnu/local.mk: Remove slim-reset.patch, slim-session.patch, slim-sigur1.patch.

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Jan 2024 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.