|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
There is an alternative way to find a packages?
There is an alternative way to find a packages?
I have seen Faq 15.2.3 - Finding packages. There is an equivalent to command debian? apt-cache search package_name |
|
|||
I wrote a pretty dodgy shell script a few years ago that went off to the openbsd ftp site and did a directory listing and stored this as an index. Then used a simple grep to find the package from the index
i just found the script - i wrote it in perl. if you want it pm me
__________________
"No, that's wrong, Cartman. But don't worry, there are no stupid answers, just stupid people." -- Mr. Garrison Forum Netiquette |
|
|||
Code:
curl ftp://mirror.switch.ch/pub/OpenBSD/4.3/packages/i386/ | grep bash (or any other package) |
|
|||
Quote:
|
|
||||
You don't need to set the release and architecture if you apply a little creative scripting:
Code:
PKG_PATH="ftp://ftp.usa.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/:ftp://ftp.openbsd.org//pub/OpenBSD/`uname -r`/packages/`uname -m`/"; export PKG_PATH i.e. Code:
$ echo "ftp://ftp.usa.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/" ftp://ftp.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386/
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Quote:
But on this point i would have another question as to ensure that this change is immediately detected by the system? Do I must end the user session with the command exit and re-enter? In linux i use the command line source to make these changes immediately active here do not know. TerryP good tricks! |
|
|||
you could always just search the webpage too if thats an option your interested in.
http://www.openbsd.org/4.3_packages/i386.html depending on release just change x.x_packages and the platform ur after : "amd64.html" |
|
||||
Once your shells environment is modified, all programs executed from that shell after the change will understand the change.
Placing the setting in your shells config file will make it perminate for all new shells, and you can have the current shell read the configuration again (e.g. use: . ~/.profile) Programs executed before the change but still running will probably not (reliably) take notice. In C programs you would probably use getenv() to look up an environment variable, whether or not the 'current environment' in my manual page refers to a copy of the environment created by the programs process or a hook into the parent processes current environment, I don't know since I've never tested it or read the standard on it. But I'd expect it to be a copy of the environment taken when the process is created.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Quote:
I have modified the environment variable PKG_PATH with add an error but the new content isn't read. |
|
|||
Quote:
PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/4.3/packages/i386/" |
|
|||
Yes I know, but I wanted to make a test to see if the new content for the variable was taken without having to end the session instead nothing.
|
|
||||
Quote:
I'm a little confused by that reasoning, but oookay. A wrong path will show you no success whatsoever, in the current or future sessions. Anyway, you can just execute the export PKG_PATH command at the command prompt for instant gratification (aka, being able to check right then without restarting a session.) This can be good in comparing various sources for packages (for completeness, latency, etc.) However, this will only be good for the duration of the session- adding it to your /root/.profile will make it workable for every session in the future. Sunnz asked "why not search the ports tree?" and suggested looking in /usr/ports ... but for those of us without a ports tree on their local system, this is the next best thing.
__________________
Network Firefighter |
|
|||
For clarity, I think you are intending to specify $HOME/.profile.
|
|
||||
Quote:
As far as I know of, there some stuff in the ports tree are not available in packages, which might be useful to get the ports tree if you need that software. Meh... just put it in /etc/profile and everybody gets it.
__________________
She sells C shells by the seashore. |
|
|||
Quote:
The rule of thumb is to use packages when available; otherwise, compile from ports. |
|
|||
...or do you mean /etc/skel/.profile?
|
|
||||
Actually I do mean /etc/profile.
From my vague memory it is not there in the first place... you may need to su and create it. Last time I read the man page for ksh, that's what it reads first before it reads ~/.profile... It also works the same for bash, not sure about sh or tch though... zsh uses /etc/zprofile and ~/.zprofile instead.
__________________
She sells C shells by the seashore. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sysjail alternative | Stellar | OpenBSD General | 7 | 4th September 2009 04:38 PM |
VPN alternative: ssh -w | s2scott | OpenBSD Security | 15 | 16th April 2009 01:09 AM |
Alternative Architecture Laptops | JMJ_coder | General Hardware | 6 | 7th October 2008 05:05 PM |
Alternative to FoxPro? | michaelrmgreen | Programming | 2 | 18th July 2008 11:40 AM |
iTunes alternative | stukov | Off-Topic | 8 | 14th June 2008 01:55 PM |