mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
more-merge unixd commands (#1568)
* fixing unix packaging * stripping out actions-rs/toolchain * fixing an error in the qrcode def in cargo.toml
This commit is contained in:
parent
ade1591554
commit
ec8e5dfc31
11
.github/workflows/clippy.yml
vendored
11
.github/workflows/clippy.yml
vendored
|
@ -38,15 +38,6 @@ jobs:
|
|||
libsqlite3-dev \
|
||||
pkg-config
|
||||
|
||||
# - name: Install Rust
|
||||
# uses: actions-rs/toolchain@v1
|
||||
# with:
|
||||
# toolchain: stable
|
||||
# override: true
|
||||
# default: true
|
||||
|
||||
- name: "Run clippy (ignores errors, this is just a check)"
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
run: cargo clippy
|
||||
continue-on-error: true
|
||||
|
|
6
.github/workflows/debian_package_kanidm.yml
vendored
6
.github/workflows/debian_package_kanidm.yml
vendored
|
@ -42,11 +42,7 @@ jobs:
|
|||
curl \
|
||||
sudo
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
default: true
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Doing the package build"
|
||||
run: |
|
||||
make -f platform/debian/Makefile debs/all
|
||||
|
|
65
.github/workflows/kanidm_book.yml
vendored
65
.github/workflows/kanidm_book.yml
vendored
|
@ -63,66 +63,7 @@ jobs:
|
|||
run: |
|
||||
find . -name '*.tar.gz' -exec tar zxf "{}" \;
|
||||
ls -la docs/
|
||||
cd docs && ln -s ${{ needs.generate_tags.outputs.latest}}/ stable && cd ..
|
||||
cd docs && \
|
||||
ln -s ${{ needs.generate_tags.outputs.latest}}/ stable && \
|
||||
cd ..
|
||||
ls -la docs/
|
||||
|
||||
|
||||
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
# clean: false
|
||||
|
||||
# - name: Install deps
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y clang build-essential \
|
||||
# librust-openssl-dev libssl-dev \
|
||||
# libsqlite3-dev libudev-dev \
|
||||
# libpam0g-dev
|
||||
|
||||
# - name: Setup deno
|
||||
# # Documentation: https://github.com/denoland/setup-deno
|
||||
# uses: denoland/setup-deno@v1
|
||||
# with:
|
||||
# deno-version: v1.x
|
||||
|
||||
# - name: Test document formatting
|
||||
# run: |
|
||||
# make doc/format
|
||||
|
||||
# - name: Setup mdBook
|
||||
# uses: peaceiris/actions-mdbook@v1
|
||||
# with:
|
||||
# mdbook-version: "latest"
|
||||
|
||||
# - uses: actions-rs/toolchain@v1
|
||||
# with:
|
||||
# toolchain: stable
|
||||
|
||||
# - uses: actions-rs/cargo@v1
|
||||
# with:
|
||||
# command: install
|
||||
# args: mdbook-template
|
||||
|
||||
# - name: Make all the books
|
||||
# run: ./scripts/build_all_the_docs.sh
|
||||
|
||||
# - name: Install python 3.10
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: "3.10"
|
||||
|
||||
# - name: pykanidm docs
|
||||
# run: |
|
||||
# python -m pip install poetry
|
||||
# make docs/pykanidm/build
|
||||
# mv pykanidm/site ./docs/pykanidm
|
||||
|
||||
# - name: Deploy
|
||||
# uses: peaceiris/actions-gh-pages@v3
|
||||
# if: ${{ github.ref == 'refs/heads/master' }}
|
||||
# with:
|
||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# publish_dir: ./docs
|
||||
# destination_dir: ./docs
|
||||
|
|
5
.github/workflows/kanidm_individual_book.yml
vendored
5
.github/workflows/kanidm_individual_book.yml
vendored
|
@ -43,9 +43,8 @@ jobs:
|
|||
with:
|
||||
mdbook-version: "latest"
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
|
|
13
.github/workflows/rust_build.yml
vendored
13
.github/workflows/rust_build.yml
vendored
|
@ -37,14 +37,5 @@ jobs:
|
|||
libssl-dev \
|
||||
libsqlite3-dev
|
||||
|
||||
# - name: Install Rust
|
||||
# uses: actions-rs/toolchain@v1
|
||||
# with:
|
||||
# toolchain: stable
|
||||
# override: true
|
||||
# default: true
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --verbose
|
||||
- name: Run build
|
||||
run: cargo build --verbose --workspace
|
||||
|
|
11
.github/workflows/rust_test.yml
vendored
11
.github/workflows/rust_test.yml
vendored
|
@ -36,14 +36,5 @@ jobs:
|
|||
libssl-dev \
|
||||
libsqlite3-dev
|
||||
|
||||
# - name: Install Rust
|
||||
# uses: actions-rs/toolchain@v1
|
||||
# with:
|
||||
# toolchain: stable
|
||||
# override: true
|
||||
# default: true
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --release
|
||||
run: cargo test --release
|
||||
|
|
14
.github/workflows/wasm_test.yml
vendored
14
.github/workflows/wasm_test.yml
vendored
|
@ -21,21 +21,11 @@ jobs:
|
|||
libssl-dev \
|
||||
libsqlite3-dev \
|
||||
pkg-config
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: cargo
|
||||
default: true
|
||||
override: true
|
||||
# target: wasm32-unknown-unknown
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install wasm-pack
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: wasm-pack
|
||||
run: cargo install wasm-pack
|
||||
|
||||
# https://github.com/browser-actions/setup-chrome
|
||||
- name: Install Chrome Headless
|
||||
|
|
28
.github/workflows/windows_build.yml
vendored
28
.github/workflows/windows_build.yml
vendored
|
@ -18,18 +18,11 @@ jobs:
|
|||
run: |
|
||||
vcpkg integrate install
|
||||
vcpkg install openssl:x64-windows-static-md
|
||||
- name: Install latest stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
default: true
|
||||
override: true
|
||||
components: cargo
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release -p kanidm_client -p kanidm_tools -p orca -p daemon
|
||||
# yamllint disable-line rule:line-length
|
||||
run: cargo build --release -p kanidm_client -p kanidm_tools -p orca -p daemon
|
||||
windows_test_kanidm:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
|
@ -38,15 +31,8 @@ jobs:
|
|||
run: |
|
||||
vcpkg integrate install
|
||||
vcpkg install openssl:x64-windows-static-md
|
||||
- name: Install latest stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
default: true
|
||||
components: cargo
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Run cargo test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
# yamllint disable-line rule:line-length
|
||||
args: -p kanidm_client -p kanidm_tools -p orca -p daemon -p kanidmd_core
|
||||
run: cargo test -p kanidm_client -p kanidm_tools -p orca -p daemon -p kanidmd_core
|
||||
|
|
6
Makefile
6
Makefile
|
@ -227,12 +227,10 @@ release/kanidm-unixd: ## Build the Kanidm UNIX tools - ensure you include the en
|
|||
release/kanidm-unixd:
|
||||
cargo build -p pam_kanidm --release
|
||||
cargo build -p nss_kanidm --release
|
||||
cargo build --release \
|
||||
cargo build --features unix -p kanidm_unix_int --release \
|
||||
--bin kanidm_unixd \
|
||||
--bin kanidm_unixd_status \
|
||||
--bin kanidm_unixd_tasks \
|
||||
--bin kanidm_cache_clear \
|
||||
--bin kanidm_cache_invalidate
|
||||
--bin kanidm_unixd_status
|
||||
|
||||
# cert things
|
||||
|
||||
|
|
|
@ -72,14 +72,6 @@ override_dh_auto_install:
|
|||
-g root -o root \
|
||||
target/release/kanidm_unixd_tasks \
|
||||
${BINDIR}
|
||||
install \
|
||||
-g root -o root \
|
||||
target/release/kanidm_cache_clear \
|
||||
${BINDIR}
|
||||
install \
|
||||
-g root -o root \
|
||||
target/release/kanidm_cache_invalidate \
|
||||
${BINDIR}
|
||||
install \
|
||||
-g root -o root \
|
||||
target/release/libpam_kanidm.so \
|
||||
|
|
|
@ -52,8 +52,6 @@ install -Dm755 target/release/libnss_kanidm.so "${pkgdir}/usr/lib/x86_64-linux-g
|
|||
install -Dm755 target/release/libpam_kanidm.so "${pkgdir}/usr/lib/x86_64-linux-gnu/security/pam_kanidm.so"
|
||||
|
||||
# install kanidm unix utilities
|
||||
install -Dm755 target/release/kanidm_cache_clear "${pkgdir}/usr/local/sbin/kanidm_cache_clear"
|
||||
install -Dm755 target/release/kanidm_cache_invalidate "${pkgdir}/usr/local/sbin/kanidm_cache_invalidate"
|
||||
install -Dm755 target/release/kanidm_ssh_authorizedkeys "${pkgdir}/usr/local/sbin/kanidm_ssh_authorizedkeys"
|
||||
install -Dm755 target/release/kanidm_ssh_authorizedkeys_direct "${pkgdir}/usr/local/sbin/kanidm_ssh_authorizedkeys_direct"
|
||||
install -Dm755 target/release/kanidm_unixd "${pkgdir}/usr/local/sbin/kanidm_unixd"
|
||||
|
@ -65,13 +63,11 @@ install -Dm644 target/release/build/completions/_kanidm_ssh_authorizedkeys_direc
|
|||
install -Dm644 target/release/build/completions/_kanidm_cache_clear "${pkgdir}/usr/share/zsh/site-functions/_kanidm_cache_clear"
|
||||
install -Dm644 target/release/build/completions/_kanidm_cache_invalidate "${pkgdir}/usr/share/zsh/site-functions/_kanidm_cache_invalidate"
|
||||
install -Dm644 target/release/build/completions/_kanidm_ssh_authorizedkeys "${pkgdir}/usr/share/zsh/site-functions/_kanidm_ssh_authorizedkeys"
|
||||
install -Dm644 target/release/build/completions/_kanidm_unixd_status "${pkgdir}/usr/share/zsh/site-functions/_kanidm_unixd_status"
|
||||
|
||||
install -Dm644 target/release/build/completions/kanidm_ssh_authorizedkeys_direct.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_ssh_authorizedkeys_direct.sh"
|
||||
install -Dm644 target/release/build/completions/kanidm_cache_clear.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_cache_clear.sh"
|
||||
install -Dm644 target/release/build/completions/kanidm_cache_invalidate.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_cache_invalidate.sh"
|
||||
install -Dm644 target/release/build/completions/kanidm_ssh_authorizedkeys.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_ssh_authorizedkeys.sh"
|
||||
install -Dm644 target/release/build/completions/kanidm_unixd_status.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_unixd_status.sh"
|
||||
|
||||
tar cvzf "kanidm-client-tools.tar.gz" -C "$pkgdir" .
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ futures-concurrency.workspace = true
|
|||
libc.workspace = true
|
||||
kanidm_client.workspace = true
|
||||
kanidm_proto.workspace = true
|
||||
qrcode = { workspace = true, default-features = false }
|
||||
qrcode = { workspace = true }
|
||||
rpassword.workspace = true
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json.workspace = true
|
||||
|
|
|
@ -217,7 +217,7 @@ async fn handle_tasks(stream: UnixStream, cfg: &KanidmUnixdConfig) {
|
|||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() -> ExitCode {
|
||||
// let cuid = get_current_uid();
|
||||
// let cgid = get_current_gid();
|
||||
|
|
Loading…
Reference in a new issue