[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kerkerkruip



Dannii Willis <curiousdannii@gmail.com> writes:

> Hi all,
>
> Thanks for showing interest! We'd love for Kerkerkruip to be someday a part
> of Debian, but lack the experience to do it ourselves.
>
> We have a current .deb package available on our downloads page:
> http://kerkerkruip.org/downloads/
>
> It is a native package, which I understand is frowned upon, but it was the
> simplest for us. We could not build version 9 automatically, though this is
> something that could potentially change for version 10 as we now build
> automatically on Travis CI (and I guess that process could be adapted for
> the packaging process.)

Sorry, I did not see that. I have downloaded the package from
<http://downloads.kerkerkruip.org/kerkerkruip_9.0.1_all.deb>.

Lintian finished with exit status 0. Seems good news so far!
If I understand correctly, only a source package is missing.

The startup script looks weird to me though. Quoting it:

> #!/bin/bash

The Kerkerkruip startup script seems to be using no bash-specific
features. I think it would be better to just use /bin/sh here.

> if [ -f "/usr/games/gargoyle" ]; then
> 	GAR=/usr/games/gargoyle
> else
> 	GAR=/usr/games/gargoyle-free
> fi

I am not sure, but I think in Debian this would be handled by the
alternatives <https://wiki.debian.org/DebianAlternatives>. Is this
correct or should a Debian package just default to gargoyle-free?

> if [ ! -d "$HOME/.kerkerkruip" ]; then
> 	mkdir $HOME/.kerkerkruip
> fi
> if [ ! -f "$HOME/.kerkerkruip/Kerkerkruip.gblorb" ]; then
> 	ln -s /usr/share/kerkerkruip/Kerkerkruip.gblorb $HOME/.kerkerkruip/Kerkerkruip.gblorb
> fi
> if [ ! -f "$HOME/.kerkerkruip/Kerkerkruip.ini" ]; then
> 	ln -s /usr/share/kerkerkruip/Kerkerkruip.ini $HOME/.kerkerkruip/Kerkerkruip.ini
> fi
>
> $GAR $HOME/.kerkerkruip/Kerkerkruip.gblorb

First, why the symlinking? It seems to me that the symlink will stay if
the package is uninstalled and leave a broken symlink in the user's home
directory. Is this something about gargoyle that it expects the file in
a user's home directory? Could this be fixed in Debian's gargoyle-free?

Second, I think one should use “mkdir -p” instead of checking if a
directory exists. There might exist subtle race conditions otherwise,
that are likely irrelevant in here, but might not in many other cases.

Third, $HOME is not properly quoted here. If it contains any character
in $IFS, the script will create the wrong directory and wrong symlinks.

See this input to /bin/sh (or /bin/bash) for demonstration of quoting:
> mkdir /tmp/test; cd /tmp/test; TEST="J D"; mkdir -p $TEST/.kk; find

Its output shows the wrong folder has been created due to splitting:
> .
> ./J
> ./D
> ./D/.kk

I assume these really minor issues can and will be fixed upstream. Am I
right regarding that? Should I contribute a proper patch upstream?

> On 7 October 2014 14:28, Paul Wise <pabs@debian.org> wrote:
>
>> On Tue, Oct 7, 2014 at 11:08 AM, Nils Dagsson Moskopp wrote:
>>
>> > I do not have too much time right now. Since Kerkerkruip can be executed
>> > From a single gblorb file, I assume the things missing for packaging are
>> > an icon, a .desktop file and a man page. Is this correct? Does anyone on
>> > the games list have experience with packaging interactive fiction games?
>>
>> Indeed. Manual page is optional I would think. I would suggest also a
>> shell script that just execs the interpreter with the gblorb file as
>> an argument, so people can run it from the command-line easily.
>>
>
> Our package already contains these items. They are stored in our git repo
> in https://github.com/i7/kerkerkruip/tree/master/packages/debian
>
> -Dannii

-- 
Nils Dagsson Moskopp // erlehmann
<http://dieweltistgarnichtso.net>

Attachment: pgpPlyXlG8FY1.pgp
Description: PGP signature


Reply to: