Skip to content

Commit

Permalink
Suggestions (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Mar 1, 2024
1 parent c0d0878 commit a29cabd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Expand Up @@ -6,15 +6,19 @@ LABEL org.opencontainers.image.authors="Donghee Na"
LABEL org.opencontainers.image.title="autoconf 2.72 container for CPython"
LABEL org.opencontainers.image.description="Container image with autoconf 2.72 tools to regenerate Python's configure script."

RUN apk upgrade
RUN apk add autoconf automake autoconf-archive libtool pkgconfig alpine-sdk
RUN wget https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz
RUN tar -zxvf autoconf-2.72.tar.gz
RUN apk upgrade && \
apk add \
alpine-sdk \
autoconf \
automake \
autoconf-archive \
libtool \
pkgconfig
RUN curl https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz | tar -zxvf -
RUN cd autoconf-2.72 && ./configure && make && make install
RUN autoconf -V | grep -q "autoconf (GNU Autoconf) 2.72"

VOLUME /src
WORKDIR /src

ADD entry.sh /
CMD ["/entry.sh"]
CMD ["/entry.sh"]
17 changes: 11 additions & 6 deletions README.md
@@ -1,17 +1,22 @@
# cpython_autoconf
- Container image with autotools to regenerate Python's configure script.
# CPython Autoconf

- Container image with GNU Autotools to regenerate CPython's `configure` script.
- Fork from https://github.com/tiran/cpython_autoconf

## Fedora, CentOS and other SELinux-enabled systems with podman

```shell
$ cd cpython
$ podman run --rm --pull=always -v$(pwd):/src:Z ghcr.io/corona10/cpython_autoconf:271
$ podman run --rm --pull=always -v$(pwd):/src:Z ghcr.io/corona10/cpython_autoconf:272
```

## Arch, Debian, Gentoo, Ubuntu

```shell
$ cd cpython
$ podman run --rm --pull=always -v$(pwd):/src ghcr.io/corona10/cpython_autoconf:271
$ podman run --rm --pull=always -v$(pwd):/src ghcr.io/corona10/cpython_autoconf:272
```

## macOS and Windows

```shell
$ docker run --rm --pull=always -v.:/src ghcr.io/corona10/cpython_autoconf:272
```
10 changes: 6 additions & 4 deletions entry.sh
Expand Up @@ -13,7 +13,9 @@ if [ ! -e ${SENTINEL} ]; then
exit 2
fi

echo "Rebuilding configure script"
cd $SRC
autoreconf -ivf -Werror $@
echo "Done"
if [ "$#" = "0" ]; then
echo "Rebuilding configure script using $(autoconf --version | head -n 1)"
exec gosu autoreconf -ivf -Werror $@
fi

exec "$@"

0 comments on commit a29cabd

Please sign in to comment.