5

I configured virtual NICS using pf, and a jail for FreeBSD using qjail create pgsql-jail 192.168.0.3.

When I tried to install PostgreSQL 9.3 using port collection, it shows strange message at first.

pgsql-jail /usr/ports/databases/postgresql93-server >make install
===> Building/installing dialog4ports as it is required for the config dialog
===>  Cleaning for dialog4ports-0.1.5_1
===> Skipping 'config' as NO_DIALOG is defined
====> You must select one and only one option from the KRB5 single
*** [check-config] Error code 1

Stop in /basejail/usr/ports/ports-mgmt/dialog4ports.
*** [install] Error code 1

Stop in /basejail/usr/ports/ports-mgmt/dialog4ports.
===> Options unchanged
=> postgresql-9.3.0.tar.bz2 doesn't seem to exist in /var/ports/distfiles/postgresql.
=> Attempting to fetch ftp://ftp.se.postgresql.org/pub/databases/relational/postgresql/source/v9.3.0/postgresql-9.3.0.tar.bz2
postgresql-9.3.0.tar.bz2                        1% of   16 MB   71 kBps

Anyway, installation continues, so I waited. I chose all default options for all option dialogs. And at the end of the process, I saw it finally failed with this message.

====> Compressing man pages
===>  Building package for pkgconf-0.9.3
Creating package /basejail/usr/ports/devel/pkgconf/pkgconf-0.9.3.tbz
Registering depends:.
Registering conflicts: pkg-config-*.
Creating bzip'd tar ball in '/basejail/usr/ports/devel/pkgconf/pkgconf-0.9.3.tbz'
tar: Failed to open '/basejail/usr/ports/devel/pkgconf/pkgconf-0.9.3.tbz'
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1

Stop in /basejail/usr/ports/devel/pkgconf.
*** [build-depends] Error code 1

Stop in /basejail/usr/ports/textproc/libxml2.
*** [install] Error code 1

Stop in /basejail/usr/ports/textproc/libxml2.
*** [lib-depends] Error code 1

Stop in /basejail/usr/ports/databases/postgresql93-server.
*** [install] Error code 1

Stop in /basejail/usr/ports/databases/postgresql93-server.

I have no idea why this fails. Errors at beginning seems I have something wrong with dialog4ports. And errors at last seems installer cannot write to ports file tree. AFAIK, the ports files are read-only shared from host system.

What's wrong with my jail? How can install PostgreSQL 9.3 in my jail?

Eonil
  • 4,607
  • 11
  • 30
  • 30
  • If you get stuck launching it after you get it installed, be sure to read this on SYSVIPC in jails: https://stackoverflow.com/questions/11909993/freebsd-jail-can-not-set-security-jail-sysvipc-allowed – MonkeyBrains Nov 06 '13 at 03:22

2 Answers2

1

If you want to build ports in a jail that might have read-only filesystems, you better set up your ports environment properly. I use make.conf for this.

I use these settings, if my /usr/ports is mounted read-only:

WRKDIRPREFIX=/usr/workdir-ports
DISTDIR=/usr/distfiles
PACKAGES=/usr/packages

Concerning the warnings above:

You have set NO_DIALOG for ports, e.g. in make.conf, but the port needs a configuration item. It cannot run the configure phase with the NO_DIALOG option set.

You might want to use packages, if you don't want to be bothered by options at all.

0

I have a same problem. I found a workaround. Try this: - install manually dialog4ports-0.1.5_1

cd /usr/ports/ports-mgmt/dialog4ports
make install

- then try install postgresql93

cd /usr/ports/databases/postgresql93-server/
make install

- on error create link to resolve problem of pkgconfig

ln -s /basejail/usr/ports/devel/pkgconf/work/stage/usr/local/ /dati/ports/usr/ports/devel/pkgconf/work/stage/basejail/usr/local

My schema of jail's skeleton is a little different but this work form me. PostgreSQL9.3 is installed correctly!

Regards.