Skip to content

Commit 634b80b

Browse files
authored
Merge pull request #661 from arnaldo2792/whippet
Add whippet
2 parents 3a20975 + 2d144af commit 634b80b

File tree

22 files changed

+2562
-8
lines changed

22 files changed

+2562
-8
lines changed

packages/os/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ source-groups = [
2626
"bloodhound",
2727
"xfscli",
2828
"brush",
29+
"whippet",
2930
]
3031

3132
[lib]

packages/os/dbus-1-system.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[user.root]
2+
rules = [
3+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.systemd1.Activator", allow = true },
4+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus.Monitoring", allow = true },
5+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus.Debug.Stats", allow = true }
6+
]
7+
8+
[default]
9+
rules = [
10+
{ user = "*", allow = true },
11+
{ own = "*", allow = false },
12+
{ send_type = "method-call", allow = false },
13+
{ send_type = "signal", allow = true },
14+
{ receive_type = "method-call", allow = true },
15+
{ receive_type = "signal", allow = true },
16+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus", allow = true },
17+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus.Introspectable", allow = true },
18+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus.Properties", allow = true },
19+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus", send_member = "UpdateActivationEnvironment", allow = false },
20+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.DBus.Debug.Stats", allow = false },
21+
{ send_destination = "org.freedesktop.DBus", send_interface = "org.freedesktop.systemd1.Activator", allow = false }
22+
]

packages/os/os.spec

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Source18: bootstrap-containers-toml
3333
Source19: host-containers-toml
3434
Source20: bottlerocket-fips-checks-metadata-json
3535
Source21: bootstrap-commands-toml
36+
Source22: dbus-1-system.toml
3637

3738
# 1xx sources: systemd units
3839
Source100: apiserver.service
@@ -52,6 +53,7 @@ Source121: warm-pool-wait.service
5253
Source122: has-boot-ever-succeeded.service
5354
Source123: pluto.service
5455
Source124: bootstrap-commands.service
56+
Source125: whippet.service
5557

5658
# 2xx sources: tmpfilesd configs
5759
Source200: migration-tmpfiles.conf
@@ -423,6 +425,13 @@ Conflicts: %{_cross_os}bash
423425
%description -n %{_cross_os}brush
424426
%{summary}.
425427

428+
%package -n %{_cross_os}whippet
429+
Summary: Custom launcher for the D-Bus message broker
430+
Provides: %{_cross_os}dbus-broker(launcher) = 0:
431+
Conflicts: %{_cross_os}dbus-broker(launcher)
432+
%description -n %{_cross_os}whippet
433+
%{summary}.
434+
426435
%prep
427436
%setup -T -c
428437
%cargo_prep
@@ -543,6 +552,7 @@ echo "** Output from non-static builds:"
543552
-p shibaken \
544553
-p driverdog \
545554
-p brush \
555+
-p whippet \
546556
%{nil}
547557

548558
# Wait for fips builds from the background, if they're not already done.
@@ -604,7 +614,7 @@ for p in \
604614
bottlerocket-cis-checks \
605615
bottlerocket-fips-checks \
606616
kubernetes-cis-checks \
607-
shibaken driverdog brush \
617+
shibaken driverdog brush whippet \
608618
; do
609619
install -p -m 0755 %{__cargo_outdir}/${p} %{buildroot}%{_cross_bindir}
610620
done
@@ -710,6 +720,7 @@ install -p -m 0644 \
710720
%{S:100} %{S:102} %{S:103} %{S:105} \
711721
%{S:106} %{S:107} %{S:110} %{S:111} %{S:112} \
712722
%{S:113} %{S:114} %{S:120} %{S:122} %{S:123} %{S:124} \
723+
%{S:125} \
713724
%{buildroot}%{_cross_unitdir}
714725

715726
install -p -m 0644 %{S:10} %{buildroot}%{_cross_templatedir}
@@ -731,6 +742,9 @@ install -p -m 0644 %{S:300} %{buildroot}%{_cross_udevrulesdir}/80-ephemeral-stor
731742
install -p -m 0644 %{S:301} %{buildroot}%{_cross_udevrulesdir}/81-ebs-volumes.rules
732743
install -p -m 0644 %{S:302} %{buildroot}%{_cross_udevrulesdir}/82-supplemental-storage.rules
733744

745+
install -d %{buildroot}%{_cross_datadir}/whippet/
746+
install -p -m 0644 %{S:22} %{buildroot}%{_cross_datadir}/whippet/system.toml
747+
734748
%cross_scan_attribution --clarify %{_builddir}/sources/clarify.toml \
735749
cargo --offline --locked %{_builddir}/sources/Cargo.toml
736750

@@ -932,4 +946,9 @@ install -p -m 0644 %{S:400} %{S:401} %{S:402} %{buildroot}%{_cross_licensedir}
932946
%{_cross_bindir}/sh
933947
%dir %{_cross_libexecdir}/brush/allowed-programs
934948

949+
%files -n %{_cross_os}whippet
950+
%{_cross_bindir}/whippet
951+
%{_cross_datadir}/whippet/system.toml
952+
%{_cross_unitdir}/whippet.service
953+
935954
%changelog

packages/os/whippet.service

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[Unit]
2+
Description=D-Bus System Message Bus
3+
DefaultDependencies=false
4+
After=dbus.socket
5+
Before=basic.target shutdown.target
6+
Requires=dbus.socket
7+
Conflicts=shutdown.target
8+
9+
[Service]
10+
Type=notify
11+
Sockets=dbus.socket
12+
OOMScoreAdjust=-900
13+
LimitNOFILE=16384
14+
ProtectSystem=full
15+
PrivateTmp=true
16+
PrivateDevices=true
17+
ExecStart=/usr/bin/whippet
18+
19+
[Install]
20+
Alias=dbus.service
21+
WantedBy=preconfigured.target

packages/selinux-policy/fs.cil

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
(filecon "/.*/usr(/fips)?/bin/cfsignal" file api_exec)
5151
(filecon "/.*/usr/bin/thar-be-settings" file api_exec)
5252
(filecon "/.*/usr/bin/dbus-broker.*" file bus_exec)
53+
(filecon "/.*/usr/bin/whippet" file bus_exec)
5354
(filecon "/.*/usr/sbin/chronyd" file clock_exec)
5455
(filecon "/.*/usr/lib/systemd/systemd-networkd.*" file network_exec)
5556
(filecon "/.*/usr(/fips)?/bin/containerd.*" file runtime_exec)

0 commit comments

Comments
 (0)