FreeBSD upgrade reddit / freebsd ---------------------------------------------------------------------- xrdts_99tx · 2022-02-24 18:49 The download speed is really slow when upgrading FreeBSD packages from the default mirror: [https://pkg.freebsd.org/](https://pkg.freebsd.org/) . All available mirrors are on *http* and not on *https*. * Is there any way of using *https* with any of the PKG servers? * Is ports upgrading faster than downloading compiled packages? * Does *portsnap fetch (update)* use *https*? * How to "convert" compiled packages to ports? **Edit:** The last question refers to the possibility that: given an installed binary package obtained from a FreeBSD mirror, could it be possible to upgrade it as a port? Taking into account the slow download speed of a server. ---------------------------------------------------------------------- jamfour · 2022-02-24 19:24 Tbh either your Internet is slow or the selected mirror is slow. Consider manually changing the mirror, even if just temporarily. > Is there any way of using https with any of the PKG servers? Maybe. Worth noting that the packages are signed so there is still cryptographic verification of packages. It still leaves it open to certain classes of attacks (like MITM serving old data) > Is ports upgrading faster than downloading compiled packages? Unlikely. It’s still necessary to download all the sources and then there’s the compilation time of course. > Does portsnap fetch (update) use https? No idea. > How to “convert” compiled packages to ports? Not sure what you mean. Likely the answer is either “no” or “it doesn’t make sense”. Feels like an XY problem—why do you think you want to do this? ---------------------------------------------------------------------- xrdts_99tx · 2022-02-24 19:41 >Unlikely. It’s still necessary to download all the sources and then there’s the compilation time of course. But, is source code downloaded from FreeBSD servers or from developers themselves? ​ >Not sure what you mean. Likely the answer is either “no” or “it doesn’t make sense”. Feels like an XY problem—why do you think you want to do this? Since the download speed is really slow with compiled packages, maybe it is possible to upgrade all installed packages (obtained as binaries) via ports. ---------------------------------------------------------------------- reddit_original · 2022-02-24 19:53 Where are you located. The download speed is NOT slow. >How to "convert" compiled packages to ports? Packages are pre-compiled ports so that question doesn't make sense. ---------------------------------------------------------------------- Anopheli · 2022-02-24 20:04 The source code for ports is downloaded from distfile mirrors of the program itself. Frequently GitHub, or various orgs that provide mirrors for open source projects. The Ports Tree itself is a git repo. The distfiles are fetched when building and cached locally. Compiling more than a handful of ports is very, very time consuming. Especially if a dependency like rust, GCC or qt5-webengine is pulled in. ---------------------------------------------------------------------- xrdts_99tx · 2022-02-24 20:13 Ok, thanks. I think it's better to try with other mirrors, even if they are only *http* but with signed packages. ---------------------------------------------------------------------- [deleted] · 2022-02-24 20:23 [deleted] ---------------------------------------------------------------------- Anopheli · 2022-02-24 20:40 Give it a go. I run into this exact problem with Void Linux because it always tries to use the package repo in Germany for some damned reason. ---------------------------------------------------------------------- FUZxxl · 2022-02-24 21:50 > How to "convert" compiled packages to ports? A compiled package is built from a port. You cannot convert the package back to a port, but you can build your own packages from ports. ---------------------------------------------------------------------- grahamperrin · 2022-02-24 22:54 > Is there any way of using https with any of the PKG servers? Yes, but I think it's not recommended (right now I can't find the explanation, sorry). ---------------------------------------------------------------------- unitrunker2 · 2022-02-25 05:03 portsnap has been superceded by gitup. https://forums.freebsd.org/threads/gitup.77863/ ---------------------------------------------------------------------- wezm · 2022-02-25 07:26 I’m in Australia and also find pkg.freebsd.org super slow. I manually tried all the mirrors pkg. selects from and all are slow. It’s not my internet as I was able to fix it: I created a CloudFront distribution that pointed at pkg. as the origin then configured my machine to use that. The speeds were massively increased. Obviously since I was the only one using the CF distribution it was not caching speeding things up but better network/routing to Australia. ---------------------------------------------------------------------- obiwac · 2022-02-25 11:12 Not sure this is the answer you're looking for, but incase this helps anyone, there's this neat script called fastest_pkg which speedtests available mirrors for you. ---------------------------------------------------------------------- xrdts_99tx · 2022-02-25 18:30 What I meant was that if there is a package installed on the system that was obtained as a binary, could it be upgraded as a port? Given the slow download speed with pkg servers. ---------------------------------------------------------------------- xrdts_99tx · 2022-02-25 18:37 What I meant with the "convert" aspect was that if someone installs a binary package but given the slow download speed of certain pkg servers, it is impossible to upgrade it, could it be possible to do it as a port? ---------------------------------------------------------------------- FUZxxl · 2022-02-25 18:48 Sure. Use `make package` to generate a package from the port. It will be saved to `work/pkg`. You can then install the package with the `pkg(8)` utility: cd /usr/ports/some/port make package pkg install work/pkg/*.pkg Note that the name of the work directory can vary if the port has flavours. ---------------------------------------------------------------------- xrdts_99tx · 2022-02-25 19:01 Ok, thanks. I will try that to upgrade the packages. Do you know if the ports tree is downloaded with *https*? Is it from this [git repo](https://github.com/freebsd/freebsd-ports)? ---------------------------------------------------------------------- FUZxxl · 2022-02-25 20:39 The ports tree can be downloaded in a multitude of ways, including using git. ---------------------------------------------------------------------- Kuzakor · 2022-02-25 22:12 1. Why you want to use https? All packages are signed nothing unsafe in using http. You don’t send any sensitive data that could be intercepted. 2. Depends on port, your pc power and internet speed 3. No idea 4. With my current state of knowledge, it is not possible ---------------------------------------------------------------------- grahamperrin · 2022-03-02 00:27 +1 > superceded by gitup. Largely superseded by [net/gitup](https://www.freshports.org/net/gitup/), yes, although there's not yet a decision on what's to be integral to FreeBSD. ### Also ported Game of Trees, [devel/got](https://www.freshports.org/devel/got/), in particular: > … It will always remain possible to work with both Got and Git on the same repository. ---------------------------------------------------------------------- grahamperrin · 2022-03-02 00:48 +1 > fastest_pkg [ports-mgmt/fastest_pkg](https://www.freshports.org/ports- mgmt/fastest_pkg/) A verbose example: % pkg -vv | grep -e url -e enabled url : "http://pkg0.bme.freebsd.org/FreeBSD:14:amd64/latest", enabled : yes, url : "https://alpha.pkgbase.live/current/FreeBSD:14:amd64/latest", enabled : no, url : "file:///usr/local/poudriere/data/packages/main-default", enabled : yes, % fastest_pkg -v pkg0.tuk.freebsd.org: 100% pkg0.tuk.freebsd.org: 2.4 MB/s pkg0.nyi.freebsd.org: 79% (28, 'Operation timed out after 5002 milliseconds with 5316137 out of 6662744 bytes received') pkg0.nyi.freebsd.org: 1.1 MB/s pkg0.isc.freebsd.org: 0% (28, 'Failed to connect to pkg0.isc.freebsd.org port 80 after 2732 ms: Operation timed out') pkg0.isc.freebsd.org: 0.0 B/s pkg0.bme.freebsd.org: 100% pkg0.bme.freebsd.org: 3.7 MB/s pkg0.pkt.freebsd.org: 100% pkg0.pkt.freebsd.org: 3.6 MB/s Fastest: pkg0.bme.freebsd.org: 3.7 MB/s Write configuration: mkdir -p /usr/local/etc/pkg/repos/ echo 'FreeBSD: { url: "http://pkg0.bme.freebsd.org/${ABI}/latest" }' \ > /usr/local/etc/pkg/repos/FreeBSD.conf % ---------------------------------------------------------------------- grahamperrin · 2022-03-02 01:08 > … given an installed binary package obtained from a FreeBSD mirror, could it be possible to upgrade it as a port? … Yes. From : > … I recommend [ports-mgmt/poudriere- devel](http://www.freshports.org/ports-mgmt/poudriere-devel) and [poudriere- bulk\(8\)](https://github.com/freebsd/poudriere/wiki/poudriere- bulk.8-devel) option `-b` to prefetch as many binaries as possible, to not waste your time. … there's a fairly simple example of a dry run, `poudriere bulk -j main -b latest -n www/firefox` If you wanted to build and install Firefox from source, you could perform a normal run (non-dry) then: `pkg upgrade -f -r poudriere www/firefox` Do you have a GitHub account? (For questions and answers at .) ### Speed What's above is possible, but not necessarily faster than working with a slow package mirror. It depends on what's to be built. ---------------------------------------------------------------------- darkempath · 2022-03-20 12:29 >Largely superseded by net/gitup, yes, although there's not yet a decision on what's to be integral to FreeBSD. I wasn't aware of that. I've written scripts to make updating simpler, which still uses portsnap. Do you think this the sort of thing that will likely be decided for the release of FreeBSD14? Also, does this mean they're currently maintaining both git and subversion ports collections? That's probably not a good long term thing. ---------------------------------------------------------------------- grahamperrin · 2022-03-20 15:25 > … maintaining both git and subversion ports collections? … Via the **Developers** menu at the FreeBSD home page: * `stable/` gained an update six hours ago, at a glance that's consistent with . I see nothing in ViewVC comparable to the `main` branch, . nothing more recent than eleven months ago, > Mark the repository as being converted to Git. This is the last Subversion comm… ---------------------------------------------------------------------- grahamperrin · 2022-03-20 15:27 > … decided for the release of FreeBSD14? … I expect so.