Skip to content

Commit 235274e

Browse files
Merge pull request #123 from flouthoc/vendor_deps
deps: add support for `vendor` and use local `vendor` for `deps`
2 parents 08bb16a + 836cc7d commit 235274e

File tree

4,433 files changed

+1242657
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,433 files changed

+1242657
-1
lines changed

.cargo/config.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Use vendor for everything
2+
[source.crates-io]
3+
replace-with = "vendored-sources"
4+
5+
[source."https://github.com/little-dude/netlink"]
6+
git = "https://github.com/little-dude/netlink"
7+
branch = "master"
8+
replace-with = "vendored-sources"
9+
10+
[source.vendored-sources]
11+
directory = "vendor"

.cirrus.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ validate_task:
9393
setup_script: *setup
9494
main_script: *main
9595

96+
verify_vendor_task:
97+
alias: "verify_vendor"
98+
depends_on:
99+
- "build"
100+
cargo_cache: *ro_cargo_cache
101+
targets_cache: *ro_targets_cache
102+
bin_cache: *ro_bin_cache
103+
setup_script: *setup
104+
main_script: *main
96105

97106
unit_task:
98107
alias: "unit"
@@ -144,6 +153,7 @@ success_task:
144153
depends_on:
145154
- "build"
146155
- "validate"
156+
- "verify_vendor"
147157
- "unit"
148158
- "integration"
149159
- "meta"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ bin/
22
targets/
33
*.swp
44
netavark.1
5+
vendor/winapi*gnu*/lib/*.a

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ else
3434
endif
3535

3636
.PHONY: all
37-
all: build docs
37+
all: vendor build
3838

3939
bin:
4040
mkdir -p $@
@@ -89,6 +89,17 @@ validate: $(CARGO_TARGET_DIR)
8989
cargo fmt --all -- --check
9090
cargo clippy -p netavark -- -D warnings
9191

92+
.PHONY: vendor
93+
vendor: ## vendor everything into vendor/
94+
cargo vendor
95+
$(MAKE) vendor-rm-windows ## remove windows library if possible
96+
97+
.PHONY: vendor-rm-windows
98+
vendor-rm-windows:
99+
if [ -d "vendor/winapi" ]; then \
100+
rm -fr vendor/winapi*gnu*/lib/*.a; \
101+
fi
102+
92103
.PHONY: help
93104
help:
94105
@echo "usage: make $(prog) [debug=1]"

contrib/cirrus/runner.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ _run_validate() {
2828
make validate
2929
}
3030

31+
_run_verify_vendor() {
32+
# N/B: current repo. dir. contents produced by _run_build() above.
33+
if ! git diff --no-ext-diff --quiet --exit-code; then
34+
die "Found uncommited and necessary changes to vendoring, please fix, commit, and re-submit."
35+
fi
36+
}
37+
3138
_run_unit() {
3239
make unit
3340
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"f61283fd900435313b9ba8c1b87a4b5b31d442f9b554222136ec8d1d3d1e39d8","DESIGN.md":"9065f33d818d1562244d36dc4781e2a351108030cee17f11c2ba512ca7b4c27e","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"741e7249c8d1d6a7ba9341d68253dbf4952477c5620ff37c5325f2e894b148b6","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","rustfmt.toml":"1ca600239a27401c4a43f363cf3f38183a212affc1f31bff3ae93234bbaec228","src/ahocorasick.rs":"6fcbe812eec7af44b104c6b8a27b0a2ea8d67c3d9aec73cb69d802b30be5f005","src/automaton.rs":"610b3e2c104c51bf4f51a6d07626c3972e9d1274ca276e987385a231b284cc8b","src/buffer.rs":"dae7ee7c1f846ca9cf115ba4949484000e1837b4fb7311f8d8c9a35011c9c26f","src/byte_frequencies.rs":"2fb85b381c038c1e44ce94294531cdcd339dca48b1e61f41455666e802cbbc9e","src/classes.rs":"99a53a2ed8eea8c13699def90e31dfdff9d0b90572b1db3cb534e3396e7a0ed0","src/dfa.rs":"25e4455b3e179a7e192108d05f3683993456b36e3ebed99f827558c52525b7e6","src/error.rs":"d34c2c9c815df5d9dedc46b4b3ce109cd2cee07825de643f0c574ec960367beb","src/lib.rs":"f0c48b0ee093dd8b3034d025d052c3667860c5d4a196cb178588012b719acea4","src/nfa.rs":"2f443951c78196126bfd237ed5770a69077e6190daeecd47131339c25e51a3d0","src/packed/api.rs":"ec58ff1b4375dd4ff88fb5859c7ede994fe08d31b7d3677720a086592aa0fe53","src/packed/mod.rs":"d7ee11d487a7f129f16dc8f1473442a7127905933f378504bae83df0f23c5e2a","src/packed/pattern.rs":"3abf3835d4c4f8a43753c52936a894d819f713f233fc046e19de5ef95200dcce","src/packed/rabinkarp.rs":"caf9563b7442c9b75c9cb520fa236c7a6da8173705889b8d79b69ede14a20767","src/packed/teddy/README.md":"5819f40d221af93288e705eadef5393a41d7a0900881b4d676e01fd65d5adf15","src/packed/teddy/compile.rs":"aad40b3f93d2c388b409b31fb2795d414a365237789d5b1a7510d97ceb8ce260","src/packed/teddy/mod.rs":"83b52bd80272970ad17234d0db293d17c1710ec582302bf516b203c8edec037e","src/packed/teddy/runtime.rs":"836146e90b320b14fa2c65fe4af7915a41f6fb04408aac5fac731c22ff46adae","src/packed/tests.rs":"b8dc4d3281ecd6d0fa2bf7ef16cf292a467dfdce64e470c7921e983bfa60fee2","src/packed/vector.rs":"ab3c0535fca5f09198d58cbfae44c292aeb3ce44bc92bca36d30dc72963639fc","src/prefilter.rs":"82a3eb6d5c0c3f10bc8d5f57d55d6d14cf4cf21c475bb5253e1921084063b8d7","src/state_id.rs":"519ec8c7bf3fa72103d4c561c193759759f535dca924c9853efe630f406d2029","src/tests.rs":"6522ed1b244513c01de5bbcf0fe35571454fdea2c2a9d8dfe13a04bf57b70eca"},"package":"1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"}

vendor/aho-corasick/COPYING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This project is dual-licensed under the Unlicense and MIT licenses.
2+
3+
You may use this code under the terms of either license.

vendor/aho-corasick/Cargo.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
2+
#
3+
# When uploading crates to the registry Cargo will automatically
4+
# "normalize" Cargo.toml files for maximal compatibility
5+
# with all versions of Cargo and also rewrite `path` dependencies
6+
# to registry (e.g., crates.io) dependencies
7+
#
8+
# If you believe there's an error in this file please file an
9+
# issue against the rust-lang/cargo repository. If you're
10+
# editing this file be aware that the upstream Cargo.toml
11+
# will likely look very different (and much more reasonable)
12+
13+
[package]
14+
edition = "2018"
15+
name = "aho-corasick"
16+
version = "0.7.18"
17+
authors = ["Andrew Gallant <[email protected]>"]
18+
exclude = ["/aho-corasick-debug", "/ci/*", "/.travis.yml", "/appveyor.yml"]
19+
autotests = false
20+
description = "Fast multiple substring searching."
21+
homepage = "https://github.com/BurntSushi/aho-corasick"
22+
readme = "README.md"
23+
keywords = ["string", "search", "text", "aho", "multi"]
24+
categories = ["text-processing"]
25+
license = "Unlicense/MIT"
26+
repository = "https://github.com/BurntSushi/aho-corasick"
27+
[profile.bench]
28+
debug = true
29+
30+
[profile.release]
31+
debug = true
32+
33+
[lib]
34+
name = "aho_corasick"
35+
[dependencies.memchr]
36+
version = "2.4.0"
37+
default-features = false
38+
39+
[dev-dependencies]
40+
41+
[features]
42+
default = ["std"]
43+
std = ["memchr/std"]

0 commit comments

Comments
 (0)