Re: Porting git to HP NonStop

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

 



On Fri, Aug 10, 2012 at 8:04 AM, Joachim Schmitz
<jojo@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> - HP NonStop is lacking poll(), git is making quite some use of it.
>> My Solution: I 'stole' the implementation from GNUlib, which implements
>> poll() using select().
>> Git should either provide its own poll(), not use it at all or resort to
> using
>> GNUlib, what do you think?.

poll() is usually better than select() because you don't need to worry
about FD_SETSIZE. That said, the compat/ directory contains
implementations of some functions. You could contribute a fake poll
that uses select if it was under the GPLv2.

>> - HP NonStop is lacking getrlimit(), fsync(), setitimer() and memory
> mapped IO.
>> For now I've commented out the part that used getrlimit() and use a home
>> brewed implementation for fsync(), setitimer() and mmap().

There is no need to define your own mmap(). Define NO_MMAP=1 in the
Makefile. Git already has its own fake mmap and knows how to write it
back to disk when making changes.

>> - git makes use of some C99 features or at least feature that are not
> availabe in
>> C89, like 'inline'
>> C89 is the default compiler on HP NonStop, but we also habe a c99
> compiler, so
>> telling configure to search for c99  should help here.

You could also disable inline by #define inline /**/, but this will
probably result in a slower binary.

>> - HP NonStop doesn't have stat.st_blocks, this is used in
> builtin/count-objects.c
>> around line 45, not sure yet how to fix that.

IIRC the block count is only used to give the user some notion of how
much disk was wasted by the repository. You could hack a macro that
redefines this as st_size.

>> - HP NonStop doesn't have stat.st_?time.nsec, there are several places
> what an
>> "#ifdef USE_NSEC" is missing, I can provide a diff if needed (offending
>> files: builtin/fetch-pack.c and read-cache.c).

I think this would be appreciated by anyone else that has a similar
problem where the platform lacks nsec.

>> - Once compiled and installed, a simple jojo@\hpitug:/home/jojo/GitHub $
> git
>> clone git://github.com/git/git.git fails with:
>> /home/jojo/GitHub/git/.git/branches/: No such file or directory After
> creating
>> those manually it fails because the directory isn't empty,
>> catch-22
>> After some trial'n'error I found that the culprit seems to be the
> subdirectories
>> branches, hook and info in /usr/local/share/git-core/templates/, if I
>> remove/rename those, the above command works fine.
>> I have no idea why that is nor how to properly fix it, anyone out there?

This sounds like the templates directory was not created correctly
during installation, or is being copied incorrectly during the git
init process. I would start by comparing the structure and permissions
of the templates directory on your HP NonStop system to one on a Linux
system and see if there was a mistake made during the installation
process. If the directory matches, I would then use `git init --bare`
in a new directory to copy in the templates, and see if its the
template copying code that is making an incorrect copy.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]