Skip to content

Commit b0d07b4

Browse files
authored
Merge pull request #4741 from telefonicaid/overall-deps-upgrade
FIX upgrade dependencies
2 parents 40c4a43 + e6befec commit b0d07b4

File tree

45 files changed

+321
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+321
-294
lines changed

.github/workflows/codeql.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,26 @@ jobs:
8585
- if: matrix.build-mode == 'manual'
8686
shell: bash
8787
run: |
88-
# Ref: https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/admin/build_source.md#debian-12-officially-supported
88+
# Ref: https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/admin/build_source.md#debian-13-officially-supported
8989
# Ref: https://github.com/telefonicaid/fiware-orion/blob/master/docker/Dockerfile
9090
export ORION_SRC=$(pwd)
9191
# Install dependencies
9292
sudo apt-get update
9393
sudo apt-get install make cmake g++ libssl-dev libcurl4-openssl-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-thread-dev uuid-dev libgnutls28-dev libsasl2-dev libgcrypt-dev librdkafka-dev zlib1g-dev
9494
# Install libmicrohttpd from source
9595
cd /opt
96-
curl -kOL https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.1.tar.gz
97-
tar xvf libmicrohttpd-1.0.1.tar.gz
98-
cd libmicrohttpd-1.0.1
96+
curl -kOL https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.2.tar.gz
97+
tar xvf libmicrohttpd-1.0.2.tar.gz
98+
cd libmicrohttpd-1.0.2
9999
./configure --disable-messages --disable-postprocessor --disable-dauth
100100
make
101101
sudo make install
102102
sudo ldconfig
103103
# Install mosquitto from source
104104
cd /opt
105-
curl -kOL https://mosquitto.org/files/source/mosquitto-2.0.20.tar.gz
106-
tar xvf mosquitto-2.0.20.tar.gz
107-
cd mosquitto-2.0.20
105+
curl -kOL https://mosquitto.org/files/source/mosquitto-2.0.22.tar.gz
106+
tar xvf mosquitto-2.0.22.tar.gz
107+
cd mosquitto-2.0.22
108108
sed -i 's/WITH_CJSON:=yes/WITH_CJSON:=no/g' config.mk
109109
sed -i 's/WITH_STATIC_LIBRARIES:=no/WITH_STATIC_LIBRARIES:=yes/g' config.mk
110110
sed -i 's/WITH_SHARED_LIBRARIES:=yes/WITH_SHARED_LIBRARIES:=no/g' config.mk
@@ -113,12 +113,12 @@ jobs:
113113
sudo ldconfig
114114
# Install mongodb driver from source
115115
cd /opt
116-
curl -kOL https://github.com/mongodb/mongo-c-driver/releases/download/1.29.0/mongo-c-driver-1.29.0.tar.gz
117-
tar xfvz mongo-c-driver-1.29.0.tar.gz
118-
cd mongo-c-driver-1.29.0
116+
curl -kOL https://github.com/mongodb/mongo-c-driver/releases/download/2.2.1/mongo-c-driver-2.2.1.tar.gz
117+
tar xfvz mongo-c-driver-2.2.1.tar.gz
118+
cd mongo-c-driver-2.2.1
119119
mkdir cmake-build
120120
cd cmake-build
121-
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DMONGOC_TEST_USE_CRYPT_SHARED=FALSE ..
121+
cmake ..
122122
make
123123
sudo make install
124124
# Install rapidjson from source

