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

Re: Bug#716905: RFS: goodbye/0.3-1 [ITP]



Adam Borowski <kilobyte@angband.pl> writes:

>> * debian/rules without arguments does not behave sanely:
>> 
>>   make: *** No targets.  Stop.
>> 
>>   It should at least do something, but "no targets" is unexpected.

ACK. This wasn't a REJECT-worthy reason alone, many packages fail in
similar ways, but if you're making an example package, make it better
than what's already available, in my opinion. Or worse, if that's your
goal. :P

>> * It unconditionally rewrites debian/control
>> 
>>   This is REJECT reason alone. You simply don't do that.
>
> Thus I don't.  Please tell me in what circumstances would it overwrite
> debian/control.

My mistake, I mixed up control and debian/control. But that highlights
another problem with the package: it's kind of hard to follow what it
does, and why.

>> * debian/rules with an invalid target name still works:
>> 
>>   debian/rules binary == debian/rules yranib
>> 
>>   It should produce an error. This kind of unexpected behaviour is
>>   confusing, and not something we want in the archive. We already have
>>   CDBS for that[1], thank you.
>
> Policy 4.9 explicitely allows extra targets.  Using any not defined in
> the policy is undefined behaviour; a comment in "goodbye" mentions
> that.

Fair enough.

>> * The binary created by d/rules is invalid:
>> 
>> algernon@hadhodrond:/tmp/b$ dget -x -u http://mentors.debian.net/debian/pool/main/g/goodbye/goodbye_0.3-1.dsc 
>> dget: retrieving http://mentors.debian.net/debian/pool/main/g/goodbye/goodbye_0.3-1.dsc
>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>                                  Dload  Upload   Total   Spent    Left  Speed
>> 100  1440  100  1440    0     0   342k      0 --:--:-- --:--:-- --:--:--  703k
>> dget: retrieving http://mentors.debian.net/debian/pool/main/g/goodbye/goodbye_0.3.orig.tar.xz
>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>                                  Dload  Upload   Total   Spent    Left  Speed
>> 100  1824  100  1824    0     0   471k      0 --:--:-- --:--:-- --:--:-- 1781k
>> dget: retrieving http://mentors.debian.net/debian/pool/main/g/goodbye/goodbye_0.3-1.debian.tar.gz
>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>                                  Dload  Upload   Total   Spent    Left  Speed
>> 100  3133  100  3133    0     0   133k      0 --:--:-- --:--:-- --:--:--  145k
>> dpkg-source: info: extracting goodbye in goodbye-0.3
>> dpkg-source: info: unpacking goodbye_0.3.orig.tar.xz
>> dpkg-source: info: unpacking goodbye_0.3-1.debian.tar.gz
>> algernon@hadhodrond:/tmp/b$ cd goodbye-0.3/
>> algernon@hadhodrond:/tmp/b/goodbye-0.3$ debian/rules binary
>> ar: creating ../goodbye_0.3-1_all.deb
>> doing: [binary]\n
>> algernon@hadhodrond:/tmp/b/goodbye-0.3$ dpkg-deb -c ../goodbye_0.3-1_all.deb
>> dpkg-deb: error: archive has no newlines in header
>> 
>> And indeed, debian-binary contains "2.0\n", and no newline.
>
> Uh?
>
> dpkg-deb -c ../goodbye_0.3-1_all.deb
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/share/
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/share/doc/
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/share/doc/goodbye/
> -rw-r--r-- root/root       476 2011-07-29 01:45 usr/share/doc/goodbye/copyright
> -rw-r--r-- root/root       203 2013-07-15 22:42 usr/share/doc/goodbye/changelog.gz
> -rw-r--r-- root/root       322 2013-07-15 22:42 usr/share/doc/goodbye/changelog.Debian.gz
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/share/man/
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/share/man/man1/
> -rw-r--r-- root/root       285 2013-07-15 22:42 usr/share/man/man1/goodbye.1.gz
> drwxr-xr-x root/root         0 2013-07-15 22:42 usr/bin/
> -rwxr-xr-x root/root       126 2011-07-29 01:45 usr/bin/goodbye
>
> Could you please tell me how did you get that effect?  That would imply
> make suddenly failing to unescape "\\"; any version of make in Debian
> follows the same rules.

I'm on wheezy/amd64, make 3.81-8.2, bash 4.2+dfsg-0.1, tcc
0.9.26~git20120612.ad5f375-6, with /bin/sh set to bash.

The problem is that the echo behaviour you depend on is not something
/bin/echo or bash support:

(zsh):
% echo '\n\n'


%

(bash):
$ echo '\n\n'
\n\n
$

(dash):
$ echo '\n\n'


$

(/bin/echo):
$ /bin/echo '\n\n'
\n\n
$

You will likely need to use either printf, or /bin/echo -e, or force
SHELL to be dash, or any suitable shell.

Once I changed my chroot to point /bin/sh to bash instead of dash, the
package failed to build from source. This falls under the FTBFSIASW of
the REJECT-FAQ[1].

 [1]: http://ftp-master.debian.org/REJECT-FAQ.html

>> * Debugging d/rules is unnecessarily hard
>> 
>> I can' easily attach gdb to figure out what's wrong. stracing it is
>> painful too.
>
> set follow-fork-mode
> strace -f
> tcc (or gcc, or clang ...) to a file
>
> On the other hand, Make is one of worst languages where it comes to
> debugging.  debhelper at least sabotages it by using mostly perl and
> shell, but try to debug a CDBS package...

The thing with dh is, if it fails, the problem is either in your
packaging, in files you wrote, and you won't have to touch perl at all,
or it is in debhelper, in which case you report a bug and it becomes
someone else's problem. Same goes for CDBS.

If either fails, chances are, you won't need to debug the build system
at all. But even if you do need to, there are plenty of people who can
assist. They're well understood by a significant number of people.

That's not the case here.

> This package has two aims:
> * educational: to show people the absolutely[1] minimal low-level way of
>   creating a correct binary package
> * fun: perverting the policy while obeying every word, and being as
>   readable as possible
>
> Thus criticism that points to a rule it breaks is valid, criticism that
> accuses it about merely breaking common sense misses the point.

You need to understand, that the Debian archive is not a playground, and
ftp-masters are not only here to follow the letter of policy, but to
keep the archive in a reasonably sane state. If you upload a package
that deliberately goes against common sense, that goes against the goal
of having a sane archive, and as such, your package will be rejected,
unless you can make a compelling case for it. In case of goodbye, I fail
to see how such a case could be made.

It will always fail the FTBFSIASW rule, because frankly, a C program as
debian/rules is never going to be sane, and just above, you yourself
said it breaks common sense. The REJECT-FAQ listed above, also makes a
note that debian/rules should be clear: while yours is resonably
readable considering the perverted idea, it is a deliberately bad
example, and as such, we don't want it in the archive.

It's a great example, I love it, but it's not fit for the Debian
archive, not as a package of its own. You can try persuading the
maintainers of the Packaging Tutorial or the New Maintainers' Guide to
include a chapter about the bare minimums, and present your packaging as
an asset instead.

-- 
|8]


Reply to: