Page MenuHomeFreeBSD

Explicitly warn users if their system is not supported
ClosedPublic

Authored by AMDmi3 on Jan 17 2017, 10:07 AM.

Details

Summary

After each FreeBSD release EoL and the following cleanup of legacy
code there's a bunch of complains from users about unexpected breakages:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216038

To make it easier for users and to avoid the noise, let us introduce a
mechanism which disables building from ports for unsupported releases
with meaningful explanation. Bu default it adds IGNORE to be as explicit
as possible, but it may be overridden and be turned into a warning.

The OSVERSION ranges used here may also be used as a reference when
removing obsolete OSVERSION-based conditions.

Note that OSVERSION range may be excessive - I've included 11.x prior
to 11.0-RELEASE which I believe is not really supported. May also include
older 12.x. I'm not sure for our policies here.

Note that this also needs DragonFly support.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

AMDmi3 retitled this revision from to Explicitly warn users if their system is not supported.
AMDmi3 updated this object.
AMDmi3 edited the test plan for this revision. (Show Details)
AMDmi3 added a subscriber: marino.

A small textual fix.

Mk/bsd.port.mk
1148 ↗(On Diff #24106)

s/to supported/to a supported/

AMDmi3 marked an inline comment as done.
AMDmi3 edited edge metadata.

Apply textual fix suggested by bcr@

Mk/bsd.port.mk
1152 ↗(On Diff #24106)

This should not be using IGNORE but a target in the sanity sequence ending with ${FALSE}.

AMDmi3 edited edge metadata.

Use sanity sequence ending with ${FALSE} instead if IGNORE

AMDmi3 edited edge metadata.

Remove debug stuff

Mk/bsd.port.mk
1152 ↗(On Diff #24108)

Why don't you put the target directly here ?

Mk/bsd.port.mk
1152 ↗(On Diff #24108)

Hm, I'm got an idea there's specific place for these targets.

AMDmi3 edited edge metadata.

Move unsupported system sanity target closer to the check

mat added a reviewer: mat.

Looks good to me, I'd like to have another portmgr member look at it though.

Mk/bsd.port.mk
1152 ↗(On Diff #24108)

You could also move the whole block to where that place was :-)

This revision is now accepted and ready to land.Jan 17 2017, 1:06 PM
adamw added inline comments.
Mk/bsd.port.mk
1151 ↗(On Diff #24110)

I think we can make the text simpler and clearer. I don't like suggesting that people pull an old snapshot. Then it looks like an official recommendation, and then we have to do tech support for people who have a 5 y/o ports tree who are just following instructions. I'd recommend this:

Ports Collection support for your ${OPSYS} version has ended, and no ports are guaranteed to build on this system. Please upgrade to a supported release.
1160 ↗(On Diff #24110)

That wording is awkward. I'd suggest this:

No support will be provided if you silence this message by defining ALLOW_UNSUPPORTED_SYSTEM.
AMDmi3 edited edge metadata.

Improve wording as suggested by adamw

This revision now requires review to proceed.Jan 17 2017, 2:12 PM
swills added a reviewer: swills.
swills added a subscriber: swills.

I like the idea and the code looks fine now.

This revision is now accepted and ready to land.Jan 17 2017, 2:44 PM
Mk/bsd.port.mk
1147 ↗(On Diff #24112)

I assume this line is what you were thinking about for DragonFly support.
DFLYVERSION is the equivalent of OSVERSION, but it's only defined on Dports. Still, this should work:

.if (${OPSYS} == FreeBSD && (${OSVERSION} < 1003000 || (${OSVERSION} >= 1100000 && ${OSVERSION} < 1100122))) ||
    (${OPSYS} == DragonFly && ${DFLYVERSION} < 400400))

Note that I put parentheses around the original condition.

This revision was automatically updated to reflect the committed changes.
AMDmi3 marked an inline comment as done.

Committed, also added DragonFly support and UPDATING entry