Release Engineering

This project is intented for all release related issues (isos, installer, etc), under the umbrella of the ArchLinux Release Engineers
Tasklist

FS#27913 - Archiso broken by pacman 4.0 signed packages

Attached to Project: Release Engineering
Opened by Heinrich Siebmanns (Harvey) - Thursday, 12 January 2012, 09:49 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Tuesday, 20 March 2012, 14:08 GMT
Task Type Bug Report
Category ArchISO
Status Closed
Assigned To Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version testbuild (specify!)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I tried to build a custom Arch Linux live media using archiso. I strictly followed the wiki here:
https://wiki.archlinux.org/index.php/Archiso
I get to the point where I should do

pacman -Sy devtools libisoburn squashfs-tools

and pacman throws this error

error: GPGME error: Inappropriate ioctl for device

for several times. No joy with alans suggestion here:
http://mailman.archlinux.org/pipermail/arch-projects/2011-October/001994.html
to do

mount --bind /dev/pts "${working_dir}/dev/pts"

Same error
This task depends upon

Closed by  Dieter Plaetinck (Dieter_be)
Tuesday, 20 March 2012, 14:08 GMT
Reason for closing:  Fixed
Comment by Ionut Biru (wonder) - Thursday, 12 January 2012, 10:44 GMT
there are several problems with pacman4.

we need a keyring package that contains the keys and then the mounting problem.
Comment by Heinrich Siebmanns (Harvey) - Thursday, 12 January 2012, 10:50 GMT
FWIW: pacman-key --init works in the chroot
Comment by Thomas Bächler (brain0) - Thursday, 12 January 2012, 12:09 GMT
Notified Gerardo, technically he maintains archiso.

The problem is definitely related to the /dev/pts/ problem you linked to. Maybe you bound the pts folder to the wrong place or similar.
Comment by Heinrich Siebmanns (Harvey) - Thursday, 12 January 2012, 13:54 GMT
You're right. I had to edit /usr/sbin/mkarchroot itself:

[code]root@obelix# diff mkarchroot /usr/sbin/mkarchroot
216a217
>
217a219,222
>
> [[ -e "${working_dir}/dev/pts" ]] || mkdir "${working_dir}/dev/pts"
> mount --bind /dev/pts "${working_dir}/dev/pts"
>
236d240
< mount -t devpts devpts "${working_dir}/dev/pts" -o newinstance,ptmxmode=666[/code]

This may be ugly, but mkarchroot works now
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 12 January 2012, 15:29 GMT
I know, but is related to mkarchroot (mkarchiso uses it).

One interesting thing is, if you enter to this chroot with mkarchroot -r then start sshd, next login via ssh, pacman works fine.
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 17 January 2012, 20:34 GMT
By default, for now, pacman-4 in [core] has "SigLevel = Never" so mkarchroot is not broken.
Anyway, as I said previously, is time to make own implementation of mkarchroot for mkarchiso.
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 09 March 2012, 02:55 GMT
there is a dirty workaround for making "pacman signed" works...

# tty
not a tty
# cat /dev/ptmx &
[1] 1483
# tty
/dev/pts/0

Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 09 March 2012, 05:05 GMT
ok, such workaround only works iff you are running mkarchroot on /dev/pts/0, (the thing is that forked process inherits fds as we know... so the process inside chroot still wants /dev/pts/0...). Otherwise you need to open another and another pts, until reach the same pts/N.

We need to run (-r <cmd>) in your own tty, otherwise newinstance should not be used (at least for things thats needs a tty like gpg) [ttyname(3)]
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 16 March 2012, 05:41 GMT
Solved (if [#1] accepted): mkarchiso does not use anymore mkarchroot from devtools, and no need to build inside "clean chroot" when running in 32-bit-compat.

[#1] http://mailman.archlinux.org/pipermail/arch-releng/2012-March/002421.html

Loading...