1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-22 08:15:18 +00:00

Move image builder to OpenWrt 18.06.1

This commit is contained in:
Lauri Võsandi 2018-09-24 23:09:11 +03:00
parent 3c31622b60
commit 0bd55d7d61
3 changed files with 13 additions and 10 deletions

View File

@ -55,8 +55,9 @@ class ImageBuilderResource(object):
raise falcon.HTTPInternalServerError("Build script finished with non-zero exitcode")
for dname in os.listdir(build):
if dname.startswith("lede-imagebuilder-"):
for root, dirs, files in os.walk(os.path.join(build, dname, "bin", "targets")):
if dname.startswith("openwrt-imagebuilder-") and ".tar." not in dname:
subdir = os.path.join(build, dname, "bin", "targets")
for root, dirs, files in os.walk(subdir):
for filename in files:
if filename.endswith(suffix):
path = os.path.join(root, filename)
@ -64,5 +65,6 @@ class ImageBuilderResource(object):
resp.body = open(path, "rb").read()
resp.set_header("Content-Disposition", ("attachment; filename=%s" % suggested_filename))
return
raise falcon.HTTPNotFound()
raise falcon.HTTPNotFound(description="Couldn't find file ending with '%s' in directory %s" % (suffix, subdir))
raise falcon.HTTPNotFound(description="Failed to find image builder directory in %s" % build)

View File

@ -4,17 +4,18 @@ set -e
set -x
umask 022
VERSION=17.01.4
BASENAME=lede-imagebuilder-$VERSION-ar71xx-generic.Linux-x86_64
VERSION=18.06.1
BASENAME=openwrt-imagebuilder-$VERSION-ar71xx-generic.Linux-x86_64
FILENAME=$BASENAME.tar.xz
URL=http://downloads.lede-project.org/releases/$VERSION/targets/ar71xx/generic/$FILENAME
URL=http://downloads.openwrt.org/releases/$VERSION/targets/ar71xx/generic/$FILENAME
# curl of vanilla LEDE doesn't support ECDSA at the moment
BASENAME=lede-imagebuilder-ar71xx-generic.Linux-x86_64
# curl of vanilla OpenWrt a the moment
# - doesn't support ECDSA
# - is compiled against embedded TLS library which doesn't support OCSP
BASENAME=openwrt-imagebuilder-ar71xx-generic.Linux-x86_64
FILENAME=$BASENAME.tar.xz
URL=https://www.koodur.com/$FILENAME
if [ ! -e $BUILD/$FILENAME ]; then
wget -q $URL -O $BUILD/$FILENAME
fi

View File

@ -61,7 +61,7 @@ enabled = no
title = Comfast E380AC (Access Point), TFTP-friendly
command = {{ builder_path }}/ap.sh
model = cf-e380ac-v2
filename = cf-e380ac-v2-squashfs-factory.bin
filename = cf-e380ac-v2-squashfs-sysupgrade.bin
rename = firmware_auto.bin