Skip to content
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

samba: 4.12.6 -> 4.13.3 #105486

Merged
merged 4 commits into from Dec 23, 2020
Merged

samba: 4.12.6 -> 4.13.3 #105486

merged 4 commits into from Dec 23, 2020

Conversation

bachp
Copy link
Member

@bachp bachp commented Nov 30, 2020

Motivation for this change

Update to latest Samba version: https://www.samba.org/samba/history/samba-4.13.2.html

Continuation of #99059 which seems to be stale.

A patch is backported from samba master to make it build on darwin. The patches can't directly be applied to 4.13.x so fetchpatch is not an option.

Things done

Using this on my main file server since more than two weeks.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@bachp bachp changed the title Samba 4.13.2 samba: 4.12.6 -> 4.13.2 Nov 30, 2020
@bachp bachp requested a review from Izorkin November 30, 2020 20:32
@ofborg ofborg bot requested a review from aneeshusa November 30, 2020 20:52
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 30, 2020

Result of nixpkgs-review pr 105486 1 on darwin

17 packages marked as broken and skipped:
  • almanah
  • atom
  • atom-beta
  • gnome-recipes
  • gnome3.nautilus-python
  • kodiPlugins.inputstream-adaptive
  • kodiPlugins.joystick
  • kodiPlugins.pvr-hdhomerun
  • kodiPlugins.pvr-hts
  • kodiPlugins.pvr-iptvsimple
  • kodiPlugins.steam-controller
  • kodiPlugins.vfs-libarchive
  • kodiPlugins.vfs-sftp
  • pympress
  • python37Packages.python-vlc
  • python38Packages.python-vlc
  • python39Packages.python-vlc
6 packages failed to build:
  • enum4linux
  • python37Packages.pysmbc
  • python38Packages.pysmbc
  • python39Packages.pysmbc
  • samba (samba4)
  • sambaFull (samba4Full)

samba:

[2217/3551] Compiling nsswitch/wb_reqtrans.c
[2218/3551] Compiling lib/ldb/pyldb_util.c
../../source3/libsmb/libsmb_stat.c:105:6: error: no member named 'st_atim' in 'struct stat'
        st->st_atim = access_time_ts;
        ~~  ^
../../source3/libsmb/libsmb_stat.c:106:6: error: no member named 'st_ctim' in 'struct stat'
        st->st_ctim = change_time_ts;
        ~~  ^
../../source3/libsmb/libsmb_stat.c:107:6: error: no member named 'st_mtim' in 'struct stat'
        st->st_mtim = write_time_ts;
        ~~  ^
../../source3/libsmb/libsmb_stat.c:114:6: error: no member named 'st_atim' in 'struct stat'
        st->st_atim = stex->st_ex_atime;
        ~~  ^
../../source3/libsmb/libsmb_stat.c:115:6: error: no member named 'st_ctim' in 'struct stat'
        st->st_ctim = stex->st_ex_ctime;
        ~~  ^
../../source3/libsmb/libsmb_stat.c:116:6: error: no member named 'st_mtim' in 'struct stat'
        st->st_mtim = stex->st_ex_mtime;
        ~~  ^
6 errors generated.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 1, 2020

Result of nixpkgs-review pr 105486 run on x86_64-linux 1

7 packages marked as broken and skipped:
  • gnome3.gnome-books
  • gnome3.gnome-documents
  • libsForQt512.elisa
  • python37Packages.baselines
  • python37Packages.rl-coach
  • rabbitvcs
  • xmonad_log_applet
2 packages failed to build:
  • obs-ndi
  • python39Packages.pytmx
153 packages built:
  • MIDIVisualizer
  • adapta-gtk-theme
  • almanah
  • atom
  • atom-beta
  • autofs5
  • bubblemail
  • calls
  • chrome-gnome-shell
  • cinnamon.cinnamon-common
  • cinnamon.cinnamon-control-center
  • cinnamon.cinnamon-gsettings-overrides
  • cinnamon.cinnamon-screensaver
  • clementine
  • clementineUnfree
  • dropbox-cli
  • elementary-planner
  • empathy (gnome3.empathy)
  • enum4linux
  • evolution-data-server (gnome3.evolution-data-server ,gnome3.evolution_data_server)
  • evolution-ews
  • far2l
  • feedreader
  • ffmpeg-full
  • folks (gnome3.folks)
  • gfbgraph (gnome3.gfbgraph)
  • gnome-online-accounts (gnome3.gnome-online-accounts ,gnome3.gnome_online_accounts)
  • gnome-photos (gnome3.gnome-photos)
  • gnome-recipes
  • gvfs (gnome2.gvfs)
  • gnome3.bijiben (gnome3.gnome-notes)
  • gnome3.cheese
  • gnome3.evolution
  • gnome3.file-roller
  • gnome3.geary
  • gnome3.gnome-applets
  • gnome3.gnome-boxes
  • gnome3.gnome-calendar
  • gnome3.gnome-contacts
  • gnome3.gnome-control-center (gnome3.gnome_control_center)
  • gnome3.gnome-flashback
  • gnome3.gnome-initial-setup
  • gnome3.gnome-maps
  • gnome3.gnome-music
  • gnome3.gnome-online-miners
  • gnome3.gnome-panel
  • gnome3.gnome-session (gnome3.gnome_session)
  • gnome3.gnome-shell (gnome3.gnome_shell)
  • gnome3.gnome-software
  • gnome3.gnome-terminal (gnome3.gnome_terminal)
  • gnome3.gnome-todo
  • gnome3.gnome-tweaks (gnome3.gnome-tweak-tool)
  • gnome3.gnome-user-share
  • grilo-plugins (gnome3.grilo-plugins)
  • gnome3.gvfs
  • libgdata (gnome3.libgdata)
  • libzapojit (gnome3.libzapojit)
  • gnome3.nautilus
  • gnome3.nautilus-python
  • gnome3.pomodoro
  • shotwell (gnome3.shotwell)
  • gnome3.totem
  • tracker-miners (gnome3.tracker-miners)
  • gnomeExtensions.gsconnect
  • gnomeExtensions.night-theme-switcher
  • handbrake
  • hydron
  • libsForQt5.elisa (kdeApplications.elisa ,libsForQt515.elisa)
  • kdeApplications.kdenetwork-filesharing
  • libsForQt5.kdenlive (kdeApplications.kdenlive ,libsForQt515.kdenlive)
  • kdeApplications.kio-extras
  • kodi
  • kodi-gbm
  • kodi-wayland
  • kodiGBM
  • kodiPlain (kodiPlugins.kodi)
  • kodiPlainWayland
  • kodiPlugins.inputstream-adaptive
  • kodiPlugins.joystick
  • kodiPlugins.kodi-platform
  • kodiPlugins.pvr-hdhomerun
  • kodiPlugins.pvr-hts
  • kodiPlugins.pvr-iptvsimple
  • kodiPlugins.steam-controller
  • kodiPlugins.vfs-libarchive
  • kodiPlugins.vfs-sftp
  • libsForQt5.phonon-backend-vlc (libsForQt515.phonon-backend-vlc)
  • libsForQt512.kdenlive
  • libsForQt512.phonon-backend-vlc
  • libsForQt514.elisa
  • libsForQt514.kdenlive
  • libsForQt514.phonon-backend-vlc
  • libvlc
  • liquidsoap
  • lutris
  • lutris-free
  • mailnagWithPlugins
  • manim
  • megaglest
  • minitube
  • mpd
  • obs-move-transition
  • obs-studio
  • obs-v4l2sink
  • obs-wlrobs
  • olive-editor
  • pantheon.elementary-calendar
  • pantheon.elementary-greeter
  • pantheon.elementary-session-settings
  • pantheon.extra-elementary-contracts
  • pantheon.wingpanel-indicator-datetime
  • pantheon.wingpanel-with-indicators
  • pipelight
  • playonlinux
  • printrun
  • pympress
  • python37Packages.gym
  • python37Packages.moderngl-window
  • python37Packages.pydub
  • python37Packages.pyglet
  • python37Packages.pysmbc
  • python37Packages.python-vlc
  • python37Packages.pytmx
  • python37Packages.roboschool
  • python38Packages.gym
  • python38Packages.moderngl-window
  • python38Packages.pydub
  • python38Packages.pyglet
  • python38Packages.pysmbc
  • python38Packages.python-vlc
  • python38Packages.pytmx
  • python38Packages.roboschool
  • python39Packages.gym
  • python39Packages.moderngl-window
  • python39Packages.pydub
  • python39Packages.pyglet
  • python39Packages.pysmbc
  • python39Packages.python-vlc
  • python39Packages.roboschool
  • samba (samba4)
  • sambaFull (samba4Full)
  • smbnetfs
  • soundkonverter
  • sssd
  • strawberry
  • system-config-printer
  • tribler
  • vlc (vlc_qt5)
  • webcamoid
  • wine (winePackages.full)
  • wine-staging
  • wineWowPackages.full
  • winetricks

Both linux failures are unrelated.

@bachp
Copy link
Member Author

bachp commented Dec 1, 2020

@SuperSandro2000 It looks like the issue on darwin was fixed on samba master: https://gitlab.com/samba-team/samba/-/commit/53a1d034f3e47ed3c5ec4f9b6ca0d2d695e8d873#39819601027099d9f300b2c257f529bac01b4ae2

I modified the patch to apply to 4.13.2 and included it in the build. Could you please verify if this fixes the issue?

@SuperSandro2000
Copy link
Member

Now it builds except that the tests for python38Packages.pysmbc fail with:

======================================================================
ERROR: tests.test_auth (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_auth
Traceback (most recent call last):
  File "/nix/store/px24kgsz8wpnfs0zv5zg28l66myzw3ki-python3-3.8.6/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/nix/store/px24kgsz8wpnfs0zv5zg28l66myzw3ki-python3-3.8.6/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/private/tmp/nix-build-python3.8-pysmbc-1.0.23.drv-0/pysmbc-1.0.23/tests/test_auth.py", line 1, in <module>
    import smbc
  File "/private/tmp/nix-build-python3.8-pysmbc-1.0.23.drv-0/pysmbc-1.0.23/smbc/__init__.py", line 2, in <module>
    from _smbc import *
ImportError: dlopen(/private/tmp/nix-build-python3.8-pysmbc-1.0.23.drv-0/pysmbc-1.0.23/_smbc.cpython-38-darwin.so, 2): Library not loaded: /private/tmp/nix-build-samba-4.13.2.drv-0/samba-4.13.2/bin/default/librpc/libndr.dylib
  Referenced from: /nix/store/gg3h25q5bsy6nsyg3w5akq6ijl5wc6al-samba-4.13.2/lib/libsmbclient.0.6.0.dylib
  Reason: image not found

Do you know if this could be an issue with samba or is this one with pysmbc?

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 105486 run on x86_64-darwin 1

17 packages marked as broken and skipped:
  • almanah
  • atom
  • atom-beta
  • gnome-recipes
  • gnome3.nautilus-python
  • kodiPlugins.inputstream-adaptive
  • kodiPlugins.joystick
  • kodiPlugins.pvr-hdhomerun
  • kodiPlugins.pvr-hts
  • kodiPlugins.pvr-iptvsimple
  • kodiPlugins.steam-controller
  • kodiPlugins.vfs-libarchive
  • kodiPlugins.vfs-sftp
  • pympress
  • python37Packages.python-vlc
  • python38Packages.python-vlc
  • python39Packages.python-vlc
3 packages failed to build:
  • python37Packages.pysmbc
  • python38Packages.pysmbc
  • python39Packages.pysmbc
3 packages built:
  • enum4linux
  • samba (samba4)
  • sambaFull (samba4Full)

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 105486 run on x86_64-linux 1

7 packages marked as broken and skipped:
  • gnome3.gnome-books
  • gnome3.gnome-documents
  • libsForQt512.elisa
  • python37Packages.baselines
  • python37Packages.rl-coach
  • rabbitvcs
  • xmonad_log_applet
2 packages failed to build:
  • obs-ndi
  • python39Packages.pytmx
153 packages built:
  • MIDIVisualizer
  • adapta-gtk-theme
  • almanah
  • atom
  • atom-beta
  • autofs5
  • bubblemail
  • calls
  • chrome-gnome-shell
  • cinnamon.cinnamon-common
  • cinnamon.cinnamon-control-center
  • cinnamon.cinnamon-gsettings-overrides
  • cinnamon.cinnamon-screensaver
  • clementine
  • clementineUnfree
  • dropbox-cli
  • elementary-planner
  • empathy (gnome3.empathy)
  • enum4linux
  • evolution-data-server (gnome3.evolution-data-server ,gnome3.evolution_data_server)
  • evolution-ews
  • far2l
  • feedreader
  • ffmpeg-full
  • folks (gnome3.folks)
  • gfbgraph (gnome3.gfbgraph)
  • gnome-online-accounts (gnome3.gnome-online-accounts ,gnome3.gnome_online_accounts)
  • gnome-photos (gnome3.gnome-photos)
  • gnome-recipes
  • gvfs (gnome2.gvfs)
  • gnome3.bijiben (gnome3.gnome-notes)
  • gnome3.cheese
  • gnome3.evolution
  • gnome3.file-roller
  • gnome3.geary
  • gnome3.gnome-applets
  • gnome3.gnome-boxes
  • gnome3.gnome-calendar
  • gnome3.gnome-contacts
  • gnome3.gnome-control-center (gnome3.gnome_control_center)
  • gnome3.gnome-flashback
  • gnome3.gnome-initial-setup
  • gnome3.gnome-maps
  • gnome3.gnome-music
  • gnome3.gnome-online-miners
  • gnome3.gnome-panel
  • gnome3.gnome-session (gnome3.gnome_session)
  • gnome3.gnome-shell (gnome3.gnome_shell)
  • gnome3.gnome-software
  • gnome3.gnome-terminal (gnome3.gnome_terminal)
  • gnome3.gnome-todo
  • gnome3.gnome-tweaks (gnome3.gnome-tweak-tool)
  • gnome3.gnome-user-share
  • grilo-plugins (gnome3.grilo-plugins)
  • gnome3.gvfs
  • libgdata (gnome3.libgdata)
  • libzapojit (gnome3.libzapojit)
  • gnome3.nautilus
  • gnome3.nautilus-python
  • gnome3.pomodoro
  • shotwell (gnome3.shotwell)
  • gnome3.totem
  • tracker-miners (gnome3.tracker-miners)
  • gnomeExtensions.gsconnect
  • gnomeExtensions.night-theme-switcher
  • handbrake
  • hydron
  • libsForQt5.elisa (kdeApplications.elisa ,libsForQt515.elisa)
  • kdeApplications.kdenetwork-filesharing
  • libsForQt5.kdenlive (kdeApplications.kdenlive ,libsForQt515.kdenlive)
  • kdeApplications.kio-extras
  • kodi
  • kodi-gbm
  • kodi-wayland
  • kodiGBM
  • kodiPlain (kodiPlugins.kodi)
  • kodiPlainWayland
  • kodiPlugins.inputstream-adaptive
  • kodiPlugins.joystick
  • kodiPlugins.kodi-platform
  • kodiPlugins.pvr-hdhomerun
  • kodiPlugins.pvr-hts
  • kodiPlugins.pvr-iptvsimple
  • kodiPlugins.steam-controller
  • kodiPlugins.vfs-libarchive
  • kodiPlugins.vfs-sftp
  • libsForQt5.phonon-backend-vlc (libsForQt515.phonon-backend-vlc)
  • libsForQt512.kdenlive
  • libsForQt512.phonon-backend-vlc
  • libsForQt514.elisa
  • libsForQt514.kdenlive
  • libsForQt514.phonon-backend-vlc
  • libvlc
  • liquidsoap
  • lutris
  • lutris-free
  • mailnagWithPlugins
  • manim
  • megaglest
  • minitube
  • mpd
  • obs-move-transition
  • obs-studio
  • obs-v4l2sink
  • obs-wlrobs
  • olive-editor
  • pantheon.elementary-calendar
  • pantheon.elementary-greeter
  • pantheon.elementary-session-settings
  • pantheon.extra-elementary-contracts
  • pantheon.wingpanel-indicator-datetime
  • pantheon.wingpanel-with-indicators
  • pipelight
  • playonlinux
  • printrun
  • pympress
  • python37Packages.gym
  • python37Packages.moderngl-window
  • python37Packages.pydub
  • python37Packages.pyglet
  • python37Packages.pysmbc
  • python37Packages.python-vlc
  • python37Packages.pytmx
  • python37Packages.roboschool
  • python38Packages.gym
  • python38Packages.moderngl-window
  • python38Packages.pydub
  • python38Packages.pyglet
  • python38Packages.pysmbc
  • python38Packages.python-vlc
  • python38Packages.pytmx
  • python38Packages.roboschool
  • python39Packages.gym
  • python39Packages.moderngl-window
  • python39Packages.pydub
  • python39Packages.pyglet
  • python39Packages.pysmbc
  • python39Packages.python-vlc
  • python39Packages.roboschool
  • samba (samba4)
  • sambaFull (samba4Full)
  • smbnetfs
  • soundkonverter
  • sssd
  • strawberry
  • system-config-printer
  • tribler
  • vlc (vlc_qt5)
  • webcamoid
  • wine (winePackages.full)
  • wine-staging
  • wineWowPackages.full
  • winetricks

@dasJ
Copy link
Member

dasJ commented Dec 19, 2020

4.13.3 is out by now.

The build system warns about the lack of icu, so I'd add it.

Additionally, Python 3 is supported since Samba 4.10, so switching does not break anything (I'm running a domain controller with it which works fine).
From the 4.13 changelog:

This is also the last release where it will be possible to build Samba (just the file server) with Python versions 2.6 and 2.7.
Samba 4.14 to be released in March 2021 will require Python 3.6 or later to build.

io_uring won't work unless you do

{
  nativeBuildInputs = [ patchelf ];
  postFixup = ''
    p="$out/lib/samba/vfs/io_uring.so"
    patchelf --set-rpath "$(patchelf --print-rpath "$p"):${liburing.lib}/lib" "$p"
  '';
}

However, you can not use the domain controller functionality unless you do

{
  nativeBuildInputs = [ python3.pkgs.wrapPython ];
  pythonPath = [ python3.pkgs.dnspython tdb ];
  postFixup = ''
    wrapPythonPrograms
  '';
}

@dasJ
Copy link
Member

dasJ commented Dec 19, 2020

Also this PR fixes these CVEs:

@bachp
Copy link
Member Author

bachp commented Dec 20, 2020

@SuperSandro2000 From what I can tell pysmbc doesn't build on darwin on master either
I think smbclient is broken too. I'm trying to figure out the reason but I'm not a darwin expert.

However I don't think we should block this PR if the issue was present on master before.

aneeshusa and others added 3 commits December 21, 2020 10:32
Previously, `vfs_snapper` was only built if `dbus` was found.
Now, `vfs_snapper` is enabled by default (on Linux)
and it requires dbus to be available:
```
Checking for dbus: not found
vfs_snapper is enabled but prerequisite dbus-1 package not found. Use
--with-shared-modules=!vfs_snapper to disable vfs_snapper support.
```

We could pass `--with-shared-modules=!vfs_snapper` to disable it,
but currently pass `--with-shared-modules=ALL`,
so add dbus as a dependency instead.
@bachp bachp changed the title samba: 4.12.6 -> 4.13.2 samba: 4.12.6 -> 4.13.3 Dec 21, 2020
@bachp
Copy link
Member Author

bachp commented Dec 21, 2020

I updated the PR to 4.13.3.

@bachp
Copy link
Member Author

bachp commented Dec 21, 2020

I checked and it seems smbclient on samba is broken since at least 19.03 on darwin.

@SuperSandro2000
Copy link
Member

However I don't think we should block this PR if the issue was present on master before.

Then just mark it as broken otherwise it blocks the PR for me.

smbclient does not properly link and when trying to run it it fails with
messages like:

dyld: Library not loaded: /private/tmp/nix-build-samba-4.7.12.drv-0/samba-4.7.12/bin/default/source3/libpopt-samba3-samba4.dylib
  Referenced from: result/bin/smbclient
  Reason: image not found
@bachp
Copy link
Member Author

bachp commented Dec 21, 2020

@SuperSandro2000 I marked it as broken on darwin

@doronbehar doronbehar merged commit 9210c47 into NixOS:master Dec 23, 2020
@bachp bachp deleted the samba-4.13.2 branch December 23, 2020 22:47
@dotlambda
Copy link
Member

The version on 20.09 should also have been updated: #110638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants