[libvirt] [PATCH: 0/MANY] Re-arrange files in the source tree

This is a followup to http://www.redhat.com/archives/libvir-list/2009-September/msg00477.html I am not actually going to spam the list with all the patches, since it'd generate a HUGE series of mails. Instead I have published a branch containing all the patches which you can directly pull into your GIT checkout. I recommend you do the following set of steps. - make maintainer-clean - git checkout master - git pull - git remote add -f danb git://gitorious.org/~berrange/libvirt/staging.git - git checkout -b rearrange danb/rearrange You will now have a checkout on a branch called 'rearrange' containing all my patches applied. If you want to go straight into building it, the normal build process still applies eg ./autogen && make I've committed the changes in a large series of steps to make it easier to see what's going on at each point. To see the list of changes run the following git log -b berrange/rearrange master.. The changes basically follow everything we discussed in the previous thread I've added a src/README file which describes the split of sub-directories. I'll reproduce the content here for convenience libvirt library code README =========================== The directory provides the bulk of the libvirt codebase. Everything except for the libvirtd daemon and client tools. The build uses a large number of libtool convenience libraries - one for each child directory, and then links them together for the final libvirt.so, although some bits get linked directly to libvirtd daemon instead. The files directly in this directory are supporting the public API entry points & data structures. There are two core shared modules to be aware of: * util/ - a collection of shared APIs that can be used by any code. This directory is always in the include path for all things built * conf/ - APIs for parsing / manipulating all the official XML files used by the public API. This directory is only in the include path for driver implementation modules Then there are the hypervisor implementations: * esx/ - VMWare ESX and GSX support using XMLRPC * lxc/ - Linux Native Containers * opennebula/ - Open Nebula using XMLRPC * openvz/ - OpenVZ containers using cli tools * phyp/ - IBM Power Hypervisor using CLI tools over SSH * qemu/ - QEMU / KVM using qemu CLI/monitor * remote/ - Generic libvirt native RPC client * test/ - A "mock" driver for testing * uml/ - User Mode Linux * vbox/ - Virtual Box using native API * xen/ - Xen using hypercalls, XenD SEXPR & XenStore Finally some secondary drivers that are shared for several HVs. Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers. The ESX, OpenNebula, Power Hypervisor, Remote, Test & VirtualBox drivers all implement the secondary drivers directly * interface/ - Host network interface management * network/ - Virtual NAT networking * node_device/ - Host device enumeration * secret/ - Secret management * security/ - Mandatory access control drivers * storage/ - Storage management drivers Since both the hypervisor and secondary drivers can be built as dlopen()able modules, it is *FORBIDDEN* to have build dependancies between these directories. Drivers are only allowed to depend on the public API, and the internal APIs in the util/ and conf/ directories For the docs directory, I left the docs/libvirt-{api,refs}.xml files in GIT as Daniel requested. I have removed the *.html, devhelp/*.html and html/*.html files though. These are all re-generated when doing make in the docs directory, and the generated HTML is included in the tar.gz when doing make dist. So end users won't have to rebuild them, only libvirt developers The example programs & XML is now all under examples/ with various sub-directories. The qemud/ directory is renamed to daemon/ The python/ directory has its file nameing changed and the genrator tweaked so that its more obvious which are generated files and which are manually written. virsh has moved to the tools/ directory, and the docs/pki_check.sh file has been turned into a real installed tool, tools/virt-pki-validate along with man page. A few minor bugs were fixed along the way (eg bogus include files discovered when files were moved) & unused png/gif images in docs/ There should be no FUNCTIONAL change in any of this work though. It is a pure re-arrangement of files. Please try out a build using this 'rearrange' branch from gitorious. Since this is a huge change I'd like to apply this to the master repo as soon as people can verify its doing the right thing for them. FWIW, I checked an RPM build and 'make distcheck' too with no issues. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

