Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shell scripts and VHS tapes run under sh/bash, which choke on CRLF
# (`set -eu\r`), so keep them LF even in a Windows checkout with autocrlf.
*.sh text eol=lf
*.tape text eol=lf
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Bug report
description: Something in packctl does not work as expected.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug.

**Remove API keys before posting.** Check every log and config you paste
for `x-api-key`, `api_key` or other secrets, and replace them with `REDACTED`.
For security problems, use [private vulnerability reporting](https://github.com/sennecools/packctl/security/advisories/new) instead.

- type: input
id: version
attributes:
label: packctl version
description: Output of `packctl --version`.
placeholder: "packctl 0.2.0 (x86_64-unknown-linux-musl)"
validations:
required: true

- type: input
id: platform
attributes:
label: Distribution and architecture
description: For example `Debian 12, x86_64` or `Ubuntu 24.04, aarch64`.
validations:
required: true

- type: dropdown
id: provider
attributes:
label: Provider
options:
- CurseForge
- Modrinth
- Local
validations:
required: true

- type: dropdown
id: controller
attributes:
label: Controller
options:
- AMP
- command
validations:
required: true

- type: textarea
id: what-happened
attributes:
label: What happened?
description: What you ran, what you expected, and what happened instead.
placeholder: |
1. Ran `packctl plan --to 1.2`
2. Expected ...
3. Got ...
validations:
required: true

- type: textarea
id: doctor
attributes:
label: "`packctl doctor` output"
description: Run `packctl doctor` for the affected server and paste the output. Remove API keys.
render: text
validations:
required: true

- type: textarea
id: logs
attributes:
label: Other output or profile
description: Full command output (`-v` where available) and your `.packctl.toml`, with secrets removed.
render: text
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/sennecools/packctl/security/advisories/new
about: Please report security issues privately, not as a public issue.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Feature request
description: Suggest an idea or improvement for packctl.
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What are you trying to do, and what makes it hard today?
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed solution
description: How would you like packctl to handle it? Example commands or config are welcome.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Workarounds or other tools you tried.
validations:
required: false

- type: dropdown
id: provider
attributes:
label: Provider (if relevant)
options:
- Not provider-specific
- CurseForge
- Modrinth
- Local
validations:
required: false
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## What and why

<!-- What does this change, and what problem does it solve? Link the issue: "Fixes #123". -->

## Checklist

- [ ] `cargo fmt --all --check` passes
- [ ] `cargo clippy --locked --all-targets --all-features -- -D warnings` passes
- [ ] `cargo test --locked --workspace --all-features` passes
- [ ] New behavior has tests, and the tests do not use the network
- [ ] Untrusted paths go through `normalize_relative` / `safe_join`; nothing touches the live server before the snapshot
- [ ] `CHANGELOG.md` has an entry under `## [Unreleased]` (user-visible changes only)
- [ ] Docs and `--help` text are updated where behavior changed
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
labels:
- dependencies
groups:
cargo-minor-patch:
update-types:
- minor
- patch

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- dependencies
groups:
github-actions:
patterns:
- "*"
23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Categories for GitHub's generated release notes. The curated notes come from
# CHANGELOG.md; this keeps the "Generate release notes" button tidy too.
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Breaking changes
labels:
- breaking
- title: Features
labels:
- feature
- enhancement
- title: Bug fixes
labels:
- bug
- title: Dependencies
labels:
- dependencies
- title: Other changes
labels:
- "*"
96 changes: 96 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: build

# Reusable release build: static musl binaries for Linux, packaged the way
# install.sh and cargo-binstall expect (the binary at the archive root as
# packctl-<target>, next to LICENSE and README.md).
on:
workflow_call:
inputs:
ref:
description: Git ref to build (default: the triggering ref)
type: string
default: ""
build_sha:
description: Commit stamped into `packctl --version` (empty for tagged releases)
type: string
default: ""

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: build (${{ matrix.target }})
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
env:
# Job-level so the smoke test reuses the binary instead of rebuilding.
PACKCTL_BUILD_SHA: ${{ inputs.build_sha }}
PACKCTL_BUILD_TARGET: ${{ matrix.target }}
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.ref }}
persist-credentials: false

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

# Linker and, for aarch64, a qemu runner for the smoke test.
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}

- name: Build
run: cargo build --locked --release --target "$TARGET"

- name: Smoke test
run: cargo run --locked --release --target "$TARGET" -- --version

- name: Check the binary is static
run: |
file "target/$TARGET/release/packctl"
file "target/$TARGET/release/packctl" | grep -Eq 'static(ally|-pie) linked'

- name: Archive
run: |
mkdir -p stage dist
cp "target/$TARGET/release/packctl" "stage/packctl-$TARGET"
cp LICENSE README.md stage/
# Explicit member names (no ./ prefix) so install.sh can extract
# exactly packctl-<target>.
tar -C stage -czf "dist/packctl-$TARGET.tar.gz" "packctl-$TARGET" LICENSE README.md
tar -tzf "dist/packctl-$TARGET.tar.gz"

- name: Check install.sh can extract the archive
run: |
out="$(mktemp -d)"
# The same member extraction install.sh performs.
tar -xzf "dist/packctl-$TARGET.tar.gz" -C "$out" "packctl-$TARGET"
test -x "$out/packctl-$TARGET"

- name: Install with install.sh
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
release="$(mktemp -d)"
cp "dist/packctl-$TARGET.tar.gz" "$release/"
(cd "$release" && sha256sum "packctl-$TARGET.tar.gz" > SHA256SUMS)
PACKCTL_DOWNLOAD_BASE="file://$release" sh install.sh ci-build "$RUNNER_TEMP/bin"
"$RUNNER_TEMP/bin/packctl" --version

- uses: actions/upload-artifact@v5
with:
name: packctl-${{ matrix.target }}
path: dist/packctl-${{ matrix.target }}.tar.gz
if-no-files-found: error
Loading
Loading