[gobolinux-users] A random idea - json/yaml format for GoboLinux Recipes, in addition to the already existing directory/file layout, for easier exchange of information

Robert Alexander shevegen at gmail.com
Wed May 1 22:19:15 NZST 2019

This is a bit of a random idea; not sure if I should mention  it but then
again I guess ideas don't do
much harm per se since they may not translate into an implementation of an
idea (via e. g. code). :)

So GoboLinux uses recipes that tend to come with a specific directory
structure, naturally, and files
that describe the recipe/package.

Generating/Autogenerating that structure is not too difficult, in my
opinion, once you have the
information available for recipes already, or obtain it somehow, such as
from existing recipes used
by other distributions (debian, fedora, archlinux, gentoo and so forth).

I guess one could even parse other existing packages in other
distributions, to then find the "universal
truth" in how to install something. Often the only difference between e. g.
rpm and dpkg is, excluding
special stuff such as "post installation hooks", the name of the package.
But the file listing instead may
often be exactly the same, in particular for smaller packages, such as
programs that only install a single
binary, and similar.

Looking at GoboLinux recipes, I think that the only slightly more difficult
part is how to get a shell's
logic to work. Existing source code out in the wild may require
modifications; this can be seen e. g.
in the LFS/BLFS project, which tends to also make use of sed, awk and so
forth, in order to get
programs to "well behave".

Anyway - this mail is not so much about the problems here per se, but
rather the part where a directory
structure and file structure has to exist for a given program, as part of a
GoboLinux recipe.

I was thinking that this could be stored as a json/yaml dataset,
additionally; possibly json, as that may
simplify exchange of information. You know, RESTful shiny thingies and such.

Would that part, e. g. json-description for programs and
installation-specific parts, be a useful idea for
GoboLinux recipes to be had? Useful in the sense that it may be used
practically, not just as an
idea that is.

To explain this in other words - rather than relying on a directory
structure per se, within a given recipe,
the information could be stored in json, and then it could be translated
into the local directory layout
by some program when necessary, e. g. when we do "Compile" or
"InstallPackage" or something
like that.

Note that the existing way to work with this on GoboLinux ought to be
retained, obviously, to not cause
any backwards issues; just that this new functionality would provide an
additional way to create
packages/recipes for GoboLinux.

Now, obviously, a question may be - would this be any useful at all? :)

It is hard to predict (for me), since it depends on how useful this really
may be in practice. For example,
if nobody would use it then this would not be a hugely ... useful idea.

But one advantage of e. g. json-representation that I think may exist, may
be that it could be easier
to not only batch-generate all GoboLinux recipes, by having all
descriptions of the packages via
json (at the least excluding those that require special shell-code to get
to work) - but that it may
actually help GoboLinux users more easily exchange their own recipes. They
would only have to
exchange json datasets here. That could even happen via copy/pasting on
anonymous GitHub
gists, if only to demonstrate as a proof of concept. :P

(Pushing information via recipe tarballs is also possible of course; I had
written code that would
batch-generate the recipes, then automatically upload to some FTP site ...
but I still think that
this is more complicated than e. g. a single json file, if that would be

GoboLinux recipes are still actively updated, as can be seen on github:


But it is often just lucas and hisham adding/updating recipes (if we
exclude some other
contributors, such as ATuin and several others of course; I don't mean to
not mention anyone
who has invested time here, I am primarily thinking how/whether this could
be improved. I
also understand that official recipes may get some kind of quality control
check when this
is done manually, but I am mostly thinking of the well-behaving programs
here, that is programs
that are really simple to install and require no special modifications).

The old store at http://recipes.gobolinux.org/r/ is probably no longer the
main "view repository"
(since it may lack maintenance work, which I assume arises due to lack of
time primarily) - but
even if the latter would still work, we may still have the issue of
slow(er) updates. Perhaps it
may be too cumbersome for people to contribute recipes that way (I have no
idea really, just
mentioning it).

Anyway - that's mostly the gist of the idea. It is somewhat random and
obviously should not replace
any of the old(er) ways that are working; my primary focus is thinking
about facilitating exchange
of information of recipes, as that may be a chicken-egg problem, at the
least for the simpler
programs. Well-behaving programs should be quite easy to install, that is,
don't require any
changes via sed, awk, shell-specific logic. (I guess I should perhaps do
some statistics
eventually, how many programs require changes, and how many programs do not
any changes; I can do that  eventually since I have gathered quite a large
dataset for existing
programs out there, even though some of the dataset is also ... many years
old, actually. I try
to look at gobolinux recipes too, to see that I have most of them covered,
at the least the
recent recipes, and programs that still have a valid URL. Some programs are
gone, not even available under a new URL.).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gobolinux.org/pipermail/gobolinux-users/attachments/20190501/45b545ea/attachment.html>

More information about the gobolinux-users mailing list