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

Fixes the lldpd service not starting on NixOS 18.09 #46367

Merged
merged 1 commit into from Sep 11, 2018

Conversation

yesbox
Copy link
Contributor

@yesbox yesbox commented Sep 8, 2018

Backports a patch that will be included in later versions, no longer calling /bin/mkdir.
Fixes #44507.

  • 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.

@@ -10,6 +10,15 @@ stdenv.mkDerivation rec {
sha256 = "0lgiappbjm95r1m0xyxb6gzz4izcjixknbzq3s7pbqbsmhm642s5";
};

remove_backported_patch = version != "1.0.1";
Copy link
Member

Choose a reason for hiding this comment

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

Thats a clever pattern, but I guess it could lead to confusion. Won't the patch fail to apply on future versions anyways?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know, is that to be expected? I don't have previous experience backporting patches.

Seeing how it has been broken since #38718 five months ago without anyone noticing I figured something was needed. Nixos tests would be nice of course.

Copy link
Member

Choose a reason for hiding this comment

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

Since you've backported a patch that is already included upsteram (right?) the patch will fail to apply after the next update, since the relevant code is already changed.

Thanks for your effort in fixing this :)

Copy link
Contributor Author

@yesbox yesbox Sep 11, 2018

Choose a reason for hiding this comment

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

OK, good. I'll remove the extra cruft. Indeed this is from upstream and confirmed to be in the next release.

lldpd/lldpd@b0ca585
lldpd/lldpd@90a5086

Copy link
Member

Choose a reason for hiding this comment

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

Great :) Don't forget to ping me once you've removed it as github doesn't always send notifications on code changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed new commit, should be all good now.

remove_backported_patch = version != "1.0.1";
patches = [
# Should be removed in the version after 1.0.1 as this will be included.
(fetchpatch {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a short comment describing what this patch is for and/or a name.

@yesbox yesbox force-pushed the lldpd_nixos_18.09_fix branch 3 times, most recently from 3d2b5d0 to 646877d Compare September 11, 2018 16:19
Backports a patch that will be included in later upstream versions.
The patch removes a call to /bin/mkdir.
@timokau
Copy link
Member

timokau commented Sep 11, 2018

@GrahamcOfBorg build lldpd

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: lldpd

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lldpd

Partial log (click to expand)

checking for references to /build in /nix/store/xkvd86ywx00g1f0gravxj2mph21zyvdh-lldpd-1.0.1-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/nl8x71cpipbwcinzws1q2z0qhi91qvni-lldpd-1.0.1-man
gzipping man pages under /nix/store/nl8x71cpipbwcinzws1q2z0qhi91qvni-lldpd-1.0.1-man/share/man/
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/nl8x71cpipbwcinzws1q2z0qhi91qvni-lldpd-1.0.1-man
checking for references to /build in /nix/store/nl8x71cpipbwcinzws1q2z0qhi91qvni-lldpd-1.0.1-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/hnl7yqry4w9ikxicq70qx1nf6plvn9g4-lldpd-1.0.1-doc
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/hnl7yqry4w9ikxicq70qx1nf6plvn9g4-lldpd-1.0.1-doc
checking for references to /build in /nix/store/hnl7yqry4w9ikxicq70qx1nf6plvn9g4-lldpd-1.0.1-doc...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lldpd

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/7c7lkj1al739vhmwac53rch8rynckm8b-lldpd-1.0.1-man
gzipping man pages under /nix/store/7c7lkj1al739vhmwac53rch8rynckm8b-lldpd-1.0.1-man/share/man/
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/7c7lkj1al739vhmwac53rch8rynckm8b-lldpd-1.0.1-man
checking for references to /build in /nix/store/7c7lkj1al739vhmwac53rch8rynckm8b-lldpd-1.0.1-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/ivfnv8v3hx6mv67j1h2qg2hr26knkf25-lldpd-1.0.1-doc
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ivfnv8v3hx6mv67j1h2qg2hr26knkf25-lldpd-1.0.1-doc
checking for references to /build in /nix/store/ivfnv8v3hx6mv67j1h2qg2hr26knkf25-lldpd-1.0.1-doc...
/nix/store/fjxvsz4jalhmgn0xkf6qksazs0bn64g8-lldpd-1.0.1

@timokau timokau merged commit eae5890 into NixOS:master Sep 11, 2018
@yesbox yesbox deleted the lldpd_nixos_18.09_fix branch September 22, 2018 10:31
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