Conversation
|
I have been wondering if we can come up with a design that would not require modifications in Makefiles and patches of particular ports. For example, if there is a file However, I realise now that a port might consist of multiple libraries for which we would like to define separate policies and for which separate LDFLAGS values would have to be constructed. I still wonder if it would be possible to define a single policy file that would be passed to all static linker invocations and the static linker would decide what part of that policy (e.g., based on a library file name) to use for constructing compartments. The policy language already defines a policy for collections of DSOs but I have not experimented with that yet. Do you think it would be worth exploring this approach to centralise policy-related changes in ports, if not now not to delay this change then at least in the future? |
|
I envisioned the DSOs mechanism as a solution to this problem (I was thinking of abseil.io and protobufs based on the server report, but it should also work in this case were the issue is little utilities). Unfortunately, it's not implemented yet and well below other things on the priority list. I think what I've done here is closer to what upstreams would want to do most of the time, but not ideal for ports. Once the dsos mechanism is implemented we could look at some sort of magic file name (probably in the |
Approved by: portmgr (blanket) (cherry picked from commit a194be0)
PR: 278577 Exp-run by: antoine CheriBSD-ports: PORTREVISION bumps excluded (cherry picked from commit 98bf258)
Changelog: https://gitlab.com/libtiff/libtiff/-/releases/v4.7.0 PR: 281639 Approved by: desktop (fluffy) via Matrix Exp-run by: antoine (cherry picked from commit 0bdf588)
3873326 to
cb30ecb
Compare
Allow a port to request using devel/llvm-morello-c18n by specifying compiler:c18n in USES. Pointed out by: @bsdjhb
Rather than specify CMAKE_ARGS for COMPARTMENT_POLICY in each port, append -DCOMPARTMENT_POLICY whenever COMPARTMENT_POLICY is defined.
|
@brooksdavis I've added two main changes to this PR:
Apart from that, there was a typo in a policy for graphics/png. graphics/tiff doesn't build due to the error: You can squash my commits with yours before we merge this. |
This adds a C18N option to select ports and enables
iocompartments for each.I merged libtiff forward to a more recent version from upstream as it's much easier to patch cmake then automake makefiles for this purpose.
The cmake patches aren't what you'd actually want to upstream in that they don't attempt to detect support for the feature, but for ports I think they are good enough.
The libtiff bump may be a bit risky so I've marked the PR as draft for now.