Gentoo Modules

Hi,

Just a quick message to known if :

  • Some peoples are interested by Gentoo Linux package manager and others items to be handled by Ansible ?

  • someone already working on it
    Actually, i see two module needed :

  • gentoo_use for managing flags (at make.conf level, and at package.use level)

  • emerge for managing the command (emerge) provided by portage (the package manager)

I will be volunteer to implement them if :

  • nobody already working on it
  • official ansible project be interested to pull them if respecting ansible 'developers rules.

I had started to do some work on this but haven't touched it in
months, only got as far as invoking qlist to get installed packages.

Ok,

I start now a gentoo module for ansible.

About the gentoo module “emerge”.
I’m currently writting it, and i hope release an alpha or a beta this week-end or next week.

It seems that it will not rely on any external tool like gentoolkit or portage-utils, so coming faster and with no dependency on a gentoo system.

Hi everyones :slight_smile:

Damned, i’m late for the Gentoo Emerge module.
I worked on it this week-end. i rely on some portage python module and on gentoolkit.

I have a question about this kind of module dependency.

gentoolkit is distributed on GPL-2
It is better to ask ansible user to install it on host or to embed needed classes (if licensing permitting it, as ansible is distributed under GPL-3)

Any suggestion ?

I probably give an alpha1 this week.

The merge module should just use the merge command line.

sorry, emerge, I'll blame spellcheck.

Hi,

portage is the package manager for Gentoo Linux,
emerge is the primary tool of portage.

But, in fact i have to keep in mind that Gentoo is not a real LTS distribution, so, is there so many “problems” to just use “emerge” command.
As you said in a web page i can’t found at now, not having only one module making the abstraction of all distributions and package manager ensure to keep the advantages of each distribution / package managers.

Just to be clear, my idea to re-use existing portage/gentoolkit classes is only for preparing/checking the work to do ; once prepared it is only the emerge command which will be called to “install a package on the gentoo system”.

I had started to use only the emerge command line, but just after, i was “blocked” for rewrite most of the functions/class already provided natively by portage/gentoolkit himself (in python) : atom string interpretations/validation like slots, operators, wildcards : (=dev-util/strace-4* ; dev-lang/php ; dev-lang/php:5.3 ; >=dev-util/strace-4.6)

the emerge module, if based only on command line will either be light, avoiding most of the ebuild selection / atom strings powerfull side ; or, will be as strong as the code that already exist in portage/gentoolkit.

(This is yes an exageration, just a way to permit you to consider the utilisation).

… please excuse my bad english …

I'm fine with you using the modules as well, though it's nicer to use
things that are installed by default.

Not too many people use Gentoo and they are all pretty smart, so I
don't think we'd be swamped with questions if the module raised an
error when a python lib wasn't installed.

There's not a license issue, I was just trying to keep the extra
dependency out if possible.

We do have some modules that require some extra non-standard python
libs and raise errors if they are not installed -- we just try to
limit them when we can.

I looked into making this module, I couldn't find a good way to do it
w/o introducing these extra dependencies.

I currently just use shell tasks (same on FreeBSD), if you can get
this up and running I'll definitively be a tester (for all3 of my
gentoo boxes).

Hi, thanks for the answer.

Excuse me to repeat, just to be sure, and not be ambiguous - please confirm ;

As i understood :

  • i am able to rely on portage python librarys (avaiable on Gentoo box in 99,999% of cases)
  • im am able to rely on gentoolkit python librarys (avaiable on Gentoo box in >70% of cases) (gentoolkit is needed on gentoo box for revdep-rebuild that many official gentoo howto rely on it)
  • i will only use the emerge command line to modify the system
    Thanks.

As i understood :

i am able to rely on portage python librarys (avaiable on Gentoo box in
99,999% of cases)
im am able to rely on gentoolkit python librarys (avaiable on Gentoo box in

70% of cases) (gentoolkit is needed on gentoo box for revdep-rebuild that

many official gentoo howto rely on it)
i will only use the emerge command line to modify the system

If it makes sense to modify the system via the library, that would
also be fine, but I'm not a Gentoo expert.

Either way you want to go would be ok.

Thanks!

Hi Michael,

Thanks,

at now it make no sense to modify the system by the library ; using the command line ensure the same result as the ansible user will have manually.

For preparing the modify, the library will be usefull.
Thanks for the precision.

I personally manage in the neighborhood of 20 Gentoo systems at the moment (though the number has been a bit higher in times past - isohunt.com used Gentoo exclusively when I was involved/it was still alive). Dependency-wise app-portage/gentoolkit{,-dev} are actually among the list of packages that are merged prior to any other action taking place on boxes that I manage. Regardless, prompting the user (or perhaps offering the option to automatically grab module deps as a setting?) would make sense. The people at the intersection of “utilizing ansible” and “Gentoo users” are likely aware enough to not have to worry about too much handholding or more than cursory error checking (bail out w/ message if needed libs are missing).