Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package deepin-daemon for openSUSE:Factory checked in at 2022-01-22 08:18:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/deepin-daemon (Old) and /work/SRC/openSUSE:Factory/.deepin-daemon.new.1938 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "deepin-daemon" Sat Jan 22 08:18:09 2022 rev:6 rq:947873 version:5.13.36 Changes: -------- --- /work/SRC/openSUSE:Factory/deepin-daemon/deepin-daemon.changes 2021-09-14 21:14:30.528412048 +0200 +++ /work/SRC/openSUSE:Factory/.deepin-daemon.new.1938/deepin-daemon.changes 2022-01-22 08:19:04.694542260 +0100 @@ -1,0 +2,12 @@ +Fri Jan 21 06:58:27 UTC 2022 - Hillwood Yang <[email protected]> + +- Use qdbus-qt5 instead of qdbus +- Fix login.defs path, add fix-login_defs-path.patch + +------------------------------------------------------------------- +Wed Jan 19 11:41:16 UTC 2022 - Dominique Leuenberger <[email protected]> + +- BuildRequire pkgconfig(systemd) instead of systemd: allowOBS to + shortcut through systemd-mini. + +------------------------------------------------------------------- New: ---- fix-login_defs-path.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ deepin-daemon.spec ++++++ --- /var/tmp/diff_new_pack.yx1I8N/_old 2022-01-22 08:19:05.818534686 +0100 +++ /var/tmp/diff_new_pack.yx1I8N/_new 2022-01-22 08:19:05.822534659 +0100 @@ -1,7 +1,7 @@ # # spec file for package deepin-daemon # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -40,8 +40,11 @@ # PATCH-FIX-OPENSUSE disable-gobuild-in-makefile.patch [email protected] # Use gobuild macro instead of makefile to build go binaries Patch2: disable-gobuild-in-makefile.patch -Patch3: harden_deepin-accounts-daemon.service.patch -Patch4: harden_hwclock_stop.service.patch +# PATCH-Fix-UPSTREAM fix-login_defs-path.patch +# https://github.com/linuxdeepin/dde-daemon/commit/1262c03c5e5b4771f04a73ee2c01e1490f4e96af +Patch3: fix-login_defs-path.patch +Patch4: harden_deepin-accounts-daemon.service.patch +Patch5: harden_hwclock_stop.service.patch %if 0%{?suse_version} > 1500 BuildRequires: golang(API) = 1.15 %endif @@ -82,11 +85,12 @@ %else BuildRequires: rsvg-view %endif -BuildRequires: systemd BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(systemd) Requires: acpid Requires: gvfs Requires: iw +Requires: libqt5-qdbus Requires: rfkill Requires: upower Requires: wallpaper-branding-openSUSE @@ -185,6 +189,8 @@ sed -i 's|/lib/udev|/usr/lib/udev|g' Makefile sed -i 's|/etc/modules-load.d|/usr/lib/modules-load.d|g' Makefile +sed -i 's|qdbus|qdbus-qt5|g' network/examples/set_wired_static_ip.sh misc/etc/acpi/powerbtn.sh + %build %goprep %{import_path} %gobuild ... @@ -282,7 +288,7 @@ # %{_prefix}/lib/modules-load.d/i2c_dev.conf %dir %{_sysconfdir}/pulse/daemon.conf.d %config %{_sysconfdir}/pulse/daemon.conf.d/10-deepin.conf -%{_prefix}/lib/systemd/system/hwclock_stop.service +%{_unitdir}/hwclock_stop.service %dir %{_sysconfdir}/grub.d %{_sysconfdir}/grub.d/35_deepin_gfxmode %{_prefix}/lib/%{name}/ ++++++ fix-login_defs-path.patch ++++++ >From 1262c03c5e5b4771f04a73ee2c01e1490f4e96af Mon Sep 17 00:00:00 2001 From: justforlxz <[email protected]> Date: Mon, 10 Jan 2022 10:02:37 +0800 Subject: [PATCH] fix: missing fallback for /usr/etc/login.defs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://build.opensuse.org/request/show/944905 In opensuse, file changes have been performed, so fallback needs to be added Log: ?????? openSUSE ??????????????????????????? Influence: no Change-Id: I4ccbb4d03d7eb62fc203118e8d817b61ba6deb99 --- accounts/users/list.go | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/accounts/users/list.go b/accounts/users/list.go index 151117c96..f35f13e2f 100644 --- a/accounts/users/list.go +++ b/accounts/users/list.go @@ -33,7 +33,6 @@ const ( userFilePasswd = "/etc/passwd" userFileShadow = "/etc/shadow" userFileGroup = "/etc/group" - userFileLoginDefs = "/etc/login.defs" userFileSudoers = "/etc/sudoers" itemLenPasswd = 7 @@ -48,6 +47,32 @@ var ( } ) +func userFileLoginDefs() string { + userFileLoginDefs := "/etc/login.defs" + userFileLoginDefsFallback := "/usr/etc/login.defs" + + exists := func(name string) bool { + _, err := os.Stat(name) + if err == nil { + return true + } + if errors.Is(err, os.ErrNotExist) { + return false + } + return false + } + + if exists(userFileLoginDefs) { + return userFileLoginDefs + } + + if exists(userFileLoginDefsFallback) { + return userFileLoginDefsFallback + } + + return "" +} + type UserInfo struct { Name string Uid string @@ -93,7 +118,7 @@ func GetHumanUserInfos() (UserInfos, error) { func IsHumanUdcpUserUid(uid uint32) bool { userInfo := UserInfo{Uid: strconv.FormatUint(uint64(uid), 10)} - return userInfo.isHumanViaLoginDefs(userFileLoginDefs) + return userInfo.isHumanViaLoginDefs(userFileLoginDefs()) } func GetUserInfoByName(name string) (UserInfo, error) { @@ -165,7 +190,7 @@ func (infos UserInfos) GetUserNames() []string { func (infos UserInfos) filterUserInfos() UserInfos { var tmp UserInfos for _, info := range infos { - if !info.isHumanUser(userFileLoginDefs) { + if !info.isHumanUser(userFileLoginDefs()) { continue }
