LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 12:52 AM   #1
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 628

Rep: Reputation: 174Reputation: 174
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, 03:10 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 07:35 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

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


Reply

Tags
debian, packaging, system



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 11:56 AM
Linux 2.6.20 deb package available nx5000 Debian 4 02-09-2007 03:08 AM
the last installed deb package, how ? ag2uki Debian 7 08-15-2005 07:44 AM
NFS DEB Package? Al Hawley MEPIS 3 07-11-2005 10:16 AM
IPTABLES how to add/edit/delete rules in existing chain? debug019 Linux - Newbie 1 11-11-2004 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration