Sponsored Content
Top Forums Shell Programming and Scripting Extracting/RePackaging Deb Package Post 302927481 by metallica1973 on Wednesday 3rd of December 2014 10:28:22 AM
Old 12-03-2014
Extracting/RePackaging Deb Package

Here is the original absolute file paths for a working deb package called
blah-amd64.deb:
Code:
dpkg-deb -c blah-amd64.deb |less
drwxr-xr-x root/root         0 2014-12-02 09:48 ./
drwxr-xr-x root/root         0 2014-12-02 09:48 ./usr/
drwxr-xr-x root/root         0 2014-12-02 09:48 ./usr/share/
drwxr-xr-x root/root         0 2014-12-02 09:48 ./usr/share/applications/
-rw-r--r-- root/root       301 2014-12-02 09:48 ./usr/share/applications/blah.desktop
drwxr-xr-x root/root         0 2014-12-02 09:48 ./usr/share/blah/
-rw-r--r-- root/root     17408 2014-01-21 16:53 ./usr/share/blah/blah.1

I extract it via:
Code:
dpkg-deb -x blah-amd64.deb .
dpkg-deb -e blah-amd64.deb ./DEBIAN

which extracts it to the current directory called
Code:
usr/

I make my modification to my file:
Code:
usr/share/blah/blah.1

and when I repackage blah-amd64.deb via:
Code:
sudo dpkg-deb -b . blah-amd64.deb

and look at the absolute paths:
Code:
dpkg-deb -c blah-amd64.deb |less
drwxr-xr-x root/root         0 2014-12-02 09:48 ./
drwxr-xr-x root/root         0 2014-12-02 09:48 ./applications/
-rw-r--r-- root/root       301 2014-12-02 09:48 ./applications/blah.desktop
drwxr-xr-x root/root         0 2014-12-02 09:48 ./blah/
-rw-r--r-- root/root     17408 2014-01-21 16:53 ./blah/blah.1

it changes the path to "/". I want to repackage it back to its original location so when the package is installed, it will install it in the correct path which is /usr/share/blah. Can someone shed some light on what is going on?

Last edited by metallica1973; 12-03-2014 at 12:06 PM..
 

7 More Discussions You Might Find Interesting

1. Linux

Can I let apt-get use prozilla to download deb

:thank (0 Replies)
Discussion started by: f33k4
0 Replies

2. UNIX for Advanced & Expert Users

binutills_2.15-4_i386.deb

Hai Friends I am using debian 2.2.19. The gcc version installed in my os is 2.95.2. I tried to update the gcc to 3.2.2. It asked me to update some packages and all the updations was success. But when i tried to update the binutills_2.15-4_i386.deb packes i encountered some error that it asked me... (3 Replies)
Discussion started by: collins
3 Replies

3. UNIX for Dummies Questions & Answers

Installing deb packages from Ubuntu Server CD

Hi, I have mounted the Ubuntu server edition 10.10 ISO on my server under a directory media/servercd. I would like to install some services from this. I edited the sources.list file to say: deb file:/media/servercd maverick main restricted and it's properly mounted but when I try... (1 Reply)
Discussion started by: shadowcat
1 Replies

4. UNIX for Advanced & Expert Users

How to find dependancies of .dstream package (Solaris) & .rpm package( linux)

Friends, Please let meknow, How we can find the dependancies of .dstream package & .rpm package before installation ? For AIX, We can use the inutoc . command to create the .toc file for the bff package, What about Solaris & Linux ? (0 Replies)
Discussion started by: yb4779
0 Replies

5. Shell Programming and Scripting

Script to extract all deb files in a fldr to respective folderstructures

Hi, since half an hour I currently try to write a script that will: 1) Extract every debian file in a directory 2) Extracts it to a folder that matches the debians filename 3) Extracts it so the structure looks like that: DEBIANFILENAME | -------------- DEBIAN ... (9 Replies)
Discussion started by: pasc
9 Replies

6. Ubuntu

Install deb from alternate usb

I installed a command-line system ubuntu 12.04 from usb and that's work. I don't have a internet connection so what I have to install must come from the alternate usb until I can let work my wireless. I mount the usb to /media/cdrom but when I do sudo apt-get install xorg , then he ask me for the... (3 Replies)
Discussion started by: thailand
3 Replies

7. Shell Programming and Scripting

> dpkg-deb to Extract and Reconstruct a Multipart Archive???

Greetings! Here's one which has been bugging me for a bit ;) As might be known, LibreOffice is available to some of us Linux folk as a large set of debs. Of course, being a curious sort, I'd like to dig in and recreate the original tree which is composed of these assorted archives. So, I... (1 Reply)
Discussion started by: LinQ
1 Replies
deb-old(5)							    dpkg suite								deb-old(5)

NAME
deb-old - old style Debian binary package format SYNOPSIS
filename.deb DESCRIPTION
The .deb format is the Debian binary package file format. This manual page describes the old format, used before Debian 0.93. Please see deb(5) for details of the new format. FORMAT
The file is two lines of format information as ASCII text, followed by two concatenated gzipped ustar files. The first line is the format version number padded to 8 digits, and is 0.939000 for all old-format archives. The second line is a decimal string (without leading zeroes) giving the length of the first gzipped tarfile. Each of these lines is terminated with a single newline character. The first tarfile contains the control information, as a series of ordinary files. The file control must be present, as it contains the core control information. In some very old archives, the files in the control tarfile may optionally be in a DEBIAN subdirectory. In that case, the DEBIAN subdirectory will be in the control tarfile too, and the control tarfile will have only files in that directory. Optionally the control tarfile may contain an entry for '.', that is, the current directory. The second gzipped tarfile is the filesystem archive, containing pathnames relative to the root directory of the system to be installed on. The pathnames do not have leading slashes. SEE ALSO
deb(5), dpkg-deb(1), deb-control(5). 1.19.0.5 2018-04-16 deb-old(5)
All times are GMT -4. The time now is 11:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy