Skip to content

Instantly share code, notes, and snippets.

@lmacken
Last active December 29, 2015 09:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmacken/7652081 to your computer and use it in GitHub Desktop.
Save lmacken/7652081 to your computer and use it in GitHub Desktop.
Determine how many critical path packages failed to build from source using gcc -Werror=format-security
# Determine how many critical path packages failed to build from source using
# gcc -Werror=format-security. https://fedoraproject.org/wiki/Changes/FormatSecurity
import os
import subprocess
from collections import defaultdict
from fedora.client import PackageDB
pkgdb = PackageDB('https://admin.fedoraproject.org/pkgdb')
critpath = pkgdb.get_critpath_pkgs(['devel'])['devel']
print('%d critpath packages in devel' % len(critpath))
logs = 'http://people.fedoraproject.org/~halfie/rebuild-logs.txt'
if not os.path.exists('rebuild-logs.txt'):
subprocess.call('wget %s' % logs, shell=True)
critpath_ftbfs = defaultdict(list)
with file('rebuild-logs.txt') as log:
for line in log:
pkg = '-'.join(line.split(':')[0].split('-')[:-2])
if pkg in critpath:
critpath_ftbfs[pkg].append(line.strip())
print('%d FTBFS with -Werror=format-security' % len(critpath_ftbfs))
for pkg in sorted(critpath_ftbfs):
print('')
for line in critpath_ftbfs[pkg]:
print(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment