Bringing query about the pkg-ruby-extras scripts on mentors list to debian-ruby. I would like to finally get sbuild & lxc set up on my Jessie machine so I can use the pkg-ruby-extras script, and I hope that Josch can help with some improvements to the script for sbuild. Hi Josch, Thanks for taking the time to respond to all that! On 06/25/2017 08:50 AM, Johannes Schauer wrote: > Hi Ross, > > sbuild maintainer here. :) > > Quoting Ross Gammon (2017-06-23 21:18:13) >> I mainly use pbuilder/cowbuilder to build my packages, but I would >> really like to try using the tool from pkg-ruby-extras, because I am >> told it is very good for test building reverse dependencies and also >> runs debci to test any autopkgtest testsuites. It uses sbuild. > > pkg-ruby-extras? The alioth group? What is "the tool" you are referring to? If > this part of your question is ruby specific, then maybe the debian-ruby list is > a better fit? You found the tool below :-) > >> However, sbuild does not seem to agree with me, and I have had several >> attempts over the years to get it going but I gave up each time. > > Please help by filing bugs with the problems you faced! I am aware that many > things are not well documented that but to make the software better I need to > know which things need more explanation. > I will do - it was only a lack of time that stopped me before. And also knowing that it was probably mostly user error. <snip> >> I: Base system installed successfully. >> I: Configured /usr/sbin/policy-rc.d: >> +------------------------------------------------------------------------ >> |#!/bin/sh >> |echo "All runlevel operations denied by policy" >&2 >> |exit 101 >> +------------------------------------------------------------------------ >> I: Configured APT /etc/apt/sources.list: >> +------------------------------------------------------------------------ >> |deb http://httpredir.debian.org/debian unstable main >> |deb-src http://httpredir.debian.org/debian unstable main >> +------------------------------------------------------------------------ >> I: Please add any additional APT sources to >> /srv/chroots/unstable-amd64-sbuild/etc/apt/sources.list >> modprobe: FATAL: Module overlay not found. >> I: schroot chroot configuration written to >> /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID. >> +------------------------------------------------------------------------ >> |[unstable-amd64-sbuild] >> |description=Debian unstable/amd64 autobuilder >> |groups=root,sbuild >> |root-groups=root,sbuild >> |profile=sbuild >> |type=directory >> |directory=/srv/chroots/unstable-amd64-sbuild >> |union-type=none >> +------------------------------------------------------------------------ >> I: Please rename and modify this file as required. >> W: Not creating symlink /srv/chroots/unstable-amd64-sbuild to >> /etc/sbuild/chroot/unstable-amd64-sbuild: file already exists > > This is troublesome. It appears you already had a chroot set up? > Yes - probably - I have had many unsuccessful goes at it in the past on different machines, and I can never remember where I got to. $ schroot -l E: /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID: line 1 [unstable-amd64-sbuild]: A chroot or alias ‘chroot:unstable-amd64-sbuild’ already exists with this name I: Duplicate names are not allowed >> I: Setting reference package list. >> I: Updating chroot. >> Err:1 http://httpredir.debian.org/debian unstable InRelease >> Temporary failure resolving 'httpredir.debian.org' >> Reading package lists... Done >> W: Failed to fetch >> http://httpredir.debian.org/debian/dists/unstable/InRelease Temporary >> failure resolving 'httpredir.debian.org' >> W: Some index files failed to download. They have been ignored, or old >> ones used instead. > > Problem with the network connection? I don't think so - maybe a regular/intermittent problem with the redirections? I wonder if it is a good idea to use httpredir anyway. It appears to be discontinued: https://wiki.debian.org/DebianGeoMirror Perhaps I should log into the chroot & manually change the sources.list? > >> Reading package lists... Done Building dependency tree Reading state >> information... Done Calculating upgrade... Done >> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. >> I: Successfully set up unstable chroot. >> I: Run "sbuild-adduser" to add new sbuild users. >> + grep -l ^union-type= >> /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID >> /etc/schroot/chroot.d/unstable-amd64-sbuild-Y02TR7 >> + grep -q ^union-overlay-directory= >> /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID >> + echo union-overlay-directory=/dev/shm >> + sudo tee --append /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID >> [sudo] password for ross: >> union-overlay-directory=/dev/shm >> + grep -q /var/cache/apt/archives /etc/schroot/sbuild/fstab >> + grep -q ^lxc.network.type\s*=\s*empty /etc/lxc/default.conf >> + sudo debci setup >> E: /etc/schroot/chroot.d/unstable-amd64-sbuild-Y02TR7: line 1 >> [unstable-amd64-sbuild]: A chroot or alias >> ‘chroot:unstable-amd64-sbuild’ already exists with this name >> I: Duplicate names are not allowed >> E: /etc/schroot/chroot.d/unstable-amd64-sbuild-Y02TR7: line 1 >> [unstable-amd64-sbuild]: A chroot or alias >> ‘chroot:unstable-amd64-sbuild’ already exists with this name >> I: Duplicate names are not allowed > > Yup, this looks like the chroot you want to create already exists. > What is the best way to clear it all out and start again? >> E: chroot debci-unstable-amd64 does not exit in custom location . Please >> create it first. >> >> --------------------------------- >> >> I think the sbuild setup completes, although I can't update the chroot. >> If I run "# chroot /srv/chroots/unstable-amd64-sbuild apt-get update" >> then I always get "Temporary failure resolving 'httpredir.debian.org". >> Httpredir resolves fine when I "apt update" the host Jessie laptop. > > That's because this chroot is mean to be used by schroot, the suid program used > by sbuild. Schroot then does some remaining setup tasks before it uses the > chroot, like setting up /etc/resolv.conf properly. OK - maybe if I clear everything out and start again, that step will be done properly. > >> But then "debci setup" chokes due to an existing chroot with the same name. >> But I don't understand why it is creating a sbuild chroot when it should be >> using lxc. Maybe the lxc container was only half set up before? Most of the >> options from the setup script seem to be there. >> >> If I run "sudo lxc-start -n adt-sid-amd64" I get: >> >> lxc-start: Executing '/sbin/init' with no configuration file may crash >> the host >> >> If I run "sudo lxc-attach -n adt-sid-amd64 apt-get update" I get: >> >> lxc-attach: failed to get the init pid >> >> Maybe I have to recreate the lxc container for debci. Any clues on how I >> can do that? > > Everything you did so far didn't use lxc at all. Instead, schroot was used as a > build environment. > I think the intention of the setup script is to set up sbuild for building, and lxc for autopkgtest. Maybe I have a half-setup lxc, and debci tries to fallback to sbuild. I should debug the setup script some more. <snip> > If I understand it correctly, then you are using this script: > > https://anonscm.debian.org/cgit/pkg-ruby-extras/pkg-ruby-extras.git/tree/setup > > Unfortunately, there is much to be improved about this script. If you want to > help improve it, just contact the authors of the script with your problems and > CC me. :) You are correct. I used debomatic online (http://debomatic-amd64.debian.net/) to test my new autopkgtests in the end. But I would rather debug them locally. And I would like to begin using pkg-ruby-extras for all of the little transitions we have to do in pkg-javascript (like Pirate & others do). I have just subscribed to debian-ruby (as I have some ruby stuff that I use locally and would like to package one day), and added them to this mail. We can probably drop mentors from cc. I will report back on any resolutions. Regards, Ross
Attachment:
signature.asc
Description: OpenPGP digital signature