Re: [lintian] branch rules-requires-root-classification created (now 0942dcb)
Axel Beckert:
> Hi,
>
Hi,
> Axel Beckert wrote:
>> This is an automated email from the git hooks/post-receive script.
>>
>> abe pushed a change to branch rules-requires-root-classification
>> in repository lintian.
>>
>> at 0942dcb checks/control-file.*: Add classification tags for R³
>
> I was curious how many packages are already using R³ and thought, a
> lintian classification tag would the perfect way to figure that out.
>
Indeed. :)
> I've implemented a bunch of according tags and committed them
> including tests in a feature branch called
> "rules-requires-root-classification" as can be seen at
> https://anonscm.debian.org/git/lintian/lintian.git/commit/?h=rules-requires-root-classification
>
> I'd be happy about reviews on that branch. If there are no objections,
> please merge that branch into master.
>
Please prefix the new tests with the name of the check. That enables us
to run all tests for the given check via:
t/runtests [options] t debian/test-out <check-name>
E.g.
t/runtests -j4 -k t debian/test-out control-file
> Some comments on this commit:
>
> * rules-requires-root-misses-namespace might not be necessary as
> building package with a broken R³ field already fails with an
> R³-supporting dpkg-dev version.
>
> Then again, building with an older dpkg-dev version might just cause
> a warning inmidst of the build log and hence easily overseen.
>
Personally, I would not bother with this tag as it is impossible to
build such a package in unstable. Generally the buildds will find this
issue unless people upload pre-compiled binaries (for all architectures)
built on a stable machine... seems unlikely to me.
> * Building the lintian package with or without the above commit
> currently fails for me as follows:
>
> tests::rules-including-deprecated-makefiles: install: cannot change ownership of 'debian/rules-including-deprecated-makefiles/usr/share/doc/rules-including-deprecated-makefiles/buildinfo_all.gz': Operation not permitted
>
> Running only the failing test with "debian/rules runtests
> onlyrun=rules-including-deprecated-makefiles" after the build fails,
> too, with the same error message.
>
Given the tests currently succeed on jenkins, my initial assumption you
have a "dirty" build environment that affects the test. I am guessing
it is related to dh-buildinfo.
Ideally, the test should be hardened against "random side-effects"
caused by a "unclean" chroot. Patches for that are very welcome.
> Interestingly running "fakeroot debian/rules runtests
> onlyrun=rules-including-deprecated-makefiles" fails as well.
>
The test runner cleans the environment for the tests (including
LD_PRELOAD), which will disable fakeroot for child processes. Just
occurred to me that this will neuter the "eatmydata" program as well.
You are welcome to add LD_PRELOAD to the list of whitelisted environment
variables in t/runtests, if you want too. You would be looking for
%PRESERVE_ENV.
> The fix for this seems to be to add the following contents as
> t/tests/rules-including-deprecated-makefiles/debian/debian/control.in:
>
> [...]
>
> So if I add that file, the test passes. Funnily, if remove that file
> again (e.g. with "git stash -u"), the test continues to pass until I
> run "debclean".
>
The lintian test suite catches "artefacts" to speed up builds, but the
cache check falls short when files are removed. You can force a rebuild
of the test by either:
rm -fr debian/test-out
OR
t/runtests -B t debian/test-out rules-including-deprecated-makefiles
(The latter uses the test runner directly, which has greater flexibility
IRT running tests - on the flip side, it expects you to create the
"test-out" directory).
> Confusing.
>
> Please tell me, if I should add an according commit to fix that, too.
>
> Regards, Axel
>
Thanks,
~Niels
Reply to: