File tree 9 files changed +130
-160
lines changed
Filter options
9 files changed +130
-160
lines changed
Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ jobs:
120
120
121
121
check_generated_files :
122
122
name : ' Check if generated files are up to date'
123
- runs-on : ubuntu-latest
123
+ # Don't use ubuntu-latest but a specific version to make the job
124
+ # reproducible: to get the same tools versions (autoconf, aclocal, ...)
125
+ runs-on : ubuntu-22.04
124
126
timeout-minutes : 60
125
127
needs : check_source
126
128
if : needs.check_source.outputs.run_tests == 'true'
@@ -143,15 +145,16 @@ jobs:
143
145
- name : Check Autoconf and aclocal versions
144
146
run : |
145
147
grep "Generated by GNU Autoconf 2.71" configure
146
- grep "aclocal 1.16.4 " aclocal.m4
148
+ grep "aclocal 1.16.5 " aclocal.m4
147
149
grep -q "runstatedir" configure
148
150
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
149
151
- name : Configure CPython
150
152
run : |
151
153
# Build Python with the libpython dynamic library
152
154
./configure --config-cache --with-pydebug --enable-shared
153
- - name : Regenerate autoconf files with container image
154
- run : make regen-configure
155
+ - name : Regenerate autoconf files
156
+ # Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
157
+ run : autoreconf -ivf -Werror
155
158
- name : Build CPython
156
159
run : |
157
160
make -j4 regen-all
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
apt-get update
3
3
4
+ # autoconf-archive is needed by autoreconf (check_generated_files job)
4
5
apt-get -yq install \
5
6
build-essential \
6
7
pkg-config \
8
+ autoconf-archive \
7
9
ccache \
8
10
gdb \
9
11
lcov \
Original file line number Diff line number Diff line change @@ -74,14 +74,21 @@ files. Commands to regenerate all generated files::
74
74
The ``Makefile.pre.in `` file documents generated files, their inputs, and tools used
75
75
to regenerate them. Search for ``regen-* `` make targets.
76
76
77
- The ``make regen-configure `` command runs `tiran/cpython_autoconf
78
- <https://github.com/tiran/cpython_autoconf> `_ container for reproducible build;
79
- see container ``entry.sh `` script. The container is optional, the following
80
- command can be run locally, the generated files depend on autoconf and aclocal
81
- versions::
77
+ configure script
78
+ ----------------
79
+
80
+ The ``make regen-configure `` command regenerates the ``aclocal.m4 `` file and
81
+ the ``configure `` script using the ``Tools/build/regen-configure.sh `` shell
82
+ script which uses an Ubuntu container to get the same tools versions and have a
83
+ reproducible output.
84
+
85
+ The container is optional, the following command can be run locally::
82
86
83
87
autoreconf -ivf -Werror
84
88
89
+ The generated files can change depending on the exact ``autoconf-archive ``,
90
+ ``aclocal `` and ``pkg-config `` versions.
91
+
85
92
86
93
.. _configure-options :
87
94
Original file line number Diff line number Diff line change @@ -2642,15 +2642,9 @@ recheck:
2642
2642
autoconf:
2643
2643
(cd $(srcdir); autoreconf -ivf -Werror)
2644
2644
2645
- # See https://github.com/tiran/cpython_autoconf container
2646
2645
.PHONY: regen-configure
2647
2646
regen-configure:
2648
- @if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
2649
- if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
2650
- if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
2651
- CMD="$$RUNTIME run --rm --pull=always -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf:271"; \
2652
- echo $$CMD; \
2653
- $$CMD || exit $?
2647
+ $(srcdir)/Tools/build/regen-configure.sh
2654
2648
2655
2649
# Create a tags file for vi
2656
2650
tags::
Original file line number Diff line number Diff line change
1
+ Add ``Tools/build/regen-configure.sh `` script to regenerate the ``configure ``
2
+ with an Ubuntu container image. The ``quay.io/tiran/cpython_autoconf:271 ``
3
+ container image (`tiran/cpython_autoconf
4
+ -<https://github.com/tiran/cpython_autoconf> `_) is no longer used. Patch by
5
+ Victor Stinner.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e -x
4
+
5
+ # The check_generated_files job of .github/workflows/build.yml must kept in
6
+ # sync with this script.
7
+ IMAGE=" ubuntu:22.04"
8
+ DEPENDENCIES=" autotools-dev autoconf autoconf-archive pkg-config"
9
+ AUTORECONF=" autoreconf -ivf -Werror"
10
+
11
+ WORK_DIR=" /src"
12
+ SHELL_CMD=" apt-get update && apt-get -yq install $DEPENDENCIES && cd $WORK_DIR && $AUTORECONF "
13
+
14
+ abs_srcdir=$( cd $( dirname $0 ) /../..; pwd)
15
+
16
+ if podman --version & > /dev/null; then
17
+ RUNTIME=" podman"
18
+ elif docker --version & > /dev/null; then
19
+ RUNTIME=" docker"
20
+ else
21
+ echo " $@ needs either Podman or Docker container runtime." >&2
22
+ exit 1
23
+ fi
24
+
25
+ PATH_OPT=" "
26
+ if command -v selinuxenabled > /dev/null && selinuxenabled; then
27
+ PATH_OPT=" :Z"
28
+ fi
29
+
30
+ " $RUNTIME " run --rm -v " $abs_srcdir :$WORK_DIR$PATH_OPT " " $IMAGE " /usr/bin/bash -c " $SHELL_CMD "
You can’t perform that action at this time.
0 commit comments