Re: Release of libvirt-0.8.7

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

 



On 01/06/2011 02:03 PM, Zdenek Styblik wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 01/05/2011 04:43 PM, Laine Stump wrote:
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.

just wait a second; did you actually say "patches"? :) What is the
original platform/distro of NetCF?

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).

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).

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.


It shouldn't matter if they've pushed changes or not as long as those
are public somewhere.

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.

Anyway, I gave it # ./configure; go and found out 'augeas', whatever
that is, is "missing". And I expect more to come.

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).

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.

On Slackware, it looks like all the network config for all devices is in a single file, /etc/rc.d/rc.inet1.conf. To create a Slackware port of netcf, you would want to write a drv_slackware.c that implemented all the drv_*() functions declared in 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.

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).

I can give it look over the weekend(no, I don't expect it to be done
over the weekend - look :]).

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).

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

[...]
The first step would be to subscribe to the netcf-devel mailing list:
Done.

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 :-)
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) :)


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]