diff --git a/.gitignore b/.gitignore index 85899e0..8a4e127 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,5 @@ /libpod-0660108.tar.gz /libpod-6b4ab2a.tar.gz /libpod-7a526bb.tar.gz +/cri-o-4e7f71b.tar.gz +/libpod-f38eb4f.tar.gz diff --git a/podman.spec b/podman.spec index dde078d..5c2f8a4 100644 --- a/podman.spec +++ b/podman.spec @@ -34,16 +34,23 @@ %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo} -%global commit0 7a526bbf9e7bfafb6c62115ca0f388fc4cc20f2f +%global commit0 f38eb4fe50427549db8957e5033b73f04b4d5c82 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global import_path_conmon github.com/kubernetes-incubator/cri-o +%global git_conmon https://%{import_path_conmon} +%global commit_conmon 4e7f71b714932dafc6a70e9b6dc09112da478be1 +%global shortcommit_conmon %(c=%{commit_conmon}; echo ${c:0:7}) + Name: podman -Version: 0.8.2 +Version: 0.8.2.1 Release: 1.git%{shortcommit0}%{?dist} Summary: Manage Pods, Containers and Container Images License: ASL 2.0 URL: %{git_podman} Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz +Source1: %{git_conmon}/archive/%{commit_conmon}/cri-o-%{shortcommit_conmon}.tar.gz +Patch: rootless.patch # e.g. el6 has ppc64 arch without gcc-go, so EA tag is required #ExclusiveArch: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 aarch64 %%{arm}} ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 @@ -66,7 +73,8 @@ BuildRequires: pkgconfig BuildRequires: make Requires: runc Requires: containers-common -Requires: conmon >= 2:1.11.1 +# can't use default conmon right now, so we ship our own +#Requires: conmon Requires: buildah Requires: containernetworking-cni >= 0.6.0-3 Requires: iptables @@ -211,6 +219,24 @@ Summary: Python 3 tool for %{name} This package contains Python 3 tool for %{name}. %endif # varlink +%package docker +Summary: "package to Emulate Docker CLI using podman." +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Conflicts: docker +Conflicts: docker-latest +Conflicts: docker-ce +Conflicts: docker-ee + +%description docker +This package installs a script named docker that emulates the Docker CLI by +executes podman commands, it also creates links between all Docker CLI man +pages and podman. + +%files docker +%{_bindir}/docker +%{_mandir}/man1/docker*.1* + %if 0%{?with_devel} %package devel Summary: Library for applications looking to use Container Pods @@ -378,6 +404,9 @@ sed -i 's/0.0.0/%{version}/' contrib/python/%{name}/setup.py sed -i 's/0.0.0/%{version}/' contrib/python/py%{name}/setup.py mv pkg/hooks/README.md pkg/hooks/README-hooks.md +# untar cri-o +tar zxf %{SOURCE1} + %build mkdir _build pushd _build @@ -391,18 +420,20 @@ export BUILDTAGS="varlink selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/ GOPATH=$GOPATH go generate ./cmd/podman/varlink/... BUILDTAGS=$BUILDTAGS make binaries docs -%if %{with varlink} -#install python-podman -pushd contrib/python/podman -%py3_build -popd +# build conmon +pushd cri-o-%{commit_conmon} -#install python-pypodman -pushd contrib/python/pypodman -%py3_build +mkdir _output +pushd _output +mkdir -p src/%{provider}.%{provider_tld}/{kubernetes-incubator,opencontainers} +ln -s $(dirs +1 -l) src/%{import_path_conmon} popd -%endif # varlink +ln -s vendor src +export GOPATH=$(pwd)/_output:$(pwd):%{gopath} +export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) containers_image_ostree_stub" +BUILDTAGS=$BUILDTAGS make -C conmon +popd %install install -dp %{buildroot}%{_unitdir} @@ -411,24 +442,22 @@ install -dp %{buildroot}%{_unitdir} install.man \ install.cni \ install.systemd \ - install.completions + install.completions \ + install.docker -%if %{with varlink} -#install python-podman -pushd contrib/python/podman -%py3_install -popd -#install python-pypodman -pushd contrib/python/pypodman -%py3_install -popd +%if %{with varlink} +%{__make} DESTDIR=%{buildroot} install.python %endif # varlink # install libpod.conf install -dp %{buildroot}%{_datadir}/containers install -p -m 644 %{repo}.conf %{buildroot}%{_datadir}/containers +# install conmon +install -dp %{buildroot}%{_libexecdir}/%{name} +install -p -m 755 cri-o-%{commit_conmon}/bin/conmon %{buildroot}%{_libexecdir}/%{name} + # source codes for building projects %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ @@ -500,9 +529,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %license LICENSE %doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md %{_bindir}/%{name} -%{_mandir}/man1/*.1* +%{_mandir}/man1/podman*.1* %{_mandir}/man5/*.5* %{_datadir}/bash-completion/completions/* +%{_libexecdir}/%{name}/conmon %config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist %{_datadir}/containers/%{repo}.conf %{_unitdir}/io.%{name}.service @@ -540,8 +570,13 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %endif %changelog -* Sat Aug 11 2018 baude - 0.8.2-1.git7a526bb -- Upstream 0.8.2 release +* Sat Aug 11 2018 Dan Walsh - 0.8.2.1-1.git7a526bb +- Upstream 0.8.2.1 release +- Add support for podman-docker +- Add support for podman shipping its own conmon. Need newer version than shipped conmon package. + +-* Sat Aug 11 2018 baude - 0.8.2-1.git7a526bb +-- Upstream 0.8.2 release * Sat Aug 4 2018 Dan Walsh - 0.8.1-1.git6b4ab2a - Bump to v0.8.1 diff --git a/rootless.patch b/rootless.patch new file mode 100644 index 0000000..aac01b3 --- /dev/null +++ b/rootless.patch @@ -0,0 +1,15 @@ +diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go +index 9d1347cc..f1f2b963 100644 +--- a/cmd/podman/libpodruntime/runtime.go ++++ b/cmd/podman/libpodruntime/runtime.go +@@ -105,6 +105,10 @@ func GetRuntimeWithStorageOpts(c *cli.Context, storageOpts *storage.StoreOptions + + if c.GlobalIsSet("cgroup-manager") { + options = append(options, libpod.WithCgroupManager(c.GlobalString("cgroup-manager"))) ++ } else { ++ if rootless.IsRootless() { ++ options = append(options, libpod.WithCgroupManager("cgroupfs")) ++ } + } + + // TODO flag to set libpod static dir? diff --git a/sources b/sources index b46112a..93bb490 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (libpod-7a526bb.tar.gz) = 3a235d726cecf191580dd6ce3cc1c0e5b93f68d9bb01f9fc51d6a6adc8f854c8ba71af8cc04935e2d5e9bdb41d4746091de28f10c180e8f89904e99e6e6f50e9 +SHA512 (cri-o-4e7f71b.tar.gz) = 268d098b1312132f27164d4c07101edf8bbde97c5b65a13f254cd2b4868cb9ff0102a6e63af1a2dc8d91696d3b49f2da62b94414d59ab8f6107b04faf6b5a35d +SHA512 (libpod-f38eb4f.tar.gz) = d3df28f8284aa1c34ea14c650848b264226b5ad4dc8a1694ee984a34a562e4784c07fdb8bc2b131f4fcc05078977bdcbbd19a5d1b883735474e138655a65c742