Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix polkit policy #879

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions howdy-gtk/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@ install_data(
install_dir: get_option('prefix') / get_option('bindir'),
install_tag: 'bin',
)

if get_option('with_polkit')
polkit_config = configure_file(
input: 'src/polkit/com.github.boltgolt.howdy-gtk.policy.in',
output: 'com.github.boltgolt.howdy-gtk.policy',
configuration: {'script_path': cli_path, 'python_path': py.full_path()}
)
install_data(
polkit_config,
install_dir: get_option('prefix') / get_option('datadir') / 'polkit-1' / 'actions',
install_mode: 'rw-r--r--',
install_tag: 'polkit',
)
endif
20 changes: 20 additions & 0 deletions howdy-gtk/src/polkit/com.github.boltgolt.howdy-gtk.policy.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
"https://specifications.freedesktop.org/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>
<vendor>boltgolt</vendor>
<vendor_url>https://github.com/boltgolt/howdy</vendor_url>
<icon_name>howdy-gtk</icon_name>
<action id="com.github.boltgolt.howdy-gtk">
<description>Howdy interface</description>
<message>Authentication is required to run howdy-gtk</message>
<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">@python_path@</annotate>
<annotate key="org.freedesktop.policykit.exec.argv1">@script_path@</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
29 changes: 0 additions & 29 deletions howdy/fedora/com.github.boltgolt.howdy.policy

This file was deleted.

3 changes: 2 additions & 1 deletion meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ option('user_models_dir', type: 'string', value: '', description: 'Set the user
option('log_path', type: 'string', value: '/var/log/howdy', description: 'Set the log file path')
option('install_in_site_packages', type: 'boolean', value: false, description: 'Install howdy python files in site packages')
option('py_sources_dir', type: 'string', value: '', description: 'Set the python sources directory')
option('install_pam_config', type: 'boolean', value: false, description: 'Install pam config file (for Debian/Ubuntu)')
option('install_pam_config', type: 'boolean', value: false, description: 'Install pam config file (for Debian/Ubuntu)')
option('with_polkit', type: 'boolean', value: false, description: 'Install polkit policy config file')
Loading