diff options
author | Piotr Bogdan <ppbogdan@gmail.com> | 2018-03-28 14:51:01 +0100 |
---|---|---|
committer | obadz <obadz-git@obadz.com> | 2018-03-28 23:50:42 +0100 |
commit | da9b564bede5539a392576223805cf4399ffe640 (patch) | |
tree | 7dd52b4604d24bbc1ee09337404d46c6fc0180a2 /pkgs/tools/networking | |
parent | e022366fb7e8a58d5dc07f8b19a087f76f3cc0c2 (diff) | |
download | nixlib-da9b564bede5539a392576223805cf4399ffe640.tar nixlib-da9b564bede5539a392576223805cf4399ffe640.tar.gz nixlib-da9b564bede5539a392576223805cf4399ffe640.tar.bz2 nixlib-da9b564bede5539a392576223805cf4399ffe640.tar.lz nixlib-da9b564bede5539a392576223805cf4399ffe640.tar.xz nixlib-da9b564bede5539a392576223805cf4399ffe640.tar.zst nixlib-da9b564bede5539a392576223805cf4399ffe640.zip |
ppp: fix build with newer kernel headers
The package would build but with some components missing, see https://github.com/NixOS/nixpkgs/issues/37926 and https://hydra.nixos.org/build/70939248/nixlog/1 -> CTRL-F error:
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r-- | pkgs/tools/networking/ppp/default.nix | 15 | ||||
-rw-r--r-- | pkgs/tools/networking/ppp/musl-fix-headers.patch | 10 |
2 files changed, 20 insertions, 5 deletions
diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index 570e85c32815..96016ee7b4f3 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -23,15 +23,30 @@ stdenv.mkDerivation rec { url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/rc_mksid-no-buffer-overflow?h=debian/2.4.7-1%2b4"; sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh"; }) + (fetchurl { + url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/0016-pppoe-include-netinet-in.h-before-linux-in.h.patch"; + sha256 = "1xnmqn02kc6g5y84xynjwnpv9cvrfn3nyv7h7r8j8xi7qf2aj4q8"; + }) ./musl-fix-headers.patch ]; buildInputs = [ libpcap ]; + postPatch = '' + # strip is not found when cross compiling with seemingly no way to point + # make to the right place, fixup phase will correctly strip + # everything anyway so we remove it from the Makefiles + for file in $(find -name Makefile.linux); do + substituteInPlace "$file" --replace '$(INSTALL) -s' '$(INSTALL)' + done + ''; + installPhase = '' + runHook preInstall mkdir -p $out/bin make install install -D -m 755 scripts/{pon,poff,plog} $out/bin + runHook postInstall ''; postFixup = '' diff --git a/pkgs/tools/networking/ppp/musl-fix-headers.patch b/pkgs/tools/networking/ppp/musl-fix-headers.patch index d24f62896840..030cc97d157f 100644 --- a/pkgs/tools/networking/ppp/musl-fix-headers.patch +++ b/pkgs/tools/networking/ppp/musl-fix-headers.patch @@ -89,12 +89,12 @@ index 3d3bf4e..b5f82d3 100644 use different frame types... sigh... */ diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h -index 9ab2eee..4d68147 100644 +index c4aaa6e..70aef85 100644 --- a/pppd/plugins/rp-pppoe/pppoe.h +++ b/pppd/plugins/rp-pppoe/pppoe.h -@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t; - - #include <netinet/in.h> +@@ -88,18 +88,6 @@ typedef unsigned long UINT32_t; + #include <linux/if_ether.h> + #endif -#ifdef HAVE_NETINET_IF_ETHER_H -#include <sys/types.h> @@ -108,9 +108,9 @@ index 9ab2eee..4d68147 100644 -#endif - - - /* Ethernet frame types according to RFC 2516 */ #define ETH_PPPOE_DISCOVERY 0x8863 + #define ETH_PPPOE_SESSION 0x8864 diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 6d71530..86d224e 100644 --- a/pppd/sys-linux.c |