From 0d91c048b42e8bf806172613eccaef65d7340aae Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 14 Jun 2017 19:49:43 +0000 Subject: [PATCH 01/25] Release Candidate 1 All features have now been implemented. --- .gitignore | 1 + buildah.spec | 15 +++++++++------ sources | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index eb7a05d..2e8b4e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /buildah-a0a5333.tar.gz +/buildah-597d2ab.tar.gz diff --git a/buildah.spec b/buildah.spec index 20a1e4b..49720b3 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit a0a5333b94264d1fb1e072d63bcb98f9e2981b49 +%global commit 597d2ab9fa41b2db8ce0c6d8be05edb462d3b31d %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.0.1 -Release: 1.git%{shortcommit}%{?dist} +Version: 0.1.0 +Release: 2.git%{shortcommit}%{?dist} Summary: A command line tool used to creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -43,8 +43,8 @@ BuildRequires: gpgme-devel BuildRequires: device-mapper-devel BuildRequires: btrfs-progs-devel BuildRequires: libassuan-devel -Requires: runc >= 1.0.0-6 -Requires: skopeo-containers +Requires: runc >= 1.0.0-7 +Requires: skopeo-containers >= 0.1.20-2 Provides: %{repo} = %{version}-%{release} %description @@ -74,7 +74,6 @@ make all %install export GOPATH=$(pwd)/_build:$(pwd):%{gopath} - make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions #define license tag if not already defined @@ -90,5 +89,9 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Wed Jun 14 2017 Dan Walsh 0.1.0-2.git597d2ab9 +- Release Candidate 1 +- All features have now been implemented. + * Fri Apr 14 2017 Dan Walsh 0.0.1-1.git7a0a5333 - First package for Fedora diff --git a/sources b/sources index e0baa19..edcf8bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-a0a5333.tar.gz) = f8ca5b5b5287239d3ce85d042dc3b886fe590e17a870e4c119e0996fef2c938437d324c4da22536468a305e9245a127f27f4b23545beb59fafbefc57c141e113 +SHA512 (buildah-597d2ab.tar.gz) = 89f86b12fd2b96c52ce6c21e6583a2099fa4b8f8de0c7d18eef698ebdb846e7b33441c78ac8c8be4117d3b59a9c90c1987f490278b23e7fc5c9d8d366677a35a From 44a2ece54382332f76403caeab9fe2673aca4d09 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 14 Jun 2017 17:37:39 -0400 Subject: [PATCH 02/25] fix summary Signed-off-by: Lokesh Mandvekar --- buildah.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildah.spec b/buildah.spec index 49720b3..04d4f10 100644 --- a/buildah.spec +++ b/buildah.spec @@ -27,7 +27,7 @@ Name: buildah Version: 0.1.0 Release: 2.git%{shortcommit}%{?dist} -Summary: A command line tool used to creating OCI Images +Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz From 12f61928cc824cb19e2c9deffe6967e4e18ed8b1 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 18 Jul 2017 21:16:33 +0000 Subject: [PATCH 03/25] buildah run: Add support for -- ending options parsing buildah Add/Copy support for glob syntax buildah commit: Add flag to remove containers on commit buildah push: Improve man page and help information buildah run: add a way to disable PTY allocation Buildah docs: clarify --runtime-flag of run command Update to match newer storage and image-spec APIs Update containers/storage and containers/image versions buildah export: add support buildah images: update commands buildah images: Add JSON output option buildah rmi: update commands buildah containers: Add JSON output option buildah version: add command buildah run: Handle run without an explicit command correctly Ensure volume points get created, and with perms buildah containers: Add a -a/--all option --- .gitignore | 1 + buildah.spec | 27 +++++++++++++++++++++++---- sources | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2e8b4e3..cd36484 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /buildah-a0a5333.tar.gz /buildah-597d2ab.tar.gz +/buildah-ac2aad6.tar.gz diff --git a/buildah.spec b/buildah.spec index 49720b3..018d546 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,13 +21,13 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 597d2ab9fa41b2db8ce0c6d8be05edb462d3b31d +%global commit ac2aad63436e5eabdd8d49d712bee5cf637dd59a %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.1.0 -Release: 2.git%{shortcommit}%{?dist} -Summary: A command line tool used to creating OCI Images +Version: 0.2.0 +Release: 1.git%{shortcommit}%{?dist} +Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz @@ -89,6 +89,25 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Tue Jul 18 2017 Dan Walsh 0.2.0-1.gitac2aad6 +- buildah run: Add support for -- ending options parsing +- buildah Add/Copy support for glob syntax +- buildah commit: Add flag to remove containers on commit +- buildah push: Improve man page and help information +- buildah run: add a way to disable PTY allocation +- Buildah docs: clarify --runtime-flag of run command +- Update to match newer storage and image-spec APIs +- Update containers/storage and containers/image versions +- buildah export: add support +- buildah images: update commands +- buildah images: Add JSON output option +- buildah rmi: update commands +- buildah containers: Add JSON output option +- buildah version: add command +- buildah run: Handle run without an explicit command correctly +- Ensure volume points get created, and with perms +- buildah containers: Add a -a/--all option + * Wed Jun 14 2017 Dan Walsh 0.1.0-2.git597d2ab9 - Release Candidate 1 - All features have now been implemented. diff --git a/sources b/sources index edcf8bd..53974ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-597d2ab.tar.gz) = 89f86b12fd2b96c52ce6c21e6583a2099fa4b8f8de0c7d18eef698ebdb846e7b33441c78ac8c8be4117d3b59a9c90c1987f490278b23e7fc5c9d8d366677a35a +SHA512 (buildah-ac2aad6.tar.gz) = fcd1c087449f6d420499fec6f13fb750c6c990708598243e148825c2a5c2538f092b93c975591a07adb729b898690f9830b4baa8563fa4661905b669a3587364 From 1065b72eef2c9e136cb0bc4242d9e0f0d9777e03 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 18 Jul 2017 21:31:38 +0000 Subject: [PATCH 04/25] buildah run: Add support for -- ending options parsing buildah Add/Copy support for glob syntax buildah commit: Add flag to remove containers on commit buildah push: Improve man page and help information buildah run: add a way to disable PTY allocation Buildah docs: clarify --runtime-flag of run command Update to match newer storage and image-spec APIs Update containers/storage and containers/image versions buildah export: add support buildah images: update commands buildah images: Add JSON output option buildah rmi: update commands buildah containers: Add JSON output option buildah version: add command buildah run: Handle run without an explicit command correctly Ensure volume points get created, and with perms buildah containers: Add a -a/--all option --- buildah.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/buildah.spec b/buildah.spec index 018d546..bcec21f 100644 --- a/buildah.spec +++ b/buildah.spec @@ -37,6 +37,7 @@ ExclusiveArch: x86_64 aarch64 ppc64le BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: git BuildRequires: glib2-devel +BuildRequires: ostree-devel BuildRequires: glibc-static BuildRequires: go-md2man BuildRequires: gpgme-devel From 8f074391c1ebf0a2db4f8329f6b058915716d44f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 20 Jul 2017 19:47:26 +0000 Subject: [PATCH 05/25] Bump for inclusion of OCI 1.0 Runtime and Image Spec --- .gitignore | 1 + buildah.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cd36484..bd27483 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /buildah-a0a5333.tar.gz /buildah-597d2ab.tar.gz /buildah-ac2aad6.tar.gz +/buildah-b37a981.tar.gz diff --git a/buildah.spec b/buildah.spec index bcec21f..7679591 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,11 +21,11 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit ac2aad63436e5eabdd8d49d712bee5cf637dd59a +%global commit b37a981500df33dcbeb32325aa6ddd900c42c457 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.2.0 +Version: 0.3 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 @@ -90,6 +90,9 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Thu Jul 20 2017 Dan Walsh 0.3-1.gitb37a981 +- Bump for inclusion of OCI 1.0 Runtime and Image Spec + * Tue Jul 18 2017 Dan Walsh 0.2.0-1.gitac2aad6 - buildah run: Add support for -- ending options parsing - buildah Add/Copy support for glob syntax diff --git a/sources b/sources index 53974ad..4f7778d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-ac2aad6.tar.gz) = fcd1c087449f6d420499fec6f13fb750c6c990708598243e148825c2a5c2538f092b93c975591a07adb729b898690f9830b4baa8563fa4661905b669a3587364 +SHA512 (buildah-b37a981.tar.gz) = 7cb7a02d0c876cc2be214cfe6d9489a50951d7b05007a74d31a84cfa36932ef46e7110c76d35caa101d189061a1a1ac86ab61ec31eb5d309870e7170610401c1 From 184278758fd328f617452bade855dc27b1ab5991 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 20 Jul 2017 20:41:29 +0000 Subject: [PATCH 06/25] Bump for inclusion of OCI 1.0 Runtime and Image Spec --- .gitignore | 1 + buildah.spec | 6 +++--- sources | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bd27483..e013161 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /buildah-597d2ab.tar.gz /buildah-ac2aad6.tar.gz /buildah-b37a981.tar.gz +/buildah-b9b2a8a.tar.gz diff --git a/buildah.spec b/buildah.spec index 7679591..b853fef 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit b37a981500df33dcbeb32325aa6ddd900c42c457 +%global commit b9b2a8a7ef87833a1db600ed2a3d5295644b2f1c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah Version: 0.3 -Release: 1.git%{shortcommit}%{?dist} +Release: 2.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -90,7 +90,7 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog -* Thu Jul 20 2017 Dan Walsh 0.3-1.gitb37a981 +* Thu Jul 20 2017 Dan Walsh 0.3-2.gitb9b2a8a7e - Bump for inclusion of OCI 1.0 Runtime and Image Spec * Tue Jul 18 2017 Dan Walsh 0.2.0-1.gitac2aad6 diff --git a/sources b/sources index 4f7778d..10ad6e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-b37a981.tar.gz) = 7cb7a02d0c876cc2be214cfe6d9489a50951d7b05007a74d31a84cfa36932ef46e7110c76d35caa101d189061a1a1ac86ab61ec31eb5d309870e7170610401c1 +SHA512 (buildah-b9b2a8a.tar.gz) = 4af5e62d7fb1ec2cc05e5dac09c713b9822d0384fe4a9dc97af9677a0741998726b236022f4d817c9534e229e71bddd1e339f4a886557b6f16deb46eeabfbac7 From 45f99c3afc58fc434580e9921b239182e490efdf Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Tue, 15 Aug 2017 14:05:18 -0400 Subject: [PATCH 07/25] Build for s390x as well --- buildah.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/buildah.spec b/buildah.spec index b853fef..8d6f583 100644 --- a/buildah.spec +++ b/buildah.spec @@ -26,13 +26,13 @@ Name: buildah Version: 0.3 -Release: 2.git%{shortcommit}%{?dist} +Release: 3.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -ExclusiveArch: x86_64 aarch64 ppc64le +ExclusiveArch: x86_64 aarch64 ppc64le s390x # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: git @@ -90,6 +90,9 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Tue Aug 15 2017 Josh Boyer - 0.3-3.gitb9b2a8a +- Build for s390x as well + * Thu Jul 20 2017 Dan Walsh 0.3-2.gitb9b2a8a7e - Bump for inclusion of OCI 1.0 Runtime and Image Spec From aee8505a32b9074fe9d6c39a87dc0a555a6309ae Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 22 Sep 2017 10:28:31 +0000 Subject: [PATCH 08/25] Add default transport to push if not provided Avoid trying to print a nil ImageReference Add authentication to commit and push Add information on buildah from man page on transports Remove --transport flag Run: do not complain about missing volume locations Add credentials to buildah from Remove export command Run(): create the right working directory Improve "from" behavior with unnamed references Avoid parsing image metadata for dates and layers Read the image's creation date from public API Bump containers/storage and containers/image Don't panic if an image's ID can't be parsed Turn on --enable-gc when running gometalinter rmi: handle truncated image IDs --- .gitignore | 1 + buildah.spec | 32 ++++++++++++++++++++++++++++---- sources | 2 +- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e013161..427a91f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /buildah-ac2aad6.tar.gz /buildah-b37a981.tar.gz /buildah-b9b2a8a.tar.gz +/buildah-9cbccf8.tar.gz diff --git a/buildah.spec b/buildah.spec index 8d6f583..9bef3a7 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit b9b2a8a7ef87833a1db600ed2a3d5295644b2f1c +%global commit 9cbccf88cfc1f6e205af30f7e048eab0949468ad %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.3 -Release: 3.git%{shortcommit}%{?dist} +Version: 0.4 +Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -90,9 +90,33 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog -* Tue Aug 15 2017 Josh Boyer - 0.3-3.gitb9b2a8a +* Fri Sep 22 2017 Dan Walsh 0.4-1.git9cbccf88c +- Add default transport to push if not provided +- Avoid trying to print a nil ImageReference +- Add authentication to commit and push +- Add information on buildah from man page on transports +- Remove --transport flag +- Run: do not complain about missing volume locations +- Add credentials to buildah from +- Remove export command +- Run(): create the right working directory +- Improve "from" behavior with unnamed references +- Avoid parsing image metadata for dates and layers +- Read the image's creation date from public API +- Bump containers/storage and containers/image +- Don't panic if an image's ID can't be parsed +- Turn on --enable-gc when running gometalinter +- rmi: handle truncated image IDs + +* Tue Aug 15 2017 Josh Boyer - 0.3-5.gitb9b2a8a - Build for s390x as well +* Wed Aug 02 2017 Fedora Release Engineering - 0.3-4.gitb9b2a8a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.3-3.gitb9b2a8a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Jul 20 2017 Dan Walsh 0.3-2.gitb9b2a8a7e - Bump for inclusion of OCI 1.0 Runtime and Image Spec diff --git a/sources b/sources index 10ad6e1..06d244c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-b9b2a8a.tar.gz) = 4af5e62d7fb1ec2cc05e5dac09c713b9822d0384fe4a9dc97af9677a0741998726b236022f4d817c9534e229e71bddd1e339f4a886557b6f16deb46eeabfbac7 +SHA512 (buildah-9cbccf8.tar.gz) = b205d8ec5a9cc08e08a9ae62d6fd2bd21146b88bf324d6618a4b686101f744819a74430d13d64e7debd7d6deee0f555e4d18aa9c2db4241667c78a25a56e3636 From 092486014d15d7d5b7f2c1cd03ab6ac4dc95044c Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 8 Nov 2017 01:12:05 +0000 Subject: [PATCH 09/25] Add secrets patch to buildah Add proper SELinux labeling to buildah run Add tls-verify to bud command Make filtering by date use the image's date images: don't list unnamed images twice Fix timeout issue Add further tty verbiage to buildah run Make inspect try an image on failure if type not specified Add support for `buildah run --hostname` Tons of bug fixes and code cleanup --- .gitignore | 1 + buildah.spec | 16 ++++++++++++++-- sources | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 427a91f..f306b79 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /buildah-b37a981.tar.gz /buildah-b9b2a8a.tar.gz /buildah-9cbccf8.tar.gz +/buildah-35afa1c.tar.gz diff --git a/buildah.spec b/buildah.spec index 9bef3a7..757788d 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,11 +21,11 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 9cbccf88cfc1f6e205af30f7e048eab0949468ad +%global commit 35afa1c1f4143130668eff755187bac1866a8704 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.4 +Version: 0.5 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 @@ -90,6 +90,18 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Tue Nov 07 2017 Dan Walsh 0.5-1 +- Add secrets patch to buildah +- Add proper SELinux labeling to buildah run +- Add tls-verify to bud command +- Make filtering by date use the image's date +- images: don't list unnamed images twice +- Fix timeout issue +- Add further tty verbiage to buildah run +- Make inspect try an image on failure if type not specified +- Add support for `buildah run --hostname` +- Tons of bug fixes and code cleanup + * Fri Sep 22 2017 Dan Walsh 0.4-1.git9cbccf88c - Add default transport to push if not provided - Avoid trying to print a nil ImageReference diff --git a/sources b/sources index 06d244c..db04117 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-9cbccf8.tar.gz) = b205d8ec5a9cc08e08a9ae62d6fd2bd21146b88bf324d6618a4b686101f744819a74430d13d64e7debd7d6deee0f555e4d18aa9c2db4241667c78a25a56e3636 +SHA512 (buildah-35afa1c.tar.gz) = df23f69a566c52dc45fb2f4c1014066a063abe70b42c006f08cd59860fe8fa7906137510591875c0d3664155fe688363af8ea335908a9580ea0753493a045972 From d6d9ee59c230e1e69b720555d664b9e99eeadbda Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 8 Nov 2017 17:54:16 +0000 Subject: [PATCH 10/25] Bump github.com/vbatts/tar-split Fixes CVE That could allow a container image to cause a DOS --- .gitignore | 1 + buildah.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f306b79..57985c7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /buildah-b9b2a8a.tar.gz /buildah-9cbccf8.tar.gz /buildah-35afa1c.tar.gz +/buildah-f7dc659.tar.gz diff --git a/buildah.spec b/buildah.spec index 757788d..4b0db0b 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 35afa1c1f4143130668eff755187bac1866a8704 +%global commit f7dc659e52ba861f12f13c7f98030773a785cbb9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah Version: 0.5 -Release: 1.git%{shortcommit}%{?dist} +Release: 2.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -70,7 +70,7 @@ popd mv vendor src export GOPATH=$(pwd)/_build:$(pwd):%{gopath} -make all +make all GIT_COMMIT=%{shortcommit} %install @@ -90,6 +90,10 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Wed Nov 08 2017 Dan Walsh 0.5-2 +- Bump github.com/vbatts/tar-split +- Fixes CVE That could allow a container image to cause a DOS + * Tue Nov 07 2017 Dan Walsh 0.5-1 - Add secrets patch to buildah - Add proper SELinux labeling to buildah run diff --git a/sources b/sources index db04117..2891950 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-35afa1c.tar.gz) = df23f69a566c52dc45fb2f4c1014066a063abe70b42c006f08cd59860fe8fa7906137510591875c0d3664155fe688363af8ea335908a9580ea0753493a045972 +SHA512 (buildah-f7dc659.tar.gz) = 0685d651166a75e6e41f727f790b9b849f469cd3181b3b62d69771767e7b5e44c53e4354cf3a9f6c1662cecd71141b0ad2c54da01955731211f9e3b783089b95 From 3e0ae87554762216aeb53aaf05e72717bdcebda2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 15 Nov 2017 17:50:53 +0000 Subject: [PATCH 11/25] Adds support for converting manifest types when using the dir transport Rework how we do UID resolution in images Bump github.com/vbatts/tar-split Set option.terminal appropriately in run --- .gitignore | 1 + buildah.spec | 12 +++++++++--- sources | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 57985c7..e8eae07 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /buildah-9cbccf8.tar.gz /buildah-35afa1c.tar.gz /buildah-f7dc659.tar.gz +/buildah-de0fb93.tar.gz diff --git a/buildah.spec b/buildah.spec index 4b0db0b..fa70894 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit f7dc659e52ba861f12f13c7f98030773a785cbb9 +%global commit de0fb93f3d207817021d62171d85e572312523a9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.5 -Release: 2.git%{shortcommit}%{?dist} +Version: 0.6 +Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -90,6 +90,12 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Wed Nov 15 2017 Dan Walsh 0.6-1 +- Adds support for converting manifest types when using the dir transport +- Rework how we do UID resolution in images +- Bump github.com/vbatts/tar-split +- Set option.terminal appropriately in run + * Wed Nov 08 2017 Dan Walsh 0.5-2 - Bump github.com/vbatts/tar-split - Fixes CVE That could allow a container image to cause a DOS diff --git a/sources b/sources index 2891950..e8dd24e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-f7dc659.tar.gz) = 0685d651166a75e6e41f727f790b9b849f469cd3181b3b62d69771767e7b5e44c53e4354cf3a9f6c1662cecd71141b0ad2c54da01955731211f9e3b783089b95 +SHA512 (buildah-de0fb93.tar.gz) = 9d601f2829284e3b677bd7965ec5c2ea0ed30404509f9e796d1c25e0fce5ea32ffc8178288438a715b7f1c5e43628e969a807e4739901537d58fee19c420b9d9 From a67c5278cd2bc83258ca825f5c00f8ff6df37ec4 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 15 Nov 2017 17:53:31 +0000 Subject: [PATCH 12/25] Adds support for converting manifest types when using the dir transport Rework how we do UID resolution in images Bump github.com/vbatts/tar-split Set option.terminal appropriately in run --- buildah.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/buildah.spec b/buildah.spec index fa70894..2a3d574 100644 --- a/buildah.spec +++ b/buildah.spec @@ -46,6 +46,7 @@ BuildRequires: btrfs-progs-devel BuildRequires: libassuan-devel Requires: runc >= 1.0.0-7 Requires: skopeo-containers >= 0.1.20-2 +Requires: container-selinux Provides: %{repo} = %{version}-%{release} %description From 3cd8281668ffbf5776e9494bdc922f9738b9515c Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 16 Nov 2017 22:04:22 +0000 Subject: [PATCH 13/25] Ignore errors when trying to read containers buildah.json for loading SELinux reservations Use credentials from kpod login for buildah --- .gitignore | 1 + buildah.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e8eae07..f1c24b4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /buildah-35afa1c.tar.gz /buildah-f7dc659.tar.gz /buildah-de0fb93.tar.gz +/buildah-b7e3320.tar.gz diff --git a/buildah.spec b/buildah.spec index 2a3d574..82a2cfe 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,11 +21,11 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit de0fb93f3d207817021d62171d85e572312523a9 +%global commit b7e3320fe487ddaa859506df991c365ff2737870 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.6 +Version: 0.7 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 @@ -91,6 +91,10 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Thu Nov 16 2017 Dan Walsh 0.7-1 +- Ignore errors when trying to read containers buildah.json for loading SELinux reservations +- Use credentials from kpod login for buildah + * Wed Nov 15 2017 Dan Walsh 0.6-1 - Adds support for converting manifest types when using the dir transport - Rework how we do UID resolution in images diff --git a/sources b/sources index e8dd24e..9ef659b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-de0fb93.tar.gz) = 9d601f2829284e3b677bd7965ec5c2ea0ed30404509f9e796d1c25e0fce5ea32ffc8178288438a715b7f1c5e43628e969a807e4739901537d58fee19c420b9d9 +SHA512 (buildah-b7e3320.tar.gz) = 021e5f47068b3d7aafbf9563aa0f2f28b7d2bfdcb885d8ba052705d883a543a8d407fa70b6b840c10c9b81d778a49842fd7b4396a0431a0d8f02e711b1bc81b3 From 941bb93cfeb34c63d5c01e8d6300d1cc2d22bc11 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 22 Nov 2017 16:39:27 +0000 Subject: [PATCH 14/25] Buildah bud was failing on SELinux machines, this fixes this Block access to certain kernel file systems inside of the container --- .gitignore | 1 + buildah.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f1c24b4..4a0928d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /buildah-f7dc659.tar.gz /buildah-de0fb93.tar.gz /buildah-b7e3320.tar.gz +/buildah-bf40000.tar.gz diff --git a/buildah.spec b/buildah.spec index 82a2cfe..77c43c7 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,11 +21,11 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit b7e3320fe487ddaa859506df991c365ff2737870 +%global commit bf40000e72b351067ebae7b77d212a200f9ce051 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.7 +Version: 0.8 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 @@ -91,6 +91,10 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Thu Nov 16 2017 Dan Walsh 0.8-1 +- Buildah bud was failing on SELinux machines, this fixes this +- Block access to certain kernel file systems inside of the container + * Thu Nov 16 2017 Dan Walsh 0.7-1 - Ignore errors when trying to read containers buildah.json for loading SELinux reservations - Use credentials from kpod login for buildah diff --git a/sources b/sources index 9ef659b..492e4a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-b7e3320.tar.gz) = 021e5f47068b3d7aafbf9563aa0f2f28b7d2bfdcb885d8ba052705d883a543a8d407fa70b6b840c10c9b81d778a49842fd7b4396a0431a0d8f02e711b1bc81b3 +SHA512 (buildah-bf40000.tar.gz) = a956a0e316e8febbd5554de94f6cf4f9ecd3f09972e442486d2b6c67018fea47d4c8a2586e70ff404343b94b106a123302c09506121804f5ddc00b2770b6e7de From dd1d8ebdd4187eae5be8b11db3a0357ccd13a30a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 2 Dec 2017 12:00:04 +0000 Subject: [PATCH 15/25] Allow push to use the image id Make sure builtin volumes have the correct label --- .gitignore | 1 + buildah.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4a0928d..fb99fa4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /buildah-de0fb93.tar.gz /buildah-b7e3320.tar.gz /buildah-bf40000.tar.gz +/buildah-04ea079.tar.gz diff --git a/buildah.spec b/buildah.spec index 77c43c7..e7cb9e4 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,11 +21,11 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit bf40000e72b351067ebae7b77d212a200f9ce051 +%global commit 04ea0791308720d032fdf7f1efb55488ac633351 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.8 +Version: 0.9 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 @@ -91,6 +91,10 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Sat Dec 2 2017 Dan Walsh 0.9-1 +- Allow push to use the image id +- Make sure builtin volumes have the correct label + * Thu Nov 16 2017 Dan Walsh 0.8-1 - Buildah bud was failing on SELinux machines, this fixes this - Block access to certain kernel file systems inside of the container diff --git a/sources b/sources index 492e4a5..fb74c8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-bf40000.tar.gz) = a956a0e316e8febbd5554de94f6cf4f9ecd3f09972e442486d2b6c67018fea47d4c8a2586e70ff404343b94b106a123302c09506121804f5ddc00b2770b6e7de +SHA512 (buildah-04ea079.tar.gz) = fc91d16ef5b223788c08d2888ce2aeb9c7a630c8407c2661b4f6ab3c923edcccdfb612cef0d18b390bd848c5e3578eb5258e8292ce11aa8c0949285a4dd72d1e From 7cae8ede6d446bc7824c1f95a5e6cca7a8e1a8e8 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Sun, 3 Dec 2017 21:52:22 -0500 Subject: [PATCH 16/25] remove git from builddep can't find git in the module ecosystem and git isn't critical for package build. Signed-off-by: Lokesh Mandvekar --- buildah.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildah.spec b/buildah.spec index e7cb9e4..d926a46 100644 --- a/buildah.spec +++ b/buildah.spec @@ -35,7 +35,6 @@ Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcomm ExclusiveArch: x86_64 aarch64 ppc64le s390x # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -BuildRequires: git BuildRequires: glib2-devel BuildRequires: ostree-devel BuildRequires: glibc-static @@ -59,7 +58,7 @@ or * delete a working container or an image %prep -%autosetup -Sgit -n %{name}-%{commit} +%setup -q -n %{name}-%{commit} %build mkdir _build From dfee2f675f2c43e589eb208a1cb9b39494a3cc22 Mon Sep 17 00:00:00 2001 From: Yevhenii Shapovalov Date: Tue, 12 Dec 2017 13:28:04 +0200 Subject: [PATCH 17/25] add tests --- tests/README.md | 3 + tests/binary.yml | 10 + tests/callback_plugins/log.py | 193 ++++++++++++++++++ tests/roles/binary/tasks/buildah.yml | 15 ++ tests/roles/binary/tasks/main.yml | 4 + tests/roles/binary/tasks/runc.yml | 16 ++ tests/roles/cli/tasks/add.yaml | 41 ++++ tests/roles/cli/tasks/bud.yaml | 24 +++ tests/roles/cli/tasks/cleanup.yaml | 4 + tests/roles/cli/tasks/config.yaml | 16 ++ tests/roles/cli/tasks/containers.yaml | 18 ++ tests/roles/cli/tasks/copy.yaml | 41 ++++ tests/roles/cli/tasks/from.yaml | 12 ++ tests/roles/cli/tasks/main.yaml | 44 ++++ tests/roles/cli/tasks/mount.yaml | 27 +++ tests/roles/cli/tasks/prepare-containers.yaml | 6 + tests/roles/cli/tasks/push.yaml | 60 ++++++ tests/roles/cli/tasks/tag.yaml | 43 ++++ tests/roles/prepare-env/tasks/main.yml | 41 ++++ tests/roles/tear-down/tasks/main.yml | 6 + tests/rpm.yml | 9 + tests/test_binary.sh | 1 + tests/test_rpm.sh | 1 + tests/tests.yml | 12 ++ 24 files changed, 647 insertions(+) create mode 100644 tests/README.md create mode 100644 tests/binary.yml create mode 100644 tests/callback_plugins/log.py create mode 100644 tests/roles/binary/tasks/buildah.yml create mode 100644 tests/roles/binary/tasks/main.yml create mode 100644 tests/roles/binary/tasks/runc.yml create mode 100644 tests/roles/cli/tasks/add.yaml create mode 100644 tests/roles/cli/tasks/bud.yaml create mode 100644 tests/roles/cli/tasks/cleanup.yaml create mode 100644 tests/roles/cli/tasks/config.yaml create mode 100644 tests/roles/cli/tasks/containers.yaml create mode 100644 tests/roles/cli/tasks/copy.yaml create mode 100644 tests/roles/cli/tasks/from.yaml create mode 100644 tests/roles/cli/tasks/main.yaml create mode 100644 tests/roles/cli/tasks/mount.yaml create mode 100644 tests/roles/cli/tasks/prepare-containers.yaml create mode 100644 tests/roles/cli/tasks/push.yaml create mode 100644 tests/roles/cli/tasks/tag.yaml create mode 100644 tests/roles/prepare-env/tasks/main.yml create mode 100644 tests/roles/tear-down/tasks/main.yml create mode 100644 tests/rpm.yml create mode 100755 tests/test_binary.sh create mode 100755 tests/test_rpm.sh create mode 100644 tests/tests.yml diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..3a997a6 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,3 @@ +Buildah - a tool which facilitates building OCI container images + +When executing the buildah bud testing, it will cost much time as it is building image in the background. diff --git a/tests/binary.yml b/tests/binary.yml new file mode 100644 index 0000000..1c7803d --- /dev/null +++ b/tests/binary.yml @@ -0,0 +1,10 @@ +--- +# test buildah +- hosts: all + become: true + tags: + - classic + roles: + - binary + - prepare-env + - cli diff --git a/tests/callback_plugins/log.py b/tests/callback_plugins/log.py new file mode 100644 index 0000000..f4f1ce9 --- /dev/null +++ b/tests/callback_plugins/log.py @@ -0,0 +1,193 @@ +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Inspired from: https://github.com/redhat-openstack/khaleesi/blob/master/plugins/callbacks/human_log.py +# Further improved support Ansible 2.0 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +try: + from ansible.plugins.callback import CallbackBase + BASECLASS = CallbackBase +except ImportError: # < ansible 2.1 + BASECLASS = DEFAULT_MODULE.CallbackModule + +import os, sys +reload(sys) +sys.setdefaultencoding('utf-8') + +try: + import simplejson as json +except ImportError: + import json + +# Fields to reformat output for +FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', + 'stderr', 'results', 'failed', 'reason'] + + +class CallbackModule(CallbackBase): + + """ + Ansible callback plugin for human-readable result logging + """ + CALLBACK_VERSION = 2.0 + CALLBACK_TYPE = 'notification' + CALLBACK_NAME = 'human_log' + CALLBACK_NEEDS_WHITELIST = False + + def __init__(self, *args, **kwargs): + # pylint: disable=non-parent-init-called + BASECLASS.__init__(self, *args, **kwargs) + self.artifacts = './artifacts' + self.result_file = os.path.join(self.artifacts, 'test.log') + if not os.path.exists(self.artifacts): + os.makedirs(self.artifacts) + with open(self.result_file, 'w'): pass + + def human_log(self, data, taskname, status): + if type(data) == dict: + with open('./artifacts/test.log', 'a') as f: + f.write("\n\n") + f.write("# TASK NAME: %s \n" % taskname) + f.write("# STATUS: %s \n\n" % status) + f.write("Outputs: \n\n") + for field in FIELDS: + no_log = data.get('_ansible_no_log', False) + if field in data.keys() and data[field] and no_log != True: + output = self._format_output(data[field]) + # The following two lines are a hack to make it work with UTF-8 characters + if type(output) != list: + output = output.encode('utf-8', 'replace') + #self._display.display("\n{0}:\n{1}".format(field, output.replace("\\n","\n")), log_only=False) + with open('./artifacts/test.log', 'a') as f: + f.write("{0}: {1}".format(field, output.replace("\\n","\n"))+"\n") + + + def _format_output(self, output): + # Strip unicode + if type(output) == unicode: + output = output.encode(sys.getdefaultencoding(), 'replace') + + # If output is a dict + if type(output) == dict: + return json.dumps(output, indent=2, sort_keys=True) + + # If output is a list of dicts + if type(output) == list and type(output[0]) == dict: + # This gets a little complicated because it potentially means + # nested results, usually because of with_items. + real_output = list() + for index, item in enumerate(output): + copy = item + if type(item) == dict: + for field in FIELDS: + if field in item.keys(): + copy[field] = self._format_output(item[field]) + real_output.append(copy) + return json.dumps(output, indent=2, sort_keys=True) + + # If output is a list of strings + if type(output) == list and type(output[0]) != dict: + return '\n'.join(output) + + # Otherwise it's a string, (or an int, float, etc.) just return it + return str(output) + + ####### V2 METHODS ###### + def v2_on_any(self, *args, **kwargs): + pass + + def v2_runner_on_failed(self, result, ignore_errors=False): + self.human_log(result._result, result._task.name, "fail") + + def v2_runner_on_ok(self, result): + self.human_log(result._result, result._task.name, "pass") + + def v2_runner_on_skipped(self, result): + pass + + def v2_runner_on_unreachable(self, result): + self.human_log(result._result, result._task.name, "unreachable") + + def v2_runner_on_no_hosts(self, task): + pass + + def v2_runner_on_async_poll(self, result): + self.human_log(result._result, result._task.name, "") + + def v2_runner_on_async_ok(self, host, result): + self.human_log(result._result, result._task.name, "pass") + + def v2_runner_on_async_failed(self, result): + self.human_log(result._result, result._task.name, "fail") + + def v2_playbook_on_start(self, playbook): + pass + + def v2_playbook_on_notify(self, result, handler): + pass + + def v2_playbook_on_no_hosts_matched(self): + pass + + def v2_playbook_on_no_hosts_remaining(self): + pass + + def v2_playbook_on_task_start(self, task, is_conditional): + pass + + def v2_playbook_on_vars_prompt(self, varname, private=True, prompt=None, + encrypt=None, confirm=False, salt_size=None, + salt=None, default=None): + pass + + def v2_playbook_on_setup(self): + pass + + def v2_playbook_on_import_for_host(self, result, imported_file): + pass + + def v2_playbook_on_not_import_for_host(self, result, missing_file): + pass + + def v2_playbook_on_play_start(self, play): + pass + + def v2_playbook_on_stats(self, stats): + pass + + def v2_on_file_diff(self, result): + pass + + def v2_playbook_on_item_ok(self, result): + pass + + def v2_playbook_on_item_failed(self, result): + pass + + def v2_playbook_on_item_skipped(self, result): + pass + + def v2_playbook_on_include(self, included_file): + pass + + def v2_playbook_item_on_ok(self, result): + pass + + def v2_playbook_item_on_failed(self, result): + pass + + def v2_playbook_item_on_skipped(self, result): + pass diff --git a/tests/roles/binary/tasks/buildah.yml b/tests/roles/binary/tasks/buildah.yml new file mode 100644 index 0000000..5122105 --- /dev/null +++ b/tests/roles/binary/tasks/buildah.yml @@ -0,0 +1,15 @@ +--- +- name: pull latest buildah source from github + git: + repo: https://github.com/projectatomic/buildah + dest: "{{ HOME }}/go/src/github.com/projectatomic/buildah" + +- name: make binary for buildah + command: make + args: + chdir: "{{ HOME }}/go/src/github.com/projectatomic/buildah" + +- name: install buildah to /usr/local/bin + command: make install + args: + chdir: "{{ HOME }}/go/src/github.com/projectatomic/buildah" diff --git a/tests/roles/binary/tasks/main.yml b/tests/roles/binary/tasks/main.yml new file mode 100644 index 0000000..771725d --- /dev/null +++ b/tests/roles/binary/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- import_tasks: runc.yml + +- import_tasks: buildah.yml diff --git a/tests/roles/binary/tasks/runc.yml b/tests/roles/binary/tasks/runc.yml new file mode 100644 index 0000000..d64d5fb --- /dev/null +++ b/tests/roles/binary/tasks/runc.yml @@ -0,0 +1,16 @@ +--- +- name: pull latest runc source from github + git: + repo: https://github.com/opencontainers/runc + dest: "{{ HOME }}/go/src/github.com/opencontainers/runc" + +- name: building runc for buildah runtime + command: make + args: + chdir: "{{ HOME }}/go/src/github.com/opencontainers/runc" + +- name: copy runc to /usr/bin + copy: + remote_src: True + src: "{{ HOME }}/go/src/github.com/opencontainers/runc/runc" + dest: /usr/bin/runc diff --git a/tests/roles/cli/tasks/add.yaml b/tests/roles/cli/tasks/add.yaml new file mode 100644 index 0000000..0bd6498 --- /dev/null +++ b/tests/roles/cli/tasks/add.yaml @@ -0,0 +1,41 @@ +--- +- name: buildah add + command: buildah add nginxc /tmp/buildah/bud/Dockerfile + +- name: check buildah add + command: ls {{mount.stdout}}/Dockerfile + +- name: buildah add to destination + command: buildah add nginxc /tmp/buildah/bud/Dockerfile /home + +- name: check buildah add to + command: ls {{mount.stdout}}/home/Dockerfile + +- name: buildah add URL + command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md + +- name: check buildah add URL + command: ls {{mount.stdout}}/README.md + +- name: buildah add URL to destination + command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md /home + +- name: check buildah add URL to destination + command: ls {{mount.stdout}}/home/README.md + +- name: Download buildah README.md + get_url: + url: https://github.com/projectatomic/buildah/raw/master/README.md + dest: /tmp/buildah/ + +- name: buildah add dir + command: buildah add nginxc /tmp + +- name: check buildah add dir + command: ls {{mount.stdout}}/buildah/README.md + +- name: buildah add dir to destination + command: buildah add nginxc /tmp /home + +- name: check buildah add dir to destination + command: ls {{mount.stdout}}/home/buildah/README.md diff --git a/tests/roles/cli/tasks/bud.yaml b/tests/roles/cli/tasks/bud.yaml new file mode 100644 index 0000000..1f1c678 --- /dev/null +++ b/tests/roles/cli/tasks/bud.yaml @@ -0,0 +1,24 @@ +--- +- name: buildah bud localfile + command: buildah bud -t testing/nginx --pull /tmp/buildah/bud + +- name: check bud images with buildah images command + shell: buildah images | grep testing/nginx + +- name: buildah bud -f localfile + command: buildah bud -t testing/nginx2 -f /tmp/buildah/bud/Dockerfile . + +- name: buildah bud URL + command: buildah bud -t testing/nginx3 http://localhost/bud/Dockerfile.tar.gz + +- name: buildah build-using-dockerfile localfile + command: buildah build-using-dockerfile -t testing/nginx4 /tmp/buildah/bud + +- name: buildah build-using-dockerfile -f localfile + command: buildah build-using-dockerfile -t testing/nginx5 --file /tmp/buildah/bud/Dockerfile . + +- name: buildah build-using-dockerfile URL + command: buildah build-using-dockerfile --tag testing/nginx6 http://localhost/bud/Dockerfile.tar.gz + +- name: buildah rmi + command: buildah rmi testing/nginx{2..6} diff --git a/tests/roles/cli/tasks/cleanup.yaml b/tests/roles/cli/tasks/cleanup.yaml new file mode 100644 index 0000000..45f31d5 --- /dev/null +++ b/tests/roles/cli/tasks/cleanup.yaml @@ -0,0 +1,4 @@ +--- +- name: remove buildah containers after testing + command: buildah rm busybox nginxc nginxc-2 + ignore_errors: true diff --git a/tests/roles/cli/tasks/config.yaml b/tests/roles/cli/tasks/config.yaml new file mode 100644 index 0000000..91e8bc3 --- /dev/null +++ b/tests/roles/cli/tasks/config.yaml @@ -0,0 +1,16 @@ +--- +- name: buildah config workingdir + command: buildah config --workingdir /opt nginxc + +- name: get buildah config workingdir + command: buildah run nginxc "pwd" + register: checkworkingdir + failed_when: "'/opt' not in checkworkingdir.stdout" + +- name: buildah config env + command: buildah config --env foo=bar nginxc + +- name: get buildah config env + command: buildah run nginxc env + register: env + failed_when: "'foo=bar' not in env.stdout" diff --git a/tests/roles/cli/tasks/containers.yaml b/tests/roles/cli/tasks/containers.yaml new file mode 100644 index 0000000..fa9add6 --- /dev/null +++ b/tests/roles/cli/tasks/containers.yaml @@ -0,0 +1,18 @@ +--- +- name: buildah containers + shell: buildah containers | grep nginxc + +- name: buildah containers -q + shell: buildah containers -q | grep -v nginxc + +- name: buildah containers -n + shell: buildah containers -n | grep -v NAME + +- name: buildah containers --notruncate + command: buildah containers -- notruncate + +- name: buildah containers --all + command: buildah containers --all + +- name: buildah containers --json + command: buildah containers --json diff --git a/tests/roles/cli/tasks/copy.yaml b/tests/roles/cli/tasks/copy.yaml new file mode 100644 index 0000000..3f0d8c5 --- /dev/null +++ b/tests/roles/cli/tasks/copy.yaml @@ -0,0 +1,41 @@ +--- +- name: buildah copy + command: buildah copy nginxc-2 /tmp/buildah/bud/Dockerfile + +- name: check buildah copy + command: ls {{mount.stdout}}/Dockerfile + +- name: buildah copy to destination + command: buildah copy nginxc-2 /tmp/buildah/bud/Dockerfile /home + +- name: check buildah copy to + command: ls {{mount.stdout}}/home/Dockerfile + +- name: buildah copy URL + command: buildah copy nginxc-2 https://github.com/projectatomic/buildah/raw/master/README.md + +- name: check buildah copy URL + command: ls {{mount.stdout}}/README.md + +- name: buildah copy URL to destination + command: buildah copy nginxc-2 https://github.com/projectatomic/buildah/raw/master/README.md /home + +- name: check buildah copy URL to destination + command: ls {{mount.stdout}}/home/README.md + +- name: Download buildah README.md + get_url: + url: https://github.com/projectatomic/buildah/raw/master/README.md + dest: /tmp/buildah/ + +- name: buildah copy dir + command: buildah copy nginxc-2 /tmp/buildah + +- name: check buildah copy dir + command: ls {{mount.stdout}}/README.md + +- name: buildah copy dir to destination + command: buildah copy nginxc-2 /tmp /home + +- name: check buildah copy dir to destination + command: ls {{mount.stdout}}/home/buildah/README.md diff --git a/tests/roles/cli/tasks/from.yaml b/tests/roles/cli/tasks/from.yaml new file mode 100644 index 0000000..e694b10 --- /dev/null +++ b/tests/roles/cli/tasks/from.yaml @@ -0,0 +1,12 @@ +--- +- name: buildah from pull + command: buildah from --pull nginx + +- name: buildah from pull always + command: buildah from --pull-always nginx + +- name: buildah from with name + command: buildah from --name nginx nginx + +- name: clean from testings + command: buildah delete nginx nginx-working-container nginx-working-container-2 diff --git a/tests/roles/cli/tasks/main.yaml b/tests/roles/cli/tasks/main.yaml new file mode 100644 index 0000000..f709887 --- /dev/null +++ b/tests/roles/cli/tasks/main.yaml @@ -0,0 +1,44 @@ +--- +- block: + - name: prepare containers nginxc + import_tasks: prepare-containers.yaml + tags: + - nginxc + + - name: buildah containers + import_tasks: containers.yaml + tags: + - ctr + + - name: buildah from + import_tasks: from.yaml + tags: + - from + + - name: buildah mount + import_tasks: mount.yaml + tags: + - mount + + - name: buildah tag + import_tasks: tag.yaml + tags: + - tag + + - name: buildah config + import_tasks: config.yaml + tags: + - config + + - name: buildah push + import_tasks: push.yaml + tags: + - push + + - name: buildah build-using-dockerfile + import_tasks: bud.yaml + tags: + - bud + + always: + - import_tasks: cleanup.yaml diff --git a/tests/roles/cli/tasks/mount.yaml b/tests/roles/cli/tasks/mount.yaml new file mode 100644 index 0000000..09bd901 --- /dev/null +++ b/tests/roles/cli/tasks/mount.yaml @@ -0,0 +1,27 @@ +--- +- name: buildah mount container nginxc + command: buildah mount nginxc + register: mount + +- name: buildah mount without args will list all mounts + shell: buildah mount | grep storage + +- name: buildah add + import_tasks: add.yaml + tags: + - add + +- name: buildah umount + command: buildah umount nginxc + +- name: buildah mount --notruncate + command: buildah mount --notruncate nginxc-2 + register: mount + +- name: buildah copy + import_tasks: copy.yaml + tags: + - copy + +- name: buildah unmount + command: buildah unmount nginxc-2 diff --git a/tests/roles/cli/tasks/prepare-containers.yaml b/tests/roles/cli/tasks/prepare-containers.yaml new file mode 100644 index 0000000..1477e62 --- /dev/null +++ b/tests/roles/cli/tasks/prepare-containers.yaml @@ -0,0 +1,6 @@ +--- +- name: prepare container nginxc for later testing + command: buildah from --pull --name nginxc nginx + +- name: prepare container nginxc-2 for later testing + command: buildah from --name nginxc-2 nginx diff --git a/tests/roles/cli/tasks/push.yaml b/tests/roles/cli/tasks/push.yaml new file mode 100644 index 0000000..cc38b51 --- /dev/null +++ b/tests/roles/cli/tasks/push.yaml @@ -0,0 +1,60 @@ +--- +- name: pull busybox before push + command: buildah from --pull --name busybox busybox + +- name: buildah push image to containers-storage + command: buildah push docker.io/busybox:latest containers-storage:docker.io/busybox:latest + +- name: buildah push image to docker daemon + command: buildah push docker.io/busybox:latest docker-daemon:docker.io/buildah/busybox:latest + +- name: check buildah/busybox exist in docker daemon + command: docker images docker.io/buildah/busybox:latest + +- name: buildah push image to docker local registry + command: buildah push --tls-verify=false docker.io/busybox:latest docker://localhost:5000/buildah/busybox:latest + +- name: create /tmp/buildah/busybox + file: path=/tmp/buildah/docker state=directory + +- name: rm busybox.tar because docker archive does not support modify + file: path=/tmp/buildah/docker/busybox.tar state=absent + +- name: buildah push image to docker-archive + command: buildah push docker.io/busybox:latest docker-archive:/tmp/buildah/docker/busybox.tar:latest + +- name: check docker archive exist + file: path=/tmp/buildah/docker/busybox.tar state=file + +- name: create /tmp/buildah/dir + file: path=/tmp/buildah/dir state=directory + +- name: buildah push image to dir + command: buildah push docker.io/busybox:latest dir:/tmp/buildah/dir + +- name: create /tmp/buildah/oci + file: path=/tmp/buildah/oci state=directory + +- name: buildah push image to oci + command: buildah push docker.io/busybox:latest oci:/tmp/buildah/oci:latest + +- name: buildah push image to oci archive + command: buildah push docker.io/busybox:latest oci-archive:/tmp/buildah/oci/busybox.tar:latest + +- name: check oci archive exist + file: path=/tmp/buildah/oci/busybox.tar state=file + +- name: init default ostree repo + command: ostree --repo=/ostree/repo init + +- name: create /tmp/buildah/ostree/repo + file: path=/tmp/buildah/ostree/repo state=directory + +- name: init tmp ostree repo + command: ostree --repo=/tmp/buildah/ostree/repo init + +- name: buildah push image to ostree + command: buildah push docker.io/busybox:latest ostree:busybox:latest + +- name: buildah push image to non-default ostree repo + command: buildah push docker.io/busybox:latest ostree:busybox:latest@/tmp/buildah/ostree/repo diff --git a/tests/roles/cli/tasks/tag.yaml b/tests/roles/cli/tasks/tag.yaml new file mode 100644 index 0000000..32767ba --- /dev/null +++ b/tests/roles/cli/tasks/tag.yaml @@ -0,0 +1,43 @@ +--- +- name: buildah from --pull busybox + command: buildah from busybox + +- name: buildah tag by name + command: buildah tag busybox busybox1 + +- name: check busybox1 exists + shell: buildah images | grep busybox1 + +- name: get image id + command: buildah images -q busybox1 + register: busyboxID + +- name: buildah tag by ID + command: buildah tag {{busyboxID.stdout}} busybox2 + +- name: check busybox2 exists + shell: buildah images | grep busybox2 + +- name: buildah from tagged image + command: buildah from busybox1 + +- name: mount the container which using tagged image + command: buildah mount busybox1-working-container + +- name: buildah umount the container + command: buildah umount busybox1-working-container + +- name: buildah rm container busybox + command: buildah rm busybox-working-container + +- name: buildah rm container busybox1 + command: buildah rm busybox1-working-container + +- name: buildah rmi tagged image + command: buildah rmi busybox{1..2} + +- name: check image busybox is not deleted + shell: buildah images | grep busybox + +- name: buildah rmi image busybox + command: buildah rmi busybox diff --git a/tests/roles/prepare-env/tasks/main.yml b/tests/roles/prepare-env/tasks/main.yml new file mode 100644 index 0000000..bc46794 --- /dev/null +++ b/tests/roles/prepare-env/tasks/main.yml @@ -0,0 +1,41 @@ +--- +- name: install required packages for testings + package: + name: "{{ item }}" + state: latest + with_items: + - docker + - python-docker-py + - buildah + - docker-distribution + - ostree + - httpd + - libselinux-python + +- name: start docker daemon + systemd: state=started name=docker + +- name: create /ostree/repo + file: path=/ostree/repo state=directory + +- name: ensure docker-distribution service is running + systemd: state=started name=docker-distribution + +- name: creates directory buildah testing + file: path=/tmp/buildah/bud state=directory + +- name: download Dockerfile + get_url: + url: https://github.com/fedora-cloud/Fedora-Dockerfiles/raw/master/nginx/Dockerfile + dest: /tmp/buildah/bud/Dockerfile + +- name: creates a bud directory in /var/www/html + file: path=/var/www/html/bud state=directory + +- name: archive dockerfile into httpd directory + command: tar zcvf /var/www/html/bud/Dockerfile.tar.gz Dockerfile + args: + chdir: /tmp/buildah/bud + +- name: start httpd service + systemd: state=started name=httpd diff --git a/tests/roles/tear-down/tasks/main.yml b/tests/roles/tear-down/tasks/main.yml new file mode 100644 index 0000000..f54186d --- /dev/null +++ b/tests/roles/tear-down/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- name: stop docker-distribution service + systemd: state=stopped name=docker-distribution + +- name: stop httpd service + systemd: state=stopped name=httpd diff --git a/tests/rpm.yml b/tests/rpm.yml new file mode 100644 index 0000000..27a9349 --- /dev/null +++ b/tests/rpm.yml @@ -0,0 +1,9 @@ +--- +# test buildah +- hosts: all + become: true + tags: + - classic + roles: + - prepare-env + - cli diff --git a/tests/test_binary.sh b/tests/test_binary.sh new file mode 100755 index 0000000..1290479 --- /dev/null +++ b/tests/test_binary.sh @@ -0,0 +1 @@ +ansible-playbook -i inventory binary.yml "$@" diff --git a/tests/test_rpm.sh b/tests/test_rpm.sh new file mode 100755 index 0000000..3634f61 --- /dev/null +++ b/tests/test_rpm.sh @@ -0,0 +1 @@ +ansible-playbook -i inventory buildah_rpm.yml "$@" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..74f63e8 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +--- +# test buildah +- hosts: localhost + become: true + tags: + - classic + roles: + - prepare-env + - role: cli + tags: + - cli + - tear-down From ece15b37b786a1c3814bc2b152883c186453c382 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 24 Dec 2017 05:54:44 -0500 Subject: [PATCH 18/25] Display Config and Manifest as strings Bump containers/image Use configured registries to resolve image names Update to work with newer image library Add --chown option to add/copy commands --- .gitignore | 1 + buildah.spec | 13 +++++++++---- sources | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index fb99fa4..ab833b2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /buildah-b7e3320.tar.gz /buildah-bf40000.tar.gz /buildah-04ea079.tar.gz +/buildah-979c945.tar.gz diff --git a/buildah.spec b/buildah.spec index d926a46..df9abbf 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,11 +21,11 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 04ea0791308720d032fdf7f1efb55488ac633351 +%global commit 979c9456744396fe27914d28063fb66dec896744 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.9 +Version: 0.10 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 @@ -36,7 +36,6 @@ ExclusiveArch: x86_64 aarch64 ppc64le s390x # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: glib2-devel -BuildRequires: ostree-devel BuildRequires: glibc-static BuildRequires: go-md2man BuildRequires: gpgme-devel @@ -72,7 +71,6 @@ mv vendor src export GOPATH=$(pwd)/_build:$(pwd):%{gopath} make all GIT_COMMIT=%{shortcommit} - %install export GOPATH=$(pwd)/_build:$(pwd):%{gopath} make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions @@ -90,6 +88,13 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Sat Dec 23 2017 Dan Walsh 0.10-1 +- Display Config and Manifest as strings +- Bump containers/image +- Use configured registries to resolve image names +- Update to work with newer image library +- Add --chown option to add/copy commands + * Sat Dec 2 2017 Dan Walsh 0.9-1 - Allow push to use the image id - Make sure builtin volumes have the correct label diff --git a/sources b/sources index fb74c8b..2deb0f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-04ea079.tar.gz) = fc91d16ef5b223788c08d2888ce2aeb9c7a630c8407c2661b4f6ab3c923edcccdfb612cef0d18b390bd848c5e3578eb5258e8292ce11aa8c0949285a4dd72d1e +SHA512 (buildah-979c945.tar.gz) = 23aba089a0d7c30d344e75aa2894b252d4327240df3c329912fc46e613b3454b637ac5c118d1a15ec7c109fce9d364a1ab57f9ce6426e61efd2c3510d2809054 From 06332accdef49e31c8bbc090acde73ab483bbc7b Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 26 Dec 2017 07:22:59 -0500 Subject: [PATCH 19/25] Fix checkin --- buildah.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/buildah.spec b/buildah.spec index df9abbf..1533aec 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 979c9456744396fe27914d28063fb66dec896744 +%global commit 129fb109d55496c8c3b8889ce15ea76e439c697a %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah Version: 0.10 -Release: 1.git%{shortcommit}%{?dist} +Release: 2.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -35,7 +35,9 @@ Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcomm ExclusiveArch: x86_64 aarch64 ppc64le s390x # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} +BuildRequires: git BuildRequires: glib2-devel +BuildRequires: ostree-devel BuildRequires: glibc-static BuildRequires: go-md2man BuildRequires: gpgme-devel @@ -57,7 +59,7 @@ or * delete a working container or an image %prep -%setup -q -n %{name}-%{commit} +%autosetup -Sgit -n %{name}-%{commit} %build mkdir _build @@ -88,6 +90,9 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Tue Dec 26 2017 Dan Walsh 0.10-2 +- Fix checkin + * Sat Dec 23 2017 Dan Walsh 0.10-1 - Display Config and Manifest as strings - Bump containers/image From 5472a439c7c5c5848bf00fe9193311fa9569e7b4 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 26 Dec 2017 07:25:12 -0500 Subject: [PATCH 20/25] Fix checkin --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ab833b2..c90c563 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /buildah-bf40000.tar.gz /buildah-04ea079.tar.gz /buildah-979c945.tar.gz +/buildah-129fb10.tar.gz diff --git a/sources b/sources index 2deb0f1..df13e5d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-979c945.tar.gz) = 23aba089a0d7c30d344e75aa2894b252d4327240df3c329912fc46e613b3454b637ac5c118d1a15ec7c109fce9d364a1ab57f9ce6426e61efd2c3510d2809054 +SHA512 (buildah-129fb10.tar.gz) = f66bcda7400c3d5141ac5c919088637a41baadcf0a55fb1fcc9a1af72dbb7887f9f3f81c47d2db3047da885f6e5b9dd65da56a46393d5551cb4d492071a22bfd From a86b4b2ba338ec6defe623face4aa389d2128545 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 17 Jan 2018 08:46:25 -0500 Subject: [PATCH 21/25] Add --all to remove containers Add --all functionality to rmi Show ctrid when doing rm -all Ignore sequential duplicate layers when reading v2s1 Lots of minor bug fixes Vendor in latest containers/image and containers/storage --- .gitignore | 1 + buildah.spec | 14 +++++++++++--- sources | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c90c563..3ac58b7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /buildah-04ea079.tar.gz /buildah-979c945.tar.gz /buildah-129fb10.tar.gz +/buildah-6bad262.tar.gz diff --git a/buildah.spec b/buildah.spec index 1533aec..3d52da1 100644 --- a/buildah.spec +++ b/buildah.spec @@ -21,12 +21,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 129fb109d55496c8c3b8889ce15ea76e439c697a +%global commit 6bad262ff123ef15f3fcdb26d1c53a037f973a2d %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: buildah -Version: 0.10 -Release: 2.git%{shortcommit}%{?dist} +Version: 0.11 +Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -90,6 +90,14 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/buildah %changelog +* Tue Jan 16 2018 Dan Walsh 0.11-1 +- Add --all to remove containers +- Add --all functionality to rmi +- Show ctrid when doing rm -all +- Ignore sequential duplicate layers when reading v2s1 +- Lots of minor bug fixes +- Vendor in latest containers/image and containers/storage + * Tue Dec 26 2017 Dan Walsh 0.10-2 - Fix checkin diff --git a/sources b/sources index df13e5d..df525a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-129fb10.tar.gz) = f66bcda7400c3d5141ac5c919088637a41baadcf0a55fb1fcc9a1af72dbb7887f9f3f81c47d2db3047da885f6e5b9dd65da56a46393d5551cb4d492071a22bfd +SHA512 (buildah-6bad262.tar.gz) = 4f919788c363a5b3aaac795b9303546de7c88edb09f730420239ca127b52e57aec8513578bdfef06d6dc4398d23408d91b56d19b42ee8b7b31a67cd2d39290f9 From 91dd8b78bfd729e49f9bb1e3d68de8c74d521752 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 5 Feb 2018 17:23:05 -0500 Subject: [PATCH 22/25] buildah-0.11-2 - Resolves: upstream gh#432 - enable debuginfo for non-fedora packages Signed-off-by: Lokesh Mandvekar --- buildah.spec | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/buildah.spec b/buildah.spec index 3d52da1..d0f0427 100644 --- a/buildah.spec +++ b/buildah.spec @@ -1,12 +1,5 @@ -%if 0%{?fedora} || 0%{?rhel} == 6 -%global with_bundled 1 %global with_debug 1 -%global with_check 1 -%else -%global with_bundled 0 -%global with_debug 0 -%global with_check 0 -%endif +%global with_bundled 1 %if 0%{?with_debug} %global _dwz_low_mem_die_limit 0 @@ -24,9 +17,9 @@ %global commit 6bad262ff123ef15f3fcdb26d1c53a037f973a2d %global shortcommit %(c=%{commit}; echo ${c:0:7}) -Name: buildah +Name: %{repo} Version: 0.11 -Release: 1.git%{shortcommit}%{?dist} +Release: 2.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -44,13 +37,14 @@ BuildRequires: gpgme-devel BuildRequires: device-mapper-devel BuildRequires: btrfs-progs-devel BuildRequires: libassuan-devel -Requires: runc >= 1.0.0-7 +Requires: runc >= 1.0.0-17 Requires: skopeo-containers >= 0.1.20-2 Requires: container-selinux +Requires: ostree Provides: %{repo} = %{version}-%{release} %description -The buildah package provides a command line tool which can be used to +The %{name} package provides a command line tool which can be used to * create a working container from scratch or * create a working container from an image as a starting point @@ -84,12 +78,16 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %license LICENSE %doc README.md %{_bindir}/%{name} -%{_mandir}/man1/buildah* +%{_mandir}/man1/%{name}* %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/buildah +%{_datadir}/bash-completion/completions/%{name} %changelog +* Mon Feb 05 2018 Lokesh Mandvekar - 0.11-2 +- Resolves: upstream gh#432 +- enable debuginfo for non-fedora packages + * Tue Jan 16 2018 Dan Walsh 0.11-1 - Add --all to remove containers - Add --all functionality to rmi From 832249deda94e4f4d13a7de0a105d3bd91f88b00 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 12 Feb 2018 12:15:22 -0500 Subject: [PATCH 23/25] Added handing for simpler error message for Unknown Dockerfile instructions. Change default certs directory to /etc/containers/certs.dir Vendor in latest containers/image Vendor in latest containers/storage build-using-dockerfile: set the 'author' field for MAINTAINER Return exit code 1 when buildah-rmi fails Trim the image reference to just its name before calling getImageName Touch up rmi -f usage statement Add --format and --filter to buildah containers Add --prune,-p option to rmi command Add authfile param to commit Fix --runtime-flag for buildah run and bud format should override quiet for images Allow all auth params to work with bud Do not overwrite directory permissions on --chown Unescape HTML characters output into the terminal Fix: setting the container name to the image Prompt for un/pwd if not supplied with --creds Make bud be really quiet Return a better error message when failed to resolve an image Update auth tests and fix bud man page --- buildah.spec | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/buildah.spec b/buildah.spec index d0f0427..0c6799f 100644 --- a/buildah.spec +++ b/buildah.spec @@ -14,12 +14,12 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 6bad262ff123ef15f3fcdb26d1c53a037f973a2d +%global commit 8badcc2d0229fde5ef3597c1066576fe8a638e7d %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: %{repo} -Version: 0.11 -Release: 2.git%{shortcommit}%{?dist} +Version: 0.12 +Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} @@ -84,6 +84,32 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/%{name} %changelog +* Mon Feb 12 2018 Dan Walsh 0.12-1 +- Added handing for simpler error message for Unknown Dockerfile instructions. +- Change default certs directory to /etc/containers/certs.dir +- Vendor in latest containers/image +- Vendor in latest containers/storage +- build-using-dockerfile: set the 'author' field for MAINTAINER +- Return exit code 1 when buildah-rmi fails +- Trim the image reference to just its name before calling getImageName +- Touch up rmi -f usage statement +- Add --format and --filter to buildah containers +- Add --prune,-p option to rmi command +- Add authfile param to commit +- Fix --runtime-flag for buildah run and bud +- format should override quiet for images +- Allow all auth params to work with bud +- Do not overwrite directory permissions on --chown +- Unescape HTML characters output into the terminal +- Fix: setting the container name to the image +- Prompt for un/pwd if not supplied with --creds +- Make bud be really quiet +- Return a better error message when failed to resolve an image +- Update auth tests and fix bud man page + +* Wed Feb 07 2018 Fedora Release Engineering - 0.11-3.git6bad262 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Feb 05 2018 Lokesh Mandvekar - 0.11-2 - Resolves: upstream gh#432 - enable debuginfo for non-fedora packages From e2d8cbfd026149b38b963b6234d9c752b2ed85cd Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 12 Feb 2018 13:59:50 -0500 Subject: [PATCH 24/25] Added handing for simpler error message for Unknown Dockerfile instructions. Change default certs directory to /etc/containers/certs.dir Vendor in latest containers/image Vendor in latest containers/storage build-using-dockerfile: set the 'author' field for MAINTAINER Return exit code 1 when buildah-rmi fails Trim the image reference to just its name before calling getImageName Touch up rmi -f usage statement Add --format and --filter to buildah containers Add --prune,-p option to rmi command Add authfile param to commit Fix --runtime-flag for buildah run and bud format should override quiet for images Allow all auth params to work with bud Do not overwrite directory permissions on --chown Unescape HTML characters output into the terminal Fix: setting the container name to the image Prompt for un/pwd if not supplied with --creds Make bud be really quiet Return a better error message when failed to resolve an image Update auth tests and fix bud man page --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3ac58b7..0dcaa0e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /buildah-979c945.tar.gz /buildah-129fb10.tar.gz /buildah-6bad262.tar.gz +/buildah-8badcc2.tar.gz diff --git a/sources b/sources index df525a0..3689a4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-6bad262.tar.gz) = 4f919788c363a5b3aaac795b9303546de7c88edb09f730420239ca127b52e57aec8513578bdfef06d6dc4398d23408d91b56d19b42ee8b7b31a67cd2d39290f9 +SHA512 (buildah-8badcc2.tar.gz) = 81aa700d95c5f90d76facea82a3f5b650b7b3102cec87f8ac61f72867529d47b1c4b39df2f7d7b9f603954b6063e4cb456fa4a33e9c148282667e0038549e237 From 4e9e753c18c1581e07efc8168d509802f96d82c2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 27 Feb 2018 05:01:08 -0800 Subject: [PATCH 25/25] Fix handling of buildah run command options --- .gitignore | 2 ++ buildah.spec | 37 ++++++++++++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0dcaa0e..4b94a4b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ /buildah-129fb10.tar.gz /buildah-6bad262.tar.gz /buildah-8badcc2.tar.gz +/buildah-ef0ca9c.tar.gz +/buildah-d1330a5.tar.gz diff --git a/buildah.spec b/buildah.spec index 0c6799f..09fc1ea 100644 --- a/buildah.spec +++ b/buildah.spec @@ -14,22 +14,23 @@ # https://github.com/projectatomic/buildah %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 8badcc2d0229fde5ef3597c1066576fe8a638e7d +%global commit d1330a5c4680dd18e1d58015f94cb3530c248eb9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: %{repo} -Version: 0.12 +Version: 0.15 Release: 1.git%{shortcommit}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{provider_prefix} Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -ExclusiveArch: x86_64 aarch64 ppc64le s390x +ExclusiveArch: x86_64 %{arm} aarch64 ppc64le s390x # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: git BuildRequires: glib2-devel +BuildRequires: libseccomp-devel BuildRequires: ostree-devel BuildRequires: glibc-static BuildRequires: go-md2man @@ -84,6 +85,36 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions %{_datadir}/bash-completion/completions/%{name} %changelog +* Tue Feb 27 2018 Dan Walsh 0.15-1 +- Fix handling of buildah run command options + +* Mon Feb 26 2018 Dan Walsh 0.14-1 +- If commonOpts do not exist, we should return rather then segfault +- Display full error string instead of just status +- Implement --volume and --shm-size for bud and from +- Fix secrets patch for buildah bud +- Fixes the naming issue of blobs and config for the dir transport by removing the .tar extension + +* Sun Feb 25 2018 Peter Robinson 0.13-2 +- Build on ARMv7 too (Fedora supports containers on that arch too) + +* Thu Feb 22 2018 Dan Walsh 0.13-1 +- Vendor in latest containers/storage +- This fixes a large SELinux bug. +- run: do not open /etc/hosts if not needed +- Add the following flags to buildah bud and from + --add-host + --cgroup-parent + --cpu-period + --cpu-quota + --cpu-shares + --cpuset-cpus + --cpuset-mems + --memory + --memory-swap + --security-opt + --ulimit + * Mon Feb 12 2018 Dan Walsh 0.12-1 - Added handing for simpler error message for Unknown Dockerfile instructions. - Change default certs directory to /etc/containers/certs.dir diff --git a/sources b/sources index 3689a4a..7387fed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (buildah-8badcc2.tar.gz) = 81aa700d95c5f90d76facea82a3f5b650b7b3102cec87f8ac61f72867529d47b1c4b39df2f7d7b9f603954b6063e4cb456fa4a33e9c148282667e0038549e237 +SHA512 (buildah-d1330a5.tar.gz) = ec9fde97d29c39bc73bb52afaa68656468fb2325a08bb064137a2d00e1a63fa5f7e881df78de526533b4f56f900322c78940cdbcc317ade4a36464ebd2494fd5