From 37693fca31b9e5af6168bc2ee5003a0216e678f8 Mon Sep 17 00:00:00 2001 From: David McMackins II Date: Thu, 23 Jul 2015 13:43:16 -0500 Subject: Now removing signature and checksum files so that fat jars don't fail authenticity check --- jarsnap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jarsnap.py b/jarsnap.py index 7741b4f..e1cebd1 100644 --- a/jarsnap.py +++ b/jarsnap.py @@ -18,14 +18,14 @@ from datetime import datetime from getopt import gnu_getopt, GetoptError -from os import mkdir, remove, rename +from os import listdir, mkdir, remove, rename from os.path import join, exists from shutil import rmtree, make_archive, unpack_archive from sys import argv from tempfile import gettempdir __title__ = 'jarsnap.py' -__version__ = '1.0.4' +__version__ = '1.0.5' __author__ = 'David McMackins II' def make_fat_jar(jars, main_class, output_path='fat.jar'): @@ -40,6 +40,10 @@ def make_fat_jar(jars, main_class, output_path='fat.jar'): for jar in jars: unpack_archive(jar, workdir, 'zip') + for f in listdir(meta_inf): + if f.endswith('.SF') or f.endswith('.DSA') or f.endswith('.RSA'): + remove(join(meta_inf, f)) + with open(join(meta_inf, 'MANIFEST.MF'), 'w') as mf: mf.write('Manifest-Version: 1.0\r\n' + 'Created-By: {} {}\r\n'.format(__title__, __version__) -- cgit v1.2.3