Tag Info

New answers tagged

0

Just put it somewhere inside the PKGBUILD but outside of prepare(), build() and package(). When done just remove it.


2

You don't have to chroot to tar things. You can use the --numeric-owner option instead. Chroot is only necessary if you also want to record the (correct) owner/group names inside the tar archive, which is not strictly necessary in this case [when /etc/passwd etc. is part of the tar]. And without actually chrooting you also don't need to mount /dev, /proc, ...


1

If you're running the mount commands inside the chroots, then from the perspective of the outermost root, there will be proc filesystems mounted on /proc, …/mychroot1/proc and …/mychroot2/proc. There's no problem with that, you can access exactly the same files through any of the mount points. No “kicking off” is involved. A number of files under /proc ...


1

Alas, chroot(2) must be called as root.


1

Use yaegashi's answer, or escape the $ like $ sudo chroot mychroot /bin/bash -c "MY_VAR=5; echo \${MY_VAR}"


2

Use single quotes: $ sudo chroot mychroot /bin/bash -c 'MY_VAR=5; echo ${MY_VAR}'


0

If you use a dns cache (which is a wise thing to do), you can specify a different file for the local dns cache server to use. For instance, for dnsmasq, you can configure it to use resolv-file=/etc/resolv.dnsmasq.conf which probably isn't a symbolic link. Now, you still need to have 127.0.0.1 in your actual /etc/resolv.conf, but if it's already in there ...


3

Changing the pathname is hard, as it is hard-coded into glibc. However, you can use a bind-mount to mount a file instead of a directory (mount -B /tmp/my.resolv.conf /etc/resolv.conf). Unfortunately, that won't work with a broken symbolic link, as you can only bind-mount a regular file onto a regular file or a directory onto a directory. But is there ...


0

I use an ARM chroot from time to time: my phone runs Linux Deploy and the image dies now and then. I then copy it to my computer and examine the situation with chroot like this: # This provides the qemu-arm-static binary apt-get install qemu-user-static # Mount my target filesystem on /mnt mount -o loop fs.img /mnt # Copy the static ARM binary that ...


0

PAM is involved in password changes because that's how you do things like password strength checking. The password entries in your PAM configs control what is done. My hypothesis in this situation is that it is a weird interaction between Arch and Debian. You're running the Arch chpasswd, which is doing a bunch of stuff (mostly loading shared libraries) ...


0

It's likely Selinux / Ubuntu's alternative. An excellent video on using selinux correctly: https://www.youtube.com/watch?v=bQqX3RWn0Yw I'm not a Ubuntu (I think it's apparmor?) expert so I can't help there.


1

Why not just chroot into your installation? chroot /home/containers/wheezy passwd root


1

You needed the "libnss*" files from the lib64 directories, lots of scripts on the internet haven't been updated to take this in to account.


1

Unfortunately glib2.0 isn't multiarch-compliant (yet); you can subscribe to https://bugs.debian.org/648621 if you want to keep an eye on things. To build software for various architectures you can use pbuilder and/or qemubuilder. Debian has very good support for chroots using Qemu to run binaries on different architectures; debootstrap supports this ...



Top 50 recent answers are included