diff --git a/0001-uos-startdde-fix-kvm-gpu-message-pci-error.patch b/0001-uos-startdde-fix-kvm-gpu-message-pci-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..d49947620a389a43821c8ec83affec0a1187e0cc --- /dev/null +++ b/0001-uos-startdde-fix-kvm-gpu-message-pci-error.patch @@ -0,0 +1,72 @@ +diff -Nuar startdde-5.9.61/display/util.go startdde-5.9.61.new/display/util.go +--- startdde-5.9.61/display/util.go 2022-12-09 11:19:18.000000000 +0800 ++++ startdde-5.9.61.new/display/util.go 2023-04-12 11:21:51.145365556 +0800 +@@ -15,6 +15,7 @@ + "sort" + "strconv" + "strings" ++ "os/exec" + + "github.com/godbus/dbus" + hostname1 "github.com/linuxdeepin/go-dbus-factory/org.freedesktop.hostname1" +@@ -333,6 +334,32 @@ + return chassis, nil + } + ++func CheckKvm() string { ++ var maty string ++ out, err := exec.Command("systemd-detect-virt").Output() ++ if err != nil { ++ maty = "" ++ }else { ++ maty = string(out) ++ maty = strings.Replace(maty, "\n", "", -1) ++ } ++ return maty ++} ++ ++func CheckArch() string { ++ var KArch string ++ out, err := exec.Command("arch").Output() ++ ++ if err != nil { ++ KArch = "" ++ }else { ++ KArch = string(out) ++ KArch = strings.Replace(KArch,"\n","",-1) ++ } ++ return KArch ++} ++ ++ + func getGraphicsCardPciId() string { + var pciId string + subsystems := []string{"drm"} +@@ -362,6 +389,27 @@ + } + } + } ++//qxl not support in arm/loongarch ++//just try drm/card0 ++ if pciId == "" { ++ maty := CheckKvm() ++ KArch := CheckArch() ++ if maty == "kvm" { ++ if KArch == "aarch64" || KArch == "loongarch64" { ++ for _, dev := range devices { ++ name := dev.GetName() ++ if name == "card0" { ++ cardDevice := dev.GetParent() ++ parentDevice := cardDevice.GetParent() ++ pciId = parentDevice.GetProperty("PCI_ID") ++ cardDevice.Unref() ++ parentDevice.Unref() ++ break ++ } ++ } ++ } ++ } ++ } + + return pciId + } diff --git a/0002-uos-startdde-rm-redshift.patch b/0002-uos-startdde-rm-redshift.patch new file mode 100644 index 0000000000000000000000000000000000000000..42eb18b25fbf73795ce008c32fe1311661a51598 --- /dev/null +++ b/0002-uos-startdde-rm-redshift.patch @@ -0,0 +1,282 @@ +diff -Nuar startdde-5.9.61/display/display.go startdde-5.9.61.new/display/display.go +--- startdde-5.9.61/display/display.go 2022-12-09 11:19:18.000000000 +0800 ++++ startdde-5.9.61.new/display/display.go 2023-04-13 09:51:43.128038184 +0800 +@@ -119,7 +119,7 @@ + m.initTouchscreens() + + if !_greeterMode { +- controlRedshift("disable") ++ //controlRedshift("disable") + m.applyColorTempConfig(m.DisplayMode) + } + +diff -Nuar startdde-5.9.61/.history/display/display_20221209111917.go startdde-5.9.61.new/.history/display/display_20221209111917.go +--- startdde-5.9.61/.history/display/display_20221209111917.go 1970-01-01 08:00:00.000000000 +0800 ++++ startdde-5.9.61.new/.history/display/display_20221209111917.go 2023-04-13 09:51:43.124036951 +0800 +@@ -0,0 +1,131 @@ ++// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. ++// ++// SPDX-License-Identifier: GPL-3.0-or-later ++ ++package display ++ ++import ( ++ "errors" ++ "reflect" ++ ++ "github.com/godbus/dbus" ++ sysdisplay "github.com/linuxdeepin/go-dbus-factory/com.deepin.system.display" ++ "github.com/linuxdeepin/go-lib/dbusutil" ++ "github.com/linuxdeepin/go-lib/log" ++) ++ ++var logger = log.NewLogger("daemon/display") ++ ++const ( ++ dbusServiceName = "com.deepin.daemon.Display" ++ dbusInterface = "com.deepin.daemon.Display" ++ dbusPath = "/com/deepin/daemon/Display" ++) ++ ++var _dpy *Manager ++ ++var _greeterMode bool ++ ++func SetGreeterMode(val bool) { ++ _greeterMode = val ++} ++ ++type scaleFactorsHelper struct { ++ changedCb func(factors map[string]float64) error ++} ++ ++// ScaleFactorsHelper 全局的 scale factors 相关 helper,要传给 xsettings 模块。 ++var ScaleFactorsHelper scaleFactorsHelper ++ ++// 用于在 display.Start 还没被调用时,先由 xsettings.Start 调用了 ScaleFactorsHelper.SetScaleFactors, 缓存数据。 ++var _scaleFactors map[string]float64 ++ ++func (h *scaleFactorsHelper) SetScaleFactors(factors map[string]float64) error { ++ if _dpy == nil { ++ _scaleFactors = factors ++ return nil ++ } ++ return _dpy.setScaleFactors(factors) ++} ++ ++func (h *scaleFactorsHelper) GetScaleFactors() (map[string]float64, error) { ++ sysBus, err := dbus.SystemBus() ++ if err != nil { ++ return nil, err ++ } ++ sysDisplay := sysdisplay.NewDisplay(sysBus) ++ cfgJson, err := sysDisplay.GetConfig(0) ++ if err != nil { ++ return nil, err ++ } ++ var rootCfg struct { ++ Config struct { ++ ScaleFactors map[string]float64 ++ } ++ } ++ err = jsonUnmarshal(cfgJson, &rootCfg) ++ if err != nil { ++ return nil, err ++ } ++ return rootCfg.Config.ScaleFactors, nil ++} ++ ++func (h *scaleFactorsHelper) SetChangedCb(fn func(factors map[string]float64) error) { ++ h.changedCb = fn ++} ++ ++func (m *Manager) setScaleFactors(factors map[string]float64) error { ++ logger.Debug("setScaleFactors", factors) ++ m.sysConfig.mu.Lock() ++ defer m.sysConfig.mu.Unlock() ++ ++ if reflect.DeepEqual(m.sysConfig.Config.ScaleFactors, factors) { ++ return nil ++ } ++ m.sysConfig.Config.ScaleFactors = factors ++ err := m.saveSysConfigNoLock("scale factors changed") ++ if err != nil { ++ logger.Warning(err) ++ } ++ return err ++} ++ ++func Start(service *dbusutil.Service) error { ++ m := newManager(service) ++ m.init() ++ ++ if !_greeterMode { ++ // 正常 startdde ++ err := service.Export(dbusPath, m) ++ if err != nil { ++ return err ++ } ++ ++ err = service.RequestName(dbusServiceName) ++ if err != nil { ++ return err ++ } ++ } ++ _dpy = m ++ return nil ++} ++ ++func StartPart2() error { ++ if _dpy == nil { ++ return errors.New("_dpy is nil") ++ } ++ m := _dpy ++ m.initSysDisplay() ++ m.initTouchscreens() ++ ++ if !_greeterMode { ++ controlRedshift("disable") ++ m.applyColorTempConfig(m.DisplayMode) ++ } ++ ++ return nil ++} ++ ++func SetLogLevel(level log.Priority) { ++ logger.SetLogLevel(level) ++} +diff -Nuar startdde-5.9.61/.history/display/display_20230413095143.go startdde-5.9.61.new/.history/display/display_20230413095143.go +--- startdde-5.9.61/.history/display/display_20230413095143.go 1970-01-01 08:00:00.000000000 +0800 ++++ startdde-5.9.61.new/.history/display/display_20230413095143.go 2023-04-13 09:51:43.132039419 +0800 +@@ -0,0 +1,131 @@ ++// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. ++// ++// SPDX-License-Identifier: GPL-3.0-or-later ++ ++package display ++ ++import ( ++ "errors" ++ "reflect" ++ ++ "github.com/godbus/dbus" ++ sysdisplay "github.com/linuxdeepin/go-dbus-factory/com.deepin.system.display" ++ "github.com/linuxdeepin/go-lib/dbusutil" ++ "github.com/linuxdeepin/go-lib/log" ++) ++ ++var logger = log.NewLogger("daemon/display") ++ ++const ( ++ dbusServiceName = "com.deepin.daemon.Display" ++ dbusInterface = "com.deepin.daemon.Display" ++ dbusPath = "/com/deepin/daemon/Display" ++) ++ ++var _dpy *Manager ++ ++var _greeterMode bool ++ ++func SetGreeterMode(val bool) { ++ _greeterMode = val ++} ++ ++type scaleFactorsHelper struct { ++ changedCb func(factors map[string]float64) error ++} ++ ++// ScaleFactorsHelper 全局的 scale factors 相关 helper,要传给 xsettings 模块。 ++var ScaleFactorsHelper scaleFactorsHelper ++ ++// 用于在 display.Start 还没被调用时,先由 xsettings.Start 调用了 ScaleFactorsHelper.SetScaleFactors, 缓存数据。 ++var _scaleFactors map[string]float64 ++ ++func (h *scaleFactorsHelper) SetScaleFactors(factors map[string]float64) error { ++ if _dpy == nil { ++ _scaleFactors = factors ++ return nil ++ } ++ return _dpy.setScaleFactors(factors) ++} ++ ++func (h *scaleFactorsHelper) GetScaleFactors() (map[string]float64, error) { ++ sysBus, err := dbus.SystemBus() ++ if err != nil { ++ return nil, err ++ } ++ sysDisplay := sysdisplay.NewDisplay(sysBus) ++ cfgJson, err := sysDisplay.GetConfig(0) ++ if err != nil { ++ return nil, err ++ } ++ var rootCfg struct { ++ Config struct { ++ ScaleFactors map[string]float64 ++ } ++ } ++ err = jsonUnmarshal(cfgJson, &rootCfg) ++ if err != nil { ++ return nil, err ++ } ++ return rootCfg.Config.ScaleFactors, nil ++} ++ ++func (h *scaleFactorsHelper) SetChangedCb(fn func(factors map[string]float64) error) { ++ h.changedCb = fn ++} ++ ++func (m *Manager) setScaleFactors(factors map[string]float64) error { ++ logger.Debug("setScaleFactors", factors) ++ m.sysConfig.mu.Lock() ++ defer m.sysConfig.mu.Unlock() ++ ++ if reflect.DeepEqual(m.sysConfig.Config.ScaleFactors, factors) { ++ return nil ++ } ++ m.sysConfig.Config.ScaleFactors = factors ++ err := m.saveSysConfigNoLock("scale factors changed") ++ if err != nil { ++ logger.Warning(err) ++ } ++ return err ++} ++ ++func Start(service *dbusutil.Service) error { ++ m := newManager(service) ++ m.init() ++ ++ if !_greeterMode { ++ // 正常 startdde ++ err := service.Export(dbusPath, m) ++ if err != nil { ++ return err ++ } ++ ++ err = service.RequestName(dbusServiceName) ++ if err != nil { ++ return err ++ } ++ } ++ _dpy = m ++ return nil ++} ++ ++func StartPart2() error { ++ if _dpy == nil { ++ return errors.New("_dpy is nil") ++ } ++ m := _dpy ++ m.initSysDisplay() ++ m.initTouchscreens() ++ ++ if !_greeterMode { ++ //controlRedshift("disable") ++ m.applyColorTempConfig(m.DisplayMode) ++ } ++ ++ return nil ++} ++ ++func SetLogLevel(level log.Priority) { ++ logger.SetLogLevel(level) ++} diff --git a/0003-uos-startdde-rm-message-greeter-BadMatch-error.patch b/0003-uos-startdde-rm-message-greeter-BadMatch-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..05e5ddb5174fe9f1a247e1c9b9d8ccc382a6f5fc --- /dev/null +++ b/0003-uos-startdde-rm-message-greeter-BadMatch-error.patch @@ -0,0 +1,14 @@ +diff -Nuar startdde-5.9.61/display/greeter.go startdde-5.9.61.new/display/greeter.go +--- startdde-5.9.61/display/greeter.go 2022-12-09 11:19:18.000000000 +0800 ++++ startdde-5.9.61.new/display/greeter.go 2023-04-19 17:14:55.561867197 +0800 +@@ -27,7 +27,9 @@ + } + err := m.doShowCursor(true) + if err != nil { +- logger.Warning(err) ++ //display only on greeter stage and in xorg server the err occurs when it show hide cursor ++ //just replace warning with debug to avoid print the err in /var/log/messages ++ logger.Debug(err) + } + m.cursorShowed = true + } diff --git a/README.en.md b/README.en.md deleted file mode 100644 index a6c62e3022a7e4b45b9a42ab01eeee88b8a994d6..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# startdde - -#### Description -startdde - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 7388a2d0080239c38c89d3db22e97dea370cb2b7..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# startdde - -#### 介绍 -startdde - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/startdde-5.8.11.3.tar.xz b/startdde-5.8.11.3.tar.xz deleted file mode 100644 index a1f0eda9a21f0a984da36be588870aa5f46e307e..0000000000000000000000000000000000000000 Binary files a/startdde-5.8.11.3.tar.xz and /dev/null differ diff --git a/startdde-5.9.61.tar.gz b/startdde-5.9.61.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6d0e55d59ba4c546c54c504b5cdd205cb024eb60 Binary files /dev/null and b/startdde-5.9.61.tar.gz differ diff --git a/startdde.spec b/startdde.spec index feada2ccd13ecc41b4ec81164ce938f093fcda4f..5ee231f0090cf0b23d4d16a9f1838d48d6d675ee 100644 --- a/startdde.spec +++ b/startdde.spec @@ -1,20 +1,21 @@ %global _missing_build_ids_terminate_build 0 %global debug_package %{nil} -%define specrelease 5%{?dist} -%if 0%{?openeuler} -%define specrelease 5 -%endif +%define specrelease 1 Name: startdde -Version: 5.8.11.3 +Version: 5.9.61 Release: %{specrelease} Summary: Starter of deepin desktop environment License: GPLv3 URL: https://github.com/linuxdeepin/startdde -Source0: %{name}-%{version}.tar.xz +Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.gz +Patch1: 0001-uos-startdde-fix-kvm-gpu-message-pci-error.patch +Patch2: 0002-uos-startdde-rm-redshift.patch +Patch3: 0003-uos-startdde-rm-message-greeter-BadMatch-error.patch + BuildRequires: golang BuildRequires: jq BuildRequires: glib2-devel @@ -43,16 +44,25 @@ Recommends: dde-qt5integration %{summary}. %prep -%autosetup -n %{name}-%{version} +%setup -n %{name}-%{version} sed -i 's|/usr/lib/deepin-daemon|/usr/libexec/deepin-daemon|g' \ misc/auto_launch/chinese.json misc/auto_launch/default.json -patch Makefile < rpm/Makefile.patch patch main.go < rpm/main.go.patch + +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + tar -xf %{SOURCE1} %build -export GOPATH=%{_builddir}/%{name}-%{version}/vendor:$GOPATH +%ifarch loongarch64 +export GOOS="linux" +export CGO_ENABLE=1 +%endif + +export GOPATH=%{_datadir}/gocode:%{_builddir}/%{name}-%{version}/vendor:$GOPATH ## Scripts in /etc/X11/Xsession.d are not executed after xorg start sed -i 's|X11/Xsession.d|X11/xinit/xinitrc.d|g' Makefile @@ -77,6 +87,7 @@ fi %license LICENSE %{_sysconfdir}/X11/xinit/xinitrc.d/00deepin-dde-env %{_sysconfdir}/X11/xinit/xinitrc.d/01deepin-profile +%{_sysconfdir}/X11/xinit/xinitrc.d/94qt_env %{_sysconfdir}/profile.d/deepin-xdg-dir.sh %{_bindir}/%{name} %{_sbindir}/deepin-fix-xauthority-perm @@ -89,8 +100,13 @@ fi %{_datadir}/glib-2.0/schemas/com.deepin.dde.display.gschema.xml %{_datadir}/glib-2.0/schemas/com.deepin.dde.startdde.gschema.xml /usr/lib/deepin-daemon/greeter-display-daemon +%{_datadir}/locale/ +%{_datadir}/dsg/configs/org.deepin.startdde/ %changelog +* Tue Jun 18 2024 lvgenggeng - 5.9.61-1 +- upgrade to version 5.9.61 + * Wed Jun 28 2023 liweigang - 5.8.11.3-5 - feat: update vendor(update golang.org/x/sys) diff --git a/vendor.tar.gz b/vendor.tar.gz index 8eedde65a7004ecfc5893413a8ecc61347dd4901..6b45a62f0f75465bd8d5e750039c1628dd0f64a8 100644 Binary files a/vendor.tar.gz and b/vendor.tar.gz differ