Add polkit rule and update spec file
This commit is contained in:
parent
4086aade4c
commit
fe32f6ce51
2 changed files with 92 additions and 16 deletions
29
fedora/com.github.boltgolt.howdy.policy
Normal file
29
fedora/com.github.boltgolt.howdy.policy
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?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.0/policyconfig.dtd">
|
||||||
|
<policyconfig>
|
||||||
|
|
||||||
|
<vendor>boltgolt</vendor>
|
||||||
|
<vendor_url>https://github.com/boltgolt/</vendor_url>
|
||||||
|
<action id="com.github.boltgolt.howdy.add">
|
||||||
|
<_description>Add user profile</_description>
|
||||||
|
<_message>Privileges are required to verify facial recognition.</_message>
|
||||||
|
<defaults>
|
||||||
|
<allow_any>no</allow_any>
|
||||||
|
<allow_inactive>no</allow_inactive>
|
||||||
|
<allow_active>yes</allow_active>
|
||||||
|
</defaults>
|
||||||
|
</action>
|
||||||
|
|
||||||
|
<action id="com.github.boltgolt.howdy.remove">
|
||||||
|
<_description>Remove user profile</_description>
|
||||||
|
<_message>Privileges are required to verify facial recognition.</_message>
|
||||||
|
<defaults>
|
||||||
|
<allow_any>no</allow_any>
|
||||||
|
<allow_inactive>no</allow_inactive>
|
||||||
|
<allow_active>yes</allow_active>
|
||||||
|
</defaults>
|
||||||
|
</action>
|
||||||
|
|
||||||
|
</policyconfig>
|
||||||
|
|
@ -9,7 +9,7 @@ Version: 2.5.1
|
||||||
%if %{with_snapshot}
|
%if %{with_snapshot}
|
||||||
Release: 0.1.git.%{date}%{shortcommit}%{?dist}
|
Release: 0.1.git.%{date}%{shortcommit}%{?dist}
|
||||||
%else
|
%else
|
||||||
Release: 1%{?dist}
|
Release: 3%{?dist}
|
||||||
%endif
|
%endif
|
||||||
Summary: Windows Hello™ style authentication for Linux
|
Summary: Windows Hello™ style authentication for Linux
|
||||||
|
|
||||||
|
|
@ -21,7 +21,9 @@ Source0: https://github.com/boltgolt/%{name}/archive/%{commit}/%{name}-%{
|
||||||
%else
|
%else
|
||||||
Source0: https://github.com/boltgolt/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/boltgolt/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
Source1: com.github.boltgolt.howdy.policy
|
||||||
|
|
||||||
|
BuildRequires: polkit-devel
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
# We need python3-devel for pathfix.py
|
# We need python3-devel for pathfix.py
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
|
@ -33,6 +35,7 @@ Requires: python3-opencv
|
||||||
Requires: python3-pam
|
Requires: python3-pam
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Windows Hello™ style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition to prove who you are.
|
Windows Hello™ style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition to prove who you are.
|
||||||
|
|
||||||
|
|
@ -45,8 +48,20 @@ pathfix.py -i %{__python3} .
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_libdir}/security/%{name}
|
mkdir -p %{buildroot}%{_libdir}/security/%{name}
|
||||||
|
# Remove backup file
|
||||||
|
rm -fr src/*~
|
||||||
cp -pr src/* %{buildroot}%{_libdir}/security/%{name}
|
cp -pr src/* %{buildroot}%{_libdir}/security/%{name}
|
||||||
|
|
||||||
|
# Install facial recognition, may look at better alternative
|
||||||
|
# for offline user
|
||||||
|
sh %{buildroot}%{_libdir}/security/%{name}/dlib-data/install.sh
|
||||||
|
mv *.dat %{buildroot}%{_libdir}/security/%{name}/dlib-data
|
||||||
|
rm -fr %{buildroot}%{_libdir}/security/%{name}/dlib-data/{Readme.md,install.sh,.gitignore}
|
||||||
|
|
||||||
|
# Add polkit rules
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/polkit-1/actions
|
||||||
|
install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/actions/
|
||||||
|
|
||||||
#Add bash completion
|
#Add bash completion
|
||||||
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
install -Dm 644 autocomplete/%{name} %{buildroot}%{_datadir}/bash-completion/completions
|
install -Dm 644 autocomplete/%{name} %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
|
|
@ -62,8 +77,40 @@ ln -s %{_libdir}/security/%{name}/cli.py %{buildroot}%{_bindir}/%{name}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_datadir}/bash-completion/completions/%{name}
|
%{_datadir}/bash-completion/completions/%{name}
|
||||||
#%%{_datadir}/pam-config/%%{name}
|
%{_datadir}/polkit-1/actions/
|
||||||
%{_libdir}/security/%{name}
|
%{_libdir}/security/%{name}
|
||||||
%config(noreplace) %{_libdir}/security/%{name}/config.ini
|
%config(noreplace) %{_libdir}/security/%{name}/config.ini
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 07 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 2.5.1-3
|
||||||
|
- Add polkit policy
|
||||||
|
|
||||||
|
* Sun Apr 07 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 2.5.1-2
|
||||||
|
- Install facial recognition data
|
||||||
|
|
||||||
|
* Tue Apr 02 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 2.5.1-1
|
||||||
|
- Update to 2.5.1
|
||||||
|
|
||||||
|
* Sat Mar 16 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 2.5.0-3
|
||||||
|
- Require python-v4l2
|
||||||
|
|
||||||
|
* Wed Jan 23 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 2.5.0-2
|
||||||
|
- Fix pam configuration
|
||||||
|
|
||||||
|
* Sun Jan 06 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 2.5.0-1
|
||||||
|
- Update to 2.5.0
|
||||||
|
|
||||||
|
* Thu Nov 29 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 2.4.0-3
|
||||||
|
- Add conditional statement for RHEL/Centos 7.x based on williamwlk spec
|
||||||
|
|
||||||
|
* Thu Nov 29 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 2.4.0-3
|
||||||
|
- Include bash completion
|
||||||
|
|
||||||
|
* Mon Nov 26 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 2.4.0-2
|
||||||
|
- Switch to new requirement method from Fedora Python guideline
|
||||||
|
|
||||||
|
* Mon Nov 26 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 2.4.0-1
|
||||||
|
- Update to 2.4.0
|
||||||
|
|
||||||
|
* Thu Nov 1 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 2.3.1-1
|
||||||
|
- Initial package
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue