Accepting request 542041 from home:hillwood:branches:X11:Deepin

OBS-URL: https://build.opensuse.org/request/show/542041
OBS-URL: https://build.opensuse.org/package/show/X11:Deepin/deepin-daemon?expand=0&rev=1
This commit is contained in:
Hillwood Yang 2017-11-15 13:18:56 +00:00 committed by Git OBS Bridge
commit 092a23a801
8 changed files with 262 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
dde-daemon-3.2.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92d5a8c277df5611f9d2cbe69d290796e223bd0701ee2670aba7ede52458f655
size 2649791

View File

@ -0,0 +1,50 @@
diff -Nur dde-daemon-3.2.0/misc/polkit-action/com.deepin.daemon.accounts.policy dde-daemon-3.2.0-new/misc/polkit-action/com.deepin.daemon.accounts.policy
--- dde-daemon-3.2.0/misc/polkit-action/com.deepin.daemon.accounts.policy 2017-10-12 11:03:49.000000000 +0800
+++ dde-daemon-3.2.0-new/misc/polkit-action/com.deepin.daemon.accounts.policy 2017-11-15 20:20:28.927451700 +0800
@@ -70,8 +70,8 @@
<message xml:lang="zh_CN">修改您的用户数据:需要授权</message>
<message xml:lang="zh_TW">若要變更您自身的使用者資料需要通過認證</message>
<defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_self</allow_active>
</defaults>
</action>
@@ -140,8 +140,8 @@
<message xml:lang="zh_CN">修改用户数据:需要授权</message>
<message xml:lang="zh_TW">若要變更使用者資料需要通過認證</message>
<defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
@@ -210,8 +210,8 @@
<message xml:lang="zh_CN">修改登录窗口配置:需要授权</message>
<message xml:lang="zh_TW">若要變更登入畫面組態需要通過認證</message>
<defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
diff -Nur dde-daemon-3.2.0/misc/polkit-action/com.deepin.daemon.Grub2.policy dde-daemon-3.2.0-new/misc/polkit-action/com.deepin.daemon.Grub2.policy
--- dde-daemon-3.2.0/misc/polkit-action/com.deepin.daemon.Grub2.policy 2017-10-12 11:03:49.000000000 +0800
+++ dde-daemon-3.2.0-new/misc/polkit-action/com.deepin.daemon.Grub2.policy 2017-11-15 20:19:25.289418600 +0800
@@ -10,8 +10,8 @@
<message>Change the grub2 configuration</message>
<message xml:lang="zh_CN">修改 Grub2 的配置</message>
<defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>

3
deepin-daemon-rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
addFilter('suse-dbus-unauthorized-service')
setBadness('suse-dbus-unauthorized-service', 0)
setBadness('polkit-unauthorized-privilege', 0)

12
deepin-daemon.changes Normal file
View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------
Wed Nov 15 12:21:47 UTC 2017 - hillwood@opensuse.org
- Add deepin-daemon-fix-wrong-policy-settings.patch
* Fix wrong policyconfig settings
- Cleanup spec
- Split language package.
-------------------------------------------------------------------
Tue Oct 3 15:29:45 UTC 2017 - sensor.wen@gmail.com
- Initial package.

168
deepin-daemon.spec Normal file
View File

@ -0,0 +1,168 @@
#
# spec file for package deepin-daemon
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _name dde-daemon
Name: deepin-daemon
Version: 3.2.0
Release: 0
Summary: Daemon handling the DDE session settings
License: GPL-3.0+
URL: https://github.com/linuxdeepin/dde-daemon
Source0: https://github.com/linuxdeepin/dde-daemon/archive/%{version}/%{_name}-%{version}.tar.gz
Source1: %{name}.sysusers
# PATCH-FIX-UPSTREAM deepin-daemon-fix-wrong-policy-settings.patch hillwood@opensuse.org - Fix wrong policyconfig settings.
Source99: %{name}-rpmlintrc
Patch0: %{name}-fix-wrong-policy-settings.patch
Group: System/GUI/Other
BuildRequires: golang-packaging
BuildRequires: gettext
BuildRequires: golang-gir-generator
BuildRequires: fontpackages-devel
BuildRequires: pam-devel
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gnome-keyring-1)
BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(libbamf3)
BuildRequires: pkgconfig(libcanberra)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libinput)
BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: golang-dbus-factory
BuildRequires: golang-go-lib
BuildRequires: golang-deepin-api-source
BuildRequires: golang-github-linuxdeepin-go-x11-client
BuildRequires: golang-github-burntsushi-xgb
BuildRequires: golang-github-burntsushi-xgbutil
BuildRequires: golang-github-axgle-mahonia
BuildRequires: golang-github-msteinert-pam
BuildRequires: golang-github-nfnt-resize
BuildRequires: golang-github-alecthomas-kingpin
BuildRequires: golang-gopkgin-yaml
BuildRequires: golang-org-x-tools
BuildRequires: golang-org-x-text
BuildRequires: golang-org-x-net
Requires: deepin-desktop-base
Requires: deepin-desktop-schemas
Requires: deepin-notifications
Requires: deepin-polkit-agent
Requires: acpid
Requires: gvfs
Requires: iw
Requires: rfkill
Requires: upower
Requires: xdotool
Requires: systemd
Recommends: NetworkManager-vpnc-gnome
Recommends: NetworkManager-pptp-gnome
Recommends: NetworkManager-l2tp-gnome
Recommends: NetworkManager-strongswan-gnome
Recommends: NetworkManager-openvpn-gnome
Recommends: NetworkManager-openconnect-gnome
Recommends: iso-codes
Recommends: mobile-broadband-provider-info
Recommends: google-noto-mono-fonts
Recommends: google-noto-sans-fonts
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Deepin Daemon is a daemon for handling the deepin session settings
%lang_package
%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1
# Fix library exec path
sed -i '/ldflags/d' Makefile
# Fix grub.cfg path
sed -i 's|boot/grub|boot/grub2|' grub2/{theme,log,entry,config}.go
sed -i 's|default_background.jpg|default.png|' accounts/user.go
%build
make %{?_smp_mflags}
%install
%make_install
install -Dm644 %{S:1} %{buildroot}/usr/lib/sysusers.d/deepin-daemon.conf
# fix systemd/logind config
install -d %{buildroot}/usr/lib/systemd/logind.conf.d/
cat > %{buildroot}/usr/lib/systemd/logind.conf.d/10-%{name}.conf <<EOF
[Login]
HandlePowerKey=ignore
HandleSuspendKey=ignore
EOF
%find_lang %{_name}
%post
if [ $1 -ge 1 ]; then
%sysusers_create deepin-daemon.conf
%{_sbindir}/alternatives --install %{_bindir}/x-terminal-emulator \
x-terminal-emulator %{_libexecdir}/%{name}/default-terminal 30
fi
%preun
if [ $1 -eq 0 ]; then
%{_sbindir}/alternatives --remove x-terminal-emulator \
%{_libexecdir}/%{name}/default-terminal
fi
%postun
if [ $1 -eq 0 ]; then
rm -f /var/cache/deepin/mark-setup-network-services
rm -f /var/log/deepin.log
fi
%files
%defattr(-,root,root,-)
%doc README.md LICENSE
%{_libexecdir}/%{name}/
%dir %{_sysusersdir}
%{_sysusersdir}/%{name}.conf
%dir %{_libexecdir}/systemd/logind.conf.d
%{_libexecdir}/systemd/logind.conf.d/10-%{name}.conf
%{_datadir}/dbus-1/services/*.service
%{_datadir}/dbus-1/system-services/*.service
%dir %{_datadir}/dbus-1/system.d
%{_datadir}/dbus-1/system.d/*.conf
%{_datadir}/%{_name}/
%{_datadir}/dde/
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%{_datadir}/polkit-1/actions/*.policy
%{_var}/cache/appearance/
%files lang -f %{_name}.lang
%changelog

2
deepin-daemon.sysusers Normal file
View File

@ -0,0 +1,2 @@
u deepin-daemon - "Deepin Daemon"
g deepin-daemon -