Imagebuilder dependencies outdated?

I’ve tried running imagebuilder using the instructions here:

When I try to run it natively (Ubuntu 22.04), I can get to the point of compile “$ ./gl_image -i -p mt300n-v2”, and get this error

  File "/imagebuilder/./gl_image", line 106
    print "Oops! Failed to parse %s" % self.filename
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

I assume this is due to imagebuilder calling for python2, which of course has been deprecated for over 2 years.

I then tried using the dockerfile approach “$ sudo docker build --rm -t gl_imagebuilder - < Dockerfile”, and get these errors:

1.476 Err:6 http://deb.debian.org/debian stretch-updates Release
1.476   404  Not Found
1.494 Reading package lists...
1.525 E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
1.525 E: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
1.525 E: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.

I assume this because Debian slim has moved to archive. Does anyone know how to get imagebuilder running on a modern distro release?

Thank you.

I’m able to get the docker container to build by updating the Dockerfile to “FROM debian:buster-slim”.

Unfortunately trying to actually run the container with “$ sudo docker run -v “$(pwd)”:/src gl_imagebuilder -p mt300n-v2”, fails with:

fatal: detected dubious ownership in repository at '/src/glinet'
To add an exception for this directory, call:

        git config --global --add safe.directory /src/glinet
Traceback (most recent call last):
  File "gl_image", line 606, in <module>
Update glinet repository ......
    sys.exit(main(sys.argv))
  File "gl_image", line 354, in main
    check_call("git pull", shell=True, cwd=dir_name)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull' returned non-zero exit status 128

Tried running both “$ git config --global --add safe.directory /src/glinet” and even “$ git config --global --add safe.directory *”. Neither fix the error : /

I was able to get imagebuilder to run natively using "$ python2.7 gl_image -i -p mt300n-v2”.. yay!

good job :+1: :+1: :+1: :+1: :+1:

1 Like