6b2cf0
%if 0%{?fedora} || 0%{?rhel} == 6
6b2cf0
%global with_bundled 1
6b2cf0
%global with_debug 1
6b2cf0
%global with_check 1
6b2cf0
%else
6b2cf0
%global with_bundled 0
6b2cf0
%global with_debug 0
6b2cf0
%global with_check 0
6b2cf0
%endif
6b2cf0
6b2cf0
%if 0%{?with_debug}
6b2cf0
%global _dwz_low_mem_die_limit 0
6b2cf0
%else
6b2cf0
%global debug_package   %{nil}
6b2cf0
%endif
6b2cf0
6b2cf0
%global provider        github
6b2cf0
%global provider_tld    com
6b2cf0
%global project         projectatomic
6b2cf0
%global repo            buildah
6b2cf0
# https://github.com/projectatomic/buildah
6b2cf0
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
6b2cf0
%global import_path     %{provider_prefix}
6b2cf0
%global commit         bf40000e72b351067ebae7b77d212a200f9ce051
6b2cf0
%global shortcommit    %(c=%{commit}; echo ${c:0:7})
6b2cf0
6b2cf0
Name:           buildah
6b2cf0
Version:        0.8
6b2cf0
Release:        1.git%{shortcommit}%{?dist}
6b2cf0
Summary:        A command line tool used for creating OCI Images
6b2cf0
License:        ASL 2.0
6b2cf0
URL:            https://%{provider_prefix}
6b2cf0
Source:         https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
6b2cf0
6b2cf0
ExclusiveArch:  x86_64 aarch64 ppc64le
6b2cf0
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
6b2cf0
BuildRequires:  %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
6b2cf0
BuildRequires:  git
6b2cf0
BuildRequires:  glib2-devel
6b2cf0
BuildRequires:  ostree-devel
6b2cf0
BuildRequires:  glibc-static
6b2cf0
BuildRequires:  go-md2man
6b2cf0
BuildRequires:  gpgme-devel
6b2cf0
BuildRequires:  device-mapper-devel
6b2cf0
BuildRequires:  btrfs-progs-devel
6b2cf0
BuildRequires:  libassuan-devel
6b2cf0
Requires:       runc >= 1.0.0-7
6b2cf0
Requires:       skopeo-containers >= 0.1.20-2
6b2cf0
Requires:       container-selinux
6b2cf0
Provides:       %{repo} = %{version}-%{release}
6b2cf0
6b2cf0
%description
6b2cf0
The buildah package provides a command line tool which can be used to
6b2cf0
* create a working container from scratch
6b2cf0
or
6b2cf0
* create a working container from an image as a starting point
6b2cf0
* mount/umount a working container's root file system for manipulation
6b2cf0
* save container's root file system layer to create a new image
6b2cf0
* delete a working container or an image
6b2cf0
6b2cf0
%prep
6b2cf0
%autosetup -Sgit -n %{name}-%{commit}
6b2cf0
6b2cf0
%build
6b2cf0
mkdir _build
6b2cf0
pushd _build
6b2cf0
mkdir -p src/%{provider}.%{provider_tld}/%{project}
6b2cf0
ln -s $(dirs +1 -l) src/%{import_path}
6b2cf0
popd
6b2cf0
6b2cf0
mv vendor src
6b2cf0
6b2cf0
export GOPATH=$(pwd)/_build:$(pwd):%{gopath}
6b2cf0
make all GIT_COMMIT=%{shortcommit}
6b2cf0
6b2cf0
6b2cf0
%install
6b2cf0
export GOPATH=$(pwd)/_build:$(pwd):%{gopath}
6b2cf0
make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions
6b2cf0
6b2cf0
#define license tag if not already defined
6b2cf0
%{!?_licensedir:%global license %doc}
6b2cf0
6b2cf0
%files
6b2cf0
%license LICENSE
6b2cf0
%doc README.md
6b2cf0
%{_bindir}/%{name}
6b2cf0
%{_mandir}/man1/buildah*
6b2cf0
%dir %{_datadir}/bash-completion
6b2cf0
%dir %{_datadir}/bash-completion/completions
6b2cf0
%{_datadir}/bash-completion/completions/buildah
6b2cf0
6b2cf0
%changelog
6b2cf0
* Wed Nov 22 2017 Dan Walsh <dwalsh@redhat.com> 0.8-1
6b2cf0
- Buildah bud was failing on SELinux machines, this fixes this
6b2cf0
- Block access to certain kernel file systems inside of the container
6b2cf0
6b2cf0
* Thu Nov 16 2017 Dan Walsh <dwalsh@redhat.com> 0.7-1
6b2cf0
- Ignore errors when trying to read containers buildah.json for loading SELinux reservations
6b2cf0
-     Use credentials from kpod login for buildah
6b2cf0
- Adds support for converting manifest types when using the dir transport
6b2cf0
- Rework how we do UID resolution in images
6b2cf0
- Bump github.com/vbatts/tar-split
6b2cf0
- Set option.terminal appropriately in run
6b2cf0
6b2cf0
* Thu Nov 16 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.5-5.gitf7dc659
6b2cf0
- revert building for s390x, it is intended for rhel 7.5
6b2cf0
6b2cf0
* Wed Nov 15 2017 Dan Walsh <dwalsh@redhat.com> 0.5-4
6b2cf0
- Add requires for container-selinux
6b2cf0
6b2cf0
* Mon Nov 13 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.5-3.gitf7dc659
6b2cf0
- build for s390x, https://bugzilla.redhat.com/show_bug.cgi?id=1482234
6b2cf0
6b2cf0
* Wed Nov 08 2017 Dan Walsh <dwalsh@redhat.com> 0.5-2
6b2cf0
-  Bump github.com/vbatts/tar-split
6b2cf0
-  Fixes CVE That could allow a container image to cause a DOS
6b2cf0
6b2cf0
* Tue Nov 07 2017 Dan Walsh <dwalsh@redhat.com> 0.5-1
6b2cf0
-  Add secrets patch to buildah
6b2cf0
-  Add proper SELinux labeling to buildah run
6b2cf0
-  Add tls-verify to bud command
6b2cf0
-  Make filtering by date use the image's date
6b2cf0
-  images: don't list unnamed images twice
6b2cf0
-  Fix timeout issue
6b2cf0
-  Add further tty verbiage to buildah run
6b2cf0
-  Make inspect try an image on failure if type not specified
6b2cf0
-  Add support for `buildah run --hostname`
6b2cf0
-  Tons of bug fixes and code cleanup
6b2cf0
6b2cf0
* Tue Nov  7 2017 Nalin Dahyabhai <nalin@redhat.com> - 0.4-2.git01db066
6b2cf0
- bump to latest version
6b2cf0
- set GIT_COMMIT at build-time
6b2cf0
6b2cf0
* Fri Sep 22 2017 Dan Walsh <dwalsh@redhat.com> 0.4-1.git9cbccf88c
6b2cf0
-   Add default transport to push if not provided
6b2cf0
-   Avoid trying to print a nil ImageReference
6b2cf0
-   Add authentication to commit and push
6b2cf0
-   Add information on buildah from man page on transports
6b2cf0
-   Remove --transport flag
6b2cf0
-   Run: do not complain about missing volume locations
6b2cf0
-   Add credentials to buildah from
6b2cf0
-   Remove export command
6b2cf0
-   Run(): create the right working directory
6b2cf0
-   Improve "from" behavior with unnamed references
6b2cf0
-   Avoid parsing image metadata for dates and layers
6b2cf0
-   Read the image's creation date from public API
6b2cf0
-   Bump containers/storage and containers/image
6b2cf0
-   Don't panic if an image's ID can't be parsed
6b2cf0
-   Turn on --enable-gc when running gometalinter
6b2cf0
-   rmi: handle truncated image IDs
6b2cf0
6b2cf0
* Fri Sep 22 2017 Lokesh Mandvekar <lsm5@redhat.com> - 0.4-1.git9cbccf8
6b2cf0
- bump to v0.4
6b2cf0
6b2cf0
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-4.gitb9b2a8a
6b2cf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
6b2cf0
6b2cf0
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-3.gitb9b2a8a
6b2cf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6b2cf0
6b2cf0
* Thu Jul 20 2017 Dan Walsh <dwalsh@redhat.com> 0.3-2.gitb9b2a8a7e
6b2cf0
- Bump for inclusion of OCI 1.0 Runtime and Image Spec
6b2cf0
6b2cf0
* Tue Jul 18 2017 Dan Walsh <dwalsh@redhat.com> 0.2.0-1.gitac2aad6
6b2cf0
-   buildah run: Add support for -- ending options parsing 
6b2cf0
-   buildah Add/Copy support for glob syntax
6b2cf0
-   buildah commit: Add flag to remove containers on commit
6b2cf0
-   buildah push: Improve man page and help information
6b2cf0
-   buildah run: add a way to disable PTY allocation
6b2cf0
-   Buildah docs: clarify --runtime-flag of run command
6b2cf0
-   Update to match newer storage and image-spec APIs
6b2cf0
-   Update containers/storage and containers/image versions
6b2cf0
-   buildah export: add support
6b2cf0
-   buildah images: update commands
6b2cf0
-   buildah images: Add JSON output option
6b2cf0
-   buildah rmi: update commands
6b2cf0
-   buildah containers: Add JSON output option
6b2cf0
-   buildah version: add command
6b2cf0
-   buildah run: Handle run without an explicit command correctly
6b2cf0
-   Ensure volume points get created, and with perms
6b2cf0
-   buildah containers: Add a -a/--all option
6b2cf0
6b2cf0
* Wed Jun 14 2017 Dan Walsh <dwalsh@redhat.com> 0.1.0-2.git597d2ab9
6b2cf0
- Release Candidate 1
6b2cf0
- All features have now been implemented.
6b2cf0
6b2cf0
* Fri Apr 14 2017 Dan Walsh <dwalsh@redhat.com> 0.0.1-1.git7a0a5333
6b2cf0
- First package for Fedora