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

Missing unstable repo in sources.list #14

Open
woju opened this issue Apr 20, 2024 · 0 comments · May be fixed by #15
Open

Missing unstable repo in sources.list #14

woju opened this issue Apr 20, 2024 · 0 comments · May be fixed by #15

Comments

@woju
Copy link
Member

woju commented Apr 20, 2024

Description of the problem

When installing gramine-scaffolding from unstable-* components (for the purpose of testing RC packages), most likely gramine package itself is also ~rc<X> installed from the same unstable component. But sources.list bundled with scag refers to bookworm component, not to unstable-bookworm and it's likely that respective Gramine package is not available in stable repository component. This results in failure of mmdebstrap.

Steps to reproduce

On bookworm:

cat <<EOF >/etc/apt/sources.list.d/gramine.list
deb [arch=amd64 signed-by=/usr/share/keyrings/gramine-keyring.gpg] https://packages.gramineproject.io unstable-bookworm main contrib
deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx-deb.asc] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main
EOF
# and copy respective keyrings
apt-get update
apt-get install -y gramine-scaffolding
#scag-setup ...
scag-build

Expected results

scag-build finishes successfully

Actual results

$ scag-build
I: chroot architecture amd64 is equal to the host's architecture
I: finding correct signed-by value...
done
I: automatically chosen format: tar
I: using /tmp/mmdebstrap.Z_m3v8kiU1 as tempdir
I: running --setup-hook in shell: sh -c 'sh /home/woju/f/.scag/mmdebstrap-hooks/setup.sh "$@"' exec /tmp/mmdebstrap.Z_m3v8kiU1
I: running apt-get update...
done
I: downloading packages with apt...
done
I: extracting archives...
done
I: installing essential packages...
done
I: installing remaining packages inside the chroot...
done
Reading package lists...
Building dependency tree...
Package gramine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Version '1.7~rc1' for 'gramine' was not found
E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.Z_m3v8kiU1 --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false gramine=1.7~rc1 ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(amd64),?and(?or(?priority(required),?priority(important)),?not(?essential))) failed
I: main() received signal PIPE: waiting for setup...
I: removing tempdir /tmp/mmdebstrap.Z_m3v8kiU1...
E: mmdebstrap failed to run
Traceback (most recent call last):
  File "/usr/bin/scag-build", line 8, in <module>
    sys.exit(build())
             ^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/graminescaffolding/__main__.py", line 195, in build
    docker_id, docker_run_cmd = build_step(ctx, project_dir, conf)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/graminescaffolding/__main__.py", line 227, in build_step
    docker_id = builder.build()
                ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/graminescaffolding/builder.py", line 233, in build
    self.create_chroot()
  File "/usr/lib/python3/dist-packages/graminescaffolding/builder.py", line 274, in create_chroot
    subprocess.run([
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mmdebstrap', '--mode=unshare', '--keyring', PosixPath('/usr/lib/python3/dist-packages/graminescaffolding/keys/trusted.gpg.d'), '--include', 'gramine=1.7~rc1', '--setup-hook', 'sh /home/woju/f/.scag/mmdebstrap-hooks/setup.sh "$@"', '--customize-hook', 'sh /home/woju/f/.scag/mmdebstrap-hooks/customize.sh "$@"', 'bookworm', PosixPath('/home/woju/f/.scag/rootfs.tar'), PosixPath('/home/woju/f/.scag/sources.list')]' returned non-zero exit status 2.
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

Successfully merging a pull request may close this issue.

1 participant