Zero Install feed for SDL

Hi Sam,

Since you’ve already got a release process, the easiest way is probably a
script to add the binary packages to the XML. There’s a script to do this
automatically, called deb2zero. Alternatively, there’s also a script for
RPMs (currently unreleased, but I can release it easily enough).

SDL seems to have good binary compatibility, so it shouldn’t matter too
much which you use (I ran the binary of ClanBomber, compiled using
Debian/unstable, on Ubuntu 9.04, using RPMs of SDL, and it worked fine).

I slightly prefer debs, because they have a more consistent layout
(always lib/*.so). RPMs sometimes use ‘lib’ and sometimes ‘lib64’,
though it can be worked-around easily enough. It’s best to do the same
each time though (always use the deb or always use the RPM) because
other programs will depend on the layout to find the .so files.

For example, to create the feeds (tested on Ubuntu 9.04, but similar
instructions will work for other systems)…

Get the scripts:

$ sudo apt-get install zeroinstall-injector
$ 0alias deb2zero http://0install.net/2008/interfaces/deb2zero.xml
$ 0alias 0publish http://0install.net/2006/interfaces/0publish

Create a feed for SDL. The URL for the .deb should be a stable location
(otherwise, it will need to be updated from time-to-time). Enter the
URL where the XML feed will appear on the web-site, when prompted:

$ deb2zero http://ftp.uk.debian.org/debian/pool/main/libs/libsdl1.2/libsdl1.2debian_1.2.13-2_i386.deb libsdl1.2.xml
Enter the URI for this feed: http://www.libsdl.org/lib/libsdl1.2.xml
Wrote name mapping to ~/.config/0install.net/deb2zero/deb-mappings
Added version 1.2.13-2 to libsdl1.2.xml

This results in an XML file with the download link for this version. If
you run it again with the URL for a different version (e.g. a newer version
or a different architecture) it will add that to the same file. It also
records the mapping from the Debian package name to the URI you entered,
so dependencies can be handled automatically later.

Finally, sign the file and upload it:

$ 0publish --xmlsign --key=Sam libsdl1.2.xml
Changing key from ‘None’ to 'Sam’
Exported public key as ‘A863218B2F77EB73.gpg’
$ scp libsdl1.2.xml A863218B2F77EB73.gpg server:/var/www/lib/

You only have to tell it to sign the file once; when adding new versions
later it will resign it with the same key. If you want to test without
uploading, use “0launch --import libsdl1.2.xml”.

To add other SDL libraries, make sure their dependencies have already been
done. Then, e.g.

$ deb2zero http://ftp.uk.debian.org/debian/pool/main/s/sdl-image1.2/libsdl-image1.2_1.2.6-3_i386.deb
Wrote name mapping to ~/.config/0install.net/deb2zero/deb-mappings
Added version 1.2.6-3 to libsdl-image1.2.xml

I’ve edited the old Barrage XML to point at your new version, so you
should be able to test it with:

$ 0launch http://0install.net/tests/Barrage.xml

For the -devel packages, I think it might be easiest if I modify our
compile system to rewrite the pkg-config file itself. That should help
with other programs, too.

Thanks,On Sat, 23 May 2009 08:42:24 -0700, Sam Lantinga wrote:

If you want to create a Zero Install feed, I’ll be happy to make changes
to the SDL archives to make it easy for you to do so! Or if you want to
write a script to automate it, I can certainly put it together as part
of the SDL release process.

See ya!
–Sam

On Sat, May 23, 2009 at 6:27 AM, Thomas Leonard <@Thomas_Leonard> wrote:

Hi all,

Sorry if this has been asked before, but I notice that there are quite
a few Zero Install feeds for programs depending on SDL (Zero Install is
an open source decentralised software distribution system: see
http://0install.net for details). A quick look turned up this list:

opencity
gnome-inform7
python-pygame
grquiz
FooBillard
Barrage
LBreakout
LGeneral
LMarbles
LPairs
Penguin Command
Epeli
OpenTTD
ClanBomber

However, there’s no official feed for SDL itself, so they depend on
various different feeds which have been made by different people, and
are out-of-date to varying degrees.

e.g.

$ 0launch --list sdl
http://0install.net/2008/3rd-party/libsdl-image1.2.xml
http://0install.net/2008/3rd-party/libsdl-mixer1.2.xml
http://akfoerster.de/zero/sdl-1.2.xml
http://freenet-homepage.de/LinuxCNC/0install/SDL-mixer/sdl-mixer.xml
http://freenet-homepage.de/LinuxCNC/0install/SDL/sdl.xml
http://people.freenet.de/LinuxCNC/0install/sdl
http://people.freenet.de/LinuxCNC/0install/sdl-mixer
http://people.freenet.de/LinuxCNC/0install/sdl-mixer-libmikmod

Some games don’t explicitly depend on SDL at all, and require the user
to install it manually (e.g. ClanBomber, which doesn’t work on Ubuntu
9.04 because it depends on SDL from Debian/unstable, since there’s no
feed of a recent enough version of SDL).

Would you be interested in publishing official feeds for SDL (for the
runtime and devel packages)? I was going to publish a feed for the RPMs
directly, but I see that the -devel packages have a hard-coded
pkgconfig path. e.g. they use:

prefix=/usr

rather than:

prefix=${pcfiledir}/…/…

Zero Install packages are never installed to system-owned locations
like /usr, so I’d have to patch them, and I thought it might be easier
to get them published that way in the first place. Let me know if
you’re interested in this (or if you want any help).


Dr Thomas Leonard http://rox.sourceforge.net GPG: 9242
9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1

_______________________________________________ SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Dr Thomas Leonard http://rox.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1

Thomas Leonard wrote:

I slightly prefer debs, because they have a more consistent layout
(always lib/*.so). RPMs sometimes use ‘lib’ and sometimes ‘lib64’,
though it can be worked-around easily enough. It’s best to do the same
each time though (always use the deb or always use the RPM) because
other programs will depend on the layout to find the .so files.

The layout of the package is determined by the underlying operating
system, not the package format.

lib64/ is used by dual-architecture systems, such as PPC64 and x86_64,
with lib/ used for 32-bit libraries.

Eddy

Thomas Leonard wrote:

I slightly prefer debs, because they have a more consistent layout
(always lib/*.so). RPMs sometimes use ‘lib’ and sometimes ‘lib64’,
though it can be worked-around easily enough. It’s best to do the same
each time though (always use the deb or always use the RPM) because
other programs will depend on the layout to find the .so files.

The layout of the package is determined by the underlying operating
system, not the package format.

True. I meant, packages for Debian-based systems use ‘lib’ everywhere.

Zero Install doesn’t care about the packaging format; it just unpacks
them in the same way as it would a tarball. Because every package unpacks
to a different directory there are never any file conflicts, so having
two packages both providing /lib/libSDL.so present at the same time isn’t
a problem.On Tue, 26 May 2009 19:07:42 +0100, Edward Cullen wrote:

lib64/ is used by dual-architecture systems, such as PPC64 and x86_64,
with lib/ used for 32-bit libraries.

Eddy


Dr Thomas Leonard http://rox.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1

Well at least Gentoo and some other distros put 32bit libs to lib32/ and 64bit
libs to lib64/. And the lib/ is simply a link to lib64/.

Well this is only when one uses multilib environment for 32bit compatibility.
For the multilib free install stuff is installed to lib/ directly, but then
you simply can’t use 32bit libs without a chroot.

OT OT Gentoo Sale out to developers OT OT :wink:

I found out that this compile all thing in fact saves time for me, as during
the compiles I can do other things. In binary disto I often needed to solve
many things before I can get some more exotic binary things to install and
work or even worse need to start compiling stuff from svn or tar balls to
fullfil the dependencies of the stuff I wanted to install.

So I rather compile everything and if I need newer version than Gentoo offers
I can roll my own “package” (ebuild) to most nicely building software
(autotools/cmake) from an earlier ebuild version under 5 minutes. Or a
completely new ebuild under 10 minutes. And most of that time goes on making
sure I listed all the deps that this software needs, so that I don’t get
bitten by removal of needed stuff if I remove normal distro provided software.

Besides vectorization is a nice thing of gcc… :)On Tuesday 26 May 2009 21:07:42 Edward Cullen wrote:

Thomas Leonard wrote:

I slightly prefer debs, because they have a more consistent layout
(always lib/*.so). RPMs sometimes use ‘lib’ and sometimes ‘lib64’,
though it can be worked-around easily enough. It’s best to do the same
each time though (always use the deb or always use the RPM) because
other programs will depend on the layout to find the .so files.

The layout of the package is determined by the underlying operating
system, not the package format.

lib64/ is used by dual-architecture systems, such as PPC64 and x86_64,
with lib/ used for 32-bit libraries.

OT OT Gentoo Sale out to developers OT OT :wink:

I found out that this compile all thing in fact saves time for me, as during
the compiles I can do other things. In binary disto I often needed to solve
many things before I can get some more exotic binary things to install and
work or even worse need to start compiling stuff from svn or tar balls to
fullfil the dependencies of the stuff I wanted to install.

So I rather compile everything and if I need newer version than Gentoo offers
I can roll my own “package” (ebuild) to most nicely building software
(autotools/cmake) from an earlier ebuild version under 5 minutes. Or a
completely new ebuild under 10 minutes. And most of that time goes on making
sure I listed all the deps that this software needs, so that I don’t get
bitten by removal of needed stuff if I remove normal distro provided software.

Besides vectorization is a nice thing of gcc… :slight_smile:

uh, binary packages are of course built from sources. gentoo’s ebuild
system just makes that a little more obvious/easier to access. I’m
sure people who are familiar with srpms and deb-src (or whatever they
are called these days) can whip up a “packaging script” just as
quickly.

I can build all the binaries on my system from sources, but why would I
want to burn up electricity and wear down my disks, when someone else
is already doing this work and I can just use their final package?
especially for things like firefox, openoffice or a full kde or gnome
suite, it just seems terribly wasteful, not only of my time, but also
of the earth’s limited resources …On Wed, May 27, 2009 at 02:19:47AM +0300, Sami N??t?nen wrote:


@Jacob_Meuser
SDF Public Access UNIX System - http://sdf.lonestar.org

OT OT Gentoo Sale out to developers OT OT :wink:

I found out that this compile all thing in fact saves time for me, as
during the compiles I can do other things. In binary disto I often needed
to solve many things before I can get some more exotic binary things to
install and work or even worse need to start compiling stuff from svn or
tar balls to fullfil the dependencies of the stuff I wanted to install.

So I rather compile everything and if I need newer version than Gentoo
offers I can roll my own “package” (ebuild) to most nicely building
software (autotools/cmake) from an earlier ebuild version under 5
minutes. Or a completely new ebuild under 10 minutes. And most of that
time goes on making sure I listed all the deps that this software needs,
so that I don’t get bitten by removal of needed stuff if I remove normal
distro provided software.

Besides vectorization is a nice thing of gcc… :slight_smile:

uh, binary packages are of course built from sources. gentoo’s ebuild
system just makes that a little more obvious/easier to access. I’m
sure people who are familiar with srpms and deb-src (or whatever they
are called these days) can whip up a “packaging script” just as
quickly.
Yeah! but the compilation itself has never been the problem. The problem is
when I need newer package of one of the system libraries as the binary
packages simply don’t work with the newer library.

The reason I stayed on source based distro is the fact that it has no release
cycle like binary distros, but it is continuously updating/evolving system and
thus less work for me.

As I don’t need to wait the compilation to finish unlike when I need to solve
dependencies of binary packages and find them else where.

I can build all the binaries on my system from sources, but why would I
want to burn up electricity and wear down my disks, when someone else
is already doing this work and I can just use their final package?
especially for things like firefox, openoffice or a full kde or gnome
suite, it just seems terribly wasteful, not only of my time, but also
of the earth’s limited resources …

Well I don’t install all of those big packages I only install those parts that
I use. :wink:

After all I like Fluxbox more than KDE, Gnome or any other Desktop for that
matter.

Also I don’t wear my disks as I compile in tmpfs environment so no need to
wear disks down.

But if you want something newer than the distro provides you end up in
dependency hell really fast. And if that package is used by huge part of the
system this will be unbearable compared to source based distros.

This was the most anoying thing when I started to test *buntus etc. After
years of Gentoo usage.

And for the energy consumed by the compilation it has very litle efect when
you take everything considering this energy consumtion in to account.On Wednesday 27 May 2009 04:03:12 Jacob Meuser wrote:

On Wed, May 27, 2009 at 02:19:47AM +0300, Sami N??t?nen wrote:

Did the script I sent (24th May) work OK?

Let me know if there are any problems,

Cheers,On Sat, 23 May 2009 08:42:24 -0700, Sam Lantinga wrote:

If you want to create a Zero Install feed, I’ll be happy to make changes
to the SDL archives to make it easy for you to do so! Or if you want to
write a script to automate it, I can certainly put it together as part
of the SDL release process.

See ya!
–Sam

On Sat, May 23, 2009 at 6:27 AM, Thomas Leonard <@Thomas_Leonard> wrote:

Hi all,

Sorry if this has been asked before, but I notice that there are quite
a few Zero Install feeds for programs depending on SDL (Zero Install is
an open source decentralised software distribution system: see
http://0install.net for details).
[…]


Dr Thomas Leonard http://rox.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1