forked from containers/gvisor-tap-vsock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request containers#207 from cfergeau/podmanstuff
Improvements to the systemd unit file
- Loading branch information
Showing
7 changed files
with
34 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=gvisor-tap-vsock Network Traffic Forwarder | ||
After=NetworkManager.service | ||
BindsTo=sys-devices-virtual-net-%i.device | ||
After=sys-devices-virtual-net-%i.device | ||
|
||
[Service] | ||
Environment=GV_VSOCK_PORT="1024" | ||
EnvironmentFile=-/etc/sysconfig/gv-user-network | ||
ExecStart=/usr/libexec/podman/gvforwarder -preexisting -iface %i -url vsock://2:${GV_VSOCK_PORT}/connect | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ Source: {{{ git_dir_pack }}} | |
BuildRequires: gcc | ||
BuildRequires: golang >= 1.16.6 | ||
BuildRequires: git-core | ||
BuildRequires: systemd-rpm-macros | ||
%if 0%{?fedora} || 0%{?rhel} >= 9 | ||
BuildRequires: go-rpm-macros | ||
%endif | ||
|
@@ -71,17 +72,29 @@ ln -s vendor src | |
|
||
export GOPATH=$(pwd)/_build:$(pwd) | ||
%gobuild -o bin/gvproxy ./cmd/gvproxy | ||
%gobuild -o bin/vm ./cmd/vm | ||
%gobuild -o bin/gvforwarder ./cmd/vm | ||
|
||
%install | ||
install -dp %{buildroot}%{_libexecdir}/podman | ||
install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/podman | ||
install -p -m0755 bin/vm %{buildroot}%{_libexecdir}/podman | ||
install -p -m0755 bin/gvforwarder %{buildroot}%{_libexecdir}/podman | ||
install -dp %{buildroot}%{_unitdir} | ||
install -p -m0644 contrib/systemd/[email protected] %{buildroot}%{_unitdir} | ||
|
||
%post | ||
%systemd_post [email protected] | ||
|
||
%preun | ||
%systemd_preun [email protected] | ||
|
||
%postun | ||
%systemd_postun_with_restart [email protected] | ||
|
||
%files | ||
%dir %{_libexecdir}/podman | ||
%{_libexecdir}/podman/gvproxy | ||
%{_libexecdir}/podman/vm | ||
%{_libexecdir}/podman/gvforwarder | ||
%{_unitdir}/[email protected] | ||
|
||
%changelog | ||
{{{ git_dir_changelog }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters