diff --git a/podman.spec b/podman.spec index 81d1801..4c2e6c2 100644 --- a/podman.spec +++ b/podman.spec @@ -286,6 +286,17 @@ It is based on the network stack of gVisor. Compared to libslirp, gvisor-tap-vsock brings a configurable DNS server and dynamic port forwarding. +%package quadlet +Summary: Easily create systemd services using %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} +Conflicts: quadlet + +%description quadlet +This package installs a systemd generator for *.container files in +/etc/containers/systemd. Such files are automatically converted into +systemd service units, allowing easily written and maintained +podman-based system services. + %prep %autosetup -Sgit -n %{name}-%{built_tag_strip} sed -i 's;@@PODMAN@@\;$(BINDIR);@@PODMAN@@\;%{_bindir};' Makefile @@ -324,15 +335,21 @@ LDFLAGS="-X %{import_path}/libpod/define.buildInfo=$(date +%s)" # build rootlessport first %gobuild -o bin/rootlessport %{import_path}/cmd/rootlessport +export BASEBUILDTAGS="seccomp exclude_graphdriver_devicemapper $(hack/selinux_tag.sh) $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh)" + # build %%{name} -export BUILDTAGS="seccomp exclude_graphdriver_devicemapper $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh) $(hack/selinux_tag.sh) $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh)" +export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh)" %gobuild -o bin/%{name} %{import_path}/cmd/%{name} # build %%{name}-remote -export BUILDTAGS="seccomp exclude_graphdriver_devicemapper exclude_graphdriver_btrfs btrfs_noversion $(hack/selinux_tag.sh) $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh) remote" +export BUILDTAGS="$BASEBUILDTAGS exclude_graphdriver_btrfs btrfs_noversion remote" %gobuild -o bin/%{name}-remote %{import_path}/cmd/%{name} +# build quadlet +export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)" +%gobuild -o bin/quadlet %{import_path}/cmd/quadlet + cd %{repo_plugins}-%{commit_plugins} mkdir _build cd _build @@ -452,5 +469,11 @@ rm -f %{buildroot}%{_datadir}/user-tmpfiles.d/%{name}-docker.conf %dir %{_libexecdir}/%{name} %{_libexecdir}/%{name}/gvproxy +%files quadlet +%license LICENSE +%{_libexecdir}/%{name}/quadlet +%{_systemdgeneratordir}/%{name}-system-generator +%{_systemdusergeneratordir}/%{name}-user-generator + %changelog %autochangelog