Skip to content

Commit 9cb3e5b

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 0a18d3d commit 9cb3e5b

File tree

4 files changed

+417
-12
lines changed

4 files changed

+417
-12
lines changed

Diff for: 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

Diff for: scripts/rpmwatcher/repoquery.py

+82-12
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,59 @@
1212
skip_if_unavailable=False
1313
"""
1414

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

3370
DNF_BASE_CMD = None
@@ -47,7 +84,7 @@ def run_repoquery(args):
4784
cmd = DNF_BASE_CMD + ['repoquery'] + args
4885
logging.debug('$ %s', ' '.join(cmd))
4986
ret = subprocess.check_output(cmd, universal_newlines=True).strip().split()
50-
logging.debug('> %s', ret)
87+
logging.debug('> %s', '\n'.join(ret))
5188
return ret
5289

5390
SRPM_BINRPMS_CACHE = {} # binrpm-nevr -> srpm-nevr
@@ -141,3 +178,36 @@ def is_pristine_upstream(rpmname):
141178
if re.search(UPSTREAM_REGEX, rpmname):
142179
return True
143180
return False
181+
182+
def rpm_parse_nevr(nevr, suffix):
183+
"Parse into (name, epoch:version, release) stripping suffix from release"
184+
m = re.match(RPM_NVR_SPLIT_REGEX, nevr)
185+
assert m, f"{nevr} does not match NEVR pattern"
186+
n, ev, r = m.groups()
187+
if ":" in ev:
188+
e, v = ev.split(":")
189+
else:
190+
e, v = "0", ev
191+
if r.endswith(suffix):
192+
r = r[:-len(suffix)]
193+
return (n, e, v, r)
194+
195+
def all_binrpms():
196+
args = [
197+
'--disablerepo=*-src',
198+
'--qf=%{name}-%{evr}', # to avoid getting the arch
199+
'--latest-limit=1', # only most recent for each package
200+
'*',
201+
]
202+
ret = set(run_repoquery(args))
203+
return ret
204+
205+
def all_srpms():
206+
args = [
207+
'--disablerepo=*', '--enablerepo=*-src',
208+
'--qf=%{name}-%{evr}', # 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

Diff for: 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)