| View previous topic :: View next topic |
| Author |
Message |
Doctore Xandrosianschwing
Joined: 13 Jun 2006 Posts: 2697 Location: Finland
|
Posted: Tue Apr 10, 2007 5:04 pm Post subject: HOW to "HACK" .deb FILES ? |
|
|
Want to "hack" (= do my own changes) to some specific .deb files.
Its about KDE konfiguration, so it can be done automatically during install.
of applications. How and what do I need to do this?
Doctore |
|
| Back to top |
|
 |
Arne Anka Xanspiration

Joined: 21 Mar 2004 Posts: 4186 Location: Stockholm, Sweden
|
Posted: Tue Apr 10, 2007 5:15 pm Post subject: |
|
|
To extract:
| Code: | dpkg-deb -x <file> <dir>
dpkg-deb -e <file> <dir>/DEBIAN |
Before repacking the DEB it can be a good idea to update the DEBIAN/md5sum file with a new md5sum for the files you have changed.
To repack:
| Code: | | dpkg-deb -b <dir> <file> |
Example:
| Code: | dpkg-deb -x libc6_2.3.6.ds1-13_i386.deb libc6_2.3.6.ds1-13_i386
dpkg-deb -e libc6_2.3.6.ds1-13_i386.deb libc6_2.3.6.ds1-13_i386/DEBIAN
cd libc6_2.3.6.ds1-13_i386
find . -name '*' -exec md5sum {} \; 2> /dev/null | grep -v DEBIAN > DEBIAN/md5sums
dpkg-deb -b libc6_2.3.6.ds1-13_i386 libc6_2.3.6.ds1-13_i386.deb |
Last edited by Arne Anka on Wed Apr 11, 2007 9:22 am; edited 1 time in total |
|
| Back to top |
|
 |
redrum Xandros Community Moderator

Joined: 05 Apr 2004 Posts: 2765 Location: Rapid City, South Dakota
|
Posted: Wed Apr 11, 2007 3:53 am Post subject: |
|
|
Arne Sez, to make a new md5sum, Type:
| Arne Anka wrote: |
| Code: |
find . -name '*' -exec md5sum {} \; 2> /dev/null | grep -v DEBIAN > DEBIAN/md5sums |
|
_________________
Beware of the man who would deny you access to information,
for in his heart he dreams himself your master. |
|
| Back to top |
|
 |
Arne Anka Xanspiration

Joined: 21 Mar 2004 Posts: 4186 Location: Stockholm, Sweden
|
Posted: Wed Apr 11, 2007 9:19 am Post subject: |
|
|
Thanks Redrum for that addition.
Also you have to stand in the package directory when you run the command (see updated example in my first post). |
|
| Back to top |
|
 |
Doctore Xandrosianschwing
Joined: 13 Jun 2006 Posts: 2697 Location: Finland
|
Posted: Fri Apr 13, 2007 5:19 am Post subject: |
|
|
"Thousands of thanks", Arne Anka and redrum.
Did some tests today and those worked well .
Next lession is lerning how to compile DEBS .
Feel free teaching...
Doctore |
|
| Back to top |
|
 |
geekydude Xandrosianschwing
Joined: 29 May 2005 Posts: 2513 Location: Portland, OR
|
Posted: Fri Apr 13, 2007 6:23 pm Post subject: |
|
|
| Doctore wrote: | "Thousands of thanks", Arne Anka and redrum.
Did some tests today and those worked well .
Next lession is lerning how to compile DEBS .
Feel free teaching...
Doctore |
Yes....
Questions:
1.) Is a .dsc or .diff file required to build a deb?
2.) How do I change the installation path of a deb I extracted and want to rebuild?
For example: I get a file that installs into /opt, and I want to install it into /usr/apps....
How do I make it change to my path? _________________ geekydude
registered Linux user number 410045.
The source will be with you...always.... |
|
| Back to top |
|
 |
Arne Anka Xanspiration

Joined: 21 Mar 2004 Posts: 4186 Location: Stockholm, Sweden
|
Posted: Sat Apr 14, 2007 11:03 am Post subject: |
|
|
| geekydude wrote: | | 1.) Is a .dsc or .diff file required to build a deb? |
No, but if you build from source (not binary) it can be a good idea to have them for at least two reasons:
1. People can build DEBs from source using apt-get and dpkg-source.
2. When a new version of the source is released you can most often just reapply the .diff file instead of debianize the source one more time, which can be pretty time consuming depending on how much changes you have added.
| geekydude wrote: |
2.) How do I change the installation path of a deb I extracted and want to rebuild?
|
Just rename the directory in the extracted package. If it says "usr", just rename it to opt and it will install it in /opt rather than /usr. You should however be aware that some apps are configured at compile time where to look for file. If you change the installation directory, the app may fail to function after installation. In other cases some config file may need to be change for the app to work properly. |
|
| Back to top |
|
 |
