Skip to contentSkip to conversation

samba4: bump to version 4.1.10

PATCH New Gustavo Zacarias 2 participants 7 messages Jul 29, 2014 – Jul 31, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Lots of bugfixes, enhancements to provisioning and printing support via cups.

---
 package/samba4/Config.in |  3 +++
 package/samba4/samba4.mk | 12 ++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)
package/samba4/Config.in +3 -0
index 7008ba2..184185a 100644
@@ -19,6 +19,9 @@ config BR2_PACKAGE_SAMBA4
 
 	  http://www.samba.org/
 
+comment "Some samba4 CLI tools require the python package to keep .py files"
+	depends on BR2_PACKAGE_SAMBA4 && BR2_PACKAGE_PYTHON_PYC_ONLY
+
 comment "samba4 needs a toolchain w/ IPv6, wchar, largfile, threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE || \
 		!BR2_USE_WCHAR || !BR2_INET_IPV6
package/samba4/samba4.mk +10 -2
index e2336e7..7d8500f 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SAMBA4_VERSION = 4.1.9
+SAMBA4_VERSION = 4.1.10
 SAMBA4_SITE = http://ftp.samba.org/pub/samba/stable
 SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
 SAMBA4_LICENSE = GPLv3+
@@ -20,6 +20,14 @@ else
 	SAMBA4_CONF_OPT += --without-acl-support
 endif
 
+ifeq ($(BR2_PACKAGE_CUPS),y)
+	SAMBA4_CONF_ENV += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config"
+	SAMBA4_CONF_OPT += --enable-cups
+	SAMBA4_DEPENDENCIES += cups
+else
+	SAMBA4_CONF_OPT += --disable-cups
+endif
+
 ifeq ($(BR2_PACKAGE_LIBAIO),y)
 	SAMBA4_CONF_OPT += --with-aio-support
 	SAMBA4_DEPENDENCIES += libaio
@@ -69,6 +77,7 @@ define SAMBA4_CONFIGURE_CMDS
 		python_LDFLAGS="" \
 		python_LIBDIR="" \
 		$(TARGET_CONFIGURE_OPTS) \
+		$(SAMBA4_CONF_ENV) \
 		./buildtools/bin/waf configure \
 			--prefix=/usr \
 			--sysconfdir=/etc \
@@ -80,7 +89,6 @@ define SAMBA4_CONFIGURE_CMDS
 			--hostcc=gcc \
 			--disable-rpath \
 			--disable-rpath-install \
-			--disable-cups \
 			--disable-iprint \
 			--without-pam \
 			--without-dmapi \
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Dear Gustavo Zacarias,

Quoted 1 line · Gustavo Zacarias

Lots of bugfixes, enhancements to provisioning and printing support via cups.

None of the patches we have in package/samba4/ have been merged upstream? Some of them are marked "Upstream", so I would have expected them to be removed by this bump, no? Or maybe they've been applied to a development branch that hasn't been released yet?

package/samba4/Config.in config BR2_PACKAGE_SAMBA4 · line 23

Quoted 2 lines
package/samba4/Config.in +2 -0
+comment "Some samba4 CLI tools require the python package to keep .py files"
+	depends on BR2_PACKAGE_SAMBA4 && BR2_PACKAGE_PYTHON_PYC_ONLY

That seems weird, could you elaborate a bit on that?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Quoted 9 lines · Thomas Petazzoni

Dear Gustavo Zacarias,

Quoted 1 line · Gustavo Zacarias

Lots of bugfixes, enhancements to provisioning and printing support via cups.

None of the patches we have in package/samba4/ have been merged upstream? Some of them are marked "Upstream", so I would have expected them to be removed by this bump, no? Or maybe they've been applied to a development branch that hasn't been released yet?

Hi.
They've been merged to master which will be the 4.2 series, but not backported to the 4.1 series, except for... samba4-0001-build-don-t-execute-tests-summary.c.patch samba4-0002-Minor-typo-fix-in-source3-wscript.patch
...which were included in the 4.1.8 release because they were considered simple enough to do so.

Quoted 4 lines

package/samba4/Config.in config BR2_PACKAGE_SAMBA4 · line 23

Quoted 2 lines
package/samba4/Config.in +2 -0
+comment "Some samba4 CLI tools require the python package to keep .py files"
+	depends on BR2_PACKAGE_SAMBA4 && BR2_PACKAGE_PYTHON_PYC_ONLY

That seems weird, could you elaborate a bit on that?

The python package purges all *.py files, even the ones it doesn't own, and samba4 installs only .py and .so files (for python-related functionality) hence having this problem - this also happens when building samba natively, it's not an artifact of cross-compilation. This mostly affects the advanced tools like pidl, samba_dnsupdate, samba_kcc, samba_spnupdate, samba_upgradedns and samba-tool which are useful for domain masters and simple provisioning/upgrades. For many scenarios this isn't an issue since they're mostly interactive tools, but it's worth mentioning i think.
It might also be problematic for people relying on samba's python bindings for their own tools.

Regards.

#3 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Gustavo,

Quoted 6 lines · Gustavo Zacarias

They've been merged to master which will be the 4.2 series, but not backported to the 4.1 series, except for... samba4-0001-build-don-t-execute-tests-summary.c.patch samba4-0002-Minor-typo-fix-in-source3-wscript.patch
...which were included in the 4.1.8 release because they were considered simple enough to do so.

Ok, thanks for the explanation. Great to see that many of these patches have been merged upstream, and will be removed from Buildroot once 4.2 lands.

Quoted 5 lines
Quoted 4 lines

package/samba4/Config.in config BR2_PACKAGE_SAMBA4 · line 23

Quoted 2 lines
package/samba4/Config.in +2 -0
+comment "Some samba4 CLI tools require the python package to keep .py files"
+	depends on BR2_PACKAGE_SAMBA4 && BR2_PACKAGE_PYTHON_PYC_ONLY

That seems weird, could you elaborate a bit on that?

Quoted 11 lines

The python package purges all *.py files, even the ones it doesn't own, and samba4 installs only .py and .so files (for python-related functionality) hence having this problem - this also happens when building samba natively, it's not an artifact of cross-compilation. This mostly affects the advanced tools like pidl, samba_dnsupdate, samba_kcc, samba_spnupdate, samba_upgradedns and samba-tool which are useful for domain masters and simple provisioning/upgrades. For many scenarios this isn't an issue since they're mostly interactive tools, but it's worth mentioning i think.
It might also be problematic for people relying on samba's python bindings for their own tools.

But those tools are installed in /usr/lib ? The target-finalize logic to remove .py files only applies to /usr/lib, not to the entire root filesystem.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Quoted 3 lines · Thomas Petazzoni

But those tools are installed in /usr/lib ? The target-finalize logic to remove .py files only applies to /usr/lib, not to the entire root filesystem.

The binaries are installed in /usr/bin & /usr/sbin, but they are python scripts that import from the usual /usr/lib/python2.7/site-packages/* (a couple in the toplevel, most in samba/).
Alternatively we can remove the tools if .pyc files aren't kept or hide samba4.
But since that doesn't inhibit samba4 working and most people would probably make up their config from some template or separate web ui i went for the warning.
It would probably be problematic for advanced uses like clustering or ADS support which aren't part of the feature set of the package at the moment (and stumbled upon it when testing what that would entail). Regards.

#5 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Dear Gustavo Zacarias,

Quoted 11 lines · Gustavo Zacarias

The binaries are installed in /usr/bin & /usr/sbin, but they are python scripts that import from the usual /usr/lib/python2.7/site-packages/* (a couple in the toplevel, most in samba/).
Alternatively we can remove the tools if .pyc files aren't kept or hide samba4.
But since that doesn't inhibit samba4 working and most people would probably make up their config from some template or separate web ui i went for the warning.
It would probably be problematic for advanced uses like clustering or ADS support which aren't part of the feature set of the package at the moment (and stumbled upon it when testing what that would entail).

Then wouldn't it be simpler/saner to simply remove those tools and Python modules from the target completely?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/1 samba4: bump to version 4.1.10

Quoted 2 lines · Thomas Petazzoni

Then wouldn't it be simpler/saner to simply remove those tools and Python modules from the target completely?

We can remove the tools and keep the comment but i wouldn't go as far as removing everything since some are related to samba support libraries and others are part of bundled libraries (talloc, tdb, tevent). There's another option, we can do a compileall run on samba's site-packages directory, a quick test says it works fine.
We can do it from the samba4 package (what i tested) or maybe a target-finalize hook from within the python infra for the whole site dir. Regards.