Skip to content

Commit 9e3265c

Browse files
committed
WIP yum_repo_status: generate a table showing how much outdated 8.3 is from xs8
FIXME: - include successive xs8 update waves - migrate infos from Sam's wiki page to package_status.csv - show binrpms? - include "current" el7 versions - link proprietary packages replaced by ours - should take import_reason from provenance.csv as tooltip? - include upstream releases from GH?
1 parent bd74f6b commit 9e3265c

File tree

4 files changed

+422
-12
lines changed

4 files changed

+422
-12
lines changed

scripts/rpmwatcher/package_status.csv

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
SRPM_name;status;comment
2+
auto-cert-kit;ignored;unused, why?
3+
automake16;ignored;unused, why?
4+
bpftool;ignored;unused, why?
5+
capstone;ignored;unused, why?
6+
citrix-crypto-module;ignored;proprietary, patched FIPS openssl
7+
compiler-rt18;ignored;unused, why?
8+
dlm;ignored;previous dependency for corosync
9+
emu-manager;ignored;proprietary, replaced by xcp-emu-manager
10+
epel-release;ignored;unused, why?
11+
forkexecd;ignored;now in xapi
12+
fuse;;breq for e2fsprogs 1.47
13+
gfs2-utils;ignored;unsupported fs
14+
glib2;ignored;same version as el7, why?
15+
golang;ignored;for newer xe-guest-utilities
16+
hcp_nss;ignored;unused, “enforce any permitted user login as root”
17+
hwloc;ignored;unused, why?
18+
libbpf;ignored;unused, why?
19+
libcgroup;ignored;unused, same version as el7, why?
20+
libhbalinux;;unused? el7 fork, “Fix crash in fcoeadm/elxhbamgr on certain machines”
21+
libnbd;ignored;unused, dep for xapi-storage-plugins
22+
linuxconsoletools;ignored;unused, same version as el7, why?
23+
mbootpack;;for secureboot?
24+
message-switch;ignored;now in xapi
25+
mpdecimal;ignored;unused, why?
26+
ninja-build;ignored;unused
27+
pbis-open;ignored;unused, likely linked to upgrade-pbis-to-winbind
28+
pbis-open-upgrade;ignored;unused, likely linked to upgrade-pbis-to-winbind
29+
pvsproxy;ignored;proprietary
30+
python-monotonic;ignored;previous dependency for sm
31+
python-tqdm;ignored;unused, dependency for pvsproxy
32+
rrdd-plugins;ignored;now in xapi
33+
ruby;ignored;unused, why?
34+
sbd;;unused? "storage-based death functionality"
35+
sm-cli;ignored;now in xapi
36+
secureboot-certificates;ignored;proprietary, needs alternative?
37+
security-tools;ignored;proprietary, pool_secret tool
38+
sm-transport-lib;ignored;proprietary
39+
squeezed;ignored;now in xapi
40+
tix;ignored;unused, why?
41+
upgrade-pbis-to-winbind;ignored;proprietary
42+
v6d;ignored;proprietary, replaced by xcp-featured
43+
varstored-guard;ignored;now in xapi
44+
vendor-update-keys;ignored;proprietary
45+
vgpu;ignored;proprietary
46+
vhd-tool;ignored;now in xapi
47+
wsproxy;ignored;now in xapi
48+
xapi-clusterd;ignored;proprietary
49+
xapi-nbd;ignored;now in xapi
50+
xapi-storage;ignored;now in xapi
51+
xapi-storage-plugins;ignored;proprietarized, forked as xcp-ng-xapi-storage
52+
xapi-storage-script;ignored;now in xapi
53+
xcp-networkd;ignored;now in xapi
54+
xcp-rrdd;ignored;now in xapi
55+
xencert;;"automated testkit for certifying storage hardware with XenServer"
56+
xenopsd;ignored;now in xapi
57+
xenserver-release;forked;xcp-ng-release
58+
xenserver-snmp-agent;ignored;proprietary, SNMP MIB
59+
xenserver-telemetry;ignored;proprietary, xapi plugin
60+
xs-clipboardd;ignored;proprietary, replaced by xcp-clipboardd

scripts/rpmwatcher/repoquery.py

+82-12
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,60 @@
1313
skip_if_unavailable=False
1414
"""
1515

16+
XCPNG_YUMREPO_USER_TMPL = """
17+
[xcpng-{section}{suffix}]
18+
name=xcpng - {section}{suffix}
19+
baseurl=https://koji.xcp-ng.org/repos/user/8/{version}/{section}/{rpmarch}/
20+
gpgkey=https://xcp-ng.org/RPM-GPG-KEY-xcpng
21+
failovermethod=priority
22+
skip_if_unavailable=False
23+
"""
24+
1625
def setup_xcpng_yum_repos(*, yum_repo_d: str, sections: Iterable[str],
1726
bin_arch: str | None, version: str) -> None:
1827
with open(os.path.join(yum_repo_d, "xcpng.repo"), "w") as yumrepoconf:
1928
for section in sections:
29+
# HACK: use USER_TMPL if section ends with a number
30+
if section[-1].isdigit():
31+
tmpl = XCPNG_YUMREPO_USER_TMPL
32+
else:
33+
tmpl = XCPNG_YUMREPO_TMPL
34+
2035
# binaries
21-
block = XCPNG_YUMREPO_TMPL.format(rpmarch=bin_arch,
22-
section=section,
23-
version=version,
24-
suffix='',
25-
)
26-
yumrepoconf.write(block)
36+
if bin_arch:
37+
block = tmpl.format(rpmarch=bin_arch,
38+
section=section,
39+
version=version,
40+
suffix='',
41+
)
42+
yumrepoconf.write(block)
2743
# sources
28-
block = XCPNG_YUMREPO_TMPL.format(rpmarch='Source',
29-
section=section,
30-
version=version,
31-
suffix='-src',
32-
)
44+
block = tmpl.format(rpmarch='Source',
45+
section=section,
46+
version=version,
47+
suffix='-src',
48+
)
49+
yumrepoconf.write(block)
50+
51+
52+
XS8_YUMREPO_TMPL = """
53+
[xs8-{section}]
54+
name=XS8 - {section}
55+
baseurl=http://10.1.0.94/repos/XS8/{section}/xs8p-{section}/
56+
failovermethod=priority
57+
skip_if_unavailable=False
58+
59+
[xs8-{section}-src]
60+
name=XS8 - {section} source
61+
baseurl=http://10.1.0.94/repos/XS8/{section}/xs8p-{section}-source/
62+
failovermethod=priority
63+
skip_if_unavailable=False
64+
"""
65+
66+
def setup_xs8_yum_repos(*, yum_repo_d: str, sections: Iterable[str])-> None:
67+
with open(os.path.join(yum_repo_d, "xs8.repo"), "w") as yumrepoconf:
68+
for section in sections:
69+
block = XS8_YUMREPO_TMPL.format(section=section)
3370
yumrepoconf.write(block)
3471

3572
DNF_BASE_CMD = None
@@ -50,7 +87,7 @@ def run_repoquery(args: list[str]) -> Sequence[str]:
5087
cmd = DNF_BASE_CMD + ['repoquery'] + args
5188
logging.debug('$ %s', ' '.join(cmd))
5289
ret = subprocess.check_output(cmd, universal_newlines=True).strip().split()
53-
logging.debug('> %s', ret)
90+
logging.debug('> %s', '\n'.join(ret))
5491
return ret
5592

5693
SRPM_BINRPMS_CACHE: dict[str, set[str]] = {} # binrpm-nevr -> srpm-nevr
@@ -144,3 +181,36 @@ def is_pristine_upstream(rpmname:str) -> bool:
144181
if re.search(UPSTREAM_REGEX, rpmname):
145182
return True
146183
return False
184+
185+
def rpm_parse_nevr(nevr: str, suffix: str) -> tuple[str, str, str, str]:
186+
"Parse into (name, epoch:version, release) stripping suffix from release"
187+
m = re.match(RPM_NVR_SPLIT_REGEX, nevr)
188+
assert m, f"{nevr} does not match NEVR pattern"
189+
n, ev, r = m.groups()
190+
if ":" in ev:
191+
e, v = ev.split(":")
192+
else:
193+
e, v = "0", ev
194+
if r.endswith(suffix):
195+
r = r[:-len(suffix)]
196+
return (n, e, v, r)
197+
198+
def all_binrpms() -> set[str]:
199+
args = [
200+
'--disablerepo=*-src',
201+
'--qf=%{name}-%{evr}', # to avoid getting the arch
202+
'--latest-limit=1', # only most recent for each package
203+
'*',
204+
]
205+
ret = set(run_repoquery(args))
206+
return ret
207+
208+
def all_srpms() -> set[str]:
209+
args = [
210+
'--disablerepo=*', '--enablerepo=*-src',
211+
'--qf=%{name}-%{evr}', # to avoid getting the arch
212+
'--latest-limit=1', # only most recent for each package
213+
'*',
214+
]
215+
ret = set(run_repoquery(args))
216+
return ret

scripts/rpmwatcher/style.css

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
table {
2+
border-collapse: collapse;
3+
border-spacing: 0;
4+
}
5+
td {
6+
padding: 2px 5px;
7+
/* background-color: lightblue; */
8+
}
9+
10+
tr.header {
11+
vertical-align: top;
12+
}
13+
tr.ignored {
14+
color: #888888;
15+
background-color: #cccccc;
16+
}
17+
tr.notused { /* still to check */
18+
color: red;
19+
background-color: #cccccc;
20+
}
21+
22+
th.xs {
23+
background-color: #ddddff;
24+
}
25+
th.xcp {
26+
background-color: #ddffdd;
27+
}
28+
29+
.nosource {
30+
color: red;
31+
background-color: black;
32+
}
33+
34+
.unexpected {
35+
color: red;
36+
}
37+
38+
.outdated {
39+
background-color: red;
40+
}
41+
42+
.uptodate {
43+
background-color: lightgreen;
44+
}
45+
46+
.better {
47+
background-color: #77cc00;
48+
}
49+
50+
.upstream {
51+
/* must not be background-color, can exist in outdated/uptodate/better */
52+
color: blue;
53+
}

0 commit comments

Comments
 (0)