Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scag-build error - mmdebstrap failed to run, return code 2 #18

Open
Breinich opened this issue Dec 10, 2024 · 1 comment
Open

scag-build error - mmdebstrap failed to run, return code 2 #18

Breinich opened this issue Dec 10, 2024 · 1 comment

Comments

@Breinich
Copy link

Description of the problem

I tried to build a gradle based Java project (a fresh gradle init sample app) with scag on Ubuntu 22.04.

Steps to reproduce

  • Install latest gramine + scag (I installed scag with pipx, if that makes difference, in my opinion, shouldn't)
  • Create new Java gradle project with gradle init.
  • scag-setup --framework java_gradle --application app/build/libs/app.jar
  • scag-build

Expected results

No errors, some happy messages.

Actual results

~/gradle_java_test# scag-build
I: chroot architecture amd64 is equal to the host's architecture
I: automatically chosen format: tar
I: using /tmp/mmdebstrap.prQI5f15tU as tempdir
I: running --setup-hook in shell: sh -c 'sh /root/gradle_java_test/.scag/mmdebstrap-hooks/setup.sh "$@"' exec /tmp/mmdebstrap.prQI5f15tU
I: running apt-get update...
done
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Err:1 http://security.debian.org/debian-security bookworm-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
Get:2 http://deb.debian.org/debian bookworm InRelease [151 kB]
Err:2 http://deb.debian.org/debian bookworm InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY F8D2585B8783D481
Get:3 https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy InRelease [1236 B]
Err:3 https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E5C7F0FA1C6C6C3C
Get:4 https://packages.gramineproject.io bookworm InRelease [3279 B]
Err:4 https://packages.gramineproject.io bookworm InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5EE1171912234070
Reading package lists...
W: GPG error: http://security.debian.org/debian-security bookworm-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
E: The repository 'http://security.debian.org/debian-security bookworm-security InRelease' is not signed.
W: GPG error: http://deb.debian.org/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY F8D2585B8783D481
E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
W: GPG error: https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E5C7F0FA1C6C6C3C
E: The repository 'https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy InRelease' is not signed.
W: GPG error: https://packages.gramineproject.io bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5EE1171912234070
E: The repository 'https://packages.gramineproject.io bookworm InRelease' is not signed.
E: apt-get update --error-on=any -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false failed
W: listening on child socket failed:
I: removing tempdir /tmp/mmdebstrap.prQI5f15tU...
E: mmdebstrap failed to run
Traceback (most recent call last):
  File "/root/.local/bin/scag-build", line 8, in <module>
    sys.exit(build())
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/graminescaffolding/__main__.py", line 195, in build
    docker_id, docker_run_cmd = build_step(ctx, project_dir, conf)
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/graminescaffolding/__main__.py", line 227, in build_step
    docker_id = builder.build()
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/graminescaffolding/builder.py", line 233, in build
    self.create_chroot()
  File "/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/graminescaffolding/builder.py", line 274, in create_chroot
    subprocess.run([
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mmdebstrap', '--mode=unshare', '--keyring', PosixPath('/root/.local/pipx/venvs/graminescaffolding/lib/python3.10/site-packages/graminescaffolding/keys/trusted.gpg.d'), '--include', 'gramine=1.8', '--setup-hook', 'sh /root/gradle_java_test/.scag/mmdebstrap-hooks/setup.sh "$@"', '--customize-hook', 'sh /root/gradle_java_test/.scag/mmdebstrap-hooks/customize.sh "$@"', 'bookworm', PosixPath('/root/gradle_java_test/.scag/rootfs.tar'), PosixPath('/root/gradle_java_test/.scag/sources.list')]' returned non-zero exit status 2.
@woju
Copy link
Member

woju commented Dec 10, 2024

I've reproduced it, will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants