FS#10176 - makechrootpkg faile to edit sudoers file

Attached to Project: Arch Linux
Opened by Nicolas Doualot (slubman) - Sunday, 13 April 2008, 05:38 GMT
Last edited by Allan McRae (Allan) - Saturday, 30 August 2008, 06:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jason Chu (jason)
Aaron Griffin (phrakture)
Architecture All
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
When using makechrotpkg to build a package, the original provided script fail to create a valid /etc/sudoer files in the chrooted build environement.

Additional info:
* package version(s) : devtools 0.6.2-1

makechrootpkg run:

# makechrootpkg -c -r ~packages/build.x86_64/
building union chroot
moving build files to chroot
Setting PKGDEST in makepkg.conf
Setting SRCDEST in makepkg.conf
allowing 'nobody' sudo rights in the chroot
mounting sysfs : /sys
mounting procfs : /proc
binding device nodes : /dev
binding pacman cache : /var/cache/pacman
copying mtab : /etc/mtab
copying resolv.conf : /etc/resolv.conf
starting chroot (/chrootbuild)
>>> sudoers file: syntax error, line 1 <<<
sudo: parse error in /etc/sudoers near line 1
cleaning up mounts
Build failed, check $CHROOT_DIR/rw/build
cleaning up unioned mounts


Solution:
Attached is a patch I used to make the script work again. I simply overwrite the sudoers file in the chrooted environnement to have what is needed.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 30 August 2008, 06:12 GMT
Reason for closing:  Fixed
Comment by Aaron Griffin (phrakture) - Monday, 19 May 2008, 04:54 GMT
This is a unionfs bug, and has been fixed in git for a while - I added a "touch /etc/sudoers" before editing it, which moves it to the unionfs rw portion

Loading...