From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JRvjm-0004jY-9g for garchives@archives.gentoo.org; Wed, 20 Feb 2008 20:40:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E54FDE03BA; Wed, 20 Feb 2008 20:40:16 +0000 (UTC) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.185]) by pigeon.gentoo.org (Postfix) with ESMTP id 7DFE8E03BA for ; Wed, 20 Feb 2008 20:40:15 +0000 (UTC) Received: by rv-out-0910.google.com with SMTP id b22so1912466rvf.46 for ; Wed, 20 Feb 2008 12:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=OgzZ+V5205j2ID8JR/Y33zUmbH2VNTjnqFU0zp4Gyp4=; b=NeqgGOFvnntuz/4I1foKwnnbH2qSS+ozGTt0HVzTiqk+pm6JiZBy3XQYZDxP47PxCBlJNoVUFBrDgRRBZ8DjDq4y5HD7h7z68wnT21tg64ezC2nCLdfJLmohoLfRMWbJuOhvuYaGs1Ql/1fi3B13Tl8L3xS/lHLAa8/ONUFcRW8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=IMCOLvjMHVxEzhf/E+4JOHtZk3AhDLRAPiJR9r5m/JL+gSIMYzjOiqKStuyYyQaROqQalkknByqKQXGpoKOmazr0BpA3BnZaKNv9a7dPM3SmbNARbr6UP4NuWyvIO9GGrskkGpjmM8p+pIpOPa8PN9z9S3Fcy1lsosuct9TiPps= Received: by 10.140.251.1 with SMTP id y1mr6044797rvh.102.1203540014883; Wed, 20 Feb 2008 12:40:14 -0800 (PST) Received: by 10.140.188.7 with HTTP; Wed, 20 Feb 2008 12:40:14 -0800 (PST) Message-ID: <94a0d4530802201240v19dde77vff199cb11ece0bbd@mail.gmail.com> Date: Wed, 20 Feb 2008 22:40:14 +0200 From: "Felipe Contreras" To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] The future of ebuild Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Archives-Salt: 53adf209-0a86-4f90-981c-33b96d95f996 X-Archives-Hash: 649edc5c19a2c056408784ac5b50e471 Hi gentooists, I've been reading news sites about some changes happening in Gentoo and I thought it might be a good time to submit some ideas I've been baking for several years. I come from a Linux From Scratch background, I like the feeling of knowing every single corner of my system and the fact that there isn't anything that I don't want or need. However, typing every single command by hand is far from ideal, so at first I started writing some scripts and eventually I wrote a build system that suited my needs. I did it in bash for several reasons. After a while I realized bash wasn't exactly the best language to write such thing. Mainly because: a) The code ends up with a lot of stuff for handling strings properly (like escaping sequences) b) Error are difficult to handle since bash doesn't have exceptions c) Persistent information is difficult to achieve (no database stuff) d) Package information is difficult to fetch/store (no objects/struct) A more featured language could allow for example: filtered output, exception handling->state storage->resuming. But the big deal is with the package definition, recently I learned about Domain Specific Languages, and I think that is the best option. A new dsl allows many interesting features in the package definition itself like: inheritance, exceptions, arrays, hash tables, objects, modules, documentation, information messages, etc. Take this example: package Binutils < Gnu definition @version = "2.17" @name = "binutils" super() # run the Gnu definition stuff @config_opts = "--disable-nls --with-sysroot=\"#{$sys_root}\" --enable-shared --disable-multilib" end steps build cd #{$top_build_dir} mkdir -p #{@build_dir} cd #{@build_dir} :configure "script" => "../#{@dir}/configure", "opts" => @config_opts make configure-host make end install cd #{$top_build_dir} cd #{@build_dir} make install end end end This is based on an already working prototype made in Ruby, so it's biased towards Ruby facilities. I've tried different build systems: rpm, dpkg, autopackage. Unfortunately I never tried ebuild because it was based on bash as far as I could tell. After almost a decade of using Linux I still haven't found a build system that suits all my needs. AFAIK ebuild is the most advanced but it's still relying on ancient technology (bash scripts) so there will always be limitations despite the brilliant ideas. The core of a distribution is the "packaging" system, and the core of the packaging system is the building system, which has no reason not to be distribution agnostic, and actually, packaging system agnostic. Why not create a new build system with a state of the art programming language, and an advanced DSL that actually other distributions could use? I would like to hear your opinions on this matter. -- Felipe Contreras -- gentoo-dev@lists.gentoo.org mailing list