Opened 11 years ago

Closed 3 years ago

#38834 closed update (duplicate)

samba4: Update to 4.6.0

Reported by: mf2k (Frank Schima) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: joshk.macports@…, cooljeanius (Eric Gallager), mmpestorich (Mike M Pestorich), anddam (Andrea D'Amore), j.b.p1@…, gallafent, danchr (Dan Villiom Podlaski Christiansen), sierkb (Sierk Bornemann), SickTeddyBear
Port: samba4

Description (last modified by mf2k (Frank Schima))

The samba4 port should be updated to the latest stable version.

Also the livecheck is broken.

Attachments (3)

Portfile.diff (4.8 KB) - added by ajdudman 11 years ago.
samba4.tar.gz (3.6 KB) - added by ajdudman 11 years ago.
fixed glob for sbin as well as bin
samba4-4.1.0.tar.gz (4.2 KB) - added by joshk.macports@… 10 years ago.
samba 4.1.0 custom port

Download all attachments as: .zip

Change History (37)

comment:1 Changed 11 years ago by ajdudman

This may help start the update. It compiles and installs and does livecheck. Other ports when slightly modified link to it. I have not tested it. My lan is quite simple. Wow, waf does a poor job setting the dynamic library loader commands. I think I had to adjust just about all of the shared object libraries, bundles and binaries.

comment:2 Changed 11 years ago by mf2k (Frank Schima)

@ajdudman: Thanks but can you also attach a unified diff of the Portfile so we can easily see the changes you made there?

comment:3 Changed 11 years ago by ajdudman

Okay here is the unified diff of Portfile with a glob fix and replacement of the whole tar.

comment:4 Changed 11 years ago by ajdudman

Sorry, but it needs more work. My post-destroot was too simple. Many library names are still wrong. Links are broken. Perhaps it would be best if the first portion of the version string were included in the shared library name used as id and dependent library references. Confusion happens several times between '-' and '_'. Confusion exists whether or not the 'lib' prefix is used in the name.

comment:5 Changed 11 years ago by ajdudman

Well, I have progress to report. The Mach-O type files in this port under /opt/local/lib/python2.7/site-packages/ have .so extension and generally do not prefix with lib are bundle files. Here they are not versioned. The Mach-O type files in this port under /opt/local/lib without lib prefix and having .dylib extension are modules. Here they are not versioned. The Mach-O type files in this port under /opt/local/lib with lib prefix and having .dylib extension are regular shared libraries. These may be versioned. In that case the true file has full version string in its name and the symbolic links have reduced or no version string in their names. This is odd because it is unlike OSX system shared libraries and those from GNU libtool. There the file has a single version number and the links have more version numbers, (3), or none. Well checking another waf based port, talloc, it also is odd. Instead of fighting waf, I tried using its pattern. Surprisingly simple was the fix to the Portfile post-destroot. Okay, here are the updated files.

Changed 11 years ago by ajdudman

Attachment: Portfile.diff added

Changed 11 years ago by ajdudman

Attachment: samba4.tar.gz added

fixed glob for sbin as well as bin

comment:6 Changed 11 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… added

Cc Me!

comment:7 Changed 11 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… removed

comment:8 Changed 11 years ago by sdevilcry@…

Hi,

Even reading the documentation to apply patch, I still not able to apply it and I'm sure I don't use the good way.. Someone can describe how to apply it please ?

Thanks in advance :)

comment:9 Changed 11 years ago by ajdudman

The new files are best placed in your local repository. To configure that, backup and then edit /opt/local/etc/macports/sources.conf. Follow the example at line 5. Make a new line 6, like "file:///Users/landonf/misc/MacPorts/ports" substituting your username for landonf. Save it replacing the old file.

To create the local repository, create the new path, extract the archive I attached, and sync the new port repository as follows:

mkdir -p ~/misc/MacPorts/ports
cd ~/misc/MacPorts/ports
gnutar -xzf ~/Downloads/samba4.tar.gz
sudo port -d sync

Build and install samba4 from source verbosely.

sudo port -sv install samba4

comment:10 Changed 11 years ago by sdevilcry@…

Thank you ! It works ! Didn't know we could have a local repository.

comment:11 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: samba4: Update to 4.0.5samba4: Update to 4.0.7

Current version is 4.0.7. Markus, can you please update the port?

comment:12 in reply to:  9 Changed 10 years ago by kaviani.amir@…

Thanks!
But all the time I get the message: Error: Linking conflicts may occur. Please deactivate kerberos5 while building samba4.


-- Solution!! --

Deactivate Kerberos5 in MacPort. To do that open the terminal and run this command.

sudo port -f -d deactivate kerberos5

Then clean up samba4 corrupted installation files, resync the MacPort database and install samba4 again use:

sudo port clean --all samba4
sudo port -d sync
sudo port install -sv samba4

Version 2, edited 10 years ago by kaviani.amir@… (previous) (next) (diff)

Changed 10 years ago by joshk.macports@…

Attachment: samba4-4.1.0.tar.gz added

samba 4.1.0 custom port

comment:13 Changed 10 years ago by joshk.macports@…

