diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 232f28111f39875f8e59bc226bf306d0b3861be5..346040e66d637d97816cc633f573511cc7cdc2fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,56 +1,36 @@ fail_fast: true repos: - # - repo: "https://github.com/pre-commit/pre-commit-hooks.git" - # rev: v4.4.0 - # hooks: - # - id: check-byte-order-marker - # - id: check-case-conflict - # - id: check-merge-conflict - # - id: check-symlinks - # - id: check-toml - # - id: end-of-file-fixer - # - id: mixed-line-ending - # - id: trailing-whitespace - # - id: detect-private-key - # - id: check-executables-have-shebangs - # - id: check-shebang-scripts-are-executable - # - repo: "https://github.com/codespell-project/codespell.git" - # rev: v2.2.2 - # hooks: - # - id: codespell - # args: [-I, ci/codespell_ignore_words] - # verbose: true - # exclude: \.rules$ - # - repo: "https://github.com/psf/black.git" - # rev: 22.8.0 - # hooks: - # - id: black - # - repo: https://github.com/jumanjihouse/pre-commit-hooks - # rev: master # or specific git tag - # hooks: - # - id: bundler-audit - # # - id: check-mailmap - # - id: fasterer - # # - id: forbid-binary - # # - id: forbid-space-in-indent - # - id: git-check # Configure in .gitattributes - # - id: git-dirty # Configure in .gitignore - # - id: markdownlint # Configure in .mdlrc - # - id: reek - # # - id: require-ascii - # - id: rubocop - # - id: script-must-have-extension - # # - id: script-must-not-have-extension - # - id: shellcheck - # - id: shfmt + - repo: "https://github.com/pre-commit/pre-commit-hooks.git" + rev: v4.5.0 + hooks: + - id: check-added-large-files + args: ['--maxkb=100'] + - id: check-byte-order-marker + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace + - id: detect-private-key + - id: check-executables-have-shebangs + files: ^(.*\.sh|.*\.py)$ - repo: local hooks: + - id: codespell + name: codespell + description: Checks for common misspellings in text files. + entry: bash -c 'cargo clean;codespell -I ci/codespell_ignore_words -x ci/codespell_ignore_words -S *.rules' + language: system + pass_filenames: false + verbose: true - id: cargo-override-set name: cargo-override-set description: unset override. entry: bash -c 'rustup override set 1.57 || true' - language: rust + language: system pass_filenames: false files: \.(rs|toml)$ verbose: true @@ -58,7 +38,7 @@ repos: name: cargo clippy description: Lint rust sources entry: bash -c 'RUSTC_WRAPPER="" cargo clippy -vvv --all-targets --features "default" --all -- -Dwarnings' - language: rust + language: system pass_filenames: false files: \.rs$ verbose: true @@ -73,7 +53,7 @@ repos: name: cargo fmt description: Format files with rustfmt. entry: bash -c 'cargo fmt -v --all -- --check -v' - language: rust + language: system pass_filenames: false files: \.rs$ verbose: true @@ -81,7 +61,7 @@ repos: name: cargo fix description: Check the package for errors. entry: bash -c 'cargo fix -v --broken-code --all-targets --all --allow-dirty --allow-staged' - language: rust + language: system pass_filenames: false files: \.rs$ verbose: true @@ -89,7 +69,7 @@ repos: name: cargo build description: build the package for errors. entry: bash -c 'cargo build --all --features "default" -v' - language: rust + language: system pass_filenames: false files: \.(rs|toml)$ verbose: true @@ -105,7 +85,7 @@ repos: name: cargo test description: test the package for errors. entry: bash -c 'RUST_BACKTRACE=full cargo test --all-targets --all -v -- --nocapture --show-output --test-threads=1' - language: rust + language: system pass_filenames: false files: \.(rs|toml)$ verbose: true @@ -113,7 +93,7 @@ repos: name: cargo-override-unset description: unset override. entry: bash -c 'rustup override unset || true' - language: rust + language: system pass_filenames: false files: \.(rs|toml)$ verbose: true diff --git a/ci/00-pre.sh b/ci/00-pre.sh index 7ec817fa7c2014e0a437aeedf4fa258bee7538cf..c40cc82e8ef657b0f524108e905beaeeaf4b3eb5 100755 --- a/ci/00-pre.sh +++ b/ci/00-pre.sh @@ -2,6 +2,18 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $SCRIPT_DIR/common_function +# 定义标志文件的路径 +flag_file="$SCRIPT_DIR/../.git/sysmaster-first-build.flag" + +# 检查标志文件是否存在 +if [ -e "$flag_file" ]; then + echo "Not first build, skipping." + exit 0 +else + echo "This is the first build, continue." + touch "$flag_file" +fi + # Function to check if a file contains Chinese characters contains_chinese() { grep -Pn '[\p{Han}]' "$1" && echo "DO NOT USE CHINESE CHARACTERS in code, 不要在源码中使用中文!" && exit 1 @@ -14,9 +26,9 @@ done # Install required tools if not already installed if [ ! -f "/etc/centos-release" ] && [ ! -f "/etc/fedora-release" ]; then - required_packages=("gcc" "openssl-libs" "python3-pip" "python3-devel" "clang" "util-linux-devel" "kmod-devel") + required_packages=("gcc" "openssl-libs" "python3-pip" "python3" "python3-devel" "clang" "util-linux-devel" "kmod-devel") else - required_packages=("gcc" "openssl-libs" "python3-pip" "python3-devel" "clang" "libblkid-devel" "kmod-devel" "libselinux-devel") + required_packages=("gcc" "openssl-libs" "python3-pip" "python3" "python3-devel" "clang" "libblkid-devel" "kmod-devel" "libselinux-devel") fi missing_packages=() @@ -70,6 +82,10 @@ registry = "$fastest_source" git-fetch-with-cli = true EOF +sources=("https://521github.com/" "https://gitclone.com/github.com/" "https://gh.api.99988866.xyz/https://github.com/" "https://github.com/") +url=$(test_fasturl ${sources[@]}) +git config --global url."${url}".insteadOf "https://github.com/" + rm -rf ~/.cargo/.package-cache ##拉取代码 diff --git a/ci/01-pre-commit.sh b/ci/01-pre-commit.sh index c6ad92ff1930567f0947d071f80e04e597f246aa..b5c9deed3891ecdc312044e27ed0a5a317a7952d 100755 --- a/ci/01-pre-commit.sh +++ b/ci/01-pre-commit.sh @@ -1,6 +1,4 @@ #!/usr/bin/env bash -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source $SCRIPT_DIR/common_function function finish() { echo "--- PLEASE RUN sh -x ci/01-pre-commit.sh FIRST IN YOUR LOCALHOST!!! ---" @@ -23,13 +21,14 @@ do done export PATH="$PATH:/home/jenkins/.local/bin" -pip3 install pre-commit ruamel.yaml -i https://pypi.mirrors.ustc.edu.cn/simple || pip3 install -i http://pypi.douban.com/simple/ pre-commit ruamel.yaml || pip3 install pre-commit ruamel.yaml +files="pre-commit codespell ruamel.yaml" +pip3 install $files -i https://pypi.mirrors.ustc.edu.cn/simple || pip3 install -i http://pypi.douban.com/simple/ $files || pip3 install $files ## one PR ? Commit # oldnum=`git rev-list origin/master --no-merges --count` # newnum=`git rev-list HEAD --no-merges --count` # changenum=$[newnum - oldnum] -cargo check || exit 1 +cargo check >> /dev/null 2>&1 || exit 1 # add doc for src code for rustlist in `git diff origin/master --name-only | grep \.rs$ | grep -v "/examples/" | tr '\n' ' '` @@ -55,7 +54,5 @@ done #filelist=`git diff origin/master --stat | grep -v "files changed" | awk '{print $1}' | tr '\n' ' '` # ln -s `which python3` /home/jenkins/.local/bin/python # pre-commit autoupdate || pre-commit autoupdate || pre-commit autoupdate -sources=("https://521github.com/" "https://gitclone.com/github.com/" "https://gh.api.99988866.xyz/https://github.com/" "https://github.com/") -url=$(test_fasturl ${sources[@]}) -git config --global url."${url}".insteadOf "https://github.com/" + pre-commit run -vvv --all-files diff --git a/ci/codespell_ignore_words b/ci/codespell_ignore_words index 4f56e66514fdfe95179b86a68a809080cb19b78b..e690860df73bc1949f44816df77e47ffd016606a 100644 --- a/ci/codespell_ignore_words +++ b/ci/codespell_ignore_words @@ -1,3 +1,5 @@ crate configer job_alloc +renderD +Cruzer diff --git a/ci/common_function b/ci/common_function index 1d294e18d70be6817fcef182b71176c264c06325..3ba4c19bdfff922d36767b3189043ef6902d0cd9 100644 --- a/ci/common_function +++ b/ci/common_function @@ -15,7 +15,7 @@ function test_fasturl() for url in "${urls[@]}"; do # Send an HTTP request to get crate information and measure the execution time start_time=$(date +%s%N) - response=$(curl -s -o /dev/null --connect-timeout 3 -w "%{time_total}" "$url" > /dev/null 2>&1) + response=$(curl -s -o /dev/null --connect-timeout 1 -w "%{time_total}" "$url" > /dev/null 2>&1) if [ $? -ne 0 ]; then continue fi diff --git a/core/coms/mount/Cargo.toml b/core/coms/mount/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/base.rs b/core/coms/mount/src/base.rs old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/comm.rs b/core/coms/mount/src/comm.rs old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/lib.rs b/core/coms/mount/src/lib.rs old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/manager.rs b/core/coms/mount/src/manager.rs old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/mng.rs b/core/coms/mount/src/mng.rs old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/rentry.rs b/core/coms/mount/src/rentry.rs old mode 100755 new mode 100644 diff --git a/core/coms/mount/src/unit.rs b/core/coms/mount/src/unit.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/Cargo.toml b/core/coms/service/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/coms/service/src/base.rs b/core/coms/service/src/base.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/comm.rs b/core/coms/service/src/comm.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/config.rs b/core/coms/service/src/config.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/lib.rs b/core/coms/service/src/lib.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/manager.rs b/core/coms/service/src/manager.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/mng.rs b/core/coms/service/src/mng.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/monitor.rs b/core/coms/service/src/monitor.rs old mode 100755 new mode 100644 index 58200362cd969f5ce6cba058d70815f1a2f3c465..0b6213a636f5f849610f30cce4156ca634c756bd --- a/core/coms/service/src/monitor.rs +++ b/core/coms/service/src/monitor.rs @@ -10,7 +10,7 @@ // NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. // See the Mulan PSL v2 for more details. -/// software watchdog, if the watchdog not receive the READY=1 message within the timeout period, the kill the servcie. +/// software watchdog, if the watchdog not receive the READY=1 message within the timeout period, the kill the service. /// start the watchdog, compare the original and override timeout value, if it's invalid value then stop the watchdog. /// call recvmsg and read messages from the socket, and judge if it is the expected value, like READY=1. /// diff --git a/core/coms/service/src/pid.rs b/core/coms/service/src/pid.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/rentry.rs b/core/coms/service/src/rentry.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/spawn.rs b/core/coms/service/src/spawn.rs old mode 100755 new mode 100644 diff --git a/core/coms/service/src/unit.rs b/core/coms/service/src/unit.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/Cargo.toml b/core/coms/socket/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/base.rs b/core/coms/socket/src/base.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/comm.rs b/core/coms/socket/src/comm.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/config.rs b/core/coms/socket/src/config.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/lib.rs b/core/coms/socket/src/lib.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/load.rs b/core/coms/socket/src/load.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/manager.rs b/core/coms/socket/src/manager.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/mng.rs b/core/coms/socket/src/mng.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/pid.rs b/core/coms/socket/src/pid.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/port.rs b/core/coms/socket/src/port.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/rentry.rs b/core/coms/socket/src/rentry.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/spawn.rs b/core/coms/socket/src/spawn.rs old mode 100755 new mode 100644 diff --git a/core/coms/socket/src/unit.rs b/core/coms/socket/src/unit.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/Cargo.toml b/core/coms/target/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/coms/target/src/base.rs b/core/coms/target/src/base.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/src/comm.rs b/core/coms/target/src/comm.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/src/lib.rs b/core/coms/target/src/lib.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/src/manager.rs b/core/coms/target/src/manager.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/src/mng.rs b/core/coms/target/src/mng.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/src/rentry.rs b/core/coms/target/src/rentry.rs old mode 100755 new mode 100644 diff --git a/core/coms/target/src/unit.rs b/core/coms/target/src/unit.rs old mode 100755 new mode 100644 diff --git a/core/libcore/Cargo.toml b/core/libcore/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/libcore/build.rs b/core/libcore/build.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/error.rs b/core/libcore/src/error.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/exec/base.rs b/core/libcore/src/exec/base.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/exec/cmd.rs b/core/libcore/src/exec/cmd.rs old mode 100755 new mode 100644 index 694ac37b745954c6ca5e2eca96e65ba5a0666347..c3887035e6e3508d73f58d8de92acc696feca41e --- a/core/libcore/src/exec/cmd.rs +++ b/core/libcore/src/exec/cmd.rs @@ -101,6 +101,7 @@ impl ExecCommand { } } +/// pub fn deserialize_exec_command(s: &str) -> Result> { match parse_exec(s) { Ok(v) => Ok(v), diff --git a/core/libcore/src/exec/mod.rs b/core/libcore/src/exec/mod.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/lib.rs b/core/libcore/src/lib.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/api.rs b/core/libcore/src/rel/api.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/base.rs b/core/libcore/src/rel/base.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/debug.rs b/core/libcore/src/rel/debug.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/enable.rs b/core/libcore/src/rel/enable.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/history.rs b/core/libcore/src/rel/history.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/last.rs b/core/libcore/src/rel/last.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/mod.rs b/core/libcore/src/rel/mod.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/pending.rs b/core/libcore/src/rel/pending.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/rel/station.rs b/core/libcore/src/rel/station.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/serialize.rs b/core/libcore/src/serialize.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/unit/base.rs b/core/libcore/src/unit/base.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/unit/deps.rs b/core/libcore/src/unit/deps.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/unit/kill.rs b/core/libcore/src/unit/kill.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/unit/mod.rs b/core/libcore/src/unit/mod.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/unit/state.rs b/core/libcore/src/unit/state.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/unit/umif.rs b/core/libcore/src/unit/umif.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/utils/fd.rs b/core/libcore/src/utils/fd.rs old mode 100755 new mode 100644 diff --git a/core/libcore/src/utils/mod.rs b/core/libcore/src/utils/mod.rs old mode 100755 new mode 100644 diff --git a/core/sctl/Cargo.toml b/core/sctl/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/sctl/src/main.rs b/core/sctl/src/main.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/Cargo.toml b/core/sysmaster/Cargo.toml old mode 100755 new mode 100644 diff --git a/core/sysmaster/build.rs b/core/sysmaster/build.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/alloc.rs b/core/sysmaster/src/job/alloc.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/entry.rs b/core/sysmaster/src/job/entry.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/junit.rs b/core/sysmaster/src/job/junit.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/manager.rs b/core/sysmaster/src/job/manager.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/mod.rs b/core/sysmaster/src/job/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/notify.rs b/core/sysmaster/src/job/notify.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/rentry.rs b/core/sysmaster/src/job/rentry.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/stat.rs b/core/sysmaster/src/job/stat.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/table.rs b/core/sysmaster/src/job/table.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/job/transaction.rs b/core/sysmaster/src/job/transaction.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/main.rs b/core/sysmaster/src/main.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/alive_timer.rs b/core/sysmaster/src/manager/alive_timer.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/commands.rs b/core/sysmaster/src/manager/commands.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/config.rs b/core/sysmaster/src/manager/config.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/mod.rs b/core/sysmaster/src/manager/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/pre_install.rs b/core/sysmaster/src/manager/pre_install.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/rentry.rs b/core/sysmaster/src/manager/rentry.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/manager/signals.rs b/core/sysmaster/src/manager/signals.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/mount/mod.rs b/core/sysmaster/src/mount/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/mount/setup.rs b/core/sysmaster/src/mount/setup.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/plugin/mod.rs b/core/sysmaster/src/plugin/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/base/load.rs b/core/sysmaster/src/unit/base/load.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/base/mod.rs b/core/sysmaster/src/unit/base/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/base/relation.rs b/core/sysmaster/src/unit/base/relation.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/base/relation_atom.rs b/core/sysmaster/src/unit/base/relation_atom.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/data/dep_conf.rs b/core/sysmaster/src/unit/data/dep_conf.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/data/mod.rs b/core/sysmaster/src/unit/data/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/data/state.rs b/core/sysmaster/src/unit/data/state.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/data/table.rs b/core/sysmaster/src/unit/data/table.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/datastore/child.rs b/core/sysmaster/src/unit/datastore/child.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/datastore/deps.rs b/core/sysmaster/src/unit/datastore/deps.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/datastore/mod.rs b/core/sysmaster/src/unit/datastore/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/datastore/sets.rs b/core/sysmaster/src/unit/datastore/sets.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/base.rs b/core/sysmaster/src/unit/entry/base.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/cgroup.rs b/core/sysmaster/src/unit/entry/cgroup.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/child.rs b/core/sysmaster/src/unit/entry/child.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/condition.rs b/core/sysmaster/src/unit/entry/condition.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/config.rs b/core/sysmaster/src/unit/entry/config.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/load.rs b/core/sysmaster/src/unit/entry/load.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/mod.rs b/core/sysmaster/src/unit/entry/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/ratelimit.rs b/core/sysmaster/src/unit/entry/ratelimit.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/uentry.rs b/core/sysmaster/src/unit/entry/uentry.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/entry/unitx.rs b/core/sysmaster/src/unit/entry/unitx.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/execute/mod.rs b/core/sysmaster/src/unit/execute/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/execute/spawn.rs b/core/sysmaster/src/unit/execute/spawn.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/manager.rs b/core/sysmaster/src/unit/manager.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/mod.rs b/core/sysmaster/src/unit/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/notify.rs b/core/sysmaster/src/unit/notify.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/rentry.rs b/core/sysmaster/src/unit/rentry.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/runtime.rs b/core/sysmaster/src/unit/runtime.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/sigchld.rs b/core/sysmaster/src/unit/sigchld.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/test/mod.rs b/core/sysmaster/src/unit/test/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/uload.rs b/core/sysmaster/src/unit/uload.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/util/mod.rs b/core/sysmaster/src/unit/util/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/util/unit_file.rs b/core/sysmaster/src/unit/util/unit_file.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/unit/util/unit_om.rs b/core/sysmaster/src/unit/util/unit_om.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/utils/mod.rs b/core/sysmaster/src/utils/mod.rs old mode 100755 new mode 100644 diff --git a/core/sysmaster/src/utils/table.rs b/core/sysmaster/src/utils/table.rs old mode 100755 new mode 100644 diff --git a/docs/man/socket.md b/docs/man/socket.md index 465283991fae1eced2d27d720eb2410f4f3fc441..17d490e605e845af6506c85c42eb55f10ac9a521 100644 --- a/docs/man/socket.md +++ b/docs/man/socket.md @@ -22,7 +22,7 @@ 该配置仅在`Accept`配置为`false`时有效,决定在socket激活对应的service前,是否清空socket缓冲区。默认为false。 -**注意:** 如果配置为`flase`,而激活的service又不主动去读取socket缓冲区的内容,会导致service将持续被激活。 +**注意:** 如果配置为`false`,而激活的service又不主动去读取socket缓冲区的内容,会导致service将持续被激活。 ## ListenStream、ListenDatagram、ListenSequentialPacket diff --git a/exts/devmaster/tests/rules.d/02-test_import.rules b/exts/devmaster/tests/rules.d/02-test_import.rules index 50f6d911a243c46dc184f05337b2a4cddc32991e..f71f6366b72491f4141e870556d3efda9d02542e 100644 --- a/exts/devmaster/tests/rules.d/02-test_import.rules +++ b/exts/devmaster/tests/rules.d/02-test_import.rules @@ -23,17 +23,17 @@ KERNEL=="sda1", IMPORT{db}=="ID_FS_TYPE", PROGRAM=="/bin/echo test MatchImportDb # Expect: Capture stdout from command '/bin/echo test imported properties Xiaoming Male 188 ext4': 'test imported properties Xiaoming Male 188 ext4' KERNEL=="sda1", PROGRAM=="/bin/echo test imported properties $env{PEOPLE} $env{GENDER} $env{HEIGHT} $env{ID_FS_TYPE}" -# Description: test MatchImportCmdline, check /proc/cmdline contains paramenter 'root' and echo the value +# Description: test MatchImportCmdline, check /proc/cmdline contains parameter 'root' and echo the value # Trigger: devctl trigger /dev/sda1 # Expect: Capture stdout from command '/bin/echo test MatchImportCmdline 1 /dev/mapper/openeuler-root': 'test MatchImportCmdline 1 /dev/mapper/openeuler-root' KERNEL=="sda1", IMPORT{cmdline}=="root", PROGRAM=="/bin/echo test MatchImportCmdline 1 $env{root}" -# Description: test MatchImportCmdline, check /proc/cmdline contains paramenter 'rhgb' and echo '1' +# Description: test MatchImportCmdline, check /proc/cmdline contains parameter 'rhgb' and echo '1' # Trigger: devctl trigger /dev/sda1 # Expect: Capture stdout from command '/bin/echo test MatchImportCmdline 2 1': 'test MatchImportCmdline 2 1' KERNEL=="sda1", IMPORT{cmdline}=="rhgb", PROGRAM=="/bin/echo test MatchImportCmdline 2 $env{rhgb}" -# Description: test MatchImportCmdline, check /proc/cmdline does not contains paramenter 'none' +# Description: test MatchImportCmdline, check /proc/cmdline does not contains parameter 'none' # Trigger: devctl trigger /dev/sda1 # Expect: Capture stdout from command '/bin/echo test MatchImportCmdline 3': 'test MatchImportCmdline 3' KERNEL=="sda1", IMPORT{cmdline}!="none", PROGRAM=="/bin/echo test MatchImportCmdline 3" diff --git a/libs/device/src/device.rs b/libs/device/src/device.rs index e2f61d5287f0e7860201d13fca79df065fb3da02..fe1795c029308e812a0f4c0e11cfc0cf89356bc4 100644 --- a/libs/device/src/device.rs +++ b/libs/device/src/device.rs @@ -3491,7 +3491,7 @@ mod tests { * by reading the uevent file in kernel device tree. * According to different kernel versions, the content in uevent file may be * different, which may introduce new properties than the following ones. - * Thus when iterating the properties colleted by method 'property_iter', + * Thus when iterating the properties collected by method 'property_iter', * tolerate new properties. */ for (k, v) in &dev_clone.property_iter() { diff --git a/tools/run_with_devmaster/rules.d/13-dm-disk.rules b/tools/run_with_devmaster/rules.d/13-dm-disk.rules index 863b3b7eaae7d0c6d251407527bcb8f982d2ba25..98d4f433bb6914d95892c27dcb0aee65d2f46a89 100644 --- a/tools/run_with_devmaster/rules.d/13-dm-disk.rules +++ b/tools/run_with_devmaster/rules.d/13-dm-disk.rules @@ -27,7 +27,7 @@ ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_GPT_AUTO_ROOT}=="1", SYMLINK+="gpt # Add inotify watch to track changes on this device. # Using the watch rule is not optimal - it generates a lot of spurious # and useless events whenever the device opened for read-write is closed. -# The best would be to generete the event directly in the tool changing +# The best would be to generate the event directly in the tool changing # relevant information so only relevant events will be processed # (like creating a filesystem, changing filesystem label etc.). #