mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 10:27:00 +02:00
net-fs/samba: Apply Flatcar changes
- 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 Original-by: David Michael <dm0@redhat.com> https://github.com/flatcar-linux/coreos-overlay/commit/8445f8b4386a
This commit is contained in:
parent
28783b1e69
commit
a5e2bf4282
@ -26,6 +26,7 @@ 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+=" +minimal" # Flatcar: Only install libraries, not executables.
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/samba-4.0/policy.h
|
||||
@ -40,32 +41,22 @@ MULTILIB_WRAPPED_HEADERS=(
|
||||
|
||||
CDEPEND="
|
||||
>=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
|
||||
dev-lang/perl:=
|
||||
dev-libs/libbsd[${MULTILIB_USEDEP}]
|
||||
dev-libs/libtasn1[${MULTILIB_USEDEP}]
|
||||
!minimal? ( dev-libs/libtasn1[${MULTILIB_USEDEP}] )
|
||||
dev-libs/popt[${MULTILIB_USEDEP}]
|
||||
>=net-libs/gnutls-3.2.0[${MULTILIB_USEDEP}]
|
||||
net-libs/libnsl:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
|
||||
>=sys-libs/ldb-2.0.12[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
<sys-libs/ldb-2.1.0[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
sys-libs/libcap
|
||||
sys-libs/ncurses:0=
|
||||
sys-libs/readline:0=
|
||||
>=sys-libs/talloc-2.2.0[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
>=sys-libs/tdb-1.4.2[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
|
||||
>=sys-libs/tevent-0.10.0[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
|
||||
@ -87,6 +78,7 @@ CDEPEND="
|
||||
DEPEND="${CDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-lang/perl:=
|
||||
dev-libs/libxslt
|
||||
>=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
|
||||
net-libs/libtirpc[${MULTILIB_USEDEP}]
|
||||
@ -166,9 +158,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
|
||||
@ -185,6 +174,9 @@ multilib_src_configure() {
|
||||
bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
|
||||
fi
|
||||
|
||||
# Flatcar: Don't depend on tons of new packages with broken cross-compilation support.
|
||||
bundled_libs=ALL
|
||||
|
||||
local myconf=(
|
||||
--enable-fhs
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
@ -198,6 +190,7 @@ multilib_src_configure() {
|
||||
--nopyc
|
||||
--nopyo
|
||||
--without-winexe
|
||||
--disable-python # Flatcar: Don't build libraries requiring Python.
|
||||
$(multilib_native_use_with acl acl-support)
|
||||
$(multilib_native_usex addc '' '--without-ad-dc')
|
||||
$(multilib_native_use_with addns dnsupdate)
|
||||
@ -275,7 +268,9 @@ multilib_src_install() {
|
||||
newinitd "${CONFDIR}/samba4.initd-r1" samba
|
||||
newconfd "${CONFDIR}/samba4.confd" samba
|
||||
|
||||
systemd_dotmpfilesd "${FILESDIR}"/samba.conf
|
||||
if ! use minimal ; then
|
||||
systemd_dotmpfilesd "${FILESDIR}"/samba.conf
|
||||
fi
|
||||
use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
|
||||
|
||||
# Preserve functionality for old gentoo-specific unit names
|
||||
@ -295,6 +290,19 @@ multilib_src_install() {
|
||||
keepdir /var/lib/ctdb
|
||||
keepdir /var/lib/samba/{bind-dns,private}
|
||||
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_install_all() {
|
||||
|
Loading…
Reference in New Issue
Block a user