LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Which is better to convert to use on Slackware... (https://www.linuxquestions.org/questions/slackware-14/which-is-better-to-convert-to-use-on-slackware-4175451490/)

irgunII 02-24-2013 07:22 AM

Which is better to convert to use on Slackware...
 
a .deb or an .rpm?

I just ordered a Brother printer (HL2280DW), and Brother supplies drivers for linux but only as .deb or .rpm

I just remembered about rpm2tgz but can't remember for the life of me if there's a way to change a deb to a tgz so I can install it on my Slackware 14 system.

knudfl 02-24-2013 07:26 AM

Debian package to tgz :

$ ar -x <package.deb> && mv data.tar.gz <name>.tgz

D1ver 02-24-2013 07:37 AM

I'm pretty sure you can use src2pkg on either .dep and .tgz to create a slackware package.

gnashley 02-24-2013 08:23 AM

D1ver, you are right. Using src2pkg to convert rpm or deb packages will not ensure that the programs run on Slackware, but it will at least avoid borking your system due to bad perms or permissions.

irgunII 02-24-2013 11:34 AM

Thanks guys. I also kept looking and looking and eventually found this - deb2tgz. It's 5 years old, here's the website http://code.google.com/p/deb2tgz/downloads/list

I'll try src2pkg first...just because it's a stock install (isn't it?) than the deb2pkg thing.

Heh...nope, I see it isn't. Got it now and installing it to see how it'll do.

knudfl 02-24-2013 12:07 PM

Actually "deb2tgz" is as primitive as $ ar -x <package.deb> && mv data.tar.gz <name>.tgz

deb2tgz, line 105 : mv $TMPDIR/data.tar.gz $(basename $i .deb).tgz


Why not use the suggested src2pkg : Very easy to install ..
http://distro.ibiblio.org/amigolinux...8-noarch-1.txz
> src2pkg-2.8-noarch-1.txz

-

kikinovak 02-24-2013 12:16 PM

Quote:

Originally Posted by irgunII (Post 4898611)
a .deb or an .rpm?

I just ordered a Brother printer (HL2280DW), and Brother supplies drivers for linux but only as .deb or .rpm

I just remembered about rpm2tgz but can't remember for the life of me if there's a way to change a deb to a tgz so I can install it on my Slackware 14 system.

I regularly setup Brother printers using their RPM drivers on Slackware.

Here's my own little HOWTO on the subject (scroll down a bit):

http://www.microlinux.fr/slackware/L...CUPS-HOWTO.txt

If you install it on Slackware64, be sure to install the basic set of Multilib packages.

Cheers,

Niki

w1k0 02-24-2013 12:42 PM

irgunII,

I own Brother HL-5340D printer. I tried both DEB and RPM drivers with it and there’s no difference. Finally I decided to use PPD driver (the text one). Unfortunately Brother doesn’t offer PPD driver for your HL-2280DW but you could try the PPD driver provided for the similar printer such as HL-4070CDW:

http://welcome.solutions.brother.com...nload_prn.html

***

By the way: are you willing to perform some font tests using your Brother laser printer? My printer causes some problems with GNU FreeFont family. I tested that a lot and described these problems here and there. I could provide you the test file. To perform the test it’s enough to install GNU FreeFont, print the file, and evaluate the results.

dugan 02-24-2013 01:32 PM

RPMs can be installed directly. Just use Slackware's included RPM with --nodeps.

allend 02-24-2013 04:19 PM

This is what worked for me with a Brother MFC-J825DW printer/scanner.
http://docs.slackware.com/howtos:har...r_installation

Cultist 02-24-2013 06:52 PM

A little off topic to your original question, but if you have no luck with installing it as a package, this thread might help you: http://www.linuxquestions.org/questi...h-cups-846633/

I had a problem installing printer drivers for a Brother printer, and ended up managing it with the ppd file instead.

irgunII 02-25-2013 12:09 AM

Wow! Thanks for all the tips and help folks! What a great place, heh!

@w1k0 - Once I have the printer here and actually have it running (supposed to get here Monday), I'll get the font you're talking about and let you know when I'm ready to test it...so long as it's not going to eat a buttload of paper or toner (I'm a monetarily poor SoB and this printer was a 'splurge' and that's because I was able to get it at half price, heh. I still have yet to get some paper also...and a usb cable as I'm not too comfortable with the network setup stuff...unless networkmanager will see it automagically for me and set it up for me when I plug in an ethernet cable).

And just in case anyone coming by and reading all this and asking themselves why get a Brother if it's not nearly as easy to get up-and-running as, say an HP of some kind - it's because I've read nothing but good reports about Brother printers lasting forever and working well. Every other company I've read about (well, not 'every', but many) makes nothing but throw-away stuff. I used to like Epson for their work with Linux, but the price of inkjet and the things just falling apart after a year or two just couldn't be afforded by me anymore. Hell, I've got an old Epson Stylus C86 sitting in the closet right now that I don't know what to do with, heh.

allend 02-25-2013 12:27 AM

Quote:

and a usb cable as I'm not too comfortable with the network setup stuff.
If you have a spare port in your router, then I suggest using a network connection, as it is likely to be less troublesome than a USB connection. There have been some fun and games in the past with udev rules for USB connections.
There was a thread in the Hardware forum recently where someone was trying to get a Brother printer working using a USB connection. After much discussion it was found that the user was using a USB 3 port, which was not working with the printer on the hardware being used.

Personally, I like Brother devices (I am on my second), as they provide good Linux support and I have received very quick, courteous and knowledgeable responses when I have emailed queries.

irgunII 02-25-2013 11:40 AM

Quote:

Originally Posted by allend (Post 4899058)
If you have a spare port in your router, then I suggest using a network connection, as it is likely to be less troublesome than a USB connection. There have been some fun and games in the past with udev rules for USB connections.
There was a thread in the Hardware forum recently where someone was trying to get a Brother printer working using a USB connection. After much discussion it was found that the user was using a USB 3 port, which was not working with the printer on the hardware being used.

Personally, I like Brother devices (I am on my second), as they provide good Linux support and I have received very quick, courteous and knowledgeable responses when I have emailed queries.

Oh...hmmm...my router is in another room, too far for me to get a cable to it, thus, it's wireless. D'you think it will still be less trouble than a usb cable? If I can get it to work wireless, the other person in the house hopefully won't be pestering me nearly as often to 'borrow' the printer when I get it (and she's one of those idiots who thinks a question mark in the middle of a white web page needs to be printed...or in other words, whole forests have been persecuted during the time she used to own her own printer several years back :( but she'll learn real quick that that crap isn't going to happen on *my* printer...I'm not a nice person and PC and me are like cats and mice). <BEG>

irgunII 02-25-2013 04:36 PM

Okay...got the printer to print (I had to go get a USB cable and it actually worked...the network cable on the ethernet was just too confusing and was working nor was the wireless even though the printer itself got on the wireless setup).

The problem I'm having now is I can't get it to scan. I've installed the brscanner things and done everything on all the pages you guys have shown me to read.

The only thing left I want to try is this:

#brsaneconfig4 -a name=SCANNER model=HL-2280DW ip=

Only I don't know how to get the ip address for the printer. Any ideas? Remember, it's usb connected.

allend 02-25-2013 04:41 PM

I initially tried using wireless with my Brother, and it worked, but I had problems with getting the connection re-established after the router had been power cycled. I suspect that this is my hardware. I have found that if my router (set to use WPA2 only) receives an initial attempted connection using WPA, it then refuses to accept a subsequent WPA2 connection. YMMV.

People who persecute forests need to be taught/forced to use virtual pdf printers.

allend 02-25-2013 04:55 PM

Quote:

The only thing left I want to try is this:

#brsaneconfig4 -a name=SCANNER model=HL-2280DW ip=
If you are using USB, you do not want the network scanning entry

On scanning, a few things to check.
Is your user a member of the lp group? (Your user also used to need to be a member of the scanner group, but I believe that is obseleted.) Perhaps try as root, in case there is a permissions isssue.
Does 'scanimage -L" show the scanner?
Is there an entry at the end of /etc/sane.d/dll.conf for your device? (e.g. brother2, brother3, brother4)

How did you actually install the drivers?

allend 02-25-2013 05:10 PM

Just had another thought. With my device the scanning software (xsane, skanlite) defaulted to using '24bit Color[Fast]' as the scan mode. This did not work for me. Use '24bit Color' instead.

irgunII 02-25-2013 08:50 PM

Quote:

Originally Posted by allend (Post 4899603)
If you are using USB, you do not want the network scanning entry

On scanning, a few things to check.
Is your user a member of the lp group? (Your user also used to need to be a member of the scanner group, but I believe that is obseleted.) Perhaps try as root, in case there is a permissions isssue.
Does 'scanimage -L" show the scanner?
Is there an entry at the end of /etc/sane.d/dll.conf for your device? (e.g. brother2, brother3, brother4)

How did you actually install the drivers?

Yes, I'm a member of lp and scanner.

#scanimage -L shows:

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate).

Nothing in /etc/sane.d/dll.conf for brother anything.

I downloaded the brscan-skey-0.2.4 and brscan4-o.4.1 rpm's, did src2pkg on each one then did installpkg on each one.

Okay, your last question made me go back and look at what I'd done. Apparently changing them to slackware packages screws something up, so, I installed them like plain ol' rpm's with #rpm -ivh --nodeps blah.rpm and now I have a scanner, although xsane froze up on me when I clicked 'preview'. Skanlite seemd to work okay though, so I'll mess with it some more and see what's going on.

Thanks a million allend and everyone else!

irgunII 02-25-2013 09:00 PM

Allright, I don't know why xsane froze a little bit ago, but it worked this time. Looks like I've got a nice printer/scanner going for me now. Y'all are the best and I sure do appreciate the time you spent helping me. Thanks again.

allend 02-25-2013 11:57 PM

Quote:

I installed them like plain ol' rpm's with #rpm -ivh --nodeps blah.rpm
I had hoped you would have used the technique from the SlackDocs page. I have been wanting a guinea pig for that!

Just goes to show there is more than one way to skin a cat. Glad you got it working!

ruario 02-26-2013 06:45 AM

Quote:

Originally Posted by knudfl (Post 4898616)
Debian package to tgz :

Code:

$ ar -x <package.deb> && mv data.tar.gz <name>.tgz

You could do it in one step with either:

Code:

$ ar p packagename.deb data.tar.gz > packagename.tar.gz
or:

Code:

$ bsdtar xOf packagename.deb data.tar.gz > packagename.tar.gz
(Note: All three of the above have the issue that data.tar could and often is, compressed with different methods however!)

It is no harder with rpms, just use bsdtar (provided by libarchive, which many apps depend on) to convert the internal cpio into a gzip compressed tar:

Code:

$ bsdtar czf packagename.tgz @packagename.rpm
Whilst these types of tricks are kinda neat and fun they are not particularly good because the internal formatting of the tar package with regards to directory naming will be wrong, i.e. './' is found in front of all subdirectories. Slackware uses GNU Tar 1.13 in its package tools, hence the difference in formating. A further issue is that tar 'packages' made with methods other than makepkg may contain symlinks, which is not allowed within Slackware packages.

So really you shouldn't do these kinds of tricks at all but rather open the packages and then recreate the out tar contained again with makepkg. By the time you have gone to this level of effort you might as well write a simple SlackBuild or just use a dedicated tool like src2pkg.

Quote:

Originally Posted by dugan (Post 4898789)
RPMs can be installed directly. Just use Slackware's include RPM with --nodeps.

I have done this occasionally but it is pretty ugly and generally not recommended. At the very least the user should inspect the rpm post install/uninstall scripts first to make sure they don't do anything nasty!

ruario 02-26-2013 06:54 AM

Quote:

Originally Posted by ruario (Post 4900004)
At the very least the user should inspect the rpm post install/uninstall scripts first to make sure they don't do anything nasty!

You can do this as follows:
Code:

rpm -q --scripts -p packagename.rpm
Actually I would also look at files that would be installed as well to make sure the rpm doesn't overwrite anything it shouldn't!
Code:

rpm -qlp packagename.rpm
Of course, by the time you have done a proper inspection and satisfied yourself that this won't blow up in your face you could have created a real Slackware package, so I'll again stress that this is generally a bad idea in any case.

allend 02-26-2013 06:56 AM

Quote:

So really you shouldn't do these kinds of tricks at all but rather open the packages and then recreate the out tar contained again with makepkg. By the time you have gone to this level of effort you might as well write a simple SlackBuild or just use a dedicated tool like src2pkg.
Which is why I suggest using 'rpm2txz', an existing tool in Slackware.

I also agree that installing rpm's directly is not good practice. Far better to convert to a native Slackware package and install that. Then it is easy to uninstall if required.

Quote:

At the very least the user should inspect the rpm post install/uninstall scripts first to make sure they don't do anything nasty!
A point made in the 'rpm2txz' script and emphasised on the SlackDocs page.

ruario 02-26-2013 07:37 AM

Quote:

Originally Posted by allend (Post 4900008)
Which is why I suggest using 'rpm2txz', an existing tool in Slackware.

Sure, I just picked src2pkg because it is a bit for powerful, e.g. also handling debs and because it has so many fans here at LQ but I'm not disagreeing with you and rpm2txz is certainly far better than installing a random tar that was not designed for Slackware.

Quote:

Originally Posted by allend (Post 4900008)
I also agree that installing rpm's directly is not good practice. Far better to convert to a native Slackware package and install that. Then it is easy to uninstall if required.

Indeed, for my own part I generally don't bother with rpm2txz or src2pkg but rather knock up a quick dedicated SlackBuild for that application I want to convert. This ensures the internal layout is exactly as it should be (e.g. usr/{man,doc} rather than /usr/share/{doc,man}) and the slack-desc is informative and useful to me later. SlackBuilds for deb/rpm package conversion are generally pretty easy to knock out quickly. On the other hand I certainly understand the convenience of tools like rpm2txz and src2pkg for quick conversion and get why they are so popular.

gnashley 02-26-2013 11:48 AM

Uh, src2pkg does a lot of checks and corrections on the content before creating the archive. None of the other tools mentioned here do that. I'm just now working on a new tool which duplicates the content-checking steps of src2pkg -but without actually making any corrections.

irgunII 02-26-2013 03:10 PM

I tried src2pkg with the rpm's and installed those packages and they didn't work.

@allend - I *thought* I'd done that on the slackdocs site, but could have missed it trying all the other suggestions. I'd *much* rather have prefered that a slackware package been installed than have done the rpm thing. Maybe there's a way to 'uninstall' that rpm and try the pkg2txz thing?

<later>...I just tried rpm -e brscan4xxx.rpm and I got back that it's not installed. Didn't think to try a scan right then and instead did the rpm2txz on the rpm and installed that and my scanner is still(?) working, but I can't say if it's from the installed rpm or from the installed txz. :(

irgunII 02-26-2013 04:14 PM

@w1k0 - Which GNU Freefont should I download and install, the ttf, otf, sfd?

Next, how should I use these in your test? Would using kate be okay by just changing the font it uses to the Freefont and printing your test?

Let me know and send the test too.

allend 02-26-2013 04:45 PM

Quote:

Uh, src2pkg does a lot of checks and corrections on the content before creating the archive. None of the other tools mentioned here do that.
For the specific task at hand, i.e. installing driver packages from Brother, then rpm2txz is OK for use when called with:
Code:

  -S    extracts the install scripts to be executed on package installation
          (only pre-install and post-install scripts used)
          USE WITH CAUTION!
  -n    name the output package using the rpm's metadata
  -d    attempt a wellformed slack-desc from the rpm meta data
  -c    reset all directory permissions to 755 and ownership to root:root.

The Brother rpm packages can be successfully converted using this technique, but the user should check the resulting doinst scripts in the packages.
Another thing that none of these techniques will do is create a symlink (ln -s /etc/rc.d/rc.cups /etc/init.d/cups). This allows the Brother install scripts to stop and start the CUPS daemon during the package install.

Quote:

instead did the rpm2txz on the rpm and installed that and my scanner is still(?) working, but I can't say if it's from the installed rpm or from the installed txz.
Installing the package will have overwritten what was already installed.

w1k0 02-26-2013 07:08 PM

irgunII,

the problem that I encountered is complicated so I described it in the separate thread: Brother laser printer and GNU FreeFont.

Your printer isn’t PostScript one but I think it’s good idea to test GNU FreeFont using some non-PostScript laser printer made by Brother as well. So if you’re still willing to perform the test I’m inviting you to the mentioned thread.


All times are GMT -5. The time now is 07:24 PM.