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}
0924860
%global commit         35afa1c1f4143130668eff755187bac1866a8704
17d40d4
%global shortcommit    %(c=%{commit}; echo ${c:0:7})
17d40d4
17d40d4
Name:           buildah
0924860
Version:        0.5
aee8505
Release:        1.git%{shortcommit}%{?dist}
12f6192
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
45f99c3
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
1065b72
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
0d91c04
Requires:       runc >= 1.0.0-7
0d91c04
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
0924860
* Tue Nov 07 2017 Dan Walsh <dwalsh@redhat.com> 0.5-1
0924860
-  Add secrets patch to buildah
0924860
-  Add proper SELinux labeling to buildah run
0924860
-  Add tls-verify to bud command
0924860
-  Make filtering by date use the image's date
0924860
-  images: don't list unnamed images twice
0924860
-  Fix timeout issue
0924860
-  Add further tty verbiage to buildah run
0924860
-  Make inspect try an image on failure if type not specified
0924860
-  Add support for `buildah run --hostname`
0924860
-  Tons of bug fixes and code cleanup
0924860
aee8505
* Fri Sep 22 2017 Dan Walsh <dwalsh@redhat.com> 0.4-1.git9cbccf88c
aee8505
-   Add default transport to push if not provided
aee8505
-   Avoid trying to print a nil ImageReference
aee8505
-   Add authentication to commit and push
aee8505
-   Add information on buildah from man page on transports
aee8505
-   Remove --transport flag
aee8505
-   Run: do not complain about missing volume locations
aee8505
-   Add credentials to buildah from
aee8505
-   Remove export command
aee8505
-   Run(): create the right working directory
aee8505
-   Improve "from" behavior with unnamed references
aee8505
-   Avoid parsing image metadata for dates and layers
aee8505
-   Read the image's creation date from public API
aee8505
-   Bump containers/storage and containers/image
aee8505
-   Don't panic if an image's ID can't be parsed
aee8505
-   Turn on --enable-gc when running gometalinter
aee8505
-   rmi: handle truncated image IDs
aee8505
aee8505
* Tue Aug 15 2017 Josh Boyer <jwboyer@redhat.com> - 0.3-5.gitb9b2a8a
45f99c3
- Build for s390x as well
45f99c3
aee8505
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-4.gitb9b2a8a
aee8505
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
aee8505
aee8505
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-3.gitb9b2a8a
aee8505
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
aee8505
1842787
* Thu Jul 20 2017 Dan Walsh <dwalsh@redhat.com> 0.3-2.gitb9b2a8a7e
8f07439
- Bump for inclusion of OCI 1.0 Runtime and Image Spec
8f07439
12f6192
* Tue Jul 18 2017 Dan Walsh <dwalsh@redhat.com> 0.2.0-1.gitac2aad6
12f6192
-   buildah run: Add support for -- ending options parsing 
12f6192
-   buildah Add/Copy support for glob syntax
12f6192
-   buildah commit: Add flag to remove containers on commit
12f6192
-   buildah push: Improve man page and help information
12f6192
-   buildah run: add a way to disable PTY allocation
12f6192
-   Buildah docs: clarify --runtime-flag of run command
12f6192
-   Update to match newer storage and image-spec APIs
12f6192
-   Update containers/storage and containers/image versions
12f6192
-   buildah export: add support
12f6192
-   buildah images: update commands
12f6192
-   buildah images: Add JSON output option
12f6192
-   buildah rmi: update commands
12f6192
-   buildah containers: Add JSON output option
12f6192
-   buildah version: add command
12f6192
-   buildah run: Handle run without an explicit command correctly
12f6192
-   Ensure volume points get created, and with perms
12f6192
-   buildah containers: Add a -a/--all option
12f6192
0d91c04
* Wed Jun 14 2017 Dan Walsh <dwalsh@redhat.com> 0.1.0-2.git597d2ab9
0d91c04
- Release Candidate 1
0d91c04
- All features have now been implemented.
0d91c04
17d40d4
* Fri Apr 14 2017 Dan Walsh <dwalsh@redhat.com> 0.0.1-1.git7a0a5333
17d40d4
- First package for Fedora