[elbe-devel] [PATCH] validation: use parent directories
John Ogness
john.ogness at linutronix.de
Tue Nov 21 09:10:41 CET 2017
On 2017-11-21, Manuel Traut <manuel.traut at linutronix.de> wrote:
>> To validate repositories, elbe was checking for legacy
>> per-component-and-architecture Release files. According to
>> the Debian Repository Format documentation:
>>
>> "Clients must not use them."
>>
>> And indeed, these legacy files are not found on the security
>> servers.
>>
>> Instead of the legacy Release files, just check if the parent
>> directory is there.
>
> applied to devel/elbe-3.0 and backported to devel/elbe-2.0
>
>> NOTE: httpredir.debian.org does not support this. Do not use
>> this redirect service with elbe. Validating against a
>> redirect service is ridiculous anyway.
>
> In the past we had examples in the repo using httpredir.
>
> I'd like to have a check that 'httpredir' is not in an URL and print
> sth. like this note as an error message.
>
> What do you think?
I do not like the idea of elbe trying to intelligently identify
incorrect data within an XML file. But would not oppose it if the note
was a warning instead of an error. elbe can make an educated guess about
the incorrect data and print a warning and then let the validator print
the validation error.
>> Signed-off-by: John Ogness <john.ogness at linutronix.de>
>> ---
>> elbepack/elbexml.py | 14 +++-----------
>> 1 file changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
>> index 39eed4c7..297324c0 100644
>> --- a/elbepack/elbexml.py
>> +++ b/elbepack/elbexml.py
>> @@ -179,18 +179,10 @@ class ElbeXML(object):
>>
>> urls.append(s + "Release")
>> if url_validation == ValidationMode.CHECK_ALL:
>> - if l.startswith ("deb-src "):
>> - urls.append(s + section + "/source/Release")
>> - else:
>> - if "updates" in suite:
>> - urls.append(s + "/Release")
>> - else:
>> - urls.append(s + section + "/binary-%s/Release" % buildtype)
>> + urls.append(s + section + "/source/")
>> + urls.append(s + section + "/binary-%s/" % buildtype)
>> elif url_validation == ValidationMode.CHECK_BINARIES:
>> - if "updates" in suite:
>> - urls.append(s + section + "/Release")
>> - else:
>> - urls.append(s + section + "/binary-%s/Release" % buildtype)
>> + urls.append(s + section + "/binary-%s/" % buildtype)
>>
>> if not self.prj:
>> return
>> --
>> 2.14.0
More information about the elbe-devel
mailing list