Skip to contentSkip to conversation

nftables/libnftables packages for Fedora

PATCH Kevin Fenzi 5 participants 16 messages Jan 12, 2014 – Jan 15, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Greetings.

I apologize in advance if this is not the right place to discuss this. If it's not, please point me the right direction and I will move it there. :)

I am packaging up libnftables/nftables for Fedora.

libnftables has already passed review:
https://bugzilla.redhat.com/show_bug.cgi?id=1036319

and nftables has yet to be reviewed:
https://bugzilla.redhat.com/show_bug.cgi?id=1036320
but has some comments. (more always welcome)

I have some questions/comments/suggestions based on the packaging that I thought would be good to run by nftables developers.

1. Completely minor, but noted in review of both packages that the COPYING file has the old fsf address in it. Would be great if you could update to the new one.
https://fedoraproject.org/wiki/Common_Rpmlint_issues#incorrect-fsf-address

2. There is some question about the /etc/nftables/* scripts. In Fedora land, things in /etc/ should be config files, but these aren't really config files. They call nft without a full path (/usr/sbin/nft, etc). Should these really be in /usr/share ? or is it expected users will modify them? Could you clarify the use case there?

3. nftables hard codes installing as root, which is no good for building packages (patch attached that just removes the owner/group setting there).

4. nftables sets make to '-s' (ie, silent) on subdirs. It's good for building packages to have verbose output in build logs. Would it be possible to remove that? If not I can patch it out here.

5. Is there currently, or planned any version coupling between libnftables and nftables? Obviously we want them to stay somewhat close, but down the road will compat be just by soname/version?

6. I recently enabled the xml stuff in libnftables and am seeing a number of tests fail:

parsing xmlfiles/55-rule-real.xml: FAILED (Invalid argument) and
parsing xmlfiles/74-set.xml: FAILED (Invalid argument)
mxml: <!-- nft add rule filter output ct secmark 0 counter --> cannot be a second root node after <nftables>

Full build log at:
http://kojipkgs.fedoraproject.org//packages/libnftables/0/0.4.20140111git.fc21/data/logs/x86_64/build.log

Are these expected? The Invalid argument might be because it doesn't have nftables available in the build kernel? But the json tests work. :(

Thanks. Again, if I should send this somewhere else instead, just let me know. Comments welcome here, direct email and/or in the above review bugs. ;)

kevin

doc/Makefile.in +2 -2
diff -Nur nftables-0.0.orig/doc/Makefile.in nftables-0.0/doc/Makefile.in
@@ -10,11 +10,11 @@
 		@echo -e "  INSTALL\tdoc"
 		if test -n "$(mandocs-y)"; then \
 			$(MKDIR_P) $(DESTDIR)/${mandir}/man8 ;\
-			$(INSTALL) -m 755 -o root -g root $(mandocs-y) \
+			$(INSTALL) -m 755 -p $(mandocs-y) \
 					$(DESTDIR)/${mandir}/man8/ ;\
 		fi
 		if test -n "$(pdfdocs-y)"; then \
 			$(MKDIR_P) $(DESTDIR)/${pdfdir} ;\
-			$(INSTALL) -m 755 -o root -g root $(pdfdocs-y) \
+			$(INSTALL) -m 755 -p $(pdfdocs-y) \
 					$(DESTDIR)/${pdfdir}/ ;\
 		fi
files/Makefile.in +1 -1
diff -Nur nftables-0.0.orig/files/Makefile.in nftables-0.0/files/Makefile.in
@@ -1,4 +1,4 @@
 install:
 	@echo -e "  INSTALL\tfiles"
 	$(MKDIR_P) $(DESTDIR)/$(confdir)
-	$(INSTALL) -m 755 -o root -g root $(SUBDIR)nftables/* $(DESTDIR)/$(confdir)/
+	$(INSTALL) -m 755 -p $(SUBDIR)nftables/* $(DESTDIR)/$(confdir)/
Makefile.rules.in +1 -1
diff -Nur nftables-0.0.orig/Makefile.rules.in nftables-0.0/Makefile.rules.in
@@ -61,7 +61,7 @@
 $(1)-install:
 			@echo -e "  INSTALL\t$1"
 			$(MKDIR_P) $$(DESTDIR)/$$($(1)-destdir)
-			$(INSTALL) -m 755 -o root -g root \
+			$(INSTALL) -m 755 -p \
 				$(SUBDIR)$(1) \
 				$$(DESTDIR)/$$($(1)-destdir)/$(1)
 install_targets		+= $(1)-install
#1 lore raw
Quoted 7 lines · Kevin Fenzi

Greetings.

I apologize in advance if this is not the right place to discuss this. If it's not, please point me the right direction and I will move it there. :)

I am packaging up libnftables/nftables for Fedora.

good to know! :)

Quoted 7 lines

2. There is some question about the /etc/nftables/* scripts. In Fedora land, things in /etc/ should be config files, but these aren't really config files. They call nft without a full path (/usr/sbin/nft, etc). Should these really be in /usr/share ? or is it expected users will modify them? Could you clarify the use case there?

There is a patch from me to address this:
http://patchwork.ozlabs.org/patch/304866/
Feel free to test it and comment.

I have the same issue in the Debian land. I applied the patch locally in the package as a workaround.

The patch is not applied yet to upstream.

Quoted 10 lines

6. I recently enabled the xml stuff in libnftables and am seeing a number of tests fail:

parsing xmlfiles/55-rule-real.xml: [31mFAILED [0m (Invalid argument) and
parsing xmlfiles/74-set.xml: [31mFAILED [0m (Invalid argument)
mxml: <!-- nft add rule filter output ct secmark 0 counter --> cannot be a second root node after <nftables>

I can't see the libmxml version in the build log. Which version of libmxml are you using?
Seem that your version of libmxml treats XML comments different than in my version (libmxml 2.6 from Debian).

Also I guess you are using an outdated snapshot of libnftables. Some important changes happened to the XML/JSON parsers.

Anyway, thanks for the report, I'm going to review the XML parser.

Quoted 5 lines

Are these expected? The Invalid argument might be because it doesn't have nftables available in the build kernel? But the json tests work. :(

Not expected at all.

These tests simply parse the XML/JSON input, they don't send anything to the kernel.

Quoted 3 lines

Thanks. Again, if I should send this somewhere else instead, just let me know. Comments welcome here, direct email and/or in the above review bugs. ;)

I think this is the right place.

Thanks.

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

[ re-sending as I forgot to cc the list ]

On Sun, 12 Jan 2014 22:16:35 +0100
Arturo Borrero Gonzalez <[email protected]> wrote:

...snip...

Quoted 8 lines

There is a patch from me to address this:
http://patchwork.ozlabs.org/patch/304866/
Feel free to test it and comment.

I have the same issue in the Debian land. I applied the patch locally in the package as a workaround.

The patch is not applied yet to upstream.

Cool.

That addresses the part of the issue where the interpreter isn't fully specified, but still the question is if these are config files that users are expected to modify or are noarch scripts provided by the package that are expected to be read-only (ie, /etc vs /usr/share)?

Quoted 10 lines
Quoted 9 lines

6. I recently enabled the xml stuff in libnftables and am seeing a number of tests fail:

parsing xmlfiles/55-rule-real.xml: [31mFAILED [0m (Invalid argument) and
parsing xmlfiles/74-set.xml: [31mFAILED [0m (Invalid argument)
mxml: <!-- nft add rule filter output ct secmark 0 counter --> cannot be a second root node after <nftables>

Quoted 4 lines

I can't see the libmxml version in the build log. Which version of libmxml are you using?
Seem that your version of libmxml treats XML comments different than in my version (libmxml 2.6 from Debian).

2.7 here. ;) So, likely that changed between 2.6 and 2.7?

Quoted 2 lines

Also I guess you are using an outdated snapshot of libnftables. Some important changes happened to the XML/JSON parsers.

Hum, thats the 2014-01-11 snapshot. Not very old.

Quoted 1 line

Anyway, thanks for the report, I'm going to review the XML parser.

Thank you.

Quoted 9 lines
Quoted 4 lines

Are these expected? The Invalid argument might be because it doesn't have nftables available in the build kernel? But the json tests work. :(

Not expected at all.

These tests simply parse the XML/JSON input, they don't send anything to the kernel.

ok. Great

Quoted 6 lines
Quoted 3 lines

Thanks. Again, if I should send this somewhere else instead, just let me know. Comments welcome here, direct email and/or in the above review bugs. ;)

I think this is the right place.

Excellent. Thanks.

kevin

#3 lore raw

Hi,

Quoted 33 lines · Kevin Fenzi

[ re-sending as I forgot to cc the list ]

On Sun, 12 Jan 2014 22:16:35 +0100
Arturo Borrero Gonzalez <[email protected]> wrote:

...snip...

Quoted 8 lines

There is a patch from me to address this:
http://patchwork.ozlabs.org/patch/304866/
Feel free to test it and comment.

I have the same issue in the Debian land. I applied the patch locally in the package as a workaround.

The patch is not applied yet to upstream.

Cool.

That addresses the part of the issue where the interpreter isn't fully specified, but still the question is if these are config files that users are expected to modify or are noarch scripts provided by the package that are expected to be read-only (ie, /etc vs /usr/share)?

Quoted 10 lines
Quoted 9 lines

6. I recently enabled the xml stuff in libnftables and am seeing a number of tests fail:

parsing xmlfiles/55-rule-real.xml: [31mFAILED [0m (Invalid argument) and
parsing xmlfiles/74-set.xml: [31mFAILED [0m (Invalid argument)
mxml: <!-- nft add rule filter output ct secmark 0 counter --> cannot be a second root node after <nftables>

Quoted 6 lines
Quoted 4 lines

I can't see the libmxml version in the build log. Which version of libmxml are you using?
Seem that your version of libmxml treats XML comments different than in my version (libmxml 2.6 from Debian).

2.7 here. ;) So, likely that changed between 2.6 and 2.7?

@Arturo: please investigate this issue as the first release is coming soon, otherwise we'll have to restrict xml support to one of the libmxml versions. I think it would be better if libnftables supports latest version of libmxml as it's the natural move on most distributions to pack the last software version. Moreover, it would be good to contact the author to know if he has plans to keep a stable API/ABI in upcoming releases of libmxml, this is very important for third party software.

#4 lore raw
Quoted 9 lines · Pablo Neira Ayuso

@Arturo: please investigate this issue as the first release is coming soon, otherwise we'll have to restrict xml support to one of the libmxml versions. I think it would be better if libnftables supports latest version of libmxml as it's the natural move on most distributions to pack the last software version. Moreover, it would be good to contact the author to know if he has plans to keep a stable API/ABI in upcoming releases of libmxml, this is very important for third party software.

Sure,

I plan to make the required changes in libnftables to support the latest version of libmxml.

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
In reply to Arturo Borrero Gonzalez

[ re-sending as I forgot to cc the list ]

On Sun, 12 Jan 2014 22:16:35 +0100
Arturo Borrero Gonzalez <[email protected]> wrote:

...snip...

Quoted 8 lines

There is a patch from me to address this:
http://patchwork.ozlabs.org/patch/304866/
Feel free to test it and comment.

I have the same issue in the Debian land. I applied the patch locally in the package as a workaround.

The patch is not applied yet to upstream.

Cool.

That addresses the part of the issue where the interpreter isn't fully specified, but still the question is if these are config files that users are expected to modify or are noarch scripts provided by the package that are expected to be read-only (ie, /etc vs /usr/share)?

Quoted 10 lines
Quoted 9 lines

6. I recently enabled the xml stuff in libnftables and am seeing a number of tests fail:

parsing xmlfiles/55-rule-real.xml: [31mFAILED [0m (Invalid argument) and
parsing xmlfiles/74-set.xml: [31mFAILED [0m (Invalid argument)
mxml: <!-- nft add rule filter output ct secmark 0 counter --> cannot be a second root node after <nftables>

Quoted 4 lines

I can't see the libmxml version in the build log. Which version of libmxml are you using?
Seem that your version of libmxml treats XML comments different than in my version (libmxml 2.6 from Debian).

2.7 here. ;) So, likely that changed between 2.6 and 2.7?

Quoted 2 lines

Also I guess you are using an outdated snapshot of libnftables. Some important changes happened to the XML/JSON parsers.

Hum, thats the 2014-01-11 snapshot. Not very old.

Quoted 1 line

Anyway, thanks for the report, I'm going to review the XML parser.

Thank you.

Quoted 9 lines
Quoted 4 lines

Are these expected? The Invalid argument might be because it doesn't have nftables available in the build kernel? But the json tests work. :(

Not expected at all.

These tests simply parse the XML/JSON input, they don't send anything to the kernel.

ok. Great

Quoted 6 lines
Quoted 3 lines

Thanks. Again, if I should send this somewhere else instead, just let me know. Comments welcome here, direct email and/or in the above review bugs. ;)

I think this is the right place.

Excellent. Thanks.

kevin

#6 lore raw
Quoted 14 lines · Kevin Fenzi

[ re-sending as I forgot to cc the list ]

On Sun, 12 Jan 2014 22:16:35 +0100
Arturo Borrero Gonzalez <[email protected]> wrote:

...snip...

Quoted 7 lines

There is a patch from me to address this:
http://patchwork.ozlabs.org/patch/304866/
Feel free to test it and comment.

I have the same issue in the Debian land. I applied the patch locally in the package as a workaround.

Quoted 8 lines
Quoted 1 line

The patch is not applied yet to upstream.

Cool.

That addresses the part of the issue where the interpreter isn't fully specified, but still the question is if these are config files that users are expected to modify or are noarch scripts provided by the package that are expected to be read-only (ie, /etc vs /usr/share)?

Yes, they are basically noarch scripts providing defaults for the table configurations.

#7 lore raw
In reply to Arturo Borrero Gonzalez
Quoted 9 lines · Arturo Borrero Gonzalez
Quoted 7 lines · Kevin Fenzi

2. There is some question about the /etc/nftables/* scripts. In Fedora land, things in /etc/ should be config files, but these aren't really config files. They call nft without a full path (/usr/sbin/nft, etc). Should these really be in /usr/share ? or is it expected users will modify them? Could you clarify the use case there?

Quoted 8 lines

There is a patch from me to address this:
http://patchwork.ozlabs.org/patch/304866/
Feel free to test it and comment.

I have the same issue in the Debian land. I applied the patch locally in the package as a workaround.

The patch is not applied yet to upstream.

Could you please resubmit? I'm going to apply it to the master branch.

Thanks.

#8 lore raw
In reply to Kevin Fenzi
Quoted 5 lines · Kevin Fenzi

2. There is some question about the /etc/nftables/* scripts. In Fedora land, things in /etc/ should be config files, but these aren't really config files. They call nft without a full path (/usr/sbin/nft, etc). Should these really be in /usr/share ? or is it expected users will modify them? Could you clarify the use case there?

These files are to be included, they are mainly executable for easier testing.

Quoted 3 lines

4. nftables sets make to '-s' (ie, silent) on subdirs. It's good for building packages to have verbose output in build logs. Would it be possible to remove that? If not I can patch it out here.

No problem adding an option to disable the silent output (I think current autoconf supports this), but I'd like to keep it as default.

#9 lore raw
In reply to Kevin Fenzi
Quoted 3 lines · Kevin Fenzi

3. nftables hard codes installing as root, which is no good for building packages (patch attached that just removes the owner/group setting there).

Please resubmit with a subject, a brief changelog and a Signed-off-by:
line and I'm going to apply it.

Thanks.

#10 lore raw
In reply to Kevin Fenzi
Quoted 5 lines · Kevin Fenzi

1. Completely minor, but noted in review of both packages that the COPYING file has the old fsf address in it. Would be great if you could update to the new one.
https://fedoraproject.org/wiki/Common_Rpmlint_issues#incorrect-fsf-address

No, best remove the address, because you really don't want to be updating all the time.

Quoted 3 lines

3. nftables hard codes installing as root, which is no good for building packages (patch attached that just removes the owner/group setting there).

Well I sent an automake-making patch that would fix all those problems, but so far it has again been ignored to be merged.

#11 lore raw
Quoted 10 lines · Jan Engelhardt
Quoted 5 lines · Kevin Fenzi

1. Completely minor, but noted in review of both packages that the COPYING file has the old fsf address in it. Would be great if you could update to the new one.
https://fedoraproject.org/wiki/Common_Rpmlint_issues#incorrect-fsf-address

No, best remove the address, because you really don't want to be updating all the time.

"All the time" seems slightly exagerated. But the "updated" license linked in the wiki is exactly the same version we're using, the address hasn't been changed:

http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

#12 lore raw
Quoted 9 lines · On Mon, 13 Jan 2014 09:09:43 +0000 Patrick McHardy <[email protected]> wrote:
Quoted 8 lines · Jan Engelhardt
Quoted 5 lines · Kevin Fenzi

1. Completely minor, but noted in review of both packages that the COPYING file has the old fsf address in it. Would be great if you could update to the new one.
https://fedoraproject.org/wiki/Common_Rpmlint_issues#incorrect-fsf-address

Quoted 8 lines
Quoted 2 lines

No, best remove the address, because you really don't want to be updating all the time.

"All the time" seems slightly exagerated. But the "updated" license linked in the wiki is exactly the same version we're using, the address hasn't been changed:

http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

It has:

- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

... and a few other diffs like saying <yeah> instead of 19xx and Lesser GNU Public License instead of Library, etc.

FSF moved buildings a few years ago... as far as I know they don't plan to move again, and it's only happened once. The GPLv3 COPYING file I note doesn't have any physical address in it. ;)

kevin

#13 lore raw
Quoted 23 lines · Kevin Fenzi
Quoted 9 lines · On Mon, 13 Jan 2014 09:09:43 +0000 Patrick McHardy <[email protected]> wrote:
Quoted 8 lines · Jan Engelhardt
Quoted 5 lines · Kevin Fenzi

1. Completely minor, but noted in review of both packages that the COPYING file has the old fsf address in it. Would be great if you could update to the new one.
https://fedoraproject.org/wiki/Common_Rpmlint_issues#incorrect-fsf-address

Quoted 8 lines
Quoted 2 lines

No, best remove the address, because you really don't want to be updating all the time.

"All the time" seems slightly exagerated. But the "updated" license linked in the wiki is exactly the same version we're using, the address hasn't been changed:

http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

It has:

Quoted 7 lines

- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

... and a few other diffs like saying <yeah> instead of 19xx and Lesser GNU Public License instead of Library, etc.

That's what we have (and always had) in nftables:

Copyright (C) 1989, 1991 Free Software Foundation, Inc.

               51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Quoted 5 lines

FSF moved buildings a few years ago... as far as I know they don't plan to move again, and it's only happened once. The GPLv3 COPYING file I note doesn't have any physical address in it. ;)

kevin

#14 lore raw
Quoted 1 line · On Tue, 14 Jan 2014 08:55:33 +0000 Patrick McHardy <[email protected]> wrote:

That's what we have (and always had) in nftables:

Indeed, it's libnftables that has the old one.

Sorry for the confusion...

kevin

#15 lore raw
Quoted 6 lines · Kevin Fenzi
Quoted 1 line · On Tue, 14 Jan 2014 08:55:33 +0000 Patrick McHardy <[email protected]> wrote:

That's what we have (and always had) in nftables:

Indeed, it's libnftables that has the old one.

Patch attached.

COPYING +6 -4
index a43ea21..21b9363 100644
@@ -2,7 +2,7 @@
 		       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          675 Mass Ave, Cambridge, MA 02139, USA
+               51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -278,8 +278,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
 		     END OF TERMS AND CONDITIONS
-
-	Appendix: How to Apply These Terms to Your New Programs
+
+
+	    How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -305,7 +306,8 @@ the "copyright" line and a pointer to where the full notice is found.
 
     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
 
 Also add information on how to contact you by electronic and paper mail.