17d40d4
%if 0%{?fedora} || 0%{?rhel} == 6
17d40d4
%global with_bundled 1
17d40d4
%global with_debug 1
17d40d4
%global with_check 1
17d40d4
%else
17d40d4
%global with_bundled 0
17d40d4
%global with_debug 0
17d40d4
%global with_check 0
17d40d4
%endif
17d40d4
17d40d4
%if 0%{?with_debug}
17d40d4
%global _dwz_low_mem_die_limit 0
17d40d4
%else
17d40d4
%global debug_package   %{nil}
17d40d4
%endif
17d40d4
17d40d4
%global provider        github
17d40d4
%global provider_tld    com
17d40d4
%global project         projectatomic
17d40d4
%global repo            buildah
17d40d4
# https://github.com/projectatomic/buildah
17d40d4
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
17d40d4
%global import_path     %{provider_prefix}
f801f18
%global commit         9cbccf88cfc1f6e205af30f7e048eab0949468ad
17d40d4
%global shortcommit    %(c=%{commit}; echo ${c:0:7})
17d40d4
17d40d4
Name:           buildah
f801f18
Version:        0.4
f801f18
Release:        1.git%{shortcommit}%{?dist}
bf99a97
Summary:        A command line tool used for creating OCI Images
17d40d4
License:        ASL 2.0
17d40d4
URL:            https://%{provider_prefix}
17d40d4
Source:         https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
17d40d4
f801f18
ExclusiveArch:  x86_64 aarch64 ppc64le s390x
17d40d4
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
17d40d4
BuildRequires:  %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
17d40d4
BuildRequires:  git
17d40d4
BuildRequires:  glib2-devel
c391644
BuildRequires:  ostree-devel
17d40d4
BuildRequires:  glibc-static
17d40d4
BuildRequires:  go-md2man
17d40d4
BuildRequires:  gpgme-devel
17d40d4
BuildRequires:  device-mapper-devel
17d40d4
BuildRequires:  btrfs-progs-devel
17d40d4
BuildRequires:  libassuan-devel
965eddc
Requires:       runc >= 1.0.0-7
965eddc
Requires:       skopeo-containers >= 0.1.20-2
17d40d4
Provides:       %{repo} = %{version}-%{release}
17d40d4
17d40d4
%description
17d40d4
The buildah package provides a command line tool which can be used to
17d40d4
* create a working container from scratch
17d40d4
or
17d40d4
* create a working container from an image as a starting point
17d40d4
* mount/umount a working container's root file system for manipulation
17d40d4
* save container's root file system layer to create a new image
17d40d4
* delete a working container or an image
17d40d4
17d40d4
%prep
17d40d4
%autosetup -Sgit -n %{name}-%{commit}
17d40d4
17d40d4
%build
17d40d4
mkdir _build
17d40d4
pushd _build
17d40d4
mkdir -p src/%{provider}.%{provider_tld}/%{project}
17d40d4
ln -s $(dirs +1 -l) src/%{import_path}
17d40d4
popd
17d40d4
17d40d4
mv vendor src
17d40d4
17d40d4
export GOPATH=$(pwd)/_build:$(pwd):%{gopath}
17d40d4
make all
17d40d4
17d40d4
17d40d4
%install
17d40d4
export GOPATH=$(pwd)/_build:$(pwd):%{gopath}
17d40d4
make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions
17d40d4
17d40d4
#define license tag if not already defined
17d40d4
%{!?_licensedir:%global license %doc}
17d40d4
17d40d4
%files
17d40d4
%license LICENSE
17d40d4
%doc README.md
17d40d4
%{_bindir}/%{name}
17d40d4
%{_mandir}/man1/buildah*
17d40d4
%dir %{_datadir}/bash-completion
17d40d4
%dir %{_datadir}/bash-completion/completions
17d40d4
%{_datadir}/bash-completion/completions/buildah
17d40d4
17d40d4
%changelog
f801f18
* Fri Sep 22 2017 Dan Walsh <dwalsh@redhat.com> 0.4-1.git9cbccf88c
f801f18
-   Add default transport to push if not provided
f801f18
-   Avoid trying to print a nil ImageReference
f801f18
-   Add authentication to commit and push
f801f18
-   Add information on buildah from man page on transports
f801f18
-   Remove --transport flag
f801f18
-   Run: do not complain about missing volume locations
f801f18
-   Add credentials to buildah from
f801f18
-   Remove export command
f801f18
-   Run(): create the right working directory
f801f18
-   Improve "from" behavior with unnamed references
f801f18
-   Avoid parsing image metadata for dates and layers
f801f18
-   Read the image's creation date from public API
f801f18
-   Bump containers/storage and containers/image
f801f18
-   Don't panic if an image's ID can't be parsed
f801f18
-   Turn on --enable-gc when running gometalinter
f801f18
-   rmi: handle truncated image IDs
f801f18
f801f18
* Tue Aug 15 2017 Josh Boyer <jwboyer@redhat.com> - 0.3-5.gitb9b2a8a
f801f18
- Build for s390x as well
f801f18
f801f18
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-4.gitb9b2a8a
f801f18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f801f18
f801f18
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-3.gitb9b2a8a
f801f18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f801f18
5949e5b
* Thu Jul 20 2017 Dan Walsh <dwalsh@redhat.com> 0.3-2.gitb9b2a8a7e
1ab0d93
- Bump for inclusion of OCI 1.0 Runtime and Image Spec
1ab0d93
bf99a97
* Tue Jul 18 2017 Dan Walsh <dwalsh@redhat.com> 0.2.0-1.gitac2aad6
bf99a97
-   buildah run: Add support for -- ending options parsing 
bf99a97
-   buildah Add/Copy support for glob syntax
bf99a97
-   buildah commit: Add flag to remove containers on commit
bf99a97
-   buildah push: Improve man page and help information
bf99a97
-   buildah run: add a way to disable PTY allocation
bf99a97
-   Buildah docs: clarify --runtime-flag of run command
bf99a97
-   Update to match newer storage and image-spec APIs
bf99a97
-   Update containers/storage and containers/image versions
bf99a97
-   buildah export: add support
bf99a97
-   buildah images: update commands
bf99a97
-   buildah images: Add JSON output option
bf99a97
-   buildah rmi: update commands
bf99a97
-   buildah containers: Add JSON output option
bf99a97
-   buildah version: add command
bf99a97
-   buildah run: Handle run without an explicit command correctly
bf99a97
-   Ensure volume points get created, and with perms
bf99a97
-   buildah containers: Add a -a/--all option
bf99a97
965eddc
* Wed Jun 14 2017 Dan Walsh <dwalsh@redhat.com> 0.1.0-2.git597d2ab9
965eddc
- Release Candidate 1
965eddc
- All features have now been implemented.
965eddc
17d40d4
* Fri Apr 14 2017 Dan Walsh <dwalsh@redhat.com> 0.0.1-1.git7a0a5333
17d40d4
- First package for Fedora