Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

B S Magnet

macrumors 603
Original poster
I expect this post to be a non-starter, but at the very least, it’s a place to perhaps discuss whether there may be workarounds. I’m not counting on it, though.

Around three months ago, a port upgrading of outdated components on my 10.14.6 daily driver failed when several ports failed to update — whether as 'upgrade outdated' or 'upgrade [port]'. I thought the culprit was something I might have done in previously, such as having installed another component with variants which propagated update-build problems for other ports down the line.

Perhaps — no, definitely — unwisely, I proceeded with a completely fresh install of macports on that Mac, rebuilding the binaries and GUI-based applications I rely on. On that particular day, I was planning to use gqrx in the field later that evening. That opportunity never came.

gqrx, as with many other GUI-based ports, relies on the Qt5 framework. Each new build attempt, as with the upgrade attempts I made before wiping clean the slate, kept halting on either of two, but interrelated Qt5 dependencies: qt5-qttools 5.15.15 and qt5-qtconnectivity 5.15.15. There was no way around it, no variants to remove to simplify the build, nothing. Arising from this, I withheld all selfupdates and upgrading of outdated components on my 10.13.6 boxes, leaving all in a holding pattern until this issue was resolved. This includes security stuff. (Yes, one could manually upgrade individual ports, but when there are hundreds or even more ports installed, this obviates the whole purpose of the “outdated” syntax. Moreover, it doesn’t enable me to return gqrx to my 10.14.6 box.)

Eventually, I found an open, still-new (at the time) macports ticket with a couple of users posting logs displaying a failure to build either of the two dependencies across multiple macOS builds (and, again, upon which other GUI-based ports rely).

Since then, a dozen more updates by other users sharing their errors (every one is the same) have added to the ticket. There does not appear to be a priority to resolve the build failure, leaving scores of Qt5-dependent applications stuck. Because the ticket isn’t closed (signalling this is where 10.13.6, 10.14.6 and possibly other macOS builds get left behind), I’m optimistic there will be a fix (whether with a 5.15.16 update from the Qt5 maintainers, or with a patch by the macports team). Until then, I’m without a dozen or so applications which require Qt5, as least on that Mojave box, while the others are being held from updates.

My question: has there ever been a way to direct macports to build from a snapshot of repositories from an earlier date, even should that mean having to install a date-appropriate earlier version of macports itself? (Currently on 2.10.4, but current at the time was 2.10.1.)

My guess is no, given how versions of tarballs on the mirrors seem to roll with updates, with typically only the last one or two revisions behind the current version present. Nevertheless, the harm in asking is low. Unlike the macports TracReports open ticket system, there’s not really a way to ask this question there.

Cheers.
 

B S Magnet

macrumors 603
Original poster
I think this is what you're asking for, right? https://apple.stackexchange.com/que...s-using-only-versions-from-a-date-in-the-past

It takes some time but it does work. Be aware it's going to build everything from source.

It’s inelegant (arising from lack of currency), but if I can get it to work, then that isn’t an issue for me.

Following those directions and locating a git hash for the release of 2.10.0 from early August (commit hash 7c0437d), I followed every step in the above. For sake of whatever, I have this local experiment-test on /var/root/macports-ports, running all from su.

All is fine with retrieving the ports and updating the sources.conf on time comes to actually install a port (neofetch, as a little treat):

sh-3.2# vi /opt/local/etc/macports/sources.conf

Code:
# MacPorts system-wide configuration file for ports tree sources.
#
# To change how MacPorts fetches base, see rsync_server and rsync_dir in
# macports.conf.
#
# To add a local source, add a "file://" entry.
#
#   Example: file:///Users/landonf/misc/MacPorts/ports
#
# To prevent a source from synchronizing when `port sync` is used,
# append "[nosync]" at the end.
#
#   Example: file:///Users/landonf/misc/MacPorts/ports [nosync]
#
#
# Note that MacPorts parses source URLs in order; when a port appears in
# multiple sources, it installs the first occurrence. For local sources
# to shadow remote ones, "file://" URLs must come before other URLs.
#
# A list of rsync mirrors is available at
# https://trac.macports.org/wiki/Mirrors#Portfiles.
#
# If an "rsync://" URL points to a .tar file, a signed .rmd160 file must
# exist in the same directory on the server and will be used to verify
# its integrity.
#
# For proper functionality of various resources (port groups, mirror
# sites, etc.), the primary MacPorts source must always be tagged
# "[default]", even if switched from the default "rsync://" URL.
#
# comment back IN after Qt5 is fixed
# rsync://rsync.macports.org/macports/release/tarballs/ports.tar.gz [default]
#
# Comment out the following after macports fixes the qt5-qttools/connectivity issue
file:///private/var/root/macports-ports [default]

But then:

sh-3.2# vi /opt/local/etc/macports/sources.conf
sh-3.2# port -v install neofetch
Error: Unable to execute port neofetch: Could not open file: /private/var/root/macports-ports/sysutils/neofetch/Portfile
sh-3.2# ls -la /private/var/root/macports-ports/sysutils/neofetch/
total 8
drwxr-xr-x 4 root wheel 128 20 Nov 16:38 .
drwxr-xr-x 736 root wheel 23552 20 Nov 15:45 ..
-rw-r--r-- 1 root wheel 999 20 Nov 15:39 Portfile
lrwxr-xr-x 1 root wheel 94 20 Nov 16:38 work -> /opt/local/var/macports/build/_private_var_root_macports-ports_sysutils_neofetch/neofetch/work
sh-3.2#


Something probably really simple is being missed here. If so, I can’t account for it by following those steps on the stackexchange tip.

Thank you for pointing me there anyway.
 
  • Like
Reactions: TheShortTimer

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,751
2,091
I don't know what's wrong, but the fact that you're keeping the port tree in /private/var/root/ jumps out at me. As far as I know there is no particular reason that shouldn't work, but it is an unusual choice, and since it's not working, I would recommend eliminating the unusual.

Can you try with the port tree in /Users/YourNameHere/macports-ports?

Edit: And for the same reason, I wouldn't do everything with su. Like obviously MacPorts needs to be run with sudo, but if you're running the git commands as root, try not doing that. Again, I know of no particular reason that shouldn't work, but try to go down the well-travelled path.
 
Last edited:

alex_free

macrumors 65816
Feb 24, 2020
1,103
2,354
There is!

For example, kencu has TigerPorts, which functions as an 'overlay'.

I used this for SM64EX Builder stuff.

Theres alot of cool stuff in that, including essentially how to do what you want here. The TigerPorts 'overlay' ovverides the MacPorts current source tree when building or installing binary packages.

Sorry this isn't more in depth, but you totally can use an old commit from MacPorts to explicitly override what is current. It is a bit more of a manual process then what I have briefly described, but I can try to help further in future replies.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.