Skip to content

Commit 8a9b2c3

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 3b6331e commit 8a9b2c3

File tree

4 files changed

+457
-11
lines changed

4 files changed

+457
-11
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

+81-11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
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
# DNF v4 adds an implicit trailing newline to --qf format, but v5 does not
1726
dnf_version = subprocess.check_output(['dnf', '--version'], universal_newlines=True).strip().split('.')
1827
if int(dnf_version[0]) >= 5:
@@ -24,19 +33,47 @@ def setup_xcpng_yum_repos(*, yum_repo_d: str, sections: Iterable[str],
2433
bin_arch: str | None, version: str) -> None:
2534
with open(os.path.join(yum_repo_d, "xcpng.repo"), "w") as yumrepoconf:
2635
for section in sections:
36+
# HACK: use USER_TMPL if section ends with a number
37+
if section[-1].isdigit():
38+
tmpl = XCPNG_YUMREPO_USER_TMPL
39+
else:
40+
tmpl = XCPNG_YUMREPO_TMPL
41+
2742
# binaries
28-
block = XCPNG_YUMREPO_TMPL.format(rpmarch=bin_arch,
29-
section=section,
30-
version=version,
31-
suffix='',
32-
)
33-
yumrepoconf.write(block)
43+
if bin_arch:
44+
block = tmpl.format(rpmarch=bin_arch,
45+
section=section,
46+
version=version,
47+
suffix='',
48+
)
49+
yumrepoconf.write(block)
3450
# sources
35-
block = XCPNG_YUMREPO_TMPL.format(rpmarch='Source',
36-
section=section,
37-
version=version,
38-
suffix='-src',
39-
)
51+
block = tmpl.format(rpmarch='Source',
52+
section=section,
53+
version=version,
54+
suffix='-src',
55+
)
56+
yumrepoconf.write(block)
57+
58+
59+
XS8_YUMREPO_TMPL = """
60+
[xs8-{section}]
61+
name=XS8 - {section}
62+
baseurl=http://10.1.0.94/repos/XS8/{section}/xs8p-{section}/
63+
failovermethod=priority
64+
skip_if_unavailable=False
65+
66+
[xs8-{section}-src]
67+
name=XS8 - {section} source
68+
baseurl=http://10.1.0.94/repos/XS8/{section}/xs8p-{section}-source/
69+
failovermethod=priority
70+
skip_if_unavailable=False
71+
"""
72+
73+
def setup_xs8_yum_repos(*, yum_repo_d: str, sections: Iterable[str])-> None:
74+
with open(os.path.join(yum_repo_d, "xs8.repo"), "w") as yumrepoconf:
75+
for section in sections:
76+
block = XS8_YUMREPO_TMPL.format(section=section)
4077
yumrepoconf.write(block)
4178

4279
DNF_BASE_CMD = None
@@ -151,3 +188,36 @@ def is_pristine_upstream(rpmname:str) -> bool:
151188
if re.search(UPSTREAM_REGEX, rpmname):
152189
return True
153190
return False
191+
192+
def rpm_parse_nevr(nevr: str, suffix: str) -> tuple[str, str, str, str]:
193+
"Parse into (name, epoch:version, release) stripping suffix from release"
194+
m = re.match(RPM_NVR_SPLIT_REGEX, nevr)
195+
assert m, f"{nevr} does not match NEVR pattern"
196+
n, ev, r = m.groups()
197+
if ":" in ev:
198+
e, v = ev.split(":")
199+
else:
200+
e, v = "0", ev
201+
if r.endswith(suffix):
202+
r = r[:-len(suffix)]
203+
return (n, e, v, r)
204+
205+
def all_binrpms() -> set[str]:
206+
args = [
207+
'--disablerepo=*-src',
208+
'--qf=%{name}-%{evr}' + QFNL, # to avoid getting the arch
209+
'--latest-limit=1', # only most recent for each package
210+
'*',
211+
]
212+
ret = set(run_repoquery(args))
213+
return ret
214+
215+
def all_srpms() -> set[str]:
216+
args = [
217+
'--disablerepo=*', '--enablerepo=*-src',
218+
'--qf=%{name}-%{evr}' + QFNL, # to avoid getting the arch
219+
'--latest-limit=1', # only most recent for each package
220+
'*',
221+
]
222+
ret = set(run_repoquery(args))
223+
return ret

scripts/rpmwatcher/style.css

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
td.pkgname {
30+
white-space: nowrap;
31+
}
32+
33+
.nosource {
34+
color: red;
35+
background-color: black;
36+
}
37+
38+
.unexpected {
39+
color: red;
40+
}
41+
42+
.outdated {
43+
background-color: red;
44+
}
45+
46+
.uptodate {
47+
background-color: lightgreen;
48+
}
49+
50+
.better {
51+
background-color: #77cc00;
52+
}
53+
54+
.upstream {
55+
/* must not be background-color, can exist in outdated/uptodate/better */
56+
color: blue;
57+
}

0 commit comments

Comments
 (0)