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

Clean checkout does not build #26

Open
matthijskooijman opened this issue Mar 5, 2018 · 2 comments
Open

Clean checkout does not build #26

matthijskooijman opened this issue Mar 5, 2018 · 2 comments

Comments

@matthijskooijman
Copy link
Member

When working on a clean checkout of a repo derived from webconverger, I found two problems in the resulting chroot:

  • chroot/tmp did not have the right permissions, making it non-writable for unprivileged users. It should have 1777.
  • chroot/dev is empty.

Both of these problems prevented apt-get update from working. I could reproduce this on a clean Webconverger too, which showed three problems:

  • When /dev/null is missing, apt-get update hangs on "Waiting for headers..." (for some repositories, not all it seems).

  • When /dev/urandom is missing, apt-get update crashes with:

terminate called after throwing an instance of 'std::runtime_error'
  what():  random_device::random_device(const std::string&)
  • When the /tmp/ permissions are wrong, apt-get update shows:
Err:1 http://security.debian.org stretch/updates InRelease
  Couldn't create temporary file /tmp/apt.conf.4A7Zis for passing config to apt-key

None of these seem to influence building, so that's probably why this didn't show up earlier (anyone who is actively working on installing new packages and managing the chroot, probably still has an old checkout, from the time that live-build still handled this kind of stuff).

I think it would be good if this was somehow fixed, though there's two open questions:

  • Where/when to do this? After the clone done by the makefile in this repo? On every build? Or in a script inside the chroot perhaps?
  • What /dev/ files to create? I looked for a command that would give a minimal universal set of devices, but haven't found one so far. I tried busybox' mdev command, but that needs /sys to work and creates a lot of system-specific devices (and messes up the permissions on /dev/null, so it still doesn't work). The best approach might just be a hardcoded list of devices, e.g. http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html
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
@matthijskooijman and others