fix regain_privileges in cnchi, keep ranked mirrorlist on live ISO

This commit is contained in:
2026-06-12 19:41:51 +02:00
parent 12087244d4
commit c187784f41
4 changed files with 9 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
place packages here to get installed inside run_before_squashfs process/script
+3
View File
@@ -0,0 +1,3 @@
2026-06-08 18:34:30,688 - internetarchive.session - DEBUG - no metadata provided for "antergos-next", retrieving now.
2026-06-08 18:34:30,689 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): archive.org:443
2026-06-08 18:34:33,782 - urllib3.connectionpool - DEBUG - https://archive.org:443 "GET /metadata/antergos-next HTTP/1.1" 200 None
+5 -2
View File
@@ -175,12 +175,15 @@ echo "---> Clean pacman log and package cache --->"
rm "/var/log/pacman.log" rm "/var/log/pacman.log"
# pacman -Scc seem to fail so: # pacman -Scc seem to fail so:
rm -rf "/var/cache/pacman/pkg/" rm -rf "/var/cache/pacman/pkg/"
echo "---> remove ranked mirrorlist, used for fetching offline packages replacing it with original from package --->" echo "---> Keep ranked mirrorlist for live session (removed revert to packaged default) --->"
mv "/etc/pacman.d/mirrorlist-from-package" "/etc/pacman.d/mirrorlist" rm -f "/etc/pacman.d/mirrorlist-from-package"
echo "---> Fix cnchi desktop file to use pkexec --->" echo "---> Fix cnchi desktop file to use pkexec --->"
sed -i 's|^Exec=cnchi$|Exec=pkexec cnchi|' "/usr/share/applications/cnchi.desktop" sed -i 's|^Exec=cnchi$|Exec=pkexec cnchi|' "/usr/share/applications/cnchi.desktop"
echo "---> Fix cnchi regain_privileges bug (false return before seteuid) --->"
sed -i '/^ if os.geteuid() != 0:$/,/^ os\.setgroups(\[\])$/c\ if os.geteuid() != 0:\n os.seteuid(0)\n os.setegid(0)\n os.setgroups([])' "/usr/share/cnchi/misc/extra.py"
echo "---> Set Antergos NeXT os-release --->" echo "---> Set Antergos NeXT os-release --->"
cat > "/usr/lib/os-release" << 'OSEOF' cat > "/usr/lib/os-release" << 'OSEOF'
NAME="Antergos NeXT" NAME="Antergos NeXT"