How to find all package files

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

How to find all package files

Russell Gadd-2
I am new to OpenBSD and I am not sure what is the correct way to find
packages.

For example I have tried to install the xfce window manager, and at
first I looked at the list of files in the packages list and there were
a lot of files with xfce in the name / description. I looked for one
which said something like "this is the main package for xfce4" so that
installing that and all dependencies would do the job, but couldn't find
such a file. I resorted to looking for xfce in the INDEX and using all
files where this was mentioned, i.e. forming a list with
 
grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
/tmpdir/xfce4pkglist

then
pkg_add `cat /tmpdir/xfce4pkglist`

I realise that for such a package there would be some parts which were
optional, so needed to be separated out, but I thought there must be a
more reliable way to determine which files to include.

Is there a better way to do this?

Russell

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Harpalus a Como
OpenBSD doesn't contain metapackages. There's no single package that
installs all of XFCE for you. Install the necessary components and
applications from the x11/xfce4 category. (http://ports.openbsd.nu/x11/xfce4)
Here's a "tutorial" on bsdforums that will help by detailing what to install
to obtain the theoretically lightest possible XFCE installation. [
http://www.bsdforums.org/forums/showthread.php?t=47695]

Installing the ports tree is a convenient way to browse what software
OpenBSD has available to install. ports.openbsd.nu is a very good resource,
as well.

On Jan 7, 2008 10:33 AM, Russell Gadd <[hidden email]>
wrote:

> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.
>
> For example I have tried to install the xfce window manager, and at
> first I looked at the list of files in the packages list and there were
> a lot of files with xfce in the name / description. I looked for one
> which said something like "this is the main package for xfce4" so that
> installing that and all dependencies would do the job, but couldn't find
> such a file. I resorted to looking for xfce in the INDEX and using all
> files where this was mentioned, i.e. forming a list with
>
> grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
> /tmpdir/xfce4pkglist
>
> then
> pkg_add `cat /tmpdir/xfce4pkglist`
>
> I realise that for such a package there would be some parts which were
> optional, so needed to be separated out, but I thought there must be a
> more reliable way to determine which files to include.
>
> Is there a better way to do this?
>
> Russell

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Josh Grosse
In reply to this post by Russell Gadd-2
On Mon, 07 Jan 2008 15:33:22 +0000, Russell Gadd wrote
> I am new to OpenBSD and I am not sure what is the correct way to
> find packages.
>
> For example I have tried to install the xfce window manager... and at
> first I looked at the list of files in the packages list and there
> were a lot of files with xfce in the name / description....
> ....Is there a better way to do this?

I use the ports tree.  eg:

$ cd /usr/ports/x11/xfce4
$ make show=PKGNAME | awk '{if (NF==1) print $1' > list.of.xfce.packages

You can then poke through that list and delete things without interest.

You might also want to grep each Makefile looking for ports marked broken,
there are a couple, including lua-graph, if memory serves.

To install your list, use something like:

# pkg_add -i `cat list.of.xfce.packages`

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Darrin Chandler
In reply to this post by Russell Gadd-2
On Mon, Jan 07, 2008 at 03:33:22PM +0000, Russell Gadd wrote:

> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.
>
> For example I have tried to install the xfce window manager, and at first I
> looked at the list of files in the packages list and there were a lot of
> files with xfce in the name / description. I looked for one which said
> something like "this is the main package for xfce4" so that installing that
> and all dependencies would do the job, but couldn't find such a file. I
> resorted to looking for xfce in the INDEX and using all files where this
> was mentioned, i.e. forming a list with
> grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
> /tmpdir/xfce4pkglist
>
> then
> pkg_add `cat /tmpdir/xfce4pkglist`
>
> I realise that for such a package there would be some parts which were
> optional, so needed to be separated out, but I thought there must be a more
> reliable way to determine which files to include.
>
> Is there a better way to do this?

Normally just looking at the packages list will work fine. Xfce4 is
tricky, as I found out not long ago. Look for 'xfwm' packages for the
main ones.

--
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
[hidden email]   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Peter Nicolai Mathias Hansteen
In reply to this post by Russell Gadd-2
Russell Gadd <[hidden email]> writes:

> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.

The best way is to set the PKG_PATH variable to something sensible
such as the relevant release and architecture's packages directory at
your closest mirror, then use pkg_add.  That program is very good at
handling dependencies if you let it. All the info you need in order to
get started is in the faq at http://www.openbsd.org/faq/faq15.html

- P
--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.datadok.no/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

L. V. Lammert
In reply to this post by Russell Gadd-2
At 03:33 PM 1/7/2008 +0000, Russell Gadd wrote:

>I am new to OpenBSD and I am not sure what is the correct way to find
>packages.
>
>For example I have tried to install the xfce window manager, and at first
>I looked at the list of files in the packages list and there were a lot of
>files with xfce in the name / description. I looked for one which said
>something like "this is the main package for xfce4" so that installing
>that and all dependencies would do the job, but couldn't find such a file.
>I resorted to looking for xfce in the INDEX and using all files where this
>was mentioned, i.e. forming a list with
>grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' > /tmpdir/xfce4pkglist

export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/`uname -a | cut -d" " -f
3`/packages/`uname -a | cut -d" " -f 5`/
alias pkg_find="echo ls | ftp -a $PKG_PATH | sed 's/.*\ //g' | grep -i "

pkg_find shows a list of packages with the search string in the name, ..
just copy/paste for pkg_add.

         Lee

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Vijay Sankar
In reply to this post by Russell Gadd-2
On January 7, 2008 09:33:22 am Russell Gadd wrote:

> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.
>
> For example I have tried to install the xfce window manager, and at
> first I looked at the list of files in the packages list and there were
> a lot of files with xfce in the name / description. I looked for one
> which said something like "this is the main package for xfce4" so that
> installing that and all dependencies would do the job, but couldn't find
> such a file. I resorted to looking for xfce in the INDEX and using all
> files where this was mentioned, i.e. forming a list with
>
> grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
> /tmpdir/xfce4pkglist
>
> then
> pkg_add `cat /tmpdir/xfce4pkglist`
>
> I realise that for such a package there would be some parts which were
> optional, so needed to be separated out, but I thought there must be a
> more reliable way to determine which files to include.
>
> Is there a better way to do this?
>
> Russell

Did you look at http://www.openbsd.org/4.2_packages/i386.html ?

--
Vijay Sankar, M.Eng., P.Eng.
President & CEO
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB Canada R3J 0X6
Phone: +1 204 885 9535, E-Mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Serge Basterot-2
In reply to this post by Russell Gadd-2
On Mon, Jan 07, 2008 at 03:33:22PM +0000, Russell Gadd wrote:

[...]

> I realise that for such a package there would be some parts which were
> optional, so needed to be separated out, but I thought there must be a
> more reliable way to determine which files to include.
>
> Is there a better way to do this?

Yes sure :

$ cd /usr/ports
$ make search key=xfce

And when you find a package "make search name=<what-you-want>"

There are others options you could use, man 7 ports is your friend

--
Serge

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Stuart Henderson
In reply to this post by Russell Gadd-2
On 2008/01/07 15:33, Russell Gadd wrote:
> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.

I don't think there is one "correct" way - you can use the ports tree
as a browser. If you know SQL, you can install sqlite, sqlports (and
maybe a graphical query editor like sqliteman) and search that way.
Another alternative that some people find easier is to use a website
like http://ports.openbsd.nu/.

> For example I have tried to install the xfce window manager,

In the case of xfce, you're in luck, this was just committed:
http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/xfce4/xfce4-session/files/README.OpenBSD?rev=1.1&content-type=text/x-cvsweb-markup

It refers to the newer xfce version in -current but should get
you started.

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

badeguruji
In reply to this post by Russell Gadd-2
1. to find list of installed files/pkg:
$ locate

2. /var/db/pkg has list of all installed pkgs

3. get list of online pkgs:
$ cat online_pkg_list
# to download list of latest online pkgs available:
today=`date "+%Y%m%d"`
ftp -o ~/mydata/online_pkgs.$today ftp://anonymous:[hidden email]/pub/OpenBSD/4.2/packages/i386/index.txt
$

4.  now getting details of the above pkgs  from website. so that i can browse the file locally for the info i am looking for:

$  cat get_pkg_detail
#get details on the pkgs available online:

today=`date "+%m%d"`
 
touch ~/localpkgdir/pkg_details.$today; rm ~/localpkgdir/pkg_details.$today
 
for pkg in `cat ~/localpkgdir/online_pkgs.$today`
do
echo "Details for $pkg" >> ~/localpkgdir/pkg_details.$today
lynx -dump http://www.openbsd.org/4.2_packages/i386/$pkg-long.html >> ~/localpkgdir/pkg_details.$today 2>~
/localpkgdir/pkg_details_err_tmp
grep -i startfile ~/localpkgdir/pkg_details_err_tmp >> ~/localpkgdir/pkg_details_err
echo "-----------------------------------------------------------------------------------" >> ~/localpkgdi
r/pkg_details.$today
echo "-----------------------------------------------------------------------------------" >> ~/localpkgdi
r/pkg_details.$today
echo >> ~/localpkgdir/pkg_details.$today
echo >> ~/localpkgdir/pkg_details.$today
done
 
# now retrying errored URLs
 
for url in `awk '{print $NF}' ~/localpkgdir/pkg_details_err`
do
echo "Details for $url" >> ~/localpkgdir/pkg_details.$today
lynx -dump $url >> ~/localpkgdir/pkg_details.$today
echo "-----------------------------------------------------------------------------------" >> ~/localpkgdi
r/pkg_details.$today
echo "-----------------------------------------------------------------------------------" >> ~/localpkgdi
r/pkg_details.$today
echo >> ~/localpkgdir/pkg_details.$today
echo >> ~/localpkgdir/pkg_details.$today
done

thx.
-BG


________________________________
~~aapka kalyan ho~~

----- Original Message ----
From: Russell Gadd <[hidden email]>
To: [hidden email]
Sent: Monday, January 7, 2008 9:33:22 AM
Subject: How to find all package files


I am new to OpenBSD and I am not sure what is the correct way to find
packages.

For example I have tried to install the xfce window manager, and at
first I looked at the list of files in the packages list and there were
 
a lot of files with xfce in the name / description. I looked for one
which said something like "this is the main package for xfce4" so that
installing that and all dependencies would do the job, but couldn't
 find
such a file. I resorted to looking for xfce in the INDEX and using all
files where this was mentioned, i.e. forming a list with
 
grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
/tmpdir/xfce4pkglist

then
pkg_add `cat /tmpdir/xfce4pkglist`

I realise that for such a package there would be some parts which were
optional, so needed to be separated out, but I thought there must be a
more reliable way to determine which files to include.

Is there a better way to do this?

Russell

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Ted Unangst-2
In reply to this post by L. V. Lammert
On 1/7/08, L. V. Lammert <[hidden email]> wrote:

> export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/`uname -a | cut -d" " -f
> 3`/packages/`uname -a | cut -d" " -f 5`/
> alias pkg_find="echo ls | ftp -a $PKG_PATH | sed 's/.*\ //g' | grep -i "

uname -m and uname -r would be a lot simpler.

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Landry Breuil-4
In reply to this post by Russell Gadd-2
On Jan 7, 2008 4:33 PM, Russell Gadd <[hidden email]> wrote:

> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.
>
> For example I have tried to install the xfce window manager, and at
> first I looked at the list of files in the packages list and there were
> a lot of files with xfce in the name / description. I looked for one
> which said something like "this is the main package for xfce4" so that
> installing that and all dependencies would do the job, but couldn't find
> such a file. I resorted to looking for xfce in the INDEX and using all
> files where this was mentioned, i.e. forming a list with
>
> grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
> /tmpdir/xfce4pkglist
>
> then
> pkg_add `cat /tmpdir/xfce4pkglist`
>
> I realise that for such a package there would be some parts which were
> optional, so needed to be separated out, but I thought there must be a
> more reliable way to determine which files to include.
>
> Is there a better way to do this?

I recently added a README.OpenBSD to xfce4-session, this may help you
(concerns -current, but may be probably applied to -stable)
see http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/xfce4/xfce4-session/files/README.OpenBSD?rev=1.1&content-type=text/x-cvsweb-markup

And no, there is no meta-package and things like that.
Landry

Reply | Threaded
Open this post in threaded view
|

Re: How to find all package files

Bernd Ahlers
In reply to this post by Russell Gadd-2
Russell Gadd [Mon, Jan 07, 2008 at 03:33:22PM +0000] wrote:

> I am new to OpenBSD and I am not sure what is the correct way to find
> packages.
>
> For example I have tried to install the xfce window manager, and at first I
> looked at the list of files in the packages list and there were a lot of
> files with xfce in the name / description. I looked for one which said
> something like "this is the main package for xfce4" so that installing that
> and all dependencies would do the job, but couldn't find such a file. I
> resorted to looking for xfce in the INDEX and using all files where this was
> mentioned, i.e. forming a list with
>
> grep "xfce" INDEX | cut -d "|" -f 1 | sed 's/$/.tgz/g' >
> /tmpdir/xfce4pkglist
>
> then
> pkg_add `cat /tmpdir/xfce4pkglist`
>
> I realise that for such a package there would be some parts which were
> optional, so needed to be separated out, but I thought there must be a more
> reliable way to determine which files to include.
>
> Is there a better way to do this?
>
Set PKG_PATH and use 'pkg_info -Q xfce'.

Bernd