@@ -141,18 +141,27 @@ def joyent():
141141 return sources
142142
143143
144+ # NOTE: CVS mirror is unreliable from github actions, and netbsd didn't have
145+ # new features since 2016. Let's use mirror from github and show only MAIN.
146+ # def netbsd():
147+ # url = ('http://cvsweb.netbsd.org/bsdweb.cgi/src/external/'
148+ # 'cddl/osnet/dist/cmd/zpool/zpool-features.7?rev=1.1;'
149+ # 'content-type=text%2Fplain;only_with_tag={}')
150+ # sources = {'main': url.format('MAIN')}
151+ # with urlopen('https://netbsd.org/releases/') as web:
152+ # tags = findall(r'href="formal-.+?/NetBSD-(.+?)\.html',
153+ # web.read().decode('utf-8', 'ignore'))
154+ # tags = [(v, 'netbsd-' + v.replace('.', '-') + '-RELEASE') for v in tags]
155+ # for ver, tag in tags:
156+ # if int(ver.split('.')[0]) >= 9:
157+ # sources[ver] = url.format(tag)
158+ # return sources
159+
160+
144161def netbsd ():
145- url = ('http://cvsweb.netbsd.org/bsdweb.cgi/src/external/'
146- 'cddl/osnet/dist/cmd/zpool/zpool-features.7?rev=1.1;'
147- 'content-type=text%2Fplain;only_with_tag={}' )
148- sources = {'main' : url .format ('MAIN' )}
149- with urlopen ('https://netbsd.org/releases/' ) as web :
150- tags = findall (r'href="formal-.+?/NetBSD-(.+?)\.html' ,
151- web .read ().decode ('utf-8' , 'ignore' ))
152- tags = [(v , 'netbsd-' + v .replace ('.' , '-' ) + '-RELEASE' ) for v in tags ]
153- for ver , tag in tags :
154- if int (ver .split ('.' )[0 ]) >= 9 :
155- sources [ver ] = url .format (tag )
162+ sources = {'main' : 'https://raw.githubusercontent.com/NetBSD/src/refs/'
163+ 'heads/trunk/external/cddl/osnet/dist/cmd/zpool/'
164+ 'zpool-features.7' }
156165 return sources
157166
158167
0 commit comments