Blob Blame History Raw
%if 0%{?fedora} || 0%{?rhel} == 6
%global with_bundled 1
%global with_debug 1
%global with_check 1
%global with_bundled 0
%global with_debug 0
%global with_check 0

%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%global debug_package   %{nil}

%global provider        github
%global provider_tld    com
%global project         projectatomic
%global repo            buildah
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path     %{provider_prefix}
%global commit         597d2ab9fa41b2db8ce0c6d8be05edb462d3b31d
%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 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
# 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:  glibc-static
BuildRequires:  go-md2man
BuildRequires:  gpgme-devel
BuildRequires:  device-mapper-devel
BuildRequires:  btrfs-progs-devel
BuildRequires:  libassuan-devel
Requires:       runc >= 1.0.0-7
Requires:       skopeo-containers >= 0.1.20-2
Provides:       %{repo} = %{version}-%{release}

The buildah package provides a command line tool which can be used to
* create a working container from scratch
* create a working container from an image as a starting point
* mount/umount a working container's root file system for manipulation
* save container's root file system layer to create a new image
* delete a working container or an image

%autosetup -Sgit -n %{name}-%{commit}

mkdir _build
pushd _build
mkdir -p src/%{provider}.%{provider_tld}/%{project}
ln -s $(dirs +1 -l) src/%{import_path}

mv vendor src

export GOPATH=$(pwd)/_build:$(pwd):%{gopath}
make all

export GOPATH=$(pwd)/_build:$(pwd):%{gopath}
make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install.completions

#define license tag if not already defined
%{!?_licensedir:%global license %doc}

%license LICENSE
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions

* 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