Bug#704197: Please review: systemd checks

2013-04-17 Thread Michael Stapelberg
Hi Niels, Niels Thykier writes: > I thought this was safe, but it does have an issue as well. Consider > symlink chaining: > > safe-symlink -> unsafe-symlink > unsafe-symlink -> ../../../../etc/passwd > > $path->link_resolved will approve "safe-symlink" because it can be > resolved safely.

Bug#704197: Please review: systemd checks

2013-04-16 Thread Niels Thykier
On 2013-04-06 18:33, Michael Stapelberg wrote: > Hi Niels, > > [...] > Okay, so how about this? > > sub check_init_script { > my ($pkg, $info, $file) = @_; > > my $lsb_source_seen; > my $path = $info->index ($file); > unless ($path->is_regular_file || > ($path->is_sym

Bug#704197: Please review: systemd checks

2013-04-13 Thread Michael Stapelberg
Hi Niels, Thanks for your prompt reply. Niels Thykier writes: > Tests! Once there are tests for all the new tags (and none of the > existing tests breaks) we are usually ready to accept the checks. Cool. Find attached two git format-patch files. The first adds the latest version of my systemd

Bug#704197: Please review: systemd checks

2013-04-08 Thread Niels Thykier
On 2013-04-06 20:44, Michael Stapelberg wrote: > Hi Niels, > > Niels Thykier writes: >> I think you are missing a return here? > Indeed, thanks. > > New files are attached, here is the list of things that I know need to > be fixed: > > 1) We don’t have any documentation references in the .desc

Bug#704197: Please review: systemd checks

2013-04-06 Thread Michael Stapelberg
Hi Niels, Niels Thykier writes: > I think you are missing a return here? Indeed, thanks. New files are attached, here is the list of things that I know need to be fixed: 1) We don’t have any documentation references in the .desc file yet. 2) I need to switch to lab_data_path in check_maintainer

Bug#704197: Please review: systemd checks

2013-04-06 Thread Niels Thykier
On 2013-04-06 18:33, Michael Stapelberg wrote: > Hi Niels, > > Niels Thykier writes: >> [...] >> Almost; it definitely plugs the issues I mentioned. That said, I >> believe we prefer to emit tags instead of erroring out when we see an >> unexpected file type (e.g. see control-file-is-not-a-file)

Bug#704197: Please review: systemd checks

2013-04-06 Thread Michael Stapelberg
Hi Niels, Niels Thykier writes: >> sub check_init_script { >> my ($pkg, $info, $file) = @_; >> >> my $lsb_source_seen; >> my $path = $info->index ($file); >> fail "$file is neither a regular file nor a resolvable symlink" >> unless ($path->is_regular_file || defined($path

Bug#704197: Please review: systemd checks

2013-04-01 Thread Niels Thykier
On 2013-03-29 15:24, Michael Stapelberg wrote: > Hi Niels, > > Thanks for the super-fast review. New version is attached, I have fixed > everything you mentioned, and for the other things I commented inline: > You are welcome :) I have not reviewed your revised version yet, but I will try to lo

Bug#704197: Please review: systemd checks

2013-03-29 Thread Russ Allbery
Michael Stapelberg writes: > Niels Thykier writes: >> guidelines. I know Lintian's code style is a mess in general, so it >> describes the style I hope we will eventually reach[1]. :) > Have you tried using perltidy for Lintian? I loathe manual source code > formatting after working with gofm

Bug#704197: Please review: systemd checks

2013-03-29 Thread Michael Stapelberg
Hi Niels, Thanks for the super-fast review. New version is attached, I have fixed everything you mentioned, and for the other things I commented inline: Niels Thykier writes: > guidelines. I know Lintian's code style is a mess in general, so it > describes the style I hope we will eventually re

Bug#704197: Please review: systemd checks

2013-03-29 Thread Niels Thykier
On 2013-03-29 11:11, Michael Stapelberg wrote: > Package: lintian > Version: 2.5.10.4 > Severity: wishlist > > Attached you can find my first stab at systemd-related checks for > lintian. While some details in parsing the service files are not > implemented (see the TODOs in the code), I’d like yo

Bug#704197: Please review: systemd checks

2013-03-29 Thread Michael Stapelberg
Package: lintian Version: 2.5.10.4 Severity: wishlist Attached you can find my first stab at systemd-related checks for lintian. While some details in parsing the service files are not implemented (see the TODOs in the code), I’d like you to have a look at the checks in general. Is there anything