[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ifupdown: Add support for GNU/Hurd (for review)



Svante Signell, le Mon 21 May 2012 20:14:10 +0200, a écrit :
> --- a/debian/rules	2012-04-25 00:37:27.000000000 +0200
> +++ b/debian/rules	2012-05-09 15:42:47.000000000 +0200
> @@ -77,6 +77,8 @@
>  override_dh_gencontrol:
>  ifeq ($(DEB_HOST_ARCH_OS),linux)
>  	dh_gencontrol -- -V'net:Depends=iproute (>= 20071016-1)' -V'net:Suggests=net-tools'
> -else
> +else ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
>  	dh_gencontrol -- -V'net:Depends=net-tools' -V'net:Suggests='
> -endif
> +else ifeq ($(DEB_HOST_ARCH_OS),hurd)
> +	dh_gencontrol -- -V'net:Depends=inetutils-tools' -V'net:Suggests='
> +endif

Looks good.

> --- /dev/null	2012-04-02 18:20:02.000000000 +0200
> +++ ifupdown-0.7~rc2+experimental/debian/testbuild-hurd	2012-05-12 19:26:49.000000000 +0200

Looks right, except one bit detailed below.

> --- a/ifupdown.nw	2012-04-25 00:37:27.000000000 +0200
> +++ b/ifupdown.nw	2012-05-21 19:38:30.000000000 +0200
> @@ -551,7 +551,7 @@
>  
>  use strict;
>  
> -<<determine the target architecrure>>
> +<<determine the target architecture>>
>  
>  # declarations
>  <<defn2c variables>>
> @@ -566,7 +566,7 @@
>  @ 
>  
>  First of all, we determine the target architecture by calling [[dpkg-architecture]] and stripping the trailing newline:
> -<<determine the target architecrure>>=
> +<<determine the target architecture>>=
>  my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`;
>  
>  $DEB_HOST_ARCH_OS =~ s/\n//;
> @@ -965,7 +965,7 @@
>  
>  use strict;
>  
> -<<determine the target architecrure>>
> +<<determine the target architecture>>
>  
>  # declarations
>  <<defn2man variables>>

Please file as separate patch :)

> @@ -1016,7 +1016,7 @@
>  
>  Which only leaves extracting the description and options for each
>  method. And, of course, this imposes less restrictions of the
> -[[.defn]] file than [[defn2c.pl]] did. It's a crazy old world.
> +[.defn]] file than [[defn2c.pl]] did. It's a crazy old world.

Mmm, is it not spurious?

> @@ -4575,6 +4575,26 @@
>  <<common functions implementations>>
>  @ 
>  
> +\subsection{Hurd-specific functions}

You should have said that it's simply the kfreebsd version, patched.
Diffing them is easier :)

> +  conversion
> +    hwaddress cleanup_hwaddress  (Not yet supported)

Remove  "  (Not yet supported)" here, it apparently makes compilation fail.

> +  up
> +    [[FIXME: Add proper commands here for ipv6]]
> +    settrans -afg /servers/socket/26 /hurd/pfinet --interface %iface% --ipv6 ::1

Remove that settrans, it would disturb the existing pfinet.  Better
assume that the user has set up inet6 already.

> +    inetutils-ifconfig --interface %iface% inet6 ::1

Apparently inetutils-ifconfig does not support ipv6. So I'd say keep the
FIXME as such for now.

Apart from that it looks good, thanks!

I've applied it to -rc3, fixed a few things described below, and
uploaded to debian-ports.

There is just one bit missing in the .nw file, see attached patch.
Without it ifup mostly segfaults for me. Also, the testbuild-hurd file
is not exactly right, --exit-on-error should be removed, as it is on
kfreebsd.

Samuel
--- ifupdown.nw.orig	2012-05-22 02:48:29.000000000 +0000
+++ ifupdown.nw	2012-05-22 02:48:59.000000000 +0000
@@ -5712,6 +5712,13 @@
   up
   down
 
+architecture hurd
+
+method none
+  description
+  up
+  down
+
 @ 
 
 \begin{flushleft}

Reply to: