[brltty] The brlapi.key is now preset, users in the brlapi group have access
Jaroslav Škarvada
jskarvad at fedoraproject.org
Mon Sep 23 10:12:20 UTC 2013
commit 3b4e139bd9dfc1f572c93f70ec60b4fa4058ea8a
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Mon Sep 23 12:12:08 2013 +0200
The brlapi.key is now preset, users in the brlapi group have access
Resolves: rhbz#1010656
brltty.spec | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/brltty.spec b/brltty.spec
index ef56378..9700859 100644
--- a/brltty.spec
+++ b/brltty.spec
@@ -19,7 +19,7 @@
Name: brltty
Version: %{pkg_version}
-Release: 8%{?dist}
+Release: 9%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://mielke.cc/brltty/
@@ -93,6 +93,8 @@ Group: Applications/System
License: LGPLv2+
Summary: Application Programming Interface for BRLTTY
Requires: %{name} = %{pkg_version}-%{release}
+Requires(pre): glibc-common, shadow-utils
+Requires(post): coreutils, util-linux
%description -n brlapi
This package provides the run-time support for the Application
Programming Interface to BRLTTY.
@@ -284,6 +286,9 @@ mv Documents/BrlAPIref/{html,BrlAPIref}
# Don't want static lib
rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
+# ghost brlapi.key
+touch ${RPM_BUILD_ROOT}%{_sysconfdir}/brlapi.key
+
%post
%systemd_post brltty.service
@@ -293,7 +298,17 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
%postun
%systemd_postun_with_restart brltty.service
-%post -n brlapi -p /sbin/ldconfig
+%pre -n brlapi
+getent group brlapi >/dev/null || groupadd -r brlapi >/dev/null
+
+%post -n brlapi
+if [ ! -e %{_sysconfdir}/brlapi.key ]; then
+ mcookie > %{_sysconfdir}/brlapi.key
+ chgrp brlapi %{_sysconfdir}/brlapi.key
+ chmod 0640 %{_sysconfdir}/brlapi.key
+fi
+/sbin/ldconfig
+
%postun -n brlapi -p /sbin/ldconfig
%files
@@ -336,6 +351,7 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
%{_bindir}/xbrlapi
%{_libdir}/brltty/libbrlttybba.so
%{_libdir}/libbrlapi.so.*
+%ghost %{_sysconfdir}/brlapi.key
%doc Drivers/Braille/XWindow/README
%doc Documents/Manual-BrlAPI/
%doc %{_mandir}/man1/xbrlapi.*
@@ -372,6 +388,10 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
%endif
%changelog
+* Mon Sep 23 2013 Jaroslav Škarvada <jskarvad at redhat.com> - 4.5-9
+- The brlapi.key is now preset, users in the brlapi group have access
+ Resolves: rhbz#1010656
+
* Sat Sep 14 2013 Richard W.M. Jones <rjones at redhat.com> - 4.5-8
- Rebuild for OCaml 4.01.0.
- Create stublibs directory for OCaml, else install fails.
More information about the scm-commits
mailing list