Package init
This commit is contained in:
commit
58046e2911
@ -0,0 +1,32 @@
|
|||||||
|
From fe356951a9d45fee73036aaa72661f0319dffba3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bastien Nocera <hadess@hadess.net>
|
||||||
|
Date: Tue, 21 Aug 2018 13:30:44 +0200
|
||||||
|
Subject: [PATCH] daemon: Fix upower not having access to udev events
|
||||||
|
|
||||||
|
PrivateNetwork=true will cut off upower from the udev netlink socket, so
|
||||||
|
it's not what we want to use, as we want those events.
|
||||||
|
|
||||||
|
See https://lists.freedesktop.org/archives/systemd-devel/2018-July/041000.html
|
||||||
|
|
||||||
|
Closes: #68
|
||||||
|
---
|
||||||
|
src/upower.service.in | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/upower.service.in b/src/upower.service.in
|
||||||
|
index 835529a..8838655 100644
|
||||||
|
--- a/src/upower.service.in
|
||||||
|
+++ b/src/upower.service.in
|
||||||
|
@@ -17,7 +17,8 @@ ProtectHome=true
|
||||||
|
PrivateTmp=true
|
||||||
|
|
||||||
|
# Network
|
||||||
|
-PrivateNetwork=true
|
||||||
|
+# PrivateNetwork=true would block udev's netlink socket
|
||||||
|
+RestrictAddressFamilies=AF_UNIX AF_NETLINK
|
||||||
|
|
||||||
|
# Execute Mappings
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
--
|
||||||
|
2.19.0
|
||||||
|
|
||||||
BIN
upower-0.99.8.tar.xz
Normal file
BIN
upower-0.99.8.tar.xz
Normal file
Binary file not shown.
89
upower.spec
Normal file
89
upower.spec
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
Name: upower
|
||||||
|
Version: 0.99.8
|
||||||
|
Release: 4
|
||||||
|
Summary: Power Management Service
|
||||||
|
License: GPLv2+
|
||||||
|
URL: http://upower.freedesktop.org/
|
||||||
|
|
||||||
|
Source0: https://gitlab.freedesktop.org/upower/upower/uploads/9125ab7ee96fdc4ecc68cfefb50c1cab/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
Patch0: 0001-daemon-Fix-upower-not-having-access-to-udev-events.patch
|
||||||
|
|
||||||
|
BuildRequires: sqlite-devel libtool intltool gettext libgudev1-devel gobject-introspection-devel gtk-doc systemd udev
|
||||||
|
BuildRequires: libusbx-devel libimobiledevice-devel glib2-devel >= 2.6.0
|
||||||
|
Requires: gobject-introspection
|
||||||
|
|
||||||
|
%description
|
||||||
|
UPower is an abstraction for enumerating power devices, listening to
|
||||||
|
device events and querying history and statistics. Any application or
|
||||||
|
service on the system can access the org.freedesktop.UPower service
|
||||||
|
via the system message bus. Some operations (such as suspending the
|
||||||
|
system) are restricted using PolicyKit.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Headers and libraries for UPower
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Headers and libraries for %{name}.
|
||||||
|
|
||||||
|
%package devel-docs
|
||||||
|
Summary: Developer documentation for for libupower-glib
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel-docs
|
||||||
|
Developer documentation for for libupower-glib.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --enable-gtk-doc --enable-introspection
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%find_lang upower
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files -f upower.lang
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
|
%license COPYING
|
||||||
|
%doc NEWS AUTHORS HACKING README
|
||||||
|
%{_libdir}/libupower-glib.so.*
|
||||||
|
%{_sysconfdir}/dbus-1/system.d/*.conf
|
||||||
|
/usr/lib/udev/rules.d/*.rules
|
||||||
|
%dir %{_localstatedir}/lib/upower
|
||||||
|
%dir %{_sysconfdir}/UPower
|
||||||
|
%config %{_sysconfdir}/UPower/UPower.conf
|
||||||
|
%{_bindir}/*
|
||||||
|
%{_libexecdir}/*
|
||||||
|
%{_libdir}/girepository-1.0/*.typelib
|
||||||
|
%{_mandir}/man*
|
||||||
|
%{_datadir}/dbus-1/system-services/*.service
|
||||||
|
/usr/lib/systemd/system/*.service
|
||||||
|
%exclude %{_libdir}/*.la
|
||||||
|
%exclude %{_libdir}/*.a
|
||||||
|
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_datadir}/dbus-1/interfaces/*.xml
|
||||||
|
%{_libdir}/libupower-glib.so
|
||||||
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
%{_datadir}/gir-1.0/*.gir
|
||||||
|
%dir %{_includedir}/libupower-glib
|
||||||
|
%{_includedir}/libupower-glib/up-*.h
|
||||||
|
%{_includedir}/libupower-glib/upower.h
|
||||||
|
|
||||||
|
%files devel-docs
|
||||||
|
%{_datadir}/gtk-doc
|
||||||
|
%dir %{_datadir}/gtk-doc/html/UPower
|
||||||
|
%{_datadir}/gtk-doc/html/UPower/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Aug 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.99.8-4
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user