CHANGES_NEXT_RELEASE

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
- Fix: kafkaCustom.headers support including the ability to override the default Fiware-Service and Fiware-ServicePath headers (#4726)
2-
- Add: `jexlExpression` field to subscription conditions (`subject.condition`) (#4555)
2+
- Add: `jexlExpression` field to subscription conditions (`subject.condition`) (#4555)
3+
- Hardening: upgrade microhttpd dependency from 1.0.1 to 1.0.2
4+
- Hardening: upgrade libmongoc dependency from 1.29.0 to 2.2.1
5+
- Hardening: upgrade libmosquitto dependency from 2.0.20 to 2.0.22
6+
- Upgrade Debian version from 12.10 to 13.3 in Dockerfile

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ SET (BOOST_MT
227227
)
228228

229229
# See http://mongoc.org/libmongoc/current/tutorial.html#cmake
230-
# This find_package() command provides the mongo::mongoc_static used in
231-
# SET for common static libs. We use 1.29.0 as reference version.
232-
find_package (mongoc-1.0 1.29.0 EXACT)
230+
# This find_package() command provides the mongo::mongoc used in
231+
# SET for common static libs. We use 2.2.1 as reference version.
232+
find_package (mongoc 2.2.1 EXACT)
233233

234234
# Is cjexl lib available?
235235
find_library (HAVE_CJEXL cjexl PATHS /usr/lib /usr/lib64 /usr/local/lib64 /usr/local/lib)
@@ -239,15 +239,15 @@ if (HAVE_CJEXL)
239239
microhttpd.a
240240
mosquitto.a
241241
${HAVE_CJEXL}
242-
mongo::mongoc_static
242+
mongoc::mongoc
243243
)
244244
else (HAVE_CJEXL)
245245
message("Not using cjexl")
246246
add_definitions(-DEXPR_BASIC)
247247
SET (COMMON_STATIC_LIBS
248248
microhttpd.a
249249
mosquitto.a
250-
mongo::mongoc_static
250+
mongoc::mongoc
251251
)
252252
endif (HAVE_CJEXL)
253253

@@ -285,8 +285,8 @@ include_directories("/usr/include")
285285

286286
# Needed for the new C driver
287287
include_directories("/usr/include/librdkafka")
288-
include_directories("/usr/local/include/libmongoc-1.0")
289-
include_directories("/usr/local/include/libbson-1.0")
288+
include_directories("/usr/local/include/bson-2.2.1")
289+
include_directories("/usr/local/include/mongoc-2.2.1")
290290

291291

292292
#

ci/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ docker run --network host -ti -v $(pwd):/opt/fiware-orion telefonicaiot/fiware-o
7777
Once have a bash shell, you can do the same execution:
7878

7979
```
80-
root@debian11:/opt# CB_NO_CACHE=ON FT_FROM_IX=1001 build -miqts functional
80+
root@debian:/opt# CB_NO_CACHE=ON FT_FROM_IX=1001 build -miqts functional
8181
```
8282

8383
Alternatively, you can run the `testHarness.sh` script directly (for instance, to execute a single test):
8484

8585
```
86-
root@debian11:/opt# . /opt/ft_env/bin/activate
87-
(ft_env) root@debian11:/opt# cd /opt/fiware-orion/test/functionalTest/
88-
(ft_env) root@debian11:/opt/fiware-orion/test/functionalTest# ./testHarness.sh cases/3541_subscription_max_fails_limit/mqtt_subscription_without_maxfailslimit_and_failscounter.test
86+
root@debian:/opt# . /opt/ft_env/bin/activate
87+
(ft_env) root@debian:/opt# cd /opt/fiware-orion/test/functionalTest/
88+
(ft_env) root@debian:/opt/fiware-orion/test/functionalTest# ./testHarness.sh cases/3541_subscription_max_fails_limit/mqtt_subscription_without_maxfailslimit_and_failscounter.test
8989
```
9090

9191
**NOTE:** the above procedure makes that Orion is compiled using root user. It is advisable to do a recursive owner

ci/deb/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:12.10-slim
1+
FROM debian:13.3-slim
22

33
ADD build.sh /opt/bin/
44
ADD build-dep.sh /opt/bin/

ci/deb/build-dep.sh

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ apt-get -y install \
4949
libsasl2-dev \
5050
libgcrypt-dev \
5151
librdkafka-dev \
52-
openjdk-17-jre-headless \
52+
openjdk-21-jre-headless \
5353
zlib1g-dev\
5454
libzstd-dev \
5555
liblz4-dev
@@ -68,27 +68,29 @@ echo "INSTALL: python special dependencies" \
6868
&& pip install Werkzeug==2.0.2 \
6969
&& pip install paho-mqtt==1.6.1 \
7070
&& pip install amqtt==0.11.0b1 \
71+
&& pip install setuptools==80.9.0 \
7172
&& pip install confluent-kafka==2.11.0 \
7273
&& deactivate
7374

74-
# Recommended setting for DENABLE_AUTOMATIC_INIT_AND_CLEANUP, to be removed in 2.0.0
75-
# see http://mongoc.org/libmongoc/current/init-cleanup.html#deprecated-feature-automatic-initialization-and-cleanup
7675
echo "INSTALL: mongodb c driver" \
77-
&& curl -L https://github.com/mongodb/mongo-c-driver/releases/download/1.29.0/mongo-c-driver-1.29.0.tar.gz | tar xzC /opt/ \
78-
&& cd /opt/mongo-c-driver-1.29.0 \
76+
&& curl -L https://github.com/mongodb/mongo-c-driver/releases/download/2.2.1/mongo-c-driver-2.2.1.tar.gz | tar xzC /opt/ \
77+
&& cd /opt/mongo-c-driver-2.2.1 \
7978
&& mkdir cmake-build \
8079
&& cd cmake-build \
81-
&& cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. \
80+
&& cmake .. \
8281
&& make \
8382
&& make install
8483

84+
# NOTE: the sed line comments a problematic line in /usr/local/include/rapidjson/document.h with GCC14++
85+
# (it should be solved by rapidjson, see https://github.com/Tencent/rapidjson/issues/2277)
8586
echo "INSTALL: rapidjson" \
8687
&& curl -L https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz | tar xzC /opt/ \
87-
&& mv /opt/rapidjson-1.1.0/include/rapidjson/ /usr/local/include
88+
&& mv /opt/rapidjson-1.1.0/include/rapidjson/ /usr/local/include \
89+
&& sed -i 's/^.*GenericStringRef& operator=(const GenericStringRef& rhs).*$/\/\/&/' /usr/local/include/rapidjson/document.h
8890

8991
echo "INSTALL: libmicrohttpd" \
90-
&& curl -L https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.1.tar.gz | tar xzC /opt/ \
91-
&& cd /opt/libmicrohttpd-1.0.1 \
92+
&& curl -L https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.2.tar.gz | tar xzC /opt/ \
93+
&& cd /opt/libmicrohttpd-1.0.2 \
9294
&& ./configure --disable-messages --disable-postprocessor --disable-dauth \
9395
&& make \
9496
&& make install
@@ -102,8 +104,8 @@ echo "INSTALL: gmock" \
102104
&& make install
103105

104106
echo "INSTALL: mosquitto" \
105-
&& curl -kL https://mosquitto.org/files/source/mosquitto-2.0.20.tar.gz | tar xzC /opt/ \
106-
&& cd /opt/mosquitto-2.0.20 \
107+
&& curl -kL https://mosquitto.org/files/source/mosquitto-2.0.22.tar.gz | tar xzC /opt/ \
108+
&& cd /opt/mosquitto-2.0.22 \
107109
&& sed -i 's/WITH_CJSON:=yes/WITH_CJSON:=no/g' config.mk \
108110
&& sed -i 's/WITH_STATIC_LIBRARIES:=no/WITH_STATIC_LIBRARIES:=yes/g' config.mk \
109111
&& sed -i 's/WITH_SHARED_LIBRARIES:=yes/WITH_SHARED_LIBRARIES:=no/g' config.mk \
@@ -119,8 +121,8 @@ echo "INSTALL: Kafka" \
119121
ldconfig
120122

121123
apt-get -y clean \
122-
&& rm -Rf /opt/mongo-c-driver-1.29.0 \
124+
&& rm -Rf /opt/mongo-c-driver-2.2.1 \
123125
&& rm -Rf /opt/rapidjson-1.1.0 \
124-
&& rm -Rf /opt/libmicrohttpd-1.0.1 \
125-
&& rm -Rf /opt/mosquitto-2.0.20 \
126+
&& rm -Rf /opt/libmicrohttpd-1.0.2 \
127+
&& rm -Rf /opt/mosquitto-2.0.22 \
126128
&& rm -Rf /opt/gmock-1.5.0

doc/manuals.jp/admin/build_source.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
# ソースからのビルド
22

3-
Orion Context Broker のリファレンス配布は Debian 12 です。これは、broker を他のディストリビューションに組み込むことができないことを意味しません (実際には可能です)。このセクションには、Debian を使用していない人に役立つ可能性があるため、他のディストリビューションに組み込む方法に関する指示が含まれる場合があります。ただし、"公式にサポートされている" 唯一の手順は Debian 12 用の手順です。
3+
Orion Context Broker のリファレンス配布は Debian 13 です。これは、broker を他のディストリビューションに組み込むことができないことを意味しません (実際には可能です)。このセクションには、Debian を使用していない人に役立つ可能性があるため、他のディストリビューションに組み込む方法に関する指示が含まれる場合があります。ただし、"公式にサポートされている" 唯一の手順は Debian 13 用の手順です。
44

55
公式以外のディストリビューションで Docker コンテナ・イメージをビルドする方法は、Docker ドキュメントの [3.1 非公式ディストリビューションでのビルド](../../../docker/README.jp.md#31-building-in-not-official-distributions)・セクションで確認できます。
66

77
*注:* このドキュメントで説明されているビルド プロセスには cjexl ライブラリは含まれていません。これは、基本的なビルド プロセスの観点からはオプションであると見なされているためです。
88

9-
## Debian 12 (正式サポート)
9+
## Debian 13 (正式サポート)
1010

1111
Orion Context Broker は、以下のライブラリをビルドの依存関係として使用します :
1212

13-
* boost: 1.74
14-
* libmicrohttpd: 1.0.1 (ソースから)
15-
* libcurl: 7.88.1
16-
* openssl: 3.0.15
17-
* libuuid: 2.38.1
18-
* libmosquitto: 2.0.20 (ソースから)
19-
* Mongo C driver: 1.29.0 (ソースから)
13+
* boost: 1.83
14+
* libmicrohttpd: 1.0.2 (ソースから)
15+
* libcurl: 8.14.1
16+
* openssl: 3.5.4
17+
* libuuid: 2.41
18+
* zlib1g 1:1.3.dfsg+really1.3.1-1+b1
19+
* librdkafka: 2.8.0
20+
* libmosquitto: 2.0.22 (ソースから)
21+
* Mongo C driver: 2.2.1 (ソースから)
2022
* rapidjson: 1.1.0 (ソースから)
2123
* gtest (`make unit_test` ビルディング・ターゲットのみ) : 1.5 (ソースから)
2224
* gmock (`make unit_test` ビルディング・ターゲットのみ) : 1.5 (ソースから)
@@ -33,12 +35,12 @@ Orion Context Broker は、以下のライブラリをビルドの依存関係
3335

3436
* ソースから Mongo Driver をインストールします
3537

36-
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.29.0/mongo-c-driver-1.29.0.tar.gz
37-
tar xfvz mongo-c-driver-1.29.0.tar.gz
38-
cd mongo-c-driver-1.29.0
38+
wget https://github.com/mongodb/mongo-c-driver/releases/download/2.2.1/mongo-c-driver-2.2.1.tar.gz
39+
tar xfvz mongo-c-driver-2.2.1.tar.gz
40+
cd mongo-c-driver-2.2.1
3941
mkdir cmake-build
4042
cd cmake-build
41-
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
43+
cmake ..
4244
make
4345
sudo make install
4446

@@ -47,22 +49,25 @@ Orion Context Broker は、以下のライブラリをビルドの依存関係
4749
wget https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz
4850
tar xfvz v1.1.0.tar.gz
4951
sudo mv rapidjson-1.1.0/include/rapidjson/ /usr/local/include
52+
# Next line is to comment a problematic line in document.h when GCC14+ is used
53+
# (it should be solved by rapidjson, see https://github.com/Tencent/rapidjson/issues/2277)
54+
sudo sed -i 's/^.*GenericStringRef& operator=(const GenericStringRef& rhs).*$/\/\/&/' /usr/local/include/rapidjson/document.h
5055

5156
* ソースから libmicrohttpd をインストールします (`./configure` 下のコマンドはライブラリの最小限のフットプリントを得るための推奨ビルド設定を示していますが、上級ユーザの方は好きなように設定できます)
5257

53-
wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.1.tar.gz
54-
tar xvf libmicrohttpd-1.0.1.tar.gz
55-
cd libmicrohttpd-1.0.1
58+
wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.2.tar.gz
59+
tar xvf libmicrohttpd-1.0.2.tar.gz
60+
cd libmicrohttpd-1.0.2
5661
./configure --disable-messages --disable-postprocessor --disable-dauth
5762
make
5863
sudo make install # installation puts .h files in /usr/local/include and library in /usr/local/lib
5964
sudo ldconfig # just in case... it doesn't hurt :)
6065

61-
* ソースから mosquitto をインストールします (WITH_CJSON, WITH_STATIC_LIBRARIES, WITH_SHARED_LIBRARIES の設定を変更することで、mosquitto-2.0.20/ の下の config.mk ファイルを変更してビルドを微調整できます)
66+
* ソースから mosquitto をインストールします (WITH_CJSON, WITH_STATIC_LIBRARIES, WITH_SHARED_LIBRARIES の設定を変更することで、mosquitto-2.0.22/ の下の config.mk ファイルを変更してビルドを微調整できます)
6267

63-
wget https://mosquitto.org/files/source/mosquitto-2.0.20.tar.gz
64-
tar xvf mosquitto-2.0.20.tar.gz
65-
cd mosquitto-2.0.20
68+
wget https://mosquitto.org/files/source/mosquitto-2.0.22.tar.gz
69+
tar xvf mosquitto-2.0.22.tar.gz
70+
cd mosquitto-2.0.22
6671
sed -i 's/WITH_CJSON:=yes/WITH_CJSON:=no/g' config.mk
6772
sed -i 's/WITH_STATIC_LIBRARIES:=no/WITH_STATIC_LIBRARIES:=yes/g' config.mk
6873
sed -i 's/WITH_SHARED_LIBRARIES:=yes/WITH_SHARED_LIBRARIES:=no/g' config.mk
@@ -98,7 +103,7 @@ Orion Context Broker には、次の手順に従って実行できる一連の
98103

99104
* ソースから GoogleTest/Mock をインストールします。以前の URL は http://googlemock.googlecode.com/files/gmock-1.5.0.tar.bz2 でしたが、Google は2016年8月下旬にそのパッケージを削除し、機能しなくなりました。
100105

101-
wget https://nexus.lab.fiware.org/repository/raw/public/storage/gmock-1.5.0.tar.bz2
106+
wget https://src.fedoraproject.org/repo/pkgs/gmock/gmock-1.5.0.tar.bz2/d738cfee341ad10ce0d7a0cc4209dd5e/gmock-1.5.0.tar.bz2
102107
tar xfvj gmock-1.5.0.tar.bz2
103108
cd gmock-1.5.0
104109
./configure
@@ -128,11 +133,11 @@ aarch64 アーキテクチャの場合、apt-get を使用して libxslt をイ
128133
. scripts/testEnv.sh
129134
python3 -m venv /opt/ft_env # or 'virtualenv /opt/ft_env --python=/usr/bin/python3' in some systems
130135
. /opt/ft_env/bin/activate
131-
pip install Flask==2.0.2 Werkzeug==2.0.2 paho-mqtt==1.6.1 amqtt==0.11.0b1 confluent-kafka==2.11.0
136+
pip install Flask==2.0.2 Werkzeug==2.0.2 paho-mqtt==1.6.1 amqtt==0.11.0b1 setuptools==80.9.0 confluent-kafka==2.11.0
132137

133138
* Kafkaクライアントをインストール (CLI).
134139

135-
sudo apt-get install openjdk-17-jre-headless
140+
sudo apt-get install openjdk-21-jre-headless
136141
wget https://downloads.apache.org/kafka/3.9.1/kafka_2.12-3.9.1.tgz
137142
tar xvf kafka_2.12-3.9.1.tgz
138143
# Add kafka_2.12-3.9.1/bin to your PATH (e.g. editing ~/.bashrc)

doc/manuals.jp/admin/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Docker hub で公式の Orion docker コンテナを使用してインストー
2626

2727
必要なソースから ビルドした Orion をインストールする場合:
2828

29-
* オペレーティングシステム: Debian。リファレンス・オペレーティングシステムは Debian 12.10 ですが、それ以降の
30-
Debian 12 バージョンでも動作するはずです
29+
* オペレーティングシステム: Debian。リファレンス・オペレーティングシステムは Debian 13.3 ですが、それ以降の
30+
Debian 13 バージョンでも動作するはずです
3131
* データベース: MongoDB は、Orion Context Broker がインストールされるのと同じホストで実行するか、ネットワーク経由で
3232
アクセスできる別のホストで実行する必要があります。推奨される MongoDB バージョンは 8.0 です (Orion は古いバージョンで
3333
動作する可能性がありますが、まったくお勧めしません!)

0 commit comments

Comments
 (0)