From owner-freebsd-ports Sat May 3 18:47:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA00214 for ports-outgoing; Sat, 3 May 1997 18:47:29 -0700 (PDT) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id SAA00209 for ; Sat, 3 May 1997 18:47:23 -0700 (PDT) Received: from rover.village.org [127.0.0.1] by rover.village.org with esmtp (Exim 1.60 #1) id 0wNqOU-0000ji-00; Sat, 3 May 1997 19:47:18 -0600 To: ports@freebsd.org Subject: Coping with OS specific patches Date: Sat, 03 May 1997 19:47:18 -0600 From: Warner Losh Message-Id: Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Greetings, as you may know, I have been working towards getting the OpenBSD ports tree into shape. I have recently found a situation that needs to have an OS specific patch. Specifically, the port for ssh uses FreeBSD's installed libgmp rather than the one that comes with ssh. However, OpenBSD doesn't have this library. I think that it may be time for a good, solid mechanism to be put into place to handle things like this. The FreeBSD project doesn't necessarily need to maintain patches of this nature, but it should, imho, place FreeBSD specific changes that can't be ifdef'd into an OS dependent patch mechanism. Others can then place their OS specific patches into similar trees. This can then lead toward being able to co-locate the patches on one machine (say because you want to NFS mount your ports tree). There are some interesting logistical issues with doing something like this. With the current source code control environment, it would be best if it were in a separate directory. I'm thinking that patches-${OSNAME} (eg patches-FreeBSD) might not be a bad thing to do. The patches would then be applied in the following order: patches/* patches-${OSNAME}/* to make things less ambiguous. This would allow a parallel tree to be maintained by other groups with their own patches. I could see this being a very big win to the whole process. If someone has better ideas than what I'm proposing, please let me know. Very few ports need this mechanism (since most of the diffs are in the code where you can do #ifdefs), but those that do need it, really need it. I'll be happy to split things up that are in the tree now, and try to work with the port maintainers to make sure that things wind up in the right places. I'll also write the mods needed to make this happen in the ports file. I'm not asking anybody to do much extra work here (in fact, nearly all of the ports could maintain the status quo). Comments? Warner