Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/
Date: Fri, 30 Sep 2022 04:19:01
Message-Id: 1664511522.b23366c1e34cd6c65ca1aa439d7a98a8c5dfd8cc.sam@gentoo
1 commit: b23366c1e34cd6c65ca1aa439d7a98a8c5dfd8cc
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 30 04:15:58 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 30 04:18:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b23366c1
7
8 net-fs/samba: add talloc/tdb/tevent version checker
9
10 Nabbed Ionen's sed from wine-proton etc.
11
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 net-fs/samba/samba-4.16.5-r1.ebuild | 35 ++++++++++++++++++++++++++++++++---
15 1 file changed, 32 insertions(+), 3 deletions(-)
16
17 diff --git a/net-fs/samba/samba-4.16.5-r1.ebuild b/net-fs/samba/samba-4.16.5-r1.ebuild
18 index b14d8de3be2c..4ece5b887999 100644
19 --- a/net-fs/samba/samba-4.16.5-r1.ebuild
20 +++ b/net-fs/samba/samba-4.16.5-r1.ebuild
21 @@ -55,6 +55,10 @@ MULTILIB_WRAPPED_HEADERS=(
22 /usr/include/samba-4.0/ctdb_version.h
23 )
24
25 +TALLOC_VERSION="2.3.3"
26 +TDB_VERSION="1.4.6"
27 +TEVENT_VERSION="0.11.0"
28 +
29 COMMON_DEPEND="
30 >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
31 dev-lang/perl:=
32 @@ -71,9 +75,9 @@ COMMON_DEPEND="
33 sys-libs/liburing:=[${MULTILIB_USEDEP}]
34 sys-libs/ncurses:=
35 sys-libs/readline:=
36 - >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
37 - >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
38 - >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
39 + >=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
40 + >=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
41 + >=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
42 sys-libs/zlib[${MULTILIB_USEDEP}]
43 virtual/libcrypt:=[${MULTILIB_USEDEP}]
44 virtual/libiconv
45 @@ -166,9 +170,34 @@ pkg_setup() {
46 fi
47 }
48
49 +check_samba_dep_versions() {
50 + actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
51 + if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
52 + eerror "Source talloc version: ${TALLOC_VERSION}"
53 + eerror "Ebuild talloc version: ${actual_talloc_version}"
54 + die "Ebuild needs to fix TALLOC_VERSION!"
55 + fi
56 +
57 + actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
58 + if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
59 + eerror "Source tdb version: ${TDB_VERSION}"
60 + eerror "Ebuild tdb version: ${actual_tdb_version}"
61 + die "Ebuild needs to fix TDB_VERSION!"
62 + fi
63 +
64 + actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
65 + if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
66 + eerror "Source tevent version: ${TEVENT_VERSION}"
67 + eerror "Ebuild tevent version: ${actual_tevent_version}"
68 + die "Ebuild needs to fix TEVENT_VERSION!"
69 + fi
70 +}
71 +
72 src_prepare() {
73 default
74
75 + check_samba_dep_versions
76 +
77 # Unbundle dnspython
78 sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die