You are not logged in.

#1 2017-09-11 18:47:51

schlehmil
Member
Registered: 2010-10-01
Posts: 19

Bash in systemd-nspawn warns about "cannot set terminal process group"

To build my AUR packages I usually create temporary machines with systemd-nspawn.

# systemd-nspawn -D / -x --bind /home --bind /run

From there I su back to a normal user and use yaourt and makepkg to build my packages.
Since a few days this fails with following warning from bash:

Spawning container ned-7704314ab970286e on /.#machine.1ff073ccbe9fb45a.
Press ^] three times within 1s to kill container.
-bash: cannot set terminal process group (-1): Inappropriate ioctl for device
-bash: no job control in this shell

Thus i cannot use makepkg anymore because it fails with:

sudo: no tty present and no askpass program specified
==> ERROR: 'pacman' failed to install missing dependencies.

Someone knows what is wrong or what recent package update could cause that problem?

Offline

#2 2017-09-11 19:02:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Bash in systemd-nspawn warns about "cannot set terminal process group"

Not an Installation issue, moving to Apps and DEs...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-09-11 19:32:35

schlehmil
Member
Registered: 2010-10-01
Posts: 19

Re: Bash in systemd-nspawn warns about "cannot set terminal process group"

Thought i posted it to System Administration. Yeah well hope someone can actually help.

Offline

#4 2017-09-12 02:20:28

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Bash in systemd-nspawn warns about "cannot set terminal process group"

This seems to happen with new versions of the filesystem package, which drag in systemd as a dependency. (Actually, that has now been changed to make systemd a part of the base-devel group instead, due to dependency loops.)
Googling had led me to e.g. https://lists.freedesktop.org/archives/ … 33704.html but I'm still not really sure what it means.

...

It doesn't really matter. For your use case you shouldn't be doing it anyway. Don't systemd-nspawn and su to a user for makepkg, use makechrootpkg from devtools which automates this. You can use MAKEPKG="makechrootpkg -u -r /path/to/nspawn/container -- " in your yaourtrc to tell yaourt how to use makechrootpkg when building packages, too.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2017-09-28 17:59:16

schlehmil
Member
Registered: 2010-10-01
Posts: 19

Re: Bash in systemd-nspawn warns about "cannot set terminal process group"

Filesystem package has not been updated since March. On another host with older kernel and some older libs it works. As I could not downgrade on my current host due to problems booting afterwards I decided to try makechrootpkg.

My current workflow was to snapshot my current root via BTRFS snapshot, install missing build dependencies and build my package. Finally I dropped the snapshot and I was ready to install the built package.
With makechrootpkg I had to create a permanent BTRFS subvolume, install a base system, install all build dependencies and build the package. How can I use my previous workflow with makechrootpkg?

Offline

#6 2017-10-02 17:46:34

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Bash in systemd-nspawn warns about "cannot set terminal process group"

I cannot understand why you would want to do that. The whole point of makechrootpkg is that it uses a minimal snapshot that doesn't have all the garbage on your system, possibly resulting in instances of automagic, undeclared dependencies which break the software if you uninstall some random package. Among other problems.

That being said, if you really want to do something so unwise, there is nothing stopping you from snapshotting your current system into that permanent btrfs subvolume, then wiping it when you are done with it. Or just installing that base system, and wiping that. Or using extra-x86_64-build from devtools which has an option to automatically recreate the "permanent" btrfs subvolume on every run, which goes to show it is hardly permanent. Or simply import the one-line fix from makechrootpkg which was meant to fix this in the context of PKGBUILDs which need a controlling terminal.

You have an abundance of options. Some of them are even good ones.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB