diff --git a/.gitignore b/.gitignore index 1771832..41cda5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/runc-e800860.tar.gz +SOURCES/runc-f8ce01d.tar.gz diff --git a/.runc.metadata b/.runc.metadata index 230827f..5b9097a 100644 --- a/.runc.metadata +++ b/.runc.metadata @@ -1 +1 @@ -4e461ae6af04ffb599aea483968df8ec298b258e SOURCES/runc-e800860.tar.gz +419c07c81e0d14c61c3b1e3f54f55e6cdd932073 SOURCES/runc-f8ce01d.tar.gz diff --git a/SOURCES/99-containers.conf b/SOURCES/99-containers.conf new file mode 100644 index 0000000..7e2d537 --- /dev/null +++ b/SOURCES/99-containers.conf @@ -0,0 +1 @@ +fs.may_detach_mounts=1 diff --git a/SOURCES/change-default-root.patch b/SOURCES/change-default-root.patch new file mode 100644 index 0000000..6ae9207 --- /dev/null +++ b/SOURCES/change-default-root.patch @@ -0,0 +1,66 @@ +From e8008604cb0a1921ab416302265ed50d504696f5 Mon Sep 17 00:00:00 2001 +From: Mrunal Patel +Date: Wed, 5 Apr 2017 07:46:28 -0700 +Subject: [PATCH] Change the default --root to /run/runc-ctrs + +This avoids the unmarshalling issues with older docker-runc +Signed-off-by: Mrunal Patel +--- + list.go | 2 +- + main.go | 2 +- + man/runc-list.8.md | 2 +- + man/runc.8.md | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/list.go b/list.go +index c7550a2..75ee2fc 100644 +--- a/list.go ++++ b/list.go +@@ -46,7 +46,7 @@ var listCommand = cli.Command{ + ArgsUsage: ` + + Where the given root is specified via the global option "--root" +-(default: "/run/runc"). ++(default: "/run/runc-ctrs"). + + EXAMPLE 1: + To list containers created via the default "--root": +diff --git a/main.go b/main.go +index 1cb8f4d..0b34488 100644 +--- a/main.go ++++ b/main.go +@@ -77,7 +77,7 @@ func main() { + }, + cli.StringFlag{ + Name: "root", +- Value: "/run/runc", ++ Value: "/run/runc-ctrs", + Usage: "root directory for storage of container state (this should be located in tmpfs)", + }, + cli.StringFlag{ +diff --git a/man/runc-list.8.md b/man/runc-list.8.md +index f737424..107220e 100644 +--- a/man/runc-list.8.md ++++ b/man/runc-list.8.md +@@ -6,7 +6,7 @@ + + # EXAMPLE + Where the given root is specified via the global option "--root" +-(default: "/run/runc"). ++(default: "/run/runc-ctrs"). + + To list containers created via the default "--root": + # runc list +diff --git a/man/runc.8.md b/man/runc.8.md +index b5a8c54..c3a07fb 100644 +--- a/man/runc.8.md ++++ b/man/runc.8.md +@@ -50,7 +50,7 @@ value for "bundle" is the current directory. + --debug enable debug output for logging + --log value set the log file path where internal debug information is written (default: "/dev/null") + --log-format value set the format used by logs ('text' (default), or 'json') (default: "text") +- --root value root directory for storage of container state (this should be located in tmpfs) (default: "/run/runc") ++ --root value root directory for storage of container state (this should be located in tmpfs) (default: "/run/runc-ctrs") + --criu value path to the criu binary used for checkpoint and restore (default: "criu") + --systemd-cgroup enable systemd cgroup support, expects cgroupsPath to be of form "slice:prefix:name" for e.g. "system.slice:runc:434234" + --help, -h show help diff --git a/SPECS/runc.spec b/SPECS/runc.spec index 9969369..b16955d 100644 --- a/SPECS/runc.spec +++ b/SPECS/runc.spec @@ -25,8 +25,8 @@ # https://github.com/opencontainers/runc %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global git0 https://github.com/projectatomic/runc -%global commit0 e8008604cb0a1921ab416302265ed50d504696f5 +%global git0 https://github.com/opencontainers/runc +%global commit0 f8ce01dbdc7d16f74423c0bd23d8dc8565f24e9e %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: %{repo} @@ -34,11 +34,14 @@ Name: %{repo} Epoch: 1 %endif Version: 1.0.0 -Release: 6.git%{shortcommit0}%{?dist} +Release: 12.1.git%{shortcommit0}%{?dist} Summary: CLI for running Open Containers License: ASL 2.0 -URL: https://%{provider_prefix} -Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz +URL: http//%{provider_prefix} +ExcludeArch: s390x +Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz +Source1: 99-containers.conf +Patch0: change-default-root.patch Requires: criu # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. @@ -155,7 +158,7 @@ providing packages with %{import_path} prefix. %endif %prep -%autosetup -Sgit -n %{name}-%{commit0} +%autosetup -Sgit -n %{repo}-%{commit0} %build mkdir -p GOPATH @@ -166,9 +169,9 @@ popd pushd GOPATH/src/%{import_path} export GOPATH=%{gopath}:$(pwd)/GOPATH + sed -i 's/seccomp/selinux seccomp/' Makefile make all -popd pushd man ./md2man-all.sh @@ -181,6 +184,9 @@ install -p -m 755 %{name} %{buildroot}%{_bindir} install -d -p %{buildroot}%{_mandir}/man8 install -p -m 644 man/man8/* %{buildroot}%{_mandir}/man8 +install -d -p %{buildroot}%{_usr}/lib/sysctl.d +install -p -m 644 %{SOURCE1} %{buildroot}%{_usr}/lib/sysctl.d + # source codes for building projects %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ @@ -250,11 +256,15 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} #define license tag if not already defined %{!?_licensedir:%global license %doc} +%post +%sysctl_apply 99-containers.conf + %files %license LICENSE %doc MAINTAINERS_GUIDE.md PRINCIPLES.md README.md CONTRIBUTING.md %{_bindir}/%{name} %{_mandir}/man8/%{name}* +%{_usr}/lib/sysctl.d/99-containers.conf %if 0%{?with_devel} %files devel -f devel.file-list @@ -271,13 +281,27 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %endif %changelog -* Wed Apr 05 2017 Lokesh Mandvekar - 1.0.0-6.gite800860 -- Resolves: #1438911 - change default --root to /run/runc-ctrs +* Tue Jun 13 2017 Lokesh Mandvekar - 1.0.0-12.1.gitf8ce01d +- disable s390x temporarily because of indefinite wait times on brew + +* Tue Jun 13 2017 Lokesh Mandvekar - 1.0.0-11.1.gitf8ce01d +- correct previous bogus date :\ + +* Mon Jun 12 2017 Lokesh Mandvekar - 1.0.0-10.1.gitf8ce01d +- Resolves: #1441737 - run sysctl_apply for sysctl knob + +* Tue May 09 2017 Lokesh Mandvekar - 1.0.0-9.1.gitf8ce01d +- Resolves: #1447078 - change default root path +- add commit e800860 from runc @projectatomic/change-root-path + +* Fri May 05 2017 Lokesh Mandvekar - 1.0.0-8.1.gitf8ce01d +- Resolves: #1441737 - enable kernel sysctl knob /proc/sys/fs/may_detach_mounts -* Tue Mar 21 2017 Lokesh Mandvekar - 1.0.0-5.git75f8da7 -- built @mrunalp/1_rc3 commit 75f8da7 +* Thu Apr 13 2017 Lokesh Mandvekar - 1.0.0-7.1.gitf8ce01d +- Resolves: #1429675 +- built @opencontainers/master commit f8ce01d -* Thu Mar 16 2017 Lokesh Mandvekar - 1.0.0-4.gitee992e5 +* Thu Mar 16 2017 Lokesh Mandvekar - 1.0.0-4.1.gitee992e5 - built @projectatomic/master commit ee992e5 * Fri Feb 24 2017 Lokesh Mandvekar - 1.0.0-3.rc2