LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-14-2010, 01:52 AM   #1
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Testing/Unstable
Posts: 121

Rep: Reputation: 23
Question Is it possible to edit an existing *.deb package?


This is a general *.deb package question, although the package in question happens to be a kernel package. There is all kinds of info on building a *.deb file from scratch, but I can't seem to find any info on editing an existing *.deb file.

Background:

I built a customized Debian kernel via make-kpkg, it produced a *.deb that I installed via dpkg. However, I noticed that I fat-fingered the "--version" parameter on the command-line, so I deleted the *.deb and recompiled with a proper "--version".

Question:

Looking back, would it have been feasible to un-archive the *.deb, edit the "control" file to change the version, re-archive the *.deb and install it?
It seems to me that this may not have worked, since I am assuming (hoping) that such messing around with a Debian package would cause dpkg a problem.
 
Old 06-14-2010, 04:10 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,526

Rep: Reputation: 1217Reputation: 1217Reputation: 1217Reputation: 1217Reputation: 1217Reputation: 1217Reputation: 1217Reputation: 1217Reputation: 1217
A deb file is just an ar archive. So, if you really want to mess around with it you can "ar x" it, edit some files, and then "ar c" it back together again. Whether or not this will cause problems with the package depends on exactly what you change. I suspect that in this instance there would be a large number of both text and binary files (not just the control file) that contain that version string and as such I would expect problems.

So, rerunning make-kpkg was probably the best thing to do.

Cheers,

Evo2.
 
Old 06-14-2010, 08:35 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Get a .deb file, unpack it with the ar utility (ar, not tar) and see what's inside!
 
  


Reply

Tags
debian, packaging, system


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to edit existing Makefile for a new folder that im adding kaumudi Linux - Newbie 1 02-07-2009 12:56 PM
Linux 2.6.20 deb package available nx5000 Debian 4 02-09-2007 04:08 AM
the last installed deb package, how ? ag2uki Debian 7 08-15-2005 08:44 AM
NFS DEB Package? Al Hawley MEPIS 3 07-11-2005 11:16 AM
IPTABLES how to add/edit/delete rules in existing chain? debug019 Linux - Newbie 1 11-11-2004 03:48 PM


All times are GMT -5. The time now is 08:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration