← Back to team overview

openstack team mailing list archive

Re: [devstack] Easing maintenance of list of distro packages to install

 

On Wed, Jun 20, 2012 at 12:24 PM, Daniel P. Berrange <berrange@xxxxxxxxxx>wrote:

> On Wed, Jun 20, 2012 at 12:06:46PM +0200, Vincent Untz wrote:
> > Hi,
> >
> > In devstack, we currently have two separate lists of packages to
> > install: one for Ubuntu (in files/apts/) and one for Fedora (in
> > files/rpms/).
> >
> > This has two issues:
> >
> >  - this leads to incomplete updates for dependencies. It happens that
> >    someone updates the apts files but not the rpms ones. (shameless
> >    plug: https://review.openstack.org/#/c/8475/ needs some review love)
> >
> >  - this just doesn't scale when adding support for another distro,
> >    especially as rpm-based distros don't all share the same package
> >    names (hence files/rpms/ cannot really be shared).
> >
> > I'd like us to move to a new scheme where we have one list of packages
> > (say the Ubuntu one, for instance) and instead of adding another one
> > Fedora, openSUSE, etc., we have translation tables to map package names
> > from Ubuntu to other distros.
> >
> > Supporting a new distro is then a matter of adding a translation table
> > (+ hacking the code to change the right config files, obviously), and we
> > can easily add tests to make sure the translation tables contain a
> > mapping for each package (and therefore fix the first issue).
> >
> > I already have some working code for that, but I want to check if people
> > are fine with the idea before submitting it for review.
>
> I've nothing against your proposal & certainly the motivation is
> good, but thought I'd throw out an alternative idea just in case
>
> Instead of having one sub-dir per package/distro, just have a
> single (CSV/JSON/XML/whatever) file listing all distros in the
> same place
>
> eg a CSV file where the first column is the generic name, and
> other columns are the distro-specific names (if required). The
> distro specific column would be empty if the generic name applied
> without change, or '-' if the package was not applicable to the
> distro at all.
>
>  # cat nova.csv
>  Package,Ubuntu,Fedora,RHEL,SUSE
>  python-devel,,,,,,
>  libvirt,libvirt-bin,,,,,
>  dnsmasq-base,,-,-,,
>  dnsmasq-utils,,,,,,,
>
> Hmm, using JSON would actually be a bit more readable.
>
> The core idea is to have all the data, both the master list and
> distro mappings in one clear place.
>

We should keep in mind also that not all the packages have an equivalent in
all the distros: sometimes one single package is splitted in several in
other distros, or it doesn't exist at all. CSV would be not truly
manageable, but having everything in one single place would be easier if
any update is necessary.  JSON can be a good candidate but, in the case of
nova (46 packages right now), would have to see if we don't get "spaghetti"
code difficult to deal with.

-- 
Ghe Rivero
*OpenStack & Distribution Engineer
**www.stackops.com | * ghe.rivero@xxxxxxxxxxxx <diego.parrilla@xxxxxxxxxxxx>
** | +34 625 63 45 23 | skype:ghe.rivero*
* <http://www.stackops.com/>
*

*

******************** ADVERTENCIA LEGAL ********************
Le informamos, como destinatario de este mensaje, que el correo electrónico
y las comunicaciones por medio de Internet no permiten asegurar ni
garantizar la confidencialidad de los mensajes transmitidos, así como
tampoco su integridad o su correcta recepción, por lo que STACKOPS
TECHNOLOGIES S.L. no asume responsabilidad alguna por tales circunstancias.
Si no consintiese en la utilización del correo electrónico o de las
comunicaciones vía Internet le rogamos nos lo comunique y ponga en nuestro
conocimiento de manera inmediata. Este mensaje va dirigido, de manera
exclusiva, a su destinatario y contiene información confidencial y sujeta
al secreto profesional, cuya divulgación no está permitida por la ley. En
caso de haber recibido este mensaje por error, le rogamos que, de forma
inmediata, nos lo comunique mediante correo electrónico remitido a nuestra
atención y proceda a su eliminación, así como a la de cualquier documento
adjunto al mismo. Asimismo, le comunicamos que la distribución, copia o
utilización de este mensaje, o de cualquier documento adjunto al mismo,
cualquiera que fuera su finalidad, están prohibidas por la ley.

***************** PRIVILEGED AND CONFIDENTIAL ****************
We hereby inform you, as addressee of this message, that e-mail and
Internet do not guarantee the confidentiality, nor the completeness or
proper reception of the messages sent and, thus, STACKOPS TECHNOLOGIES S.L.
does not assume any liability for those circumstances. Should you not agree
to the use of e-mail or to communications via Internet, you are kindly
requested to notify us immediately. This message is intended exclusively
for the person to whom it is addressed and contains privileged and
confidential information protected from disclosure by law. If you are not
the addressee indicated in this message, you should immediately delete it
and any attachments and notify the sender by reply e-mail. In such case,
you are hereby notified that any dissemination, distribution, copying or
use of this message or any attachments, for any purpose, is strictly
prohibited by law.

Follow ups

References