summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-04-22 08:57:26 -0400
committerColin Walters (automation) <walters+githubbot@verbum.org>2016-04-27 07:22:52 +0000
commit4ea7176ba9592579b82ff9c31d43e6c479b20ace (patch)
tree6c718b81b65a3cc4eded4f47a7d9ce066f89b007
parentc0725af71d9ae80968101842d6eb99b926693059 (diff)
downloadbubblewrap-4ea7176ba9592579b82ff9c31d43e6c479b20ace.tar.gz
packaging: Add a spec file
This just makes it easier to build an RPM before it gets packaged elsewhere. rpmdistro-gitoverlay e.g. can consume spec files internal to git repos. Closes: #35 Approved by: alexlarsson
-rw-r--r--packaging/bubblewrap.spec45
1 files changed, 45 insertions, 0 deletions
diff --git a/packaging/bubblewrap.spec b/packaging/bubblewrap.spec
new file mode 100644
index 0000000..b43174c
--- /dev/null
+++ b/packaging/bubblewrap.spec
@@ -0,0 +1,45 @@
+%global commit0 66d12bb23b04e201c5846e325f0b10930ed802f8
+%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
+
+Summary: Core execution tool for unprivileged containers
+Name: bubblewrap
+Version: 0
+Release: 1%{?dist}
+#VCS: git:https://github.com/projectatomic/bubblewrap
+Source0: https://github.com/projectatomic/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
+License: LGPLv2+
+URL: https://github.com/projectatomic/bubblewrap
+
+BuildRequires: git
+# We always run autogen.sh
+BuildRequires: autoconf automake libtool
+BuildRequires: libcap-devel
+
+%description
+Bubblewrap (/usr/bin/bwrap) is a core execution engine for unprivileged
+containers that works as a setuid binary on kernels without
+user namespaces.
+
+%prep
+%autosetup -Sgit -n %{name}-%{version}
+
+%build
+env NOCONFIGURE=1 ./autogen.sh
+%configure --disable-silent-rules --with-priv-mode=none
+
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
+find $RPM_BUILD_ROOT -name '*.la' -delete
+
+%files
+%license COPYING
+%doc README.md
+%{_datadir}/bash-completion/completions/bwrap
+%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
+%attr(0755,root,root) %caps(cap_sys_admin,cap_sys_chroot=ep) %{_bindir}/bwrap
+%else
+%{_bindir}/bwrap
+%endif
+