two questions about packages, library and module

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

two questions about packages, library and module

Shoufu Luo
Hi all,

Several questions:

1. How can I know exactly what packages/libraries/modules installed (and
loaded)?

It seems 'pkg-config --list-all' does not provide all libraries listed, for
example, libpcap is installed, but pkg-config fails to list it

Is there any tool like  'lsmod/insmod/rmmod' in Linux in Openbsd? Some one
pointed me to 'lkm', however, it seems it is only a API. I need write my
own tool to list all modules loaded?

2. How can I build a package from source code tree?

I want to build and install 'pthread' from source code tree. However, there
are only three folders in the /usr/src/lib/libpthread/, and no souce code.
Why?


Thanks,
Shoufu

---
No randomness.

Reply | Threaded
Open this post in threaded view
|

Re: two questions about packages, library and module

Zé Loff-2
On Mar 14, 2013, at 5:54 PM, Sean Shoufu Luo <[hidden email]> wrote:

> Hi all,
>
> Several questions:
>
> 1. How can I know exactly what packages/libraries/modules installed (and
> loaded)?

man pkg_info
man ldconfig (hint: look for the -r option)

> Is there any tool like  'lsmod/insmod/rmmod' in Linux in Openbsd? Some one
> pointed me to 'lkm', however, it seems it is only a API. I need write my
> own tool to list all modules loaded?

man modstat
man modload
man modunload

Although I'm pretty sure you'll be disappointed, because I
think you don't really know what you are looking for and/or dealing
with.

Cheers


Reply | Threaded
Open this post in threaded view
|

Re: two questions about packages, library and module

Ted Unangst-6
In reply to this post by Shoufu Luo
On Thu, Mar 14, 2013 at 13:54, Sean Shoufu Luo wrote:
> 1. How can I know exactly what packages/libraries/modules installed (and
> loaded)?

pkg_info

> It seems 'pkg-config --list-all' does not provide all libraries listed, for
> example, libpcap is installed, but pkg-config fails to list it

libpcap isn't part of a package. It's just included in base.
You may want to read http://www.openbsd.org/faq/faq15.html

Actually, you should probably read the whole FAQ.

> Is there any tool like  'lsmod/insmod/rmmod' in Linux in Openbsd? Some one
> pointed me to 'lkm', however, it seems it is only a API. I need write my
> own tool to list all modules loaded?

You should look at the SEE ALSO section of man lkm, such as the
reference to modstat. But since there aren't any modules by default,
the answer is pretty easy: there are no modules loaded.

>
> 2. How can I build a package from source code tree?
>
> I want to build and install 'pthread' from source code tree. However, there
> are only three folders in the /usr/src/lib/libpthread/, and no souce code.
> Why?

The libpthread code now lives in src/lib/librthread.

Reply | Threaded
Open this post in threaded view
|

Re: two questions about packages, library and module

Stuart Henderson
In reply to this post by Shoufu Luo
On 2013-03-14, Sean Shoufu Luo <[hidden email]> wrote:
> 2. How can I build a package from source code tree?

Unlike Linux distributions but like many other OS, the base OS
is *not* kept in packages at all, it is a set of .tgz files
which are updated together, outside of the package system.