summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-18 15:59:14 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2014-01-19 19:12:03 +0100
commiteb41fadc819d5db4f2b6e47b6d292f7e8cb8c2d6 (patch)
treed2d57f54dc79ac2038ab9092bc55fcc44a7a2957
parent436f240152e0df7630552363d8bf6ed59835fc07 (diff)
gentree: create *.tar.gz instead of *.tar.bz for kernel.orgv3.12.8-1linux-3.12.y
Upstream commit: e7ff81f2d7ff55bef128c0eacdc43f16080ec8a0 kernel.org does not support bzip2 any more, use gzip instead. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rwxr-xr-xgentree.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/gentree.py b/gentree.py
index 744f48da..34ed0acc 100755
--- a/gentree.py
+++ b/gentree.py
@@ -4,7 +4,7 @@
#
import argparse, sys, os, errno, shutil, re, subprocess
-import tarfile, bz2
+import tarfile, gzip
# find self
source_dir = os.path.abspath(os.path.dirname(__file__))
@@ -356,9 +356,9 @@ def get_rel_prep(rel):
paths_to_create = paths)
return rel_prep
-def create_tar_and_bz2(tar_name, dir_to_tar):
+def create_tar_and_gz(tar_name, dir_to_tar):
"""
- We need both a tar file and bzip2 for kernel.org, the tar file
+ We need both a tar file and gzip for kernel.org, the tar file
gets signed, then we upload the compressed version, kup-server
in the backend decompresses and verifies the tarball against
our signature.
@@ -370,9 +370,9 @@ def create_tar_and_bz2(tar_name, dir_to_tar):
tar_file = open(tar_name, "r")
- bz2_file = bz2.BZ2File(tar_name + ".bz2", 'wb', compresslevel=9)
- bz2_file.write(tar_file.read())
- bz2_file.close()
+ gz_file = gzip.GzipFile(tar_name + ".gz", 'wb')
+ gz_file.write(tar_file.read())
+ gz_file.close()
def upload_release(args, rel_prep, logwrite=lambda x:None):
"""
@@ -405,9 +405,9 @@ def upload_release(args, rel_prep, logwrite=lambda x:None):
parent = os.path.dirname(args.outdir)
release = os.path.basename(args.outdir)
tar_name = parent + '/' + release + ".tar"
- bzip2_name = tar_name + ".bz2"
+ gzip_name = tar_name + ".gz"
- create_tar_and_bz2(tar_name, args.outdir)
+ create_tar_and_gz(tar_name, args.outdir)
logwrite(gpg.sign(tar_name, extra_args=['--armor', '--detach-sign']))
@@ -427,13 +427,13 @@ def upload_release(args, rel_prep, logwrite=lambda x:None):
logwrite(kup.mkdir(korg_path))
korg_path += '/'
if (not args.kup_test):
- logwrite("upload file %s to %s" % (bzip2_name, korg_path))
- logwrite(kup.put(bzip2_name, tar_name + '.asc', korg_path))
+ logwrite("upload file %s to %s" % (gzip_name, korg_path))
+ logwrite(kup.put(gzip_name, tar_name + '.asc', korg_path))
logwrite("\nFinished upload!\n")
logwrite("Target path contents:")
logwrite(kup.ls(path=korg_path))
else:
- kup_cmd = "kup put /\n\t\t%s /\n\t\t%s /\n\t\t%s" % (bzip2_name, tar_name + '.asc', korg_path)
+ kup_cmd = "kup put /\n\t\t%s /\n\t\t%s /\n\t\t%s" % (gzip_name, tar_name + '.asc', korg_path)
logwrite("kup-test: skipping cmd: %s" % kup_cmd)
def _main():