Re: problem with packaging
jean <email@example.com> writes:
> i'm trying to create a package for sarge (it is my first experience in
> packet creation ), i tried to do this from an existing packet, i have
> decompacted the packet, i modified some things, and i re-packaged the
> folder. i begin to understand scripts like preinst,prerm ect...
> i created my package with : dpkg-deb -b
> in my folder, there is the program with his filesystem hierarchy ( var
> usr etc ) + DEBIAN folder
You should fetch the source of the package and not unpack the
binary. You can run "apt-get source <package>" if you have a deb-src
entry in your /etc/apt/sources.list, e.g. 'deb-src
http://ftp.debian.org/debian sarge main'.
You then change the source to your liking and then just run "debuild"
(from devscripts) inside the source dir to build the package. Don't
forget to document your changes, easiest done with "dch" or "dch -i"
to create a new version.
For details you should read the packaging manual and policy from
> i have a problem to understand, during the packet installation, how
> the dpkg -i copy files witch are in the .deb in the filesystem of the
> computer . witch files allows us to configure this copy ?
On the first install dpkg first unpacks the maintainer scripts into a
temporary position and runs the preinst script, then in unpacks the
data of the package as is and finishes by running the postinst
script. On updates the behaviour is similar except that the old
packages *rm script also get called. Again, for details please refer
to the packaging manual and policy.
Th preinst and postinst scripts can modify files or run commands. But
normaly they may not modify any file that is contained in the
deb. They can create new files but then they have to clean them up on
removal too. Most comonly this would be for configfiles and using ucf
to handle updating those is a good idea. Note that changes made to
configfiles by the admin must be preserved accross updates if
possible and should never silently be undone. Ucf takes care of
handling that nicely.
> in order to make my package i used this tutorial :
This isn't a tutorial for packaging but one to hack the control file
of an existing package, from what I understand of the french.
A simpler way of doing the same would be (from memory)
deb-reversion -k /bin/sh /opt/downloads/skype_126.96.36.199-1_i386.deb
% gvim skype_188.8.131.52-1_i386/DEBIAN/control
> thanks if somebody can helps me
> regards, sorry for my poor english