Wednesday, April 16, 2014

Automated installation from ports

Building software from ports takes quite a lot of time, especially when using bulky programs like ImageMagick or Apache. For example, if you install ImageMagick you will notice that this program has a lot of dependencies. Dependencies are programs which need to be installed before ImageMagick can be installed; ImageMagick can't work without them. The hardest thing about installing ImageMagick is that you need to be in the vicinity of the computer to confirm the installation of each dependent program. Installation will be delayed until you click "OK" to confirm the installation of every dependent program (by this action you confirm options of the current program). (source)
I could not say it better.

The article is useful, but, as for me, the best was the Dola Marco's comment, which suggested to run:
# make config-recursive
# make -DBATCH install clean
I have tried it and it worked. I ran those commands against Xorg and it was successfully installed while I slept. Cool!

I suppose, starting from today, it will be the only installation method at all for me.

Best regards.

P.S. There is some additional information about ports configuration. It is in Russian.

Friday, April 4, 2014

pw: user 'messagebus' disappeared during update

Hello.

During dbus installation from ports, I got:
pw: user 'messagebus' disappeared during update
 The interesting thing is that after restarting the installation I got the following:
>Description: /usr/ports/devel/dbus fails if an existing messagebus user is found

===> Creating users and/or groups.
Using existing group `messagebus'.
Creating user `messagebus' with uid `556'.
pw: user 'messagebus' already exists
*** Error code 74

Stop in /usr/ports/devel/dbus.
*** Error code 1
And:
# pw useradd messagebus
pw: user 'messagebus' already exists
# pw usershow messagebus
pw: no such user `messagebus'
# pw userdel messagebus
pw: no such user `messagebus'
The user exists and does not exist in no time, heh.

The solution was found here:
  1. run vipw
  2. save /etc/passwd without changes
It looks like for some reasons the passwd database was corrupted. And vipw reset's it to normal state.

After doing that, 'pw userdel' completed successfully. And as the result, port has been installed successfully too.

Profit \^__^/

Guys, than you for your advise. It was very helpful. And I hope that post will be handy too.

Sunday, March 30, 2014

Upgrade to a new version

Hello.

I didn't use my notebook for a long time, but this time I decided to start again.
I have upgraded my old Asus x51rl and decided to reinstall the OS from scratch.

First of all, I checked if a new FreeBSD version was available and it was (v10). Of course, I could download the new version .iso image, but:
  1. I had not disk to burn the image;
  2. I didn't want to do it.
Fortunately, there was the instruction on how to upgrade FreeBSD to the new version from the previous one. So, I decided to reinstall FreeBSD 9.0 from the disk I had and upgrade the installed OS.

But it was not as easy as it was written in the article.
The first step was completed successfully:
# freebsd-update fetch
# freebsd-update install
After restart uname -a showed me 9.0-RELEASE-p3. Well, I tested the tool and it looked like it worked as it supposed to work.

But the next step:
freebsd-update upgrade -r 10.0-RELEASE
returned me the message:
Cowardly refusing to proceed any further. 
 and exited.

So I decided to run this upgrade in 2 steps:
  1. freebsd-update upgrade -r 9.2-RELEASE
  2. freebsd-update upgrade -r 10.0-RELEASE
And that did the trick. I successfully upgraded my system to the last 9.2 release. And after that I upgraded it to the release 10.0.

But! There is still the last step: upgrading programs.
It recommends to run:
# portmaster -af
but the issue was that I did not have the program installed yet (I had a clean installation). When I tried to install the program from the ports, I got an error:
Improper use of USE_PERL5 in /usr/ports/Mk/bsd.port.mk
or something like that. A short googling advised me to update the port's tree.
What I did:
# cd /usr/ports
# make update
Doing that, I was said, that 'make update' uses portsnap and I have to run:
# portsnap fetch extract
The command started, but failed because of the lack of inodes in /var (I have 2Gb there). A short investigation showed me, that it was because of
/var/db/freebsd-update
which had a lot of little files. So, I cleaned downloaded files, the portsnap file:
/var/db/portsnap/4Fuy78jn&...JHjj78.tgz
 and re-run it in 2 steps:
  1. # portsnap fetch
  2. # portsnap extract
And that time it completed fully successfully.

Good.

So, the last step was to install portmaster and to run:
# portmaster -af
It was completed successfully and I had FreeBSD 10.0-RELEASE with the ports upgraded.

Well done.
Let's start to use it.