From unknown Thu Sep 11 19:09:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67818 <67818@debbugs.gnu.org> To: bug#67818 <67818@debbugs.gnu.org> Subject: Status: [PATCH] gnu: slim: Update to 1.4.0. Reply-To: bug#67818 <67818@debbugs.gnu.org> Date: Fri, 12 Sep 2025 02:09:56 +0000 retitle 67818 [PATCH] gnu: slim: Update to 1.4.0. reassign 67818 guix-patches submitter 67818 Feng Shu severity 67818 normal tag 67818 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 13 21:42:00 2023 Received: (at submit) by debbugs.gnu.org; 14 Dec 2023 02:42:00 +0000 Received: from localhost ([127.0.0.1]:59965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDbfj-0002oC-95 for submit@debbugs.gnu.org; Wed, 13 Dec 2023 21:42:00 -0500 Received: from lists.gnu.org ([2001:470:142::17]:55792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDbff-0002nu-P7 for submit@debbugs.gnu.org; Wed, 13 Dec 2023 21:41:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDbfK-0002G3-1w for guix-patches@gnu.org; Wed, 13 Dec 2023 21:41:34 -0500 Received: from m12.mail.163.com ([220.181.12.198]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDbfE-0002gr-Aa for guix-patches@gnu.org; Wed, 13 Dec 2023 21:41:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=yclG8GiI4DxQracYNV8NSAA6mBvYUz43hGELcS6B6/0=; b=DfbjpIvwHW2/n6JupEpEo0U1ASRR82bHGK6KFfCTbh0lEV5DT/NSQqfmw9ASj3 Wah7a28bImlfWA3UToucU29ikHhUqopzr50uxz+H3WDxWBrzMDlBrFfZ1As9zYtV SvX8gX/u+vDJZCfipkaq37F2rLsNdDoVv6YTSfSr9NWKI= Received: from Tumashu (unknown [218.92.14.78]) by zwqz-smtp-mta-g4-1 (Coremail) with SMTP id _____wD3P6hFa3plds0tAA--.4848S2; Thu, 14 Dec 2023 10:41:09 +0800 (CST) From: Feng Shu To: "guix-patches" Subject: [PATCH] gnu: slim: Update to 1.4.0. Date: Thu, 14 Dec 2023 09:28:44 +0800 Message-ID: <87r0jp7bga.fsf@163.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wD3P6hFa3plds0tAA--.4848S2 X-Coremail-Antispam: 1Uf129KBjvAXoW3Kr4xWFyfXFyDCFWkAr15XFb_yoW8Gw4xCo W7uw4UuFWkGw4fXw18Cr4rJ3yUXFWkur42kFWvy3WDCan8ZFW3Xa4rCw4xuFW5Xr4qgrZ7 ZrW7G3y5Wry3ZFn3n29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU5lkVDUUUU X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiERhG1F7++CDQpgABsU Received-SPF: pass client-ip=220.181.12.198; envelope-from=tumashu@163.com; helo=m12.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L4=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) >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 th= is 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.pa= tch. --- 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 =3D \ %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-manag= ers.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 =3D=3D NULL"))))) - #:configure-flags '("-DUSE_PAM=3Dyes" - "-DUSE_CONSOLEKIT=3Dno") - #:tests? #f)) - - ;; This used to be at . - (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=3Dyes" "-DUSE_CONSOLEKIT=3Dno") + #: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, deriv= ed 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 ti= me. + Patch by Eelco Dolstra, from Nixpkgs. +--- + app.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) =20 ---- 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 @@ -=20 - /* Read configuration and theme */ - cfg =3D new Cfg; -- cfg->readConf(CFGFILE); -+ char *cfgfile =3D getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile =3D 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 =3D=3D 0 ) + { + cfg =3D new Cfg; +- cfg->readConf(CFGFILE); ++ const char* cfgfile =3D getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile =3D CFGFILE; ++ cfg->readConf(cfgfile); + } string themebase =3D ""; string themefile =3D ""; - string themedir =3D ""; -@@ -208,7 +210,9 @@ - if (testing) { - themeName =3D testtheme; - } else { +@@ -297,7 +299,9 @@ void App::Run() + } + else + { - themebase =3D string(THEMESDIR) + "/"; -+ char *themesdir =3D getenv("SLIM_THEMESDIR"); ++ const char* themesdir =3D getenv("SLIM_THEMESDIR"); + if (!themesdir) themesdir =3D THEMESDIR; + themebase =3D string(themesdir) + "/"; themeName =3D cfg->getOption("current_theme"); string::size_type pos; - if ((pos =3D themeName.find(",")) !=3D string::npos) { + if ((pos =3D themeName.find(",")) !=3D string::npos) +--=20 +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 h= ard +coded one. =20 Patch by Diego N. Barbato +--- + app.cpp | 23 ++++++++++------------- + cfg.cpp | 1 + + switchuser.cpp | 2 +- + 3 files changed, 12 insertions(+), 14 deletions(-) =20 ---- 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) =20=20 - void App::Run() { + void App::Run() + { - DisplayName =3D DISPLAY; + /* Read configuration */ -+ cfg =3D new Cfg; -+ char *cfgfile =3D getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile =3D CFGFILE; -+ cfg->readConf(cfgfile); ++ if ( cfg =3D=3D 0 ) ++ { ++ cfg =3D new Cfg; ++ const char *cfgfile =3D getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile =3D CFGFILE; ++ cfg->readConf(cfgfile); + -+ DisplayName =3D cfg->getOption("display_name").c_str(); ++ DisplayName =3D cfg->getOption("display_name").c_str(); ++ } =20=20 #ifdef XNEST_DEBUG char* p =3D getenv("DISPLAY"); -@@ -200,11 +206,7 @@ +@@ -281,14 +287,7 @@ void App::Run() } #endif =20=20 - /* Read configuration and theme */ -- cfg =3D new Cfg; -- char *cfgfile =3D getenv("SLIM_CFGFILE"); -- if (!cfgfile) cfgfile =3D CFGFILE; -- cfg->readConf(cfgfile); -+ /* Read theme */ +- if ( cfg =3D=3D 0 ) +- { +- cfg =3D new Cfg; +- const char* cfgfile =3D getenv("SLIM_CFGFILE"); +- if (!cfgfile) cfgfile =3D CFGFILE; +- cfg->readConf(cfgfile); +- } ++ /* Read theme */ string themebase =3D ""; string themefile =3D ""; string themedir =3D ""; -@@ -911,9 +913,7 @@ +@@ -1115,9 +1114,7 @@ int App::StartServer() static const int MAX_XSERVER_ARGS =3D 256; static char* server[MAX_XSERVER_ARGS+2] =3D { NULL }; server[0] =3D (char *)cfg->getOption("default_xserver").c_str(); @@ -44,7 +57,7 @@ Patch by Diego N. Barbato char* args =3D new char[argOption.length()+2]; /* NULL plus vt */ strcpy(args, argOption.c_str()); =20=20 -@@ -1233,7 +1233,7 @@ +@@ -1424,7 +1421,7 @@ void App::CreateServerAuth() authfile =3D cfg->getOption("authfile"); remove(authfile.c_str()); putenv(StrConcat("XAUTHORITY=3D", authfile.c_str())); @@ -53,9 +66,11 @@ Patch by Diego N. Barbato authfile); } =20=20 ---- 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 =3D string(Pw->pw_dir); string authfile =3D 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_pa= th"), ++ Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->= getOption("xauth_path"), authfile); } +--=20 +2.39.2 + diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/s= lim-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 @@ - } -=20 - void Panel::ClearPanel() { -- session_name =3D ""; -- session_exec =3D ""; - Reset(); - XClearWindow(Dpy, Root); - XClearWindow(Dpy, Win); - Cursor(SHOW); - ShowText(); -+ ShowSession(); - XFlush(Dpy); - } -=20 -@@ -760,9 +760,7 @@ - pair ses =3D cfg->nextSession(); - session_name =3D ses.first; - session_exec =3D ses.second; -- if (session_name.size() > 0) { -- ShowSession(); -- } -+ ShowSession(); - } -=20 - /* 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 brok= en -PAM session handling (see -http://developer.berlios.de/bugs/?func=3Ddetailbug&bug_id=3D19102&group_id= =3D2663). - -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); - } -=20 - 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 practic= e, -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=E8s. - ---- 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); - } -=20 -+static volatile int got_sigusr1 =3D 0; - void User1Signal(int sig) { -+ got_sigusr1 =3D 1; - signal(sig, User1Signal); - } -=20 -@@ -884,6 +886,7 @@ int App::WaitForServer() { - int ncycles =3D 120; - int cycles; -=20 -+ while (!got_sigusr1); - for(cycles =3D 0; cycles < ncycles; cycles++) { - if((Dpy =3D XOpenDisplay(DisplayName))) { - XSetIOErrorHandler(xioerror); --=20 2.39.2 --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 19:34:05 2023 Received: (at 67818) by debbugs.gnu.org; 15 Dec 2023 00:34:05 +0000 Received: from localhost ([127.0.0.1]:51225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDw9U-0004Im-OO for submit@debbugs.gnu.org; Thu, 14 Dec 2023 19:34:05 -0500 Received: from m12.mail.163.com ([220.181.12.199]:52316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDw9Q-0004IC-Ka for 67818@debbugs.gnu.org; Thu, 14 Dec 2023 19:34:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=LtTFBwS1FCXDWuOYT/UIlEHu6P9WacOf3d3+pbClc2U=; b=l89wvbfuPL3AVI0s1p5GQmOSydBU/ffddSCUm8irEIfdUbWtHA9lp0UcFTWq6O mTy2bWWmRGFAHVnytBB3yaXoyA+JMgRdZ7kX6IlY4GTXFK4gIvm5fwcveJf2JGNX W3pzco7B0K4S6bIwb1im1hZ1cS+/E14PjCzAR8W9JqtMY= Received: from Tumashu (unknown [218.92.14.78]) by zwqz-smtp-mta-g5-0 (Coremail) with SMTP id _____wD3f1vtnntlKGVWBw--.32538S2; Fri, 15 Dec 2023 08:33:50 +0800 (CST) From: Feng Shu To: 67818@debbugs.gnu.org Subject: [PATCH v2] gnu: slim: Update to 1.4.0. Date: Fri, 15 Dec 2023 08:33:49 +0800 Message-ID: <87ttoks3rm.fsf@163.com> MIME-Version: 1.0 Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v2-0001-gnu-slim-Update-to-1.4.0.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH v2] gnu: slim: Update to 1.4.0. X-CM-TRANSID: _____wD3f1vtnntlKGVWBw--.32538S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUz5r4UUUUU X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiEQxG1F7++C4dRAACsi X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67818 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 158553a6e263817fd6afd18ad26b31d40c55aa0c Mon Sep 17 00:00:00 2001 From: Feng Shu 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 th= is 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.pa= tch. --- 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 =3D \ %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-manag= ers.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 =3D=3D NULL"))))) - #:configure-flags '("-DUSE_PAM=3Dyes" - "-DUSE_CONSOLEKIT=3Dno") - #:tests? #f)) - - ;; This used to be at . - (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=3Dyes" "-DUSE_CONSOLEKIT=3Dno") + #: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, deriv= ed 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 ti= me. + Patch by Eelco Dolstra, from Nixpkgs. +--- + app.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) =20 ---- 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 @@ -=20 - /* Read configuration and theme */ - cfg =3D new Cfg; -- cfg->readConf(CFGFILE); -+ char *cfgfile =3D getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile =3D 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 =3D=3D 0 ) + { + cfg =3D new Cfg; +- cfg->readConf(CFGFILE); ++ const char* cfgfile =3D getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile =3D CFGFILE; ++ cfg->readConf(cfgfile); + } string themebase =3D ""; string themefile =3D ""; - string themedir =3D ""; -@@ -208,7 +210,9 @@ - if (testing) { - themeName =3D testtheme; - } else { +@@ -297,7 +299,9 @@ void App::Run() + } + else + { - themebase =3D string(THEMESDIR) + "/"; -+ char *themesdir =3D getenv("SLIM_THEMESDIR"); ++ const char* themesdir =3D getenv("SLIM_THEMESDIR"); + if (!themesdir) themesdir =3D THEMESDIR; + themebase =3D string(themesdir) + "/"; themeName =3D cfg->getOption("current_theme"); string::size_type pos; - if ((pos =3D themeName.find(",")) !=3D string::npos) { + if ((pos =3D themeName.find(",")) !=3D string::npos) +--=20 +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 h= ard +coded one. =20 Patch by Diego N. Barbato +--- + app.cpp | 23 ++++++++++------------- + cfg.cpp | 1 + + switchuser.cpp | 2 +- + 3 files changed, 12 insertions(+), 14 deletions(-) =20 ---- 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) =20=20 - void App::Run() { + void App::Run() + { - DisplayName =3D DISPLAY; + /* Read configuration */ -+ cfg =3D new Cfg; -+ char *cfgfile =3D getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile =3D CFGFILE; -+ cfg->readConf(cfgfile); ++ if ( cfg =3D=3D 0 ) ++ { ++ cfg =3D new Cfg; ++ const char *cfgfile =3D getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile =3D CFGFILE; ++ cfg->readConf(cfgfile); + -+ DisplayName =3D cfg->getOption("display_name").c_str(); ++ DisplayName =3D cfg->getOption("display_name").c_str(); ++ } =20=20 #ifdef XNEST_DEBUG char* p =3D getenv("DISPLAY"); -@@ -200,11 +206,7 @@ +@@ -281,14 +287,7 @@ void App::Run() } #endif =20=20 - /* Read configuration and theme */ -- cfg =3D new Cfg; -- char *cfgfile =3D getenv("SLIM_CFGFILE"); -- if (!cfgfile) cfgfile =3D CFGFILE; -- cfg->readConf(cfgfile); -+ /* Read theme */ +- if ( cfg =3D=3D 0 ) +- { +- cfg =3D new Cfg; +- const char* cfgfile =3D getenv("SLIM_CFGFILE"); +- if (!cfgfile) cfgfile =3D CFGFILE; +- cfg->readConf(cfgfile); +- } ++ /* Read theme */ string themebase =3D ""; string themefile =3D ""; string themedir =3D ""; -@@ -911,9 +913,7 @@ +@@ -1115,9 +1114,7 @@ int App::StartServer() static const int MAX_XSERVER_ARGS =3D 256; static char* server[MAX_XSERVER_ARGS+2] =3D { NULL }; server[0] =3D (char *)cfg->getOption("default_xserver").c_str(); @@ -44,7 +57,7 @@ Patch by Diego N. Barbato char* args =3D new char[argOption.length()+2]; /* NULL plus vt */ strcpy(args, argOption.c_str()); =20=20 -@@ -1233,7 +1233,7 @@ +@@ -1424,7 +1421,7 @@ void App::CreateServerAuth() authfile =3D cfg->getOption("authfile"); remove(authfile.c_str()); putenv(StrConcat("XAUTHORITY=3D", authfile.c_str())); @@ -53,9 +66,11 @@ Patch by Diego N. Barbato authfile); } =20=20 ---- 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 =3D string(Pw->pw_dir); string authfile =3D 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_pa= th"), ++ Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->= getOption("xauth_path"), authfile); } +--=20 +2.39.2 + diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/s= lim-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 @@ - } -=20 - void Panel::ClearPanel() { -- session_name =3D ""; -- session_exec =3D ""; - Reset(); - XClearWindow(Dpy, Root); - XClearWindow(Dpy, Win); - Cursor(SHOW); - ShowText(); -+ ShowSession(); - XFlush(Dpy); - } -=20 -@@ -760,9 +760,7 @@ - pair ses =3D cfg->nextSession(); - session_name =3D ses.first; - session_exec =3D ses.second; -- if (session_name.size() > 0) { -- ShowSession(); -- } -+ ShowSession(); - } -=20 - /* 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 brok= en -PAM session handling (see -http://developer.berlios.de/bugs/?func=3Ddetailbug&bug_id=3D19102&group_id= =3D2663). - -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); - } -=20 - 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 practic= e, -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=C3=A8s. - ---- 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); - } -=20 -+static volatile int got_sigusr1 =3D 0; - void User1Signal(int sig) { -+ got_sigusr1 =3D 1; - signal(sig, User1Signal); - } -=20 -@@ -884,6 +886,7 @@ int App::WaitForServer() { - int ncycles =3D 120; - int cycles; -=20 -+ while (!got_sigusr1); - for(cycles =3D 0; cycles < ncycles; cycles++) { - if((Dpy =3D XOpenDisplay(DisplayName))) { - XSetIOErrorHandler(xioerror); --=20 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 19:42:59 2023 Received: (at 67818) by debbugs.gnu.org; 15 Dec 2023 00:43:00 +0000 Received: from localhost ([127.0.0.1]:51242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDwI6-0004YQ-R0 for submit@debbugs.gnu.org; Thu, 14 Dec 2023 19:42:59 -0500 Received: from m15.mail.163.com ([45.254.50.219]:58650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDwI2-0004YA-CY for 67818@debbugs.gnu.org; Thu, 14 Dec 2023 19:42:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=70HYU8VCJK8+dA7+co1/P14evFRa5uMs8sS8o44+Dhw=; b=CK7p8jJEvbvV0Kdfs4kvEQA3WD3pl0hY3ZUK6Tik+ZpEVlghfKQPbHptYN1Zfp 6crfIR1RY1ueb+ThgdNQSvSAXDJmpZu1qfhl7pe5VGsR+iuURtPGsU9uasJZPii7 IBZ6LngKoYj6UNqdHhsfXEycQHqY3whRH4SNs30Q+9idk= Received: from Tumashu (unknown [218.92.14.78]) by zwqz-smtp-mta-g1-2 (Coremail) with SMTP id _____wD3P0oJoXtlCkhCBQ--.52175S2; Fri, 15 Dec 2023 08:42:49 +0800 (CST) From: Feng Shu To: 67818@debbugs.gnu.org Subject: [PATCH v2] gnu: slim: Update to 1.4.0. Date: Fri, 15 Dec 2023 08:42:49 +0800 Message-ID: <87fs04s3cm.fsf@163.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wD3P0oJoXtlCkhCBQ--.52175S2 X-Coremail-Antispam: 1Uf129KBjvAXoW3Zr1xJw1rWry3Xw17AryrZwb_yoW8Gw4fGo W7uw4UuFWkGw4fXw18Cr4rJ3yUXFWkur42kFWvyF1DCan8ZFW3Xa4rCw4xuFW5Xr4qqrZ7 ZrW7G3yUWry3ZFn3n29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU5oGHUUUUU X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/xtbBcQxH1FetjoNozAAAs9 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67818 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 158553a6e263817fd6afd18ad26b31d40c55aa0c Mon Sep 17 00:00:00 2001 From: Feng Shu 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 th= is 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.pa= tch. --- 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 =3D \ %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-manag= ers.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 =3D=3D NULL"))))) - #:configure-flags '("-DUSE_PAM=3Dyes" - "-DUSE_CONSOLEKIT=3Dno") - #:tests? #f)) - - ;; This used to be at . - (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=3Dyes" "-DUSE_CONSOLEKIT=3Dno") + #: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, deriv= ed 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 ti= me. + Patch by Eelco Dolstra, from Nixpkgs. +--- + app.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) =20 ---- 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 @@ -=20 - /* Read configuration and theme */ - cfg =3D new Cfg; -- cfg->readConf(CFGFILE); -+ char *cfgfile =3D getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile =3D 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 =3D=3D 0 ) + { + cfg =3D new Cfg; +- cfg->readConf(CFGFILE); ++ const char* cfgfile =3D getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile =3D CFGFILE; ++ cfg->readConf(cfgfile); + } string themebase =3D ""; string themefile =3D ""; - string themedir =3D ""; -@@ -208,7 +210,9 @@ - if (testing) { - themeName =3D testtheme; - } else { +@@ -297,7 +299,9 @@ void App::Run() + } + else + { - themebase =3D string(THEMESDIR) + "/"; -+ char *themesdir =3D getenv("SLIM_THEMESDIR"); ++ const char* themesdir =3D getenv("SLIM_THEMESDIR"); + if (!themesdir) themesdir =3D THEMESDIR; + themebase =3D string(themesdir) + "/"; themeName =3D cfg->getOption("current_theme"); string::size_type pos; - if ((pos =3D themeName.find(",")) !=3D string::npos) { + if ((pos =3D themeName.find(",")) !=3D string::npos) +--=20 +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 h= ard +coded one. =20 Patch by Diego N. Barbato +--- + app.cpp | 23 ++++++++++------------- + cfg.cpp | 1 + + switchuser.cpp | 2 +- + 3 files changed, 12 insertions(+), 14 deletions(-) =20 ---- 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) =20=20 - void App::Run() { + void App::Run() + { - DisplayName =3D DISPLAY; + /* Read configuration */ -+ cfg =3D new Cfg; -+ char *cfgfile =3D getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile =3D CFGFILE; -+ cfg->readConf(cfgfile); ++ if ( cfg =3D=3D 0 ) ++ { ++ cfg =3D new Cfg; ++ const char *cfgfile =3D getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile =3D CFGFILE; ++ cfg->readConf(cfgfile); + -+ DisplayName =3D cfg->getOption("display_name").c_str(); ++ DisplayName =3D cfg->getOption("display_name").c_str(); ++ } =20=20 #ifdef XNEST_DEBUG char* p =3D getenv("DISPLAY"); -@@ -200,11 +206,7 @@ +@@ -281,14 +287,7 @@ void App::Run() } #endif =20=20 - /* Read configuration and theme */ -- cfg =3D new Cfg; -- char *cfgfile =3D getenv("SLIM_CFGFILE"); -- if (!cfgfile) cfgfile =3D CFGFILE; -- cfg->readConf(cfgfile); -+ /* Read theme */ +- if ( cfg =3D=3D 0 ) +- { +- cfg =3D new Cfg; +- const char* cfgfile =3D getenv("SLIM_CFGFILE"); +- if (!cfgfile) cfgfile =3D CFGFILE; +- cfg->readConf(cfgfile); +- } ++ /* Read theme */ string themebase =3D ""; string themefile =3D ""; string themedir =3D ""; -@@ -911,9 +913,7 @@ +@@ -1115,9 +1114,7 @@ int App::StartServer() static const int MAX_XSERVER_ARGS =3D 256; static char* server[MAX_XSERVER_ARGS+2] =3D { NULL }; server[0] =3D (char *)cfg->getOption("default_xserver").c_str(); @@ -44,7 +57,7 @@ Patch by Diego N. Barbato char* args =3D new char[argOption.length()+2]; /* NULL plus vt */ strcpy(args, argOption.c_str()); =20=20 -@@ -1233,7 +1233,7 @@ +@@ -1424,7 +1421,7 @@ void App::CreateServerAuth() authfile =3D cfg->getOption("authfile"); remove(authfile.c_str()); putenv(StrConcat("XAUTHORITY=3D", authfile.c_str())); @@ -53,9 +66,11 @@ Patch by Diego N. Barbato authfile); } =20=20 ---- 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 =3D string(Pw->pw_dir); string authfile =3D 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_pa= th"), ++ Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->= getOption("xauth_path"), authfile); } +--=20 +2.39.2 + diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/s= lim-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 @@ - } -=20 - void Panel::ClearPanel() { -- session_name =3D ""; -- session_exec =3D ""; - Reset(); - XClearWindow(Dpy, Root); - XClearWindow(Dpy, Win); - Cursor(SHOW); - ShowText(); -+ ShowSession(); - XFlush(Dpy); - } -=20 -@@ -760,9 +760,7 @@ - pair ses =3D cfg->nextSession(); - session_name =3D ses.first; - session_exec =3D ses.second; -- if (session_name.size() > 0) { -- ShowSession(); -- } -+ ShowSession(); - } -=20 - /* 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 brok= en -PAM session handling (see -http://developer.berlios.de/bugs/?func=3Ddetailbug&bug_id=3D19102&group_id= =3D2663). - -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); - } -=20 - 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 practic= e, -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=E8s. - ---- 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); - } -=20 -+static volatile int got_sigusr1 =3D 0; - void User1Signal(int sig) { -+ got_sigusr1 =3D 1; - signal(sig, User1Signal); - } -=20 -@@ -884,6 +886,7 @@ int App::WaitForServer() { - int ncycles =3D 120; - int cycles; -=20 -+ while (!got_sigusr1); - for(cycles =3D 0; cycles < ncycles; cycles++) { - if((Dpy =3D XOpenDisplay(DisplayName))) { - XSetIOErrorHandler(xioerror); --=20 2.39.2 --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 23 05:11:13 2023 Received: (at 67818-done) by debbugs.gnu.org; 23 Dec 2023 10:11:13 +0000 Received: from localhost ([127.0.0.1]:48634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyyO-0000gh-QN for submit@debbugs.gnu.org; Sat, 23 Dec 2023 05:11:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyyN-0000gO-7R for 67818-done@debbugs.gnu.org; Sat, 23 Dec 2023 05:11:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGyy2-0008V4-21; Sat, 23 Dec 2023 05:10:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=KLr/XPnojTOv28JvCLycdP7U0ufaDQOKbdlg68o8Ffw=; b=gmGSbwiNO4Jn1TMLzj6T rlDQNsectF+yXSxwJaNRiuMpkh83/t/vOeCecLLHlhH0QifqVaw5Tlhph2GxLn8MIJzQiksVyMVz9 VFUgOWAkgdlQxN1fN3SiXAsPvf908qhCOxYX0SDisOmKJSh5HKuNfLwIxqN7dO3nzugCvx5uytdqq 739rnIoVRezUw7wtj7XTzOZBm3Sa53wDQWTbXeyb3YhsZjALefjJ4oe58iMhkX2tXNZ5ziuVEWg/q 5GZqXlO86aCOMcW5VTZzbx3Ns7tJcN7tekGk9fWg0oq96WULNjIa0sGj3W0DBh0p3j45N9lcffMOb 6R/gAQhw3jii3g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Feng Shu Subject: Re: [bug#67818] [PATCH v2] gnu: slim: Update to 1.4.0. In-Reply-To: <87ttoks3rm.fsf@163.com> (Feng Shu's message of "Fri, 15 Dec 2023 08:33:49 +0800") References: <87r0jp7bga.fsf@163.com> <87ttoks3rm.fsf@163.com> Date: Sat, 23 Dec 2023 11:10:47 +0100 Message-ID: <87sf3t6xg8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67818-done Cc: 67818-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Feng Shu skribis: >>>From 158553a6e263817fd6afd18ad26b31d40c55aa0c Mon Sep 17 00:00:00 2001 > From: Feng Shu > 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=E2=80=99. From unknown Thu Sep 11 19:09:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Jan 2024 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator