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

iptables: 1.6.2 -> 1.8.2 #51252

Merged
merged 1 commit into from Dec 3, 2018
Merged

iptables: 1.6.2 -> 1.8.2 #51252

merged 1 commit into from Dec 3, 2018

Conversation

c0bw3b
Copy link
Contributor

@c0bw3b c0bw3b commented Nov 29, 2018

Motivation for this change

Version bump
+ enabled BPF compiler by default since BPF is the future of Linux packet filtering.
It adds the nfbpf_compile command which compiles a PCAP expression into a BPF bytecode that can then be used in a rule.

Changelog 1.8.0:
https://www.netfilter.org/projects/iptables/files/changes-iptables-1.8.0.txt

Changelog 1.8.1:
https://www.netfilter.org/projects/iptables/files/changes-iptables-1.8.1.txt

Changelog 1.8.2:
https://www.netfilter.org/projects/iptables/files/changes-iptables-1.8.2.txt

/cc @fpletz as maintainer

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

$ nix path-info -sS /nix/store/mdm7f4mka3dqdkvj1nz8gckzzad1hqqq-iptables-1.6.2
/nix/store/mdm7f4mka3dqdkvj1nz8gckzzad1hqqq-iptables-1.6.2          2289496        27871656

$ nix path-info -sS /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2
/nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2          2475784        30194448

$ /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2/bin/iptables --version
iptables v1.8.2 (legacy)

$ /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2/bin/iptables-nft --version
iptables v1.8.2 (nf_tables)

$ /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2/bin/nfbpf_compile 
Usage:    /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2/bin/nfbpf_compile [link] '<program>'

          link is a pcap linklayer type:
          one of EN10MB, RAW, SLIP, ...

Examples: /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2/bin/nfbpf_compile RAW 'tcp and greater 100'
          /nix/store/5wnbybbm1nifhh4a931vb9lnrf40hz08-iptables-1.8.2/bin/nfbpf_compile EN10MB 'ip proto 47'

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Nov 29, 2018

Meh? What's wrong with brave version ?
Fixed in fe6a9a3

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Nov 29, 2018

@GrahamcOfBorg eval

@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: iptables

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

Timed out, unknown build status on x86_64-linux (full log)

Attempted: iptables

Partial log (click to expand)

