Re: some problems and questions

Thomas Leonard <[email protected]> Sat, 14 Nov 2015 11:51:51 +0000
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <CAG4opy_-AoUYpu93yCU+Y--8S+wz2Q6sN+pi78XA8K2bFyGC7g@mail.gmail.com>
On 12 November 2015 at 23:19, Philip Miess <[email protected]> wrote:

[ Note: gmail put this in my spam folder, claiming it wasn't really
from yahoo; I found it after seeing Bastian's reply ]

> hello,
>     I've been trying to create a feed for winbuilds sdl2 package, and
> I've run into a number of problems.
>
> 1. The windows publishing tool crash if you past a > into a field.
> 2. The windows tools doesn't seem to know what a *.txz archive.
>
> So I started looking at using the Linux publish tool.
>
> 3. Gentoo no longer has a zero install package, or most of ROX for that
> matter.
> 4. Gentoo also doesn't have all the necessary versions of software
> installable to compile it. I think it was some Ocaml package dependency
> that foiled this attempt

Looks like Gentoo does have opam, which you can use to get all the
dependencies (or just "opam install 0install").

> These are not directly your area of course, but still of interest to you.
> so I downloaded the binary package and installed that in my home bin
> directory.
>
> Running the install for 0publish-gui I noticed that it required zero
> install 1.14, which is odd running in 2.10, and that it wasn't picking
> up the gentoo GPG package that is its dependency and is listed in the feed.
>
> 0launch posts a message taller than the screen when you cancel.
>
> I created a native feed with
> <package-implementation distributions="Gentoo" main="/usr/bin/gpg"
> package="app-crypt/gnupg"/>
> and that seemed to work not sure if its because its a native feed or if
> the full package path works better.

Yes, I guess it didn't know the name of the Gentoo gpg package, and
selected a really old version of 0install from before it specified
that dependency.
I've added your line to the gnupg feed, so it might work now. For
reference, on a cleanish Fedora 21 machine I get:

$ 0install select http://0install.net/2007/interfaces/0publish-gui.xml
- URI: http://0install.net/2007/interfaces/0publish-gui.xml
  Version: 0.14
  Path: (not cached)

  - URI: http://repo.roscidus.com/python/python
    Version: 2.7.8-11.21
    Path: (package:rpm:python:2.7.8-11.21:x86_64)

  - URI: http://0install.net/2007/interfaces/ZeroInstall.xml
    Version: 2.3.5
    Path: /home/user/.cache/0install.net/implementations/sha256new_WJTXRQOJFWFYBVFWITHSXEPGWXBX5YTSQXVT5DUT7RMUTIH6ETYQ

    - URI: http://repo.roscidus.com/security/gnupg
      Version: 2.0.29-1.21
      Path: (package:rpm:gnupg2:2.0.29-1.21:x86_64)

    - URI: http://repo.roscidus.com/python/python-gobject
      Version: 2.28.6-13.21
      Path: (package:rpm:pygobject2:2.28.6-13.21:x86_64)

  - URI: http://rox.sourceforge.net/2005/interfaces/ROX-Lib
    Version: 2.0.6
    Path: (not cached)

(I've just moved house and am accessing the net via a mobile phone, so
won't try downloading a Gentoo VM image at the moment)

If you want to find out why it didn't pick a particular version, you
can request a particular version like this to see the reason:

  $ 0install select http://0install.net/2007/interfaces/0publish-gui.xml \
        --version-for http://0install.net/2007/interfaces/ZeroInstall.xml 2.3.4

If you have the GUI, you can also right-click on the version in the
GUI and choose "Explain" from the menu.

> 0publish-GUI doesn't seem to allow using nested groups like on windows.

Looks like a bug. You can drag one group inside another afterwards though.

> It seems to take a long time to add groups elements

I suspect it's scanning the current directory for possibly binaries or
documentation directories. Not very sensible behaviour if run from
$HOME!

> It doesn't list "application/x-xz-compressed-tar" for archives but
> supplies that when guess is selected.

Added.

> It also complains if you save and test that there is no run element but
> of course libs shouldnt have them.

Seems reasonable - there's nothing to test in that case. It doesn't
know whether you're testing a library or a buggy application feed.

> Here is what I have so far let me know if its flawed, or could be better
>
> <?xml version="1.0" ?>
> <interface
> xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
>   <name>SDL2</name>
>   <summary>Simple DirectMedia Layer Version 2</summary>
>   <description>
> Simple DirectMedia Layer is a cross-platform multimedia library designed to
>
> provide low level access to audio, keyboard, mouse, joystick, 3D
> hardware via
>
> OpenGL, and 2D video framebuffer. It is used by MPEG playback software,
>
> emulators, and many popular games, including the award winning Linux port of
>
> &quot;Civilization: Call To Power.&quot;
>
> SDL supports Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD,
> NetBSD,
>
> OpenBSD, BSD/OS, Solaris, IRIX, and QNX. The code contains support for
> AmigaOS,
>
> Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS, and OS/2, but
> these are
>
> not officially supported.
>
> SDL is written in C, but works with C++ natively, and has bindings to
> several
>
> other languages, including Ada, C#, D, Eiffel, Erlang, Euphoria, Guile,
> Haskell,
>
> Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant,
> Python, Ruby,
>
> Smalltalk, and Tcl.</description>
>   <homepage>http://www.libsdl.org</homepage>
>   <category>Graphics</category>
>   <icon href="http://www.libsdl.org/media/SDL_logo.png" type="image/png"/>
>   <group license="OSI Approved :: zlib/libpng License">
>     <package-implementation distributions="Arch" package="sdl2"/>
>     <package-implementation distrobutions="Cygwin RPM" package="libSDL2"/>
>     <package-implementation distributions="Debian MacPorts"
> package="libsdl2"/>
>     <package-implementation distributions="Gentoo"
> package="media-libs/libsdl2"/>
>     <package-implementation distributions="Ports" package="sdl20"/>
>     <package-implementation distributions="Slack" package="SDL2"/>
>     <implementation arch="Windows-x86_64" doc-dir="doc/SDL2-2.0.3"
> id="sha1new=fbd4e672a96fea2fa14a4839bf39d0c406d4e54a"
> released="2015-11-28" version="2.0.3-1">
>       <archive extract="windows_32"
> href="http://win-builds.org/1.5.0/packages/windows_32/SDL2-2.0.3-1-i686-w64-mingw32.txz"
> size="489620" type="application/x-xz-compressed-tar"/>
>     </implementation>
>     <implementation arch="Windows-i386" doc-dir="doc/SDL2-2.0.3"
> id="sha1new=d02c29087ffb9c94fa8378510013f910c635907b"
> released="11/28/2014" version="2.0.3-1">
>     <archive extract="windows_64"
> href="http://win-builds.org/1.5.0/packages/windows_64/SDL2-2.0.3-1-x86_64-w64-mingw32.txz"
> size="503124" type="application/x-xz-compressed-tar"/>
>   </implementation>
>   </group>
> </interface>

Looks reasonable to me! I see 0publish-gui is only adding SHA1 hashes.
That needs fixing too...

> also if any of those are bugs you would like written up, let me know.
> Thanks,
> Phil.

Yeah, 0publish-gui could use some work...


-- 
Dr Thomas Leonard        http://roscidus.com/blog/
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

------------------------------------------------------------------------------