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

mpd: add nfs and smb support #43934

Merged
merged 2 commits into from Aug 3, 2018
Merged

mpd: add nfs and smb support #43934

merged 2 commits into from Aug 3, 2018

Conversation

jfrankenau
Copy link
Member

Motivation for this change

MPD supports so-called storage plugins. This allows it to directly access NFS and SMB shares without the need for mounting them and is a useful feature in a satellite setup, see also #41367. To make use of them in NixOS the services.mpd.musicDirectory option needs to allow for more than just paths.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

cc @andir

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

@GrahamcOfBorg build mpd

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpd

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20
shrinking /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20/bin/mpd
gzipping man pages under /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20/share/man/
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20/bin 
patching script interpreter paths in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20
checking for references to /tmp/nix-build-mpd-0.20.20.drv-0 in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20...
/nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpd

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20
shrinking /nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20/bin/mpd
gzipping man pages under /nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20/share/man/
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20/bin
patching script interpreter paths in /nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20
checking for references to /build in /nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20...
/nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

Let's run the module test
@GrahamcOfBorg test mpd

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: tests.mpd

Partial log (click to expand)

while evaluating ‘hydraJob’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/lib/customisation.nix:157:14, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/nixos/release.nix:23:16:
while evaluating the attribute ‘drvPath’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/lib/customisation.nix:174:13:
while evaluating the attribute ‘drvPath’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/lib/customisation.nix:141:13:
while evaluating the attribute ‘buildCommand’ of the derivation ‘vm-test-run-mpd’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute ‘buildCommand’ of the derivation ‘nixos-test-driver-mpd’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute ‘buildCommand’ of the derivation ‘nixos-vm’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute ‘text’ of the derivation ‘run-nixos-vm’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating anonymous function at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/pkgs/build-support/closure-info.nix:9:1, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/nixos/modules/virtualisation/qemu-vm.nix:121:13:
assertion failed at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/pkgs/build-support/closure-info.nix:11:1

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

The test eval error seems unrelated. I just ran the test locally on this branch, looks good.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mpd

Partial log (click to expand)

                                                          ^
1 error generated.
make[2]: *** [Makefile:558: libnfs_la-socket.lo] Error 1
make[2]: Leaving directory '/private/tmp/nix-build-libnfs-3.0.0.drv-0/source/lib'
make[1]: *** [Makefile:462: all-recursive] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-libnfs-3.0.0.drv-0/source'
make: *** [Makefile:371: all] Error 2
builder for '/nix/store/jal6g9awparfzcj6fwdwg8p4dpmsxrx3-libnfs-3.0.0.drv' failed with exit code 2
cannot build derivation '/nix/store/apnmdplvx8iv0fd9sxw9007nd7qh92iy-mpd-0.20.20.drv': 1 dependencies couldn't be built
error: build of '/nix/store/apnmdplvx8iv0fd9sxw9007nd7qh92iy-mpd-0.20.20.drv' failed

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

Turns out libnfs and smbclient have been broken on darwin for a while, so these options should default to false on darwin in order for mpd to build.

@jfrankenau
Copy link
Member Author

OK, good to know. I've updated the PR accordingly.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.mpd

Partial log (click to expand)

serverALSA: running command: sync
serverALSA: exit status 0
test script finished in 113.92s
cleaning up
killing serverPulseAudio (pid 654)
killing client (pid 679)
killing serverALSA (pid 631)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/669qiymg6q5qs11i08q2lmr6v8n66q70-vm-test-run-mpd

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

@GrahamcOfBorg build mpd

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpd

Partial log (click to expand)

/nix/store/rlpfz72l8y3hb02w94vd4pb0dwgcq99l-mpd-0.20.20

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpd

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20
shrinking /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20/bin/mpd
gzipping man pages under /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20/share/man/
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20/bin
patching script interpreter paths in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20
checking for references to /build in /nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20...
/nix/store/bmdhss71qgq39blvy0c7r230fqw40ddd-mpd-0.20.20

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mpd

Partial log (click to expand)

 /nix/store/gv40kn2pfzwmqzwlinl18qr3464xs83m-coreutils-8.29/bin/install -c -m 644 doc/mpd.conf.5 '/nix/store/qzz1h1if565ah4h9n1al8fvygn5j6q8f-mpd-0.20.20/share/man/man5'
make[2]: Leaving directory '/private/tmp/nix-build-mpd-0.20.20.drv-0/source'
make[1]: Leaving directory '/private/tmp/nix-build-mpd-0.20.20.drv-0/source'
glibPreFixupPhase
post-installation fixup
gzipping man pages under /nix/store/qzz1h1if565ah4h9n1al8fvygn5j6q8f-mpd-0.20.20/share/man/
strip is /nix/store/qfxcr8c4fg7lkybrny9n2sb77bmippdx-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/qzz1h1if565ah4h9n1al8fvygn5j6q8f-mpd-0.20.20/bin
patching script interpreter paths in /nix/store/qzz1h1if565ah4h9n1al8fvygn5j6q8f-mpd-0.20.20
/nix/store/qzz1h1if565ah4h9n1al8fvygn5j6q8f-mpd-0.20.20

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@xeji xeji merged commit c9f3382 into NixOS:master Aug 3, 2018
@jfrankenau jfrankenau deleted the mpd-smb branch August 3, 2018 21:33
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

3 participants