Re: /usr/ports vs. /usr/src/contrib



[I'm still sufficiently new to FreeBSD that I'm still learning what's where.]

I previously posted:
... but then that means there's a good bit of redundancy between
/usr/ports and /usr/src/contrib [...] which seems curious.

What's the point of having the contrib source code in two places?

Chris Nehren <apeiron@xxxxxxxxx> kindly replied:
It's not in two places, generally speaking. The versions in ports are
generally different versions, or lack the patches the versions in the
base system have to better fit in with building the FreeBSD base system.
They're not generated with diff or anything like that; you're
overthinking things. The code in /usr/src/contrib is vanilla from
upstream, then patched to work on FreeBSD, then patched to work well
with building the FreeBSD base system. The distfiles downloaded by the
ports tree are vanilla, then patched to work with FreeBSD.

[Each /usr/ports/{package} has a patch file subdirectory ./files. It
seemed possible that those patch files had been generated by something
like diff -u originalfiles /usr/src/contrib/files >
/usr/ports/{package}/files/patches, for software in /usr/src/contrib.]

If I've understood, then:

* in terms of software by name, /usr/src/contrib is a subset of /usr/ports,
* /usr/ports/{package} = OC + F1, and
* /usr/src/contrib/{package} = OC + F1 + F2,
where OC=original code, F1=FreeBSD patches 1, F2=FreeBSD patches 2.

If so, then ISTM that the code files in /usr/src/contrib/{package} and
/usr/ports/{package} are going to have a lot of commonality. That's the
redundancy I had in mind, though, as pointed out, /usr/src/contrib may
have some extra patches (F2) and /usr/ports may be a different version
than came with the FreeBSD distribution, so they're not exact duplicates.
Is that about right?

One more question, then:

Are executables installed by "pkg_add -r name" (when available) the
/usr/src/contrib version?

Thanks in advance, again!
-WBE
.



Relevant Pages

  • RE: Realtek 811B LAN card on FreeBSD 7.0
    ... PCI Express LAN chipset is. ... The conclusion was that its behavior was rather flaky on FreeBSD 7.0 ... I had not kept the patches that worked on i386, ... I am currently using a PCI lan card that works with the rl driver but it ...
    (freebsd-questions)
  • RE: Security Announcements
    ... While I don't take your approach to maintaining my machines (I ... Perhaps patches to -RELEASE wouldn't come out as quickly as they ... maintain a single source tree for all of my machines. ... I just want to add my voice as to how I use FreeBSD. ...
    (FreeBSD-Security)
  • Re: Distributions of security patches.
    ... > installation of security patches to our FreeBSD machines. ... > releases easy to install it is a shame that it is not easy to install ...
    (FreeBSD-Security)
  • Re: nve: ethernet address reversal code
    ... mine is the only FreeBSD one. ... Abit NF7 motherboard (nForce2 chipset). ... Unlike other MCP hardwares, MCP61/MCP65/MCP67 stores ethernet address ... Peer Chen at NVIDIA and Shigeaki Tagashira sent me patches ...
    (freebsd-hackers)
  • Re: NAT Traversal Patches ...
    ... can you provide links to the patches and surrounding ... I understand that FreeBSD is a volunteer project, ... But the most recent patch set also offers support for ... Is the patch lacking sponsorship by a FreeBSD developer sponsor ...
    (freebsd-net)