diff options
Diffstat (limited to 'source/a')
-rwxr-xr-x | source/a/aaa_libraries/aaa_libraries.SlackBuild | 12 | ||||
-rw-r--r-- | source/a/aaa_libraries/symlinks-to-tracked-libs | 12 | ||||
-rw-r--r-- | source/a/elogind/11-prefer-deep-suspend.patch | 8 | ||||
-rw-r--r-- | source/a/elogind/12-default-deep-suspend.patch | 11 | ||||
-rw-r--r-- | source/a/elogind/doinst.sh | 1 | ||||
-rwxr-xr-x | source/a/elogind/elogind.SlackBuild | 54 | ||||
-rw-r--r-- | source/a/etc/doinst.sh | 9 | ||||
-rwxr-xr-x | source/a/etc/etc.SlackBuild | 3 |
8 files changed, 84 insertions, 26 deletions
diff --git a/source/a/aaa_libraries/aaa_libraries.SlackBuild b/source/a/aaa_libraries/aaa_libraries.SlackBuild index 3d1cc496b..6e6bd5df4 100755 --- a/source/a/aaa_libraries/aaa_libraries.SlackBuild +++ b/source/a/aaa_libraries/aaa_libraries.SlackBuild @@ -23,7 +23,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=aaa_libraries VERSION=${VERSION:-15.1} -BUILD=${BUILD:-30} +BUILD=${BUILD:-31} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -142,6 +142,16 @@ chmod 755 $PKG/lib${LIBDIRSUFFIX}/lib*.so.* $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so. # installpkg will create them if needed by running ldconfig. find $PKG -type l -exec rm --verbose "{}" \+ +# Time to ask for trouble. We should add a few compatibility symlinks for the +# non-wide ncurses libraries, and for the now built-in tic/tinfo: +( cd $PKG/lib${LIBDIRSUFFIX} + ln -sf libformw.so.6 libform.so.6 + ln -sf libmenuw.so.6 libmenu.so.6 + ln -sf libncurses++w.so.6 libncurses++.so.6 + ln -sf libncursesw.so.6 libncurses.so.6 + ln -sf libpanelw.so.6 libpanel.so.6 +) + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh diff --git a/source/a/aaa_libraries/symlinks-to-tracked-libs b/source/a/aaa_libraries/symlinks-to-tracked-libs index 9ee542272..5895b029b 100644 --- a/source/a/aaa_libraries/symlinks-to-tracked-libs +++ b/source/a/aaa_libraries/symlinks-to-tracked-libs @@ -9,6 +9,7 @@ /lib/libcap.so.2 /lib/libdm.so.0 /lib/libelf.so.1 +/lib/libformw.so.6 /lib/libfuse.so.2 /lib/libgpm.so.2 /lib/libkeyutils.so.1 @@ -17,12 +18,14 @@ /lib/libk5crypto.so.3 /lib/libgssapi_krb5.so.2 /lib/liblzma.so.5 +/lib/libmenuw.so.6 /lib/libncurses.so.5 -/lib/libncurses.so.6 /lib/libncursesw.so.5 /lib/libncursesw.so.6 +/lib/libncurses++w.so.6 /lib/libnsl.so.2 /lib/libnsl.so.3 +/lib/libpanelw.so.6 /lib/libpcre.so.1 /lib/libpcre2-8.so.0 /lib/libpcreposix.so.0 @@ -30,6 +33,7 @@ /lib/libsigsegv.so.2 /lib/libsysfs.so.2 /lib/libtermcap.so.2 +/lib/libtic.so.6 /lib/libtinfo.so.6 /lib/libtirpc.so.3 /lib/libudev.so.1 @@ -42,9 +46,7 @@ /usr/lib/libexpat.so.1 /usr/lib/libffi.so.8 /usr/lib/libform.so.5 -/usr/lib/libform.so.6 /usr/lib/libformw.so.5 -/usr/lib/libformw.so.6 /usr/lib/libgdbm.so.4 /usr/lib/libgdbm.so.6 /usr/lib/libglib-2.0.so.0 @@ -64,14 +66,10 @@ /usr/lib/libldap.so.2 /usr/lib/libltdl.so.7 /usr/lib/libmenu.so.5 -/usr/lib/libmenu.so.6 /usr/lib/libmenuw.so.5 -/usr/lib/libmenuw.so.6 /usr/lib/libmm.so.14 /usr/lib/libpanel.so.5 -/usr/lib/libpanel.so.6 /usr/lib/libpanelw.so.5 -/usr/lib/libpanelw.so.6 /usr/lib/libpng14.so.14 /usr/lib/libpng16.so.16 /usr/lib/libpsl.so.5 diff --git a/source/a/elogind/11-prefer-deep-suspend.patch b/source/a/elogind/11-prefer-deep-suspend.patch new file mode 100644 index 000000000..c3d3d23b5 --- /dev/null +++ b/source/a/elogind/11-prefer-deep-suspend.patch @@ -0,0 +1,8 @@ +--- ./src/sleep/10-elogind.conf.orig 2024-04-16 02:21:44.000000000 -0500 ++++ ./src/sleep/10-elogind.conf 2024-04-16 13:32:01.046025234 -0500 +@@ -19,4 +19,4 @@ + #HandleNvidiaSleep=no + #HibernateByUsing= + #SuspendByUsing= +-#SuspendMode=s2idle deep ++SuspendMode=deep s2idle diff --git a/source/a/elogind/12-default-deep-suspend.patch b/source/a/elogind/12-default-deep-suspend.patch new file mode 100644 index 000000000..25eb73dc6 --- /dev/null +++ b/source/a/elogind/12-default-deep-suspend.patch @@ -0,0 +1,11 @@ +--- ./src/shared/sleep-config.c.orig 2024-04-16 02:21:44.000000000 -0500 ++++ ./src/shared/sleep-config.c 2024-04-22 13:31:58.033078814 -0500 +@@ -45,7 +45,7 @@ + #if 0 /// elogind supports suspend modes (deep s2idle) so we need defaults, too + /* Not used by SLEEP_SUSPEND */ + #else // 0 +- [SLEEP_SUSPEND] = STRV_MAKE("s2idle", "deep"), ++ [SLEEP_SUSPEND] = STRV_MAKE("deep", "s2idle"), + #endif // 0 + [SLEEP_HIBERNATE] = STRV_MAKE("platform", "shutdown"), + [SLEEP_HYBRID_SLEEP] = STRV_MAKE("suspend"), diff --git a/source/a/elogind/doinst.sh b/source/a/elogind/doinst.sh index e529fda15..e39e2aee3 100644 --- a/source/a/elogind/doinst.sh +++ b/source/a/elogind/doinst.sh @@ -29,6 +29,7 @@ preserve_perms() { preserve_perms etc/rc.d/rc.elogind.new config etc/elogind/logind.conf.new config etc/elogind/sleep.conf.new +config etc/elogind/sleep.conf.d/10-elogind.conf.new config etc/pam.d/elogind-user.new # Reload elogind-daemon: diff --git a/source/a/elogind/elogind.SlackBuild b/source/a/elogind/elogind.SlackBuild index ead080f8e..74d26ab85 100755 --- a/source/a/elogind/elogind.SlackBuild +++ b/source/a/elogind/elogind.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=elogind VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -98,30 +98,51 @@ find . \ # but sed will still happily scribble all over everything. cat $CWD/elogind.nobody.nogroup.99.99.diff | patch -p1 --verbose || exit 1 +# OK, here's the scoop on s2idle. After doing some digging, it looks like both +# Intel and AMD have stopped officially supporting S3 sleep (aka "deep") with +# the latest generation of CPUs (although it "might work"). I've also seen a +# few people say that S3 is "not secure"... which if you're worried that a +# three letter agency might grab your sleeping laptop and extract the contents +# of the RAM while keeping it powered up, well, maybe in that sense it isn't. +# As far as s2idle, I have heard that it has the potential to be as much of a +# low power mode as deep, but that depends on how low the IRQ rate gets. In +# practice I have heard of s2idle draining a battery in half a day. +# +# Anyway, I tried s2idle here again (with the below sleep patches) and it still +# locks up my machine (a fairly recent Thinkpad X1). +# +# S3 works and has the best power savings of all the partially-on modes. +# Feel free to edit /etc/elogind/sleep.conf.d/10-elogind.conf if s2idle works +# for you, but we'll continue to default to deep for now. +# +# Don't prefer s2idle, as it doesn't seem to work: +cat $CWD/11-prefer-deep-suspend.patch | patch -p1 --verbose || exit 1 +cat $CWD/12-default-deep-suspend.patch | patch -p1 --verbose || exit 1 + # Configure, build, and install: export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" mkdir meson-build cd meson-build meson setup \ - --buildtype release \ - --prefix /usr \ - --libdir /usr/lib${LIBDIRSUFFIX} \ - -Drootlibdir="/lib${LIBDIRSUFFIX}" \ - -Drootlibexecdir="/lib${LIBDIRSUFFIX}/elogind" \ + --buildtype=release \ + --prefix=/usr \ + --libdir=/lib${LIBDIRSUFFIX} \ + --libexecdir=/lib${LIBDIRSUFFIX}/elogind \ + -Dpkgconfiglibdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \ + -Dpamlibdir=/lib${LIBDIRSUFFIX}/security \ -Dudevrulesdir="/lib/udev/rules.d" \ -Ddocdir="/usr/doc/$PKGNAM-$VERSION" \ -Dhtmldir="/usr/doc/$PKGNAM-$VERSION/html" \ -Dmandir="/usr/man" \ - -Dman=true \ - -Dhtml=false \ + -Dman=enabled \ + -Dhtml=disabled \ -Dbashcompletiondir="/usr/share/bash-completion/completions" \ -Dnobody-user=nobody \ -Dnobody-group=nogroup \ - -Dpam=true \ - -Dpamlibdir="/lib${LIBDIRSUFFIX}/security" \ + -Dpam=enabled \ -Dpamconfdir="/etc/pam.d" \ - -Dacl=true \ + -Dacl=enabled \ -Dsmack=false \ -Dutmp=true \ -Ddefault-hierarchy=legacy \ @@ -136,14 +157,15 @@ meson setup \ DESTDIR=$PKG $NINJA install || exit 1 cd .. -# Create symlinks for elogind binaries to /usr/bin/: -mkdir -p $PKG/usr/bin -ln -sf /bin/elogind-inhibit $PKG/usr/bin/elogind-inhibit -ln -sf /bin/loginctl $PKG/usr/bin/loginctl +# Create symlinks for elogind binaries to /bin/: +mkdir -p $PKG/bin +ln -sf /usr/bin/elogind-inhibit $PKG/bin/elogind-inhibit +ln -sf /usr/bin/loginctl $PKG/bin/loginctl # Make sure we do not overwrite the user's customizations: mv -i $PKG/etc/elogind/logind.conf{,.new} mv -i $PKG/etc/elogind/sleep.conf{,.new} +mv -i $PKG/etc/elogind/sleep.conf.d/10-elogind.conf{,.new} mv -i $PKG/etc/pam.d/elogind-user{,.new} # Strip binaries: @@ -169,7 +191,7 @@ mkdir -p $PKG/etc/elogind/logind.conf.d/ $PKG/etc/elogind/sleep.conf.d/ # Add login1 policy file that allows users in the 'power' group # to shutdown/reboot the computer: mkdir -p $PKG/usr/share/polkit-1/rules.d -zcat $CWD/10-enable-elogind-power.rules.gz > $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules +cat $CWD/10-enable-elogind-power.rules > $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules # We don't need the hidden files to make inferior package managers keep dirs: find $PKG -type f -name ".keep_dir" -exec rm -f {} \; diff --git a/source/a/etc/doinst.sh b/source/a/etc/doinst.sh index 18b53f333..3734bc854 100644 --- a/source/a/etc/doinst.sh +++ b/source/a/etc/doinst.sh @@ -100,6 +100,15 @@ rm -f etc/gshadow.new rm -f etc/passwd.new rm -f etc/shadow.new +# We will add any missing entries to gshadow, but make no attempt to repair existing ones: +cat etc/group | while read line ; do + GRP="$(echo $line | cut -f 1 -d :)" + GMEMBERS="$(echo $line | rev | cut -f 1 -d : | rev)" + if ! grep -q "^${GRP}:" etc/gshadow ; then + echo "${GRP}:x::${GMEMBERS}" >> etc/gshadow + fi +done + # Make sure $HOME is correct for user sddm: chroot . /usr/sbin/usermod -d /var/lib/sddm sddm > /dev/null 2> /dev/null # Make sure that sddm is a member of group video: diff --git a/source/a/etc/etc.SlackBuild b/source/a/etc/etc.SlackBuild index 70455db93..f958d7628 100755 --- a/source/a/etc/etc.SlackBuild +++ b/source/a/etc/etc.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=etc VERSION=15.1 -BUILD=${BUILD:-10} +BUILD=${BUILD:-11} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -80,4 +80,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh # Build the package: cd $PKG /sbin/makepkg -l y -c n $TMP/etc-$VERSION-$ARCH-$BUILD.txz - |