Adjust slim default config for NetBSD Add SLIM_LOGIN_CMD and SLIM_XSERVER_ARGUMENTS values which are substituted into the default slim.conf, and provide more optimal values for NetBSD SLIM_XSERVER_ARGUMENTS: "vt05 -noretro" This makes the "vt05" NetBSD specific, so no longer affecting other platforms, plus hides the default rootweave (which would be replaced by a slim image shortly after startup) SLIM_LOGIN_CMD: "/bin/sh - /etc/X11/xdm/Xsession" /etc/X11/xdm/Xsession is the canonical way to start an xsession on NetBSD. The slim shipped defaults rely on a user having ~/.xinitrc, otherwise the session fails back to login (which is a little unfriendly for new users). As a side effect we lose the default ability to pass the theme as a %session parameter to .xinitrc, but this is probably a reasonable trade off to have a working Out Of The Box config. As a benefit we can drop the dependency on bash for NetBSD (which is nice for smaller platforms). For non NetBSD platforms xserver_arguments is now as originally shipped, and login_cmd is as shipped modulus bash path substitution Suggestions/adjustments for other platforms encouraged :) Bump PKGREVISIONdiff -r1.14 -r1.15 pkgsrc/x11/slim/Makefile
(abs)
@@ -1,42 +1,59 @@ | @@ -1,42 +1,59 @@ | |||
1 | # $NetBSD: Makefile,v 1.14 2023/01/29 21:18:22 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.15 2023/03/15 13:39:16 abs Exp $ | |
2 | 2 | |||
3 | DISTNAME= slim-1.3.6 | 3 | DISTNAME= slim-1.3.6 | |
4 | PKGREVISION= 9 | 4 | PKGREVISION= 10 | |
5 | CATEGORIES= x11 | 5 | CATEGORIES= x11 | |
6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=slim.berlios/} | 6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=slim.berlios/} | |
7 | 7 | |||
8 | MAINTAINER= youri@NetBSD.org | 8 | MAINTAINER= youri@NetBSD.org | |
9 | HOMEPAGE= https://github.com/iwamatsu/slim | 9 | HOMEPAGE= https://github.com/iwamatsu/slim | |
10 | COMMENT= Simple login manager | 10 | COMMENT= Simple login manager | |
11 | LICENSE= gnu-gpl-v2 | 11 | LICENSE= gnu-gpl-v2 | |
12 | 12 | |||
13 | USE_TOOLS+= pkg-config | 13 | USE_TOOLS+= pkg-config | |
14 | USE_LANGUAGES= c c++ | 14 | USE_LANGUAGES= c c++ | |
15 | 15 | |||
16 | USE_CMAKE= yes | 16 | USE_CMAKE= yes | |
17 | 17 | |||
18 | AUTO_MKDIRS= yes | 18 | AUTO_MKDIRS= yes | |
19 | RCD_SCRIPTS+= slim | 19 | RCD_SCRIPTS+= slim | |
20 | 20 | |||
21 | DEPENDS+= bash-[0-9]*:../../shells/bash | 21 | DEPENDS+= bash-[0-9]*:../../shells/bash | |
22 | 22 | |||
23 | SUBST_CLASSES+= options | |||
24 | SUBST_FILES.options= slim.conf | |||
25 | SUBST_STAGE.options= pre-configure | |||
26 | SUBST_VARS.options+= SLIM_LOGIN_CMD SLIM_XSERVER_ARGUMENTS | |||
27 | ||||
23 | SUBST_CLASSES+= paths | 28 | SUBST_CLASSES+= paths | |
24 | SUBST_STAGE.paths= pre-configure | 29 | SUBST_STAGE.paths= pre-configure | |
25 | SUBST_FILES.paths= CMakeLists.txt slim.conf | 30 | SUBST_FILES.paths= CMakeLists.txt slim.conf | |
26 | SUBST_VARS.paths= PREFIX | 31 | SUBST_VARS.paths= PREFIX | |
27 | SUBST_VARS.paths+= PKG_SYSCONFDIR | 32 | SUBST_VARS.paths+= PKG_SYSCONFDIR | |
28 | SUBST_VARS.paths+= X11BASE | 33 | SUBST_VARS.paths+= X11BASE | |
29 | 34 | |||
35 | .include "../../mk/bsd.prefs.mk" | |||
36 | ||||
37 | .if ${OPSYS} == "NetBSD" | |||
38 | # Drops the ability to pass theme as %session param to .xinitrc | |||
39 | SLIM_LOGIN_CMD?= /bin/sh - /etc/X11/xdm/Xsession | |||
40 | SLIM_XSERVER_ARGUMENTS?=vt05 -noretro | |||
41 | .else | |||
42 | DEPENDS+= bash-[0-9]*:../../shells/bash | |||
43 | SLIM_LOGIN_CMD?= @PREFIX@/bin/bash -login ~/.xinitrc %session | |||
44 | SLIM_XSERVER_ARGUMENTS?= | |||
45 | .endif | |||
46 | ||||
30 | CONF_FILES+= share/examples/slim/slim.conf \ | 47 | CONF_FILES+= share/examples/slim/slim.conf \ | |
31 | ${PKG_SYSCONFDIR}/slim.conf | 48 | ${PKG_SYSCONFDIR}/slim.conf | |
32 | 49 | |||
33 | .include "options.mk" | 50 | .include "options.mk" | |
34 | .include "../../x11/libX11/buildlink3.mk" | 51 | .include "../../x11/libX11/buildlink3.mk" | |
35 | .include "../../x11/libXft/buildlink3.mk" | 52 | .include "../../x11/libXft/buildlink3.mk" | |
36 | .include "../../x11/libXmu/buildlink3.mk" | 53 | .include "../../x11/libXmu/buildlink3.mk" | |
37 | .include "../../x11/libXrandr/buildlink3.mk" | 54 | .include "../../x11/libXrandr/buildlink3.mk" | |
38 | .include "../../x11/libXrender/buildlink3.mk" | 55 | .include "../../x11/libXrender/buildlink3.mk" | |
39 | .include "../../mk/jpeg.buildlink3.mk" | 56 | .include "../../mk/jpeg.buildlink3.mk" | |
40 | .include "../../graphics/png/buildlink3.mk" | 57 | .include "../../graphics/png/buildlink3.mk" | |
41 | .include "../../graphics/freetype2/buildlink3.mk" | 58 | .include "../../graphics/freetype2/buildlink3.mk" | |
42 | .include "../../fonts/fontconfig/buildlink3.mk" | 59 | .include "../../fonts/fontconfig/buildlink3.mk" |
@@ -1,8 +1,8 @@ | @@ -1,8 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.9 2021/10/26 11:34:28 nia Exp $ | 1 | $NetBSD: distinfo,v 1.10 2023/03/15 13:39:16 abs Exp $ | |
2 | 2 | |||
3 | BLAKE2s (slim-1.3.6.tar.gz) = 45b562196e1253a1a341b821c866f4d0db9c747c73fda215cac52097af77ed2c | 3 | BLAKE2s (slim-1.3.6.tar.gz) = 45b562196e1253a1a341b821c866f4d0db9c747c73fda215cac52097af77ed2c | |
4 | SHA512 (slim-1.3.6.tar.gz) = 345b1dee5d6f0c3716dfa7c5c16274adbf18586bdaaa6af4f310e24c5a61f79a297ffac921a5ba545523317e9fe120916df226c36b9c9b49c2ac9c1ca21dee0c | 4 | SHA512 (slim-1.3.6.tar.gz) = 345b1dee5d6f0c3716dfa7c5c16274adbf18586bdaaa6af4f310e24c5a61f79a297ffac921a5ba545523317e9fe120916df226c36b9c9b49c2ac9c1ca21dee0c | |
5 | Size (slim-1.3.6.tar.gz) = 232547 bytes | 5 | Size (slim-1.3.6.tar.gz) = 232547 bytes | |
6 | SHA1 (patch-CMakeLists.txt) = 8eaeba1bb48bcdb825a3809feefb62b7182fde42 | 6 | SHA1 (patch-CMakeLists.txt) = 8eaeba1bb48bcdb825a3809feefb62b7182fde42 | |
7 | SHA1 (patch-panel.cpp) = 51f87c90214cbc55fd5628f7d852d6287d763903 | 7 | SHA1 (patch-panel.cpp) = 51f87c90214cbc55fd5628f7d852d6287d763903 | |
8 | SHA1 (patch-slim.conf) = ff838df99c53512524863631e3dda77542b01dbf | 8 | SHA1 (patch-slim.conf) = 3bc88e703e002801e757c27c778b0e79f0cb0ad6 |
@@ -1,47 +1,49 @@ | @@ -1,47 +1,49 @@ | |||
1 | $NetBSD: patch-slim.conf,v 1.4 2020/01/10 19:13:33 maya Exp $ | 1 | $NetBSD: patch-slim.conf,v 1.5 2023/03/15 13:39:16 abs Exp $ | |
2 | 2 | |||
3 | Adjust for NetBSD | 3 | Adjust for NetBSD | |
4 | 4 | |||
5 | --- slim.conf.orig 2013-10-01 22:38:05.000000000 +0000 | 5 | --- slim.conf.orig 2013-10-01 22:38:05.000000000 +0000 | |
6 | +++ slim.conf | 6 | +++ slim.conf | |
7 | @@ -1,17 +1,18 @@ | 7 | @@ -1,17 +1,18 @@ | |
8 | # Path, X server and arguments (if needed) | 8 | # Path, X server and arguments (if needed) | |
9 | # Note: -xauth $authfile is automatically appended | 9 | # Note: -xauth $authfile is automatically appended | |
10 | -default_path /bin:/usr/bin:/usr/local/bin | 10 | -default_path /bin:/usr/bin:/usr/local/bin | |
11 | -default_xserver /usr/bin/X | 11 | -default_xserver /usr/bin/X | |
12 | +default_path /bin:/usr/bin:@X11BASE@/bin:@PREFIX@/bin | 12 | +default_path /bin:/usr/bin:@X11BASE@/bin:@PREFIX@/bin | |
13 | +default_xserver @X11BASE@/bin/X | 13 | +default_xserver @X11BASE@/bin/X | |
14 | #xserver_arguments -dpi 75 | 14 | #xserver_arguments -dpi 75 | |
15 | +xserver_arguments vt05 | 15 | +xserver_arguments @SLIM_XSERVER_ARGUMENTS@ | |
16 | 16 | |||
17 | # Commands for halt, login, etc. | 17 | # Commands for halt, login, etc. | |
18 | halt_cmd /sbin/shutdown -h now | 18 | halt_cmd /sbin/shutdown -h now | |
19 | reboot_cmd /sbin/shutdown -r now | 19 | reboot_cmd /sbin/shutdown -r now | |
20 | -console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" | 20 | -console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" | |
21 | +console_cmd @X11BASE@/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /usr/bin/login" | 21 | +console_cmd @X11BASE@/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /usr/bin/login" | |
22 | #suspend_cmd /usr/sbin/suspend | 22 | #suspend_cmd /usr/sbin/suspend | |
23 | 23 | |||
24 | # Full path to the xauth binary | 24 | # Full path to the xauth binary | |
25 | -xauth_path /usr/bin/xauth | 25 | -xauth_path /usr/bin/xauth | |
26 | +xauth_path @X11BASE@/bin/xauth | 26 | +xauth_path @X11BASE@/bin/xauth | |
27 | 27 | |||
28 | # Xauth file for server | 28 | # Xauth file for server | |
29 | authfile /var/run/slim.auth | 29 | authfile /var/run/slim.auth | |
30 | @@ -33,7 +34,7 @@ authfile /var/run/slim.auth | 30 | @@ -33,7 +34,9 @@ authfile /var/run/slim.auth | |
31 | # to adjust the command according to your preferred shell, | 31 | # to adjust the command according to your preferred shell, | |
32 | # i.e. for freebsd use: | 32 | # i.e. for freebsd use: | |
33 | # login_cmd exec /bin/sh - ~/.xinitrc %session | 33 | # login_cmd exec /bin/sh - ~/.xinitrc %session | |
34 | -login_cmd exec /bin/bash -login ~/.xinitrc %session | 34 | -login_cmd exec /bin/bash -login ~/.xinitrc %session | |
35 | +login_cmd exec @PREFIX@/bin/bash -login ~/.xinitrc %session | 35 | +# original package default: | |
36 | +# login_cmd exec /bin/bash -login ~/.xinitrc %session | |||
37 | +login_cmd exec @SLIM_LOGIN_CMD@ | |||
36 | 38 | |||
37 | # Commands executed when starting and exiting a session. | 39 | # Commands executed when starting and exiting a session. | |
38 | # They can be used for registering a X11 session with | 40 | # They can be used for registering a X11 session with | |
39 | @@ -51,7 +52,7 @@ login_cmd exec /bin/bash -logi | 41 | @@ -51,7 +54,7 @@ login_cmd exec /bin/bash -logi | |
40 | # The current chosen session name is replaced in the login_cmd | 42 | # The current chosen session name is replaced in the login_cmd | |
41 | # above, so your login command can handle different sessions. | 43 | # above, so your login command can handle different sessions. | |
42 | # see the xinitrc.sample file shipped with slim sources | 44 | # see the xinitrc.sample file shipped with slim sources | |
43 | -sessions xfce4,icewm-session,wmaker,blackbox | 45 | -sessions xfce4,icewm-session,wmaker,blackbox | |
44 | +sessions xfce4,mate,icewm-session,wmaker,blackbox | 46 | +sessions xfce4,mate,icewm-session,wmaker,blackbox | |
45 | 47 | |||
46 | # Executed when pressing F11 (requires imagemagick) | 48 | # Executed when pressing F11 (requires imagemagick) | |
47 | screenshot_cmd import -window root /slim.png | 49 | screenshot_cmd import -window root /slim.png |