Home | News | Download | Packages | Forum | Wiki | Github

Samba 4 missing


(chris tyler) #1

Was curious as to why no samba 4 packages? All I see is 3.6. Is there any particular reason for this?


(Erin) #2

As others have posted today, user involvement for Void is welcome. You can put together a template or put a request in on Github.


(chris tyler) #3

ok i just wanted to make sure i wasnt missing something obvious


(Michael Aldridge) #4

Samba 4 is a substantial extra investment in time and work, and almost all Samba4 servers can speak the older protocols without loss of functionality.


(Erin) #5

One good thing about Void is a friendly accessible team. The downside, they are a small team and busy. I think the other reply could be translated as we are aware but it is lower down on the to-do list.


(chris tyler) #6

how do you request on git hub? I spent the better part of afternoon trying to build it with xbps-src and lets just say failed miserably. serious learning curve with xbps-src. reason I’m so interested is I have a couple Macs and apple has gone all in on there shitty smb implementation I have read that samba 4 has some Mac specific options. 5 MB/sec writes to share get old quick. figured there has to be someone in same boat as me. maybe we could pull our efforts together and submit a package.


(Michael Aldridge) #7

Package requests are somewhat discouraged these days since they often wind up unmaintained. That and the number or requests for firefox clones is unbelievable. I’d perhaps poke maxice8 or cr6git who might be able to help you with your package.


#8

@maldridge Yes! why not try?
Here’s my first attempt at updating the samba template (which looks a little scary at first :fearful: )


  • Removed musl.patch because:
=> samba-4.7.2_1: patching: musl.patch.
The text leading up to this was:
--------------------------
|--- source3/include/samba_linux_quota.h.orig	2015-06-13 11:42:24.658548702 +0200
|+++ source3/include/samba_linux_quota.h	2015-06-13 11:42:33.241642520 +0200
--------------------------
File to patch: 
Skip this patch? [y] 
1 out of 1 hunk ignored
=> ERROR: samba-4.7.2_1: failed to run post-extract_00-patches() at line 34.

  • Removed samba-3.6.25-security-2015-12-16.patch because:
=> samba-4.7.2_1: patching: samba-3.6.25-security-2015-12-16.patch.
1 out of 2 hunks FAILED -- saving rejects to file source3/smbd/vfs.c.rej
1 out of 2 hunks FAILED -- saving rejects to file source3/libsmb/clidfs.c.rej
4 out of 5 hunks FAILED -- saving rejects to file source3/libsmb/libsmb_server.c.rej
2 out of 4 hunks FAILED -- saving rejects to file source3/modules/vfs_shadow_copy2.c.rej
=> ERROR: samba-4.7.2_1: failed to run post-extract_00-patches() at line 34.

  • Removed these options because:
waf: error: no such option: --with-fhs

waf: error: no such option: --with-pam_smbpass

waf: error: no such option: --with-static-libs

waf: error: no such option: --with-nmbdsocketdir

waf: error: no such option: --disable-swat

waf: error: no such option: --enable-external-libtalloc

waf: error: no such option: --enable-external-libtdb

waf: error: no such option: --disable-fam

  • Added gnutls-devel because:
wscript:51: error: Building the AD DC requires GnuTLS

  • After that, there’s still some errors:
=> samba-4.7.2_1: running post_install ...
=> ERROR: samba-4.7.2_1: vinstall: cannot find 'nsswitch/libnss_wins.so'...
=> ERROR: samba-4.7.2_1: failed to run post_install() at line 12.


=> samba-4.7.2_1: running post_install ...
ln: failed to create symbolic link '/destdir//samba-4.7.2/usr/lib/libnss_wins.so.2': File exists
=> ERROR: samba-4.7.2_1: failed to run post_install() at line 63.


=> samba-4.7.2_1: running post_install ...
ln: failed to create symbolic link '/destdir//samba-4.7.2/usr/lib/libnss_winbind.so.2': File exists
=> ERROR: samba-4.7.2_1: failed to run post_install() at line 67.


=> samba-4.7.2_1: running post_install ...
=> ERROR: samba-4.7.2_1: vinstall: cannot find 'source3/bin/winbind_krb5_locator.so'...
=> ERROR: samba-4.7.2_1: failed to run post_install() at line 12.


=> samba-4.7.2_1: running post_install ...
/usr/bin/install: cannot stat 'source3/pkgconfig/*.pc': No such file or directory
=> ERROR: samba-4.7.2_1: failed to run post_install() at line 88.


=> samba-4.7.2_1: running post_install ...
=> libsmbclient-4.7.2_1: running pre-install hook: 00-lib32 ...
=> libsmbclient-4.7.2_1: running pre-install hook: 02-script-wrapper ...
=> libsmbclient-4.7.2_1: running pkg_install ...
mv: cannot stat '/destdir//samba-4.7.2/usr/share/man/man7/libsmbclient.7': No such file or directory
=> ERROR: libsmbclient-4.7.2_1: failed to run pkg_install() at line 215.

  • I quickly “fixed” the above errors, that results in this template:
# Template file for 'samba'
pkgname=samba
version=4.7.2
revision=1
#build_wrksrc=source3
build_style=gnu-configure
configure_args="--enable-fhs --with-pam --with-ldap
 --with-configdir=/etc/samba --with-lockdir=/var/samba
 --with-cachedir=/var/samba --with-sockets-dir=/var/run/samba
 --with-statedir=/var/samba --with-piddir=/run/samba --with-dnsupdate
 --with-pammodulesdir=/usr/lib/security --with-automount
 --with-syslog --with-quotas --enable-cups
 --with-ads --with-acl-support --enable-gnutls
 --with-shared-modules=idmap_ad,idmap_adex,idmap_rid,idmap_hash,idmap_tdb2
 --sbindir=/usr/bin"
short_desc="SMB/CIFS file, print, and login server for Unix"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-3"
homepage="https://www.samba.org"
distfiles="https://download.samba.org/pub/samba/stable/$pkgname-$version.tar.gz"
checksum=fd32512289dfb276be2218377c6136b2e12a05826f8bee9d0dac4ad626decf92

lib32disabled=yes
conf_files="/etc/pam.d/samba /etc/samba/smb.conf"
make_dirs="/etc/samba/private 0750 root root"
hostmakedepends="pkg-config perl python-devel"
makedepends="gnutls-devel libcap-devel popt-devel mit-krb5-devel
 pam-devel acl-devel avahi-libs-devel tdb-devel talloc-devel cups-devel"

do_configure() {
	#sed -e 's,XFS_QUOTA_,FS_QUOTA_,g' -i lib/sysquotas_xfs.c

	if [ "$CROSS_BUILD" ]; then
		configure_args+=" samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
			libreplace_cv_HAVE_GETADDRINFO=no
			libreplace_cv_HAVE_GETIFADDRS=yes
			ac_cv_file__proc_sys_kernel_core_pattern=yes
			ac_cv_func_ext_krb5_free_keytab_entry_contents=yes
			samba_cv_HAVE_WRFILE_KEYTAB=yes
			smb_krb5_cv_enctype_to_string_takes_size_t_arg=yes
			smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes"
	fi
	# Disable quotas, broken with musl (needs rpc).
	./configure ${configure_args} --without-quotas
}
post_install() {
	cd ${wrksrc}
	# conf file
	cat examples/smb.conf.default | \
		sed 's|log file = .*$|log file = /var/log/samba/%m.log|g' > \
		${DESTDIR}/etc/samba/smb.conf

	# fix logrotate
	sed -i -e 's|log.%m|%m.log|g' ${DESTDIR}/etc/samba/smb.conf

	# fix spool directory
	sed -i 's|/usr/spool/samba|/var/spool/samba|g' \
		${DESTDIR}/etc/samba/smb.conf

	# nsswitch libraries
	vinstall bin/default/nsswitch/libnss_wins.so 755 usr/lib

	vinstall bin/default/nsswitch/libnss_winbind.so 755 usr/lib

	# winbind krb5 locator
	vinstall bin/shared/winbind_krb5_locator.so 755 \
		usr/lib/krb5/plugins/libkrb5

	# Remove unused manpages
	rm -f ${DESTDIR}/usr/share/man/man8/tdb*
	rm -f ${DESTDIR}/usr/share/man/man8/swat*
	rm -f ${DESTDIR}/usr/lib/libtevent*
	rm -f ${DESTDIR}/usr/include/samba/tevent*

	vsv nmbd
	vsv smbd

	# PAM support
	vinstall ${FILESDIR}/samba.pam 644 etc/pam.d samba

	# Install pkg-config files.
	vmkdir usr/lib/pkgconfig
	install -m644 $(find bin/ -name *.pc) ${DESTDIR}/usr/lib/pkgconfig

	# Link cups backend
	vmkdir usr/lib/cups/backend
	ln -s /usr/bin/smbspool ${DESTDIR}/usr/lib/cups/backend/smb
}

smbclient_package() {
	short_desc="Command-line SMB/CIFS clients for Unix"
	pkg_install() {
		vmove usr/share/man/man1

		# Determine which binaries are client and which are server
		# by looking at manpage suffix, and vmove the client
		# binaries.  Ugly.
		for f in "$PKGDESTDIR"/usr/share/man/man1/*.1; do
			g=$(basename "${f}" .1)
			if [ -e "${DESTDIR}/usr/bin/${g}" ]; then
				vmove usr/bin/${g}
		fi
		done
	}
}
libsmbclient_package() {
	short_desc="Shared libraries for communication with SMB/CIFS servers"
	pkg_install() {
		vmove "usr/lib/libwbclient.so.*"
		vmove "usr/lib/libsmbclient.so.*"
		vman docs/manpages/libsmbclient.7
	}
}
samba-devel_package() {
	depends="libsmbclient>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/lib/libwbclient.so
		vmove usr/lib/libsmbclient.so
	}
}

samba-cups_package() {
	depends="${sourcepkg}-${version}_${revision}"
	short_desc="SMB backend for cups"
	pkg_install() {
		vmove usr/lib/cups/backend/smb
	}
}

  • And finally these errors:
=> libsmbclient-4.7.2_1: running pre-pkg hook: 04-generate-runtime-deps ...
   SONAME: libpthread.so.0 <-> glibc>=2.25_1
   SONAME: libsamba-util.so.0 <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libreplace-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libmsrpc3-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: liblibcli-lsa3-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: liblibsmb-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libsamba-security-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libsmbconf.so.0 <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libndr.so.0 <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libsamba-debug-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libtevent.so.0 <-> tevent>=0.9.28_1
   SONAME: libsamba-errors.so.1 <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libtevent-util.so.0 <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libgse-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libndr-standard.so.0 <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libdcerpc-samba-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libcli-smb-common-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libutil-cmdline-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libsamba3-util-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libsecrets3-samba4.so <-> UNKNOWN PKG PLEASE FIX!
   SONAME: libtalloc.so.2 <-> talloc>=2.0.1_1
   SONAME: libc.so.6 <-> glibc>=2.25_1
   SONAME: libwinbind-client-samba4.so <-> UNKNOWN PKG PLEASE FIX!
=> ERROR: libsmbclient-4.7.2_1: cannot guess required shlibs, aborting!
  • Here we are. :exploding_head: I do not feel qualified enough to figure all of this out.

(Enno Boland) #9

#10

@Gottox It’s incredible!
You proposed this update on 4 June 2017, but @maldridge was not even aware of that??
Seems like there’s a lack of communication in the team. :slightly_frowning_face:


(Enno Boland) #11

Well, I quite enjoy working with @maldridge and I don’t see a lack of communication when we don’t discuss every single PR.

Currently I’m fulltime contracted so I cannot give void the attention as I’d like to. Maybe that’s what you’re experiencing.

What I want to say: If you like you can pick up this PR and resolve the remaining issues which are mostly subpackaging and file conflicts with samba3. I’m happy if we could follow the samba release cycle in a timely manner.


(Michael Aldridge) #12

@cr6 Please remember that we have 6000+ packages across many different architectures all handled by a fairly small team. My time has been spent lately with $dayjob and with trying to get new build infrastructure online.

If you have a PR for it, someone will review it eventually. Remember though that Samba is a core technology and has to be checked to make sure it isn’t going to break anything else.


#13

@Gottox , @maldridge I understand, sorry. Don’t get me wrong, the term “lack of communication” certainly was badly chosen. :zipper_mouth_face:


(chris tyler) #14

I have been busy this week really haven’t had to much time to play with void. some interesting information in the thread since I last looked. @cr6 have you tried to build the PR that @Gottox submitted?

Just want to say thx to @maldridge @Gottox and every once else who is working hard on void. I appreciate all that you do.


#15

Tomorrow morning, because I need to sleep. :weary:


#16

And what about integrating new members in the team, in order to meet the growing popularity of Void Linux?
Out of curiosity: is there a precise procedure to incorporate new members? What are the criteria? How do you decide?
Thank you.


(Michael Aldridge) #17

The protocol isn’t formalized, but there are certainly things we look for in people before granting them more access.

We’re at a stable size for the foreseeable future growth, and in a short time bandwidth from several maintainers will be available again.