Thank you WorMzy, the topic you started was very useful. I solved it by installing and configuring systemd on my system:
https://wiki.archlinux.org/index.php/Systemd
My system still was working with sysvinit and initscripts.
Thanks to all those who posted on this thread
Greetings
]]>I doubt that will help you in any way though.
]]>I have new information.
Searching for information on the forum (this one) I have found this thread: https://bbs.archlinux.org/viewtopic.php?pid=1260353
The user that started the topic, had (or have) a very similar issue. At the first post, he says has fixed the problem by downgrading the package devtools to the version 20120720. So then, I did the same thing.
I had installed devtools 20130408 and in the cache of Pacman, I have the version 20130127, 20130122, 20121115, 20121027, 20121013, 20120720 of this package. I have downgraded to all these versions of devtools, one by one. In some cases, after downgrading and by creating the chroot directory I got errors, either with the package systemd or with the package filesystem. In the first case, the error did not affect the creation fo the chroot directory. In the second case (with filesystem), creating the directory was not successful, getting an error message (see below).
I proceed to list each devtool package (its version) and the error I have got, when I tried to create the chroot directory:
> devtools-20120720-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompatAlso an error with lacale-gen:
chroot: failed to run command '/usr/sbin/locale-gen': No such file or directory
Creating chroot directory successful
No error by building packages with makechrootpkg into the chroot directory.
> devtools-20121013-1-any.pkg.tar.xz
filesystem's error:
( 4/130) installing filesystem [##########################################] 100%
error: could not rename /home/zuargo/chroot/root/etc/resolv.conf to /home/zuargo/chroot/root/etc/resolv.conf.pacorig (Device or resource busy)
error: problem occurred while installing filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packagesCreating chroot directory was not successful
> devtools-20121027-1-any.pkg.tar.xz
filesystem's error:
( 4/130) installing filesystem [##########################################] 100%
error: could not rename /home/zuargo/chroot/root/etc/resolv.conf to /home/zuargo/chroot/root/etc/resolv.conf.pacorig (Device or resource busy)
error: problem occurred while installing filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packagesCreating chroot directory was not successful
> devtools-20121115-1-any.pkg.tar.xz
filesystem's error:
( 4/130) installing filesystem [##########################################] 100%
error: could not rename /home/zuargo/chroot/root/etc/resolv.conf to /home/zuargo/chroot/root/etc/resolv.conf.pacorig (Device or resource busy)
error: problem occurred while installing filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packagesCreating chroot directory was not successful
> devtools-20130122-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompatError by building packages with makechrootpkg into the chroot directory:
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
> devtools-20130127-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompat
Error by building packages with makechrootpkg into the chroot directory:==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
> devtools-20130408-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompatError by building packages with makechrootpkg into the chroot directory:
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
As see, the only one package that allows me to build into chroot directory with no errors is devtools-20120720.
Now I can build packages into a clean chroot directory. But I can't update devtools.
]]>Can someone post their makechrootpkg file here? please. Thanks in advance.
You can just reinstall devtools, but here is makechrootpkg from devtools-20130408-1
]]>The "disabled" code is a heredoc which is written to a file to be later executed... there's nothing particularly wrong with it.
Thank you for replying and explain it.
I made the chroot directory on another partition and I have tried to build the package therein. I get the same error. =/
]]>zuargo wrote:$ sudo makechrootpkg -c -r /home/zuargo/chroot/ ==> Creating clean working copy...done 438 ==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
402 is part of the "chrootbuild" heredoc, which I think should be executed on line 418 with mkarchroot -r "/chrootbuild" "$copydir"
It doesn't get to 402, but I'm not sure if A) it enters chrootbuild and somehow breaks before 402 or B) something immediately breaks with the mkarchroot command. Personally I would add a lot more debugging stuff to trace the code execution, but that type of debugging would take quite a while for each step to get relayed+interpreted over a forum.
Thank you
I think I know where is the problem in /usr/sbin/makechrootpkg. In the appointed file, the line 396, is disabling the commands located between lines 397 and 414. How do I know this? becouse kwrite shows it. Open makechrootpkg with kwrite, now see the text between lines 397 and 414, all commands are not highlighted with any color. Kwrite by default highlights all the functional commands in a document (compare them with the other commands in the file).
This can be confirmed by comment (#) the line 396. If this is done, you will see the commands, between the lines 397 and 414, now are highlighted, it means, now they are functionals.
Moreover, when I comment the line 396, I get other error, this one:
$ sudo makechrootpkg -c -r /home/zuargo/chroot/
==> Creating clean working copy...done
/usr/sbin/makechrootpkg: line 401: cd: /build: No such file or directory
mkdir: cannot create directory '/home/zuargo': Permission denied
==> ERROR: You do not have write permission to create packages in /home/zuargo/Paquetes/qt4.
Aborting...
Well, now the point is how to fix this. I am thinking to report this as a bug.
]]>$ sudo makechrootpkg -c -r /home/zuargo/chroot/ ==> Creating clean working copy...done 438 ==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
402 is part of the "chrootbuild" heredoc, which I think should be executed on line 418 with mkarchroot -r "/chrootbuild" "$copydir"
It doesn't get to 402, but I'm not sure if A) it enters chrootbuild and somehow breaks before 402 or B) something immediately breaks with the mkarchroot command. Personally I would add a lot more debugging stuff to trace the code execution, but that type of debugging would take quite a while for each step to get relayed+interpreted over a forum.
]]>Have you tried using the helper scripts?
sudo extra-i686-build -r /path/to/create/chroot
I get the same error:
==> Building in chroot for [extra] (i686)...
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/extra-i686/zuargo/build
=/
zuargo wrote:Can you be more clear about putting "echo 402" and "echo 438" just before the appointed lines?
Is it something like this?:
cd /build echo 402 sudo -u nobody makepkg $makepkg_args || touch BUILD_FAILED [[ -f BUILD_FAILED ]] && exit 1 [...]
Yes, like this. same for the line below.
I get this:
$ sudo makechrootpkg -c -r /home/zuargo/chroot/
==> Creating clean working copy...done
438
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
It seems, "echo 438" is not on the proper line
]]>Can you be more clear about putting "echo 402" and "echo 438" just before the appointed lines?
Is it something like this?:
cd /build echo 402 sudo -u nobody makepkg $makepkg_args || touch BUILD_FAILED [[ -f BUILD_FAILED ]] && exit 1 [...]
Yes, like this. same for the line below.
]]>sudo extra-i686-build -r /path/to/create/chroot
Is it something like this?:
cd /build
echo 402
sudo -u nobody makepkg $makepkg_args || touch BUILD_FAILED
[[ -f BUILD_FAILED ]] && exit 1
if $run_namcap; then
pacman -S --needed --noconfirm namcap
for pkgfile in /build/PKGBUILD /pkgdest/*.pkg.tar.?z; do
echo "Checking \${pkgfile##*/}"
sudo -u nobody namcap "\$pkgfile" 2>&1 | tee "/build/\${pkgfile##*/}-namcap.log"
done
fi
exit 0
EOF
chmod +x "$copydir/chrootbuild"
if mkarchroot -r "/chrootbuild" "$copydir"; then
for pkgfile in "$copydir"/pkgdest/*.pkg.tar.?z; do
if $add_to_db; then
mkdir -p "$copydir/repo"
pushd "$copydir/repo" >/dev/null
cp "$pkgfile" .
repo-add repo.db.tar.gz "${pkgfile##*/}"
popd >/dev/null
fi
chown "$src_owner" "$pkgfile"
mv "$pkgfile" "$PKGDEST"
done
for l in "$copydir"/build/*-{build,check,namcap,package,package_*}.log; do
chown "$src_owner" "$l"
[[ -f $l ]] && mv "$l" .
done
else
# Just in case. We returned 1, make sure we fail
echo 438
touch "$copydir/build/BUILD_FAILED"
fi
Sorry by this, but I am a common user, I studied chemistry, not anything related to computer science, so I have no the knowledge necessary.
]]>