Skip to content

Commit

Permalink
Eliminate vendoring on Rawhide (#730)
Browse files Browse the repository at this point in the history
It has become possible to eliminate crate vendoring all together for
Rawhide.

This PR removes vendoring from the top level spec, Containerfile, and CI.

This also:
- Drops fc37 build
- Bumps nom to v7.1
- Switches from lmdb-rkv to lmdb v0.8
- Bumps other deps for Fedora package compat
- Uses urls for SourceX rather than relative paths

#715
# Conflicts:
#	.copr/Makefile
#	.github/workflows/rpm.yml
#	Cargo.lock
#	Containerfile
#	crates/trust/Cargo.toml
#	crates/trust/src/load.rs
#	crates/util/Cargo.toml
#	fapolicy-analyzer.spec
#	scripts/srpm/fapolicy-analyzer.spec
  • Loading branch information
jw3 committed Jan 9, 2023
1 parent 3e42134 commit 5627162
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dnf-rpmdev:
ifeq ($(OS_ID),rhel)
vendor: vendor-app vendor-rs vendor-py
else
vendor: vendor-app vendor-rs
vendor: vendor-app
endif

vendor-app:
Expand Down
7 changes: 0 additions & 7 deletions .github/rpm-matrix.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"props": [
{
"platform": "fedora",
"dist": "fc37",
"spec": "fapolicy-analyzer.spec",
"image": "registry.fedoraproject.org/fedora:37",
"chroot": "fedora-37-x86_64"
},
{
"platform": "fedora",
"dist": "fc38",
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ jobs:
- name: Export tarballs
run: |
mkdir -p /tmp/archives
mv vendor-rs.$PLATFORM.tar.gz /tmp/archives
mv fapolicy-analyzer.tar.gz /tmp/archives
env:
PLATFORM: ${{ matrix.props.dist }}

- name: Export Rust vendor tarball
if: startsWith(matrix.props.dist, 'el')
run: |
mv vendor-rs.tar.gz /tmp/archives/vendor-rs.tar.gz
env:
PLATFORM: ${{ matrix.props.dist }}

- name: Upload tarballs
uses: actions/upload-artifact@v3
with:
Expand Down
121 changes: 29 additions & 92 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ WORKDIR /tmp/rpmbuild
RUN spectool -gf -C SOURCES/ SPECS/fapolicy-analyzer.spec

COPY --chown=10001:0 fapolicy-analyzer.tar.gz SOURCES/
COPY --chown=10001:0 vendor-rs.tar.gz SOURCES/
COPY --chown=10001:0 scripts/srpm/build.sh ./build.sh

WORKDIR /tmp/rpmbuild/SOURCES
RUN dist=$(rpm --eval "%{?dist}") \
&& mv vendor-rs.tar.gz vendor-rs${dist}.tar.gz

WORKDIR /tmp/rpmbuild

ENTRYPOINT ["/tmp/rpmbuild/build.sh"]
2 changes: 1 addition & 1 deletion crates/analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2018"
path = "src/lib.rs"

[dependencies]
nom = "6.1.0"
nom = "7.1"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
chrono = "0.4.22"
Expand Down
5 changes: 2 additions & 3 deletions crates/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ version = "0.4.0"
edition = "2018"

[dependencies]
confy = "0.4.0"
directories = "2.0.2"
lmdb-rkv = "0.14.0"
confy = "0.4"
directories = "4.0"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion crates/daemon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.4.0"
edition = "2018"

[dependencies]
nom = "6.1.0"
nom = "7.1"
thiserror = "1.0"
fapolicy-trust = { version = "*", path = "../trust" }
dbus = "0.9"
2 changes: 1 addition & 1 deletion crates/rules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ path = "src/lib.rs"
tempfile = "3.3"

[dependencies]
nom = "6.1.0"
nom = "7.1"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
4 changes: 2 additions & 2 deletions crates/tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ path = "src/rule_check.rs"

[dependencies]
clap = { version = "3.2.20", features = ["derive"] }
lmdb-rkv = "0.14.0"
nom = "6.1.0"
lmdb = "0.8"
nom = "7.1"
rayon = "1.5"
thiserror = "1.0"
ariadne = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/trust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.4.0"
edition = "2018"

[dependencies]
lmdb-rkv = "0.14.0"
lmdb = "0.8"
rayon = "1.5"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
Expand Down
Loading

0 comments on commit 5627162

Please sign in to comment.