Merge branch 'master' of waschsauger.bl0rg.net:dirty-helpers
This commit is contained in:
commit
ea0822c20f
2 changed files with 10 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
"""Check Docker images for security/distro updates. Assumes DNF."""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
@ -16,9 +16,12 @@ for container in c.containers():
|
|||
print('Image: {} '.format(image_id))
|
||||
|
||||
# Not using the API here for simplicity (for now)
|
||||
subprocess.call(['docker', 'run', '-t', '--rm',
|
||||
output = subprocess.check_output([
|
||||
'docker', 'run', '-t', '--rm',
|
||||
image_id,
|
||||
'/bin/bash', '-c',
|
||||
|
||||
'dnf -q check-update;' +
|
||||
'if [ $? == 100 ]; then echo "Updates available"; fi'])
|
||||
'if [ $? == 100 ]; then echo "Updates available"; fi'
|
||||
])
|
||||
print(output.decode())
|
||||
|
|
2
gen-yum
2
gen-yum
|
@ -18,7 +18,7 @@ for base_dir in $BASE_DIRS; do
|
|||
chcon -t svirt_sandbox_file_t *.rpm
|
||||
|
||||
# Sign unsigned RPMs
|
||||
unsigned=`rpm --checksig *.rpm | egrep -v ': .*pgp' | sed 's#:.*##'` || true
|
||||
unsigned=`rpm --checksig *.rpm | egrep -v ': .*(pgp|signatures OK)' | sed 's#:.*##'` || true
|
||||
if [ ${#unsigned} != 0 ]; then
|
||||
echo "Unsigned packages:"
|
||||
echo "$unsigned"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue