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