Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2001 13:37:39 +0200
From:      Ernst de Haan <ernst@jollem.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        ports@FreeBSD.ORG
Subject:   Re: XML-based ports system ?
Message-ID:  <20010529133739.B924@c187104187.telekabel.chello.nl>
In-Reply-To: <20010528225753.C50483@xor.obsecurity.org>; from kris@obsecurity.org on Mon, May 28, 2001 at 10:57:53PM -0700
References:  <20010528105709.A9284@c187104187.telekabel.chello.nl> <20010528225753.C50483@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.port.pre.mk>

    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:

   <port name="jdk"
         prefix="linux-sun-"
         version="1.4.0"
         uses-linux="true" >

      <maintainer name="Ernst de Haan" email="ernst@jollem.com" />
      <category>java</category>
      <category>devel</category>

      <distribution>
         <distfile>j2sdk-1_4_0-linux-i386.bin</distfile>
         <master-site location="NA/US">ftp://ftp.sun.com/j2sdk</master-site>;
         <master-site location="EU/UK">ftp://ftp.sun.co.uk/j2sdk</master-site>;
      </distribution>

      <dependencies>
         <arch-dependency arch="i386" />
         <run-dependency executable="javavm" port="java/javavmwrapper" />
      </dependencies>
   </port>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010529133739.B924>