From 7bbc5eecb9c458dba03a274edccbd3710bc055b3 Mon Sep 17 00:00:00 2001 From: Para Dox Date: Sat, 14 Jun 2025 13:14:17 +0700 Subject: [PATCH] patch sonic (properly) --- fantom/sonic/fantom-mainnet-sonic-archive.yml | 2 ++ fantom/sonic/fantom-testnet-sonic-archive.yml | 2 ++ sonic/sonic.Dockerfile | 9 ++++++++- sonic/sonic/sonic-mainnet-sonic-archive.yml | 4 +++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/fantom/sonic/fantom-mainnet-sonic-archive.yml b/fantom/sonic/fantom-mainnet-sonic-archive.yml index 1fc3580e..e5e39443 100644 --- a/fantom/sonic/fantom-mainnet-sonic-archive.yml +++ b/fantom/sonic/fantom-mainnet-sonic-archive.yml @@ -36,6 +36,8 @@ services: args: VERSION: v1.2.1-h REPO: https://github.com/Fantom-foundation/sonic.git + COMMIT: '' + PATCH: '' sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/fantom/sonic/fantom-testnet-sonic-archive.yml b/fantom/sonic/fantom-testnet-sonic-archive.yml index ea906b93..7e035ffb 100644 --- a/fantom/sonic/fantom-testnet-sonic-archive.yml +++ b/fantom/sonic/fantom-testnet-sonic-archive.yml @@ -36,6 +36,8 @@ services: args: VERSION: v1.2.1-h REPO: https://github.com/Fantom-foundation/sonic.git + COMMIT: '' + PATCH: '' sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/sonic/sonic.Dockerfile b/sonic/sonic.Dockerfile index 65620362..feed295e 100644 --- a/sonic/sonic.Dockerfile +++ b/sonic/sonic.Dockerfile @@ -1,12 +1,19 @@ FROM golang:1.22 as builder ARG VERSION +ARG COMMIT ARG REPO ARG PATCH RUN apt-get update && apt-get install -y git musl-dev make -RUN cd /go && git clone ${REPO:-https://github.com/0xsoniclabs/sonic.git} sonic && cd sonic && git fetch --tags && git checkout -b ${VERSION} tags/${VERSION} +RUN cd /go && git clone ${REPO:-https://github.com/0xsoniclabs/sonic.git} sonic && cd sonic && git fetch --tags + +RUN if [ -n "$COMMIT" ]; then \ + git checkout -b ${VERSION} ${COMMIT}; \ + else \ + git checkout -b ${VERSION} tags/${VERSION}; \ + fi COPY ${PATCH:-empty.patch} /tmp/my-patch.patch diff --git a/sonic/sonic/sonic-mainnet-sonic-archive.yml b/sonic/sonic/sonic-mainnet-sonic-archive.yml index 691b79cd..0eb79959 100644 --- a/sonic/sonic/sonic-mainnet-sonic-archive.yml +++ b/sonic/sonic/sonic-mainnet-sonic-archive.yml @@ -34,8 +34,10 @@ services: context: ./sonic dockerfile: sonic.Dockerfile args: - VERSION: 86647c65d5c7d4ba3b52abd81f20d977a91408f1 + VERSION: v2.0.3 REPO: https://github.com/0xsoniclabs/sonic.git + COMMIT: 86647c65d5c7d4ba3b52abd81f20d977a91408f1 + PATCH: sonic.patch sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle