Add Dependabot, Update Dependencies and Workflows (#1440)

Build may fail because of some major dependency updates. Needs changes,
changes/fixes welcomed.

Main goal is keeping all things up-to-date.

---------

Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
Caner Karaca
2024-03-20 07:52:34 +03:00
committed by GitHub
parent 2b0d19928a
commit 8f33926aa0
22 changed files with 981 additions and 1273 deletions

21
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
- package-ecosystem: cargo
directory: userspace/ksud
schedule:
interval: daily
- package-ecosystem: gradle
directory: manager
schedule:
interval: daily
- package-ecosystem: npm
directory: website
schedule:
interval: daily

View File

@@ -26,7 +26,7 @@ jobs:
- name: Make pull request - name: Make pull request
if: steps.handle-add-device.outputs.success == 'true' if: steps.handle-add-device.outputs.success == 'true'
id: cpr id: cpr
uses: peter-evans/create-pull-request@v4 uses: peter-evans/create-pull-request@v6
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "[add device]: ${{ steps.handle-add-device.outputs.device }}" commit-message: "[add device]: ${{ steps.handle-add-device.outputs.device }}"
@@ -53,7 +53,7 @@ jobs:
message: "Cannot create pull request. Please check the issue content. Or you can create a pull request manually." message: "Cannot create pull request. Please check the issue content. Or you can create a pull request manually."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: close issue - name: close issue
uses: peter-evans/close-issue@v1 uses: peter-evans/close-issue@v3
with: with:
issue-number: ${{ github.event.issue.number }} issue-number: ${{ github.event.issue.number }}
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -137,7 +137,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag' if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag'
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session key: ${{ runner.os }}-bot-session

View File

@@ -83,7 +83,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
if: false if: false
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session

View File

@@ -118,7 +118,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
if: false if: false
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session

View File

@@ -97,7 +97,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
if: false if: false
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session

View File

@@ -119,7 +119,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }} if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session key: ${{ runner.os }}-bot-session

View File

@@ -71,7 +71,7 @@ jobs:
java-version: "17" java-version: "17"
- name: Setup Gradle - name: Setup Gradle
uses: gradle/gradle-build-action@v2 uses: gradle/gradle-build-action@v3
with: with:
gradle-home-cache-cleanup: true gradle-home-cache-cleanup: true

View File

@@ -40,7 +40,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true' if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session key: ${{ runner.os }}-bot-session

View File

@@ -22,14 +22,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# cross build failed after Rust 1.68, see https://github.com/cross-rs/cross/issues/1222 - run: rustup update --force-non-host stable-x86_64-unknown-linux-gnu
- run: rustup default 1.67.0
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
workspaces: userspace/ksud workspaces: userspace/ksud
- name: Install cross - name: Install cross
run: cargo install cross --locked run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1
- name: Run clippy - name: Run clippy
run: | run: |

View File

@@ -28,10 +28,9 @@ jobs:
run: | run: |
cp android*-lkm/*_kernelsu.ko ./userspace/ksud/bin/aarch64/ cp android*-lkm/*_kernelsu.ko ./userspace/ksud/bin/aarch64/
# cross build failed after Rust 1.68, see https://github.com/cross-rs/cross/issues/1222
- name: Setup rustup - name: Setup rustup
run: | run: |
rustup default 1.67.0 rustup update stable
rustup target add x86_64-apple-darwin rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin rustup target add aarch64-apple-darwin
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
@@ -40,10 +39,11 @@ jobs:
cache-targets: false cache-targets: false
- name: Install cross - name: Install cross
run: cargo install cross --locked run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1
- name: Build ksud - name: Build ksud
run: cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml run: CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
- name: Upload ksud artifact - name: Upload ksud artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4

View File

@@ -67,7 +67,7 @@ jobs:
run: ls -R run: ls -R
- name: release - name: release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: | files: |
manager/*.apk manager/*.apk

View File

@@ -30,7 +30,7 @@ jobs:
- name: Cache LLVM - name: Cache LLVM
id: cache-llvm id: cache-llvm
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ./llvm path: ./llvm
key: llvm-12.0.1 key: llvm-12.0.1
@@ -106,7 +106,7 @@ jobs:
- name: Bot session cache - name: Bot session cache
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag' if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag'
id: bot_session_cache id: bot_session_cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: scripts/ksubot.session path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session key: ${{ runner.os }}-bot-session

View File

@@ -40,7 +40,7 @@ android {
} }
composeOptions { composeOptions {
kotlinCompilerExtensionVersion = "1.4.3" kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
} }
packaging { packaging {

View File

@@ -36,7 +36,7 @@ val androidMinSdkVersion = 26
val androidTargetSdkVersion = 33 val androidTargetSdkVersion = 33
val androidCompileSdkVersion = 34 val androidCompileSdkVersion = 34
val androidBuildToolsVersion = "34.0.0" val androidBuildToolsVersion = "34.0.0"
val androidCompileNdkVersion = "25.2.9519653" val androidCompileNdkVersion = "26.2.11394342"
val androidSourceCompatibility = JavaVersion.VERSION_17 val androidSourceCompatibility = JavaVersion.VERSION_17
val androidTargetCompatibility = JavaVersion.VERSION_17 val androidTargetCompatibility = JavaVersion.VERSION_17
val managerVersionCode by extra(getVersionCode()) val managerVersionCode by extra(getVersionCode())

View File

@@ -1,27 +1,39 @@
[versions] [versions]
agp = "8.3.0" agp = "8.3.1"
kotlin = "1.8.10" kotlin = "1.9.22"
ksp = "1.8.10-1.0.9" ksp = "1.9.22-1.0.18"
compose-bom = "2023.06.01" compose-compiler = "1.5.10"
lifecycle = "2.6.1" compose-bom = "2024.02.02"
accompanist = "0.30.1" lifecycle = "2.7.0"
navigation = "2.6.0" accompanist = "0.34.0"
compose-destination = "1.9.42-beta" navigation = "2.7.7"
libsu = "5.2.1" activity-compose = "1.8.2"
sheets-compose-dialogs = "1.2.0" kotlinx-coroutines = "1.8.0"
coil-compose = "2.6.0"
compose-destination = "1.10.2"
sheets-compose-dialogs = "1.3.0"
markdown = "4.6.2" markdown = "4.6.2"
webkit = "1.10.0" webkit = "1.10.0"
appiconloader-coil = "1.5.0"
parcelablelist = "2.0.1"
libsu = "5.2.2"
apksign = "1.4"
cmaker = "1.2"
[plugins] [plugins]
agp-app = { id = "com.android.application", version.ref = "agp" } agp-app = { id = "com.android.application", version.ref = "agp" }
agp-lib = { id = "com.android.library", version.ref = "agp" } agp-lib = { id = "com.android.library", version.ref = "agp" }
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
lsplugin-apksign = { id = "org.lsposed.lsplugin.apksign", version = "1.1" }
lsplugin-cmaker = { id = "org.lsposed.lsplugin.cmaker", version = "1.1" } lsplugin-apksign = { id = "org.lsposed.lsplugin.apksign", version.ref = "apksign" }
lsplugin-cmaker = { id = "org.lsposed.lsplugin.cmaker", version.ref = "cmaker" }
[libraries] [libraries]
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version = "1.7.1" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activity-compose" }
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation" } androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" } androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
@@ -38,6 +50,7 @@ androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lif
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" }
androidx-webkit = { module = "androidx.webkit:webkit", version.ref = "webkit" } androidx-webkit = { module = "androidx.webkit:webkit", version.ref = "webkit" }
com-google-accompanist-drawablepainter = { group = "com.google.accompanist", name = "accompanist-drawablepainter", version.ref = "accompanist" } com-google-accompanist-drawablepainter = { group = "com.google.accompanist", name = "accompanist-drawablepainter", version.ref = "accompanist" }
com-google-accompanist-navigation-animation = { group = "com.google.accompanist", name = "accompanist-navigation-animation", version.ref = "accompanist" } com-google-accompanist-navigation-animation = { group = "com.google.accompanist", name = "accompanist-navigation-animation", version.ref = "accompanist" }
com-google-accompanist-systemuicontroller = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanist" } com-google-accompanist-systemuicontroller = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanist" }
@@ -47,19 +60,19 @@ com-github-topjohnwu-libsu-core = { group = "com.github.topjohnwu.libsu", name =
com-github-topjohnwu-libsu-service = { group = "com.github.topjohnwu.libsu", name = "service", version.ref = "libsu" } com-github-topjohnwu-libsu-service = { group = "com.github.topjohnwu.libsu", name = "service", version.ref = "libsu" }
com-github-topjohnwu-libsu-io= { group = "com.github.topjohnwu.libsu", name = "io", version.ref = "libsu" } com-github-topjohnwu-libsu-io= { group = "com.github.topjohnwu.libsu", name = "io", version.ref = "libsu" }
dev-rikka-rikkax-parcelablelist = { module = "dev.rikka.rikkax.parcelablelist:parcelablelist", version = "2.0.1" } dev-rikka-rikkax-parcelablelist = { module = "dev.rikka.rikkax.parcelablelist:parcelablelist", version.ref = "parcelablelist" }
io-coil-kt-coil-compose = { group = "io.coil-kt", name = "coil-compose", version = "2.3.0" } io-coil-kt-coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil-compose" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.7.1" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
me-zhanghai-android-appiconloader-coil = { group = "me.zhanghai.android.appiconloader", name = "appiconloader-coil", version = "1.5.0" } me-zhanghai-android-appiconloader-coil = { group = "me.zhanghai.android.appiconloader", name = "appiconloader-coil", version.ref = "appiconloader-coil" }
compose-destinations-animations-core = { group = "io.github.raamcosta.compose-destinations", name = "animations-core", version.ref = "compose-destination" } compose-destinations-animations-core = { group = "io.github.raamcosta.compose-destinations", name = "animations-core", version.ref = "compose-destination" }
compose-destinations-ksp = { group = "io.github.raamcosta.compose-destinations", name = "ksp", version.ref = "compose-destination" } compose-destinations-ksp = { group = "io.github.raamcosta.compose-destinations", name = "ksp", version.ref = "compose-destination" }
sheet-compose-dialogs-core = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "core", version.ref = "sheets-compose-dialogs"} sheet-compose-dialogs-core = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "core", version.ref = "sheets-compose-dialogs" }
sheet-compose-dialogs-list = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "list", version.ref = "sheets-compose-dialogs"} sheet-compose-dialogs-list = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "list", version.ref = "sheets-compose-dialogs" }
sheet-compose-dialogs-input = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "input", version.ref = "sheets-compose-dialogs"} sheet-compose-dialogs-input = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "input", version.ref = "sheets-compose-dialogs" }
markdown = { group = "io.noties.markwon", name = "core", version.ref = "markdown" } markdown = { group = "io.noties.markwon", name = "core", version.ref = "markdown" }

1003
userspace/ksud/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
name = "ksud" name = "ksud"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
rust-version = "1.65" rust-version = "1.76"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -12,9 +12,9 @@ clap = { version = "4", features = ["derive"] }
const_format = "0.2" const_format = "0.2"
zip = "0.6" zip = "0.6"
zip-extensions = "0.6" zip-extensions = "0.6"
java-properties = "2.0.0" java-properties = "2"
log = "0.4" log = "0.4"
env_logger = "0.10" env_logger = { version = "0.11", default-features = false }
serde = { version = "1" } serde = { version = "1" }
serde_json = "1" serde_json = "1"
regex = "1" regex = "1"
@@ -26,12 +26,12 @@ extattr = "1"
jwalk = "0.8" jwalk = "0.8"
is_executable = "1" is_executable = "1"
nom = "7" nom = "7"
derive-new = "0.5" derive-new = "0.6"
rust-embed = { version = "6", features = [ rust-embed = { version = "8", features = [
"debug-embed", "debug-embed",
"compression", # must clean build after updating binaries "compression", # must clean build after updating binaries
] } ] }
which = "5" which = "6"
getopts = "0.2" getopts = "0.2"
sha256 = "1" sha256 = "1"
tempdir = "0.3" tempdir = "0.3"
@@ -41,7 +41,7 @@ hole-punch = { git = "https://github.com/tiann/hole-punch" }
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies] [target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
rustix = { git = "https://github.com/Kernel-SU/rustix.git", branch = "main", features = ["all-apis"] } rustix = { git = "https://github.com/Kernel-SU/rustix.git", branch = "main", features = ["all-apis"] }
# some android specific dependencies which compiles under unix are also listed here for convenience of coding # some android specific dependencies which compiles under unix are also listed here for convenience of coding
android-properties = { version = "0.2.2", features = ["bionic-deprecated"] } android-properties = { version = "0.2", features = ["bionic-deprecated"] }
procfs = "0.16" procfs = "0.16"
loopdev = { git = "https://github.com/Kernel-SU/loopdev" } loopdev = { git = "https://github.com/Kernel-SU/loopdev" }

View File

@@ -72,7 +72,7 @@ fn parse_kmi_from_modules() -> Result<String> {
let output = Command::new("modinfo") let output = Command::new("modinfo")
.arg("/vendor/lib/modules/fips140.ko") .arg("/vendor/lib/modules/fips140.ko")
.output()?; .output()?;
for line in output.stdout.lines().flatten() { for line in output.stdout.lines().map_while(Result::ok) {
if line.starts_with("vermagic") { if line.starts_with("vermagic") {
return parse_kmi(&line); return parse_kmi(&line);
} }

View File

@@ -217,7 +217,7 @@ pub fn root_shell() -> Result<()> {
let name = &matches.free[free_idx]; let name = &matches.free[free_idx];
uid = unsafe { uid = unsafe {
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
let pw = libc::getpwnam(name.as_ptr() as *const u8).as_ref(); let pw = libc::getpwnam(name.as_ptr()).as_ref();
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref(); let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref();

View File

@@ -7,8 +7,8 @@
"author": "weishu", "author": "weishu",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"vitepress": "^1.0.0-rc.33", "vitepress": "^1.0.0-rc.45",
"vue": "^3.3.8" "vue": "^3.4.21"
}, },
"scripts": { "scripts": {
"docs:dev": "vitepress dev docs", "docs:dev": "vitepress dev docs",

File diff suppressed because it is too large Load Diff