summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-10 20:49:08 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-24 01:46:01 -0500
commitf14e8e6f58195606e54a8e50770ccd0553cc7a96 (patch)
treedaca64a8c7189f32eefe04918aba5883013dbbba
parentd2b9ae16a59f918dc15ae1e2da744974345d093b (diff)
downloadpackages-f14e8e6f58195606e54a8e50770ccd0553cc7a96.tar.gz
packages-f14e8e6f58195606e54a8e50770ccd0553cc7a96.tar.bz2
packages-f14e8e6f58195606e54a8e50770ccd0553cc7a96.tar.xz
packages-f14e8e6f58195606e54a8e50770ccd0553cc7a96.zip
user/livecd-support: Many improvements
* Change install scripts to local.d scripts. * Add a local.d script to make dhcpcd setuid. (adelie/horizon#361) * Make the Desktop Entry file a real file instead of a heredoc. * Remove setuid bit from the shell script; we don't need this any more. * Pull in our new LXQt theme for a better experience. * Add XFCE subpackage. * Set PATH correctly for horizon-run-qt5 so it can find mkfs.vfat and friends. * Set the clock with chronyd if possible on boot, before the graphical environment starts. * Use sudo for partitionmanger. (adelie/horizon#368) Ref: #1081
-rw-r--r--user/livecd-support/APKBUILD56
-rw-r--r--user/livecd-support/allow-nullpw.start6
-rw-r--r--user/livecd-support/allow-nullpw.stop5
-rw-r--r--user/livecd-support/dhcpcd-suid.start5
-rw-r--r--user/livecd-support/horizon-ui4
-rw-r--r--user/livecd-support/horizon.desktop8
-rw-r--r--user/livecd-support/live.sudoersd3
-rw-r--r--user/livecd-support/livecd-support.post-deinstall3
-rw-r--r--user/livecd-support/livecd-support.post-install3
-rw-r--r--user/livecd-support/set-time.start5
-rw-r--r--user/livecd-support/xfce.sddm.conf3
11 files changed, 75 insertions, 26 deletions
diff --git a/user/livecd-support/APKBUILD b/user/livecd-support/APKBUILD
index 85fca324e..afd4554ec 100644
--- a/user/livecd-support/APKBUILD
+++ b/user/livecd-support/APKBUILD
@@ -2,19 +2,26 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=livecd-support
pkgver=1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Support files for booting Adélie live media"
url="https://www.adelielinux.org/"
arch="noarch"
-options="!check suid" # Metapackage
+options="!check" # Metapackage
license="NCSA"
-subpackages="$pkgname-kde $pkgname-lxqt $pkgname-mate $pkgname-horizon"
+subpackages="$pkgname-kde $pkgname-lxqt $pkgname-mate $pkgname-xfce
+ $pkgname-horizon"
depends=""
-install="livecd-support.post-install livecd-support.post-deinstall"
source="kde.sddm.conf
lxqt.sddm.conf
mate.sddm.conf
+ xfce.sddm.conf
+ horizon.desktop
horizon-ui
+ dhcpcd-suid.start
+ allow-nullpw.start
+ allow-nullpw.stop
+ set-time.start
+ live.sudoersd
"
package() {
@@ -23,21 +30,19 @@ package() {
horizon() {
pkgdesc="Add the ability to install Adélie from live media"
- depends="horizon-qt5 horizon netsurf partitionmanager xterm"
+ depends="dhcpcd horizon-qt5 horizon netsurf partitionmanager sudo xterm"
- install -D -m4755 "$srcdir"/horizon-ui "$subpkgdir"/usr/sbin/horizon-ui
+ install -D -m755 "$srcdir"/horizon-ui "$subpkgdir"/usr/sbin/horizon-ui
+ install -D -m644 "$srcdir"/live.sudoersd "$subpkgdir"/etc/sudoers.d/live-pm
- mkdir -p "$subpkgdir"/usr/share/applications
- cat >"$subpkgdir"/usr/share/applications/horizon.desktop <<DESKTOP
-[Desktop Entry]
-Type=Application
-Version=1.1
-Name=System Installation
-Comment=Install Adélie Linux to your computer
-Icon=system-software-install
-Exec=/usr/sbin/horizon-ui
-Categories=System;
-DESKTOP
+ for script in dhcpcd-suid.start allow-nullpw.start allow-nullpw.stop \
+ set-time.start; do
+ install -D -m755 "$srcdir"/$script \
+ "$subpkgdir"/etc/local.d/$script
+ done
+
+ install -D -m644 "$srcdir"/horizon.desktop \
+ "$subpkgdir"/usr/share/applications/horizon.desktop
}
@@ -49,7 +54,7 @@ kde() {
lxqt() {
pkgdesc="$pkgdesc (LXQt spin)"
- depends="livecd-support lxqt-desktop sddm x11"
+ depends="adelie-lxqt-theme livecd-support lxqt-desktop sddm x11"
install -D -m644 "$srcdir"/lxqt.sddm.conf "$subpkgdir"/etc/sddm.conf.d/lxqt.conf
}
@@ -59,7 +64,20 @@ mate() {
install -D -m644 "$srcdir"/mate.sddm.conf "$subpkgdir"/etc/sddm.conf.d/mate.conf
}
+xfce() {
+ pkgdesc="$pkgdesc (XFCE spin)"
+ depends="livecd-support xfce-desktop sddm x11"
+ install -D -m644 "$srcdir"/xfce.sddm.conf "$subpkgdir"/etc/sddm.conf.d/xfce.conf
+}
+
sha512sums="eddcc68917b4dc376bb9b7e7ed5e2c06379957c787c7152e654f31adb402f5811463bff69ce2a41a2cb87b0fa83a4aa3718b63d830eb9ee46b7d0d2058663d34 kde.sddm.conf
9a9a61035c0a8c5ee84d235f319ca158216056221d03a0f5a3846982cb6110c569d7b4eadd2e24de66a75a428c18850e0393e20412e0edcfc8ad41c9d4783604 lxqt.sddm.conf
603d2a5b1fdad0cb0abfefa8a4019c690ee4f5f9ac45057eeeac3bac3207e7871bdb32a564791fb99d965959b39a7de979d575db2694c2d1d88a4a16b68adb25 mate.sddm.conf
-b6d39b2feb0aa400ac7013d6b8c9080ab00ffc1c8b40dbf9489df999fe08b86aebd878c84d968a53ad29bc2a2c30209d8c6ff5daa4171aab03d5b921f966e08d horizon-ui"
+a2cf327b4733432a992222ee162b9fcf613de3980bcf5ee2ae17615def69b9ad8c631675e9616dc6d5a718f5d855ea70c5d5b819c8471e868fbd112575869d64 xfce.sddm.conf
+741050465f75062c99fc4206d52d165682fe1757070f8ca8accfef3a6a9ca860d8dc5da0f14ff3f415db4a76a22bc0764a313779a3ce15bde746bdb7960568c0 horizon.desktop
+39ae77fbf34af95ba9b5c49d27cdf63472dccd4e453feb83fa7a58f127005dac1adc9898fb2de93c89cfaca6c305030fdd30ecbde8c029fea37dfdb50d4ff078 horizon-ui
+8d332a7d6aa0444b27f72cb66ca815395b69f647f2b46d9339f07833d2b020c27748508580d3f49c72b408781112aaaba32cf4dc8846ad781c23a457a7a36c6e dhcpcd-suid.start
+96c4763e971bbcd30c28d09ff9d8e80a1c1729c94f5b2f2187ba38cc5f455af8d6470d605c2d6c0a621614fc2616e10afa44faed0b6cd564ca769b63aaa1cf82 allow-nullpw.start
+b3b5de1ccbbc35d5c4a83daac9787837baa0186e413be58da2739d1e78cb7999e9b3c232448ea8e895a571025d91a81801882671b741be5dc678cba2100c8500 allow-nullpw.stop
+fec26d0ca5070b4a83460c032c3118ea4e059dd1f5b798c938d290ccbfe93e52721780172ed8b2d523ec3c5a88af3634308b34c1a4ee16586cbe0a2f4d8d0b27 set-time.start
+b5516103b0a0b9363bc174d78b0ce81bd72a4dd5ec57c3934808fd525e88ab9c90b22b100fa6f955a57322a57ce19786eae849d6fea4bc71af6427bc7f8f508e live.sudoersd"
diff --git a/user/livecd-support/allow-nullpw.start b/user/livecd-support/allow-nullpw.start
new file mode 100644
index 000000000..f10af795e
--- /dev/null
+++ b/user/livecd-support/allow-nullpw.start
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Welcome to Adélie Linux.
+# This script changes local PAM configuration to allow null passwords.
+# This way, the `live` user does not need a password.
+
+sed -i 's/pam_unix.so$/pam_unix.so nullok_secure/' /etc/pam.d/base-auth
diff --git a/user/livecd-support/allow-nullpw.stop b/user/livecd-support/allow-nullpw.stop
new file mode 100644
index 000000000..fa6f05320
--- /dev/null
+++ b/user/livecd-support/allow-nullpw.stop
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Welcome to Adélie Linux.
+# This script undoes the null-password change when the system goes down.
+
+sed -i 's/pam_unix.so nullok_secure$/pam_unix.so/' /etc/pam.d/base-auth
diff --git a/user/livecd-support/dhcpcd-suid.start b/user/livecd-support/dhcpcd-suid.start
new file mode 100644
index 000000000..6fb3cee11
--- /dev/null
+++ b/user/livecd-support/dhcpcd-suid.start
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Welcome to Adélie Linux.
+# This script ensures dhcpcd can be executed by the live user.
+
+chmod 4755 /sbin/dhcpcd
diff --git a/user/livecd-support/horizon-ui b/user/livecd-support/horizon-ui
index e984e9476..0fa8e6ae3 100644
--- a/user/livecd-support/horizon-ui
+++ b/user/livecd-support/horizon-ui
@@ -5,4 +5,6 @@
#
horizon-qt5
-if [ $? -eq 0 ]; then horizon-run-qt5; fi
+if [ $? -eq 0 ]; then
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin horizon-run-qt5
+fi
diff --git a/user/livecd-support/horizon.desktop b/user/livecd-support/horizon.desktop
new file mode 100644
index 000000000..fd1c3d103
--- /dev/null
+++ b/user/livecd-support/horizon.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Version=1.1
+Name=System Installation
+Comment=Install Adélie Linux to your computer
+Icon=system-software-install
+Exec=/usr/sbin/horizon-ui
+Categories=System;
diff --git a/user/livecd-support/live.sudoersd b/user/livecd-support/live.sudoersd
new file mode 100644
index 000000000..e2ebb25d6
--- /dev/null
+++ b/user/livecd-support/live.sudoersd
@@ -0,0 +1,3 @@
+# Welcome to Adélie Linux.
+# This file allows the live user to run partitionmanager.
+live ALL=(ALL:ALL) NOPASSWD: /usr/bin/partitionmanager
diff --git a/user/livecd-support/livecd-support.post-deinstall b/user/livecd-support/livecd-support.post-deinstall
deleted file mode 100644
index cfd0c59ac..000000000
--- a/user/livecd-support/livecd-support.post-deinstall
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-sed -i 's/pam_unix.so nullok_secure$/pam_unix.so/' /etc/pam.d/base-auth
diff --git a/user/livecd-support/livecd-support.post-install b/user/livecd-support/livecd-support.post-install
deleted file mode 100644
index 9556f5a52..000000000
--- a/user/livecd-support/livecd-support.post-install
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-sed -i 's/pam_unix.so$/pam_unix.so nullok_secure/' /etc/pam.d/base-auth
diff --git a/user/livecd-support/set-time.start b/user/livecd-support/set-time.start
new file mode 100644
index 000000000..a5c6cb79a
--- /dev/null
+++ b/user/livecd-support/set-time.start
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Welcome to Adélie Linux.
+# This script ensures the system clock is set correctly if at all possible.
+
+nm-online -t 10 && chronyd -q
diff --git a/user/livecd-support/xfce.sddm.conf b/user/livecd-support/xfce.sddm.conf
new file mode 100644
index 000000000..3b6e5446c
--- /dev/null
+++ b/user/livecd-support/xfce.sddm.conf
@@ -0,0 +1,3 @@
+[Autologin]
+User=live
+Session=xfce.desktop