pkgsrc-Users archive

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

Re: When should one send a PR and when not?



On Oct 6,  9:36, Greg Troxel wrote:
} 
} The other huge point about pkgsrc PRs is that people often expect pkgsrc
} to fix upstream problems, and this is IMHO not reasonable.
} 
} So if a package doesn't build on your OS, first get the upstream source,
} and follow the upstream build insructions, and build it.  If it doesn't
} work, file an issue with the upstream, not pkgsrc.

     It isn't always an upstream issue.  I've been dealing with an
issue where sys/event.h (the primary header for the kqueue event
library) on NetBSD 9.x contains:

#define EV_SET(kevp, ident, filter, flags, fflags, data, udata) \
    _EV_SET((kevp), __CAST(uintptr_t, (ident)), (filter), (flags), \
    (fflags), (data), __CAST(intptr_t, (udata)))

but, on NetBSD -current it contains:

#define EV_SET(kevp, ident, filter, flags, fflags, data, udata) \
    _EV_SET((kevp), __CAST(uintptr_t, (ident)), (filter), (flags), \
    (fflags), (data), __CAST(void *, (udata)))

Note the difference in the type of last parameter.

     The last parameter to EV_SET is user defined data that isn't
processed by the kernel.  As such, applications often have it
defined to their own type.  The -9 version causes headaches for
C++ applications as C++ has much stricter type checking than C
does.

     kqueue comes from FreeBSD.  I checked FreeBSD sources and the
oldest version I could find has "void *udata;".  This means that
it was changed in NetBSD on import.  I'm sure the person doing had
a good reason, but didn't realize the consequences of the change.
Recently the problem was noticed and corrected, but that doesn't
help with released versions of NetBSD.  Personally, if I was upstream
and got a bug report due to this, I would call it a gratuitous
change and simply close the bug report with "not supported OS".

     My point here, is that sometimes (not very often), the reason
why something doesn't compile out of the box is due to a NetBSD
bug.  I feel that patching applications in pkgsrc and not bothering
upstream (especially since it has been fixed in -current) is
appropriate for these situations.

}-- End of excerpt from Greg Troxel


Home | Main Index | Thread Index | Old Index