From e16b11fe29c1397220a79427e1de84265d9810b4 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 2 Feb 2024 19:37:52 -0800 Subject: [PATCH] misc tweaks --- Jenkinsfile | 2 +- repobot/aptprovider.py | 10 +++++++++- requirements.txt | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c91f66b..fdf6feb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,7 @@ spec: script { try { docker.withRegistry('http://dockermirror:5000') { - docker.image("ubuntu:bionic").pull() + docker.image("ubuntu:jammy").pull() docker.image(image_name).pull() // Pull a recent version to share base layers with (?) } } catch (exc) { diff --git a/repobot/aptprovider.py b/repobot/aptprovider.py index 306b8be..1901513 100644 --- a/repobot/aptprovider.py +++ b/repobot/aptprovider.py @@ -142,6 +142,13 @@ def hashmany(data): return {k: v.hexdigest() for k, v in hashes.items()} +def format_deb_file_name(package_name, package_version, package_architecture): + """ + Format a deb package name. Note + """ + return "{}_{}_{}.deb".format(package_name, package_version, package_architecture) + + class AptProvider(object): def __init__(self, dbcon, s3client, bucket): self.db = dbcon @@ -286,7 +293,8 @@ Description: Generated by Repobot fsize = os.path.getsize(tmppkgpath) p = Dpkg(tmppkgpath) - pkgname = "{}_{}_{}.deb".format(p.message['Package'], p.message['Version'], p.message['Architecture']) + + pkgname = format_deb_file_name(p.message['Package'], p.message['Version'], p.message['Architecture']) #TODO keys can be duplicated in email.message.Message, does this cause any problems? fields = {key: p.message[key] for key in p.message.keys()} diff --git a/requirements.txt b/requirements.txt index f2ef49c..a2c6a0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,13 @@ arpy==1.1.1 autocommand==2.2.2 boto3==1.26.145 botocore==1.29.145 +certifi==2023.7.22 cffi==1.15.1 +charset-normalizer==3.2.0 cheroot==10.0.0 CherryPy==18.8.0 cryptography==41.0.1 +idna==3.4 inflect==6.0.4 jaraco.collections==4.2.0 jaraco.context==4.3.0 @@ -26,6 +29,7 @@ python-dateutil==2.8.2 python-gnupg==0.5.0 pytz==2023.3 pyzstd==0.15.7 +requests==2.31.0 s3transfer==0.6.1 six==1.16.0 SQLAlchemy==1.3.3