RE: Little questions

From: Robert Collins <robertc@dont-contact.us>
Date: Sun, 09 Nov 2003 07:10:21 +1100

On Sat, 2003-11-08 at 23:39, Gonzalo A. Arana wrote:
> >You'll want to have a sync layer over whatever
> > allocator your compressor/decompressor use).
>
> Ouch! zlib uses malloc and I can't change that without patching zlib,
> can I?
> So, no mempools can be used for those mallocs, right?

zlib allows you to pass in an allocator function, If you use the default
convenience functions, then no, you can't. But it's easy to hand in a
function pointer that will do the right thing. Ditto for bz2lib.

> Btw, should I download from your arch all files
> squid--disk-io--3.0/patch-+([0-9])/squid--disk-io--3.0--{base,patch}-+([
> 0-9]).tar.gz ? And then apply all patches found on each .gz in order?
> I find this 'arch' thing quite confusing. Sory if this is a silly
> question.

Oh, sorry. Arch is 'GNU Arch', and you can download it from
ftp://ftp.gnu.org/pub/gnu/gnu-arch - you will want to grab tla 1.1pre8.

You probably want to read the online tutorial for it at
http://www.gnu.org/software/gnu-arch/.
Once you've built it, you can register my archive thusly:
tla register-archive http://www.squid-cache.org/~robertc/arch/squid

and then you can grab the various branchs, create summary patches and
the like. (You can also just review the individual patches, if you
want).

For instance, to create a branch that has everything from HEAD, and the
diskio branch, you'd do:

tla get robertc@squid-cache.org--squid/squid--HEAD--3.0 a-dir
cd a-dir
tla star-merge robertc@squid-cache.org--squid/squid--disk-io--3.0

which will calculate the difference from the most recently merged in
changes between head and disk-io, and then apply that patch to the a-dir
that you checked out. There may be conflicts - resolve them manually.
Then, you can grab the mempools one similarly, from within a-dir:

tla star-merge robertc@squid-cache.org--squid/squid--MemPools--3.0

there will almost certainly be conflicts here, because of the large
reorganisation in the diskio code. But if you look at the .rej files and
compare to the original head source, it should be quite clear.

Once you've resolve all the conflicts, you can ./bootstrap.sh this
source tree, and try building it. Assuming you are happy with the
result, you then create a patch to apply to your branch:

from within the top level of a-dir:
tla changes -o ../temp-patch

this will create a patchset in ../temp-patch that you can apply to your
sources. Note that as you aren't using arch, you'll need to apply ti by
hand, which isn't too hard: new-files go into their location from the
root, patches apply to files, and removed-files are files that have been
fdeleted. Lastly, a comparison of the index files tells you about file
renames. tla show-changeset temp-patch will also tell you this
information.

Cheers,
Rob

-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Received on Sat Nov 08 2003 - 13:10:34 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:47 MST