cannot build derivation '/nix/store/lxjbmp0r64s27njghkfxma0v4r9asg6k-libtool-2.4.6.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/r8jnpih5b04h7mhzkk9c264hqnp3n7fx-?id=51d374ba41ae4f1bb851228c06b030b83dd2092f.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/6mf094y2wmh8m5h8f308kqxa78sl7i71-?id=5839d7fe62ff667af7132fc7d589b386951f27b3.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/alv9l7ams4qsyfay4d3kias1kqnamdpk-?id=907e429d7548157016cd51aba4adc5d0c7d9f816.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/vk6yhg7qzjw5rja62bvajwdnc67xwwvx-hook.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/ckp6g1p3rfgbwm9ha5819bfj7sml3phn-iptables-1.8.2.tar.bz2.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/jbq3cxy1d1dz7fvk5rvk5wzyvwk3xvn1-flex-2.6.4.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/5ygcr5c10psgj9j56l6ndqny0b6n7g73-libpcap-1.8.1.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/ixi1xvdaiv9shijkagilzys6x7whsqbd-iptables-1.8.2.drv': 13 dependencies couldn't be built
error: build of '/nix/store/ixi1xvdaiv9shijkagilzys6x7whsqbd-iptables-1.8.2.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: iptables

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2/lib  /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2/bin  /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2/sbin
patching script interpreter paths in /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2
checking for references to /build/ in /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2...
moving /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2/sbin/* to /nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/hsd7cxchwbmarsid0nr071nbaagp82af-iptables-1.8.2-dev
strip is /nix/store/0z21vv6i3bg0p5k7pf0cg5qzv2psnpr7-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/hsd7cxchwbmarsid0nr071nbaagp82af-iptables-1.8.2-dev/lib
patching script interpreter paths in /nix/store/hsd7cxchwbmarsid0nr071nbaagp82af-iptables-1.8.2-dev
checking for references to /build/ in /nix/store/hsd7cxchwbmarsid0nr071nbaagp82af-iptables-1.8.2-dev...
/nix/store/mn46pgpia89gmb0kvqgbcdl80922lpvk-iptables-1.8.2

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Nov 30, 2018

@GrahamcOfBorg test firewall

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

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

Partial log (click to expand)

Cannot nix-instantiate `tests.firewall' because:
error: while evaluating 'recursiveUpdate' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:415:26, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:148:28:
while evaluating 'recursiveUpdateUntil' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:384:37, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:416:5:
while evaluating 'zipAttrsWith' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:347:21, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:394:8:
while evaluating 'zipAttrsWithNames' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:332:33, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:347:27:
while evaluating the attribute 'firewall' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/nixos/tests/all-tests.nix:74:3:
while evaluating 'handleTest' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/nixos/tests/all-tests.nix:17:22, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/nixos/tests/all-tests.nix:74:14:
while evaluating 'discoverTests' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/nixos/tests/all-tests.nix:13:19, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/nixos/tests/all-tests.nix:18:5:
access to path '/nix/store/451p22qq6jira4d5q8f8wcn7cfcb28g1-grahamc-aarch64-community-2' is forbidden in restricted mode

@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.firewall

Partial log (click to expand)

error: while evaluating 'recursiveUpdate' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:415:26, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:148:28:
while evaluating 'recursiveUpdateUntil' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:384:37, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:416:5:
while evaluating 'zipAttrsWith' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:347:21, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:394:8:
while evaluating 'zipAttrsWithNames' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:332:33, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:347:27:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/lists.nix:113:41, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/attrsets.nix:347:46:
while evaluating the attribute 'firewall' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/nixos/tests/all-tests.nix:74:3:
while evaluating 'handleTest' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/nixos/tests/all-tests.nix:17:22, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/nixos/tests/all-tests.nix:74:14:
while evaluating 'discoverTests' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/nixos/tests/all-tests.nix:13:19, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/nixos/tests/all-tests.nix:18:5:
access to path '/nix/store/in8bi5hrb1lii8rq9pfcsbw2g969lq8y-gleber-bastion' is forbidden in restricted mode

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Nov 30, 2018

@GrahamcOfBorg build nixosTests.firewall

@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: nixosTests.firewall

Partial log (click to expand)

while evaluating the attribute 'linux_4_14' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/top-level/all-packages.nix:14377:3:
while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:108:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/top-level/all-packages.nix:14377:16:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:67:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:112:8:
while evaluating anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/os-specific/linux/kernel/linux-4.14.nix:1:1, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:69:12:
while evaluating 'buildLinux' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/top-level/all-packages.nix:14675:16, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/os-specific/linux/kernel/linux-4.14.nix:5:1:
while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:108:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/top-level/all-packages.nix:14675:23:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:67:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:112:8:
while evaluating anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/os-specific/linux/kernel/generic.nix:1:1, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/lib/customisation.nix:69:12:
assertion failed at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndndx-vm/pkgs/os-specific/linux/kernel/generic.nix:51:1

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: nixosTests.firewall

Partial log (click to expand)

cannot build derivation '/nix/store/zgb8vbjybmybh1kirl0rgmkbmhqdf85g-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1k2gvqy8pd2z6hkicl26zrfrhvr188vl-run-nixos-vm.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/bm72a0lxw4q4g0y5d47gmf37vnkxgnis-run-nixos-vm.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/s9f0xcw3ay2wdjrf1ll4hb8r4bpn54n2-run-nixos-vm.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/5mjlnbyrzqmj8886af9xyak308ac2y06-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/qidxacsb9bfnrascvkj7kihwn58b43hg-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/z5vbhpbskaslvssxdvnhni7638kbbc1v-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/7xlabicykwrnv1ygrljk5glia3b30s4k-nixos-test-driver-firewall.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/ndxmf9gwlj65r11gz764801vrx5xy0v1-vm-test-run-firewall.drv': 1 dependencies couldn't be built
error: build of '/nix/store/ndxmf9gwlj65r11gz764801vrx5xy0v1-vm-test-run-firewall.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: nixosTests.firewall

Partial log (click to expand)

cannot build derivation '/nix/store/jhfns0kfv7nn6xs3zldsansidw0s392m-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2m7566zvym0qrc31jwaj65c567mid8ys-run-nixos-vm.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/4bb55fpbn0c4vy920wp081qg3n7nxzk0-run-nixos-vm.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/8y31ir7q1rf4n88y93dxsa1fp66lx3fg-run-nixos-vm.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/46k1zr6sb1fa5pzimfr9bga7ybc61xva-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/9nzgxqgxjvp04xysn8za0myiq0gd246n-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/p0dd8ak43shw62h1d2qfd2yiawsrl4xd-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rv39qdbglvkjaffmsyxybmil2fn86lfs-nixos-test-driver-firewall.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/4azjz743r0hq9a8wy68bxp3zhch496s6-vm-test-run-firewall.drv': 1 dependencies couldn't be built
error: build of '/nix/store/4azjz743r0hq9a8wy68bxp3zhch496s6-vm-test-run-firewall.drv' failed

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Dec 1, 2018

@GrahamcOfBorg build iptables

@c0bw3b c0bw3b merged commit 4f7df75 into NixOS:staging Dec 3, 2018
@c0bw3b c0bw3b deleted the pkg/iptables branch December 6, 2018 20:07
@hedning
Copy link
Contributor

hedning commented Dec 9, 2018

-lpcap snuck into the .la files, which confused strongswan:

libtool: link: gcc -shared  -fPIC -DPIC  .libs/connmark_listener.o .libs/connmark_plugin.o   -Wl,-rpath -Wl,/nix/store/k7d2sngxx2z562slxpa079hpp7byx5r0-iptables-1.8.2/lib -Wl,-rpath -Wl,/nix/store/k7d2sngxx2z562slxpa079hpp7byx5r0-iptables-1.8.2/lib -L/nix/store/k7d2sngxx2z562slxpa079hpp7byx5r0-iptables-1.8.2/lib /nix/store/k7d2sngxx2z562slxpa079hpp7byx5r0-iptables-1.8.2/lib/libip4tc.so /nix/store/k7d2sngxx2z562slxpa079hpp7byx5r0-iptables-1.8.2/lib/libip6tc.so -lpcap  -g -O2   -Wl,-soname -Wl,libstrongswan-connmark.so -o .libs/libstrongswan-connmark.so
/nix/store/jdlb06c0kp6sms277xcclfr3gdl8pb9r-binutils-2.30/bin/ld: cannot find -lpcap

We should add pruneLibtoolFiles to nativeBuildInputs I think.

c0bw3b added a commit to c0bw3b/nixpkgs that referenced this pull request Dec 9, 2018
Otherwise -lpcap gets propagated to reverse deps
This can break strongswan build for example
NixOS#51252 (comment)
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