Merge pull request #9586 from friberk/master

samba rebuild
This commit is contained in:
Kamil ATLI
2021-06-23 00:23:58 +03:00
committed by GitHub
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. # Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt # 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 get
from pisi.actionsapi import autotools from pisi.actionsapi import autotools
@@ -11,53 +13,56 @@ from pisi.actionsapi import shelltools
shelltools.export("JOBS", get.makeJOBS().replace("-j", "")) 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(): 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("\ shelltools.system("python3 -m venv pyvenv && ./pyvenv/bin/pip3 install cryptography pyasn1 iso8601")
--libdir=/usr/lib \ shelltools.system('echo "^samba4.rpc.echo.*on.*ncacn_np.*with.*object.*nt4_dc" >> selftest/knownfail')
--with-cachedir=/var/lib/samba \
--with-configdir=/etc/samba \ shelltools.export("PYTHON", "%s/pyvenv/bin/python3" % get.curDIR())
--with-lockdir=/var/cache/samba \ shelltools.export("CFLAGS", "-I/usr/include/tirpc")
--with-logfilebase=/var/log/samba \ shelltools.export("LDFLAGS", "-ltirpc")
--with-modulesdir=/usr/lib/samba \ shelltools.system("export PATH=$PWD/pyvenv/bin:$PATH")
--with-pammodulesdir=/lib/security \
--with-piddir=/run/samba \ autotools.configure("--prefix=/usr \
--with-privatedir=/var/lib/samba/private \ --sysconfdir=/etc \
--with-sockets-dir=/run/samba \ --localstatedir=/var \
--disable-rpath \ --with-piddir=/run/samba \
--disable-rpath-install \ --with-pammodulesdir=/lib/security \
--enable-fhs \ --without-ad-dc \
--nopyc \ --enable-fhs \
--nopyo \ --without-systemd \
--with-acl-support \ --bundled-libraries=!tdb,!talloc,!pytalloc-util \
--with-ads \ --enable-selftest")
--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
def build(): def build():
# For some reason, autotools.make() does not work.
shelltools.system("make") shelltools.system("make")
def install(): def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR()) autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.dosym("samba-4.0/libsmbclient.h", "/usr/include/libsmbclient.h")
shelltools.system("install -d %s/lib" % get.installDIR())
# remove unneeded files shelltools.move("%s/usr/lib/libnss_wins.so*" % get.installDIR(), "%s/lib" % get.installDIR())
pisitools.removeDir("/usr/share/ctdb") 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 # Begin /etc/pam.d/samba
auth required pam_unix.so
account required pam_unix.so auth required pam_nologin.so
session required pam_unix.so auth include system-auth
password required pam_unix.so nodelay smbconf=/etc/samba/smb.conf 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 /run/samba 0755 - - -
d /var/log/samba 0755 root root d /var/log/samba 0755 - - -
+46 -89
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" ?> <?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> <PISI>
<Source> <Source>
<Name>samba</Name> <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> <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> <Archive sha1sum="498f9aec010962b790b363adf2fe1fcd68e44db6" type="targz">https://download.samba.org/pub/samba/samba-4.14.5.tar.gz</Archive>
<BuildDependencies> <BuildDependencies>
<Dependency>keyutils</Dependency>
<Dependency>acl-devel</Dependency> <Dependency>acl-devel</Dependency>
<Dependency>pam-devel</Dependency> <Dependency>pam-devel</Dependency>
<Dependency>attr-devel</Dependency> <Dependency>perl-parse-yapp</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>jansson-devel</Dependency> <Dependency>jansson-devel</Dependency>
<Dependency>libtirpc-devel</Dependency>
<Dependency>rpcsvc-proto-devel</Dependency> <Dependency>rpcsvc-proto-devel</Dependency>
<Dependency versionFrom="1.2.12">libtdb-devel</Dependency> <Dependency>docbook-xsl</Dependency>
<Dependency versionFrom="2.1.26">cyrus-sasl-devel</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>libnsl-devel</Dependency>
<Dependency>audit-devel</Dependency>
<Dependency>python3-markdown</Dependency>
<Dependency>python3-dnspython</Dependency>
</BuildDependencies> </BuildDependencies>
<Patches> <Patches>
<!-- <Patch level="1">samba-4.13-redhat.patch</Patch> --> <Patch level="1">0001-Fix-build-on-libtirpc-less-glibc.patch</Patch>
</Patches> </Patches>
</Source> </Source>
@@ -71,70 +47,45 @@
<RuntimeDependencies> <RuntimeDependencies>
<Dependency>acl</Dependency> <Dependency>acl</Dependency>
<Dependency>pam</Dependency> <Dependency>pam</Dependency>
<Dependency>cups</Dependency>
<Dependency>dbus</Dependency> <Dependency>dbus</Dependency>
<Dependency>lmdb</Dependency>
<Dependency>attr</Dependency>
<Dependency>popt</Dependency> <Dependency>popt</Dependency>
<Dependency>zlib</Dependency> <Dependency>zlib</Dependency>
<Dependency>gpgme</Dependency> <Dependency>icu4c</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>gnutls</Dependency> <Dependency>gnutls</Dependency>
<Dependency>libbsd</Dependency> <Dependency>libbsd</Dependency>
<Dependency>libaio</Dependency> <Dependency>libcap</Dependency>
<!--Dependency>libldb</Dependency--> <Dependency>libnsl</Dependency>
<Dependency>keyutils</Dependency> <Dependency>libtdb</Dependency>
<Dependency>iniparser</Dependency> <Dependency>jansson</Dependency>
<Dependency>perl-parse-yapp</Dependency> <Dependency>python3</Dependency>
<Dependency versionFrom="2.3.1">libtalloc</Dependency> <Dependency>libtasn1</Dependency>
<Dependency versionFrom="0.10.2">libtevent</Dependency> <Dependency>libtirpc</Dependency>
<Dependency>libtalloc</Dependency>
<Dependency>avahi-libs</Dependency> <Dependency>avahi-libs</Dependency>
<Dependency>openldap-client</Dependency> <Dependency>openldap-client</Dependency>
<Dependency versionFrom="2.1.26">cyrus-sasl</Dependency>
<Dependency versionFrom="1.2.12">libtdb</Dependency>
</RuntimeDependencies> </RuntimeDependencies>
<Files> <Files>
<Path fileType="data">/run</Path>
<Path fileType="config">/etc</Path> <Path fileType="config">/etc</Path>
<Path fileType="data">/var/lib</Path> <Path fileType="library">/lib</Path>
<Path fileType="data">/var/log</Path> <Path fileType="data">/run</Path>
<Path fileType="library">/usr/lib</Path> <Path fileType="data">/var</Path>
<Path fileType="executable">/sbin</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="executable">/usr/bin</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="executable">/usr/sbin</Path>
<Path fileType="library">/lib/security</Path>
<Path fileType="data">/usr/share/samba</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> </Files>
<AdditionalFiles> <AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/samba/lmhosts">lmhosts</AdditionalFile> <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/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/smbusers">smbusers</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/samba/smb.conf">smb.conf</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="/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> </AdditionalFiles>
<Provides> <Provides>
<COMAR script="package.py">System.Package</COMAR> <COMAR script="package.py">System.Package</COMAR>
@@ -146,10 +97,9 @@
<Name>samba-devel</Name> <Name>samba-devel</Name>
<Summary>Development files for samba</Summary> <Summary>Development files for samba</Summary>
<RuntimeDependencies> <RuntimeDependencies>
<!--Dependency>libldb-devel</Dependency--> <Dependency release="current">samba</Dependency>
<Dependency>libtalloc-devel</Dependency> <Dependency>libtalloc-devel</Dependency>
<Dependency>libtevent-devel</Dependency> <Dependency>libtevent-devel</Dependency>
<Dependency release="current">samba</Dependency>
</RuntimeDependencies> </RuntimeDependencies>
<Files> <Files>
<Path fileType="header">/usr/include</Path> <Path fileType="header">/usr/include</Path>
@@ -158,6 +108,13 @@
</Package> </Package>
<History> <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"> <Update release="9">
<Date>2021-06-20</Date> <Date>2021-06-20</Date>
<Version>4.14.5</Version> <Version>4.14.5</Version>