You are not logged in.

#1 2015-01-06 20:11:55

IICore
Member
Registered: 2015-01-04
Posts: 3

Building packages in chroot

Hi Guys,

i wan't to build some packages, e.g. teamviewer, in a clean chroot ... as even in the last years.
So i followed this wiki article: https://wiki.archlinux.org/index.php/De … ean_Chroot

If i run 'makechrootpkg -c -r /opt/arch64' as root, i got the error:

root@toaster ~/teamviewer # makechrootpkg -c -r /opt/arch64                                                 :(
==> Creating clean working copy [copy]...done
makepkg: invalid option '--asroot'
==> ERROR: Could not download sources.

Without root privileges i was asked for the root password and got later the same error.
I will not install base-devel on my live system and i know that the --asroot option was removed from makepkg.

Is the way by using a virtual maschine the only one?

Sorry for my english :-)

Greetz
IICore

Offline

#2 2015-01-06 20:31:44

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: Building packages in chroot

If I'm not mistaken, running makepkg as a root user, be it with the --asroot flag or as the root user is supposed to fail because of the changes to makepkg. It's been removed because the issues with fakeroot (which caused the --asroot flag to appear) have been fixed.

If you create a normal user and then build in the chroot, it should work normally.

EDIT: There's also something to do with sudo-ing to nobody somewhere in this thread.

Last edited by clfarron4 (2015-01-06 20:46:13)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#3 2015-01-06 20:50:23

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Building packages in chroot


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2015-01-06 21:34:45

IICore
Member
Registered: 2015-01-04
Posts: 3

Re: Building packages in chroot

Hi graysky,

i will test ccm later ... currently there are some problems, which are important to me (e.g. cups: Unable to get list of printer drivers)

I installed Arch Linux with KDE after 2 month again on my pc but currently there are so many problems, so i indent to install Fedora or an other distribution

Offline

#5 2015-01-13 12:32:30

asdil12
Member
Registered: 2012-04-10
Posts: 19

Re: Building packages in chroot

Offline

#6 2015-01-13 12:58:59

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: Building packages in chroot

If you run makechrootpkg using sudo, everything works fine.

Offline

#7 2015-01-13 13:05:50

asdil12
Member
Registered: 2012-04-10
Posts: 19

Re: Building packages in chroot

If I would run makechrootpkg as nobody, it wouldn't be able to get into the chroot as the chroot files are owned by root.
I could set the SUDO_USER env var to "nobody" but that requires the pwd to be writeabke by user nobody.
Still the asroot option is not there anymore so makechrootpkg must not use that option.

Actually makechrootpkg should also automaticly take care of this on its own. It's kind of hackish to let the user chown the pwd to nobody and let makechrootpkg call with env SUDO_USER=99.

Last edited by asdil12 (2015-01-13 13:06:37)

Offline

#8 2015-01-14 00:29:46

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: Building packages in chroot

Are you only running as root?

Offline

#9 2015-01-14 05:33:02

asdil12
Member
Registered: 2012-04-10
Posts: 19

Re: Building packages in chroot

I'm running a tool via cron (see aur pkg aurbs) that automaticly builds aur pkgs.
I want to prevent editing any security related files (like sudoers) if I can prevent it.

The tool is rin via cron or via ssh. Both don't elevate priviliges so the SUDO_USERS var is not set.

Offline

Board footer

Powered by FluxBB