samba rebuild

This commit is contained in:
Berk Çakar
2021-06-23 00:21:00 +03:00
parent ebbadfdfad
commit 4f1d68e5e5
5 changed files with 127 additions and 138 deletions
+47 -42
View File
@@ -3,6 +3,8 @@
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
#
# TODO: glibc has to be rebuilt with libtirpc, so that we can enable libtirpc support in samba
from pisi.actionsapi import get
from pisi.actionsapi import autotools
@@ -11,53 +13,56 @@ from pisi.actionsapi import shelltools
shelltools.export("JOBS", get.makeJOBS().replace("-j", ""))
MODULES = "idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2,\
pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,\
auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
def setup():
pisitools.flags.add("-D_FILE_OFFSET_BITS=64", "-D_GNU_SOURCE", "-DLDAP_DEPRECATED", "-fPIC")
shelltools.system("sed -r 's/nss_(setpw|endpw|setgr|endgr)ent/my_&/' \
-i nsswitch/nsstest.c")
autotools.configure("\
--libdir=/usr/lib \
--with-cachedir=/var/lib/samba \
--with-configdir=/etc/samba \
--with-lockdir=/var/cache/samba \
--with-logfilebase=/var/log/samba \
--with-modulesdir=/usr/lib/samba \
--with-pammodulesdir=/lib/security \
--with-piddir=/run/samba \
--with-privatedir=/var/lib/samba/private \
--with-sockets-dir=/run/samba \
--disable-rpath \
--disable-rpath-install \
--enable-fhs \
--nopyc \
--nopyo \
--with-acl-support \
--with-ads \
--with-automount \
--with-cluster-support \
--with-dnsupdate \
--with-pam \
--with-quotas \
--with-sendfile-support \
--with-shared-modules=%s \
--with-syslog \
--with-utmp \
--with-winbind \
--without-systemd \
--bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt \
" % MODULES)
# !ldb,!pyldb-util
shelltools.system("python3 -m venv pyvenv && ./pyvenv/bin/pip3 install cryptography pyasn1 iso8601")
shelltools.system('echo "^samba4.rpc.echo.*on.*ncacn_np.*with.*object.*nt4_dc" >> selftest/knownfail')
shelltools.export("PYTHON", "%s/pyvenv/bin/python3" % get.curDIR())
shelltools.export("CFLAGS", "-I/usr/include/tirpc")
shelltools.export("LDFLAGS", "-ltirpc")
shelltools.system("export PATH=$PWD/pyvenv/bin:$PATH")
autotools.configure("--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-piddir=/run/samba \
--with-pammodulesdir=/lib/security \
--without-ad-dc \
--enable-fhs \
--without-systemd \
--bundled-libraries=!tdb,!talloc,!pytalloc-util \
--enable-selftest")
def build():
# For some reason, autotools.make() does not work.
shelltools.system("make")
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.dosym("samba-4.0/libsmbclient.h", "/usr/include/libsmbclient.h")
# remove unneeded files
pisitools.removeDir("/usr/share/ctdb")
shelltools.system("install -d %s/lib" % get.installDIR())
shelltools.move("%s/usr/lib/libnss_wins.so*" % get.installDIR(), "%s/lib" % get.installDIR())
shelltools.move("%s/usr/lib/libnss_winbind.so*" % get.installDIR(), "%s/lib" % get.installDIR())
pisitools.dosym("/lib/libnss_winbind.so.2", "/usr/lib/libnss_winbind.so")
pisitools.dosym("/lib/libnss_wins.so.2", "/usr/lib/libnss_wins.so")
shelltools.system("install -v -m644 examples/smb.conf.default %s/etc/samba/smb.conf.default" % get.installDIR())
pisitools.dodir("/etc/openldap/schema")
shelltools.system("install -v -m644 examples/LDAP/README \
%s/etc/openldap/schema/README.LDAP" % get.installDIR())
shelltools.system("install -v -m644 examples/LDAP/samba* \
%s/etc/openldap/schema" % get.installDIR())
shelltools.system("install -v -m755 examples/LDAP/{get*,ol*} \
%s/etc/openldap/schema" % get.installDIR())
shelltools.system("install -d %s/usr/lib/cups/backend" % get.installDIR())
pisitools.dosym("/usr/bin/smbspool", "/usr/lib/cups/backend/smb")
pisitools.remove("/usr/lib/python3.8/site-packages/_tdb_text.py")
pisitools.remove("/usr/lib/python3.8/site-packages/tdb.cpython-38-x86_64-linux-gnu.so")
pisitools.remove("/usr/lib/python3.8/site-packages/tevent.py")
pisitools.remove("/usr/lib/python3.8/site-packages/_tevent.cpython-38-x86_64-linux-gnu.so")
@@ -0,0 +1,23 @@
From: Berk Cakar <berk2238@hotmail.com>
Date: Tue, 22 Jun 2021 20:19:32 +0300
Subject: [PATCH] Fix build on libtirpc-less glibc
---
lib/replace/wscript | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 5d6324ef619..80afda75c96 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -109,6 +109,7 @@ def configure(conf):
conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+ conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
--
2.24.3 (Apple Git-128)
+9 -5
View File
@@ -1,5 +1,9 @@
#%PAM-1.0
auth required pam_unix.so
account required pam_unix.so
session required pam_unix.so
password required pam_unix.so nodelay smbconf=/etc/samba/smb.conf
# Begin /etc/pam.d/samba
auth required pam_nologin.so
auth include system-auth
account include system-account
session include system-session
password include system-password
# End /etc/pam.d/samba
+2 -2
View File
@@ -1,2 +1,2 @@
D /run/samba 0755 root root
d /var/log/samba 0755 root root
D /run/samba 0755 - - -
d /var/log/samba 0755 - - -
+46 -89
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<!DOCTYPE PISI SYSTEM "https://pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>samba</Name>
@@ -14,55 +14,31 @@
<Description>samba is a free software implementation of Microsoft's networking protocol released under the GNU General Public License. As of version 4, Samba not only provides file and print services for various Microsoft Windows clients but can also integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a Domain Member. It can also be part of an Active Directory domain.</Description>
<Archive sha1sum="498f9aec010962b790b363adf2fe1fcd68e44db6" type="targz">https://download.samba.org/pub/samba/samba-4.14.5.tar.gz</Archive>
<BuildDependencies>
<Dependency>keyutils</Dependency>
<Dependency>acl-devel</Dependency>
<Dependency>pam-devel</Dependency>
<Dependency>attr-devel</Dependency>
<Dependency>popt-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>libcap-devel</Dependency>
<Dependency>python3-devel</Dependency>
<Dependency>ncurses-devel</Dependency>
<Dependency>readline-devel</Dependency>
<Dependency>e2fsprogs-devel</Dependency>
<Dependency>libgcrypt-devel</Dependency>
<Dependency>libbsd-devel</Dependency>
<Dependency>avahi-libs</Dependency>
<Dependency>perl-parse-yapp</Dependency>
<!--Dependency>ctdb-devel</Dependency-->
<Dependency>cups-devel</Dependency>
<Dependency>avahi-devel</Dependency>
<Dependency>dmapi-devel</Dependency>
<!--Dependency>gamin-devel</Dependency-->
<Dependency>gnutls-devel</Dependency>
<Dependency>libaio-devel</Dependency>
<!--Dependency>libldb-devel</Dependency-->
<Dependency>mit-kerberos</Dependency>
<Dependency>iniparser-devel</Dependency>
<Dependency versionFrom="2.3.1">libtalloc-devel</Dependency>
<Dependency versionFrom="0.10.2">libtevent-devel</Dependency>
<Dependency>openldap-client</Dependency>
<Dependency>libarchive-devel</Dependency>
<Dependency>nss-devel</Dependency>
<Dependency>docbook-xsl</Dependency>
<Dependency>libxslt-devel</Dependency>
<Dependency>lmdb-devel</Dependency>
<Dependency>fuse-devel</Dependency>
<Dependency>dbus-devel</Dependency>
<Dependency>gpgme-devel</Dependency>
<Dependency>perl-parse-yapp</Dependency>
<Dependency>jansson-devel</Dependency>
<Dependency>libtirpc-devel</Dependency>
<Dependency>rpcsvc-proto-devel</Dependency>
<Dependency versionFrom="1.2.12">libtdb-devel</Dependency>
<Dependency versionFrom="2.1.26">cyrus-sasl-devel</Dependency>
<Dependency>docbook-xsl</Dependency>
<Dependency>avahi-devel</Dependency>
<Dependency>gnutls-devel</Dependency>
<Dependency>libgpg-error-devel</Dependency>
<Dependency>popt-devel</Dependency>
<Dependency>libtalloc-devel</Dependency>
<Dependency>python3-devel</Dependency>
<Dependency>icu4c-devel</Dependency>
<Dependency>cups-devel</Dependency>
<Dependency>mit-kerberos</Dependency>
<Dependency>libcap-devel</Dependency>
<Dependency>openldap-client</Dependency>
<Dependency>libtdb-devel</Dependency>
<Dependency>libarchive-devel</Dependency>
<Dependency>dbus-devel</Dependency>
<Dependency>libtirpc-devel</Dependency>
<Dependency>libnsl-devel</Dependency>
<Dependency>audit-devel</Dependency>
<Dependency>python3-markdown</Dependency>
<Dependency>python3-dnspython</Dependency>
</BuildDependencies>
<Patches>
<!-- <Patch level="1">samba-4.13-redhat.patch</Patch> -->
<Patch level="1">0001-Fix-build-on-libtirpc-less-glibc.patch</Patch>
</Patches>
</Source>
@@ -71,70 +47,45 @@
<RuntimeDependencies>
<Dependency>acl</Dependency>
<Dependency>pam</Dependency>
<Dependency>cups</Dependency>
<Dependency>dbus</Dependency>
<Dependency>lmdb</Dependency>
<Dependency>attr</Dependency>
<Dependency>popt</Dependency>
<Dependency>zlib</Dependency>
<Dependency>gpgme</Dependency>
<Dependency>libnsl</Dependency>
<Dependency>libcap</Dependency>
<Dependency>jansson</Dependency>
<Dependency>libtirpc</Dependency>
<Dependency>ncurses</Dependency>
<Dependency>python3</Dependency>
<Dependency>readline</Dependency>
<Dependency>e2fsprogs</Dependency>
<Dependency>libtasn1</Dependency>
<Dependency>libgcrypt</Dependency>
<Dependency>libarchive</Dependency>
<Dependency>cups</Dependency>
<Dependency>avahi</Dependency>
<Dependency>gdb</Dependency>
<!--Dependency>dmapi</Dependency>
<Dependency>gamin</Dependency-->
<Dependency>icu4c</Dependency>
<Dependency>gnutls</Dependency>
<Dependency>libbsd</Dependency>
<Dependency>libaio</Dependency>
<!--Dependency>libldb</Dependency-->
<Dependency>keyutils</Dependency>
<Dependency>iniparser</Dependency>
<Dependency>perl-parse-yapp</Dependency>
<Dependency versionFrom="2.3.1">libtalloc</Dependency>
<Dependency versionFrom="0.10.2">libtevent</Dependency>
<Dependency>libcap</Dependency>
<Dependency>libnsl</Dependency>
<Dependency>libtdb</Dependency>
<Dependency>jansson</Dependency>
<Dependency>python3</Dependency>
<Dependency>libtasn1</Dependency>
<Dependency>libtirpc</Dependency>
<Dependency>libtalloc</Dependency>
<Dependency>avahi-libs</Dependency>
<Dependency>openldap-client</Dependency>
<Dependency versionFrom="2.1.26">cyrus-sasl</Dependency>
<Dependency versionFrom="1.2.12">libtdb</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/run</Path>
<Path fileType="config">/etc</Path>
<Path fileType="data">/var/lib</Path>
<Path fileType="data">/var/log</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="executable">/sbin</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="library">/lib</Path>
<Path fileType="data">/run</Path>
<Path fileType="data">/var</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib/cups</Path>
<Path fileType="library">/usr/lib/lib*.so*</Path>
<Path fileType="library">/usr/lib/python3.8</Path>
<Path fileType="library">/usr/lib/samba</Path>
<Path fileType="library">/usr/lib/tmpfiles.d</Path>
<Path fileType="executable">/usr/libexec</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="library">/lib/security</Path>
<Path fileType="data">/usr/share/samba</Path>
<Path fileType="data">/usr/share/perl5</Path>
<Path fileType="data">/usr/libexec/samba/</Path>
<Path fileType="data">/usr/libexec/ctdb/</Path>
<Path fileType="data">/var/cache/samba</Path>
<Path fileType="data">/var/run/ctdb</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="config">/usr/lib/tmpfiles.d/samba.conf</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/samba/lmhosts">lmhosts</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/samba">samba.pam</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/samba/smbusers">smbusers</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/samba/smb.conf">smb.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/conf.d/samba">samba.confd</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/samba.conf">tmpfiles.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/samba/system-auth-winbind">system-auth-winbind</AdditionalFile>
</AdditionalFiles>
<Provides>
<COMAR script="package.py">System.Package</COMAR>
@@ -146,10 +97,9 @@
<Name>samba-devel</Name>
<Summary>Development files for samba</Summary>
<RuntimeDependencies>
<!--Dependency>libldb-devel</Dependency-->
<Dependency release="current">samba</Dependency>
<Dependency>libtalloc-devel</Dependency>
<Dependency>libtevent-devel</Dependency>
<Dependency release="current">samba</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
@@ -158,6 +108,13 @@
</Package>
<History>
<Update release="10">
<Date>2021-06-22</Date>
<Version>4.14.5</Version>
<Comment>Rebuild.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="9">
<Date>2021-06-20</Date>
<Version>4.14.5</Version>