public inbox for gentoo-soc@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-soc] Ebuild generator Final report
@ 2011-08-22 16:30 darkdefende
  0 siblings, 0 replies; only message in thread
From: darkdefende @ 2011-08-22 16:30 UTC (permalink / raw
  To: gentoo-soc

This is the final weekly update for my ebuild generator project.

The goal of this project is to be able to generate ebuilds for fairly
simple programs/projects. You should just be able to point it to the source
code repo/mirror and it should download, scan the source and figure out what
to do and what dependencies are required.
You should not have to have the required dependencies installed to generate
an ebuild with this program.

Last week I worked mostly on fixing some small bugs, fixing a website and
writing an ebulid for my ebuild generator.
You can find the ebuild in the overlay dir in the git repo.

Website: http://soc.dev.gentoo.org/~darkdefender/ebuildgenerator
Github: https://github.com/DarkDefender/ebuildgen
Gentoo git: http://git.overlays.gentoo.org/gitweb/?p=proj/ebuildgen.git

The plan was to support makefile and autotools projects at the end of GSoC.
There where also plans for cmake/scons and even pure python project if there
were any time left.
Sadly only autotools project are now working good. There is some basic
makefile support. But I have disabled it for the time being as it where too
incomplete/buggy. It also only support SCM projects at the moment
(svn/git/hg). IE no tarballs yet. It shouldn't be hard to implement later.

It currently works like this:
- Ebuild generator gets called with a code repo
- It clones the repo to /tmp/ebuildgen/
- Scans the project for configure.ac, take the top most one (if here is
  multiple)
- Scan the configure.ac for possible useflags, variables that might be used
  in automake/source files
- Scan the makefile.am in the same dir as configure.ac and other automake
  files that gets pulled in by this makefile.am
- Link optional source files to useflags with the information that we have
  from the configure.ac scan
- Scan all sourcefiles that we got from the automake scan
- Link "#includes" that are in ifdefs to useflags
- Search in the include paths if the includes are local or if it's from a
  external dependency.
- Try to link the "globaly" #included to packages
- Use qfile to try to find the packages
- Use the pfl online database to guess
- Check if the guessed package exists in the package manager
- Output an ebuild to /tmp/ebuildgen/generated.ebuild

I think it works ok for the autotool projects that I've tried out so far.
It guesses quite well. But because the generator only "looks" at the code
and doesn't run it there will be cases where it will miss dependencies or
include bogus ones.
I think it would be really good to run the "auto dependency builder" by
Alexander Bersenev on the generated ebuild to check if it is sane dependency
wise.

For the future there is a lot features left to implement from autotools.
So the plan for the time being is to flesh out that till it's good enough
for most projects.
After that work will go into supporting other build methods.
I hope this project will at least help people when writing ebuilds for
projects. So you can generate the ebuild and then just do some small tweaks.

I will be quite busy with my studies so if anyone wants to help out/improve
the program just ask.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-22 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 16:30 [gentoo-soc] Ebuild generator Final report darkdefende

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox