Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] rpm preserver file permission when extracting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Thu May 04, 2017 2:53 am    Post subject: [SOLVED] rpm preserver file permission when extracting Reply with quote

I was installing Brother printer driver on Gentoo (via rpm) this is the only available option I had.
http://support.brother.com/g/b/downloadhowto.aspx?c=us&lang=en&prod=hll5200dw_us_eu_as&os=127&dlid=dlf102556_000&flang=4&type3=560
Code:
rpm  -ihv  --nodeps  (lpr-drivername)
rpm  -ihv  --nodeps  (cupswrapper-drivername)


It worked OK but I've noticed the rpm change ownership of "usr" "var" and "opt" in "/" dir.
from example:
drwxr-xr-x 15 root root 4096 Sep 10 2014 usr

to:
drwxr-xr-x 15 thelma users 4096 Sep 10 2014 usr

Anybody know how to prevent it, or force it to use "root:root"


Last edited by Joseph_sys on Thu May 04, 2017 7:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Thu May 04, 2017 6:42 am    Post subject: Reply with quote

Try this ebuild (hll5200dw-3.2.0.ebuild):
Code:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit rpm

DESCRIPTION=""
HOMEPAGE=""
SRC_URI="http://download.brother.com/welcome/dlf102556/${PN}cupswrapper-${PV}-1.i386.rpm
   http://download.brother.com/welcome/dlf102555/${PN}lpr-${PV}-1.i386.rpm"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

S="${WORKDIR}"

src_install() {
   insinto /etc
   doins -r etc/*

   insinto /opt/brother/Printers/HLL5200DW
   doins -r opt/brother/Printers/HLL5200DW/{cupswrapper,inf}

   exeinto /opt/brother/Printers/HLL5200DW/lpd
   doexe opt/brother/Printers/HLL5200DW/lpd/{brprintconflsr3,filter_HLL5200DW,rawtobr3}
   
   insinto /var
   doins -r var/*
}


There are only i386 drivers? 64bit version is not available?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Thu May 04, 2017 3:44 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Try this ebuild (hll5200dw-3.2.0.ebuild):
Code:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit rpm

DESCRIPTION=""
HOMEPAGE=""
SRC_URI="http://download.brother.com/welcome/dlf102556/${PN}cupswrapper-${PV}-1.i386.rpm
   http://download.brother.com/welcome/dlf102555/${PN}lpr-${PV}-1.i386.rpm"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

S="${WORKDIR}"

src_install() {
   insinto /etc
   doins -r etc/*

   insinto /opt/brother/Printers/HLL5200DW
   doins -r opt/brother/Printers/HLL5200DW/{cupswrapper,inf}

   exeinto /opt/brother/Printers/HLL5200DW/lpd
   doexe opt/brother/Printers/HLL5200DW/lpd/{brprintconflsr3,filter_HLL5200DW,rawtobr3}
   
   insinto /var
   doins -r var/*
}


There are only i386 drivers? 64bit version is not available?


Thanks, I'll try it. Where did you get that ebuild? I need to structure it correctly in /usr/local/portage

Code:
ebuild /usr/local/portage/overlay/brother/hll5200dw-3.2.0.ebuild manifest
ebuild: /usr/local/portage/overlay/brother/hll5200dw-3.2.0.ebuild: does not seem to have a valid PORTDIR structure
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Thu May 04, 2017 7:18 pm    Post subject: Reply with quote

You need to create this structure
Code:
# mkdir -p /usr/local/portage/net-print/hll5200dw

and then create file hll5200dw-3.2.0.ebuild
Code:
# ebuild /usr/local/portage/net-print/hll5200dw/hll5200dw-3.2.0.ebuild manifest

For create local overlay use this guide.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Thu May 04, 2017 7:34 pm    Post subject: Reply with quote

fedeliallalinea wrote:
You need to create this structure
Code:
# mkdir -p /usr/local/portage/net-print/hll5200dw

and then create file hll5200dw-3.2.0.ebuild
Code:
# ebuild /usr/local/portage/net-print/hll5200dw/hll5200dw-3.2.0.ebuild manifest

For create local overlay use this guide.


Thank you! Yes, that worked.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Thu May 04, 2017 10:35 pm    Post subject: Reply with quote

fedeliallalinea wrote:
You need to create this structure
Code:
# mkdir -p /usr/local/portage/net-print/hll5200dw

and then create file hll5200dw-3.2.0.ebuild
Code:
# ebuild /usr/local/portage/net-print/hll5200dw/hll5200dw-3.2.0.ebuild manifest

For create local overlay use this guide.


Correction, the ebuild installation worked perfectly but the printer didn't work, I got some kind of "filter error".
However, following installation instruction from Gentoo Wiki (RPM instruction) worked perfectly, no error message and the file ownership wasn't had not change at all.
https://wiki.gentoo.org/wiki/Brother_networked_printer#Alternative:_rpm_installation
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Fri May 05, 2017 5:56 am    Post subject: Reply with quote

You have tried with brother-overlay?
I looked the ebuilds and all depend on net-print/brother-genml1-bin, then
Code:
# layman -f -a brother-overlay
# emerge net-print/brother-genml1-bin

not sure if work but you can try
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Fri May 05, 2017 1:04 pm    Post subject: Reply with quote

fedeliallalinea wrote:
You have tried with brother-overlay?
I looked the ebuilds and all depend on net-print/brother-genml1-bin, then
Code:
# layman -f -a brother-overlay
# emerge net-print/brother-genml1-bin

not sure if work but you can try


Thanks for the reply. I've already installed the one via rpm besides this ebuild is only ~x86 and I have only one old system ~x86 all others are amd64.
Brother recommanded using their sh script "linux-brprinter-installer" currently version (linux-brprinter-installer-2.1.1-1.gz) but I don't want to mess with it any more.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum