[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: installing a patch



Emma Jane Hogbin said:
> Preamble:
> My system adminstrator for our debian servers says he's installed a patch
> I need for a specific piece of software. For some reason it doesn't work.
> (I emailed it to him as an attachment from mutt, it's a .gz.0 file.) The
> install didn't "fail", but the patch doesn't work. The system
> administrator is now refusing to look into the problem.
>
> Question:
> I have sudo on the server. I know how to apt-get install; I know how to
> install from source. I don't know how to install a patch. I have access to
> both the gz and gz.0 versions of the patch.
>
> If a patch has already been applied, can it be applied again, or do you
> have to start from scratch?
>
> Can someone give me some very barbie-basic instructions on how to do this?
> Assume the patch has been scp-ed to the server, but assume nothing else.


download the debianized source of htdig http://packages.debian.org/htdig

if you have source uris in /etc/apt/sources.list :

apt-get source htdig

if you don't have source uris, then when you get the source and the
patch, extract them, cd to the htdig directory and patch it with
the debian patch

patch -p1 <../filename.diff

then patch the source with your patch:

patch -p1 <../filename.diff

you may need to reverse the order of the patches if your patch fails
(patches can fail if another patch changes too much it may get lost and
not know what to patch). Assuming it patches correctly, and you have
a devel enviornment:

apt-get build-dep htdig
apt-get install fakeroot

fakeroot ./debian/rules binary

(if you downloaded the debian patch manually you'll probably have to
chmod +x debian/rules first)

if it all works out you should have one or more .deb's built at the
end ..

ask the admin to install them, but they also should mark the packages
as held, otherwise the package system may automatically overwrite them:

dpkg --get-selections >selections
(edit selections, find htdig, change install to hold)
dpkg --set-selections <selections

easy huh <g> :)

(not sure how much compiling experience you have but in my experience,
the above procedure is a snap compared to some systems ..)

nate






Reply to: