Summary: | net-print/foo2zjs-99999999 fails emerge with permission denied, access attempt outside the sandbox | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Branko <bbyh751-g2bzil45> |
Component: | [OLD] Printing | Assignee: | Printing Team <printing> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | help, thejcwk, vityokster |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
log output from the emerge
sandbox log after the emerge Makefile from the work directory after the failure hplj1000 shell script from the work directory build.log Fixed ebuild |
Description
Branko
2012-06-11 03:45:56 UTC
Created attachment 314931 [details]
log output from the emerge
Created attachment 314933 [details]
sandbox log after the emerge
Created attachment 314935 [details]
Makefile from the work directory after the failure
Created attachment 314937 [details]
hplj1000 shell script from the work directory
This installs many support files. Most of them are correctly loaded into the image directory under $work. However, lines 157 and 158 attempt to remove files from /lib/udev
Thanks for supporting my printer under gentoo.
To get it installed, call: # FEATURES="-sandbox" emerge -av foo2zjs Thanks, I can confirm that "-sandbox" works. Hope a permanent fix can be made so that _emerge world_ can run unattended. Thanks for your support. The files that the compile is trying to delete are part of the HPLIP package (HP Linux Imaging and Printing). I believe the compile is crashing if the files are NOT present, ie, HPLIP is not installed. I have not tried the compile with HPLIP installed to confirm. However, I verified that the files do not exist on my system before compilation. Next patch close the problem of this bug id=420623 and bug id=375397 --- /usr/portage/net-print/foo2zjs/foo2zjs-99999999.ebuild 2012-01-19 04:01:33.000000000 +0700 +++ foo2zjs-99999999.ebuild 2012-11-13 14:31:57.000000000 +0700 @@ -52,7 +52,7 @@ src_prepare() { # Prevent an access violation. sed -e "s~/etc~${D}/etc~g" -i Makefile - sed -e "s~/etc~${D}/etc~g" -i hplj1000 +# sed -e "s~/etc~${D}/etc~g" -i hplj1000 # Prevent an access violation, do not create symlinks on live file system # during installation. @@ -68,5 +68,61 @@ # for them. mkdir -p "${D}/usr/share/ppd" - emake DESTDIR="${D}" -j1 install install-hotplug + emake DESTDIR="${D}" -j1 install +#install-hotplug + insinto /etc/udev/rules.d/ + insopts -m0644 + newins hplj10xx.rules 11-hplj10xx.rules || die + exeinto /etc/hotplug/usb/ + doexe hplj1000 || die + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hplj1005 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hplj1018 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hplj1020 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hpljP1005 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hpljP1006 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hpljP1007 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hpljP1008 + dosym /etc/hotplug/usb/hplj1000 /etc/hotplug/usb/hpljP1505 + + echo "" >foo2zjs.usermap +MODEL=P1005 +USB1=0x03f0 +USB2=0x3d17 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=P1006 +USB1=0x03f0 +USB2=0x3e17 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=P1007 +USB1=0x03f0 +USB2=0x4817 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=P1008 +USB1=0x03f0 +USB2=0x4917 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=P1505 +USB1=0x03f0 +USB2=0x3f17 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=1000 +USB1=0x03f0 +USB2=0x0517 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=1005 +USB1=0x03f0 +USB2=0x1317 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=1018 +USB1=0x03f0 +USB2=0x4117 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap +MODEL=1020 +USB1=0x03f0 +USB2=0x2b17 + echo "hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000" >>foo2zjs.usermap + + insinto /etc/hotplug/usb/ + insopts -m0664 + doins foo2zjs.usermap || die } Same issue for me. I can confirm that FEATURES="-sandbox" works for me as a workaround. I do not have the files that the script was trying to delete on my system. This is a system that previously had HPLIP installed, but I had to removed it as foo2zjs is blocked by hplip. Created attachment 339624 [details]
build.log
Happens for me, too. I do not have hplip installed. build.log attached.
Similarly, FEATURES="${FEATURES} -sandbox" worked for me as well. I also see an access violation on attempting to install foo2zjs today. The following patch to the ebuild neuters the remaining problematic (and misguided) sections of the build system. (the current ebuild handles some, but not all the problem bits) The build system attempts to delete the files to be installed before installing them, and does not take DESTINATION into account when doing this. It makes no difference for us, since we always install to an empty location and clean up completely when uninstalling/upgrading. That is, assuming no obsolete rules have been installed outside of portage's sandbox. --- a/net-print/foo2zjs/foo2zjs-99999999.ebuild +++ b/net-print/foo2zjs/foo2zjs-99999999.ebuild @@ -51,8 +51,12 @@ src_unpack() { src_prepare() { # Prevent an access violation. - sed -e "s~/etc~${D}/etc~g" -i Makefile - sed -e "s~/etc~${D}/etc~g" -i hplj1000 + sed -e "s~/etc~${D}/etc~g" \ + -e "s~rm -f \$(LIBUDEVDIR)~rm -f${D}\$(LIBUDEVDIR)~" \ + -i Makefile + sed -e "s~/etc~${D}/etc~g" \ + -e "s~rm -f /lib/udev/rules.d~rm -f ${D}/lib/udev/rules.d~" \ + -i hplj1000 # Prevent an access violation, do not create symlinks on live file system # during installation. Created attachment 365606 [details]
Fixed ebuild
Attached is an updated ebuild that uses a more minimal set of sed commands to take care of the offending lines.
+ 18 Dec 2013; Ian Stakenvicius <axs@gentoo.org> foo2zjs-99999999.ebuild: + fix access violations, bug 420623 + |