Files
Valentin Rothberg 0f7d54b026 migrate Podman to containers/common/libimage
Migrate the Podman code base over to `common/libimage` which replaces
`libpod/image` and a lot of glue code entirely.

Note that I tried to leave bread crumbs for changed tests.

Miscellaneous changes:

 * Some errors yield different messages which required to alter some
   tests.

 * I fixed some pre-existing issues in the code.  Others were marked as
   `//TODO`s to prevent the PR from exploding.

 * The `NamesHistory` of an image is returned as is from the storage.
   Previously, we did some filtering which I think is undesirable.
   Instead we should return the data as stored in the storage.

 * Touched handlers use the ABI interfaces where possible.

 * Local image resolution: previously Podman would match "foo" on
   "myfoo".  This behaviour has been changed and Podman will now
   only match on repository boundaries such that "foo" would match
   "my/foo" but not "myfoo".  I consider the old behaviour to be a
   bug, at the very least an exotic corner case.

 * Futhermore, "foo:none" does *not* resolve to a local image "foo"
   without tag anymore.  It's a hill I am (almost) willing to die on.

 * `image prune` prints the IDs of pruned images.  Previously, in some
   cases, the names were printed instead.  The API clearly states ID,
   so we should stick to it.

 * Compat endpoint image removal with _force_ deletes the entire not
   only the specified tag.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-05 11:30:12 +02:00

64 lines
1.5 KiB
RPMSpec

#debuginfo not supported with Go
%global debug_package %{nil}
# modifying the Go binaries breaks the DWARF debugging
%global __os_install_post %{_rpmconfigdir}/brp-compress
%{!?commit: %global commit HEAD }
#
# Customize from here.
#
%global golang_version 1.8.1
%{!?version: %global version 1.2.2-dev}
%{!?release: %global release 1}
%global package_name imagebuilder
%global product_name Container Image Builder
%global import_path github.com/openshift/imagebuilder
Name: %{package_name}
Version: %{version}
Release: %{release}%{?dist}
Summary: Builds Dockerfile using the Docker client
License: ASL 2.0
URL: https://%{import_path}
Source0: https://%{import_path}/archive/%{commit}/%{name}-%{version}.tar.gz
BuildRequires: golang >= %{golang_version}
### AUTO-BUNDLED-GEN-ENTRY-POINT
%description
Builds Dockerfile using the Docker client
%prep
GOPATH=$RPM_BUILD_DIR/go
rm -rf $GOPATH
mkdir -p $GOPATH/{src/github.com/openshift,bin,pkg}
%setup -q -c -n imagebuilder
cd ..
mv imagebuilder $GOPATH/src/github.com/openshift/imagebuilder
ln -s $GOPATH/src/github.com/openshift/imagebuilder imagebuilder
%build
export GOPATH=$RPM_BUILD_DIR/go
cd $GOPATH/src/github.com/openshift/imagebuilder
go install ./cmd/imagebuilder
%install
install -d %{buildroot}%{_bindir}
install -p -m 755 $RPM_BUILD_DIR/go/bin/imagebuilder %{buildroot}%{_bindir}/imagebuilder
%files
%doc README.md
%license LICENSE
%{_bindir}/imagebuilder
%pre
%changelog