Something that i would like to have, is the ability to keep the download packages in a temp directory when using febootstrap. I understand that using ferora/archlinux (distros with a lot of package updates every day) can increase the size of this temp directory rapidly and at some point will have a lot of deprecate packages. But the daily use of febootstrap (or building libguestfs) makes your network suffer for downloading the same packages again and again. For build libguestfs on archlinux is an amount of 140Mb. On my machine i've found two solutions: a. creating a custom local repo and move it to the top of my pacman.conf, so it would access this local repo without the need of internet b. hacking a febootstrap_pacman.ml to use /tmp/cachedir (or a dir on my home). Do you believe that a parameter like "--save-temp" eg. "--save-pkgs" could matter ? -- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas
On Tue, Dec 18, 2012 at 02:57:33PM +0200, Evaggelos Balaskas wrote:
Something that i would like to have, is the ability to keep the download packages in a temp directory when using febootstrap.
I use squid: http://libguestfs.org/guestfs-faq.1.html#how-can-i-speed-up-libguestfs-build... Make sure you configure it as outlined in the link, because the default squid configuration is not suitable.
On my machine i've found two solutions: a. creating a custom local repo and move it to the top of my pacman.conf, so it would access this local repo without the need of internet
This would also work, but there's no way (yet) to pass a local repo to the pacman plugin. Unlike the yum plugin, where there is such a feature. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
i am guessing you are referring to this: yum-plugin-local "Yum plugin to automatically manage a local repo. of downloaded packages" On Tue, Dec 18, 2012 at 3:37 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
Unlike the yum plugin, where there is such a feature.
Rich.
-- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas
On Tue, Dec 18, 2012 at 04:24:46PM +0200, Evaggelos Balaskas wrote:
i am guessing you are referring to this: yum-plugin-local "Yum plugin to automatically manage a local repo. of downloaded packages"
Nope, to this: http://libguestfs.org/febootstrap.8.html#yum_config_configfile implemented as the yum_config variable here: https://github.com/libguestfs/febootstrap/blob/master/src/febootstrap_yum_rp... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
I give it a try and i've build a patch for adding a pacman-config for febootstrap. Take a look on that but beware that i am not a developer and this is my first ocaml try. I havent updated febootstrap.8 i diff -r -u febootstrap-3.20/src/ febootstrap-3.20_ebal/src/ > pacman_conf.patch hopeful i did it right. -- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas
The patch looks good. I'll try to get my ArchLinux VM working today so I can test it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Wed, Dec 19, 2012 at 02:02:05PM +0200, Evaggelos Balaskas wrote:
I give it a try and i've build a patch for adding a pacman-config for febootstrap.
Take a look on that but beware that i am not a developer and this is my first ocaml try.
I havent updated febootstrap.8
i diff -r -u febootstrap-3.20/src/ febootstrap-3.20_ebal/src/ > pacman_conf.patch hopeful i did it right.
Thanks - I have pushed a slightly modified and lightly tested version of this patch upstream: https://github.com/libguestfs/febootstrap/commit/bfecae4c70a42d5b14f61a6601a... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Thats fine - that was the approach i was going too but i couldnt think how to implement this. Thanks for the acknowledge on github. I would like to discuss one more thing: If pacman_config file doesnt exist then exit status of Sys.command cmd is 1 and febootstrap is trying to find this package from aur. eg. $ sudo pacman --config /etc/pacman.conf2 -Sw rsync ; echo $? error: config file /etc/pacman.conf2 could not be read. 1 a fallback mechanism could be this: (match pacman_config with | None -> "" | Some filename when Sys.file_exists filename -> " --config " ^ filename | _ -> "" ) (learning ocaml through febootstrap !) I am not sure what the user experience should be on that. Whats the approach on yum plugin, if the yum config doesnt exist ? -- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas
On Fri, Dec 21, 2012 at 09:16:41PM +0200, Evaggelos Balaskas wrote:
Thats fine - that was the approach i was going too but i couldnt think how to implement this. Thanks for the acknowledge on github.
I would like to discuss one more thing:
If pacman_config file doesnt exist then exit status of Sys.command cmd is 1 and febootstrap is trying to find this package from aur.
eg. $ sudo pacman --config /etc/pacman.conf2 -Sw rsync ; echo $? error: config file /etc/pacman.conf2 could not be read. 1
a fallback mechanism could be this:
(match pacman_config with | None -> "" | Some filename when Sys.file_exists filename -> " --config " ^ filename | _ -> "" )
(learning ocaml through febootstrap !)
I am not sure what the user experience should be on that. Whats the approach on yum plugin, if the yum config doesnt exist ?
Isn't it an error if the file that the user supplies via the --pacman-config parameter is non-existent? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Dec 21, 2012 at 09:16:41PM +0200, Evaggelos Balaskas wrote:
Thats fine - that was the approach i was going too but i couldnt think how to implement this. Thanks for the acknowledge on github.
I would like to discuss one more thing:
If pacman_config file doesnt exist then exit status of Sys.command cmd is 1 and febootstrap is trying to find this package from aur.
eg. $ sudo pacman --config /etc/pacman.conf2 -Sw rsync ; echo $? error: config file /etc/pacman.conf2 could not be read. 1
a fallback mechanism could be this:
(match pacman_config with | None -> "" | Some filename when Sys.file_exists filename -> " --config " ^ filename | _ -> "" )
(learning ocaml through febootstrap !)
I am not sure what the user experience should be on that. Whats the approach on yum plugin, if the yum config doesnt exist ?
OK, I get it, you mean that the later code falls back to AUR. That could happen. I think what is needed is an explicit check earlier on, ie: fun pkg -> if not (Sys.file_exists filename) then failwith (sprintf "%s: pacman-config file does not exist" filename) else ( ... all the rest of the code ... ) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
On Fri, Dec 21, 2012 at 07:28:19PM +0000, Richard W.M. Jones wrote:
On Fri, Dec 21, 2012 at 09:16:41PM +0200, Evaggelos Balaskas wrote:
Thats fine - that was the approach i was going too but i couldnt think how to implement this. Thanks for the acknowledge on github.
I would like to discuss one more thing:
If pacman_config file doesnt exist then exit status of Sys.command cmd is 1 and febootstrap is trying to find this package from aur.
eg. $ sudo pacman --config /etc/pacman.conf2 -Sw rsync ; echo $? error: config file /etc/pacman.conf2 could not be read. 1
a fallback mechanism could be this:
(match pacman_config with | None -> "" | Some filename when Sys.file_exists filename -> " --config " ^ filename | _ -> "" )
(learning ocaml through febootstrap !)
I am not sure what the user experience should be on that. Whats the approach on yum plugin, if the yum config doesnt exist ?
OK, I get it, you mean that the later code falls back to AUR.
That could happen. I think what is needed is an explicit check earlier on, ie:
fun pkg -> if not (Sys.file_exists filename) then failwith (sprintf "%s: pacman-config file does not exist" filename) else (
Umm, in fact you don't need the explicit 'else' there ...
... all the rest of the code ...
Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
if you want to fallback to default pacman.config, then all you need is this (match pacman_config with | None -> "" | Some filename when Sys.file_exists filename -> " --config " ^ filename | _ -> "" ) if you believe that febootstrap should exit, then i dont mind to (learn more ocaml) provide a patch in the next few days. Thats why i asked about the yum plugin approach on yum config file. -- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas
On Fri, Dec 21, 2012 at 09:41:28PM +0200, Evaggelos Balaskas wrote:
if you want to fallback to default pacman.config, then all you need is this
(match pacman_config with | None -> "" | Some filename when Sys.file_exists filename -> " --config " ^ filename | _ -> "" )
if you believe that febootstrap should exit, then i dont mind to (learn more ocaml) provide a patch in the next few days. Thats why i asked about the yum plugin approach on yum config file.
I think I've fixed this with the latest set of commits: (1) The option is now called --packager-config, and it is common to all backends. ie. Both yum and pacman use the same option, which means you can immediately use this from libguestfs. https://github.com/libguestfs/febootstrap/commit/b8cbe191d0f03af1f6a42a07795... (2) The code now checks that the config file exists, and makes the path absolute (so that relative paths will work). https://github.com/libguestfs/febootstrap/commit/63b073c8feeda6f8286d51693ca... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
just tested it - works fine. i'll write a blog post about febootstrap and archlinux using a local/repo - custom pacman.conf Thanks for all the help. -- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas
On Sat, Dec 22, 2012 at 08:13:03PM +0200, Evaggelos Balaskas wrote:
just tested it - works fine.
i'll write a blog post about febootstrap and archlinux using a local/repo - custom pacman.conf
Thanks. You can also use the (now misnamed) configure option in libguestfs: ./configure --with-febootstrap-yum-config=alternate-pacman.conf OR in libguestfs from git: ./configure --with-febootstrap-packager-config=alternate-pacman.conf to configure febootstrap when compiling libguestfs. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
* Richard W.M. Jones:
On Tue, Dec 18, 2012 at 02:57:33PM +0200, Evaggelos Balaskas wrote:
Something that i would like to have, is the ability to keep the download packages in a temp directory when using febootstrap.
I use squid:
http://libguestfs.org/guestfs-faq.1.html#how-can-i-speed-up-libguestfs-build...
For Debian systems, there is approx. Cheers, -Hilko
On Tue, Dec 18, 2012 at 04:52:49PM +0100, Hilko Bengen wrote:
* Richard W.M. Jones:
On Tue, Dec 18, 2012 at 02:57:33PM +0200, Evaggelos Balaskas wrote:
Something that i would like to have, is the ability to keep the download packages in a temp directory when using febootstrap.
I use squid:
http://libguestfs.org/guestfs-faq.1.html#how-can-i-speed-up-libguestfs-build...
For Debian systems, there is approx.
Thanks -- I've added this suggestion to the above FAQ entry (not online yet). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
participants (3)
-
Evaggelos Balaskas -
Hilko Bengen -
Richard W.M. Jones