Build from Dockerfile fails on missing patch command
Bug reports:
Using latest version Building graph-tool from Dockerfile
Reproduce:
- Download the Dockerfile from https://git.skewed.de/count0/graph-tool/uploads/9344ed078248f1b0eaacac850eff1069/Dockerfile
- docker build
Expected: Docker image to be built successfully
Actual: Build process fails
Sending build context to Docker daemon 3.072kB
Step 1/22 : FROM base/archlinux:latest
---> 1c5491d5745d
Step 2/22 : MAINTAINER Tiago de Paula Peixoto <tiago@skewed.de>
---> Using cache
---> 04e0f3b454e6
Step 3/22 : RUN echo 'Server=https://archive.archlinux.org/repos/2018/06/28/$repo/os/$arch' > /etc/pacman.d/mirrorlist
---> Using cache
---> 59c8c03a33fd
Step 4/22 : RUN pacman-key --refresh-keys
---> Using cache
---> af6381d03fa0
Step 5/22 : RUN pacman -Suy --noconfirm
---> Using cache
---> 078ce374dd5f
Step 6/22 : RUN pacman -S binutils make gcc fakeroot --noconfirm --needed
---> Using cache
---> 823816a71224
Step 7/22 : RUN pacman -S expac yajl git --noconfirm --needed
---> Using cache
---> ec89efb1e05e
Step 8/22 : RUN pacman -S sudo grep file --noconfirm --needed
---> Using cache
---> ae6457707c8f
Step 9/22 : RUN pacman -S sudo boost python3 python3-scipy python-numpy cgal cairomm python-cairo sparsehash cairomm autoconf-archive pkg-config --noconfirm --needed
---> Using cache
---> e0be74e4e31e
Step 10/22 : ENV MAKEPKG_USER=mkpkg MAKEPKG_GROUP=mkpkg MAKEPKG_ROOT=/tmp/build
---> Using cache
---> 0d408711bff2
Step 11/22 : RUN groupadd "${MAKEPKG_USER}" && useradd -g "${MAKEPKG_GROUP}" "${MAKEPKG_USER}"
---> Using cache
---> a7e4c5b40dd3
Step 12/22 : RUN mkdir -p ${MAKEPKG_ROOT}; chown mkpkg:mkpkg ${MAKEPKG_ROOT}
---> Using cache
---> 61881f001a4f
Step 13/22 : WORKDIR ${MAKEPKG_ROOT}
---> Using cache
---> 1aa3e861fa89
Step 14/22 : USER ${MAKEPKG_USER}
---> Using cache
---> cea205d64abf
Step 15/22 : RUN curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=python-graph-tool
---> Using cache
---> 2bd10ae3478a
Step 16/22 : RUN makepkg PKGBUILD --needed CXXFLAGS="-mtune=generic -O3 -pipe -flto=4 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections"
---> Running in 9dcd81025806
==> Making package: python-graph-tool 2.27-1 (Fri Feb 1 13:37:28 2019)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading graph-tool-2.27.tar.bz2...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.2M 100 14.2M 0 0 1034k 0 0:00:14 0:00:14 --:--:-- 1767k
-> Downloading 0407f41a35b6be7c670927fb5dc578cbd0e88be4.diff...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1661 100 1661 0 0 260 0 0:00:06 0:00:06 --:--:-- 387
-> Downloading aa39e4a6b42d43fac30c841d176c75aff92cc01a.diff...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 714 100 714 0 0 118 0 0:00:06 0:00:06 --:--:-- 164
==> Validating source files with sha256sums...
graph-tool-2.27.tar.bz2 ... Passed
0407f41a35b6be7c670927fb5dc578cbd0e88be4.diff ... Passed
aa39e4a6b42d43fac30c841d176c75aff92cc01a.diff ... Passed
==> Extracting sources...
-> Extracting graph-tool-2.27.tar.bz2 with bsdtar
==> Starting prepare()...
/tmp/build/PKGBUILD: line 28: patch: command not found
==> ERROR: A failure occurred in prepare().
Aborting...
The command '/bin/sh -c makepkg PKGBUILD --needed CXXFLAGS="-mtune=generic -O3 -pipe -flto=4 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections"' returned a non-zero code: 4
Suggested solution: Install patch
RUN pacman -S sudo boost python3 python3-scipy python-numpy \
cgal cairomm python-cairo sparsehash cairomm \
autoconf-archive pkg-config patch --noconfirm --needed