Forum
« How to rebuild a deb package without source »

Welcome Guest. Please Login or Register.
May 24, 2013, 10:54pm



Return to or visit the SalineOS webpage

Forum :: General :: Installation and Setup Support :: How to rebuild a deb package without source
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: How to rebuild a deb package without source (Read 390 times)
toothandnail
Junior Member
**
member is offline





Joined: Aug 2011
Gender: Male
Posts: 71
 How to rebuild a deb package without source
« Thread Started on Apr 21, 2012, 8:26pm »

:) I've just converted someone else to SalineOS. Works well, except for one small problem - a Canon multi-function printer/scanner.

Cups recognizes the device, but it won't print. I then found Linux drivers (in a .deb package) on the Canon site, but can't install them due to a dependency problem. After a bit of hunting, I've discovered that the problem is Canon hasn't updated the drivers in a while. The dependency at fault is to libcupsys2, which has been replaced by libcups, quite a while ago so far as I could discover.

So, the problem. I have the drivers, which should work. But I can't install them because the install is looking for libcupsys. I don't have any source packages for the drivers, so I can't rebuild the packages in the normal way.

I can unpack the drivers and modify DEBIAN/control and the info file, but I have no idea how to repackage the drivers after doing so. Is it possible? If so, how do I do it?

:-[ I'm not even sure if I need to modify both DEBIAN/control and info....

Paul.
Link to Post - Back to Top  IP: Logged
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: How to rebuild a deb package without source
« Reply #1 on Apr 22, 2012, 1:48am »

Well assuming too much hasn't changed in the kernel and surrounding libraries all should be well, but I wouldn't hold my breath. The only way I would expect the package to work properly is if it uses dkms to build the driver. That said, modify the Debian control files as desired and then open a terminal and run this command:
dpkg-deb -b /path/package-directory

That will get you the desired package to try.
« Last Edit: Apr 22, 2012, 3:13am by Anthony Nordquist »Link to Post - Back to Top  IP: Logged
toothandnail
Junior Member
**
member is offline





Joined: Aug 2011
Gender: Male
Posts: 71
 Re: How to rebuild a deb package without source
« Reply #2 on Apr 22, 2012, 7:39pm »


Apr 22, 2012, 1:48am, Anthony Nordquist wrote:
Well assuming too much hasn't changed in the kernel and surrounding libraries all should be well, but I wouldn't hold my breath. The only way I would expect the package to work properly is if it uses dkms to build the driver. That said, modify the Debian control files as desired and then open a terminal and run this command:
dpkg-deb -b /path/package-directory

That will get you the desired package to try.


I realise there's a good chance the drivers won't work even if I can install them.

Thanks for the command. Its not working for me though - after altering the DEBIAN/control file, when I enter the command, this is what I get:

Code:
paul@saline:~$ dpkg-deb -b /hold/cnijfilter-common_3.00-1_i386
dpkg-deb: failed to open package info file `/hold/cnijfilter-common_3.00-1_i386/DEBIAN/control' for reading: No such file or directory


Tried it as root as well, tried changing the file attributes (they were set as read for owner, group, and world), but keep getting the same error.

Paul.

Link to Post - Back to Top  IP: Logged
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: How to rebuild a deb package without source
« Reply #3 on Apr 23, 2012, 4:03am »

Something is wrong with the path/directory, I am pretty sure anyway? Perhaps a typo? That is the only time I have come across that error message. Try opening a terminal in the "hold" directory you have there and do this:
ls ./

Highlight the folder name and copy + paste it with ./ appended to the start.
Link to Post - Back to Top  IP: Logged
toothandnail
Junior Member
**
member is offline





Joined: Aug 2011
Gender: Male
Posts: 71
 Re: How to rebuild a deb package without source
« Reply #4 on Apr 23, 2012, 3:41pm »


Apr 23, 2012, 4:03am, Anthony Nordquist wrote:
Something is wrong with the path/directory, I am pretty sure anyway? Perhaps a typo? That is the only time I have come across that error message. Try opening a terminal in the "hold" directory you have there and do this:
ls ./

Highlight the folder name and copy + paste it with ./ appended to the start.


:-[ That must have been it. I got lazy, used MC to insert the path, which fixed that. I did have all sorts of fun with the file permissions, but eventually got the .deb files rebuilt. I hope they were worth all the hassle....

I've installed them, should find out tomorrow if they work or not.

Paul.
Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]



Anthony Nordquist, on behalf of the SalineOS project, is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. As such, if you click the above banner and then make any purchase including digital downloads, a small percentage will be paid to the SalineOS project.
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile