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
DH_BUILDDEB(1)							     Debhelper							    DH_BUILDDEB(1)

NAME
       dh_builddeb - build Debian binary packages

SYNOPSIS
       dh_builddeb [debhelperoptions] [--destdir=directory] [--filename=name] [--params]

DESCRIPTION
       dh_builddeb simply calls dpkg-deb(1) to build a Debian package or packages.  It will also build dbgsym packages when dh_strip(1) and
       dh_gencontrol(1) have prepared them.

       It supports building multiple binary packages in parallel, when enabled by DEB_BUILD_OPTIONS.

       When the Rules-Requires-Root field is not (effectively) binary-targets, dh_builddeb will pass --root-owner-group to dpkg-deb(1).

OPTIONS
       --destdir=directory
	   Use this if you want the generated .deb files to be put in a directory other than the default of "..".

       --filename=name
	   Use this if you want to force the generated .deb file to have a particular file name. Does not work well if more than one .deb is
	   generated!

       -- params
	   Pass params to dpkg-deb(1) when it is used to build the package.

       -uparams
	   This is another way to pass params to dpkg-deb(1).  It is deprecated; use -- instead.

SEE ALSO
       debhelper(7)

       This program is a part of debhelper.

AUTHOR
       Joey Hess <joeyh@debian.org>

11.1.6ubuntu2							    2018-05-10							    DH_BUILDDEB(1)
All times are GMT -4. The time now is 05:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy