Please add a samba-dev package

Bug #302004 reported by Robie Basak
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

Binary package hint: samba

I currently don't have access to the include files used to build samba without extracting the source package. In particular, config.h and proto.h are autogenerated during the build.

Could the header files please be dumped into /usr/include/samba or somewhere with a samba-dev package? Then I can have an automated build based on Build-depends: samba-dev.

Thanks

Revision history for this message
Soren Hansen (soren) wrote :

Which package needs these?

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

But the 'samba' binary package doesn't provide any shared libraries to link against does it? So why install the header files? The Samba source package does provide libsmbclient, which is a shared library with header files.

Revision history for this message
Robie Basak (racb) wrote :

I'm working on a VFS module for samba which needs the headers to build - it builds as a shared library which samba will load (as directed in smb.conf).

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

These header files don't provide a stable API - there are no public and private headers in Samba at the moment; function signatures may change between minor releases. It should be possible to provide these headers, but it requires splitting the headers up in upstream first.

Changed in samba:
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

I understand that I'd need to track changes in the API. One of the reasons I want to build against a samba-dev package is that then the header files will match the build of samba that is installed on the system.

If I take a copy of the relevant headers and embed that into my source tree and the system's samba package gets upgraded, then my built module will not match.

Revision history for this message
Soren Hansen (soren) wrote :

This is interesting. I've never heard of Samba being able to do anything like this. What's the configuration directive for it (so that I can dig up a bit of info about the it all)?

Revision history for this message
Robie Basak (racb) wrote :

The smb.conf directive is "vfs objects". Also see: http://www.samba.org/samba/docs/man/Samba-Developers-Guide/vfs.html

There are some modules included with samba too.

Revision history for this message
Soren Hansen (soren) wrote :

My primary concern is this:

Since the API isn't published nor stable you'd have to have a strict versioned dependency on the samba version against which your package is built. This is not a problem in itself, but it becomes one if someone has your package installed, and we publish a security update for Samba. Given the strict versioned dependency, samba will not be upgraded until your package has been rebuilt against the new samba version and subsequently published (since staying with an old samba version is considered more acceptable to apt than removing your package).

Do you have thoughts on how to counter this?

Revision history for this message
Robie Basak (racb) wrote :

I agree that letting my package hold back a security update would be a bad thing, and this would happen with a strict versioned dependency. I don't see any way to avoid this, so I propose that I don't make the dependency so strict.

As you say, this has the potential to break should the API change, but this is unlikely in a stable release (as the security fix would be backported).

I think that's the best that could be managed save for upstream declaring the API stable.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

FWIW, API changes in security releases do happen. The second-to-last security release changed several function signatures, for example (http://us5.samba.org/samba/ftp/patches/security/samba-3.0.29-CVE-2008-1105.patch).

We as upstream don't install all of these headers as-is intentionally. At the very least, please don't install all headers, but just the bare subset required.

Revision history for this message
Andreas Kostyrka (andreas-kostyrka) wrote :

jelmer: What's the correct way to build a VFS module then? Complete replacement for the samba package => that provides even worse security, because a strict versioning at least warns the admin that something is reeking.

samba-with-my-vfs-module OTOH would just get stuck at an unsafe version without any automatic indication that something is broken.

Andreas

Revision history for this message
Andreas Kostyrka (andreas-kostyrka) wrote :

As another example for a package that provides an unstable API, consider postgresql-server-dev, that is versioned too (and it's useful for building stuff like slony that needs to interoperate on a intimate level with the server).

Chuck Short (zulcss)
Changed in samba (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
Revision history for this message
Chuck Short (zulcss) wrote :

This has been fixed in lucid.

Regards
chuck

Changed in samba (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

@Chuck

Thanks! But I can't find a samba-dev in http://packages.ubuntu.com/source/lucid/samba, and I've tried building the latest source and can't find the header files in there. Am I not looking at the same version as you?

Revision history for this message
Thierry Carrez (ttx) wrote :

@Chuck: I don't think that was fixed.

Changed in samba (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Chuck Short (zulcss) wrote :

Closed after talking to Robie about it.

Changed in samba (Ubuntu):
status: Triaged → 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.