mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
net-fs/samba: Apply Flatcar modifications
- Add a minimal USE flag for only installing libraries - Change the Perl and Python run-time deps to build-time only - Drop a bunch of dependencies with broken cross-compilation - Enable using bundled libraries in their place - Disable building libraries requiring Python - Use EAPI7 - Move libsxlt and stylesheets to BDEPEND - Introduce some USE flags, so we don't install some tools we don't need - Limit the size of bundled libraries - Make it compatible with newer python versions - Bump to r2 because of updating EAPI to 7
This commit is contained in:
parent
c5eb243890
commit
6c8076e272
@ -16,12 +16,16 @@
|
||||
<flag name="client">Enables the client part</flag>
|
||||
<flag name="cluster">Enable support for clustering</flag>
|
||||
<flag name="dmapi">Enable support for DMAPI. This currently works only in combination with XFS.</flag>
|
||||
<flag name="glusterfs">Enable support for Glusterfs filesystem via <pkg>sys-cluster/glusterfs</pkg></flag>
|
||||
<flag name="gpg">Use <pkg>app-crypt/gpgme</pkg> for AD DC</flag>
|
||||
<flag name="json">Enable json audit support through <pkg>dev-libs/jansson</pkg></flag>
|
||||
<flag name="iprint">Enabling iPrint technology by Novell</flag>
|
||||
<flag name="ntvfs">Enable support for NTVFS fileserver</flag>
|
||||
<flag name="profiling-data">Enables support for collecting profiling data</flag>
|
||||
<flag name="quota">Enables support for user quotas</flag>
|
||||
<flag name="regedit">Enable support for regedit command-line tool</flag>
|
||||
<flag name="snapper">Enable vfs_snapper module (requires <pkg>sys-apps/dbus</pkg>)</flag>
|
||||
<flag name="spotlight">Enable support for spotlight backend</flag>
|
||||
<flag name="system-heimdal">Use <pkg>app-crypt/heimdal</pkg> instead of
|
||||
bundled heimdal.</flag>
|
||||
<flag name="system-mitkrb5">Use <pkg>app-crypt/mit-krb5</pkg> instead of
|
||||
|
@ -1,11 +1,12 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
PYTHON_COMPAT=( python3_{6..10} )
|
||||
PYTHON_REQ_USE='threads(+),xml(+)'
|
||||
inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam
|
||||
TMPFILES_OPTIONAL=1
|
||||
inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
|
||||
|
||||
MY_PV="${PV/_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
@ -23,9 +24,11 @@ LICENSE="GPL-3"
|
||||
|
||||
SLOT="0"
|
||||
|
||||
IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gpg iprint
|
||||
json ldap pam profiling-data python quota selinux snapper syslog
|
||||
system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
|
||||
IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs
|
||||
gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux
|
||||
snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
|
||||
zeroconf"
|
||||
IUSE+=" +minimal" # Flatcar: Only install libraries, not executables.
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/samba-4.0/policy.h
|
||||
@ -40,35 +43,24 @@ MULTILIB_WRAPPED_HEADERS=(
|
||||
|
||||
CDEPEND="
|
||||
>=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
|
||||
dev-lang/perl:=
|
||||
dev-libs/icu:=[${MULTILIB_USEDEP}]
|
||||
spotlight? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/libbsd[${MULTILIB_USEDEP}]
|
||||
dev-libs/libtasn1[${MULTILIB_USEDEP}]
|
||||
!minimal? ( dev-libs/libtasn1[${MULTILIB_USEDEP}] )
|
||||
dev-libs/popt[${MULTILIB_USEDEP}]
|
||||
dev-perl/Parse-Yapp
|
||||
>=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
|
||||
net-libs/libnsl:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
|
||||
>=sys-libs/ldb-2.1.4[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
<sys-libs/ldb-2.2.0[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${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.1[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
>=sys-libs/tdb-1.4.3[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
>=sys-libs/tevent-0.10.2[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib[${MULTILIB_USEDEP}]
|
||||
virtual/libiconv
|
||||
pam? ( sys-libs/pam )
|
||||
acl? ( virtual/acl )
|
||||
$(python_gen_cond_dep "
|
||||
dev-python/subunit[\${PYTHON_MULTI_USEDEP},${MULTILIB_USEDEP}]
|
||||
addns? (
|
||||
net-dns/bind-tools[gssapi]
|
||||
dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}]
|
||||
)
|
||||
")
|
||||
addns? (
|
||||
net-dns/bind-tools[gssapi]
|
||||
dev-python/dnspython
|
||||
)
|
||||
ceph? ( sys-cluster/ceph )
|
||||
cluster? (
|
||||
net-libs/rpcsvc-proto
|
||||
@ -89,8 +81,7 @@ CDEPEND="
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt
|
||||
dev-lang/perl:=
|
||||
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
|
||||
net-libs/libtirpc[${MULTILIB_USEDEP}]
|
||||
virtual/pkgconfig
|
||||
@ -98,6 +89,10 @@ DEPEND="${CDEPEND}
|
||||
net-libs/rpcsvc-proto
|
||||
<sys-libs/glibc-2.26[rpc(+)]
|
||||
)
|
||||
spotlight? (
|
||||
app-misc/tracker
|
||||
dev-libs/glib
|
||||
)
|
||||
test? (
|
||||
!system-mitkrb5? (
|
||||
>=sys-libs/nss_wrapper-1.1.3
|
||||
@ -112,12 +107,19 @@ RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-samba )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
addc? ( python json winbind )
|
||||
addns? ( python )
|
||||
ads? ( acl ldap winbind )
|
||||
cluster? ( ads )
|
||||
gpg? ( addc )
|
||||
ntvfs? ( addc )
|
||||
spotlight? ( json )
|
||||
test? ( python )
|
||||
?? ( system-heimdal system-mitkrb5 )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
@ -168,9 +170,6 @@ src_prepare() {
|
||||
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
|
||||
@ -187,6 +186,10 @@ multilib_src_configure() {
|
||||
bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
|
||||
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"
|
||||
@ -200,6 +203,7 @@ multilib_src_configure() {
|
||||
--nopyc
|
||||
--nopyo
|
||||
--without-winexe
|
||||
--disable-python
|
||||
$(multilib_native_use_with acl acl-support)
|
||||
$(multilib_native_usex addc '' '--without-ad-dc')
|
||||
$(multilib_native_use_with addns dnsupdate)
|
||||
@ -209,13 +213,17 @@ multilib_src_configure() {
|
||||
$(multilib_native_use_enable cups)
|
||||
$(multilib_native_use_with 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 ntvfs ntvfs-fileserver)
|
||||
$(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 regedit)
|
||||
$(multilib_native_use_enable snapper)
|
||||
$(multilib_native_use_enable spotlight)
|
||||
$(multilib_native_use_with syslog)
|
||||
$(multilib_native_use_with systemd)
|
||||
--systemd-install-services
|
||||
@ -277,7 +285,7 @@ multilib_src_install() {
|
||||
newinitd "${CONFDIR}/samba4.initd-r1" samba
|
||||
newconfd "${CONFDIR}/samba4.confd" samba
|
||||
|
||||
systemd_dotmpfilesd "${FILESDIR}"/samba.conf
|
||||
[[ ! use_minimal ]] && dotmpfiles "${FILESDIR}"/samba.conf
|
||||
use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
|
||||
|
||||
# Preserve functionality for old gentoo-specific unit names
|
||||
@ -298,6 +306,20 @@ multilib_src_install() {
|
||||
keepdir /var/lib/samba/{bind-dns,private}
|
||||
keepdir /var/lock/samba
|
||||
keepdir /var/log/samba
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
Loading…
Reference in New Issue
Block a user