Hitchhiker's Guide to Openbsd


- Searching the ports tree


Download 1.27 Mb.
Pdf ko'rish
bet248/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   244   245   246   247   248   249   250   251   ...   258
Bog'liq
obsd-faq49

15.3.4 - Searching the ports tree
Once you have the ports tree in place on your system, it becomes very easy to search for software. Just 
use 
make search key="searchkey"
, as shown in the following example. 
cd /usr/ports
make search key=rsnapshot
Port: rsnapshot-1.3.1p0
Path: net/rsnapshot
Info: remote filesystem snapshot utility
Maint: Antoine Jacoutot
Index: net sysutils
L-deps:
B-deps: :net/rsync
R-deps: :devel/p5-Lchown :net/rsync
Archs: any
http://www.openbsd.org/faq/faq15.html (14 of 27)9/4/2011 10:02:29 AM


15 - The OpenBSD packages and ports system
The search result gives a nice overview of each application that is found: the port name, the path to the 
port, a one-line description, the port's maintainer, keywords related to the port, library/build/runtime 
dependencies, and architectures on which the port is known to work. 
This mechanism, however, is a very basic one, which just runs awk(1) on the ports index file. Since 
OpenBSD 4.0, a new port called "sqlports" has been created, allowing very fine-grained searching using 
SQL. It is a SQLite database, but basically just about any database format can be created using the ports 
infrastructure. The sqlports port includes the script used to generate the database, which could be used as 
a basis to generate databases in different formats. 
Just pkg_add(1) the sqlports package, and in this case, the sqlite3 package to get started. A sample 
session could look like: 
$ sqlite3 /usr/local/share/sqlports
SQLite version 3.3.12
Enter ".help" for instructions
sqlite> SELECT FULLPKGNAME,COMMENT FROM Ports WHERE COMMENT 
LIKE '%statistics%'; 
Guppi-0.40.3p1|GNOME-based plot program with statistics 
capabilities
mailgraph-1.12|a RRDtool frontend for Postfix statistics
R-2.4.1|clone of S, a powerful math/statistics/graphics 
language
py-probstat-0.912p0|probability and statistics utilities 
for Python
darkstat-3.0.540p1|network statistics gatherer with graphs
pfstat-2.2p0|packet filter statistics visualization
tcpstat-1.4|report network interface statistics
wmwave-0.4p2|Window Maker dockapp to display wavelan 
statistics
diffstat-1.43p0|accumulates and displays statistics from a 
diff file
sqlite>
The above is still a very basic search. With SQL, just about anything can be searched for, including 
dependencies, configure flags, shared libraries, etc. 

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   244   245   246   247   248   249   250   251   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling