Re: port install to jail root from host system

2003-10-04 Thread Felix 'buebo' Kakrow
Aragon Gouveia wrote:
Hi,

I've compiled a port as normal (apache13 in this case).  I'd like to run
'make install' now and tell it to install the package to the base of the
root filesystem of a jail from the jail's host.  Possibly also to skip
registering it in the host's package database.
Does anyone know an easy way to do this with the ports system?

In this situation I like it to mount the /usr/ports via nullfs in my 
Jail Directory and build the Port directly in the Jail. However you'll 
have to have a more or less complete system (at least gcc + all needet 
build dependencies) in the Jail. As a plus you don't have to worry about 
package registrations and stuff like this, but I'm just another newbie 
so probally somebody will come up with another and better way ;)

Cheers
Felix
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: port install to jail root from host system

2003-10-04 Thread Pat Lashley
--On Wednesday, October 01, 2003 15:12:42 +0200 Felix 'buebo' Kakrow 
[EMAIL PROTECTED] wrote:

I've compiled a port as normal (apache13 in this case).  I'd like to run
'make install' now and tell it to install the package to the base of the
root filesystem of a jail from the jail's host.  Possibly also to skip
registering it in the host's package database.
Does anyone know an easy way to do this with the ports system?

In this situation I like it to mount the /usr/ports via nullfs in my Jail
Directory and build the Port directly in the Jail. However you'll have to
have a more or less complete system (at least gcc + all needet build
dependencies) in the Jail. As a plus you don't have to worry about
package registrations and stuff like this, but I'm just another newbie so
probally somebody will come up with another and better way ;)
Another option is to build and package the port(s) outside the jail.
Then nullfs mount /usr/ports in the jail directory and install
the port(s) from the package(s).
The downside of this approach is that the port needs to be installed
on the host system to build the package.  If you have multiple virtual
host jails which are basicly identical in configuration; you might
want to consider setting up one to build the packages in instead of
building them on the host system. (And then install from packages in
the other jails.)


-Pat
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: port install to jail root from host system

2003-10-04 Thread Aragon Gouveia
| By Pat Lashley [EMAIL PROTECTED]
|  [ 2003-10-04 19:31 +0200 ]
 Another option is to build and package the port(s) outside the jail.
 Then nullfs mount /usr/ports in the jail directory and install
 the port(s) from the package(s).
 
 The downside of this approach is that the port needs to be installed
 on the host system to build the package.  If you have multiple virtual
 host jails which are basicly identical in configuration; you might
 want to consider setting up one to build the packages in instead of
 building them on the host system. (And then install from packages in
 the other jails.)

Thanks.  I did basically that, using the -p argument to pkg_add once the
package was built.


Regards,
Aragon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: port install to jail root from host system

2003-10-01 Thread Marc G. Fournier

ssh into the jail and run the make install from inside of the jail

On Wed, 1 Oct 2003, Aragon Gouveia wrote:

 Hi,

 I've compiled a port as normal (apache13 in this case).  I'd like to run
 'make install' now and tell it to install the package to the base of the
 root filesystem of a jail from the jail's host.  Possibly also to skip
 registering it in the host's package database.

 Does anyone know an easy way to do this with the ports system?

 I realise apache is dependant on various libraries that may not be in the
 jail, but these dependancies I will resolve manually.


 Thanks,
 Aragon
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: port install to jail root from host system

2003-10-01 Thread Aragon Gouveia
The jail does not run ssh, nor any other daemons.  All it will run is apache
once it is installed.

It's not a full jail built from /usr/src.  It'll only have what's necessary
to run apache.  And apache will be the only process called from the jail
command.



| By Marc G. Fournier [EMAIL PROTECTED]
|  [ 2003-10-01 15:11 +0200 ]
 
 ssh into the jail and run the make install from inside of the jail
 
 On Wed, 1 Oct 2003, Aragon Gouveia wrote:
 
  Hi,
 
  I've compiled a port as normal (apache13 in this case).  I'd like to run
  'make install' now and tell it to install the package to the base of the
  root filesystem of a jail from the jail's host.  Possibly also to skip
  registering it in the host's package database.
 
  Does anyone know an easy way to do this with the ports system?
 
  I realise apache is dependant on various libraries that may not be in the
  jail, but these dependancies I will resolve manually.
 
 
  Thanks,
  Aragon
  ___
  [EMAIL PROTECTED] mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to [EMAIL PROTECTED]
 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: port install to jail root from host system

2003-10-01 Thread Matthew Seaman
On Wed, Oct 01, 2003 at 02:48:29PM +0200, Aragon Gouveia wrote:

 I've compiled a port as normal (apache13 in this case).  I'd like to run
 'make install' now and tell it to install the package to the base of the
 root filesystem of a jail from the jail's host.  Possibly also to skip
 registering it in the host's package database.
 
 Does anyone know an easy way to do this with the ports system?
 
 I realise apache is dependant on various libraries that may not be in the
 jail, but these dependancies I will resolve manually.

It actually works quite well if you use mount_null(8) to re-mount your
/usr/ports tree inside the jail, and set the WRKDIRPREFIX environment
variable to something like /usr/obj so that you don't actually write
into the /usr/ports tree while compiling.

A line something like:

  /usr/ports  /jail/192.168.0.2/usr/ports null rw 0 0

in /etc/fstab in the host system should do the trick nicely.

That way, you can just ssh(1) into your jailed system and manage
ports/packages exactly as you do in the host system.  This will also
avoid, in a trivially simple way, problems caused by corrupting the
/var/db/pkg database in the host system.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: port install to jail root from host system

2003-10-01 Thread Marc Ramirez
On Wed, Oct 01, 2003 at 02:48:29PM +0200, Aragon Gouveia wrote:
 Hi,
 
 I've compiled a port as normal (apache13 in this case).  I'd like to run
 'make install' now and tell it to install the package to the base of the
 root filesystem of a jail from the jail's host.  Possibly also to skip
 registering it in the host's package database.
 
 Does anyone know an easy way to do this with the ports system?
 
 I realise apache is dependant on various libraries that may not be in the
 jail, but these dependancies I will resolve manually.

Just off the top of my head, certainly not guaranteed to be the
optimal solution, never tested, etc...

# assuming /jailfs is the root of your jail:
# install in /jailfs/bin, /jailfs/data, etc...

cd /usr/ports/www/apache13
make PREFIX=/jailfs install 

# now in your jail, you'll have /bin/apachectl, but it'll be looking
# for /jailfs/sbin/httpd, so create a symlink

ln -s / /jailfs/jailfs

-- 
Marc Ramirez
Blue Circle Software Corporation
513-688-1070 (main)
513-382-1270 (direct)
http://www.bluecirclesoft.com
http://www.mrami.com (personal)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]