geekydude Xandrosianschwing
Joined: 29 May 2005 Posts: 2513 Location: Portland, OR
|
Posted: Sat Apr 14, 2007 3:25 pm Post subject: |
|
|
| Arne Anka wrote: | | geekydude wrote: | | 1.) Is a .dsc or .diff file required to build a deb? |
No, but if you build from source (not binary) it can be a good idea to have them for at least two reasons:
1. People can build DEBs from source using apt-get and dpkg-source.
2. When a new version of the source is released you can most often just reapply the .diff file instead of debianize the source one more time, which can be pretty time consuming depending on how much changes you have added.
| geekydude wrote: |
2.) How do I change the installation path of a deb I extracted and want to rebuild?
|
Just rename the directory in the extracted package. If it says "usr", just rename it to opt and it will install it in /opt rather than /usr. You should however be aware that some apps are configured at compile time where to look for file. If you change the installation directory, the app may fail to function after installation. In other cases some config file may need to be change for the app to work properly. |
Thanks for answering this one for me, as this one had been the one that's really been causing grief.
If I make a deb from source, can I define the menu entry for it, or is that accomplished at compile time?
I want debs I build to go into the menus, as this is a very frustrating problem for newbies who do not know where to look for installed apps that are not in the menu.
Thanks for taking the time to "tutor" those of us who are trying to learn this stuff!  _________________ geekydude
registered Linux user number 410045.
The source will be with you...always.... |
|
| Back to top |
|
 |
Arne Anka Xanspiration

Joined: 21 Mar 2004 Posts: 4186 Location: Stockholm, Sweden
|
Posted: Sat Apr 14, 2007 3:35 pm Post subject: |
|
|
| geekydude wrote: | | If I make a deb from source, can I define the menu entry for it, or is that accomplished at compile time? |
If you refer to the Launch menu, then yes you can define the menu entry for your app. Just create a file with the extension ".desktop" and place it in /usr/share/applications (usr/share/applications in your extracted DEB). Its a normal text file and if you take a look at other desktop files you may get a clue how to configure your own for your specific app. |
|
| Back to top |
|
 |
redrum Xandros Community Moderator

Joined: 05 Apr 2004 Posts: 2765 Location: Rapid City, South Dakota
|
Posted: Sat Apr 14, 2007 3:55 pm Post subject: |
|
|
| geekydude wrote: |
For example: I get a file that installs into /opt, and I want to install it into /usr/apps....
How do I make it change to my path? |
Just wanted to save you some time if you are wanting to rebuild that domino package... I already tried it, and it doesn't work because some of the paths must be hardcoded in the build... It'll install of course, it just won't run...
I have a domino package almost ready, but it just allows the domino style and the entry for the domino window decoration is in the control panel, and it doesn't apply itself properly... It works fine on 3.5 of course... I may release my kde 3.5 overlay debs if people don't mind it breaking some stuff... I'll have to work further on that before I would release those into the wild... I am running KDE 3.5 right now, but I need to see if I can legally redistribute certain Xandros components before I go further on that. _________________
Beware of the man who would deny you access to information,
for in his heart he dreams himself your master. |
|
| Back to top |
|
 |
geekydude Xandrosianschwing
Joined: 29 May 2005 Posts: 2513 Location: Portland, OR
|
Posted: Sat Apr 14, 2007 4:50 pm Post subject: |
|
|
| redrum wrote: | | geekydude wrote: |
For example: I get a file that installs into /opt, and I want to install it into /usr/apps....
How do I make it change to my path? |
Just wanted to save you some time if you are wanting to rebuild that domino package... I already tried it, and it doesn't work because some of the paths must be hardcoded in the build... It'll install of course, it just won't run...
I have a domino package almost ready, but it just allows the domino style and the entry for the domino window decoration is in the control panel, and it doesn't apply itself properly... It works fine on 3.5 of course... I may release my kde 3.5 overlay debs if people don't mind it breaking some stuff... I'll have to work further on that before I would release those into the wild... I am running KDE 3.5 right now, but I need to see if I can legally redistribute certain Xandros components before I go further on that. |
Domino worked for me when I installed a theme that calls for Domino.
It had me move some files around. Maybe if I send you that info you can figure out how I got it to work on my Xandros premium system?
I'm very curious as to how I managed to get it to work (which seems to be by accident!).  _________________ geekydude
registered Linux user number 410045.
The source will be with you...always.... |
|
| Back to top |
|
 |
geekydude Xandrosianschwing
Joined: 29 May 2005 Posts: 2513 Location: Portland, OR
|
Posted: Sat Apr 14, 2007 4:54 pm Post subject: |
|
|
| Arne Anka wrote: | | geekydude wrote: | | If I make a deb from source, can I define the menu entry for it, or is that accomplished at compile time? |
If you refer to the Launch menu, then yes you can define the menu entry for your app. Just create a file with the extension ".desktop" and place it in /usr/share/applications (usr/share/applications in your extracted DEB). Its a normal text file and if you take a look at other desktop files you may get a clue how to configure your own for your specific app. |
You are making my day today...
I think I've learned much of the information that didn't make sense to me.  _________________ geekydude
registered Linux user number 410045.
The source will be with you...always.... |
|
| Back to top |
|
 |
|