From d0b52b1f195880997f7162d0d0a8c65aeda8b7ca Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Feb 24 2018 16:16:00 +0000 Subject: Extend comps-sync more, add font packages `comps-sync.py` now has support for explicitly syncing *from* the workstation comps. In order to do this sanely though, we need a "blacklist" of things we don't want to sync. There are a few issues here: - desktop applications - dubious CLI apps - dnf - dubious misc things: e.g. `tcp_wrappers`, `crontabs` - arch-specific bits (not handled right now) --- diff --git a/comps-sync-blacklist.yml b/comps-sync-blacklist.yml new file mode 100644 index 0000000..18746eb --- /dev/null +++ b/comps-sync-blacklist.yml @@ -0,0 +1,75 @@ +# This file has a list of packages to skip from comps that we don't want. + +# Entirely skip all packages in libreoffice +blacklist_groups: + - libreoffice + +blacklist: + core: + # We use rpm-ostree for the host + - dnf + - dnf-yum + - dnf-plugins-core + # Not sure why this is there at all + - dracut-config-rescue + # Eh...you can install this in a priv container + - parted + # https://bugzilla.redhat.com/show_bug.cgi?id=1452348 + - grubby + # Why? + - ncurses + # Needs to be arch specific + - ppc64-utils + base-x: + # These are for arm...need to handle arch-specific bits + - xorg-x11-drv-armsoc + - xorg-x11-drv-omap + gnome-desktop: + # We use rpm-ostree for the host + - PackageKit-command-not-found + - PackageKit-gtk3-module + # Apps + - evince + - evince-djvu + - evince-nautilus + - file-roller-nautilus + - gnome-calendar + - gnome-documents + - gnome-photos + workstation-product: + # We use rpm-ostree for the host + - dnf + - dnf-plugins-core + - deltarpm + # Really not worth listing explicitly + - filesystem + # Why? + - ncurses + - mailcap + # Really? + - tcp_wrappers + # This probably doesn't need to be default + - ppp + # We removed cronie a while ago, should nuke these too + - crontabs + - at + # Requires libreoffice + - unoconv + # Will change to git-core + - git + # Apps + - rhythmbox + # Random tools: container + - net-tools + - nmap-ncat + # filesystem tools, agian priv container + - dosfstools + - ntfs-3g + networkmanager-submodules: + # Let's use the builtin one by default + - dhcp-client + printing: + # We don't use PackageKit + - cups-pk-helper + # For now... + - ghostscript diff --git a/comps-sync.py b/comps-sync.py index 7c5e889..0b9fd9e 100755 --- a/comps-sync.py +++ b/comps-sync.py @@ -1,9 +1,11 @@ #!/usr/bin/python3 # Usage: ./comps-sync.py /path/to/comps-f28.xml.in -# Currently just *removes* packages from the manifest -# which are not mentioned in comps. +# +# Can both remove packages from the manifest +# which are not mentioned in comps, and add packages from +# comps. -import os, sys, subprocess, argparse, shlex, json +import os, sys, subprocess, argparse, shlex, json, yaml import libcomps def fatal(msg): @@ -20,6 +22,11 @@ base_pkgs_path = 'fedora-workstation-base-pkgs.json' with open(base_pkgs_path) as f: manifest = json.load(f) +with open('comps-sync-blacklist.yml') as f: + doc = yaml.load(f) + comps_blacklist = doc['blacklist'] + comps_blacklist_groups = doc['blacklist_groups'] + manifest_packages = set(manifest['packages']) comps_unknown = set() @@ -44,11 +51,16 @@ ws_environ = comps.environments['workstation-product-environment'] ws_pkgs = {} for gid in ws_environ.group_ids: group = comps.groups_match(id=gid.name)[0] + if gid.name in comps_blacklist_groups: + continue + blacklist = comps_blacklist.get(gid.name, set()) for pkg in group.packages: pkgname = pkg.name if pkg.type not in (libcomps.PACKAGE_TYPE_DEFAULT, libcomps.PACKAGE_TYPE_MANDATORY): continue + if pkgname in blacklist: + continue pkgdata = ws_pkgs.get(pkgname) if pkgdata is None: ws_pkgs[pkgname] = pkgdata = (pkg.type, set([gid.name])) @@ -72,6 +84,7 @@ ws_added = {} for (pkg,data) in ws_pkgs.items(): if pkg not in manifest_packages: ws_added[pkg] = data + manifest_packages.add(pkg) def format_pkgtype(n): if n == libcomps.PACKAGE_TYPE_DEFAULT: diff --git a/fedora-workstation-base-pkgs.json b/fedora-workstation-base-pkgs.json index 34daa49..05877ba 100644 --- a/fedora-workstation-base-pkgs.json +++ b/fedora-workstation-base-pkgs.json @@ -15,6 +15,7 @@ "NetworkManager-wwan", "PackageKit-gstreamer-plugin", "aajohan-comfortaa-fonts", + "abattis-cantarell-fonts", "adobe-source-han-sans-cn-fonts", "adobe-source-han-sans-tw-fonts", "adwaita-qt4", @@ -46,6 +47,7 @@ "cheese", "chrony", "cifs-utils", + "colord", "control-center", "coreutils", "cryptsetup", @@ -56,10 +58,13 @@ "dejavu-sans-mono-fonts", "dejavu-serif-fonts", "device-mapper-multipath", + "dhcp-client", "dmraid", + "dnsmasq", "dos2unix", "dracut-config-generic", "dracut-network", + "e2fsprogs", "ebtables", "efibootmgr", "eog", @@ -70,6 +75,7 @@ "fedora-release-workstation", "fedora-user-agent-chrome", "file-roller", + "filesystem", "firefox", "firewalld", "foomatic", @@ -82,6 +88,7 @@ "glib-networking", "glibc", "glibc-all-langpacks", + "glx-utils", "gnome-backgrounds", "gnome-bluetooth", "gnome-boxes", @@ -114,13 +121,26 @@ "gnu-free-sans-fonts", "gnu-free-serif-fonts", "gnupg2", + "google-noto-emoji-color-fonts", "google-noto-emoji-fonts", + "google-noto-sans-jp-fonts", + "google-noto-sans-kr-fonts", "google-noto-sans-lisu-fonts", "google-noto-sans-mandaic-fonts", "google-noto-sans-meetei-mayek-fonts", + "google-noto-sans-mono-cjk-jp-fonts", + "google-noto-sans-mono-cjk-kr-fonts", + "google-noto-sans-mono-cjk-sc-fonts", + "google-noto-sans-mono-cjk-tc-fonts", + "google-noto-sans-sc-fonts", "google-noto-sans-tagalog-fonts", "google-noto-sans-tai-tham-fonts", "google-noto-sans-tai-viet-fonts", + "google-noto-sans-tc-fonts", + "google-noto-serif-jp-fonts", + "google-noto-serif-kr-fonts", + "google-noto-serif-sc-fonts", + "google-noto-serif-tc-fonts", "gutenprint", "gutenprint-cups", "gvfs-afc", @@ -149,6 +169,7 @@ "ibus-typing-booster", "initscripts", "iproute", + "iptables", "iptstate", "iputils", "ipw2100-firmware", @@ -170,6 +191,7 @@ "iwl6050-firmware", "iwl7260-firmware", "jomolhari-fonts", + "julietaula-montserrat-fonts", "jwhois", "kbd", "kernel", @@ -178,10 +200,14 @@ "less", "libcanberra-gtk2", "libcanberra-gtk3", + "liberation-mono-fonts", + "liberation-sans-fonts", + "liberation-serif-fonts", "libertas-usb8388-firmware", "libproxy-mozjs", "libvirt-client", "libvirt-daemon-kvm", + "lklug-fonts", "logrotate", "lohit-assamese-fonts", "lohit-bengali-fonts", @@ -239,6 +265,7 @@ "rng-tools", "rootfiles", "rp-pppoe", + "rpm", "rsync", "rygel", "samba-client",