|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
PKG_PATH has short term memory
setting the PKG_PATH variable with the export command only holds for one session.
for example, say that I enter the following string: Code:
# export PKG_PATH=http://your.local.mirror/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/ It also states in the faq 15.2.2 that it is a good idea to enter a line like the above one in ~/.profile for the purpose of being able to retain multiple mirrors in case one is not working, it will move on to the next. servers can be separated by ":" which I inserted between servers, but I still can't get PKG_PATH to retain its contents. What am I doing wrong? |
|
|||
Environment variables are not permanent if you just type them in shell.
You need to save that variable in file. Alternatively you can insert inside pkg.conf: Code:
cat /etc/pkg.conf #installpath=http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/ installpath=http://ftp.hostserver.de/pub/OpenBSD/snapshots/packages/amd64/ |
|
|||
Quote:
Thanks. |
|
|||
It is setting PKG_PATH environment variable.
First line sets up PKG_PATH equal to: http://openbsd.mirrors.pair.com/$(uname -r)/packages/$(arch -s). Of course $(uname -r) and $(arch -s) will be executed and results appended to rest of string. Second line performs addition/appending PKG_PATH and new line: https://stable.mtier.org/updates/$(uname -r)/$(arch -s) and then set up PKG_PATH to totality/sum/concatenation of these variables. If you are not following current, to receive security and/or reliablity fixes you need to: 1. Manually fetch souce code and compile it or 2. Use unofficial, but commonly trusted M:Tier. |
|
|||
Quote:
Last edited by jjstorm; 7th March 2016 at 10:39 PM. |
|
|||
Quote:
|
|
|||
/etc/pkg.conf will not accept $(uname -r) and $(machine -a)
I am trying to create a configuration file for pkg.conf that can be used on different versions of OpenBSD, however, I am getting an error. I have tried it several times by manually entering the information. The string works when assigned to PKG_PATH.
Below is the string as it appears on /etc/pkg.conf Code:
installpath=ftp://openbsd.c3sl.ufpr.br/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/ Code:
# pkg_add vim Error from ftp://openbsd.c3sl.ufpr.br/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/quirks-2.197.tgz 550 Can't change directory to pub/OpenBSD/$(uname -r)/packages/$(machine -a): No such file or directory Ambiguous: choose package for vim a 0: <None> 1: vim-7.4.900-gtk2 2: vim-7.4.900-gtk2-lua 3: vim-7.4.900-gtk2-perl-python-ruby 4: vim-7.4.900-gtk2-perl-python3-ruby 5: vim-7.4.900-no_x11 6: vim-7.4.900-no_x11-lua 7: vim-7.4.900-no_x11-perl-python-ruby 8: vim-7.4.900-no_x11-perl-python3-ruby 9: vim-7.4.900-no_x11-ruby Your choice: 1 Error from ftp://openbsd.c3sl.ufpr.br/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/vim-7.4.900-gtk2.tgz 550 Can't change directory to pub/OpenBSD/$(uname -r)/packages/$(machine -a): No such file or directory Can't find CONTENTS from ftp://openbsd.c3sl.ufpr.br/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/vim-7.4.900-gtk2.tgz --- vim-7.4.900-gtk2 ------------------- Can't install vim-7.4.900-gtk2: bad package Is it that only PKG_PATH can resolve $(uname -r) and $(machine -a) ? |
|
||||
The pkg.conf file is not a shell script.
To make your life much, much easier, see the pkg.conf(5) man page. There is a paragraph under the installpath option that begins, "Special sequences..." If you ever conduct a network install, you will find a pkg.conf(5) file created for you, that uses these sequences. |
|
|||
Quote:
Quote:
Thanks. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PKG_PATH change in Current | shep | OpenBSD Installation and Upgrading | 2 | 6th February 2016 08:47 PM |
export PKG_PATH | betweendayandnight | OpenBSD General | 4 | 9th August 2015 12:07 PM |
can't setup PKG_PATH after install of 5.5 | spermwhale_warrior | OpenBSD Packages and Ports | 10 | 26th August 2014 09:29 PM |
Diskless Gnome 3 - a short history | jggimi | OpenBSD Installation and Upgrading | 5 | 2nd July 2014 05:00 PM |
Firefox long term support | shep | News | 0 | 3rd February 2012 02:40 AM |