I updated the port to 4.1.0. On Mavericks (not sure if it is needed elsewhere) I had to add an extra patch to #define MD5_CTX as CC_MD5_CTX. Hope it's useful to someone.

NOTE: I forgot about this, but one problem is that the port does not automatically create the directories that are needed to launch the daemon properly. To make this happen, I had to create the following dirs:

/opt/local/var/lib/samba/private /opt/local/etc/samba (in which I had to fetch the example smb.conf and put it in) /opt/local/var/lock/samba /opt/local/var/cache/samba

Finally, if the port maintainer wishes to include smb.conf in the port copied from the example, the line

log file = /usr/local/samba/var/log.%m

should be changed to

log file = /opt/local/samba/var/log/log.%m

and /opt/local/samba/var/log should be created when the port is installed.

It would be nice to ship a plist file as well. Here's mine:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.triplehelix.samba4</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/smbd</string>
<string>-D</string>
<string>&amp;&amp;</string>
<string>/opt/local/sbin/nmbd</string>
<string>-D</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

samba4 is especially attractive to users of Mavericks as the built in SMBX seems to be even more broken now than before.

Last edited 10 years ago by joshk.macports@… (previous) (diff)

comment:14 Changed 10 years ago by joshk.macports@…

Cc: joshk.macports@… added

Cc Me!

comment:15 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:16 Changed 10 years ago by mmpestorich (Mike M Pestorich)

Cc: mmpestorich@… added

Cc Me!

comment:17 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

The samba4 port is quite dated and has known vulnerabilities. Thankfully, it fails to compile, so there isn't much risk of people using it. Please update it to at least 4.0.16 or 4.1.6.

comment:18 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: samba4: Update to 4.0.7samba4: Update to 4.0.16 or 4.1.6

comment:19 in reply to:  17 ; Changed 10 years ago by cooljeanius (Eric Gallager)

Replying to jeremyhu@…:

The samba4 port is quite dated and has known vulnerabilities. Thankfully, it fails to compile, so there isn't much risk of people using it. Please update it to at least 4.0.16 or 4.1.6.

Last I heard, Samba upstream was no longer supporting OS X:

Although that was over a year ago, so idk if stuff has changed in newer versions...

comment:20 Changed 10 years ago by xeron (Ivan Larionov)

Cc: xeron.oskom@… added

Cc Me!

comment:21 in reply to:  19 Changed 10 years ago by jra@…

Replying to egall@…:

Replying to jeremyhu@…:

The samba4 port is quite dated and has known vulnerabilities. Thankfully, it fails to compile, so there isn't much risk of people using it. Please update it to at least 4.0.16 or 4.1.6.

Last I heard, Samba upstream was no longer supporting OS X:

Although that was over a year ago, so idk if stuff has changed in newer versions...

That's just Volker being grumpy, don't take it seriously please.

We're very happy to take patches to make the Samba 4.1.x builds work on MacOSX - please feel free to submit and I'll review !

Thanks,

Jeremy Allison, Samba Team.

comment:22 Changed 9 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:23 Changed 9 years ago by j.b.p1@…

Cc: j.b.p1@… added

Cc Me!

comment:24 in reply to:  description Changed 9 years ago by j.b.p1@…

Replying to macsforever2000@…:

The samba4 port should be updated to the latest stable version. Currently that is 4.0.5.

Also the livecheck is broken.

Would it be possible to make an update so that the latest stable Samba version 4.1.14 is installed? Thanks for your efforts!

comment:25 Changed 9 years ago by gallafent

Clearly[1] 4.2.0 would be the appropriate version to update to now! From the same link, Samba 3 is going out of support, which perhaps increases the importance of this update!

[1] https://www.samba.org/samba/history/samba-4.2.0.html

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:26 Changed 9 years ago by gallafent

Cc: william@… added

Cc Me!

comment:27 Changed 9 years ago by anddam (Andrea D'Amore)

In October '14 I was able to build samba in my local repository but had issues with the order of linker flags that the custom build-system was passing onto the compiler and had to manually overcome those.

I discussed this with Ralph Böhme that confirmed there was an issue and kindly worked on it.

The issue was patched on december '14 but I didn't had the time to test it (actually I didn't need samba anymore on my system) so if anyone is willing to read the bug and try the new patch -or check if it's been since merged- the update is likley to go through, the samba 4.1.x port in my local repo worked just fine.

comment:28 Changed 8 years ago by danchr (Dan Villiom Podlaski Christiansen)

Cc: danchr@… added

Cc Me!

comment:29 Changed 7 years ago by mf2k (Frank Schima)

Owner: mww@… deleted
Status: newassigned

See #53012.

comment:30 Changed 7 years ago by xeron (Ivan Larionov)

Cc: xeron removed

comment:31 Changed 7 years ago by mf2k (Frank Schima)

Cc: sierkb added
Summary: samba4: Update to 4.0.16 or 4.1.6samba4: Update to 4.6.0

Has duplicate #53814.

comment:32 Changed 7 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:33 Changed 6 years ago by SickTeddyBear

Cc: SickTeddyBear added

comment:34 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed

Superseded by #61380.

Note: See TracTickets for help on using tickets.