summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
blob: 1e2e7e2f64510c8c469bc730958e838115f3f3e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[package]
name = "aur-build"
version = "0.1.0"
edition = "2021"
description = "AUR build server: watch AUR packages, require human approval for every change, build in a clean chroot, publish a signed repo"
license = "MIT"

[lib]
name = "aur_build"
path = "src/lib.rs"

[[bin]]
name = "aur-build"
path = "src/main.rs"

# The sandbox agent: the binary that runs inside
# the disposable sandbox and dials back to the hub. Production code — this is
# what a Kata container's entrypoint is — not test-support.
[[bin]]
name = "sandbox-agent"
path = "src/bin/sandbox-agent.rs"

# ---------------------------------------------------------------------------
# Toolchain shims. These are real binaries with the exact names
# the pipeline shells out to; the test harness prepends their directory to PATH
# so the whole step machine runs without root, network or an Arch chroot.
#
# They are test-only and declare the `test-support` feature, so a
# production `cargo build --release` neither builds them nor links the shim code
# into the library.
# ---------------------------------------------------------------------------
[[bin]]
name = "mkarchroot"
path = "src/bin/mkarchroot.rs"
required-features = ["test-support"]
[[bin]]
name = "makechrootpkg"
path = "src/bin/makechrootpkg.rs"
required-features = ["test-support"]
[[bin]]
name = "makepkg"
path = "src/bin/makepkg.rs"
required-features = ["test-support"]
[[bin]]
name = "repo-add"
path = "src/bin/repo-add.rs"
required-features = ["test-support"]
[[bin]]
name = "gpg"
path = "src/bin/gpg.rs"
required-features = ["test-support"]
[[bin]]
name = "pacman"
path = "src/bin/pacman.rs"
required-features = ["test-support"]

[dependencies]
anyhow = "1"
thiserror = "2"
rusqlite = { version = "0.37", features = ["bundled", "chrono"] }
crossbeam-channel = "0.5"
tiny_http = "0.12"
askama = "0.14"
ureq = { version = "2", features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
hex = "0.4"
clap = { version = "4", features = ["derive", "env"] }
chrono = { version = "0.4", features = ["serde"] }
walkdir = "2"
tar = "0.4"
zstd = "0.13"
libc = "0"
flate2 = "1"

[features]
# Test-only escape hatches. A fixture sometimes needs a database state no typed
# API reaches, and the honest way to allow that is to say where: this
# feature is enabled only by the crate's own dev-dependency below, so a
# production build cannot see the raw-SQL door at all.
test-support = []

[dev-dependencies]
# Self-dependency, the standard way to turn on a feature for the test targets
# only. The integration tests and `tests/common` are separate crates, so this is
# how they get the `test-support` escape hatch without the library exposing it.
aur-build = { path = ".", features = ["test-support"] }
tempfile = "3"
flate2 = "1"
tar = "0.4"

# Curated idiom lints, each one mechanical and each one clean across the tree.
# `must_use_candidate` and `missing_errors_doc` are left out on purpose: they
# would add doc-comment boilerplate, not remove it.
[lints.clippy]
assert_is_empty = "warn"
enum_glob_use = "warn"
explicit_iter_loop = "warn"
format_push_string = "warn"
if_not_else = "warn"
ignored_unit_patterns = "warn"
manual_assert_eq = "warn"
manual_let_else = "warn"
map_unwrap_or = "warn"
needless_pass_by_value = "warn"
needless_raw_string_hashes = "warn"
redundant_closure_for_method_calls = "warn"
semicolon_if_nothing_returned = "warn"
single_match_else = "warn"
stable_sort_primitive = "warn"
trivially_copy_pass_by_ref = "warn"
uninlined_format_args = "warn"
unnecessary_debug_formatting = "warn"
unnecessary_literal_bound = "warn"
unnested_or_patterns = "warn"
unused_self = "warn"
wildcard_imports = "warn"