From owner-freebsd-ports Tue May 29 4:39:32 2001 Delivered-To: freebsd-ports@freebsd.org Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with ESMTP id 502BA37B446 for ; Tue, 29 May 2001 04:39:27 -0700 (PDT) (envelope-from ernst@heinz.jollem.com) Received: (from ernst@localhost) by heinz.jollem.com (8.11.3/8.11.3) id f4TBbdn01088; Tue, 29 May 2001 13:37:39 +0200 (CEST) (envelope-from ernst) Date: Tue, 29 May 2001 13:37:39 +0200 From: Ernst de Haan To: Kris Kennaway Cc: ports@FreeBSD.ORG Subject: Re: XML-based ports system ? Message-ID: <20010529133739.B924@c187104187.telekabel.chello.nl> References: <20010528105709.A9284@c187104187.telekabel.chello.nl> <20010528225753.C50483@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010528225753.C50483@xor.obsecurity.org>; from kris@obsecurity.org on Mon, May 28, 2001 at 10:57:53PM -0700 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Kris & all, > I think the burden is probably on you to explain what the benefits of > such a system would be and why it would be worthwhile to give up all > the invested experience of working with the current system. I'm not > saying such a thing wouldn't be useful, but it would need to be > advocated well. The second step would be to produce a prototype > implementation clearly showing the potential benefits. Okay, you are probably right. I was trying to avoid a flame war, so that's why I was trying to figure out if more people had been thinking about this as well. Well, here goes nothing. These are some of the main advantages of XML in general: [1] XML is an industry standard that is replacing SGML, HTML and a lot of proprietary file formats. Slowly but surely. It is supported by key players on both sides of the field (Microsoft, Sun, IBM, Oracle, Apache, etc.) [2] `New' users are more and more already familiar with XML, and not with all kinds of proprietary file formats. They know how to work with DTDs, how to do transformations of XML files using XSLT, etc. I expect that a lot of potential *BSD users will be familiar with XML between now and 5 years from now. [3] It is much easier to learn one file format (XML) than learning 15 different file formats. Using XML for almost all file formats is clearly a tremendous advantage in terms of simplicity. The advantages specific for the ports system are or could be: [4] We would be able to define everything in one file (in a clean manner). This will have a considerable impact on the number of inodes required. If we would, we perhaps (!) wouldn't even need a separate directory for every port, although we would at least need one extra directory as a FILESDIR. For example: # ls /usr/portsng/java/ | grep jdk jdk1.1.xml jdk1.1docs.xml jdk1.2.xml jdk1.2docs.xml jdk1.3docs.xml jdk1.4docs.xml linux-blackdown-jdk1.2.xml linux-blackdown-jdk1.3.xml linux-ibm-jdk1.2.xml linux-ibm-jdk1.3.xml linux-sun-jdk1.2.xml linux-sun-jdk1.3.xml linux-sun-jdk1.4.xml [5] We would be able to move the ports collection even more from a procedural to a declarative approach. We would lose some bloat, like the lines like: .include Or rather replace it for other kinds of bloat ;) [6] We will be able to leverage existing XML tools for filtering, transformations/conversions, etc. We can use standard tools to create XHTML documentation (using XSLT), to name an example. [7] For every XML format a DTD defines the syntax for the format. The syntax will have to be simple (which is a pro) and using the DTD it will be very easy to check. There are standard tools for this, again. Hmm, this list of probably incomplete, but let the flame wars begin! ;) This is an example of what a simple port definition could look like: java devel j2sdk-1_4_0-linux-i386.bin ftp://ftp.sun.com/j2sdk ftp://ftp.sun.co.uk/j2sdk Note that this is a simplified example, I haven't thought the format over very carefully. I haven't tackled the use of regular expressions, etc. /Ernst -- Ernst de Haan Java Architect Jollem Information Technology "Come to me all who are weary and burdened and I will give you rest" -- Jesus Christ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message