summaryrefslogtreecommitdiff
path: root/net-fs/samba
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/samba')
-rw-r--r--net-fs/samba/Manifest17
-rw-r--r--net-fs/samba/files/samba-4.16.1-netdb-defines.patch23
-rw-r--r--net-fs/samba/samba-4.14.12-r3.ebuild2
-rw-r--r--net-fs/samba/samba-4.14.13.ebuild4
-rw-r--r--net-fs/samba/samba-4.15.4-r3.ebuild2
-rw-r--r--net-fs/samba/samba-4.15.6-r1.ebuild2
-rw-r--r--net-fs/samba/samba-4.15.7.ebuild4
-rw-r--r--net-fs/samba/samba-4.16.0-r1.ebuild2
-rw-r--r--net-fs/samba/samba-4.16.1.ebuild3
-rw-r--r--net-fs/samba/samba-4.16.2.ebuild343
10 files changed, 386 insertions, 16 deletions
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index c2affbafe692..f7be7d94d7f2 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -1,6 +1,7 @@
AUX 4.4/samba4.confd 2035 BLAKE2B a9fa538a0b259c8a184012e0370819729e24fa971de52e3d3891107bd78e6d4e074a2df80b1c424c23229ce5e84ea1da908887c8fef88dd45104eb5c6eb0e4a5 SHA512 d6a7ae560621407b7a5f94db6489d6a85c5056f4212a2a9a24210eaeb585caf4f15801282d1b8682962c0cf5642766fe09cc70c48fffafd1560de615154503af
AUX 4.4/samba4.initd-r1 1112 BLAKE2B 91d28710ccd512e19307bfd5ba97710ca071b478696d8e933d90b385f0c958a493ab684436915630de2884383e24eb1c9955ebd2b526b0b8f30438d9204dcb57 SHA512 3bfa4c8e0d77994fbca25eb0e12617166909c4d6742d1800c73f5640a7c39ee760988a315d39ddf8a575097df3d3c6fe3f308e8ca1cd698018544a9060176f4e
AUX 4.4/system-auth-winbind.pam 590 BLAKE2B d8c0190dff88c5b65f7f01b3a84fd776194d3b4ce5c973bd1145e6a12750f01882b2873be03b537e9a68899c0a19fee7a4834385961090e4cb69dda7ae1763c0 SHA512 0886cfd99b3c3dc117b2a83b04bf59d080ebf77d6ea91f24cfc4d8be7af9db377e0efc2216e7c1f8a180b09fb425476ef6874180d9f0fa47e4889faf1d429679
+AUX samba-4.16.1-netdb-defines.patch 546 BLAKE2B eb42eb3429a221d700cc53381cda2a2dbff72cf43a0c3d5d8564d5e264a1ffaff15e3fd13f9647dd0a76e99323d656c07f26cf9c941f7407769c1a986c8c9025 SHA512 3802cf51d1dbcdf631ab4ffdc115ea58ad8d7bf1a23600e91eff2a70fcffb80161a3e87c360f7c961dae99c8f0267bf8f9feed739b388d012ece32bcf97c1dcf
AUX samba-4.4.0-pam.patch 895 BLAKE2B bdc0601527a932424d55946b2eeaa288420ce90a8fd9be2271709da5c113625e80ae3783975b725c515004382bea65336ef725241079081cec213e81cc6e3056 SHA512 5a00c6131c372fc1cc9e23e4a37314442bf9af8e420a040a7b20ec3d76a357959d456437ed13e2e17f938eb6dcb4e7c5d899ff3d670526b0a444f63e35d5262c
AUX samba.conf 88 BLAKE2B 5bf3391fdf31b284bfa68b904370776d2e5b14fe0ce5677b4982b54da379e504cf9a3c9563438ce262b9634140a1192ecf00f57a66da2e42d52c351ae9972d4e SHA512 b26251050e29571e6a567d8516aa0ea82fe7fdaa25726677b6cad20d0e25b9fec350d755d26c778855a1444d20852930a47c06340c213dac441375a2c424fdb2
DIST samba-4.14.12.tar.gz 19145135 BLAKE2B 94ffc6dee4448e302591bf30bc34f75c5cdeab8acaa04b2d1105a0f0155ba13d366e61f2d0b38060fccb841febcc212d8ab7b6dfd860d784ae9299a375cb98c3 SHA512 6a021d61dc2a8894c646a9b6d85e38c9020b3c227f10d1820cbdf2ad6793c0beeacedd5fff5f75718d4083ec9169cb1fb58f65636e1a50e638fcefce355690d9
@@ -10,11 +11,13 @@ DIST samba-4.15.6.tar.gz 19290189 BLAKE2B 14a8d3cf03de303cce54e5b336f5866f5d3ded
DIST samba-4.15.7.tar.gz 19290930 BLAKE2B 4a295f79d38212d4c6917ed61a22e4204b5ea3d5e26f30b65d1e7e81842e92405870dd40fd4d05ec1126a532bdb1ddea300848387a4c64370ba5c2c1354ee8e5 SHA512 beffb09b5bcd62991398d39c7a8aec5fed0c51d550e2f0fb42b2e0a09094f4c6a8f29adf708c4969db12329f5c7343d2debd04315107b79bef59e99a4a7e4ce4
DIST samba-4.16.0.tar.gz 30583390 BLAKE2B 6ea27634690d00779ec7f671e48b17246285c9576221d9b9b3f9238cd72310e8aaaeb646031212e65c239d2e959deef7bd9739932db0c716b7ea79cc11f2f7b8 SHA512 cea6bab64021779d217669e58612d192b907c2c481ef30e40e449bc6b8f8993a9b7b7b5bfcfebe54d8f70b8f720893cfa77a9d674ef8e07dd45a55a0fbc673e2
DIST samba-4.16.1.tar.gz 30590897 BLAKE2B 4e22b1a8bbef28116cad71c87da1aaaa39459d5eeb30e975aec6444369576ce716917d3ee89c0b328e457e2dcda17abe705d1f33d12b4205efcebdc54ba7f2fd SHA512 d82ab250e87cb64b083345b61da8c4edbb2185a13f8cef33232f823fd510822570ed27c7b260a1fefd3af3b2fc4b271257c2c3e6ab3241c8c147bebae6ab39fc
-EBUILD samba-4.14.12-r3.ebuild 10040 BLAKE2B c9ad850fafba81c0d61f3e8e2bf674e40c1b3695410f90fd62e8f5416319fdc48965b4efa81855c37b7303bbfcbe491ec065b41d13a06e07417bea2f3170a51d SHA512 667e5d67cbb195d1a6f6af14aaf9a8015f2983db53015addb6552c95e03d411e54a0c612fe0fe473ed6187a53cb2ea4e0ed93cebdfe06dc715ef848b8ba6130e
-EBUILD samba-4.14.13.ebuild 10048 BLAKE2B 2d98ae0c95466f5f4c5ac6983c84d8000076dc3181deeebec95afb3aa90ad813dc618a98700b4d25e6294b086905fd98806cb35de27f57622fb16bad77223782 SHA512 ae64e1813d29a03667b047a2f8e7d82b5cb03a3f9f7179f6a23c3845fc71e523533fd6f06591c0cb0e0fae288ead42796b5d4cd59d7072b6b0ab1eaa14a6ea8a
-EBUILD samba-4.15.4-r3.ebuild 9973 BLAKE2B 002258983c24a5fb644cc01d5bfe67012deb1122c5f3b12a76302849ed5515f75519393bad108d8684adcbd72be1d4a6c3c01c90af4ea0c9062db7182dbf255d SHA512 af2a22067b6eef8a312950c0e0ae8c9b73d166c80dce110fab1f2a5e3d58beecfde44a40b5c4f9fd30d10eca96e6f3051879c7edb399317603185ae4c99bdc30
-EBUILD samba-4.15.6-r1.ebuild 10031 BLAKE2B 21b8bcbb2072b42dab3a4f34c5fc4e6d6a0d7ea3311be5b1d2b0b62dea40916babc0a3dd32ce480129a4425e1898dcf8030b4989bd59762c7f4366e2c1edbe6e SHA512 40d3bfb3083991d95eb7823a7797824a83ee63d1d4d4d825e4642942265adf56eb6a5c75047e1838d1aafa1d66507d03ca0fdd888e08e22cb6540e9beddad3f9
-EBUILD samba-4.15.7.ebuild 10031 BLAKE2B 21b8bcbb2072b42dab3a4f34c5fc4e6d6a0d7ea3311be5b1d2b0b62dea40916babc0a3dd32ce480129a4425e1898dcf8030b4989bd59762c7f4366e2c1edbe6e SHA512 40d3bfb3083991d95eb7823a7797824a83ee63d1d4d4d825e4642942265adf56eb6a5c75047e1838d1aafa1d66507d03ca0fdd888e08e22cb6540e9beddad3f9
-EBUILD samba-4.16.0-r1.ebuild 10046 BLAKE2B 958b65611340a78714225088146d0f6cc170dbe1c6d143a1d3c8d5f4c840d8a068a7b51d2d884876a9d1808187ff8ce3d0ca01a4703325d008fd11a7a1651465 SHA512 1f5b52ce26b4bc158c760822f85e537ff6193439adcfe84b07e58ef9ccdc8f1ebf5c3ccce7b0b666cdf9c43920ff78a567597059ce69b0b849fad39f8680869c
-EBUILD samba-4.16.1.ebuild 10046 BLAKE2B 958b65611340a78714225088146d0f6cc170dbe1c6d143a1d3c8d5f4c840d8a068a7b51d2d884876a9d1808187ff8ce3d0ca01a4703325d008fd11a7a1651465 SHA512 1f5b52ce26b4bc158c760822f85e537ff6193439adcfe84b07e58ef9ccdc8f1ebf5c3ccce7b0b666cdf9c43920ff78a567597059ce69b0b849fad39f8680869c
+DIST samba-4.16.2.tar.gz 30597031 BLAKE2B d1268cb34ef951a47bd6cd8b76fa8576f3db2a4faca1fdae90f096f25d5e90e9eaca49c73f7952a6c8cf48a200247fb9957b230efb9ec725c29a1af16d8aa37e SHA512 ed85acca0f23f9166530b600ae569f3259c2122d15e361fd3fe48a82921cd53bbb459d6c102bb60cc40b2dd811cde1262a3fb17ed6015a260432bffe5af83366
+EBUILD samba-4.14.12-r3.ebuild 10031 BLAKE2B ef98c98e96c6bc442ae917f5ea98eac20ad8b47e5cf95d629c3c057885a5e0d2b15c57d435c792b2a4edc5d8e75a76a4b0903d08efab1b9832e8a324c23d1357 SHA512 e73d8c96e32582e5c7fb80dfa89f4c1506106e8dc9bdb07e17ab676c1d8c2a9b319e1f4e5d2cf76046dfc5b78868484fca5c32b1835ca06701e6719be754b635
+EBUILD samba-4.14.13.ebuild 10033 BLAKE2B 55deafc994a7646b1d11bc3e7281be3c1feb620f7ea3657a9e6054ea3a27c0fa598cc29a38dd5063816a410122b73e15cce413e8c82c38b7fd9b875c48fc2810 SHA512 b04663ab851610b7cc3b2354ef9cdd5e7cd88699fe940da9706000e9a7376328c6e192b4fab15df826cd581587e778d1ed7ed359e5358ffccdb59bf7fc59390b
+EBUILD samba-4.15.4-r3.ebuild 9964 BLAKE2B 33e95d71e3a5d3172fc8dae76807e198b2ef4100d32d5e8bee2964dd41b2a9f3396c3b9b9d2a93e75ec47b94365871c6005ceca35a153f42f5e143b8fe2c24aa SHA512 bacfa5b5a1c29f8eefaea6b5b31134ce8a0059b2365987453cf14994ae0122cca4e241445e600689072eab27ca1809347c0321515728da792a166aad37801fe1
+EBUILD samba-4.15.6-r1.ebuild 10022 BLAKE2B 0588e5c12f2c4d31bc8e34c50de2cc8894d7eb62df1d55f243f067e0938408fea6fa0cba01d47606ad132e560214a76f2771f2197318b2757c988255a18d0a3a SHA512 45f04624f8a88acbc4b3939d7192c38bc3e86495a4ce2e16095aeb66b7eda7ae68ff4f920fa50577cf27a16791edfa621497094f287c13bb758f5e0117bd9788
+EBUILD samba-4.15.7.ebuild 10016 BLAKE2B 1ef15a1dcc9b0e5b9b87778aba40664378167abf152b222f353e330e61d0720e23ea13c1c939bcf1d6af074b850dddf292343b2feafd8279e1228249ad2a66e5 SHA512 7a9990c63d6e4d2fc8f33f0a62c50700026353d5cc1ff99c65fa9abd8e768a541209c3ac6e3761db7caff70bccafd25e152262bf35d9efc5ceb3cba77eba11eb
+EBUILD samba-4.16.0-r1.ebuild 10037 BLAKE2B 8679d1dbc9fe6a550eecfb86fb32ab26297c9b02eccc8a36621bcc13be96c70450e25759d9ffb810f87a43b6768e2bdbc459a990bbf4fbc261ff5bee5bac2ddf SHA512 75ff78eae02920315c40d74d7348a5ff98d5d20abc463a615e572602d2daf6e61f6fa66fbd910933c883ca9e7731360441d1fe575b2643926dace994fb59a549
+EBUILD samba-4.16.1.ebuild 10085 BLAKE2B e652f81751b0e4971ba0f1850cdf6a629732b998f0a97a91f4a623a28a6ef1e67cb0d949144bd8e62f46cf1b970d62b4d5db73deec39420b68e0b913c71dbe4d SHA512 82f77c0504b778265c346347b1f9ca1955fbb436c23cb285985f0271013a221c121aba707eb055ec4215137d7a998356d8199fef100a811fe5a4156d2f1224ee
+EBUILD samba-4.16.2.ebuild 10058 BLAKE2B d371853ff17ad1cb56eceefb5bc1971ebedb92d35ac42232e7cd9c041ce43d5c1d6f2c5431a2420c3c52d779dc5a4edd1c8079d32cb6076a8ad3c343de14828f SHA512 6a9aea02a5500d8e2099a2eed9b170716b722fd2f9f22883521627e56aec818f9cc59dfba7ba3c069b913e61b2d2f2201daba3131ee00ba4c21e5fec5e5e222c
MISC metadata.xml 2061 BLAKE2B b6232fb0408426e595b8569a26aba4938e2e0edd61cf4d73650ee4eed48725ca3181c212003515ef573a95bd73659fe482d964e26fef3ff61a66e06f0566b600 SHA512 301d931501a67d7189881fb269c31f75790b99c3c6c74caea963507ca5a60e5ae39bfd97f8d7e2f3096ae71645c8d7abea36d70ae621017c72cb20c9ec51d2d8
diff --git a/net-fs/samba/files/samba-4.16.1-netdb-defines.patch b/net-fs/samba/files/samba-4.16.1-netdb-defines.patch
new file mode 100644
index 000000000000..b0f01e42acbb
--- /dev/null
+++ b/net-fs/samba/files/samba-4.16.1-netdb-defines.patch
@@ -0,0 +1,23 @@
+https://gitlab.com/samba-team/samba/-/merge_requests/1025
+
+# Define NETDB_INTERNAL and NETDB_SUCCESS if they are not defined
+#
+# Gentoo bug 832629 and 835017
+
+--- a/nsswitch/wins.c
++++ b/nsswitch/wins.c
+@@ -40,6 +40,14 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
+ #define INADDRSZ 4
+ #endif
+
++#ifndef NETDB_INTERNAL
++#define NETDB_INTERNAL -1
++#endif
++
++#ifndef NETDB_SUCCESS
++#define NETDB_SUCCESS 0
++#endif
++
+ _PUBLIC_ON_LINUX_
+ NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
+ struct hostent *he,
diff --git a/net-fs/samba/samba-4.14.12-r3.ebuild b/net-fs/samba/samba-4.14.12-r3.ebuild
index 596a27073a1f..fbb716f96f4d 100644
--- a/net-fs/samba/samba-4.14.12-r3.ebuild
+++ b/net-fs/samba/samba-4.14.12-r3.ebuild
@@ -250,7 +250,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.14.13.ebuild b/net-fs/samba/samba-4.14.13.ebuild
index 0b80891930e8..8e8b7156f29f 100644
--- a/net-fs/samba/samba-4.14.13.ebuild
+++ b/net-fs/samba/samba-4.14.13.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} = *_rc* ]]; then
SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
else
SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 ~riscv sparc x86"
fi
S="${WORKDIR}/${MY_P}"
@@ -250,7 +250,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.15.4-r3.ebuild b/net-fs/samba/samba-4.15.4-r3.ebuild
index bf1ff5956d07..117c8a7ef117 100644
--- a/net-fs/samba/samba-4.15.4-r3.ebuild
+++ b/net-fs/samba/samba-4.15.4-r3.ebuild
@@ -246,7 +246,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.15.6-r1.ebuild b/net-fs/samba/samba-4.15.6-r1.ebuild
index bfffbd68dc99..aa3c460800e1 100644
--- a/net-fs/samba/samba-4.15.6-r1.ebuild
+++ b/net-fs/samba/samba-4.15.6-r1.ebuild
@@ -246,7 +246,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- PYTHONHASHSEED=1 CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ PYTHONHASHSEED=1 CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.15.7.ebuild b/net-fs/samba/samba-4.15.7.ebuild
index bfffbd68dc99..c23859866f3c 100644
--- a/net-fs/samba/samba-4.15.7.ebuild
+++ b/net-fs/samba/samba-4.15.7.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} = *_rc* ]]; then
SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
else
SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 ~riscv sparc x86"
fi
S="${WORKDIR}/${MY_P}"
@@ -246,7 +246,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- PYTHONHASHSEED=1 CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ PYTHONHASHSEED=1 CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.16.0-r1.ebuild b/net-fs/samba/samba-4.16.0-r1.ebuild
index dfb87123595c..a7d3fa8bb5d3 100644
--- a/net-fs/samba/samba-4.16.0-r1.ebuild
+++ b/net-fs/samba/samba-4.16.0-r1.ebuild
@@ -247,7 +247,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- PYTHONHASHSEED=1 CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ PYTHONHASHSEED=1 CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.16.1.ebuild b/net-fs/samba/samba-4.16.1.ebuild
index dfb87123595c..8b16a80d66cb 100644
--- a/net-fs/samba/samba-4.16.1.ebuild
+++ b/net-fs/samba/samba-4.16.1.ebuild
@@ -141,6 +141,7 @@ BDEPEND="${PYTHON_DEPS}
PATCHES=(
"${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.16.1-netdb-defines.patch"
)
#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
@@ -247,7 +248,7 @@ multilib_src_configure() {
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
- PYTHONHASHSEED=1 CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ PYTHONHASHSEED=1 CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
waf-utils_src_configure ${myconf[@]}
}
diff --git a/net-fs/samba/samba-4.16.2.ebuild b/net-fs/samba/samba-4.16.2.ebuild
new file mode 100644
index 000000000000..090a59c32be1
--- /dev/null
+++ b/net-fs/samba/samba-4.16.2.ebuild
@@ -0,0 +1,343 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+),xml(+)"
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="https://samba.org/"
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+if [[ ${PV} = *_rc* ]]; then
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
+else
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug fam
+glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
+zeroconf"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ addc? ( python json winbind )
+ ads? ( acl ldap python winbind )
+ cluster? ( ads )
+ gpg? ( addc )
+ spotlight? ( json )
+ test? ( python )
+ !ads? ( !addc )
+ ?? ( system-heimdal system-mitkrb5 )
+"
+
+# the test suite is messed, it uses system-installed samba
+# bits instead of what was built, tests things disabled via use
+# flags, and generally just fails to work in a way ebuilds could
+# rely on in its current state
+RESTRICT="test"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+COMMON_DEPEND="
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/icu:=[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/libtasn1[${MULTILIB_USEDEP}]
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-perl/Parse-Yapp
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
+ >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-2.5.1[ldap(+)?,${MULTILIB_USEDEP}]
+ <sys-libs/ldb-2.6.0[ldap(+)?,${MULTILIB_USEDEP}]
+ sys-libs/libcap[${MULTILIB_USEDEP}]
+ sys-libs/liburing:=[${MULTILIB_USEDEP}]
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libcrypt:=[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ $(python_gen_cond_dep "
+ addc? (
+ dev-python/dnspython:=[\${PYTHON_USEDEP}]
+ dev-python/markdown[\${PYTHON_USEDEP}]
+ )
+ ads? (
+ dev-python/dnspython:=[\${PYTHON_USEDEP}]
+ net-dns/bind-tools[gssapi]
+ )
+ ")
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
+ acl? ( virtual/acl )
+ ceph? ( sys-cluster/ceph )
+ cluster? ( net-libs/rpcsvc-proto )
+ cups? ( net-print/cups )
+ debug? ( dev-util/lttng-ust )
+ fam? ( virtual/fam )
+ gpg? ( app-crypt/gpgme:= )
+ json? ( dev-libs/jansson:= )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ pam? ( sys-libs/pam )
+ python? (
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
+ )
+ snapper? ( sys-apps/dbus )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )
+ zeroconf? ( net-dns/avahi[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
+ dev-perl/JSON
+ net-libs/libtirpc[${MULTILIB_USEDEP}]
+ || (
+ net-libs/rpcsvc-proto
+ <sys-libs/glibc-2.26[rpc(+)]
+ )
+ spotlight? ( dev-libs/glib )
+ test? (
+ $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
+ !system-mitkrb5? (
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.9
+ >=sys-libs/nss_wrapper-1.1.3
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${COMMON_DEPEND}
+ client? ( net-fs/cifs-utils[ads?] )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( sec-policy/selinux-samba )
+"
+BDEPEND="${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.16.1-netdb-defines.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ # Package fails to build with distcc
+ export DISTCC_DISABLE=1
+ export PYTHONHASHSEED=1
+
+ python-single-r1_pkg_setup
+
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
+ if use cluster ; then
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS+=",idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # un-bundle dnspython
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
+
+ # unbundle iso8601 unless tests are enabled
+ if ! use test ; then
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
+ fi
+
+ ## ugly hackaround for bug #592502
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ --without-winexe
+ --accel-aes=$(usex cpu_flags_x86_aes intelaesni none)
+ $(multilib_native_use_with acl acl-support)
+ $(multilib_native_usex addc '' '--without-ad-dc')
+ $(multilib_native_use_with ads)
+ $(multilib_native_use_enable ceph cephfs)
+ $(multilib_native_use_with cluster cluster-support)
+ $(multilib_native_use_enable cups)
+ --without-dmapi
+ $(multilib_native_use_with fam)
+ $(multilib_native_use_enable glusterfs)
+ $(multilib_native_use_with gpg gpgme)
+ $(multilib_native_use_with json)
+ $(multilib_native_use_enable iprint)
+ $(multilib_native_use_with pam)
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(multilib_native_use_with quota quotas)
+ $(multilib_native_use_with regedit)
+ $(multilib_native_use_enable spotlight)
+ $(multilib_native_use_with syslog)
+ $(multilib_native_use_with systemd)
+ --systemd-install-services
+ --with-systemddir="$(systemd_get_systemunitdir)"
+ $(multilib_native_use_with winbind)
+ $(multilib_native_usex python '' '--disable-python')
+ $(multilib_native_use_enable zeroconf avahi)
+ $(multilib_native_usex test '--enable-selftest' '')
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
+ $(use_with debug lttng)
+ $(use_with ldap)
+ $(use_with profiling-data)
+ # bug #683148
+ --jobs 1
+ )
+
+ if multilib_is_native_abi ; then
+ myconf+=( --with-shared-modules=${SHAREDMODS} )
+ else
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
+ fi
+
+ CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
+
+ if multilib_is_native_abi ; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym ../../../bin/smbspool \
+ /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ dotmpfiles "${FILESDIR}"/samba.conf
+ if ! use addc ; then
+ rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
+ || die
+ fi
+
+ # Preserve functionality for old gentoo-specific unit names
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
+ fi
+
+ if use pam && use winbind ; then
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
+ # bugs #376853 and #590374
+ insinto /etc/security
+ doins examples/pam_winbind/pam_winbind.conf
+ fi
+
+ keepdir /var/cache/samba
+ keepdir /var/lib/ctdb
+ keepdir /var/lib/samba/{bind-dns,private}
+ keepdir /var/lock/samba
+ keepdir /var/log/samba
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ tmpfiles_process samba.conf
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Be aware that this release contains the best of all of Samba's"
+ elog "technology parts, both a file server (that you can reasonably expect"
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain"
+ elog "controller work previously known as 'samba4'."
+ elog
+ fi
+ if [[ "${PV}" != *_rc* ]] ; then
+ elog "For further information and migration steps make sure to read "
+ elog "https://samba.org/samba/history/${P}.html "
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
+ fi
+}