Skip to content

Commit 4801da8

Browse files
liguriolocker
authored andcommitted
Check that patch has dependencies update
To disable the new check, one can add NO_DEPS_UPDATE tag to the commit message.
1 parent 28ee6ee commit 4801da8

6 files changed

Lines changed: 134 additions & 1 deletion

‎checkpatch.pl‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ sub hash_show_words {
500500
NO_CHANGELOG
501501
)};
502502

503+
our $custom_tags_no_reason = qr{(?x:
504+
NO_DEPS_UPDATE
505+
)};
506+
503507
our $github_ref = qr{(https?:\/\/)?(www\.)?github\.com\b([-a-zA-Z0-9()@:%_\+.~\#?&\/=]*)};
504508
our $github_issue_ref = qr{((tarantool\/\S+)?\#[1-9][0-9]*)};
505509

@@ -2156,6 +2160,8 @@ sub process {
21562160
my $new_file = 0;
21572161
my $has_doc = 0;
21582162
my $has_test = 0;
2163+
my $need_deps_update = 0;
2164+
my $has_deps_update = 0;
21592165
my $is_test = 0;
21602166

21612167
# Pre-scan the patch sanitizing the lines.
@@ -2747,7 +2753,8 @@ sub process {
27472753
}
27482754
}
27492755

2750-
if ($in_commit_log && $line =~ /^($custom_tags)=/) {
2756+
if ($in_commit_log && ($line =~ /^($custom_tags)=/ ||
2757+
$line =~ /^($custom_tags_no_reason)$/)) {
27512758
$commit_log_tags{$1} = 1;
27522759
if ($has_doc) {
27532760
ERROR("TAG_IN_DOC",
@@ -2767,6 +2774,12 @@ sub process {
27672774
if ($realfile =~ /^(?:static-build\/)?test\/.*\//) {
27682775
$has_test = 1;
27692776
}
2777+
if ($realfile =~ /^(?:third_party|cmake|CMakeLists\.txt)\//) {
2778+
$need_deps_update = 1;
2779+
}
2780+
if ($realfile =~ /^extra\/dependencies\.yaml/) {
2781+
$has_deps_update = 1;
2782+
}
27702783

27712784
$is_test = ($realfile =~ /^(?:test|perf)\//);
27722785

@@ -5293,6 +5306,11 @@ sub process {
52935306
ERROR("NO_TEST",
52945307
"Please add test or NO_TEST=<reason> tag\n");
52955308
}
5309+
if ($need_deps_update && !exists($commit_log_tags{'NO_DEPS_UPDATE'}) &&
5310+
!$has_deps_update) {
5311+
ERROR("NO_DEPS_UPDATE",
5312+
"Please update extra/dependencies.yaml or add NO_DEPS_UPDATE tag\n");
5313+
}
52965314
}
52975315

52985316
print report_dump();

‎doc/checkpatch.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,13 @@ Others
766766
If the patch doesn't need a test (e.g. it fixes a CI issue), please add
767767
NO_TEST=<reason> to the commit log.
768768

769+
**NO_DEPS_UPDATE**
770+
The patch updates files that may describe external dependencies of the
771+
project. If it does introduce a new build dependency or updates the version
772+
of an existing build dependency, please update extra/dependencies.yaml
773+
accordingly, otherwise add NO_DEPS_UPDATE to the commit log to suppress
774+
this warning.
775+
769776
**NOT_UNIFIED_DIFF**
770777
The patch file does not appear to be in unified-diff format. Please
771778
regenerate the patch file before sending it to the maintainer.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 5a069205996251713a3a87a4f996a9d7df152e71 Mon Sep 17 00:00:00 2001
2+
Message-ID: <5a069205996251713a3a87a4f996a9d7df152e71.1771339327.git.sergeyb@tarantool.org>
3+
In-Reply-To: <cover.1771339327.git.sergeyb@tarantool.org>
4+
References: <cover.1771339327.git.sergeyb@tarantool.org>
5+
From: Sergey Bronnikov <sergeyb@tarantool.org>
6+
Date: Tue, 17 Feb 2026 17:40:52 +0300
7+
Subject: [PATCH luajit 2/3] cmake: bump libiconv with dependencies.yaml
8+
To: tarantool-patches@dev.tarantool.org, Sergey Kaplun <skaplun@tarantool.org>, Maxim Kokryashkin <m.kokryashkin@tarantool.org>
9+
10+
Fixes #
11+
Closes #
12+
Needed for #
13+
See also #
14+
15+
NO_CHANGELOG=internal
16+
NO_DOC=internal
17+
NO_TEST=internal
18+
---
19+
cmake/BuildICONV.cmake | 2 +-
20+
extra/dependencies.yaml | 2 +-
21+
2 files changed, 2 insertions(+), 2 deletions(-)
22+
23+
diff --git a/cmake/BuildICONV.cmake b/cmake/BuildICONV.cmake
24+
index bd2ae84aeb..64df3b11d4 100644
25+
--- a/cmake/BuildICONV.cmake
26+
+++ b/cmake/BuildICONV.cmake
27+
@@ -1,4 +1,4 @@
28+
-set(ICONV_VERSION 1.18)
29+
+set(ICONV_VERSION 1.19)
30+
set(ICONV_HASH d718cd5a59438be666d1575855be72c3)
31+
set(ICONV_INSTALL_DIR ${BUNDLED_LIBS_INSTALL_DIR}/iconv-prefix)
32+
set(ICONV_INCLUDE_DIR ${ICONV_INSTALL_DIR}/include)
33+
diff --git a/extra/dependencies.yaml b/extra/dependencies.yaml
34+
index 5a254120d5..b33ee47f91 100644
35+
--- a/extra/dependencies.yaml
36+
+++ b/extra/dependencies.yaml
37+
@@ -11,7 +11,7 @@ dependencies:
38+
- libcurl:
39+
version: 461ce6c6160b86439ddd74c59541231ec9e8558e (curl-8_10_1-241-g461ce6c61)
40+
- libiconv:
41+
- version: 1.17
42+
+ version: 1.19
43+
- libicu:
44+
version: 71.1
45+
- libncurses:
46+
--
47+
2.43.0
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 6818e4872af491d7de4e364f183e7e24d8665799 Mon Sep 17 00:00:00 2001
2+
Message-ID: <6818e4872af491d7de4e364f183e7e24d8665799.1771339327.git.sergeyb@tarantool.org>
3+
In-Reply-To: <cover.1771339327.git.sergeyb@tarantool.org>
4+
References: <cover.1771339327.git.sergeyb@tarantool.org>
5+
From: Sergey Bronnikov <sergeyb@tarantool.org>
6+
Date: Tue, 17 Feb 2026 17:41:33 +0300
7+
Subject: [PATCH luajit 3/3] cmake: bump libiconv with tag
8+
To: tarantool-patches@dev.tarantool.org, Sergey Kaplun <skaplun@tarantool.org>, Maxim Kokryashkin <m.kokryashkin@tarantool.org>
9+
10+
NO_CHANGELOG=internal
11+
NO_DOC=internal
12+
NO_TEST=internal
13+
NO_DEPS_UPDATE
14+
---
15+
cmake/BuildICONV.cmake | 2 +-
16+
1 file changed, 1 insertion(+), 1 deletion(-)
17+
18+
diff --git a/cmake/BuildICONV.cmake b/cmake/BuildICONV.cmake
19+
index 64df3b11d4..fced50beb2 100644
20+
--- a/cmake/BuildICONV.cmake
21+
+++ b/cmake/BuildICONV.cmake
22+
@@ -1,4 +1,4 @@
23+
-set(ICONV_VERSION 1.19)
24+
+set(ICONV_VERSION 1.20)
25+
set(ICONV_HASH d718cd5a59438be666d1575855be72c3)
26+
set(ICONV_INSTALL_DIR ${BUNDLED_LIBS_INSTALL_DIR}/iconv-prefix)
27+
set(ICONV_INCLUDE_DIR ${ICONV_INSTALL_DIR}/include)
28+
--
29+
2.43.0
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From a94e1cb47943b508e94793570a3b760558cd89c5 Mon Sep 17 00:00:00 2001
2+
Message-ID: <a94e1cb47943b508e94793570a3b760558cd89c5.1771339327.git.sergeyb@tarantool.org>
3+
In-Reply-To: <cover.1771339327.git.sergeyb@tarantool.org>
4+
References: <cover.1771339327.git.sergeyb@tarantool.org>
5+
From: Sergey Bronnikov <sergeyb@tarantool.org>
6+
Date: Tue, 17 Feb 2026 17:39:34 +0300
7+
Subject: [PATCH luajit 1/3] cmake: bump libiconv wo tag
8+
To: tarantool-patches@dev.tarantool.org, Sergey Kaplun <skaplun@tarantool.org>, Maxim Kokryashkin <m.kokryashkin@tarantool.org>
9+
10+
NO_CHANGELOG=internal
11+
NO_DOC=internal
12+
NO_TEST=internal
13+
---
14+
cmake/BuildICONV.cmake | 2 +-
15+
1 file changed, 1 insertion(+), 1 deletion(-)
16+
17+
diff --git a/cmake/BuildICONV.cmake b/cmake/BuildICONV.cmake
18+
index 5a417aabe6..bd2ae84aeb 100644
19+
--- a/cmake/BuildICONV.cmake
20+
+++ b/cmake/BuildICONV.cmake
21+
@@ -1,4 +1,4 @@
22+
-set(ICONV_VERSION 1.17)
23+
+set(ICONV_VERSION 1.18)
24+
set(ICONV_HASH d718cd5a59438be666d1575855be72c3)
25+
set(ICONV_INSTALL_DIR ${BUNDLED_LIBS_INSTALL_DIR}/iconv-prefix)
26+
set(ICONV_INCLUDE_DIR ${ICONV_INSTALL_DIR}/include)
27+
--
28+
2.43.0
29+

‎test.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ run_test() {
2727

2828
run_test 0 "patches/test1.patch"
2929
run_test 0 "patches/test2.patch"
30+
run_test 0 "patches/NO_DEPS_UPDATE-cmake-bump-libiconv-with-dependencies.yaml.patch"
31+
run_test 0 "patches/NO_DEPS_UPDATE-cmake-bump-libiconv-with-tag.patch"
32+
run_test 1 "patches/NO_DEPS_UPDATE-cmake-bump-libiconv-wo-tag.patch"
3033

3134
exit $suite_status

0 commit comments

Comments
 (0)