net-fs/samba: Sync with Gentoo

It's from Gentoo commit 80dfa8a735c57c3d7da903b1e79244df305ad3fd.
This commit is contained in:
Sayan Chowdhury 2024-03-04 19:38:54 +05:30 committed by Dongsu Park
parent 0a0cfb8835
commit aaed8d7ebb
2 changed files with 11 additions and 34 deletions

View File

@ -1 +1 @@
DIST samba-4.18.8.tar.gz 41335959 BLAKE2B d25711f1e781ed16fc224476979a07a5362f92ac943dd0bccfdf445434d0e6838281d5ceae27963267f914720ad6db647078520dc0e78c6ae652faec7d773e73 SHA512 2924c360f6299129527457547b13c1b282e2907a0ecde1036dbca894c752935d693914b4846a9eab436b33798c53c9974692e51fd071301b1174598be944a246
DIST samba-4.18.9.tar.gz 41332779 BLAKE2B 8a0769c73d42b941b6f69d62243dd2b93d66748231465b853320cf1bf4b3dd8a912ac7bddfaa9c8b1941788951c2ccd630dabb23cf94965bc1d1e4cb5d74d123 SHA512 93a6c878bca583f59208df2a7865bbd453f7a65dc2f39a863797ef807bdeced4d632c5edd4579e341f8cf3b0b2fbe41e68a815a1510518bdd43e9a25a973c94c

View File

@ -1,11 +1,10 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="threads(+),xml(+)"
TMPFILES_OPTIONAL=1
inherit python-single-r1 flag-o-matic waf-utils multilib-minimal linux-info systemd pam tmpfiles
DESCRIPTION="Samba Suite Version 4"
@ -14,9 +13,9 @@ 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"
SRC_URI="https://download.samba.org/pub/samba/rc/${MY_P}.tar.gz"
else
SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
SRC_URI="https://download.samba.org/pub/samba/stable/${MY_P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
fi
S="${WORKDIR}/${MY_P}"
@ -27,7 +26,6 @@ IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug fam glusterf
IUSE+=" iprint json ldap llvm-libunwind pam profiling-data python quota +regedit selinux"
IUSE+=" snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind winbind"
IUSE+=" zeroconf"
IUSE+=" +minimal" # Flatcar: Only install libraries, not executables.
REQUIRED_USE="${PYTHON_REQUIRED_USE}
addc? ( json python !system-mitkrb5 winbind )
@ -61,13 +59,14 @@ TALLOC_VERSION="2.4.0"
TDB_VERSION="1.4.8"
TEVENT_VERSION="0.14.1"
# Flatcar: exclude perl, icu, libtasn1, Parse-Yapp from DEPEND
COMMON_DEPEND="
>=app-arch/libarchive-3.1.2:=[${MULTILIB_USEDEP}]
spotlight? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
dev-lang/perl:=
dev-libs/icu:=[${MULTILIB_USEDEP}]
dev-libs/libbsd[${MULTILIB_USEDEP}]
!minimal? ( dev-libs/libtasn1:=[${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.7.2:=[ldap(+)?,${MULTILIB_USEDEP}]
@ -118,9 +117,8 @@ COMMON_DEPEND="
)
zeroconf? ( net-dns/avahi[dbus] )
"
# Flatcar: pull in JSON only if json is enabled
DEPEND="${COMMON_DEPEND}
json? ( dev-perl/JSON )
dev-perl/JSON
net-libs/libtirpc[${MULTILIB_USEDEP}]
net-libs/rpcsvc-proto
spotlight? ( dev-libs/glib )
@ -140,8 +138,6 @@ RDEPEND="${COMMON_DEPEND}
selinux? ( sec-policy/selinux-samba )
"
BDEPEND="${PYTHON_DEPS}
dev-lang/perl:=
dev-perl/Parse-Yapp
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
@ -252,10 +248,6 @@ multilib_src_configure() {
EOF
fi
# Flatcar: we need only the mandatory bundled library, ldb by default.
# Without that, configure will fail because of a missing bundled library.
bundled_libs="ldb"
local myconf=(
--enable-fhs
--sysconfdir="${EPREFIX}/etc"
@ -366,8 +358,7 @@ multilib_src_install() {
newinitd "${CONFDIR}/samba4.initd-r1" samba
newconfd "${CONFDIR}/samba4.confd" samba
# Flatcar: do not create samba config if minimal enabled
use minimal || dotmpfiles "${FILESDIR}"/samba.conf
dotmpfiles "${FILESDIR}"/samba.conf
if ! use addc ; then
rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
|| die
@ -385,22 +376,8 @@ multilib_src_install() {
insinto /etc/security
doins examples/pam_winbind/pam_winbind.conf
fi
# Flatcar: clean up unnecessary files
rm -f "${ED%/}"/etc/samba/*
rm -f "${ED%/}"/usr/lib*/samba/ldb/*
if use minimal ; then
mv "${ED%/}"/usr/bin/net "${T}"/
rm -f "${ED%/}"/usr/bin/* "${ED%/}"/usr/sbin/*
mv "${T}"/net "${ED%/}"/usr/bin/net
rm -rf ${ED%/}/lib*/security
rm -rf ${ED%/}/usr/lib/systemd
rm -rf ${ED%/}/usr/lib*/perl*
rm -rf ${ED%/}/usr/lib*/python*
rm -rf ${ED%/}/var
fi
}
pkg_postinst() {
use minimal || tmpfiles_process samba.conf
tmpfiles_process samba.conf
}