# update system & ports



## hirohitosan (Mar 20, 2009)

Hi there.
I want to update my system.
Fist I updated the ports collection

```
csup -g -L 2 /root/ports-supfile
```
and after I tried portmaster

```
===>>> The x11/xorg-protos port has been deleted: Not really necessary
===>>> Aborting update
```
and it's stop
what's happened? how can I continue the update?

thanks


----------



## trev (Mar 23, 2009)

I don't use portmaster - I use portupgrade, but given you have had no other advice, this is what I did:

1. De-install the x11/xorg-protos port (from memory I might have had to force it due to old dependencies on this port)
2. pkgdb -Fu to delete the irrelevant dependencies on x11/xorg-protos
3. The X11 upgrade then went smoothly (sort of


----------



## SirDice (Mar 23, 2009)

After csup'ing the ports tree, don't forget to rebuild /usr/ports/INDEX. 

cd /usr/ports && make index


----------



## trev (Mar 23, 2009)

SirDice said:
			
		

> cd /usr/ports && make index



If you don't have the entire ports directory hierarchy it errors out.


```
portsdb -Fu
```

works better in this case.


----------



## phoenix (Mar 23, 2009)

SirDice said:
			
		

> After csup'ing the ports tree, don't forget to rebuild /usr/ports/INDEX.
> 
> cd /usr/ports && make index



Or, you can fetch a complete INDEX file using *make fetchindex*, instead of building one locally.


----------



## hirohitosan (Mar 23, 2009)

SirDice said:
			
		

> cd /usr/ports && make index


I did:

```
cd /usr/ports && make index 
Generating INDEX-7 - please wait..Warning: Duplicate INDEX entry: cvsup-without-gui-16.1h_4
Warning: Duplicate INDEX entry: mod_rpaf-ap2-0.6                                           
 Done.
```
and after :

```
# portmaster -a
....
===>>> Port directory: /usr/ports/lang/perl5.8
===>>> Launching 'make checksum' for lang/perl5.8 in background
===>>> Gathering dependency list for lang/perl5.8 from ports
===>>> No dependencies for lang/perl5.8
===>>> Continuing 'make config' dependency check for ftp/curl
===>>> Launching child to update security/ca_root_nss
        curl-7.18.0 >> security/ca_root_nss

===>>> Port directory: /usr/ports/security/ca_root_nss
Terminated
Terminated
Terminated

===>>> Update for /usr/ports/security/ca_root_nss failed
===>>> Aborting update

===>>> Update for curl-7.18.0 failed
===>>> Aborting update
```
and 

```
portsdb -Fu
portsdb: Command not found.
```
where it belongs portdb?
thankx


----------



## SirDice (Mar 23, 2009)

hirohitosan said:
			
		

> ```
> portsdb -Fu
> portsdb: Command not found.
> ```
> where it belongs portdb?


It's part of ports-mgmt/portupgrade.

Try building /usr/ports/security/ca_root_nss by hand, maybe it'll give a 'better' error message..


----------



## hirohitosan (Mar 23, 2009)

trev said:
			
		

> 1. De-install the x11/xorg-protos port (from memory I might have had to force it due to old dependencies on this port)


thx, but I cannot find whereis xorg-protos. I have no port with this name ...


----------



## hirohitosan (Mar 23, 2009)

SirDice said:
			
		

> Try building /usr/ports/security/ca_root_nss by hand,


thx
I installed /usr/ports/security/ca_root_nss
and try again portmaster -a but it stopped at xorg-protos, but I cannot find whereis xorg-protos ... It is not in /usr/ports/x11
and whereis xorg-protos gives me nothing


----------



## SirDice (Mar 23, 2009)

The port has been remove but you may still have it installed. 
Try removing it with *pkg_delete xorg-protos-\**.


----------



## hirohitosan (Mar 24, 2009)

SirDice said:
			
		

> removing it with *pkg_delete xorg-protos-\**.


well it's strange ... I tried

```
pkg_delete xorg-protos-\*.
pkg_delete: no such package 'xorg-protos-*.' installed
# pkg_delete xorg-protos-7.3_2
pkg_delete: package 'xorg-protos-7.3_2' is required by these other packages
and may not be deinstalled:
xorg-7.3_2
```
I don't understand who requires xorg-protos?

how can I remove it?

thx


----------



## SirDice (Mar 24, 2009)

hirohitosan said:
			
		

> well it's strange ... I tried
> 
> ```
> pkg_delete xorg-protos-\*.
> ...


This might be due to your shell. The * gets treated differently.



> ```
> # pkg_delete xorg-protos-7.3_2
> pkg_delete: package 'xorg-protos-7.3_2' is required by these other packages
> and may not be deinstalled:
> ...


Ok.. Try *pkg_delete -f xorg-protos-7.3_2* then continue to update your system.


----------



## hirohitosan (Mar 24, 2009)

SirDice said:
			
		

> *pkg_delete -f xorg-protos-7.3_2* then continue to update your system.


thanks It works. After portmaster -a it's stop at:

```
===>>> The x11/xphelloworld port has been deleted: Xprint application, deprecated upstream
===>>> Aborting update
```
maybe I should deinstall and reinstall X?

or do the same with pkg_delete -f x11/xphelloworld ?


----------



## ale (Mar 24, 2009)

```
grep xphelloworld /usr/ports/MOVED
```

So do the same with x11/xphelloworld.
`# pkg_delete -fix xphelloworld`


----------



## hirohitosan (Mar 24, 2009)

*Solved*

thanks guys,
afer pkg_delete -fix xphelloworld, portmaster -a works smoothly 

well not quite solved ... after update my mouse doesn't work in X. I have an USB mouse


----------



## trev (Mar 25, 2009)

hirohitosan said:
			
		

> well not quite solved ... after update my mouse doesn't work in X. I have an USB mouse



Add 


```
Option "AllowEmptyInput" "off"
```

 to the ServerLayout section of /etc/X11/xorg.conf.


----------



## DutchDaemon (Mar 25, 2009)

Note:



> 20090124:
> AFFECTS: users of x11-servers/xorg-server, sysutils/hal
> AUTHOR: r[spam-no]@FreeBSD.org
> 
> ...


----------



## hirohitosan (Mar 25, 2009)

trev said:
			
		

> ServerLayout section of /etc/X11/xorg.conf.


My /etc/X11 is empty!

```
# locate xorg.conf
/root/xorg.conf.new
/usr/local/man/man5/xorg.conf.5.gz
```


----------



## tangram (Mar 25, 2009)

There a good chance that your locate database is outdated. Update it or run find instead.

To create a xorg.conf run:


```
# Xorg -configure
```

Afterwards test it and copy it over to /etc/X11/.

This described in further detail at: http://www.freebsd.org/doc/en/books/handbook/x-config.html.

Also read /usr/ports/UPDATING.
	
	



```

```


----------



## ale (Mar 25, 2009)

hirohitosan said:
			
		

> My /etc/X11 is empty!
> 
> ```
> # locate xorg.conf
> ...



Configuring X11


----------



## hirohitosan (Mar 26, 2009)

thanks guys .... I'm sorry for this questions but I cannot stop X server. My mouse doesn't work, I tried Ctr-Alt-BkSpace and nothing. I'm running Fluxbox. There is a way to stop X server without reboot from console?


----------



## SirDice (Mar 26, 2009)

hirohitosan said:
			
		

> thanks guys .... I'm sorry for this questions but I cannot stop X server. My mouse doesn't work, I tried Ctr-Alt-BkSpace and nothing. I'm running Fluxbox. There is a way to stop X server without reboot from console?



ctrl-alt-backspace should work but it sounds like your keyboard isn't working either.

Do you have another machine you can use to ssh into this box?


Make sure hald is running too. Xorg needs it nowadays.


----------



## tangram (Mar 26, 2009)

hirohitosan said:
			
		

> thanks guys .... I'm sorry for this questions but I cannot stop X server. My mouse doesn't work, I tried Ctr-Alt-BkSpace and nothing. I'm running Fluxbox. There is a way to stop X server without reboot from console?



Press Control + Alt + Backspace to kill the X server and return to the console (assuming you aren't using a graphical login manager).

Check if your /etc/X11/xorg.conf has the following:


```
Section "ServerFlags"
        Option          "AllowEmptyInput"       "off"
        Option          "AllowAddDevices"       "off"
EndSection
```

And check your keyboard also, mine is:


```
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option          "XkbRules" "xorg"
        Option          "XkbModel" "pc105"
        Option          "XkbLayout" "pt"
EndSection
```

Btw did you compile X with hal? And are you enabling hal in rc.conf?


----------



## tangram (Mar 26, 2009)

If Ctrl+Alt+Backspace isn't working check if your xorg.conf has


```
Option "DontZap" "true"
```

If so disable it.


----------



## hirohitosan (Mar 26, 2009)

SirDice said:
			
		

> ctrl-alt-backspace should work but it sounds like your keyboard isn't working either.


well it doesn't work. I can switch to console Alt-F2 but in X it does't work


			
				SirDice said:
			
		

> Do you have another machine you can use to ssh into this box?


yes I have


			
				SirDice said:
			
		

> Make sure hald is running too. Xorg needs it nowadays.


how can I do this?


----------



## hirohitosan (Mar 26, 2009)

tangram said:
			
		

> If Ctrl+Alt+Backspace isn't working check if your xorg.conf has
> 
> 
> ```
> ...



Ctrl+Alt+Backspace doesn't work and I don't have "DontZap" option in my xorg.conf
I attach my xorg.conf


----------



## tangram (Mar 26, 2009)

hirohitosan said:
			
		

> Ctrl+Alt+Backspace doesn't work and I don't have "DontZap" option in my xorg.conf
> I attach my xorg.conf



Try the rest of my suggestions. Check the *InputDevice* and the *ServerFlags* sections.


----------



## hirohitosan (Mar 26, 2009)

tangram said:
			
		

> There a good chance that your locate database is outdated. Update it or run find instead.


how can I update my locate database?
I tried updatedb, locate.updatedb, but doesn't work


----------



## tangram (Mar 26, 2009)

*man locate* gives the answer.


```
# /usr/libexec/locate.updatedb
```

Consider adding it your shell alias.


----------



## hirohitosan (Mar 26, 2009)

tangram said:
			
		

> Btw did you compile X with hal? And are you enabling hal in rc.conf?


actually I don't know if I compiled X with hal :r and I don't have it enabled in rc.conf


----------



## hirohitosan (Mar 26, 2009)

tangram said:
			
		

> *man locate* gives the answer.


thanks. I asked because my man locate gives me:
	
	



```
# man locate
No manual entry for locate
```


----------



## tangram (Mar 26, 2009)

hirohitosan said:
			
		

> thanks. I asked because my man locate gives me:
> 
> 
> 
> ...



Most probably you didn't install the Docs distribution when you installed FreeBSD. Use sysinstall if you want it.


----------



## tangram (Mar 26, 2009)

hirohitosan said:
			
		

> actually I don't know if I compiled X with hal :r and I don't have it enabled in rc.conf



No biggies there. Just check the xorg.conf sections that I pointed out.

If it doesn't work post your /var/log/Xorg.0.log.


----------



## SirDice (Mar 26, 2009)

hirohitosan said:
			
		

> well it doesn't work. I can switch to console Alt-F2 but in X it does't work


Ok.. Then you can just reboot the box from the second console. Or just kill X.


```
ps -aux | grep hald
```
Should show a few hal processes. 

To enable hal add to /etc/rc.conf:

```
hald_enable="YES"
```

And start hal with */usr/local/etc/rc.d/hald start* or simply reboot the box.


----------



## tangram (Mar 26, 2009)

Truth be told you don't need hal to have X work.

In my case I compiled xorg-server with hal, and X works regardless of having hal enabled in rc.conf or not.

I think hirohitosan's problem is connected with the keyboard layout and the associated sections in xorg.conf.

Take a look at http://forums.freebsd.org/showpost.php?p=17823&postcount=23 and change like I suggested.


----------



## hirohitosan (Mar 27, 2009)

tangram said:
			
		

> I think hirohitosan's problem is connected with the keyboard layout and the associated sections in xorg.conf.
> 
> and change like I suggested.



I change it as you suggested
in attachement you'll find my /etc/X11/xorg.conf
and here's my X log after starting X:

```
cat /var/log/Xorg.0.log

X.Org X Server 1.5.3
Release Date: 5 November 2008
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 7.1-RELEASE amd64
Current Operating System: FreeBSD 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 08:58:24 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 24 March 2009  01:15:05PM

        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Mar 27 14:53:37 2009
(==) Using config file: "/etc/X11/xorg.conf"
Parse error on line 14 of section Files in file /etc/X11/xorg.conf
        "RgbPath" is not a valid keyword in this section.
(EE) Problem parsing the config file
(EE) Error parsing the config file

Fatal server error:
no screens found
```
I don't know where is the problem


----------



## SirDice (Mar 27, 2009)

hirohitosan said:
			
		

> I don't know where is the problem


Read the error message, it's pretty obvious.


```
Parse error on line 14 of section Files in file /etc/X11/xorg.conf
        "RgbPath" is not a valid keyword in this section.
```

Remove that line from xorg.conf.


----------



## hirohitosan (Mar 27, 2009)

SirDice said:
			
		

> Remove that line from xorg.conf.


thanks SirDice, now it works :r


----------



## SirDice (Mar 27, 2009)

Another happy customer :e


----------



## tangram (Mar 27, 2009)

hirohitosan, I just looked at your xorg.conf and I noticied that you've copy pasted my:


```
Option          "XkbLayout" "pt"
```

I use that because I have a portuguese keyboard, so consider changing to your country's keyboard layout.


----------



## hirohitosan (Mar 27, 2009)

tangram said:
			
		

> consider changing to your country's keyboard layout.


I change it ... thanx


----------



## tangram (Mar 27, 2009)

No problem. Glad to help


----------

