aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/netfilter/package.az
blob: 3dea2b87eaea113b09e77dcc97a7ed1f777436f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package libmnl {
	description = "a minimalistic user-space library oriented to Netlink developers";
	website = "https://www.netfilter.org/projects/libmnl";
	anitya = 1663;

	version# = "1.0.5";
	source = remoteTar {
		url = "https://www.netfilter.org/projects/libmnl/files/"+
			"libmnl-"+version+".tar.bz2";
		checksum = "DN-vbbvQDpxXJm0TJ6xlluILvfrB86avrCTX50XyE9SEFSAZ_o8nuKc5Gu0Am7-u";
		compress = bzip2;
	};
	patches = [ "libbsd-sys-queue.patch" ];

	exec = make {
		configure = {
			"enable-static";
		};
	};

	inputs = [
		libbsd,
		kernel-headers,
	];
}

package libnftnl {
	description = "a userspace library providing a low-level netlink API to the in-kernel nf_tables subsystem";
	website = "https://www.netfilter.org/projects/libnftnl";
	anitya = 1681;

	version# = "1.3.1";
	source = remoteGit {
		url = "https://git.netfilter.org/libnftnl.git";
		tag = "libnftnl-"+version;
		checksum = "91ou66K-I17iX6DB6hiQkhhC_v4DFW5iDGzwjVRNbJNEmKqowLZBlh3FY-ZDO0r9";
	};

	env = [
		"CFLAGS=-D_GNU_SOURCE",
	];

	exec = make {
		generate = "./autogen.sh";
		configure = {
			"enable-static";
		};
	};

	inputs = [
		automake,
		libtool,
		pkgconf,

		libmnl,
		kernel-headers,
	];

	runtime = [ libmnl ];
}

package iptables {
	description = "the userspace command line program used to configure the Linux 2.4.x and later packet filtering ruleset";
	website = "https://www.netfilter.org/projects/iptables";
	anitya = 1394;

	version# = "1.8.13";
	source = remoteGit {
		url = "https://git.netfilter.org/iptables.git";
		tag = "v"+version;
		checksum = "TUA-cFIAsiMvtRR-XzQvXzoIhJUOc9J2gQDJCbBRjmgmVfGfPTCf58wL7e-cUKVQ";
	};

	early = `
rm \
	extensions/libxt_connlabel.txlate \
	extensions/libxt_conntrack.txlate
sed -i \
	's/de:ad:0:be:ee:ff/DE:AD:00:BE:EE:FF/g' \
	extensions/libebt_dnat.txlate \
	extensions/libebt_snat.txlate
`;

	bin = [ "bash" ];
	exec = make {
		generate = "./autogen.sh";
		configure = {
			"enable-static";
		};
		preCheck = `
chmod +w /etc/ && ln -s ../usr/src/iptables/etc/ethertypes /etc/
`;
	};

	inputs = [
		automake,
		libtool,
		pkgconf,
		bash,
		python,

		libnftnl,
		kernel-headers,
	];

	runtime = [ libnftnl ];
}