Skip to content

Commit 1451121

Browse files
authored
Update from focal to jammy (#1520)
The Ubuntu deadsnakes PPA dropped support for Focal Fossa (20.04.6 LTS) on the 1st of October (see deadsnakes/py3.11@54c42ed). Therefore the current docker image can no longer be rebuilt. This PR updates the docker image as follows: * Update base image from focal to jammy * Update gcc from v7 to v10 * Update clang-format from v6 to v11
1 parent 717cc36 commit 1451121

File tree

6 files changed

+25
-23
lines changed

6 files changed

+25
-23
lines changed

.clang-format

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ PenaltyExcessCharacter: 1000000
9393
PenaltyReturnTypeOnItsOwnLine: 200
9494
PointerAlignment: Left
9595
RawStringFormats:
96-
- Delimiter: pb
96+
- Language: Cpp
97+
Delimiters:
98+
- pb
9799
Language: TextProto
98100
BasedOnStyle: google
99101
ReflowComments: true

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# This describes an image that should be able to generate libsbp bindings.
1212
# See the README.md for instructions on how to use it.
1313

14-
ARG UBUNTU_RELEASE=focal
14+
ARG UBUNTU_RELEASE=jammy
1515

1616
FROM ubuntu:${UBUNTU_RELEASE}
1717

@@ -23,8 +23,8 @@ ARG DEBIAN_FRONTEND=noninteractive
2323
ENV NODE_VERSION=v22.13.1
2424
ENV JAVA_VERSION=11.0.11.hs-adpt
2525
ENV GRADLE_VERSION=7.1.1
26-
ENV CC=gcc-7
27-
ENV CXX=g++-7
26+
ENV CC=gcc-10
27+
ENV CXX=g++-10
2828

2929
ENV RUSTUP_HOME=/rust
3030
ENV CARGO_HOME=/cargo
@@ -77,15 +77,15 @@ RUN \
7777
doxygen \
7878
graphviz \
7979
imagemagick \
80-
enchant \
81-
clang-format-6.0 \
80+
enchant-2 \
81+
clang-format-11 \
8282
python3 python3-dev python3-distutils \
8383
python3.9 python3.9-dev python3.9-distutils \
8484
python3.10 python3.10-dev python3.10-distutils \
8585
python3.11 python3.11-dev python3.11-distutils \
8686
dpkg-dev \
87-
cmake-data=3.16.3-1ubuntu1.20.04.1 \
88-
cmake=3.16.3-1ubuntu1.20.04.1 \
87+
cmake=3.22.1-1ubuntu1 \
88+
cmake-data=3.22.1-1ubuntu1 \
8989
libjson-perl \
9090
libdigest-crc-perl \
9191
&& curl -sSL https://get.haskellstack.org/ | sh \
@@ -131,9 +131,9 @@ RUN \
131131
# install perl runtime for kaitai struct
132132
RUN \
133133
cd /tmp \
134-
&& curl -LO https://github.com/kaitai-io/kaitai_struct_perl_runtime/archive/refs/tags/0.10.zip \
135-
&& unzip 0.10.zip \
136-
&& cd kaitai_struct_perl_runtime-0.10 \
134+
&& curl -LO https://github.com/kaitai-io/kaitai_struct_perl_runtime/archive/refs/tags/0.11.zip \
135+
&& unzip 0.11.zip \
136+
&& cd kaitai_struct_perl_runtime-0.11 \
137137
&& perl Makefile.PL \
138138
&& make install \
139139
&& rm -rf /tmp/*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ else
109109
endif
110110

111111
verify-prereq-c: verify-prereq-generator
112-
@command -v clang-format-6.0 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`clang-format-6.0\` but it's not installed. Aborting.\n\nHave you installed clang-format-6.0? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; }
112+
@command -v clang-format-11 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`clang-format-11\` but it's not installed. Aborting.\n\nHave you installed clang-format-11? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; }
113113
@command -v checkmk 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`checkmk\` but it's not installed. Aborting.\n\nHave you installed checkmk? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; }
114114
@command -v cmake 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`cmake\` but it's not installed. Aborting.\n\nHave you installed cmake? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; }
115115
@command -v pkg-config 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`pkg-config\` but it's not installed. Aborting.\n\nHave you installed pkg-config? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; }

c/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ with no dependencies other than the standard C libraries.
88

99
## Installation
1010

11-
On Debian-based systems (including Ubuntu 12.10 or later) you can get
11+
On Debian-based systems (including Ubuntu 22.04 or later) you can get
1212
dependencies with:
1313

1414
```shell
15-
sudo apt-get install build-essential pkg-config cmake doxygen check clang-format-6.0
15+
sudo apt-get install build-essential pkg-config cmake doxygen check clang-format-11
1616
```
1717

1818
On Mac:
1919

2020
```shell
21-
brew tap swift-nav/swift-devs
22-
brew install check cmake pkg-config doxygen clang-tools-6.0
21+
brew install check cmake pkg-config doxygen clang-format@11
2322
```
2423

2524
On other systems, you can obtain CMake from your operating system
@@ -57,6 +56,6 @@ https://github.com/swift-nav/sbp_tutorial.
5756

5857
## LICENSE
5958

60-
Copyright © 2015-2021 Swift Navigation
59+
Copyright © 2015-2025 Swift Navigation
6160

6261
Distributed under MIT.

c/scripts/clang-format.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
set -e -x
44
# This only reformats the generated headers and tests
55
# as it is introduced as part of fixing the docs,
6-
# and clang-format-6 would otherwise cause regressions
6+
# and clang-format-11 would otherwise cause regressions
77
# in the Google style of hand-written code.
88
GENERATED_HEADERS=$(grep -rl --include="*.h" "Automatically generated" include/libsbp/* src/)
99
GENERATED_C_SOURCES=$(grep -rl --include="*.c" "Automatically generated" src/)
10-
CLANG_FORMAT=clang-format-6.0
10+
CLANG_FORMAT=clang-format-11
1111
$CLANG_FORMAT -i $GENERATED_HEADERS $GENERATED_C_SOURCES test/*.c test/*.h test/auto* test/cpp/auto*
12-
13-
# clang-format-6 adds whitespace to blank lines inside comments
14-
sed -i.bak 's/^ *$//' $GENERATED_HEADERS
15-
rm ${GENERATED_HEADERS//.h/.h.bak}

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)