2009/9/16 Daniel P. Berrange <berrange@redhat.com>:
This is a followup to
http://www.redhat.com/archives/libvir-list/2009-September/msg00477.html
I am not actually going to spam the list with all the patches, since it'd generate a HUGE series of mails.
Instead I have published a branch containing all the patches which you can directly pull into your GIT checkout. I recommend you do the following set of steps.
- make maintainer-clean - git checkout master - git pull - git remote add -f danb git://gitorious.org/~berrange/libvirt/staging.git - git checkout -b rearrange danb/rearrange
You will now have a checkout on a branch called 'rearrange' containing all my patches applied.
If you want to go straight into building it, the normal build process still applies eg ./autogen && make
I tested this and it compiles without problems.
I've committed the changes in a large series of steps to make it easier to see what's going on at each point. To see the list of changes run the following
git log -b berrange/rearrange master..
The changes basically follow everything we discussed in the previous thread
I've added a src/README file which describes the split of sub-directories. I'll reproduce the content here for convenience
libvirt library code README ===========================
The directory provides the bulk of the libvirt codebase. Everything except for the libvirtd daemon and client tools. The build uses a large number of libtool convenience libraries - one for each child directory, and then links them together for the final libvirt.so, although some bits get linked directly to libvirtd daemon instead.
The files directly in this directory are supporting the public API entry points & data structures.
There are two core shared modules to be aware of:
* util/ - a collection of shared APIs that can be used by any code. This directory is always in the include path for all things built
* conf/ - APIs for parsing / manipulating all the official XML files used by the public API. This directory is only in the include path for driver implementation modules
Then there are the hypervisor implementations:
* esx/ - VMWare ESX and GSX support using XMLRPC
s/VMWare/VMware/ and s/XMLRPC/SOAP/ or more verbose s/XMLRPC/vSphere API over SOAP/
* lxc/ - Linux Native Containers * opennebula/ - Open Nebula using XMLRPC * openvz/ - OpenVZ containers using cli tools * phyp/ - IBM Power Hypervisor using CLI tools over SSH * qemu/ - QEMU / KVM using qemu CLI/monitor * remote/ - Generic libvirt native RPC client * test/ - A "mock" driver for testing * uml/ - User Mode Linux * vbox/ - Virtual Box using native API * xen/ - Xen using hypercalls, XenD SEXPR & XenStore
Finally some secondary drivers that are shared for several HVs. Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers. The ESX, OpenNebula, Power Hypervisor, Remote, Test & VirtualBox drivers all implement the secondary drivers directly
* interface/ - Host network interface management * network/ - Virtual NAT networking * node_device/ - Host device enumeration * secret/ - Secret management * security/ - Mandatory access control drivers * storage/ - Storage management drivers
Since both the hypervisor and secondary drivers can be built as dlopen()able modules, it is *FORBIDDEN* to have build dependancies
s/dependancies/dependencies/
between these directories. Drivers are only allowed to depend on the public API, and the internal APIs in the util/ and conf/ directories
For the docs directory, I left the docs/libvirt-{api,refs}.xml files in GIT as Daniel requested. I have removed the *.html, devhelp/*.html and html/*.html files though. These are all re-generated when doing make in the docs directory, and the generated HTML is included in the tar.gz when doing make dist. So end users won't have to rebuild them, only libvirt developers
The example programs & XML is now all under examples/ with various sub-directories.
The qemud/ directory is renamed to daemon/
The python/ directory has its file nameing changed and the genrator tweaked so that its more obvious which are generated files and which are manually written.
You might want to add the generated libvirt.c and libvirt.h to the .gitignore file in the python directory.
virsh has moved to the tools/ directory, and the docs/pki_check.sh file has been turned into a real installed tool, tools/virt-pki-validate along with man page.
A few minor bugs were fixed along the way (eg bogus include files discovered when files were moved) & unused png/gif images in docs/
There should be no FUNCTIONAL change in any of this work though. It is a pure re-arrangement of files.
Please try out a build using this 'rearrange' branch from gitorious. Since this is a huge change I'd like to apply this to the master repo as soon as people can verify its doing the right thing for them.
FWIW, I checked an RPM build and 'make distcheck' too with no issues.
Regards, Daniel
Clean and useful rearrangement. Matthias

On Wed, Sep 16, 2009 at 07:38:14PM +0100, Daniel P. Berrange wrote:
This is a followup to
http://www.redhat.com/archives/libvir-list/2009-September/msg00477.html
I am not actually going to spam the list with all the patches, since it'd generate a HUGE series of mails.
Instead I have published a branch containing all the patches which you can directly pull into your GIT checkout. I recommend you do the following set of steps.
- make maintainer-clean - git checkout master - git pull - git remote add -f danb git://gitorious.org/~berrange/libvirt/staging.git - git checkout -b rearrange danb/rearrange
You will now have a checkout on a branch called 'rearrange' containing all my patches applied.
If you want to go straight into building it, the normal build process still applies eg ./autogen && make
I've committed the changes in a large series of steps to make it easier to see what's going on at each point. To see the list of changes run the following
git log -b berrange/rearrange master..
The changes basically follow everything we discussed in the previous thread
This series of patches is now applied. Be sure to do a full clean before trying to build. If you see build errors like make[3]: *** No rule to make target `bridge.c', needed by `libvirt_util_la-bridge.lo'. Stop. This is because you didn't do a full 'make distclean' and thus have stale information in the src/.deps directory. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

[ Sending again since my outgoing mail was down yesterday :-( ] On Wed, Sep 16, 2009 at 07:38:14PM +0100, Daniel P. Berrange wrote:
This is a followup to
http://www.redhat.com/archives/libvir-list/2009-September/msg00477.html
I am not actually going to spam the list with all the patches, since it'd generate a HUGE series of mails.
Instead I have published a branch containing all the patches which you can directly pull into your GIT checkout. I recommend you do the following set of steps.
- make maintainer-clean - git checkout master - git pull - git remote add -f danb git://gitorious.org/~berrange/libvirt/staging.git - git checkout -b rearrange danb/rearrange
You will now have a checkout on a branch called 'rearrange' containing all my patches applied.
If you want to go straight into building it, the normal build process still applies eg ./autogen && make
I've committed the changes in a large series of steps to make it easier to see what's going on at each point. To see the list of changes run the following
git log -b berrange/rearrange master..
The changes basically follow everything we discussed in the previous thread
I've added a src/README file which describes the split of sub-directories. I'll reproduce the content here for convenience
Okay I finally checked things out, yes this looks way nicer ! For the documentation/website subdir we can clear things up later but I'm fine pushing the change now, since this will affect patches being submitted. ACK ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Matthias Bolte