[arch-general] devtools broken?

Lukas Jirkovsky l.jirkovsky at gmail.com
Wed Oct 17 09:07:41 EDT 2012


On 17 October 2012 13:37, Lukas Jirkovsky <l.jirkovsky at gmail.com> wrote:
> On 17 October 2012 12:36, Lukas Jirkovsky <l.jirkovsky at gmail.com> wrote:
>> On 17 October 2012 11:43, Lukas Jirkovsky <l.jirkovsky at gmail.com> wrote:
>>>
>>> You seem to be right, I tried to update my chroots and it doesn't work
>>> for me either (the same problem is reported) on a non-systemd system.
>>> I'll try to track it down, because I need devtools on this system.
>>>
>>> Lukas
>>
>> The problem is in /usr/sbin/mkarchroot:
>>
>> line 266:
>>        for host_config in resolv.conf localtime; do
>>            bind_mount /etc/$host_config ro
>>        done
>>
>> line 303:
>>        for host_config in resolv.conf localtime; do
>>            umount "${working_dir}/etc/${host_config}"
>>        done
>>
>> If you comment out these lines, it will work. I'm not sure whether
>> this is a correct fix. If I find a better fix, I'll send a patch to
>> arch-projects.
>>
>> Lukas
>
> Don't use the previous patch, it breaks makechrootpkg.

I've sent a working patch to arch-projects (I hope I didn't screw
anything). In case anything went wrong, I'll post it here too:

diff --git a/mkarchroot.in b/mkarchroot.in
index 7ea90e1..d29dd9d 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -131,9 +131,7 @@ chroot_mount() {
        [[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
        mount -t tmpfs tmpfs "${working_dir}/run" -o
mode=0755,nodev,nosuid,strictatime,size=64M

-       for host_config in resolv.conf localtime; do
-           bind_mount /etc/$host_config ro
-       done
+       bind_mount /etc/localtime ro
    fi

    [[ -n $host_mirror_path ]] && bind_mount "$host_mirror_path" ro
@@ -145,6 +143,7 @@ chroot_mount() {
 }

 copy_hostconf () {
+    cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
    cp -a /etc/pacman.d/gnupg "${working_dir}/etc/pacman.d"
    echo "Server = ${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist

@@ -168,9 +167,7 @@ trap_chroot_umount () {
    [[ -n $host_mirror_path ]] && umount "${working_dir}/${host_mirror_path}"

    if (( ! have_nspawn )); then
-       for host_config in resolv.conf localtime; do
-           umount "${working_dir}/etc/${host_config}"
-       done
+       umount "${working_dir}/etc/localtime"
        umount "${working_dir}/proc/sys"
        umount "${working_dir}/proc"
        umount "${working_dir}/sys"
--


More information about the arch-general mailing list