Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Konfigkoll #44

Merged
merged 46 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a93dcbf
perf: Use smallvec for temporary allocation in MTreeLine
VorpalBlade Jul 16, 2024
25f0ee1
refactor: API fixes for konfigkoll
VorpalBlade Jul 11, 2024
0d73fc2
refactor: Move backend traits to paketkoll_types
VorpalBlade Jul 9, 2024
eae63f3
refactor: Split out print_packages
VorpalBlade Jul 22, 2024
3319e5c
docs: Reorganize README files
VorpalBlade Jul 11, 2024
1335142
feat: Datatypes for konfigkoll
VorpalBlade Jul 8, 2024
8832099
feat: Create konfigkoll_hwinfo
VorpalBlade Jul 11, 2024
5791d7b
feat: Create konfigkoll
VorpalBlade Jul 22, 2024
2490428
chore: Add function to get "canonical" package ID
VorpalBlade Jul 22, 2024
bd5200e
feat: Simple line editor (rust + rune API)
VorpalBlade Jul 21, 2024
8e8495a
feat: Disk cache for original file queries
VorpalBlade Jul 21, 2024
5e3e136
feat: Rework, only single files backend allowed
VorpalBlade Jul 21, 2024
47dd22e
feat: User & group API
VorpalBlade Jul 21, 2024
5dd9d2a
feat: Broaden host_fs to filesystem
VorpalBlade Jul 22, 2024
03c24f2
perf: Some small performance fixes
VorpalBlade Jul 21, 2024
35769c3
feat: Vendor rune process module
VorpalBlade Jul 23, 2024
cf0acab
churn: Format process module
VorpalBlade Jul 20, 2024
d3c58fe
feat: Extend API in rune process module significantly
VorpalBlade Jul 20, 2024
3800943
docs: Document process module better
VorpalBlade Jul 21, 2024
0697f84
chore: Copyright comment in process.rs
VorpalBlade Jul 24, 2024
241dda0
docs: Document some Rune modules better
VorpalBlade Jul 21, 2024
2088ca8
fix: Handle some cases of restoring more correctly
VorpalBlade Jul 22, 2024
744a723
churn: Clippy fixes
VorpalBlade Jul 22, 2024
5a8ccb6
refactor: Split up konfigkoll main module
VorpalBlade Jul 22, 2024
44b499a
feat: Backend support for marking as dep/man install and asking to un…
VorpalBlade Jul 22, 2024
e560653
feat: Handle removing unused dependencies
VorpalBlade Jul 22, 2024
10d6959
feat: Improve logging
VorpalBlade Jul 22, 2024
db1f1cf
chore(deps): Upgrade dependencies
VorpalBlade Jul 23, 2024
7bef7e9
chore: Fix build warnings
VorpalBlade Jul 23, 2024
ba275ce
refactor: Clean up Rune API
VorpalBlade Jul 23, 2024
b399173
ci: Set up release CI for konfigkoll
VorpalBlade Jul 23, 2024
c7321a8
chore: Get rid of outdated TODO comments
VorpalBlade Jul 23, 2024
c929fee
feat: Add Makefile to help install things, vendor deps by default
VorpalBlade Jul 23, 2024
d6b4a70
chore: Minor documentation fixes
VorpalBlade Jul 24, 2024
8b69d28
feat: Improve defaults
VorpalBlade Jul 24, 2024
29a7cb7
docs: Add cargo-about
VorpalBlade Jul 24, 2024
b274853
docs: Mdbook documentation
VorpalBlade Jul 24, 2024
070c1ad
docs: Konfigkoll README
VorpalBlade Jul 24, 2024
a7eb059
docs: Setup site
VorpalBlade Jul 24, 2024
104075f
refactor: Combine binary crates
VorpalBlade Jul 24, 2024
c2f7582
feat: Passwd sanity checking
VorpalBlade Jul 25, 2024
fde0804
fix: Fix spurious restore instructions
VorpalBlade Jul 25, 2024
78dbe12
fix: When removing we need to start at the innermost path instead of …
VorpalBlade Jul 25, 2024
c15096e
feat: Better error reporting on removing non-empty directories
VorpalBlade Jul 25, 2024
c60fe11
feat: Stop and print LineEditor action
VorpalBlade Jul 25, 2024
7aecfb4
chore: Makefile tweaks
VorpalBlade Jul 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
xtask = "run --package xtask --"
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,20 @@ jobs:
run: cargo binstall --no-confirm --no-symlinks cargo-deny

- run: cargo deny check

cargo-about:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Setup Rust
run: rustup update stable && rustup default stable && rustup component add clippy

- name: Get cargo-binstall
run: |
curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -zxf - && mv cargo-binstall $HOME/.cargo/bin/

- name: Install required cargo addons
run: cargo binstall --no-confirm --no-symlinks cargo-about

- run: mkdir target && cargo about generate about.hbs > target/license.html
32 changes: 32 additions & 0 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mdbook

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install stable
rustup default stable
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir bin
curl -sSL $url | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Run tests
run: cd doc && mdbook test
81 changes: 79 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,27 @@ defaults:
shell: bash

jobs:
upload-assets:

cargo-about:
if: github.repository_owner == 'VorpalBlade' && (startsWith(github.event.release.name, 'paketkoll-v') || startsWith(github.event.release.name, 'konfigkoll-v'))
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Rust
run: rustup update stable && rustup default stable && rustup component add clippy
- name: Get cargo-binstall
run: |
curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -zxf - && mv cargo-binstall $HOME/.cargo/bin/
- name: Install required cargo addons
run: cargo binstall --no-confirm --no-symlinks cargo-about
- run: mkdir target && cargo about generate about.hbs > target/licenses.html
- name: Upload licenses.html
run: GITHUB_TOKEN="${token}" retry gh release upload "${tag}" target/licenses.html --clobber
env:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}

upload-paketkoll:
name: ${{ matrix.target }}
if: github.repository_owner == 'VorpalBlade' && startsWith(github.event.release.name, 'paketkoll-v')
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -63,7 +83,40 @@ jobs:
with:
subject-path: "${{ steps.upload-rust-binary-action.outputs.archive }}.*"

upload-aur:
upload-konfigkoll:
name: ${{ matrix.target }}
if: github.repository_owner == 'VorpalBlade' && startsWith(github.event.release.name, 'konfigkoll-v')
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- target: aarch64-unknown-linux-musl
- target: armv7-unknown-linux-musleabihf
- target: i686-unknown-linux-musl
- target: riscv64gc-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cross
- uses: taiki-e/[email protected]
id: upload-rust-binary-action
with:
bin: konfigkoll, konfigkoll_rune
target: ${{ matrix.target }}
# Include version number.
archive: $bin-$tag-$target
token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: "${{ steps.upload-rust-binary-action.outputs.archive }}.*"

upload-aur-paketkoll:
if: github.repository_owner == 'VorpalBlade' && startsWith(github.event.release.name, 'paketkoll-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -85,3 +138,27 @@ jobs:
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: New upstream release (automatic update from GitHub Actions)

#upload-aur-konfigkoll:
# if: github.repository_owner == 'VorpalBlade' && startsWith(github.event.release.name, 'konfigkoll-v')
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Get AUR repo
# run: git clone https://aur.archlinux.org/konfigkoll.git aur
# - name: Update PKGBUILD
# run: |
# sed -i '/^_pkgver/s/=.*$/='${RELEASE_TAG#refs/tags/konfigkoll-v}'/' "aur/PKGBUILD"
# sed -i '/^pkgrel/s/=.*$/=1/' "aur/PKGBUILD"
# env:
# RELEASE_TAG: ${{ github.ref }}
# - name: Publish AUR package
# uses: KSXGitHub/[email protected]
# with:
# pkgname: konfigkoll
# pkgbuild: aur/PKGBUILD
# updpkgsums: true
# commit_username: ${{ secrets.AUR_USERNAME }}
# commit_email: ${{ secrets.AUR_EMAIL }}
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
# commit_message: New upstream release (automatic update from GitHub Actions)
56 changes: 56 additions & 0 deletions .github/workflows/site-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Website

on:
push:
tags:
- v[0-9]+.*
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- run: mkdir -p target/site/
- name: Build Book
run: |
(cd doc && mdbook build -d ../target/site/book)
- name: Add static landing page
run: cp -r site/* target/site/

- name: Install Rust
run: rustup update stable && rustup default stable
- name: Cache builds
uses: Swatinem/[email protected]
with:
key: website
- name: Build Rune API docs
run: cargo run --bin konfigkoll-rune -- doc --output target/site/api

- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload book directory
path: 'target/site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.gdb_history
.idea
*.code-workspace
/.vscode
/patches
/target
/test_config
flamegraph.svg
heaptrack.*
memory-profiling_*
perf.data
perf.data.old
perf.data.old
Loading