Use pkexec to execute calamares with the right permissions
This commit is contained in:
parent
486f160ca9
commit
fe9a768f29
@ -31,6 +31,7 @@ set( QT_VERSION 5.3.0 )
|
|||||||
|
|
||||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools Svg )
|
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools Svg )
|
||||||
find_package( YamlCpp 0.5.1 REQUIRED )
|
find_package( YamlCpp 0.5.1 REQUIRED )
|
||||||
|
find_package( PolkitQt5-1 REQUIRED )
|
||||||
|
|
||||||
option( WITH_PYTHON "Enable Python modules support." ON )
|
option( WITH_PYTHON "Enable Python modules support." ON )
|
||||||
|
|
||||||
@ -178,3 +179,10 @@ install(
|
|||||||
DESTINATION
|
DESTINATION
|
||||||
share/calamares
|
share/calamares
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES
|
||||||
|
com.github.calamares.calamares.bin
|
||||||
|
DESTINATION
|
||||||
|
"${POLKITQT-1_POLICY_FILES_INSTALL_DIR}"
|
||||||
|
)
|
||||||
|
@ -4,8 +4,9 @@ Version=1.0
|
|||||||
Name=Calamares
|
Name=Calamares
|
||||||
GenericName=System Installer
|
GenericName=System Installer
|
||||||
TryExec=calamares
|
TryExec=calamares
|
||||||
Exec=calamares
|
Exec=pkexec /usr/bin/calamares
|
||||||
Comment=Calamares — System Installer
|
Comment=Calamares — System Installer
|
||||||
Icon=calamares
|
Icon=calamares
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
StartupNotify=false
|
||||||
Categories=Qt;System;
|
Categories=Qt;System;
|
||||||
|
22
com.github.calamares.calamares.bin
Normal file
22
com.github.calamares.calamares.bin
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!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>no</allow_any>
|
||||||
|
<allow_inactive>no</allow_inactive>
|
||||||
|
<allow_active>auth_admin</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>
|
Loading…
Reference in New Issue
Block a user