diff options
author | rewine <lhongxu@outlook.com> | 2023-04-12 11:36:43 +0800 |
---|---|---|
committer | rewine <lhongxu@outlook.com> | 2023-04-12 11:44:55 +0800 |
commit | 03ec4a637aaa89266c1c4139e007cfdd97bb5318 (patch) | |
tree | 98ab235f467d78dbaf039d25053ae08904da6469 /pkgs/desktops/deepin | |
parent | 136e1d9aa368f72bf8390eef3384fbdaf37dea04 (diff) |
deepin.dde-api: dont set PATH
Diffstat (limited to 'pkgs/desktops/deepin')
3 files changed, 56 insertions, 41 deletions
diff --git a/pkgs/desktops/deepin/go-package/dde-api/0001-dont-set-PATH.patch b/pkgs/desktops/deepin/go-package/dde-api/0001-dont-set-PATH.patch new file mode 100644 index 0000000000000..679c343604d7a --- /dev/null +++ b/pkgs/desktops/deepin/go-package/dde-api/0001-dont-set-PATH.patch @@ -0,0 +1,54 @@ +From 47952eb3dfeea945a070496ef6f77e8446d42f86 Mon Sep 17 00:00:00 2001 +From: rewine <lhongxu@outlook.com> +Date: Tue, 21 Mar 2023 10:36:20 +0800 +Subject: [PATCH] chore: dont set PATH env +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Log: dbus 环境缺失环境变量应该由 dbus-update-activation-environment 处理 ,不应该由 dde-api 设置 PATH +--- + device/main.go | 2 -- + locale-helper/main.go | 2 -- + 2 files changed, 4 deletions(-) + +diff --git a/device/main.go b/device/main.go +index 6c5404c..261f109 100644 +--- a/device/main.go ++++ b/device/main.go +@@ -5,7 +5,6 @@ + package main + + import ( +- "os" + "time" + + "github.com/linuxdeepin/go-lib/dbusutil" +@@ -15,7 +14,6 @@ import ( + var logger = log.NewLogger(dbusServiceName) + + func main() { +- os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") + service, err := dbusutil.NewSystemService() + if err != nil { + logger.Fatal("failed to new system service:", err) +diff --git a/locale-helper/main.go b/locale-helper/main.go +index 92e1ddb..5e3a2ff 100644 +--- a/locale-helper/main.go ++++ b/locale-helper/main.go +@@ -5,7 +5,6 @@ + package main + + import ( +- "os" + "os/exec" + "sync" + "time" +@@ -45,7 +44,6 @@ var ( + ) + + func main() { +- os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") + logger.BeginTracing() + defer logger.EndTracing() + diff --git a/pkgs/desktops/deepin/go-package/dde-api/0001-fix-PATH-for-NixOS.patch b/pkgs/desktops/deepin/go-package/dde-api/0001-fix-PATH-for-NixOS.patch deleted file mode 100644 index c4726982241d3..0000000000000 --- a/pkgs/desktops/deepin/go-package/dde-api/0001-fix-PATH-for-NixOS.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c8f597bd7286a76e7ce371e4f7982d9d2700868a Mon Sep 17 00:00:00 2001 -From: rewine <luhongxu@deepin.org> -Date: Wed, 28 Dec 2022 23:06:53 +0800 -Subject: [PATCH] fix PATH for NixOS - ---- - device/main.go | 2 +- - locale-helper/main.go | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/device/main.go b/device/main.go -index 6c5404c..f79bcfc 100644 ---- a/device/main.go -+++ b/device/main.go -@@ -15,7 +15,7 @@ import ( - var logger = log.NewLogger(dbusServiceName) - - func main() { -- os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") -+ os.Setenv("PATH", "/run/current-system/sw/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") - service, err := dbusutil.NewSystemService() - if err != nil { - logger.Fatal("failed to new system service:", err) -diff --git a/locale-helper/main.go b/locale-helper/main.go -index 0866e48..ef000b5 100644 ---- a/locale-helper/main.go -+++ b/locale-helper/main.go -@@ -45,7 +45,7 @@ var ( - ) - - func main() { -- os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") -+ os.Setenv("PATH", "/run/current-system/sw/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin") - logger.BeginTracing() - defer logger.EndTracing() - --- -2.38.1 - diff --git a/pkgs/desktops/deepin/go-package/dde-api/default.nix b/pkgs/desktops/deepin/go-package/dde-api/default.nix index 9643ee35dc8b5..87038ae5e49ba 100644 --- a/pkgs/desktops/deepin/go-package/dde-api/default.nix +++ b/pkgs/desktops/deepin/go-package/dde-api/default.nix @@ -35,7 +35,7 @@ buildGoPackage rec { sha256 = "sha256-F+vEOSpysqVtjs8de5mCmeANuCbYUQ860ZHl5rwNYac="; }; - patches = [ ./0001-fix-PATH-for-NixOS.patch ]; + patches = [ ./0001-dont-set-PATH.patch ]; postPatch = '' substituteInPlace lang_info/lang_info.go \ @@ -47,7 +47,7 @@ buildGoPackage rec { substituteInPlace sound-theme-player/main.go \ --replace "/usr/sbin/alsactl" "alsactl" - substituteInPlace misc/scripts/deepin-boot-sound.sh + substituteInPlace misc/scripts/deepin-boot-sound.sh \ --replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" substituteInPlace lunar-calendar/huangli.go adjust-grub-theme/main.go \ |