From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OZqJU-0001PD-JQ for garchives@archives.gentoo.org; Fri, 16 Jul 2010 19:11:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43ECFE07A2 for ; Fri, 16 Jul 2010 19:11:12 +0000 (UTC) Received: from mail-ew0-f53.google.com (mail-ew0-f53.google.com [209.85.215.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 22C12E083E for ; Fri, 16 Jul 2010 18:33:39 +0000 (UTC) Received: by ewy19 with SMTP id 19so988969ewy.40 for ; Fri, 16 Jul 2010 11:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=vjnfCsDvVOIJGOj4dX8sUq+mc3k9jQz09FD3bFdBtTc=; b=aw6DNusTGi49FLOYHARRJCMoOjTukvSMD0vXK6NYQUu3guykpnyTbuUOw5yS+TBOjY 2j6qGPLGGRDhru7b7eITjMN/7/Ik4qjS852qWno2ZWKcLe3jjViaTc1FdNaUqpxSi1yR +xOuuI1YdWclS2JgPh1nPww7yzN9Loz+Z4awo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=CS4ud7Tfp7sWRXEbXYVdFpfc1CyXz7A6HGELrsF3saNynGN0cNHKi7fVEsGqlERMjz kRiSLUunXBoiQyvMWNev3DSXVJB3V0Fyyi82DSBDJ/boHK4n4ZLPB63AgSyt0VSgKNpI ld8trs4oHax/URHKNih9BOre5KBNsGNJ4TIwU= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org MIME-Version: 1.0 Received: by 10.216.159.76 with SMTP id r54mr1089861wek.77.1279305217181; Fri, 16 Jul 2010 11:33:37 -0700 (PDT) Sender: andreas.nuesslein@googlemail.com Received: by 10.216.238.97 with HTTP; Fri, 16 Jul 2010 11:33:37 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Jul 2010 20:33:37 +0200 X-Google-Sender-Auth: FYEfVzwVk_hYBadvPOuHIX5qdU0 Message-ID: Subject: [gentoo-soc] Fwd: wacfg midterm report From: =?UTF-8?B?QW5kcmVhcyBOw7zDn2xlaW4=?= To: gentoo-soc@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 678e0b9d-34a7-4e28-b548-9d027ce44236 X-Archives-Hash: 409c77ce97664ddb5b4c47bda6510ba1 Hi all, This is my 'wacfg' midterm report. Hopefully I'll be able to post weekly status updates from now on. Abstract: wacfg is supposed to be a replacement for the old webapp-config for Gentoo. webapp-config is the web application installer and updater on gentoo. it currently has many issues and bugs, and its design has some serious flaws. fixing the current mess would be a waste of time. instead it should be reimplemented, possibly in a distro-agnostic manner. Status: For my proposal I created a Gantt-Timechart [1] which helped me give a general idea when I was expecting to be done with what. Eventhough I haven't looked at it for a while, I realised a few days ago that my progress stuck pretty neatly to the timeline - the following are done so far: - Evaluation of package formats / Parser for selected package format =C2=A0 =C2=A0 =C2=A0 =C2=A0After some evaluation, we, Benedikt and I, reali= zed that creating an own format would be overkill =C2=A0 =C2=A0 =C2=A0 =C2=A0and I'd rather create a syntax that is similar t= o that of 'setuptools' (from Python). =C2=A0 =C2=A0 =C2=A0 =C2=A0What i came up with is the following: =C2=A0 =C2=A0 =C2=A0 =C2=A0Portage (or later on apt-get) will simply copy t= he source-tarball and a special wacfg.py-'configfile' =C2=A0 =C2=A0 =C2=A0 =C2=A0into /usr/share/webapps/$webapp/$version/. After= wards the wacfg CLI will handle the installation to the =C2=A0 =C2=A0 =C2=A0 =C2=A0correct vhost (even if it is simply "localhost")= . See below for some examples. - Installation fo application instances: =C2=A0 =C2=A0 =C2=A0 =C2=A0Works. I started testing with wordpress, joomla = and phpBB, which all worked out of the box. =C2=A0 =C2=A0 =C2=A0 =C2=A0More web-application will obviously be tested, a= s mentioned in the Gantt. - Configurating instances: =C2=A0 =C2=A0 =C2=A0 =C2=A0I started writing tools for that, e.g. "chmod", = "chown" and "server_own" (which will give permissions =C2=A0 =C2=A0 =C2=A0 =C2=A0to the server-user). I will create more tools as= the need arises when I'm evaluating more webapps. - Upgrading instances: =C2=A0 =C2=A0 =C2=A0 =C2=A0Works. In an installed webapp-instance a file .wacfg-$webapp-$version is created with the files' checksums =C2=A0 =C2=A0 =C2=A0 =C2=A0(just like in webapp-config). Just like portage,= when a file has been manually changed, wacfg renames the new =C2=A0 =C2=A0 =C2=A0 =C2=A0file to ._cfg????_file and copies it into the sa= me location. Afterwards etc-update or dispatch-conf can be used =C2=A0 =C2=A0 =C2=A0 =C2=A0to run diffs on these files. =C2=A0 =C2=A0 =C2=A0 =C2=A0Not yet included is a fully automated upgrade of= all installed instances. Obviously this is an upcoming feature. wacfg.py-format: Example 1: ------------------------- from WaCfg import main main(source=3D'webapp-version.tar.bz2') ------------------------- This should work on most packages as it will unpack the tarball into a sandbox, and move them to the given location (/var/www/vhost/htdocs/installdir). Example 2: ------------------------- from Wacfg import main, WaCfg, tools class MyApp(WaCfg): =C2=A0 =C2=A0 =C2=A0 =C2=A0def src_unpack(self): =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tools.archive_unpack= () =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0some other stuff.. =C2=A0 =C2=A0 =C2=A0 =C2=A0def src_config(self): =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tools.chmod(0700, ce= rtainfile) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tools.chown('otherse= rveruser') =C2=A0 =C2=A0 =C2=A0 =C2=A0def post_install(self): =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print("Do stuff afte= r installing... e.g. create a database-user like so:... yada yada yada") main(MyApp) ------------------------- This example won't work like that and it's only supposed to show the general idea... As I said: more tools need to be defined for convenience. About the author: My CV can be found on my website [2]. I've been somewhat active in the Open Source community for years now (writing a few bugtracker reports, minor patches, ebuilds...) ; I've been using Gentoo since 2005 and I don't see a reason to change that anytime soon. Also I joined the Gentoo e.V. earlier this year. 1 - http://nutz.noova.de/gsoc-gantt.png 2 - http://nutz.noova.de/cv.pdf Cheers, Andy