Skip to content

Commit

Permalink
Rebuild Calamares - don't ask for password (pkexec)
Browse files Browse the repository at this point in the history
  • Loading branch information
zstg authored Aug 18, 2024
1 parent 3e43e7b commit 421906f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
7 changes: 6 additions & 1 deletion PKGBUILDS/calamares-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ backup=(

_pkgsrc="$_pkgname"
source=(
"com.github.calamares.calamares.policy"
# "49-nopasswd-calamares.rules"
"$_pkgsrc"::"git+$url.git"
"yay-support.patch"
"calamares.desktop"
)
sha256sums=(
'SKIP'
# 'SKIP'
'SKIP'
'SKIP'
'SKIP'
Expand Down Expand Up @@ -132,7 +136,8 @@ build() {
cmake "${_cmake_options[@]}"
cmake --build build
install -Dm644 "calamares.desktop" "$pkgdir/usr/share/applications/calamares.desktop"
install -Dm777 "calamares.desktop" "$pkgdir/etc/xdg/autostart/calamares.desktop"
install -Dm777 "calamares.desktop" "$pkgdir/etc/xdg/autostart/Calamares.desktop"
install -Dm777 "com.github.calamares.calamares.policy" "$pkgdir/usr/share/polkit-1/actions/com.github.calamares.calamares.policy"
}

package() {
Expand Down
5 changes: 3 additions & 2 deletions PKGBUILDS/calamares-git/calamares.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ Version=1.0
Name=Install System
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=sudo -E calamares
Exec=sudo -E calamares -d
TryExec=calamares
Exec=sh -c "pkexec calamares -D8"
Comment=Calamares — System Installer
X-Gnome-Autostart-enabled=true
Icon=calamares
Terminal=false
StartupNotify=true
Expand Down
25 changes: 25 additions & 0 deletions PKGBUILDS/calamares-git/com.github.calamares.calamares.policy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- SPDX-FileCopyrightText: no
SPDX-License-Identifier: CC0-1.0
-->
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>

<vendor>Calamares</vendor>
<vendor_url>https://github.com/calamares</vendor_url>

<action id="com.github.calamares.calamares.pkexec.run">
<description>Run Installer</description>
<message>Authentication is required to run the installation program</message>
<icon_name>drive-harddisk</icon_name>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/calamares</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
13 changes: 12 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ build_and_package() {
sudo pacman -U *.pkg.tar.zst --noconfirm
cd $dir

cd /tmp
git clone https://aur.archlinux.org/calamares-git
sudo chmod -R 777 ./calamares-git
cd calamares-git
cp $dir/PKGBUILDS/calamares-git/* ./
sudo -u builder makepkg -cfs --noconfirm # --sign
rm -f **debug**.pkg.tar.zst
rm -f $dir/x86_64/**calamares**.pkg.tar.zst
cp *.pkg.tar.zst $dir/x86_64/
cd $dir

mkdir -p /tmp/grab
cp $dir/PKGBUILDS/grab/PKGBUILD /tmp/grab
cd /tmp/grab
Expand Down Expand Up @@ -127,7 +138,7 @@ build_and_package() {
# "aurutils"
"bibata-cursor-theme-bin"
# "brave-bin"
"calamares-git"
# "calamares-git"
# #"eww"
# "google-chrome"
# "gruvbox-plus-icon-theme-git"
Expand Down

0 comments on commit 421906f

Please sign in to comment.