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.
| |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | 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.
| |
|
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.
| |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | 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.
| |
|
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.
| |
|