diff --git a/Makefile b/Makefile index 3cc5282..98400b9 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FILE_LISTS = \ all: report.html -report.html: $(PACKAGE_LISTS) generate-report.py report-template.html +report.html: $(PACKAGE_LISTS) package-notes.txt generate-report.py report-template.html ./generate-report.py $(FILE_LISTS): %.files: generate-files.sh list-files.py diff --git a/generate-report.py b/generate-report.py index 2bc8080..682087c 100755 --- a/generate-report.py +++ b/generate-report.py @@ -15,6 +15,9 @@ def start(msg): def done(): print("\033[90mdone\033[39m", file=sys.stderr) +def warn(msg): + print("{}: \033[31m{}\033[39m".format(os.path.basename(sys.argv[0]), msg), file=sys.stderr) + def fedmod_output(args): return subprocess.check_output(['pipenv', 'run', 'fedmod'] + args, encoding='utf-8', cwd='/home/otaylor/Source/fedmod') @@ -40,6 +43,8 @@ class Package(object): self.live = 0 self.rf26 = 0 self.source_package = None + self.flag = None + self._note = None @property def runtimes(self): @@ -47,11 +52,16 @@ class Package(object): @property def klass(self): - k = "" - if self.gnome_platform and not self.live: - k = "not-on-live" - - return k + if self.flag == 'F': + return "flagged" + elif self.flag == 'F?': + return "questionable" + elif self.flag == 'FD': + return "flagged-dep" + elif self.flag == 'W': + return "waived" + elif self.gnome_platform and not self.live: + return "questionable" @property def modules(self): @@ -61,6 +71,8 @@ class Package(object): def note(self): if self.gnome_platform and not self.live: return "platform package not on Live image" + elif self._note: + return self._note else: return "" @@ -295,6 +307,52 @@ for l in output.split('\n'): package_to_module[fields[0]] = fields[1][1:-1] done() +start("Loading package notes") +comment_re = re.compile(r'\s*#.*') +flag_re = re.compile(r'[A-Z?]+$') +package_re = re.compile(r'\S+') + +with open("package-notes.txt") as f: + for line in f: + line = comment_re.sub('', line) + line = line.strip() + if line == '': + continue + parts = line.split(":", 2) + name = parts[0].strip() + if not re.match(package_re, name): + warn("Can't parse package note: {}".format(line)) + continue + if len(parts) == 1: + flag = note = None + elif len(parts) == 2: + x = parts[1].strip() + if flag_re.match(x): + flag = x + note = None + else: + note = x + flag = None + elif len(parts) == 3: + x = parts[1].strip() + if flag_re.match(x): + flag = x + note = parts[2].strip() + else: + flag = None + note = parts[1] + ':' + parts[2] + + pkg = packages.get(name, None) + if pkg is None: + warn("Package note for missing package: {}".format(name)) + continue + + if flag is not None: + pkg.flag = flag + if note is not None: + pkg._note = note +done() + # # Get summary information for unmatched files # diff --git a/package-notes.txt b/package-notes.txt new file mode 100644 index 0000000..8ad049a --- /dev/null +++ b/package-notes.txt @@ -0,0 +1,146 @@ +# Each line is one of: +# BINARY-PACKAGE-NAME +# BINARY-PACKAGE-NAME: FREE FORM NOTES +# BINARY-PACKAGE-NAME: FLAG: FREE FORM NOTES +# Where flag is one of +# F: flag this package as a problem +# F?: flag this package as questionable +# FD: flag that this package is only being pulled in as a dependency of a problem package +# W: "waive" any problems with this package - it's not a problem +# +ModemManager-glib: FD: geoclue +adwaita-cursor-theme: W: part of runtime, but not bin/libs +adwaita-icon-theme: W: part of runtime, but not bin/libs +audit-libs: Fedora builds things this way +avahi-glib: FD: geoclue +avahi-libs: from geoclue, but also by cups-libs(built that way?) +ca-certificates +cdparanoia-libs: pulled in via gstreamer1-plugins-base +chkconfig: +colord-libs: +compat-openssl10: +coreutils-common: W: no bins/libs +crypto-policies: W: data files +cryptsetup-libs: FD: systemd +dbus: F?: Should we exclude binaries and break lib dependencies? +dbus-x11: F: dbus-launch should be excluded +dejavu-fonts-common: W: data files +desktop-file-utils: xdg-utils +device-mapper: FD: systemd +device-mapper-libs: FD: systemd +elfutils-default-yama-scope: provides default-yama-scope required by elfutils in Fedora +emacs-filesystem: required by desktop-file-utils, libidn +fedora-gpg-keys +fedora-release +fedora-repos +fedora-repos-rawhide +filesystem: W: data files +fontpackages-filesystem: W: data files +gc: FD: make +gdk-pixbuf2-modules: W: no bins/libs +geoclue2: F: required by geoclue-libs, but doesn't make sense non-system +glib-networking: W: no bins/libs +glibc-minimal-langpack +gnu-free-fonts-common: W: data files +gsettings-desktop-schemas: W: data files +gsm +guile: make +hicolor-icon-theme: W: data files +hunspell-en-US +hwdata +info: F: pulled in by gzip +iptables-libs: FD: systemd +iso-codes: W: data-files +jasper-libs +jbigkit-libs +json-c: FD: systemd +krb5-server: F: should exclude binaries +krb5-workstation: F: should exclude binaries +keyutils-libs: +kmod-libs: FD: systemd +libX11-common: W: data files +libXmu: FD: dbus-x11 +libXxf86misc: FD: dbus-x11 +libargon2: FD: systemd +libasyncns +libatomic_ops: FD: make +libcap-ng: W: libaudit dependency +libdb +libdvdnav +libdvdread +libedit +liberation-fonts-common: W: data files +libev: FD: krb5-server +libfdisk +libkadm5: F: should exclude libs +libgudev +libgusb +libicu +libidn2: W: fedora thing, lots of things use +libmcpp: FD: dbus-x11 +libmetalink +libmodman +libmpcdec +libnghttp2 +libnotify +libnsl2 +libpcap: FD: systemd +libpsl +libpwquality: FD: util-linux +libsecret +libselinux: W: fedora +libsemanage: FD: pulled in via shadow-utils +libsepol: W: fedora +libsigsegv +libsmartcols: FD: util-linux +libsrtp +libss: FD: krb5-workstation, krb5-server +libssh +libstemmer +libtirpc +libunistring: W: via libidn2 +libusb +libusbx +libutempter: FD: util-linux +libverto-libev: FD: krb5-server +libvisual +llvm5.0-libs: W: mesa +logrotate: FD: krb5-server +lz4-libs: W: libarchive +make: F: dependency of compat-openssl10 +mcpp: FD: dbus-x11 +mlocate: F: this makes no sense - nobody ever is going to run updatedb +ncurses-base +ncurses-libs +nss-pem: W: fedora dependency of nss +nss-sysinit +openldap +openssl-libs +opus +pam: FD: systemd, util-linux +publicsuffix-list-dafsa +python2-libs +python2-pip +python2-setuptools +python3-libs +python3-pip +python3-setuptools +qrencode-libs: FD: systemd +readline +rest +setup: FD: shadow-utils +shadow-utils: ???? +shared-mime-info: W: data flies +soundtouch +systemd: F: libdrm dependency on systemd pulls in a big stack +systemd-libs +systemd-pam +tzdata: W: data +util-linux: F?: Are getopt, kill, uuidgen worth all the deps +vulkan-filesystem: W: data +words: FD: krb5-server +xkeyboard-config: W: data +xml-common: W: common +xorg-x11-server-utils: FD: dbus-x11 +xorg-x11-xauth: FD: dbus-x11 +xorg-x11-xinit: FD: dbus-x11 diff --git a/report.css b/report.css index 67d9d59..65f3cea 100644 --- a/report.css +++ b/report.css @@ -99,11 +99,17 @@ td.absent { border: 1px solid #666666; padding: 0px; } -tr.not-on-live { +tr.flagged { color: #aa0000; } -tr.live-only { - color: #aaaaaa; +tr.questionable { + color: #cc4400; +} +tr.flagged-dep { + color: #ddaa44; +} +tr.waived { + color: #006600; } .hidden { display: none;