|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
Installation of Perl
Hi all,
I'm trying to get Perl 5.8.4 installed on OpenBSD 5.6. I have setup M:Tier and the appropriate repositories, but I get some very strange results when attempting to install. First off, OpenBSD seemingly has no search functions of any kind. Meaning, I can find no functions to search the packages like I can in Yum, Apt, Yast, etc. It's all guessing and Google searches to find the names. <pre>sudo pkg_info perl</pre> I was able to find some information on installing Perl with the following (updated in January from securityrouter.org) HTML Code:
cd /root mount -uw / ftp http://ftp.openbsd.org/pub/OpenBSD/5.6/`uname -m`/SHA256.sig ftp http://ftp.openbsd.org/pub/OpenBSD/5.6/`uname -m`/base56.tgz signify -C -p /etc/signify/openbsd-56-base.pub -x SHA256.sig base56.tgz && tar -xzpf base56.tgz -C / ./usr/libdata/perl5 rm SHA256.sig base56.tgz mount -ur / That being said, Perl is installed: Code:
This is perl 5, version 18, subversion 2 (v5.18.2 (*)) built for i386-openbsd (with 1 registered patch, see perl -V for more detail) Mostly I'm just frustrated that OpenBSD apparently finds it completely unnecessary to include a pkg_search binary in their OS . Why are we forced to download the entire ports locally just to search by hand? (That's what OpenBSD recommends instead of a standard search function) |
|
||||||
Quote:
Perl is part of the OpenBSD base system, whereas you are trying to search for third-party ports/packages. Perl is always installed as part of OpenBSD and we have developers who ensure that we always have the latest and greatest Perl in base. Quote:
Quote:
You should not follow the above instructions unless you know exactly what you are doing. Quote:
Because it always is... Code:
This is perl 5, version 18, subversion 2 (v5.18.2 (*)) built for i386-openbsd (with 1 registered patch, see perl -V for more detail) Quote:
The version we have in base is 5.18.2--that is much much newer than 5.8.4--I don't understand your issue here? Quote:
|
|
||||
Quote:
The packages list is available here http://ftp.openbsd.org/pub/OpenBSD/5.6/packages/
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD |
|
|||
Quote:
Example (games/beret, my first port): Code:
/home/brian $ pkg_info beret Information for http://mirrors.nycbug.org/pub/OpenBSD/snapshots/packages/amd64/beret-1.2.1pl1p0.tgz Comment: 2D puzzle-platformer game Description: Beret is a 2D puzzle-platformer game about a scientist, astonishingly named Beret, who has gained telekinetic abilities through his research at the Evil Corporation. He decides that the Evil Corporation is a tad too evil for his liking, and begins his solitary quest to overthrow the corporation and punish the evil deeds of his employers. Maintainer: Brian Callahan <bcallah@openbsd.org> WWW: http://kiwisauce.com/beret/ |
|
|||
Perl is part of the base OS. The OpenBSD package tools are written in Perl:
Code:
$ file $(which pkg_add) /usr/sbin/pkg_add: a /usr/bin/perl script text executable $ file $(which pkg_info) /usr/sbin/pkg_info: a /usr/bin/perl script text executable $ file $(which pkg_delete) /usr/sbin/pkg_delete: a /usr/bin/perl script text executable The makers of the Perl framework Mojolicious recommend to use Perlbrew : Quote:
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump Last edited by J65nko; 28th March 2015 at 01:52 AM. |
|
||||
Quote:
Or the Openbsd manual pages, a goldmine.
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD |
|
||||
Hello again.
1. Searching for third party ports and packages The ports/package system has several 3rd party search tools. One of the handiest is the pkglocatedb package. Install that with pkg_add, and you'll have a tool that can be used to search through every package available, using locate(1). Click on this link databases/pkglocatedb for more details... which is another handy location for searching for ports/packages. Its one of two different external, unofficial websites that track the OpenBSD ports repository. It keeps up with -current but you can still find details about packages available at -release or -stable. The "classic" search tool is the ports tree itself. Install it on your system, and you can use $ make search key=<keyword> to find things in /usr/ports/INDEX. More details about this can be found in FAQ 15.2. Filesets vs. 3rd party packages. Perl is included in OpenBSD as a built-in application. It was installed when you first installed OpenBSD 5.6 release, as it is a critical part of OpenBSD's infrastructure. Many of the tools used in OpenBSD are written in Perl, so it is not a 3rd party port/package you install afterwards. Not only is it Perl 5.18.2, it is that version of Perl plus necessary patches to Perl needed for operation on OpenBSD. When you install OpenBSD, you select kernels and filesets to install. Filesets are tarballs that are unpacked into the root directory at installation time, or, after installation if you discover you need one you chose not to install. You selected (or let the installation script select) base56.tgz, etc56.tgz, and perhaps additional filesets such as comp56.tgz and xbase56.tgz. The procedure to manually installing "missing' filesets is detailed in FAQ 4.11, "Adding filesets after install." Third party packages are NOT part of the OS. They are applications managed by other projects that have been ported to run on OpenBSD. FAQ 15 describes OpenBSD's ports and packages system. New users are sometimes confused between filesets and packages. They both end in .tgz, but the similarity ends there. They are tarballs "plus" a siginifant amount of additional information: dependency requirements, build-time library details, and if built by the Project they include cryptographic signatures. By the way, the package tools that help you administer your packages (pkg_add, pkg_info, and pkg_delete) are written in Perl. |
|
||||
Quote:
http://openports.se/sysutils/pkg_mgr Last edited by Oko; 28th March 2015 at 04:58 AM. |
|
|||
and pbrowser , a frontend to the ports.
of the four BSDs , OpenBSD seems to be the most ready-to-go out of the box (except for a browser... used to be lynx) I find it cool to have a burning tool (cdio) and audited window managers in base. |
|
|||
Thanks guys, I greatly appreciate the information. What's Perl again?
While the man pages are fine and all, it doesn't help when the commands don't work. pkg_info just doesn't seem to have the *behavior* you guys describe. I've run pkg_info apache. This does nothing. I've run pkg_info screen. That does get a hit. 'search' isn't a command or anything, so I omitted it. Code:
Error from https://stable.mtier.org/updates/5.6/i386/apache.tgz ftp: Error retrieving file: 404 Not Found Error from http://ftp5.usa.openbsd.org/pub/Open...386/apache.tgz ftp: Error retrieving file: 404 Not Foun Ahaha, yes. I guess I've been used to places without good documentation. I will give it to BSD, that the documentation is actually worth looking at. RTFM, good stuff. @Oko - that really wasn't helping dude. There's a reason why OpenBSD people have a reputation some times. Thanks for the link though. What I would find useful is working examples of command line searches with pkg_info. Yes, I have a learning curve with OpenBSD. Been about a month, so I apologize for the newbie questions. I also have never written, or knowingly used Perl. As an aside, I somehow just misread the Perl versions. I get it too, Perl is baked right into the center of OpenBSD. That's really nifty since the platform I'm tasked with installing almost uses it entirely in the backend. So the Perl aside, I still can't get any search functions against the packages. From reading the man page, it seems you need to add a -e or -E option to perform a search. I am used to Linux, the commands, and the syntax. I could give examples, but there are plenty of minor differences (like tar no longer taking a '-' before the options). I'm working to pick it up, but OpenBSD is a *very* different system from say CentOS. A working example of a search would be awesome and extremely appreciated (as opposed to man pkg_info). I consistently get 'invalid spec' for most of the commands. Also, 5.18.2 perhaps isn't the latest Perl you can get on OpenBSD 5.6 if anyone has a need for a more recent version of Perl like I thought I did. Code:
This is perl 5, version 20, subversion 2 (v5.20.2) built for i386-openbsd Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. |
|
||||
Ho-kay, lets start with two tools I recommended.
1. The Ports Tree. This is something that doesn't come with the default installation, you have to obtain it separately. But, it's a key component of OpenBSD. All of the third party packages you can install are built from it. FAQ 15 covers packages and ports, and FAQ 15.3.2 covers obtaining the ports tree tarball for 5.6 from various sources: CD, and the various Project download mirrors. Unpack that tarball in /usr/ports as described, and then, from that directory, you can use $ make search that I described above. Example, on a -current system, of searching for "apache":Code:
$ cd /usr/ports $ make search key=apache Port: apache-couchdb-1.6.1 Path: databases/apache-couchdb Info: distributed, document-oriented database Maint: The OpenBSD ports mailing-list <ports@openbsd.org> Index: databases L-deps: STEM->=0.10.38:devel/gettext converters/libiconv devel/libidn lang/spidermonkey net/curl textproc/icu4c B-deps: STEM->=0.10.38:devel/gettext devel/gmake lang/erlang R-deps: STEM->=0.10.38:devel/gettext lang/erlang Archs: any Port: postgresql-jdbc-9.1.901p3 Path: databases/postgresql-jdbc,-main Info: JDBC Driver for PostgreSQL Maint: Matthias Kilian <kili@openbsd.org> Index: databases java L-deps: B-deps: devel/apache-ant jdk->=1.7.0,<1.8v0:devel/jdk/1.7 R-deps: jdk->=1.7.0 Archs: jre->=1.7.0:devel/jdk/1.7 . . . [2600+ lines snipped] . . . If you install pkglocateb, which I'd recommended above, you can also use that to search for the same keyword: Code:
$ pkglocate apache aircontrol-1.4.2beta:net/aircontrol:/var/aircontrol/docs/licenses/license-apache-2.0.txt ansible-1.8.4:sysutils/ansible:/usr/local/lib/python2.7/site-packages/ansible/modules/core/web_infrastructure/apache2_module.py ansible-1.8.4:sysutils/ansible:/usr/local/lib/python2.7/site-packages/ansible/modules/core/web_infrastructure/apache2_module.pyc ap2-mod_dnssd-0.6:www/ap2-mod_dnssd:/usr/local/lib/apache2/ ap2-mod_dnssd-0.6:www/ap2-mod_dnssd:/usr/local/lib/apache2/mod_dnssd.so ap2-mod_fastcgi-2.4.2p0:www/ap2-mod_fastcgi:/usr/local/lib/apache2/mod_fastcgi.so ap2-mod_fastcgi-2.4.2p0:www/ap2-mod_fastcgi:/usr/local/share/doc/apache2/mod/mod_fastcgi/ ap2-mod_fastcgi-2.4.2p0:www/ap2-mod_fastcgi:/usr/local/share/doc/apache2/mod/mod_fastcgi/LICENSE.TERMS ap2-mod_fastcgi-2.4.2p0:www/ap2-mod_fastcgi:/usr/local/share/doc/apache2/mod/mod_fastcgi/mod_fastcgi.html ap2-mod_fcgid-2.2p2:www/ap2-mod_fcgid:/usr/local/lib/apache2/ ap2-mod_fcgid-2.2p2:www/ap2-mod_fcgid:/usr/local/lib/apache2/mod_fcgid.so . . . [12000+ lines skipped] . . . Last edited by jggimi; 4th April 2015 at 12:43 AM. Reason: clarity, typos |
|
|||
pkg_info only works if you already know the name of the package.
Try 'apache-httpd' for example. As far as I know, it doesn't search, like 'yum search'. You were given a couple options for how to search. Personally, I usually use 'find' in my ports directory, or just look on one of the web mirrors which is how I found apache-httpd. There is some translation between linux and OBSD, especially with all the CentOS bloat, but I find them minor and things are usually much simpler on the OBSD side. Tim. |
|
|||
Issuing:
$ pkg_info | more ...will display the names of all packages currently installed. To the OP, studying the pkg_info(1) will reveal a wealth of information. |
|
|||
Yes, to be clear, I was only referring to the use case that is similar to a 'yum search' which the OP is in need of.
Tim. |
|
||||||
Quote:
Code:
/home/brian $ pkg_info -Q apache apache-activemq-5.11.1 apache-ant-1.9.4 apache-couchdb-1.6.1 apache-httpd-2.2.29p3 apache-httpd-openbsd-1.3.20140502p3 apachetop-0.12.6p0 modsecurity-apache-1.9.3p6 p5-Apache-ASP-2.61p0 p5-Apache-DB-0.14p4 p5-Apache-DBI-0.94p2 p5-Apache-Gallery-1.0.2p1v0 p5-Apache-LogFormat-Compiler-0.32 p5-Apache-MP3-3.05p3 p5-Apache-Reload-0.12p0 p5-Apache-Session-1.83p2 p5-Apache-Session-Generate-UUID-0.2p0 p5-Apache-Session-Memcached-0.03p1 p5-Apache-Test-1.30p2 p5-Catalyst-Engine-Apache-1.16 p5-Config-ApacheFormat-1.2p0 You could also do something like Code:
$ pkg_info -Q apache | xargs pkg_info -I Code:
$ pkg_info -Q apache | xargs pkg_info -c Code:
$ pkg_info -Q apache | xargs pkg_info -d Quote:
Quote:
Quote:
Quote:
Quote:
Or you could do what jggimi described. Don't really need to add to that. |
|
|||
Quote:
I don't even know how many years it took me to stop using 'cat file | more' instead of just 'more file'. Tim. |
|
|||
Thank you very much for the examples. Exactly what I needed. All of you guys are very much appreciated during my learning curve switching to OpenBSD.
Yes, I *really* am reading the man pages. You have to forgive me, for years it what you did on Linux if you just wanted null output for most stuff As a bonus, I generate a lot less traffic to Google. |
Tags |
openbsd perl installation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
new perl! | thirdm | OpenBSD General | 0 | 26th March 2013 03:41 PM |
Perl 5.16.0 now available | J65nko | News | 1 | 22nd May 2012 05:37 PM |
Perl 5.12.3 released | J65nko | News | 0 | 26th January 2011 11:00 AM |
Perl locale | Theta | OpenBSD General | 3 | 9th January 2009 01:59 PM |
perl/tk | bsdnewbie999 | OpenBSD Packages and Ports | 4 | 8th August 2008 12:34 AM |