fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

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

fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

dev
Hello all.

I had an old Sun sparc server and really wanted to install something
current and interesting on it.  Something not Solaris/Oracle and
definately open source and not linux. Therefore I arrived at OpenBSD
and the install was trivial. Easy. I was very pleasantly surprised
by that.

After install and first boot I was able to login via the console and
create my user account with the usual .ssh directory contents and then
ssh in no problem.  Great stuff.  Then I wanted to use wget to fetch
the sources to GNU make. I saw that I had no "wget" in my path or
anywhere that I could see.  So I did some hunting about and landed on
pages that talked about pkg_add and the PKG_PATH environment variable.
Therefore I tried this :

#
PKG_PATH=http://athena.caslab.queensu.ca/pub/OpenBSD/snapshots/packages/sparc64/
# export PKG_PATH
# pkg_add wget
Unknown element: @signer 55pkg in SCALAR(0x101b108e210),  at
/usr/libdata/perl5/OpenBSD/PackingList.pm line 306, <$fh> line 3.
#

Am I doing the correct things here or am I way way off base?  I am very
familiar with Solaris and how to install packages there as well as the
Debian linux way of things. So just looking for pointers in case I am
just lost.

dc

Reply | Threaded
Open this post in threaded view
|

Re: fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

Mats O Jansson
On Sun, 9 Feb 2014, dev wrote:

> Hello all.
>
> I had an old Sun sparc server and really wanted to install something
> current and interesting on it.  Something not Solaris/Oracle and
> definately open source and not linux. Therefore I arrived at OpenBSD
> and the install was trivial. Easy. I was very pleasantly surprised
> by that.
>
> After install and first boot I was able to login via the console and
> create my user account with the usual .ssh directory contents and then
> ssh in no problem.  Great stuff.  Then I wanted to use wget to fetch
> the sources to GNU make. I saw that I had no "wget" in my path or
> anywhere that I could see.  So I did some hunting about and landed on
> pages that talked about pkg_add and the PKG_PATH environment variable.
> Therefore I tried this :
>
> #
> PKG_PATH=http://athena.caslab.queensu.ca/pub/OpenBSD/snapshots/packages/sparc64/

Since you installed 5.4 you cant use snapshots packages. Replace snapshots
in the PKG_PATH with 5.4 and all should be ok.

-moj

> # export PKG_PATH
> # pkg_add wget
> Unknown element: @signer 55pkg in SCALAR(0x101b108e210),  at
> /usr/libdata/perl5/OpenBSD/PackingList.pm line 306, <$fh> line 3.
> #
>
> Am I doing the correct things here or am I way way off base?  I am very
> familiar with Solaris and how to install packages there as well as the
> Debian linux way of things. So just looking for pointers in case I am
> just lost.
>
> dc

dev
Reply | Threaded
Open this post in threaded view
|

Re: fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

dev
<snip>
>
> Since you installed 5.4 you cant use snapshots packages. Replace
> snapshots
> in the PKG_PATH with 5.4 and all should be ok.
>
> -moj
>

Awesome.

Firstly I just want to say that the response time on this maillist had
me jump backwards .. wow .. amazing. Thank you so very much.

I just tried this :

PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`arch
-s`/
export PKG_PATH
# pkg_add -nv wget
wget-1.14p0:pcre-8.33: ok
wget-1.14p0:libiconv-1.14p0: ok
wget-1.14p0:gettext-0.18.2p3: ok
wget-1.14p0:libidn-1.27: ok
wget-1.14p0: ok

So the dry run looks good ... therefore :

# pkg_add -v wget
wget-1.14p0:libiconv-1.14p0: ok
wget-1.14p0:gettext-0.18.2p3: ok
wget-1.14p0:libidn-1.27: ok
wget-1.14p0:pcre-8.33: ok
wget-1.14p0: ok
Weird subject line in /usr/local/man/cat3/pcre16.0:
 #include <pcre.h>
Weird subject line in /usr/local/man/cat3/pcre32.0:
 #include <pcre.h>
Weird subject line in /usr/local/man/cat3/pcreapi.0:
 #include <pcre.h>
No subject found in /usr/local/man/cat3/pcredemo.0

A few odd messages. hrmmm ... okay.  No SSL or Zlib bits either.
That looks to be correct.  I am surprised that libssl and some crypto
libs are not required but then again, this is OpenBSD and not Solaris
so I guess I should expect to see some new things.

In my Solaris world I see this :

$ ldd /usr/local/bin/wget
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libintl.so.8 =>  /usr/local/lib/libintl.so.8
        libc.so.1 =>     /lib/64/libc.so.1
        libssl.so.1.0.0 =>       /usr/local/ssl/lib/libssl.so.1.0.0
        libcrypto.so.1.0.0 =>    /usr/local/ssl/lib/libcrypto.so.1.0.0
        libz.so.1 =>     /usr/local/lib/libz.so.1
        libdl.so.1 =>    /lib/64/libdl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libuuid.so.1 =>  /lib/64/libuuid.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        /platform/SUNW,T5240/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,T5240/lib/sparcv9/libmd_psr.so.1

Here in my new OpenBSD server I now see :

$ /usr/local/bin/wget --version
GNU Wget 1.14 built on solaris2.10.

+digest +https +ipv6 -iri +large-file +nls +ntlm +opie +ssl/openssl
etc etc ...

# ldd /usr/local/bin/wget
/usr/local/bin/wget:
        Start            End              Type Open Ref GrpRef Name
        00000088ae500000 00000088aeb9a000 exe  1    0   0
     /usr/local/bin/wget
        0000008ab0734000 0000008ab0d96000 rlib 0    1   0
     /usr/lib/libssl.so.19.0
        0000008ab3d64000 0000008ab4526000 rlib 0    1   0
     /usr/lib/libcrypto.so.22.0
        0000008ab1a34000 0000008ab204a000 rlib 0    1   0
     /usr/lib/libz.so.4.1
        0000008ab0d98000 0000008ab13cc000 rlib 0    1   0
     /usr/local/lib/libidn.so.17.0
        0000008abb8d8000 0000008abbf1c000 rlib 0    1   0
     /usr/local/lib/libpcre.so.3.0
        0000008ab2ec8000 0000008ab34d4000 rlib 0    2   0
     /usr/local/lib/libintl.so.6.0
        0000008ab4528000 0000008ab4c30000 rlib 0    3   0
     /usr/local/lib/libiconv.so.6.0
        0000008aba9e8000 0000008abb0f0000 rlib 0    1   0
     /usr/lib/libc.so.69.0
        0000008ab5f00000 0000008ab5f00000 rtld 0    1   0
     /usr/libexec/ld.so

# /usr/local/bin/wget --version
GNU Wget 1.14 built on openbsd5.4.

+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl


Very cool .. however I don't know what it installed into /usr/local but
I guess I can learn to live with that being a "do not touch" vendor
area as opposed to a "user may modify" area.

dc

Reply | Threaded
Open this post in threaded view
|

Re: fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

Cory Smelosky
On Sun, 9 Feb 2014, dev wrote:

<trimmed>
>
> Very cool .. however I don't know what it installed into /usr/local but
> I guess I can learn to live with that being a "do not touch" vendor
> area as opposed to a "user may modify" area.
>

It seems to generally be up to the site to determine what /should/ and
/shouldn't/ be the "user may modify" areas. `man hier` provides a
guideline that I think at least a few people follow.  I know Solaris loves
to shove things in /opt. ;)

Using /usr/local for this seems to date to Net/2 from the CSRG BSDs.  I
can't track down SysV man pages to see if coming from Solaris had
different conventions for stuffing files. ( I wonder where /usr/local and
/opt became different things over the years...You then get the
crazy /opt/local and stuff. ;) )

Can anyone else chime in with the history of hier? ;)

> dc
>
>

--
Cory Smelosky
http://gewt.net Personal stuff
http://gimme-sympathy.org Projects

dev
Reply | Threaded
Open this post in threaded view
|

Re: fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

dev
On February 9, 2014 at 3:05 AM Cory Smelosky <[hidden email]> wrote:

> On Sun, 9 Feb 2014, dev wrote:
>
> <trimmed>
> >
> > Very cool .. however I don't know what it installed into /usr/local
> > but
> > I guess I can learn to live with that being a "do not touch" vendor
> > area as opposed to a "user may modify" area.
> >
>
> It seems to generally be up to the site to determine what /should/ and
> /shouldn't/ be the "user may modify" areas. `man hier` provides a
> guideline that I think at least a few people follow.  I know Solaris
> loves
> to shove things in /opt. ;)

Actually the specification states that all vendor software lives in
the /usr area and things that are from elsewhere must go to /opt/foo
where "foo" is the vendor name.  Therefore we see MySQL gets installed
into /opt/mysql for example. Logging must go to /var/opt/foo and config
must go to /etc/opt/foo area. Those are just very old rules that protect
the operating system from being mucked with and also to ensure that no
one drops a lib into someplace  searched by the runtime linker. Kaboom
is never a nice thing.

>
> Using /usr/local for this seems to date to Net/2 from the CSRG BSDs.
>  I
> can't track down SysV man pages to see if coming from Solaris had
> different conventions for stuffing files. ( I wonder where /usr/local
> and
> /opt became different things over the years...You then get the
> crazy /opt/local and stuff. ;) )
>
> Can anyone else chime in with the history of hier? ;)
>


I have to look around and get familiar with this new land. Thus far I
really like what I see. It is darn easy to install. I mean trivial. You
gotta love that. After install there are some setup thingies that I
need to look into. I don't quite get what is going on with ntpd.conf
and I need to figure out how to lock down the server to listen for
ssh connections and not much else. In fact, I like to set ssh to listen
on port 443 unless I have Apache running, which I don't yet. I find
that running ssh server to listen on 443 gets rid of the ba-zillion
silly login attempts by folks trying to use a password for root and
other common account names. I mean really, people still use passwords
out there?

Anyways, I really like what I see and with luck I will get to a point
where I can bootstrap GCC without too much magic.

dc

Reply | Threaded
Open this post in threaded view
|

Re: fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

Cory Smelosky
On Sun, 9 Feb 2014, dev wrote:

>
>
> Actually the specification states that all vendor software lives in
> the /usr area and things that are from elsewhere must go to /opt/foo
> where "foo" is the vendor name.  Therefore we see MySQL gets installed
> into /opt/mysql for example. Logging must go to /var/opt/foo and config
> must go to /etc/opt/foo area. Those are just very old rules that protect
> the operating system from being mucked with and also to ensure that no
> one drops a lib into someplace  searched by the runtime linker. Kaboom
> is never a nice thing.
>

Solaris' way of doing it is certainly a bit more...complex.  It keeps
things a lot neater, though.  Look at linux with /opt AND /usr/local,
though!

>>
>> Using /usr/local for this seems to date to Net/2 from the CSRG BSDs.
>>  I
>> can't track down SysV man pages to see if coming from Solaris had
>> different conventions for stuffing files. ( I wonder where /usr/local
>> and
>> /opt became different things over the years...You then get the
>> crazy /opt/local and stuff. ;) )
>>
>> Can anyone else chime in with the history of hier? ;)
>>
>
>
> I have to look around and get familiar with this new land. Thus far I
> really like what I see. It is darn easy to install. I mean trivial. You
> gotta love that. After install there are some setup thingies that I
> need to look into. I don't quite get what is going on with ntpd.conf
> and I need to figure out how to lock down the server to listen for
> ssh connections and not much else. In fact, I like to set ssh to listen
> on port 443 unless I have Apache running, which I don't yet. I find
> that running ssh server to listen on 443 gets rid of the ba-zillion
> silly login attempts by folks trying to use a password for root and
> other common account names. I mean really, people still use passwords
> out there?
>

OpenBSD is definitely a bit different coming from Solaris. ;)  There's no
svcadm, however.  I actually LIKE svcadm!

You could keep ssh on 22 but install fail2ban.  I _think_ fail2ban can
hook in to pf.  You'll definitely want to take a crack at pf though.  See
the manpages for it.  It's absurdly powerful...there's good documentation
on the website, too.

> Anyways, I really like what I see and with luck I will get to a point
> where I can bootstrap GCC without too much magic.

Shame clang doesn't support SPARC well yet. :(

>
> dc
>
>

--
Cory Smelosky
http://gewt.net Personal stuff
http://gimme-sympathy.org Projects

Reply | Threaded
Open this post in threaded view
|

Re: fresh install of OpenBSD 5.4 on an old Sparc server fails to install wget

Stuart Henderson-6
In reply to this post by dev
On 2014/02/09 02:46, dev wrote:

> # pkg_add -v wget
> wget-1.14p0:libiconv-1.14p0: ok
> wget-1.14p0:gettext-0.18.2p3: ok
> wget-1.14p0:libidn-1.27: ok
> wget-1.14p0:pcre-8.33: ok
> wget-1.14p0: ok
> Weird subject line in /usr/local/man/cat3/pcre16.0:
>  #include <pcre.h>
> Weird subject line in /usr/local/man/cat3/pcre32.0:
>  #include <pcre.h>
> Weird subject line in /usr/local/man/cat3/pcreapi.0:
>  #include <pcre.h>
> No subject found in /usr/local/man/cat3/pcredemo.0
>
> A few odd messages. hrmmm ... okay.

Those come from makewhatis(8) (or to be more exact, the perl module
behind makewhatis which is called directly by pkg_add) - they're
unsightly but can be ignored. They are actually hidden in -current
unless you use pkg_add -vv (this is a very recent change, it
pre-dated your email by a couple of hours ;)

Side-note, pcredemo(3) is a *very* strange man page!

> No SSL or Zlib bits either.
> That looks to be correct.  I am surprised that libssl and some crypto
> libs are not required but then again, this is OpenBSD and not Solaris
> so I guess I should expect to see some new things.

There's a split between programs/libraries which are part of the base
system, and those which come from packages. libssl, libz etc. are part
of the base system and live in /usr/lib, whereas libiconv, libintl etc.
are part of packages which live (mostly) in /usr/local/lib.

> Very cool .. however I don't know what it installed into /usr/local but

"pkg_info -f wget" shows the packing list for wget, which includes all
the files associated with that package (and various annotations; sha hashes,
file sizes, library dependencies, etc).

> I guess I can learn to live with that being a "do not touch" vendor
> area as opposed to a "user may modify" area.

It's simpler that way - might be better to use a different base location
if there are things you need to install yourself from source - less chance
of accidentally interfering with files from packages that way. If you
use pkg_check(8) you'll find it complains about files under /usr/local
which aren't associated with a package.