Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c1ce5385a7
!97 update version to 1.1.0
From: @wangyaoyong 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2024-05-10 04:15:01 +00:00
wangyaoyong
e9b4a4b418 update version to 1.1.0
Signed-off-by: wangyaoyong <yaoyong.oerv@isrc.iscas.ac.cn>
2024-05-08 16:34:55 +08:00
openeuler-ci-bot
86accfbb68
!94 sync patches from upstream
From: @jiayi0118 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2024-04-23 12:48:31 +00:00
openeuler-ci-bot
deb88caec6
!90 sync patches from upstream
From: @jiayi0118 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2024-04-19 01:25:34 +00:00
chenjiayi
53936c6f15 sync patches from upstream 2024-04-19 04:13:57 +08:00
chenjiayi
1bc397ae8c sync patches from upstream 2024-04-17 20:36:23 +08:00
openeuler-ci-bot
d4eb22fbfc
!88 fix: resolve not mounted home
From: @zhang-yao-2022 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2024-04-17 07:51:24 +00:00
zhangyao
26b399129e fix: resolve not mounted home 2024-04-15 09:00:43 +08:00
openeuler-ci-bot
af0e056195
!87 fix: read pid cmdline incorrect
From: @zhang-yao-2022 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2024-04-11 10:50:39 +00:00
zhangyao
2458ef3e28 fix: read pid cmdline incorrect 2024-04-11 15:22:30 +08:00
4 changed files with 18 additions and 162 deletions

View File

@ -1,129 +0,0 @@
From 98a7de479aa6da2d499b893fb1b5e5bfc598ab40 Mon Sep 17 00:00:00 2001
From: chenjiayi <chenjiayi22@huawei.com>
Date: Fri, 26 Jan 2024 15:27:03 +0800
Subject: [PATCH] feature(devmaster): add net_driver builtin to be compatible
with systemd-udev 255
The net_driver builtin is added to be compatible with systemd-udev 255.
Otherwise devmaster would crash when encounterring net_driver builtin in udev rules.
---
exts/devmaster/src/lib/builtin/mod.rs | 12 ++++-
exts/devmaster/src/lib/builtin/net_driver.rs | 56 ++++++++++++++++++++
2 files changed, 66 insertions(+), 2 deletions(-)
create mode 100644 exts/devmaster/src/lib/builtin/net_driver.rs
diff --git a/exts/devmaster/src/lib/builtin/mod.rs b/exts/devmaster/src/lib/builtin/mod.rs
index 259ebd13..30ad9031 100644
--- a/exts/devmaster/src/lib/builtin/mod.rs
+++ b/exts/devmaster/src/lib/builtin/mod.rs
@@ -34,6 +34,7 @@ pub mod hwdb;
pub mod input_id;
pub mod keyboard;
pub mod kmod;
+pub mod net_driver;
pub mod net_id;
pub mod net_setup_link;
pub mod path_id;
@@ -108,8 +109,9 @@ pub enum BuiltinCommand {
PathId = 8,
Uaccess = 9,
UsbId = 10,
- Example = 11,
- Max = 12,
+ NetDriver = 11,
+ Example = 12,
+ Max = 13,
}
impl FromStr for BuiltinCommand {
@@ -135,6 +137,7 @@ impl FromStr for BuiltinCommand {
"path_id" => Ok(BuiltinCommand::PathId),
"uaccess" => Ok(BuiltinCommand::Uaccess),
"usb_id" => Ok(BuiltinCommand::UsbId),
+ "net_driver" => Ok(BuiltinCommand::NetDriver),
"example" => Ok(BuiltinCommand::Example),
_ => Err(Error::BuiltinCommandError {
msg: "invalid builtin command".to_string(),
@@ -157,6 +160,7 @@ impl Display for BuiltinCommand {
BuiltinCommand::PathId => "path_id",
BuiltinCommand::Uaccess => "uaccess",
BuiltinCommand::UsbId => "usb_id",
+ BuiltinCommand::NetDriver => "net_driver",
BuiltinCommand::Example => "example",
_ => "invalid",
};
@@ -190,6 +194,10 @@ impl BuiltinManager {
builtins.insert(BuiltinCommand::PathId, Box::new(path_id::PathId {}));
builtins.insert(BuiltinCommand::Uaccess, Box::new(uaccess::Uaccess {}));
builtins.insert(BuiltinCommand::UsbId, Box::new(usb_id::UsbId {}));
+ builtins.insert(
+ BuiltinCommand::NetDriver,
+ Box::new(net_driver::NetDriver {}),
+ );
builtins.insert(BuiltinCommand::Example, Box::new(example::Example {}));
BuiltinManager { builtins }
diff --git a/exts/devmaster/src/lib/builtin/net_driver.rs b/exts/devmaster/src/lib/builtin/net_driver.rs
new file mode 100644
index 00000000..83e6398e
--- /dev/null
+++ b/exts/devmaster/src/lib/builtin/net_driver.rs
@@ -0,0 +1,56 @@
+// Copyright (c) 2022 Huawei Technologies Co.,Ltd. All rights reserved.
+//
+// sysMaster is licensed under Mulan PSL v2.
+// You can use this software according to the terms and conditions of the Mulan
+// PSL v2.
+// You may obtain a copy of Mulan PSL v2 at:
+// http://license.coscl.org.cn/MulanPSL2
+// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
+// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+// See the Mulan PSL v2 for more details.
+
+//! net_driver builtin
+//!
+//! Todo: compatible with udev
+
+use crate::builtin::Builtin;
+use crate::error::Result;
+use crate::rules::exec_unit::ExecuteUnit;
+
+/// btrfs builtin command
+pub struct NetDriver;
+
+impl Builtin for NetDriver {
+ /// builtin command
+ fn cmd(
+ &self,
+ _exec_unit: &ExecuteUnit,
+ _argc: i32,
+ _argv: Vec<String>,
+ _test: bool,
+ ) -> Result<bool> {
+ Ok(true)
+ }
+
+ /// builtin init function
+ fn init(&self) {}
+
+ /// builtin exit function
+ fn exit(&self) {}
+
+ /// check whether builtin command should reload
+ fn should_reload(&self) -> bool {
+ false
+ }
+
+ /// the help of builtin command
+ fn help(&self) -> String {
+ "detect network interface driver".to_string()
+ }
+
+ /// whether the builtin command can only run once
+ fn run_once(&self) -> bool {
+ false
+ }
+}
--
Gitee

View File

@ -1,27 +0,0 @@
From f2d77666e409dd9ae47c36680e9380900f02b6b9 Mon Sep 17 00:00:00 2001
From: zhangyao2022 <zhangyao108@huawei.com>
Date: Tue, 9 Apr 2024 16:04:45 +0800
Subject: [PATCH] fix: resolve wantedby invalid
---
core/sysmaster/src/manager/pre_install.rs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/core/sysmaster/src/manager/pre_install.rs b/core/sysmaster/src/manager/pre_install.rs
index 69823478..7032117c 100644
--- a/core/sysmaster/src/manager/pre_install.rs
+++ b/core/sysmaster/src/manager/pre_install.rs
@@ -543,9 +543,7 @@ impl Install {
let mut paths: Vec<PathBuf> = Vec::new();
for p in &self.lookup_path.search_path {
- let mut path = String::new();
- path = path + p + &unit_install.name();
- paths.push(PathBuf::from(path));
+ paths.push(Path::new(p).join(&unit_install.name()));
}
let configer = match UeConfigData::load_config(paths, &unit_install.name()) {
--
2.33.0

View File

@ -11,18 +11,15 @@
%global _cargo_build /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 %{_bindir}/cargo build %__cargo_common_opts
Name: sysmaster
Version: 1.0.0
Release: 3
Version: 1.1.0
Release: 1
Summary: redesign and reimplement process1.
License: Mulan PSL v2
URL: https://gitee.com/openeuler/sysmaster
Source0: %{name}-%{version}.tar.xz
Patch0: backport-feature-devmaster-add-net_driver-builtin-to-be-compa.patch
Patch1: backport-fix-resolve-wantedby-invalid.patch
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64 aarch64 riscv64
BuildRequires: rust cargo rust-packaging
BuildRequires: gcc clang openssl-libs
@ -162,6 +159,21 @@ if [ $1 -eq 0 ] ; then
fi
%changelog
* Wed May 8 2024 wangyaoyong <yaoyong.oerv@isrc.iscas.ac.cn> - 1.1.0-1
- update version to 1.1.0
* Tue Apr 23 2024 chenjiayi<chenjiayi22@huawei.com> - 1.0.0-7
- sync patches from upstream
* Thu Apr 18 2024 chenjiayi<chenjiayi22@huawei.com> - 1.0.0-6
- sync patches from upstream
* Wed Apr 17 2024 zhangyao<zhangyao108@huawei.com> - 1.0.0-5
- resolve not mounted home
* Thu Apr 11 2024 zhangyao<zhangyao108@huawei.com> - 1.0.0-4
- read pid cmdline incorrect
* Wed Apr 10 2024 zhangyao<zhangyao108@huawei.com> - 1.0.0-3
- resolve wantedby invalid and fix reboot symlink not correct after reinstall