Skip to content

Commit b1fbbb0

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
ci: Version update for Fedora reproducible build
Closes #7902. Changelog-None.
1 parent 1bf92c2 commit b1fbbb0

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
fail-fast: false # Let each build finish.
6161
matrix:
6262
target:
63-
- 'bin-Fedora-28-amd64'
63+
- 'bin-Fedora'
6464
- 'bin-Ubuntu-focal'
6565
- 'bin-Ubuntu-jammy'
6666
- 'bin-Ubuntu-noble'

doc/contribute-to-core-lightning/release-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Here's a checklist for the release process.
117117
8. Push the tag to the remote repository `git push --tags`.
118118
9. Create a new release draft for `v<VERSION>.<POINT_VERSION>` on GitHub, ensuring to check the `Set as a pre-release` option.
119119
10. Execute the script contrib/cl-repro.sh for the [Builder image setup](https://docs.corelightning.org/docs/repro#builder-image-setup). This will generate the builder images `cl-repro-<codename>` needed for the next step.
120-
11. Run the following script to prepare the required builds `tools/build-release.sh bin-Fedora-28-amd64 bin-Ubuntu sign`.
120+
11. Run the following script to prepare the required builds `tools/build-release.sh bin-Fedora bin-Ubuntu sign`.
121121
12. Upload the reproducible builds along with `SHA256SUMS` and `SHA256SUMS.asc` files from the release folder to the newly drafted release.
122122
13. Share the `SHA256SUMS` and `SHA256SUMS.asc` files with the team for verification and signing.
123123
14. Append the signatures received from the team to the `SHA256SUMS.asc` file. Verify the file using `gpg --verify SHA256SUMS.asc`. Then re-upload the file.

doc/getting-started/advanced-setup/repro.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The release captain is in charge of creating the manifest, whereas contributors
124124
## Script build-release
125125
1: Pull latest code from master
126126

127-
2: Run the `tools/build-release.sh bin-Fedora-28-amd64 bin-Ubuntu sign` script. This will create a release directory, build binaries for Fedora, and build binaries for Ubuntu (Focal, Jammy, and Noble). Finally, it will sign the ZIP, Fedora, and Ubuntu builds.
127+
2: Run the `tools/build-release.sh bin-Fedora bin-Ubuntu sign` script. This will create a release directory, build binaries for Fedora, and build binaries for Ubuntu (Focal, Jammy, and Noble). Finally, it will sign the ZIP, Fedora, and Ubuntu builds.
128128

129129
## Manual
130130
The release captain creates the manifest as follows:
@@ -199,10 +199,12 @@ sha256sum -c SHA256SUMS
199199
Producing output similar to the following:
200200

201201
```shell
202-
sha256sum: clightning-v0.9.0-Fedora-28-amd64.tar.gz: No such file or directory
203-
clightning-v0.9.0-Fedora-28-amd64.tar.gz: FAILED open or read
204-
clightning-v0.9.0-Ubuntu-18.04.tar.xz: OK
205-
clightning-v0.9.0.zip: OK
202+
sha256sum: clightning-v24.11-Fedora-35-amd64.tar.gz: No such file or directory
203+
clightning-v24.11-Fedora-35-amd64.tar.gz: FAILED open or read
204+
clightning-v24.11-Ubuntu-20.04.tar.xz: OK
205+
clightning-v24.11-Ubuntu-22.04.tar.xz: OK
206+
clightning-v24.11-Ubuntu-24.04.tar.xz: OK
207+
clightning-v24.11.zip: OK
206208
sha256sum: WARNING: 1 listed file could not be read
207209
```
208210

tools/build-release.sh

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ if [ "$1" = "--inside-docker" ]; then
66
echo "Inside docker: starting build"
77
VER="$2"
88
PLTFM="$3"
9+
PLTFMVER="$4"
10+
ARCH="$5"
11+
git config --global --add safe.directory /src/.git
912
git clone /src /build
1013
cd /build || exit
1114
poetry export --without-hashes > /tmp/requirements.txt
1215
python3 -m pip install -r /tmp/requirements.txt
1316
./configure
1417
make VERSION="$VER"
15-
make install DESTDIR=/"$VER-$PLTFM" RUST_PROFILE=release
16-
cd /"$VER-$PLTFM" && tar cvfz /release/clightning-"$VER-$PLTFM".tar.gz -- *
18+
make install DESTDIR=/"$VER-$PLTFM-$PLTFMVER-$ARCH" RUST_PROFILE=release
19+
cd /"$VER-$PLTFM-$PLTFMVER-$ARCH" && tar cvfz /release/clightning-"$VER-$PLTFM-$PLTFMVER-$ARCH".tar.gz -- *
1720
echo "Inside docker: build finished"
1821
exit 0
1922
fi
@@ -22,8 +25,8 @@ FORCE_UNCLEAN=false
2225
VERIFY_RELEASE=false
2326
WITHOUT_ZIP=false
2427

25-
ALL_TARGETS="bin-Fedora-28-amd64 bin-Ubuntu docker sign"
26-
# ALL_TARGETS="bin-Fedora-28-amd64 bin-Ubuntu tarball deb docker sign"
28+
ALL_TARGETS="bin-Fedora bin-Ubuntu docker sign"
29+
# ALL_TARGETS="bin-Fedora bin-Ubuntu tarball deb docker sign"
2730

2831
for arg; do
2932
case "$arg" in
@@ -46,7 +49,7 @@ for arg; do
4649
echo "Usage: [--force-version=<ver>] [--force-unclean] [--force-mtime=YYYY-MM-DD] [--verify] [TARGETS]"
4750
echo Known targets: "$ALL_TARGETS"
4851
echo "Example: tools/build-release.sh"
49-
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 bin-Fedora-28-amd64 bin-Ubuntu sign"
52+
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 bin-Fedora bin-Ubuntu sign"
5053
echo "Example: tools/build-release.sh --verify"
5154
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 --verify"
5255
echo "Example: tools/build-release.sh docker"
@@ -151,13 +154,15 @@ for target in $TARGETS; do
151154
platform=${target#bin-}
152155
[ "$platform" != "$target" ] || continue
153156
case $platform in
154-
Fedora-28-amd64)
157+
Fedora*)
155158
echo "Building Fedora Image"
156-
DOCKERFILE=contrib/docker/Dockerfile.builder.fedora
159+
ARCH=amd64
157160
TAG=fedora
161+
DOCKERFILE=contrib/docker/Dockerfile.builder.fedora
162+
FEDORA_VERSION=$(grep -oP '^FROM fedora:\K[0-9]+' "$DOCKERFILE")
158163
docker build -f $DOCKERFILE -t $TAG --load .
159-
docker run --rm=true -v "$(pwd)":/src:ro -v "$RELEASEDIR":/release $TAG /src/tools/build-release.sh --inside-docker "$VERSION" "$platform"
160-
docker run --rm=true -w /build $TAG rm -rf /"$VERSION-$platform" /build
164+
docker run --rm=true -v "$(pwd)":/src:ro -v "$RELEASEDIR":/release $TAG /src/tools/build-release.sh --inside-docker "$VERSION" "$platform" "$FEDORA_VERSION" "$ARCH"
165+
docker run --rm=true -w /build $TAG rm -rf /"$VERSION-$platform-$FEDORA_VERSION-$ARCH" /build
161166
echo "Fedora Image Built"
162167
;;
163168
Ubuntu*)
@@ -226,8 +231,8 @@ if [ "$VERIFY_RELEASE" = "true" ]; then
226231
# it gives a direct hint which specific checksums don't match if so.
227232
sha256sum --check --ignore-missing "${sumfile}"
228233
# Creating SHA256SUMS, except Fedora (copy that from theirs)
229-
grep 'Fedora-28-amd64' "$sumfile" > SHA256SUMS
230-
sha256sum clightning-"$VERSION"* | grep -v 'bin-Fedora-28-amd64' >> SHA256SUMS
234+
grep 'Fedora-' "$sumfile" > SHA256SUMS
235+
sha256sum clightning-"$VERSION"* | grep -v 'Fedora' >> SHA256SUMS
231236
# compare our and release captain's SHA256SUMS contents
232237
if cmp -s SHA256SUMS "$sumfile"; then
233238
echo "SHA256SUMS are Identical"

0 commit comments

Comments
 (0)