-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
samba4: add package samba-4.8 #5563
Conversation
Just confirmed on a fresh compile test, target x86 fails because e2fsprogs is build in-between krb5 and samba4. |
Does this apply to the error table generated with compile_et only or should the libcom_err always be statically be linked with all programs ? I ask this because the table I is program specific, isn't that so ?
Paul
… Op 3 feb. 2018, om 18:06 heeft Andy Walsh ***@***.***> het volgende geschreven:
Just confirmed on a fresh compile test, target x86 fails because e2fsprogs is build in-between krb5 and samba4.
Someone send me patches for e2fsprogs/krb5 so libcom_err, libss are separate packages and can be reused by krb5, trying to test those now.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@poranje with #714 and #5562 krb5 accepts the system com_err/ss and in return samba4 accepts krb5 libs. As far as i understand com_err can be system-wide shared, but packages generate some static code with a compatible compile_et. At least thats what krb5 seems to-do, it tests/probes the system com_err lib and also the compile_et script. |
Updated to stable 4.8 branch and now passes travis checks, should still be merged alongside #5562. |
also tested and working on mvebu due to samba3.6 not compiling anymore on my system (maybe gcc7.3 problems can't say) @hnyman can we have this series in, samba 3.6 is long EOL ? @Andy2244 everything in /usr/lib is needed(based on config options) ? did you tried file by file if they are all needed ? |
@lucize I cant judge if its "needed", but the final bins are linked against all those libs so they are needed to run the selected targets/features. I use everything that could be done with the default waf logic and without heavily patching the source to minimize size. So i only select the targets that are required for each feature and made the features select-able, so the minimal size is a server only (no netbios/vfs/ad-dc) package at around 4.2-4.6 MB size. If anyone finds a trick to minimize it more, i'm happy to add the patches as long as they are reasonable to maintain. |
ok, I'll test it one by one and come back with an answer, maybe with some ifdef based on build selection some libs can be excluded Regards |
@lucize You can try, but keep in mind that waf is already supposedly doing this. So if you tell waf to only build "smbstatus" than it will resolve all needed libs and only build/include those needed for "smbstatus". You can check the wafscripts for the bins and notice how each bin has specific dependency's defined. We tried the static multicall bin trick a while ago, which ensures only needed functions are linked and the binary was around the same size as the shared waf package. |
Is there a reason why we're not using packages for (lib)talloc and tdb? |
@diizzyy kinda, the existing lib packages are not using proper cross-compile answer files per architecture or qemu. So i doubt anyone actually tested the libs on all openwrt architectures. Thats why i use qemu in this package, since i did not want to guess cross-answers or update the files every few versions for all possible architectures. |
net/samba4/Config.in
Outdated
|
||
config SAMBA4_SERVER | ||
bool "Server (fileserver)" | ||
select BUSYBOX_CONFIG_RENICE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bad idea, don't modify other packages "indirectly". Submit that it should be enabled by default upstream instead if it's really needed however my guess is that it's not the end of the world if renice isn't available.
Edit: typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably true, i think it was originally used to prevent the samba process itself to block other network related work, so it does not stall itself. I never tested it without renice, that's why i kept it in and found no other way to include it.
So there is no "official" way to have a package depend on a specific config option? How do other packages handle this, say for example if they depend on a kernel mod or specific kernel option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
net/samba4/Config.in
Outdated
help | ||
provides commonly used vfs modules | ||
installs: | ||
modules: vfs_btrfs vfs_fruit vfs_shadow_copy vfs_shadow_copy2 vfs_recycle vfs_fake_perms vfs_readonly vfs_cap vfs_offline vfs_crossrename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vfs_btrfs should depend on kmod-fs-btrfs?
From what I can tell you only need vfs_shadow_copy2 not vfs_shadow_copy.
https://github.com/samba-team/samba/blob/master/source3/modules/vfs_shadow_copy.c
https://github.com/samba-team/samba/blob/master/source3/modules/vfs_shadow_copy2.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for vfs_btrfs, will add a config check and i actually did not check for vfs_shadow_copy, but i think that was the samba default output via "smbd -b", so i kept it close to the default.
net/samba4/Config.in
Outdated
help | ||
provides extra vfs modules | ||
installs: | ||
modules: vfs_virusfilter vfs_shell_snap vfs_snapper vfs_commit vfs_worm vfs_xattr_tdb vfs_streams_xattr vfs_aio_fork vfs_aio_pthread vfs_linux_xfs_sgid vfs_netatalk vfs_dirsort vfs_fileid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vfs_snapper --> Requires snapper (not in repo)
vfs_aio_* --> Not sure we needs those at all as we have optional aio support?
vfs_linux_xfs_sgid --> should depend on kmod-fs-xfs?
net/samba4/Config.in
Outdated
default y | ||
|
||
config SAMBA4_SERVER_VFSX | ||
bool "enable extendet VFS modules" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
net/samba4/Makefile
Outdated
@@ -0,0 +1,296 @@ | |||
# | |||
# Copyright (C) 2007-2017 OpenWrt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't assign copyright to OpenWrt unless you're affiliated, use your own name or omit it.
net/samba4/Makefile
Outdated
DEPENDS:=+zlib +libpthread +libpopt +libcap +libtirpc +libnettle +krb5-libs \ | ||
+SAMBA4_SERVER_VFSX:libdbus +SAMBA4_SERVER_ACL:acl \ | ||
+SAMBA4_SERVER_AVAHI:libavahi-client +SAMBA4_SERVER_AVAHI:avahi-dbus-daemon \ | ||
+SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:krb5-server +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are openssl, gnutls and nettle all needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes all libs are needed for each configuration they are defined, did a step by step compile test.
utils/qemu-userspace/Makefile
Outdated
@@ -0,0 +1,148 @@ | |||
# | |||
# Copyright (C) 2018 OpenWrt.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, this should also probably be a separate pull request.
I see, I left some comments but it looks great otherwise. :-) |
@diizzyy Thanks for the review will try to make the changes next weekend or so. How you want to handle the qemu case? It's basically just a host helper package, it should compile/run as normal package, yet i did not feel i wanted to maintain this as anything other than a host helper, that's why i used the "@broken" trick. I also did not want to mix it with the existing full qemu package, so thats why i ended up this way. |
@diizzyy ok, updated to 4.8.1 and done the suggested changes. |
de6784d
to
69cab9a
Compare
Great, I think the qemu case is valid so it's fine as it is right now. |
I personally don't mind but I don't know the official stance on sprinkling systemd files over the place. |
@diizzyy Good point, found a better candidate for openwrt: |
@diizzyy ok, added your suggested changes and switched from netbios to wsdd2 by default. Give it a try and if you are happy, maybe we can merge this before the 18.06 release? |
@Andy2244 |
@diizzyy No worries, i'm just glad someone finally had the time reviewing it and all changes applied. PS: Seems build-bot is acting up again... |
trivial update
|
Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
PS: yay travis is happy again! |
@diizzyy So whats left for me to-do, to get this merged? Do i need to rally/find additional reviewers? |
I'll see no reason to not merge it, so here we go :) |
@jow- cool thanks, seems my 6 month odyssey is finally over, now i can just hope all the testing was worth it and hopefully this fails only on a few targets :) |
Some initial feedback without much further testing -- building samba4 with all options enabled on bcm53xx fails due to missing dependencies:
The libpam dependency looks odd, given the "--without-pam" parameter in CONFIGURE_ARGS. |
@val-kulkov
|
More on the same topic:
My host is Ubuntu 16.04. The target, again, is bcm53xx. |
Thanks, this seems strange the ldap libs should come from |
Re the libpam dependency. "CONFIG_PACKAGE_libpam=y" in my .config is what might be triggering this dependency. I wish I had a little more time to investigate this further right now... Will try but cannot promise a quick turnaround. |
oki, will also try with |
@Andy2244 |
yeah guess we need to add more: |
The addition of "+PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam" to line 52 in Makefile solved the issue for me. All five samba4 packages compiled successfully. Mysteriously, there were no complaints about liblber or libldap this time. |
Sorry, was at IETF 102. What was the question? |
@pprindeville |
Maintainer: me
Compile tested: arm/mips (master)
Run tested: arm/mvebu (master)
Description:
This is my samba 4.8 package, it includes the server with vfs plugin support and tools, with extended config options (fileserver, netbios, ad-dc, winbind, avahi). It also includes a WSD Daemon to replace netbios, so Win10 clients can see samba shares via explorer.
The corresponding luci-ui package openwrt/luci#1985 was already merged.
Signed-off-by: Andy Walsh andy.walsh44+github@gmail.com