Go Smart with REAR (pRay, rEad, leArn, tRy)

10/06/2013

MODIFYING PACKAGES ON UBUNTU BACKBOX

3:27 AM Posted by Vandaime No comments


Enable the source code repository :
cr45h@tr45h:~$ sudo nano /etc/apt/sources.list.d/backbox-two-natty.list

Add the following string :
deb-src http://ppa.launchpad.net/backbox/two/ubuntu natty main

In our example we’ll customize the weevely tool. Type on terminal the following commands :
cr45h@tr45h:~$ sudo apt-get update
cr45h@tr45h:~$ apt-get source weevely

After few seconds in your directory you’ll find the subsequent files :
weevely_0.5-0backbox1.diff.gz
weevely_0.5-0backbox1.dsc
weevely_0.5.orig.tar.gz

And the source folder :
cr45h@tr45h:~$ ls weevely-0.5

After making the necessary changes, before creating the new deb archive, the installation of some packets is needed :
cr45h@tr45h:~$ sudo apt-get install devscripts

Open the "debian/control" file and check the compilation needed dependences, in the example examined :
[...]
Build-Depends: debhelper (>= 7)
[...]

After this check type on terminal :
cr45h@tr45h:~$ sudo sudo apt-get install debhelper

Now the new packet creation is possible :
cr45h@tr45h:~$ cd weevely-0.5
cr45h@tr45h:~/weevely-0.5$ debuild binary

Otherwise, if preferred, create the debian source to be uploaded on the Launchpad repository :
cr45h@tr45h:~/weevely-0.5$ debuild clean
cr45h@tr45h:~/weevely-0.5$ debuild -S
cr45h@tr45h:~/weevely-0.5$ cd ..
cr45h@tr45h:~$ dput ppa:user/ppa-name weevely_0.5-0backbox1_source.changes

0 comments:

Post a Comment