Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brother-dcp9055cdn-bin fails to install #34

Closed
madImpulse opened this issue Feb 12, 2017 · 13 comments
Closed

brother-dcp9055cdn-bin fails to install #34

madImpulse opened this issue Feb 12, 2017 · 13 comments

Comments

@madImpulse
Copy link

I don't know if this is a general issue or specific to this ebuild. When I emerge it, I get the following output:

>>> Install brother-dcp9055cdn-bin-1.1.1 into /var/tmp/portage/net-print/brother-dcp9055cdn-bin-1.1.1/image/ category net-print
 * ACCESS DENIED:  unlinkat:     /usr/share/cups/model/brdcp9055cdn.ppd
rm: cannot remove '/usr/share/cups/model/brdcp9055cdn.ppd': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/share/cups/model/brdcp9055cdn.ppd
cp: cannot create regular file '/usr/share/cups/model/brdcp9055cdn.ppd': Permission denied
 * ACCESS DENIED:  fchmodat:     /usr/share/cups/model/brdcp9055cdn.ppd
chmod: changing permissions of '/usr/share/cups/model/brdcp9055cdn.ppd': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/share/ppd/brdcp9055cdn.ppd
cp: cannot create regular file '/usr/share/ppd/brdcp9055cdn.ppd': Permission denied
 * ACCESS DENIED:  fchmodat:     /usr/share/ppd/brdcp9055cdn.ppd
chmod: changing permissions of '/usr/share/ppd/brdcp9055cdn.ppd': Permission denied
 * ACCESS DENIED:  fchmodat:     /usr/local/Brother/Printer/dcp9055cdn/inf/brdcp9055cdnrc
chmod: changing permissions of '/usr/local/Brother/Printer/dcp9055cdn/inf/brdcp9055cdnrc': Permission denied
 * ACCESS DENIED:  fchmodat:     /usr/local/Brother/Printer/dcp9055cdn/inf
chmod: changing permissions of '/usr/local/Brother/Printer/dcp9055cdn/inf': Permission denied
ln: failed to create symbolic link '/var/tmp/portage/net-print/brother-dcp9055cdn-bin-1.1.1/image//usr/libexec/cups/filter/brlpdwrapperdcp9055cdn': No such file or directory

I think the cupswrapper script is run, a new brother printer is added, but the installation is not complete. In the end I had to add a symlink to /usr/local/Brother/Printer/dcp9055cdn/lpd/filterdcp9055cdn from /usr/libexec/cups/filter/brlpdwrapperdcp9055cdn

see also my story here:
https://forums.gentoo.org/viewtopic-p-8030842.html#8030842

I found suggestions to run emerge with FEATURES="-sandbox", but htat did not help.

@stefan-langenmaier
Copy link
Owner

Thanks for your report!
Yes it looks like a sandbox violation. I will investigate why the ebuild is not working.

Btw, you need to use FEATURES="-usersandbox -sandbox" to deactivate the sandboxing completely, but the ebuild will still error out.

@madImpulse
Copy link
Author

thanks for the hint, with -usersandbox I get less errors. I think now the remaining problem is that the source of the symlink is not correct:

* The specific snippet of code:
 *       ( ln -s "${D}/usr/lib64/cups/filter/brlpdwrapperdcp9055cdn" "${D}/usr/libexec/cups/filter/brlpdwrapperdcp9055cdn" ) || die

I had to use /usr/local/Brother/Printer/dcp9055cdn/lpd/filterdcp9055cdn. I don't remember, wether this folder was created by the ebuild or by me unpacking the rpm.

@stefan-langenmaier
Copy link
Owner

stefan-langenmaier commented Feb 13, 2017

I pushed a new ebuild. Disabling the sandboxes should no longer be necessary.

Maybe you can leave some feedback if it's working or not as I don't have access to this model.

@stefan-langenmaier
Copy link
Owner

No feedback after a week. Closing.

@madImpulse
Copy link
Author

Been away for a few days. Thanks a lot, the issue seems to be resolved.
I emerged the -r1 version succesfully. I had the move or delete the existing /usr/local/Brother folder, but the it it was all good. test rpint succeeded. thanks a lot for the prompt support. Also it did not install a new printer when emerging the ebuild.

@madImpulse
Copy link
Author

I think I was a little too quick. I checked on a second machine: it is still necessary to make the symlink in usr/libexec/cups/filter:
ln -s /usr/local/Brother/Printer/dcp9055cdn/lpd/filterdcp9055cdn brlpdwrapperdcp9055cdn

@stefan-langenmaier
Copy link
Owner

I'm not sure that I understood the error correctly, but I changed the filter in the ebuild.
Again, I would appreciate your feedback as I cannot test it.

@madImpulse
Copy link
Author

I hope my approach is not too quick and dirty, but it works for me like this if I change the src_install in the ebuild:

src_install() {
    MODEL="dcp9055cdn"
    mkdir -p "${D}"usr/libexec/cups/filter || die
    mkdir -p "${D}"usr/share/cups/model/Brother || die
    cp -r usr "${D}" || die
    ( ln -s "${D}"usr/local/Brother/Printer/${MODEL}/lpd/filterdcp9055cdn "${D}"usr/libexec/cups/filter/brlpdwrapperdcp9055cdn ) || die

    ( ln -s "${D}"usr/local/Brother/Printer/${MODEL}/cupswrapper/${MODEL}.ppd "${D}"usr/share/cups/model/Brother/brother_${MODEL}_printer_en.ppd ) || die
}

To test I first deleted the directory /usr/local/Brother and the file /usr/libexec/cups/filter/brlpdwrapperdcp9055cdn

After emerging the modified ebuild. The printer still worked. It is not clear to me what the sed part is for in the original ebuild. If I'm lucky I manage to commit the modified ebuild...

@madImpulse
Copy link
Author

there was a typo in the sed command. created pull request #38

@stefan-langenmaier
Copy link
Owner

Hi and thanks for the work, I'll try to look into till Wednesday. Sorry I'm quite busy at the moment.

@madImpulse
Copy link
Author

madImpulse commented May 1, 2017 via email

@stefan-langenmaier
Copy link
Owner

stefan-langenmaier commented May 5, 2017 via email

@madImpulse
Copy link
Author

thanks. Now it works and I switched back to this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants