5

I need to change the mirror I am using in my OpenBSD 6.1 installation according to this question: OpenBSD 6.1 not updating

Right now, I am using ftp.OpenBSD.org and I need to change it to ftp.eu.OpenBSD.org.

I also have the incentive as leaving it pointing to the European mirror for good, as I am located in Europe.

How may I do that?

2

To change an OpenBSD installation/update mirror path in OpenBSD 6.1, you need to edit the file /etc/installurl that you have created at installation time.

So to change the mirror you are using, edit /etc/installurl and change it to:

https://ftp.eu.OpenBSD.org/pub/OpenBSD

From man installurl

The /etc/installurl file contains a single line specifying an OpenBSD mirror server URL, such as https://ftp.openbsd.org/pub/OpenBSD It is created by the installer script during installations and upgrades over HTTP.

An alternate way is also setting PKG_PATH as in:

export PKG_PATH="http://ftp.eu.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)/"

Or editing installpath within /etc/pkg.conf:

installpath = ftp.eu.openbsd.org
  • 1
    installurl is pretty new, I'm not sure it's even supposed to work on 6.1 release. The standard way to do it is to set PKG_PATH (rumors of its death are greatly exaggerated ;)). – Satō Katsura Jun 12 '17 at 15:21
  • @SatoKatsura I am using it in 6.1, and actually it was suggested by the installation procedure. Thanks for your input. – Rui F Ribeiro Jun 12 '17 at 16:44
  • 1
    @SatoKatsura On OpenBSD 6.1, you should use installurl. PKG_PATH (and TRUSTED_PKG_PATH) is for pointing to package repositories in non-standard locations (these override installurl for pkg_add). installurl is also used by syspatch, which is new in OpenBSD 6.1, and also, I believe, by the bsd.rd system. – Kusalananda Jun 14 '17 at 7:19
  • PKG_PATH (and TRUSTED_PKG_PATH) is for pointing to package repositories in non-standard locations (these override installurl for pkg_add). - Which I believe is what the OP wants? – Satō Katsura Jun 14 '17 at 7:38
  • I actually changed it for good. I am located in Europe btw. – Rui F Ribeiro Jun 14 '17 at 7:40
0

This is what I do:

# echo "export PKG_PATH=https://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)/" >> /etc/profile
# . /etc/profile
  • Not if it's the first thing you do on a machine! :) Updated with append operator – Neil McGuigan Sep 19 '17 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.