Message ID | 20191219182951.61115-1-cascardo@canonical.com |
---|---|
State | New |
Headers | show |
Series | [U/F/E/D/B/X] UBUNTU: [Packaging]: config-check: some enforcement is ignored | expand |
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
On 2019-12-19 19:29, Thadeu Lima de Souza Cascardo wrote: > Whenever config-check finds an entry like: > > CONFIG_VFIO mark<ENFORCED>note<LP#1636733> > > it will consider mark<ENFORCED>note as the option name, as the regexp allows > any characters not in the whitespace class (\S). By using a class like [^\s<], > that is, not whitespace and not '<', it will be correctly parsed. > > We could fix the entries that have this problem, but fixing the parser is more > robust. > > Ignore: yes > > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > --- > debian/scripts/config-check | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debian/scripts/config-check b/debian/scripts/config-check > index 843f5999006b..95edd39dc407 100755 > --- a/debian/scripts/config-check > +++ b/debian/scripts/config-check > @@ -113,7 +113,7 @@ for $config (keys %annot) { > $options = $annot{$config}; > > $policy = undef; > - while ($options =~ /\s*(\S+)<(.*?)?>/g) { > + while ($options =~ /\s*([^\s<]+)<(.*?)?>/g) { > ($option, $value) = ($1, $2); > > if ($option eq 'mark' && $value eq 'ENFORCED') { >
On 2019-12-19 19:29, Thadeu Lima de Souza Cascardo wrote: > Whenever config-check finds an entry like: > > CONFIG_VFIO mark<ENFORCED>note<LP#1636733> > > it will consider mark<ENFORCED>note as the option name, as the regexp allows > any characters not in the whitespace class (\S). By using a class like [^\s<], > that is, not whitespace and not '<', it will be correctly parsed. > > We could fix the entries that have this problem, but fixing the parser is more > robust. > > Ignore: yes > > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> > --- > debian/scripts/config-check | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debian/scripts/config-check b/debian/scripts/config-check > index 843f5999006b..95edd39dc407 100755 > --- a/debian/scripts/config-check > +++ b/debian/scripts/config-check > @@ -113,7 +113,7 @@ for $config (keys %annot) { > $options = $annot{$config}; > > $policy = undef; > - while ($options =~ /\s*(\S+)<(.*?)?>/g) { > + while ($options =~ /\s*([^\s<]+)<(.*?)?>/g) { > ($option, $value) = ($1, $2); > > if ($option eq 'mark' && $value eq 'ENFORCED') { > Applied to xenial/linux, bionic/linux, disco/linux and eoan/linux. Thanks, Kleber
On Thu, Dec 19, 2019 at 03:29:51PM -0300, Thadeu Lima de Souza Cascardo wrote: > Whenever config-check finds an entry like: > > CONFIG_VFIO mark<ENFORCED>note<LP#1636733> > > it will consider mark<ENFORCED>note as the option name, as the regexp allows > any characters not in the whitespace class (\S). By using a class like [^\s<], > that is, not whitespace and not '<', it will be correctly parsed. > > We could fix the entries that have this problem, but fixing the parser is more > robust. > > Ignore: yes > > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Applied to focal/master-next and unstable/master, thanks!
diff --git a/debian/scripts/config-check b/debian/scripts/config-check index 843f5999006b..95edd39dc407 100755 --- a/debian/scripts/config-check +++ b/debian/scripts/config-check @@ -113,7 +113,7 @@ for $config (keys %annot) { $options = $annot{$config}; $policy = undef; - while ($options =~ /\s*(\S+)<(.*?)?>/g) { + while ($options =~ /\s*([^\s<]+)<(.*?)?>/g) { ($option, $value) = ($1, $2); if ($option eq 'mark' && $value eq 'ENFORCED') {
Whenever config-check finds an entry like: CONFIG_VFIO mark<ENFORCED>note<LP#1636733> it will consider mark<ENFORCED>note as the option name, as the regexp allows any characters not in the whitespace class (\S). By using a class like [^\s<], that is, not whitespace and not '<', it will be correctly parsed. We could fix the entries that have this problem, but fixing the parser is more robust. Ignore: yes Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> --- debian/scripts/config-check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)