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)
This commit is contained in:
parent
934f667b6c
commit
d0b52b1f19
3 changed files with 118 additions and 3 deletions
75
comps-sync-blacklist.yml
Normal file
75
comps-sync-blacklist.yml
Normal file
|
@ -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
|
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
# Usage: ./comps-sync.py /path/to/comps-f28.xml.in
|
# 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
|
import libcomps
|
||||||
|
|
||||||
def fatal(msg):
|
def fatal(msg):
|
||||||
|
@ -20,6 +22,11 @@ base_pkgs_path = 'fedora-workstation-base-pkgs.json'
|
||||||
with open(base_pkgs_path) as f:
|
with open(base_pkgs_path) as f:
|
||||||
manifest = json.load(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'])
|
manifest_packages = set(manifest['packages'])
|
||||||
|
|
||||||
comps_unknown = set()
|
comps_unknown = set()
|
||||||
|
@ -44,11 +51,16 @@ ws_environ = comps.environments['workstation-product-environment']
|
||||||
ws_pkgs = {}
|
ws_pkgs = {}
|
||||||
for gid in ws_environ.group_ids:
|
for gid in ws_environ.group_ids:
|
||||||
group = comps.groups_match(id=gid.name)[0]
|
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:
|
for pkg in group.packages:
|
||||||
pkgname = pkg.name
|
pkgname = pkg.name
|
||||||
if pkg.type not in (libcomps.PACKAGE_TYPE_DEFAULT,
|
if pkg.type not in (libcomps.PACKAGE_TYPE_DEFAULT,
|
||||||
libcomps.PACKAGE_TYPE_MANDATORY):
|
libcomps.PACKAGE_TYPE_MANDATORY):
|
||||||
continue
|
continue
|
||||||
|
if pkgname in blacklist:
|
||||||
|
continue
|
||||||
pkgdata = ws_pkgs.get(pkgname)
|
pkgdata = ws_pkgs.get(pkgname)
|
||||||
if pkgdata is None:
|
if pkgdata is None:
|
||||||
ws_pkgs[pkgname] = pkgdata = (pkg.type, set([gid.name]))
|
ws_pkgs[pkgname] = pkgdata = (pkg.type, set([gid.name]))
|
||||||
|
@ -72,6 +84,7 @@ ws_added = {}
|
||||||
for (pkg,data) in ws_pkgs.items():
|
for (pkg,data) in ws_pkgs.items():
|
||||||
if pkg not in manifest_packages:
|
if pkg not in manifest_packages:
|
||||||
ws_added[pkg] = data
|
ws_added[pkg] = data
|
||||||
|
manifest_packages.add(pkg)
|
||||||
|
|
||||||
def format_pkgtype(n):
|
def format_pkgtype(n):
|
||||||
if n == libcomps.PACKAGE_TYPE_DEFAULT:
|
if n == libcomps.PACKAGE_TYPE_DEFAULT:
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
"NetworkManager-wwan",
|
"NetworkManager-wwan",
|
||||||
"PackageKit-gstreamer-plugin",
|
"PackageKit-gstreamer-plugin",
|
||||||
"aajohan-comfortaa-fonts",
|
"aajohan-comfortaa-fonts",
|
||||||
|
"abattis-cantarell-fonts",
|
||||||
"adobe-source-han-sans-cn-fonts",
|
"adobe-source-han-sans-cn-fonts",
|
||||||
"adobe-source-han-sans-tw-fonts",
|
"adobe-source-han-sans-tw-fonts",
|
||||||
"adwaita-qt4",
|
"adwaita-qt4",
|
||||||
|
@ -46,6 +47,7 @@
|
||||||
"cheese",
|
"cheese",
|
||||||
"chrony",
|
"chrony",
|
||||||
"cifs-utils",
|
"cifs-utils",
|
||||||
|
"colord",
|
||||||
"control-center",
|
"control-center",
|
||||||
"coreutils",
|
"coreutils",
|
||||||
"cryptsetup",
|
"cryptsetup",
|
||||||
|
@ -56,10 +58,13 @@
|
||||||
"dejavu-sans-mono-fonts",
|
"dejavu-sans-mono-fonts",
|
||||||
"dejavu-serif-fonts",
|
"dejavu-serif-fonts",
|
||||||
"device-mapper-multipath",
|
"device-mapper-multipath",
|
||||||
|
"dhcp-client",
|
||||||
"dmraid",
|
"dmraid",
|
||||||
|
"dnsmasq",
|
||||||
"dos2unix",
|
"dos2unix",
|
||||||
"dracut-config-generic",
|
"dracut-config-generic",
|
||||||
"dracut-network",
|
"dracut-network",
|
||||||
|
"e2fsprogs",
|
||||||
"ebtables",
|
"ebtables",
|
||||||
"efibootmgr",
|
"efibootmgr",
|
||||||
"eog",
|
"eog",
|
||||||
|
@ -70,6 +75,7 @@
|
||||||
"fedora-release-workstation",
|
"fedora-release-workstation",
|
||||||
"fedora-user-agent-chrome",
|
"fedora-user-agent-chrome",
|
||||||
"file-roller",
|
"file-roller",
|
||||||
|
"filesystem",
|
||||||
"firefox",
|
"firefox",
|
||||||
"firewalld",
|
"firewalld",
|
||||||
"foomatic",
|
"foomatic",
|
||||||
|
@ -82,6 +88,7 @@
|
||||||
"glib-networking",
|
"glib-networking",
|
||||||
"glibc",
|
"glibc",
|
||||||
"glibc-all-langpacks",
|
"glibc-all-langpacks",
|
||||||
|
"glx-utils",
|
||||||
"gnome-backgrounds",
|
"gnome-backgrounds",
|
||||||
"gnome-bluetooth",
|
"gnome-bluetooth",
|
||||||
"gnome-boxes",
|
"gnome-boxes",
|
||||||
|
@ -114,13 +121,26 @@
|
||||||
"gnu-free-sans-fonts",
|
"gnu-free-sans-fonts",
|
||||||
"gnu-free-serif-fonts",
|
"gnu-free-serif-fonts",
|
||||||
"gnupg2",
|
"gnupg2",
|
||||||
|
"google-noto-emoji-color-fonts",
|
||||||
"google-noto-emoji-fonts",
|
"google-noto-emoji-fonts",
|
||||||
|
"google-noto-sans-jp-fonts",
|
||||||
|
"google-noto-sans-kr-fonts",
|
||||||
"google-noto-sans-lisu-fonts",
|
"google-noto-sans-lisu-fonts",
|
||||||
"google-noto-sans-mandaic-fonts",
|
"google-noto-sans-mandaic-fonts",
|
||||||
"google-noto-sans-meetei-mayek-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-tagalog-fonts",
|
||||||
"google-noto-sans-tai-tham-fonts",
|
"google-noto-sans-tai-tham-fonts",
|
||||||
"google-noto-sans-tai-viet-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",
|
||||||
"gutenprint-cups",
|
"gutenprint-cups",
|
||||||
"gvfs-afc",
|
"gvfs-afc",
|
||||||
|
@ -149,6 +169,7 @@
|
||||||
"ibus-typing-booster",
|
"ibus-typing-booster",
|
||||||
"initscripts",
|
"initscripts",
|
||||||
"iproute",
|
"iproute",
|
||||||
|
"iptables",
|
||||||
"iptstate",
|
"iptstate",
|
||||||
"iputils",
|
"iputils",
|
||||||
"ipw2100-firmware",
|
"ipw2100-firmware",
|
||||||
|
@ -170,6 +191,7 @@
|
||||||
"iwl6050-firmware",
|
"iwl6050-firmware",
|
||||||
"iwl7260-firmware",
|
"iwl7260-firmware",
|
||||||
"jomolhari-fonts",
|
"jomolhari-fonts",
|
||||||
|
"julietaula-montserrat-fonts",
|
||||||
"jwhois",
|
"jwhois",
|
||||||
"kbd",
|
"kbd",
|
||||||
"kernel",
|
"kernel",
|
||||||
|
@ -178,10 +200,14 @@
|
||||||
"less",
|
"less",
|
||||||
"libcanberra-gtk2",
|
"libcanberra-gtk2",
|
||||||
"libcanberra-gtk3",
|
"libcanberra-gtk3",
|
||||||
|
"liberation-mono-fonts",
|
||||||
|
"liberation-sans-fonts",
|
||||||
|
"liberation-serif-fonts",
|
||||||
"libertas-usb8388-firmware",
|
"libertas-usb8388-firmware",
|
||||||
"libproxy-mozjs",
|
"libproxy-mozjs",
|
||||||
"libvirt-client",
|
"libvirt-client",
|
||||||
"libvirt-daemon-kvm",
|
"libvirt-daemon-kvm",
|
||||||
|
"lklug-fonts",
|
||||||
"logrotate",
|
"logrotate",
|
||||||
"lohit-assamese-fonts",
|
"lohit-assamese-fonts",
|
||||||
"lohit-bengali-fonts",
|
"lohit-bengali-fonts",
|
||||||
|
@ -239,6 +265,7 @@
|
||||||
"rng-tools",
|
"rng-tools",
|
||||||
"rootfiles",
|
"rootfiles",
|
||||||
"rp-pppoe",
|
"rp-pppoe",
|
||||||
|
"rpm",
|
||||||
"rsync",
|
"rsync",
|
||||||
"rygel",
|
"rygel",
|
||||||
"samba-client",
|
"samba-client",
|
||||||
|
|
Loading…
Reference in a new issue