Re: coordination between lintian/piuparts/adequate
Soren Stoutner <[email protected]>
| Newsgroups | gmane.linux.debian.devel.quality-assurance,gmane.linux.debian.devel.lint.devel |
|---|---|
| Organization | Debian |
| Message-ID | <2529354.XLvNRG5608@soren-desktop> |
On Wednesday, November 13, 2024 4:09:28 PM MST Serafeim (Serafi) Zanikolas
wrote:
> On Tue Nov 12, 2024 at 4:12 AM CET, Soren Stoutner wrote:
> > In addition to adding an adequate Salsa CI job, you might also consider
> > updating the .sbuildrc example to contain the necessary information to
also
> > run adequate (assuming it isn’t too complicated).
> >
> > https://wiki.debian.org/sbuild#Setup
>
> that makes sense. here's the .sbuildrc snippet I came up with:
>
> $external_commands = {
> "chroot-cleanup-commands" => [
> [ 'apt install -y --install-recommends adequate' ],
> [ 'perl -e \'open(FH, ">", "/var/lib/adequate/pending") or die $!; while
> (<>) { my @c=split(" ", $_); print FH "$c[1]\n" if $c[0] eq "Package:" };
> close(FH);\' %SBUILD_PKGBUILD_DIR/debian/control' ], [ 'adequate', '--fail',
> '--pending' ],
> ]
> };
>
> before I update the wiki, any suggestions on how to simplify? it'd be much
> simpler if:
>
> - sbuild external commands would allow for subshells:
> adequate --fail $(grep ^Binary: %SBUILD_PKGBUILD_DIR/debian/control' |
cut
> -d: -f2) - sbuild would populate an escape variable with the list of built
> binary packages:
> adequate --fail %SBUILD_BINARY_PKG_NAMES
>
> thanks,
> serafi
The sbuild page has recently been edited to handle the new unshare backend.
The current version of the adequate code on the page is as follows:
## run adequate(1) and fail upon policy errors. Depends on adequate >= 0.17.2.
$external_commands = {
"chroot-cleanup-commands" => [
[ 'apt install -y --install-recommends adequate' ],
[ ‘/usr/share/doc/adequate/examples/sbuild-hook’,
’%SBUILD_PKGBUILD_DIR’],
]
};
This code produces an error for me:
I: Finished running 'apt install -y --install-recommends adequate'.
/usr/share/doc/adequate/examples/sbuild-hook /<<PKGBUILDDIR>>
---------------------------------------------------------------------------------------------------
2024/11/25 22:37:58 "dpkg-query -Wf ${binary:Package} ${Package};${Status};$
{Provides}\n -- feather-wallet" failed: exit status 1
E: Command '/usr/share/doc/adequate/examples/sbuild-hook /<<PKGBUILDDIR>>'
failed to run.
The example code above in the email also produces an error:
I: Finished running 'apt install -y --install-recommends adequate'.
perl -e 'open(FH, ">", "/var/lib/adequate/pending") or die $!; while
(<>) { my @c=split(" ", $_); print FH "$c[1]\n" if $c[0] eq "Package:" };
close(FH);' /<<PKGBUILDDIR>>/debian/control
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I: Finished running 'perl -e 'open(FH, ">", "/var/lib/adequate/pending") or
die $!; while
(<>) { my @c=split(" ", $_); print FH "$c[1]\n" if $c[0] eq "Package:" };
close(FH);' /<<PKGBUILDDIR>>/debian/control'.
adequate --fail --pending
-------------------------
2024/11/25 22:46:14 "dpkg-query -Wf ${binary:Package} ${Package};${Status};$
{Provides}\n -- feather-wallet" failed: exit status 1
E: Command 'adequate --fail --pending' failed to run.
Finished processing commands.
--
Soren Stoutner
[email protected]
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmdE/wMACgkQwufLJ66w tgMEGg//WtFAtgEfU5G952xadL1FTv+0YrsYNcRZBThjR4DfYXQx9BQwYv8k7qmR wfbAtR6xfvs3zCbcrExYVqyeR5MAL6gw9uKNYnxgFTI9PccFpab9oOHgb7yMkawA muQ/Qa6+m6wywPjBGpxvwpVeDUFxsRUSBPhSvCRCb2oZARHDHsmzwqNsrIDIIqba r481shz76wEQeepm3iTaxD7iLojeaWc1bPmlGYEv7Jvr4/8qOqjsI7KH80pLix6B iGpCQoQmwIgzSj1+6Cot1L4rbBWr5n4Sd4w9X7+IbEebr4dHIDhklzZzdP6J9lmY AqRahyq1DGD96/1LyFsXTMsTv8J1LC2YXmyGLVuedn2qCYKslyKH5L1ikFSSeKvQ zuiiMIC5cm/3MSzlDYIoBrxhFFCS1Yd74NaG2x7HJThmiRHfLT4qyqQdcG/v3cJb 3ZeY27CgCKG9JjFqm1l1POjPpMU9dvmglvmdULGSWTnRfMhrIDk0eHxSqazZuQfJ iU/bfMlun2ePgiNhkWdxH9/w682AhXbaicGIkcOlEP2IZ+BhHcD8zbxDkRXBdVoA 3dbhb66/Gd2Ko89AEJVX/8pD4CYInUlnaldDcLXTXYd6FctbGyenKuAqBCwVtFAu fIR6YHGzn51x9H7C6mBqzsu1BbdFbpS4RHOgE92mmICNFvKCZJ0= =KfSv -----END PGP SIGNATURE-----