Applications fail to build against libsmbclient 4.12.5

Bug #1901355 reported by Rob Savoury
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
High
Unassigned
Groovy
Won't Fix
Medium
Unassigned

Bug Description

Samba 4.12.5 as shipped in Groovy FTBFS (specifically amd64, not i386 which builds fine due no Ceph support, other arches untested) against Ceph 15.2.5 also shipped in Groovy, due changes in Ceph > 15.2.3 to cephfs.

Samba 4.12.5 was successfully built against Ceph 15.2.3 for Groovy release repos on 2020-09-28 (https://launchpad.net/ubuntu/+source/samba/2:4.12.5+dfsg-3ubuntu4/+build/20085494) and then ceph 15.2.5 was built for Groovy release repos on 2020-10-07 (https://launchpad.net/ubuntu/+source/ceph/15.2.5-0ubuntu1/+build/20121251).

So it seems that no official Ubuntu build of Samba 4.12.5 has yet been attempted against new Ceph 15.2.5, though Samba may well need a security patch or two in the lifetime of the Groovy release (almost a certainty!) so this Samba build failure relative Ceph will need to be resolved one way or another, prior to any such possible security patch of Samba.

Here are the relevant excerpts from the Launchpad build log (see https://launchpad.net/~savoury1/+archive/ubuntu/build-tools-stage/+build/20183191 for full log):

---
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<BUILDDIR>>/samba-4.12.5+dfsg'
.
.
.
Checking for header cephfs/libcephfs.h : 08:35:23 runner ['/usr/bin/gcc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-g', '-O2', '-fdebug-prefix-map=/<<BUILDDIR>>/samba-4.12.5+dfsg=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-DHAVE_CONFIG_H=1', '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64', '../../test.c', '-c', '-o/<<BUILDDIR>>/samba-4.12.5+dfsg/bin/.conf_check_3436ec45740b8b4a1c7dcc71b48a3f82/testbuild/default/test.c.1.o', '-Wdate-time', '-D_FORTIFY_SOURCE=2']
no
.
.
.
dpkg-shlibdeps: error: cannot read debian/samba-vfs-modules/usr/lib/*/samba/vfs/ceph.so: No such file or directory
dh_shlibdeps: error: dpkg-shlibdeps -Tdebian/registry-tools.substvars -pvfsceph -dRecommends -e debian/samba-vfs-modules/usr/lib/\*/samba/vfs/ceph.so debian/registry-tools/usr/bin/regpatch debian/registry-tools/usr/bin/regtree debian/registry-tools/usr/bin/regdiff debian/registry-tools/usr/bin/regshell returned exit code 2
dpkg-shlibdeps: error: cannot read debian/samba-vfs-modules/usr/lib/*/samba/vfs/ceph.so: No such file or directory
.
.
.
dh_shlibdeps: error: Aborting due to earlier error
make[1]: *** [debian/rules:288: override_dh_shlibdeps] Error 25
---

Ceph history here https://github.com/ceph/ceph/commits/master/src/include/cephfs shows various relevant changes to source (especially changes on Apr 30, 2020 with commits 4436f27, 8370f70, adcf12d, e3b9df7).

It seems the Samba waf script (source3/wscript) might need modifications to account for the changes to cephfs? And are the changes to cephfs actually compatible with Samba's current usage or not, ie. does Samba source need to be patched beyond a change to the waf build script(s)? Questions I can't answer, having very little familiarity with the code base of either Samba or Ceph (or with waf).

So far I've been unable to find any relevant upstream commits to Samba that account for the changes evident in Ceph 15.2.5 to cephfs.

Reason for rebuilding Samba in my PPA is the missing time.h header that results in FTBFS for libsmbclient users (ie. FFmpeg, when smbclient support is explicitly enabled). Might be useful to have Samba in Ubuntu repos officially patched for the time.h header issue too, though maybe that's for another bug report than this one?

See https://gitlab.com/samba-team/samba/-/commit/1114b02a72ce0c86a5301816560d270ec47f8be3 for more details.

Revision history for this message
Rob Savoury (savoury1) wrote : Re: Groovy: libsmbclient users FTBFS against Samba 4.12.5

The new ceph 15.2.5-0ubuntu1.1 package (https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/20200352) fixes the issue, published a few days after I submitted the above bug report.

Renaming bug report to "Groovy: libsmbclient users FTBFS against Samba 4.12.5" due that bug still being in the Groovy Samba package. See last paragraph and then link in above report.

Software including FFmpeg 4.3.1 (if smbclient support is enabled) FTBFS against Samba 4.12.5 due the missing time.h header issue.

summary: - Groovy: Samba 4.12.5 FTBFS against Ceph 15.2.5
+ Groovy: libsmbclient users FTBFS against Samba 4.12.5
Revision history for this message
Rob Savoury (savoury1) wrote :

Patch fixes issue with libsmbclient users FTBFS against Samba 4.12.5 in Groovy.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "add-missing-time-h-include.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: added: rls-gg-incoming
Mathew Hodson (mhodson)
Changed in samba (Ubuntu):
importance: Undecided → High
tags: added: ftbfs
Revision history for this message
Mathew Hodson (mhodson) wrote :

Fixed in Ubuntu Hirsute with version 4.13 and later.

Changed in samba (Ubuntu Groovy):
importance: Undecided → Medium
Changed in samba (Ubuntu):
status: New → Fix Released
Mathew Hodson (mhodson)
summary: - Groovy: libsmbclient users FTBFS against Samba 4.12.5
+ Applications fail to build against libsmbclient 4.12.5
tags: removed: ftbfs
Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in samba (Ubuntu Groovy):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.