Opened 6 years ago

Closed 6 years ago

#28 closed defect (fixed)

make-debirf should not require being root to run

Reported by: jrollins Owned by: dkg
Priority: major Component: debirf
Keywords: debootstrap root Cc:
Sensitive:

Description

This is a difficult issue. The problem is that make-debirf uses debootstrap, and debootstrap requires being root to mount /proc and make device nodes. This is unfortunate, though, obviously, since it would be really nice if it didn't require being root. After all, it's not, or shouldn't be, doing anything to the underlying system.

The obvious pitfalls of make-debirf running as root is that it has the potential to do severe damage to your system. make-debirf is particularly vulnerable to poorly constructed plugins.

Coaxing deboostrap to not require being root may be impossible, and not using debootstrap would be silly, so this might not be a resolvable issue.

Change History (2)

comment:1 Changed 6 years ago by jrollins

Is there any reason this can't be done with the 'fakechroot' variant or debootstrap? The fakchroot man pages implies that this should not be a problem, with something like:

$ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
$ fakeroot -s fakechroot.save fakechroot debootstrap --variant=fakechroot "$DEBIRF_DISTRO" "$DEBIRF_ROOT" "$DEBIRF_MIRROR"
$ fakeroot -i fakechroot.save fakechroot chroot "$DEBIRF_ROOT" /bin/bash
# cd /
# sh /usr/share/doc/fakechroot/examples/savemode.sh
# echo deb http://ftp.debian.org/debian sarge main contrib non-free > /etc/apt/sources.list
# echo deb-src http://ftp.debian.org/debian sarge main contrib non-free >> /etc/apt/sources.list
# apt-get update
# apt-get install adduser whiptail build-essential devscripts
...

That was just made up from looking at the man fakechroot man page. Something to try.

I still think this is a very important thing to get working. make-debirf should not require being root.

comment:2 Changed 6 years ago by jrollins

  • Resolution set to fixed
  • Status changed from new to closed

Using fakechroot seems to work, so this has been fixed in version 0.6.

Note: See TracTickets for help on using tickets.