You are not logged in.

#1 2006-03-01 11:31:43

Elias
Member
From: Lyon (Fr)
Registered: 2006-01-19
Posts: 35
Website

ebuild2pkgbuild.pl ?

I had the idea yesterday reading some posts on about gentoo and arch (the one using portage inside archlinux (sic, when you consider how messy portage is compared to pacman) to make a script converting an ebuild into a pkgbuild.

I spent the night on it (half of it, to be honnest i woke up at 12am), done it in perl (don't ask why, i don't know anything about perl or any other scripting language exept vbscript...).

I guess it is a fairly good beginning for this script : it reads most of the ebuild and convert it to pkgbuild synthax but there is lot of work to do still (handling errors, masked package and use flag support or fully implimenting gentoo naming convention for url). And as i'm more gentoo experienced than i'm arch experienced, i still need to read some stuff about building sections in pkgbuild... (in fact, i have no idea about how its done in pkgbuild).

But before going any further with it, i would like to know if it is okay with you. Let me explain how I see it: this could be an opportunity to add lot of packages to the official arch repos but it would be more artificial than anything else, the maintainer would be a perl script that itself depends on gentoo contributors.

What i mean is that we have now X packages in pacman, submitted by Y TU's. Convertings ebuilds from portage would my be result in 10X (tottally arbitrary choosen number, just for the example) packages in pacman while there is still Y TU's to maintin the whole thing and watch for news versions?
It would be an artificial growth for Arch and we wouldn't be able to keep tracks and make packages for the new versions of softwares included in pacman with the current numbers of TUs.

edit: it might be very messy, you might not understand this post. please consider i just woke up and didn't even had my coffee yet.

Offline

#2 2006-03-01 12:07:58

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: ebuild2pkgbuild.pl ?

Isn't it more KISS just to rewrite a fresh PKGBUILD roll

Offline

#3 2006-03-01 13:00:27

pikass
Member
From: Schwartz space
Registered: 2005-11-28
Posts: 85

Re: ebuild2pkgbuild.pl ?

Sure it is, but making such scripts you learn a lot, having phun and it 's a nice to have wink

Offline

#4 2006-03-01 13:53:12

Elias
Member
From: Lyon (Fr)
Registered: 2006-01-19
Posts: 35
Website

Re: ebuild2pkgbuild.pl ?

yes but i also believe that it might be lesspainful to hardly smash your head on the wall once to make this script than smash it weekly making PKGBUILDs. I guess the wall, your head, your girlfriend and your doc would agree with that smile
(not considering the problem for french contributors, each unnecessary smashed head on the wall resulting in digging the financial hole of the soon to be bankrupt social security system)

And at least, as pikass says, a lean a bit of perl...

Offline

#5 2006-03-01 14:39:31

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: ebuild2pkgbuild.pl ?

I think It's good idea. I've seen it said many times that people making PKGBUILDs have largely stolen (er, I mean, inspired by) ebuilds.

Clearly, it's not a one-to-one, and so could be quite awkward, but it's a worthy challenge if you want a programming task.

I'd say it would be best if it converted what it can guarantee to be correct, and then leave blanks for the areas that are known to require user intervention.

Offline

#6 2006-03-01 15:06:00

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: ebuild2pkgbuild.pl ?

Elias wrote:

i would like to know if it is okay with you.

It's a contribution - you don't have to ask permission, and conversely, nobody has to use it.

Elias wrote:

this could be an opportunity to add lot of packages to the official arch repos

You mean current and extra? Steady on there - I'm sure you're script has its uses, but I wouldn't exactly count on it being adopted by the Arch dev team.

Elias wrote:

What i mean is that we have now X packages in pacman, submitted by Y TU's. Convertings ebuilds from portage would my be result in 10X (tottally arbitrary choosen number, just for the example) packages in pacman while there is still Y TU's to maintin the whole thing and watch for news versions?

TUs submit to the community repo, and I could see it being useful in that context. However, it would still be up to each TU to decide whether to use it, and to support the package after submission, regardless of how it's created. I wouldn't use it myself, but others might.

Elias wrote:

It would be an artificial growth for Arch

If it happened automatically, yes, but it won't, will it? Your script is another way to produce PKGBUILDs - there are a few around, all of which are optional.

Those are my thoughts, anyway - the lack of enthusiasm could be down to my complete unfamiliarity with Gentoo, or more likely, my belief that our current system is working very well, and does not need to avail of work done for another distro.

Offline

#7 2006-03-01 20:34:45

Elias
Member
From: Lyon (Fr)
Registered: 2006-01-19
Posts: 35
Website

Re: ebuild2pkgbuild.pl ?

tomk wrote:

Those are my thoughts, anyway - the lack of enthusiasm could be down to my complete unfamiliarity with Gentoo, or more likely, my belief that our current system is working very well, and does not need to avail of work done for another distro.

Well, for having using Gentoo for quite a "long time" (which could be relative compared to other's experience), here is what i can tell about it...
full compilation provides some advantages (deep customisation if you set correctly your USE flag, which only a few people might correctly use), some myths (performance for example, i don't feel that my gentoo box "-O3  -funroll-loops -fomit-frame-pointer -pipe" was faster in anyway than my current archlinux box) and some clear disadvantages (want to install something else? I hope you are not in a rush to use it and even have some time to waste !).

In fact, in my opinion, the very big asset gentoo have compared to others distros is the number of available software that's why i'm currently trying to make a shorcut in order to bring to ArchLinux (without changing anything to the spirit as an ArchLinux GUI Control Panel would do for example wink) what I consider to be the main advantage of Gentoo.

Offline

#8 2006-03-01 21:20:31

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: ebuild2pkgbuild.pl ?

I think it's a neat idea, but you have to realize packaging standards for gentoo are different than standards for Archlinux.  Many ebuilds are going to put stuff in weird places, create weird user groups, that this script is going to miss.

You can write any software you want, no one can stop you.  I'm just thinking that this is not something I would use script -> repos.  To be honest I probably wouldn't use it at all.  Just another layer of things to debug and fix before the PKGBUILD is any good.

Offline

#9 2006-03-02 01:33:32

Elias
Member
From: Lyon (Fr)
Registered: 2006-01-19
Posts: 35
Website

Re: ebuild2pkgbuild.pl ?

Indeed it would be foolish to think, or even try, a script could remplace a brain, the point of it is just to make the first part of the job and convert without any issues fairly simple and basic ebuilds.

Read the level of compatibility of portage and being able to convert any ebuild into a PKGBUILD would be quite an accomplishment.

For the moment, my script, which now contains around 300 lines, can handle simple ebuilds such as nmap-4.01.ebuild fairly good. I tried it on some few others simple ebuild with good results... but it totally screw up when i fed him with the maildrop.ebuild (i immediately decided a ciggaret break, guess why roll)

It still has to learn how to handle dependancies (he can read what is requiered but doesn't "care" of the versions numbers yet), detect dependancies only needed with certains USE-FLAG (and comment them into the PKGBUILD). I'am almost done implimenting the gentoo ebuild naming convention (PV, PVR, PN, PF...) and I already started working around compilation and installation section which, as long as i stay away from "hard" ebuild, should not be a big problem.

So even thougt this might not be the best idea ever, i'm learning smthg anyway...

(and python looks nice too, i might try to re-write it in python)

Offline

#10 2006-03-02 10:00:00

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: ebuild2pkgbuild.pl ?

Here's something we could try, whenever you're happy with your script. Pick an app that Arch doesn't already have (not maildrop) and we'll try the two approaches - you run your script, and someone else does it "by hand". Then we compare the results.

What do you think?

Offline

#11 2006-03-02 15:58:01

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: ebuild2pkgbuild.pl ?

Oo ooo oo and put a time limit on it too.

Man vs. machine.  It's like Kasparov vs Blue, only with less black and white squares.

Offline

#12 2006-03-05 11:52:19

Elias
Member
From: Lyon (Fr)
Registered: 2006-01-19
Posts: 35
Website

Re: ebuild2pkgbuild.pl ?

Sounds good to me... but it shouldn't be before a while, i re-re-written the whole thing as i'm discovering better functions each time i read about perl on internet (and as the fact that "it works" is not enought, it have "to work and to be correctly coded").

Offline

#13 2006-03-05 17:36:47

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: ebuild2pkgbuild.pl ?

Couldn't agree more. Let us know when it's ready.

Offline

#14 2006-03-14 22:45:19

drynish
Member
Registered: 2003-10-01
Posts: 36

Re: ebuild2pkgbuild.pl ?

I totally agree for your idea... I would have thinked more of a python script since I mostly know it...

I just find it a bit special to not have the ability to build a pkgbuild right easily... some script  could just help to do the minimal and if we find a way to customize some work that has already being done by gentoo than... superb! smile

Let's see what I would like to have mambo... no package from current/testing/extra, nothing in aur... oh it's already there in gentoo... I could use this source to build my PKGBUILD or start from scrath... but I think it's the good way to think. No to rebuild the wheel all over again smile

Can you post your script online or just get a way to grab it. I know you're half done with it wink but I would like to see it wink

Michel

Offline

Board footer

Powered by FluxBB