Reconfiguring a package and other questions.

Polytropon freebsd at edvax.de
Wed Jul 9 18:52:19 UTC 2014


On Wed, 09 Jul 2014 10:03:48 -0400, R. Clayton wrote:
> I'm running this
> 
>   $ uname -a
>   FreeBSD BanjaLuka 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17
>   01:46:25 UTC 2014     root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 
> 
>   $ 
> 
> and I did this (via www.freebsd.org/handbook/x-install.html)
> 
>   # pkg install xorg
> 
> to install X.  It didn't work: xstart runs the default window manager, but the
> keyboard and mouse are frozen.

You're probably missing HAL and DBUS. Those need to be enabled
via rc.conf. Requiring those is a result of the default options
from which the X package has been generated.

If you _intend_ not to use them, you'll have to compile X with
the required options (unset) yourself, or maybe find a package
source that has those options disabled.

You can also find information here:

http://www.wonkity.com/~wblock/docs/html/aei.html



> 1: I usually install xorg from ports, and what I do in this case (which usually
> happens) is reconfigure xorg-server to disable hal.  However, I don't see how
> packages can be reconfigured. 

They can't. You have to build from source yourself.



> the pkg-config man page seems to show how to
> reconfigure pkg itself, not individual packages.  How it possible to
> reconfigure packages?

It's impossible. The only alternative is to obtain packages
with different options, those may or may not exist in the
official repositories. There might be 3rd party repositories
which make them available.



> 2: How do I undo the effects of installing a metapackage like xorg?  Doing the
> obvious 
> 
>   # whereis X
>   X: /usr/local/bin/X
> 
>   # pkg remove xorg
>   Deinstallation has been requested for the following 1 packages:
> 
>           xorg-7.7
> 
>   Proceed with deinstalling packages [y/N]: y
>   [1/1] Deleting xorg-7.7... done
> 
>   # whereis X
>   X: /usr/local/bin/X
> 
>   #  
> 
> doesn't do what I wanted ("pkg delete -R xorg" behaves as above).

Correct. The metaport does not automatically deinstall all
of its components. It's possible to use a regex to remove
all ports containing "xorg" (NB: make sure you're not removing
"false positives"!).

You can also determine which port has installed a certain
file on the system, for example

	# pkg which `which X`

This will deinstall the package responsible for the binary,
but ports for libraries, input drivers and so on will be kept.
It could be neccessary to remove them as well.



> 3: I resorted to deleting xorg-server as a package and re-installing it as a
> port with appropriate configuration.  This works, but raises the question of
> consistency between ports and packages.

This should not be a problem in general.

BUT: Related to X and its requirement for HAL and DBUS, which
are also requirements of many other ports, this _could_ lead
to problems when you install an application package that expects
HAL being present in X _and_ running, and your configuration
does not meet those requirement. In those special cases, building
that port (and maybe its depencencies) could be needed.



> What is the relation between the
> software in ports and the software in packages?

Installing from a port means that a package is created by
compiling from source, and this package is then installed and
registered. Installing via pkg is similar, except the package
is obtained from a repository. The packages available in the
official FreeBSD repositories are built from ports as well,
and with the _default_ options.

Regarding software registration: Both "pkg install" and "make
install" cause the system database to properly register installed
software and its dependencies and requirements. There is no
difference. That's why using a port management program (such
as portmaster or portupgrade) is not a problem.



> Have I just introduced an
> error (or potential for error) that will come back and bite me hard six months
> after I've forgotten what I've done?

Probably not, and pkg is able to resolve "conflicts" quite well.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list