lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Creating a chroot for cross-building lmi


From: Vadim Zeitlin
Subject: Re: [lmi] Creating a chroot for cross-building lmi
Date: Sun, 25 Sep 2016 21:04:31 +0200

On Sun, 25 Sep 2016 15:53:50 +0000 Greg Chicares <address@hidden> wrote:

GC> I'm not sure mounting /proc in particular is worth the hassle. This morning
GC> I experimentally created a chroot for which I did this
GC>   mount -t devpts devpts /dev/pts
GC>   mount -t proc proc /proc
GC> in the chroot, before using apt-get to install the packages lmi needs. But
GC> apt-get failed:
GC>   Errors were encountered while processing:
GC>    /var/cache/apt/archives/libpulse0_5.0-13_amd64.deb

 Were there any other errors (possibly long) before this line? Normally
there should have been some output from the {pre,post,}installation script
for this package but they could have scrolled away because I believe apt
doesn't necessarily does things sequentially, so some other package(s)
could have been installed since then.

GC> so I decided to eradicate that chroot and start again, to see whether that
GC> apt-get problem is reproducible.

 It's really surprising to see all the problems with apt that you're
running into, I definitely don't set up chroots as often as you do, but I
still must have done it a few dozen times and I've never seen anything like
this. I wonder if I was just lucky or if all these problems are somehow due
to using schroot (which I had never used)?

GC> First, I reentered the chroot as root and tried using 'systemctl' to halt
GC> the daemon. That failed, with an error message explaining that such an
GC> operation can't be done inside a chroot.

 This is really strange because if the service had been started by
systemd, it should be possible to stop it using systemd also, of course.
I'm late as usual but I wonder what would have "systemctl status dbus"
said?

 Also, if you somehow do _not_ use systemd, which is supposed to be smart
enough to avoid starting services when inside chroot, I strongly advise
following https://wiki.debian.org/chroot#Configuration and creating the
file /usr/sbin/policy-rc.d in chroot always returning 101 and maybe
diverting /usr/bin/ischroot to /bin/true (I see that I did this in my own
sid chroot, but I don't remember if it was really necessary).

GC> Looking back (correct me if I'm wrong), AFAICT the only advantage gained
GC> by mounting /proc in the chroot is that it allowed the usbmux user to
GC> start dbus-daemon

 I don't think so both because I believe that dbus-daemon shouldn't have
been started inside chroot in the first place and because for me the main
reason for mounting /proc is to avoid mysterious errors when running many
common programs (possibly including those using wxWidgets as it does use
/proc for a couple of, admittedly not terribly important, things such as
returning the number of available CPUs or amount of memory). Also, as I use
chroots for testing, I want to minimize the differences between it and the
real system and the latter one would definitely always have /proc mounted.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]