Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pkg questions

2 views
Skip to first unread message

William A. Mahaffey III

unread,
Jul 16, 2015, 12:41:15 PM7/16/15
to


.... I have been reading up on the pkg_* system used on my NetBSD 6.1.5
server, 2 questions pop up: Where is my pkg_install.conf file ? I used
find to poke around under / & /usr & couldn't find it:


4256EE1 # find / -xdev -name pkg_install\*
4256EE1 # find / -xdev -name pkg_install\* -exec ls -lisCF {} +
4256EE1 # find /usr/ -xdev -name pkg_install\* -exec ls -lisCF {} +
2843557 16 /usr/share/man/html5/pkg_install.conf.html 2886444 8
/usr/share/man/man5/pkg_install.conf.5
4256EE1 #

I.e., man page entry, but no file .... Also, is there a pkg_* command to
provide a list of either all available pkgs for installation, or all
available uninstalled pkgs ? Also, how about upgrades for any installed
pkgs ? TIA & have a good one.


--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Greg Troxel

unread,
Jul 16, 2015, 12:49:23 PM7/16/15
to

"William A. Mahaffey III" <w...@hiwaay.net> writes:

> 6.1.5 server, 2 questions pop up: Where is my pkg_install.conf file ?
> I.e., man page entry, but no file

Not a bug, because empty files aren't needed, more or less. It's
/usr/pkg/etc/pkg_install.conf. To figure that out:

$ ktrace pkg_add
$ kdump | egrep NAMI

ktrace is highly useful to figure out what's going on, and casual use is
not hard.

> Also, is there a pkg_* command to provide a list of either all
> available pkgs for installation, or all available uninstalled pkgs ?
> Also, how about upgrades for any installed pkgs ?

See pkgin and nih, both in pkgsrc. They do similar things, and pkgin
seems to have more users. Once you download the binary pkg from
netbsd.org and pkg_add it, you can read its docs and run it.

William A. Mahaffey III

unread,
Jul 16, 2015, 11:56:46 PM7/16/15
to
I don't find pkgin or nih on my system:

4256EE1 # which pkgin
4256EE1 # which pkg_in
4256EE1 # which nih
4256EE1 # uname -a
NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
4256EE1 #

Pilot error ?

Patrick Hess

unread,
Jul 17, 2015, 6:37:32 AM7/17/15
to
William A. Mahaffey III wrote:
> On 07/16/15 11:55, Greg Troxel wrote:
> > See pkgin and nih, both in pkgsrc.
>
> I don't find pkgin or nih on my system:

As Greg said, these are in pkgsrc and you'll have to install
them first using pkg_add.

http://pkgsrc.se/pkgtools/pkgin
http://pkgsrc.se/pkgtools/nih

Patrick

David Lord

unread,
Jul 17, 2015, 7:21:14 AM7/17/15
to
On 16 Jul 2015 at 23:02, William A. Mahaffey III wrote:

> On 07/16/15 11:55, Greg Troxel wrote:
> I don't find pkgin or nih on my system:
>
> 4256EE1 # which pkgin
> 4256EE1 # which pkg_in
> 4256EE1 # which nih
> 4256EE1 # uname -a
> NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
> 4256EE1 #
>
> Pilot error ?

Hi

you can setup pkgsrc either by downloading the tarball
or getting it by cvs.

cd /usr
cvs checkout -rpkgsrc-2015Q2 -P pkgsrc

Above creates and populates the directory /usr/pkgsrc

/usr/pkgsrc/pkgtools/nih
/usr/pkgsrc/pkgtools/pkgin


An alternative is to just download the packages you want.

ftp://ftp.NetBSD.org
/pub/pkgsrc/packages/NetBSD/$(uname -m)/6.1_2015Q2/All


David

William A. Mahaffey III

unread,
Jul 17, 2015, 8:01:03 AM7/17/15
to
On 07/17/15 05:17, David Lord wrote:
> On 16 Jul 2015 at 23:02, William A. Mahaffey III wrote:
>
>> On 07/16/15 11:55, Greg Troxel wrote:
>> I don't find pkgin or nih on my system:
>>
>> 4256EE1 # which pkgin
>> 4256EE1 # which pkg_in
>> 4256EE1 # which nih
>> 4256EE1 # uname -a
>> NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
>> 4256EE1 #
>>
>> Pilot error ?
> Hi
>
> you can setup pkgsrc either by downloading the tarball
> or getting it by cvs.
>
> cd /usr
> cvs checkout -rpkgsrc-2015Q2 -P pkgsrc
>
> Above creates and populates the directory /usr/pkgsrc
>
> /usr/pkgsrc/pkgtools/nih
> /usr/pkgsrc/pkgtools/pkgin
>
>
> An alternative is to just download the packages you want.
>
> ftp://ftp.NetBSD.org
> /pub/pkgsrc/packages/NetBSD/$(uname -m)/6.1_2015Q2/All
>
>
> David


OK, I tried:

4256EE1 # cd /usr/
4256EE1 # cvs checkout -rpkgsrc-2015Q2 -P pkgsrc
cvs checkout: No CVSROOT specified! Please use the `-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.
4256EE1 #

I do recall having to do something similar on this box (FreeBSD
9.3R-p13) last year when I set it up. There everything is installed
under /usr/local, i.e. system pkg's *and* user compiled local stuff (& I
only use it for flash support, nothing else). Where is the
std./canonical place for the pkgsrc root dir ? TIA & have a good one.

P.S. BTW, I intend to maintain this box *solely* from downloaded,
pre-compiled, generic pkg's (as I do this box), not by compiling stuff
up from scratch (by default).

William A. Mahaffey III

unread,
Jul 17, 2015, 8:17:57 AM7/17/15
to
On 07/17/15 05:43, Patrick Hess wrote:
> William A. Mahaffey III wrote:
>> On 07/16/15 11:55, Greg Troxel wrote:
>>> See pkgin and nih, both in pkgsrc.
>> I don't find pkgin or nih on my system:
> As Greg said, these are in pkgsrc and you'll have to install
> them first using pkg_add.
>
> http://pkgsrc.se/pkgtools/pkgin
> http://pkgsrc.se/pkgtools/nih
>
> Patrick


Thanks, very useful. During the install I got some messages about pkg's
built for NetBSD 6.0 & I'm on 6.1.5, is there a different, specific repo
for 6.1.n ? Also, it said something about checking pkg vulnerabilities &
auditing. Can these be implemented through my /etc/security.conf file,
or do I need a separate /etc/security.local, as suggested by the
installer ? TIA & have a good one.

P.S.:

4256EE1 # uname -a
NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
4256EE1 #

0 new messages