-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfluxheim.spec
More file actions
117 lines (99 loc) · 3.87 KB
/
Copy pathfluxheim.spec
File metadata and controls
117 lines (99 loc) · 3.87 KB
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
%global fluxheim_features profile-core
%global rust_min_version 1.95
%bcond_without tests
%{!?_tmpfilesdir:%global _tmpfilesdir %{_prefix}/lib/tmpfiles.d}
Name: fluxheim
Version: 0.5.0
Release: 1%{?dist}
Summary: Modular Pingora-based reverse proxy and static web server
License: EUPL-1.2
URL: https://github.com/valkyoth/fluxheim
Source0: https://github.com/valkyoth/fluxheim/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
# Create with:
# cargo vendor vendor > /tmp/fluxheim-cargo-config.toml
# tar -czf fluxheim-0.5.0-vendor.tar.gz vendor
Source1: %{name}-%{version}-vendor.tar.gz
Source2: fluxheim.tmpfiles
ExclusiveArch: x86_64 aarch64
BuildRequires: cargo
BuildRequires: rust >= %{rust_min_version}
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: perl
BuildRequires: tar
%if 0%{?suse_version}
BuildRequires: pkgconfig
Requires(pre): shadow
%else
BuildRequires: pkgconf-pkg-config
Requires(pre): shadow-utils
%endif
Requires: ca-certificates
%description
Fluxheim is a modular Rust edge server built on Pingora. The 0.5.x release line
is a basic-sites preview for static website hosting, static TLS certificates,
vhost routing, secure header policy, and simple whole-vhost reverse proxying.
This spec builds from vendored Cargo dependencies and uses Cargo offline mode.
It intentionally does not download crates during the RPM build.
%prep
%autosetup -n %{name}-%{version}
tar -xzf %{SOURCE1}
mkdir -p .cargo
cat > .cargo/config.toml <<'EOF'
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
[net]
offline = true
EOF
%build
scripts/validate-features.sh "%{fluxheim_features}"
export CARGO_HOME=%{_builddir}/%{name}-cargo-home
export RUSTFLAGS="%{?build_rustflags}"
cargo build --release --locked --offline --no-default-features --features "%{fluxheim_features}"
%install
install -Dm0755 target/release/fluxheim %{buildroot}%{_bindir}/fluxheim
install -Dm0644 packaging/default/fluxheim.toml %{buildroot}%{_sysconfdir}/fluxheim/fluxheim.toml
install -Dm0644 packaging/default/index.html %{buildroot}/srv/fluxheim/index.html
install -Dm0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/fluxheim.conf
install -d -m0755 %{buildroot}%{_sysconfdir}/fluxheim/conf.d
install -d -m0755 %{buildroot}%{_sysconfdir}/fluxheim/tls
install -d -m0750 %{buildroot}%{_localstatedir}/lib/fluxheim
install -d -m0750 %{buildroot}%{_localstatedir}/cache/fluxheim
install -d -m0750 %{buildroot}%{_localstatedir}/log/fluxheim
%check
%if %{with tests}
export CARGO_HOME=%{_builddir}/%{name}-cargo-home
export RUSTFLAGS="%{?build_rustflags}"
cargo test --locked --offline --no-default-features --features "%{fluxheim_features}"
%endif
%pre
getent group fluxheim >/dev/null || groupadd -r fluxheim
getent passwd fluxheim >/dev/null || \
useradd -r -g fluxheim -d %{_localstatedir}/lib/fluxheim \
-s /sbin/nologin -c "Fluxheim service user" fluxheim
exit 0
%post
if command -v systemd-tmpfiles >/dev/null 2>&1; then
systemd-tmpfiles --create fluxheim.conf || :
fi
%files
%license LICENSE
%doc README.md CHANGELOG.md ROADMAP.md RELEASE_NOTES_0.5.0.md docs examples
%{_bindir}/fluxheim
%{_tmpfilesdir}/fluxheim.conf
%dir %{_sysconfdir}/fluxheim
%dir %{_sysconfdir}/fluxheim/conf.d
%dir %{_sysconfdir}/fluxheim/tls
%config(noreplace) %{_sysconfdir}/fluxheim/fluxheim.toml
%dir %attr(0750,fluxheim,fluxheim) %{_localstatedir}/lib/fluxheim
%dir %attr(0750,fluxheim,fluxheim) %{_localstatedir}/cache/fluxheim
%dir %attr(0750,fluxheim,fluxheim) %{_localstatedir}/log/fluxheim
%dir %attr(0755,fluxheim,fluxheim) /srv/fluxheim
%config(noreplace) %attr(0644,fluxheim,fluxheim) /srv/fluxheim/index.html
%changelog
* Wed May 06 2026 Fluxheim Maintainers <1921261+eldryoth@users.noreply.github.com> - 0.5.0-1
- Initial RPM packaging spec for the basic-sites preview.