<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 01/06/2011 02:03 PM, Zdenek Styblik wrote:
    <blockquote cite="mid:4D261211.9050708@turnovfree.net" type="cite">
      <pre wrap="">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 01/05/2011 04:43 PM, Laine Stump wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On 01/05/2011 06:12 AM, Zdenek Styblik wrote:

Zdenek - I'd be very happy to have a Slackware port of netcf, and would
be willing to help out getting it in (as long as you'd be willing to
help me setup a Slackware guest so I could test your patches ;-) There
have been 4 other people who started netcf ports (debian, arch linux,
suse, and (believe it or not, MS Windows)), but so far none has followed
through to actually pushing something into the main netcf git.

</pre>
      </blockquote>
      <pre wrap="">
just wait a second; did you actually say "patches"? :) What is the
original platform/distro of NetCF?
</pre>
    </blockquote>
    <br>
    It was originally developed for Fedora and RHEL (RHEL5.x up to a
    point, but now only RHEL6 support is up-to-date due to libnl version
    incompatibilities on 5.x).<br>
    <br>
    Because the network config files differ for different distros, there
    are a couple of files that need to be different for each (or in some
    cases where two distros are very close, maybe they can share the
    same source files, with a few #ifdefs). The files defining the API,
    and implementing the toplevel functions of the API should be common
    to all platforms, and there is also a file of utility functions that
    should be useful on all Linux platforms (but not on Windows).<br>
    <br>
    As far as I know, the SuSE port was actually complete at one time,
    and was included in a released product (not sure what the product
    is), but I don't know where the source is (aside from earlier
    versions posted to the list and available in the archives), and the
    developers haven't had the resources available to clean it up and
    submit it back to the upstream project. The debian and Windows ports
    have had patches posted that were at the RFC level, but nothing
    committable yet. If I recall correctly, the Arch Linux port was at
    the level of someone asking for recommendations on how to proceed,
    but there haven't been any patches yet.<br>
    <br>
    <br>
    <blockquote cite="mid:4D261211.9050708@turnovfree.net" type="cite">
      <pre wrap="">It shouldn't matter if they've pushed changes or not as long as those
are public somewhere.
</pre>
    </blockquote>
    <br>
    Well, there is stuff in the mailing list archives, but it's all out
    of date, because a couple months ago, based on problems revealed by
    the Windows patches, I did some re-organizing of the files to better
    separate the platform-specific stuff from the common stuff.<br>
    <br>
    <blockquote cite="mid:4D261211.9050708@turnovfree.net" type="cite">
      <pre wrap="">Anyway, I gave it # ./configure; go and found out 'augeas', whatever
that is, is "missing". And I expect more to come.
</pre>
    </blockquote>
    <br>
    It's possible to make a netcf port that doesn't use augeas. The
    Fedora/RHEL port uses it to parse all the separate
    /etc/sysconfig/network-scripts/ifcfg-* files into something regular,
    then convert that into the API-defined XML format, and to write
    changes back to the ifcfg-* files (while maintaining the stuff in
    those files that isn't affected by the changes).<br>
    <br>
    The Fedora/RHEL port also uses libxslt2, and it would be possible to
    make a port without that as well, although you likely will end up
    wanting it, since it will make creating and parsing the XML required
    by the API much simpler.<br>
    <br>
    On Slackware, it looks like all the network config for all devices
    is in a single file, <b><a
        href="http://www.slackware.com/config/network.php#rc.inet1">/etc/rc.d/rc.inet1.conf</a>.
      To create a Slackware port of netcf, you would want to write a
      drv_slackware.c that implemented all the drv_*() functions
      declared in </b>internal.h (using drv_initscripts.c as an
    example); if you don't want/need augeas to do that, you won't need
    to link it in.<br>
    <br>
    Of course there are some kinks - for example, I just noticed that,
    although the intent is for the functions in util_linux.c to be
    useful on all Linux platforms, there are several in there that are
    only useful if you're using augeas (which maybe should be put into a
    new util_augeas.c), and I also see that dutil.c (which was intended
    to be useful on *all* platforms) #includes augeas.h, although it
    doesn't seem to actually use any augeas functions (this is a
    leftover from old code, and can likely just be removed).<br>
    <br>
    <blockquote cite="mid:4D261211.9050708@turnovfree.net" type="cite">
      <pre wrap="">I can give it look over the weekend(no, I don't expect it to be done
over the weekend - look :]).
</pre>
    </blockquote>
    <br>
    Don't worry, I wouldn't expect that either - it's going to require
    writing code that will transform the .INI file style info into XML,
    and from XML back to the .INI style. Even with libxlt2, that isn't
    exactly trivial (augeas can very likely help, though - it's very
    good at grabbing a single value from a file and modifying it without
    screwing up the rest of the file; so it's very likely you *will*
    want augeas, you'll just use it differently).<br>
    <br>
    <blockquote cite="mid:4D261211.9050708@turnovfree.net" type="cite">
      <pre wrap="">Slackware guest shouldn't be a problem. It's just like any other
GNU/Linux. Setup partition, run setup, key stroke, key stroke, Install
everything? [Yes], done :D j/k

[...]
</pre>
      <blockquote type="cite">
        <pre wrap="">The first step would be to subscribe to the netcf-devel mailing list:
</pre>
      </blockquote>
      <pre wrap="">
Done.

</pre>
      <blockquote type="cite">
        <pre wrap="">
I can help you out figuring out which bits need replacing for a
different platform (although I'm afraid I probably can't be much help
with what they should be replaced with :-)
</pre>
      </blockquote>
      <pre wrap="">
Sounds great. I probably should note I'm more like # ./configure && make
&& ... && makepkg; and some hack-n-slash person.
It doesn't mean anything else than just making things clear(so much for
expectations) :)

</pre>
    </blockquote>
    <br>
  </body>
</html>