Solved No install ports in a jail

Hello

Two days ago install a new server using the PXE system and mount with NFS (copying files, etc). Everything works correctly. Down src and compile a new kernel. I have the port installed ezjail-admin to install and administer jails, but I can not install ports on them. I have access from the outside and from outside them (networking) and have configured.

I tried to mount the ports as writing and executing updates from inside the jail, but fails, I tried to lower the ports several times and get the same error. Also use a different directory to make. I have tried several times to run make installworld, ezjail-admin update-i, ezjail-admin update -u, ezjail-admin update -b, ezjail-admin update -p, etc. In the host I could install (gettext and libiconv) without problems although had only installed the port ezjail-admin and not necessary. Not to do, I'm desperate ... I only can think reinstall everything or leave and use another system, because I thought today I have the system running ...

I'm more awake 20 hours without sleep, looking document and looking at Google as well as in the forums, but I have not found anything. I think the desperation and exhaustion is making me do the same steps several times in no particular order and I think if I'm shattering some progress. I created several cages and all get the same errors. I have also tried different programs: haproxy, nginx, varnish, etc., in all I have a fault derivative libiconv or gettext.

I never had a problem like this, it is that I can not see anything in log or learned in previous systems failures.

Code:
FreeBSD server.server4children.local 9.2-RELEASE FreeBSD 9.2-RELEASE #0: Mon Dec 30 21:16:53 UTC 2013     root@server.server4children.local:/usr/obj/usr/src/sys/SERVER4  amd64

Code:
===>    Verifying install for gmake in /usr/ports/devel/gmake
===> Options unchanged
===> Fetching all distfiles required by gmake-3.82_1 for building
===>  Extracting for gmake-3.82_1
=> SHA256 Checksum OK for make-3.82.tar.bz2.
===>  Patching for gmake-3.82_1
===>  Applying FreeBSD patches for gmake-3.82_1
===>   gmake-3.82_1 depends on shared library: libintl.so - not found
===>    Verifying for libintl.so in /usr/ports/devel/gettext
===> Options unchanged
===> Fetching all distfiles required by gettext-0.18.3.1 for building
===>  Extracting for gettext-0.18.3.1
=> SHA256 Checksum OK for gettext-0.18.3.1.tar.gz.
===>  Patching for gettext-0.18.3.1
===>  Applying FreeBSD patches for gettext-0.18.3.1
===>   gettext-0.18.3.1 depends on shared library: libiconv.so.3 - not found
===>    Verifying for libiconv.so.3 in /usr/ports/converters/libiconv
===> Options unchanged
===> Fetching all distfiles required by libiconv-1.14_1 for building
===>  Extracting for libiconv-1.14_1
=> SHA256 Checksum OK for libiconv-1.14.tar.gz.
===>  Patching for libiconv-1.14_1
===>  Applying FreeBSD patches for libiconv-1.14_1
===>  Configuring for libiconv-1.14_1
env: ./configure: Permission denied
===>  Script "configure" failed unexpectedly.
Please report the problem to gnome@FreeBSD.org [maintainer] and attach the
"/root/portbuild/basejail/usr/ports/converters/libiconv/work/libiconv-1.14/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/sbin/pkg_info -Ea).
*** [do-configure] Error code 1

Stop in /basejail/usr/ports/converters/libiconv.
*** [install] Error code 1

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

Stop in /basejail/usr/ports/devel/gettext.
*** [install] Error code 1

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

Stop in /basejail/usr/ports/devel/gmake.
*** [install] Error code 1

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

The file /root/portbuild/basejail/usr/ports/converters/libiconv/work/libiconv-1.14/config.log does not exist.

Code:
root@jail01:/usr/ports/net/haproxy # cat /etc/make.conf
WRKDIRPREFIX=           /var/ports
DISTDIR=                /var/ports/distfiles
PACKAGES=               /var/ports/packages
INDEXDIR=               /var/ports

Code:
root@server:/home/jails/haproxy01 # mount_nullfs -o ro /usr/ports/ /home/jails/haproxy01/usr/ports 
mount_nullfs: /basejail: No such file or directory
root@server:/home/jails/haproxy01 # rm -f 
COPYRIGHT  bin@       dev/       lib@       media/     proc/      root/      sys@       usr/       
basejail/  boot@      etc/       libexec@   mnt/       rescue@    sbin@      tmp/       var/       
root@server:/home/jails/haproxy01 # rm -f usr/ports 
root@server:/home/jails/haproxy01 # mkdir -p usr/ports
root@server:/home/jails/haproxy01 # mount_nullfs -o ro /usr/ports/ /home/jails/haproxy01/usr/ports
root@server:/home/jails/haproxy01 # mkdir var/distfiles
root@server:/home/jails/haproxy01 # mount_nullfs -o rw /usr/ports/distfiles/ /home/jails/haproxy01/var/distfiles/
root@server:/home/jails/haproxy01 # jexec 1 csh

Code:
root@server:/usr/ports/ports-mgmt/portmaster # pkg_version -vI
dialog4ports-0.1.5_2                =   up-to-date with index
ezjail-3.3                          =   up-to-date with index
portmaster-3.17.3                   =   up-to-date with index
root@server:/usr/ports/ports-mgmt/portmaster # pkg_delete -f dialog4ports-0.1.5_2
root@server:/usr/ports/ports-mgmt/portmaster # pkg_version
ezjail                              =
portmaster                          =

Search in /usr/ports/UPDATING.

Code:
  # pkg query %ro libiconv >ports_to_update
  # pkg delete -f libiconv
  # cat ports_to_update | xargs portmaster
  
  
    AFFECTS: users of converters/libiconv and devel/gettext
  AUTHOR: bapt@FreeBSD.org

  libiconv now handles the lib/charset.alias file instead of devel/gettext.
  If you are using pkgng 'and' upgrading from source with portupgrade or
  portmaster, first delete gettext, upgrade libiconv, then reinstall gettext.

  This will break sudo, so you *must* do this in a root shell (sudo -i)
  if you use sudo.

  # pkg delete -f devel/gettext
  # portmaster converters/libiconv devel/gettext
    or
  # pkg delete -f devel/gettext
  # portupgrade converters/libiconv devel/gettext

Code:
root@server:/usr/ports/ports-mgmt/portmaster # portmaster converters/libiconv devel/gettext

After that I tried to remount the ports, to copy, create new jails. make buildworld, etc..

Can you think of anything? Some steps to follow and not continue failing. I do not know what else try the dozens of browser tabs open and I can not think of anything logical and processes to follow in order to solve. Thanks.

Regards
 
Re: No install ports in a jail

To update basejail again after make buildworld. Should I not copy the system libraries?

Code:
root@newjl:/usr/ports # find / -name "libiconv.so.3" -print
root@newjl:/usr/ports #

Code:
root@server:/usr/ # find / -name "libiconv.so.3" -print
/usr/local/lib/libiconv.so.3
root@server:/usr/ #

Thanks

Regards
:x :x :x :x :x :x :x
 
Re: No install ports in a jail

Hi

I deleted the jails, I run make buildworld and make installworld on the system. I updated the ports with portsnap fetch, freebsd-update fetch, freebsd-update extract and freebsd-update install. I have run ezjail-admin -b to create the buildworld followed ezjail-admin -ip to install the base system and ports update. I have started the new jail and I keep getting the same error.

Code:
root@server:~ # ezjail-admin list
STA JID  IP              Hostname                       Root Directory
--- ---- --------------- ------------------------------ ------------------------
DS  N/A  10.0.0.10       newjail                      /home/jails/newjail

root@server:~ # ezjail-admin start newjail
Configuring jails:.
Starting jails: newjail.

root@server:~ # ezjail-admin console newjail

root@newjail:~ # cd /usr/ports/net/haproxy
root@newjail:/usr/ports/net/haproxy # make clean
===>  Cleaning for gmake-3.82_1
===>  Cleaning for gettext-0.18.3.1
===>  Cleaning for libiconv-1.14_1
===>  Cleaning for haproxy-1.4.24_1
root@newjail:/usr/ports/net/haproxy # make install clean
===> Options unchanged
===>  License GPLv2 LGPL21 accepted by the user
===> Fetching all distfiles required by haproxy-1.4.24_1 for building
===>  Extracting for haproxy-1.4.24_1
=> SHA256 Checksum OK for haproxy-1.4.24.tar.gz.
===>  Patching for haproxy-1.4.24_1
===>  Applying FreeBSD patches for haproxy-1.4.24_1
===>   haproxy-1.4.24_1 depends on executable: gmake - not found
===>    Verifying install for gmake in /usr/ports/devel/gmake
===> Options unchanged
===> Fetching all distfiles required by gmake-3.82_1 for building
===>  Extracting for gmake-3.82_1
=> SHA256 Checksum OK for make-3.82.tar.bz2.
===>  Patching for gmake-3.82_1
===>  Applying FreeBSD patches for gmake-3.82_1
===>   gmake-3.82_1 depends on shared library: libintl.so - not found
===>    Verifying for libintl.so in /usr/ports/devel/gettext
===> Options unchanged
===> Fetching all distfiles required by gettext-0.18.3.1 for building
===>  Extracting for gettext-0.18.3.1
=> SHA256 Checksum OK for gettext-0.18.3.1.tar.gz.
===>  Patching for gettext-0.18.3.1
===>  Applying FreeBSD patches for gettext-0.18.3.1
===>   gettext-0.18.3.1 depends on shared library: libiconv.so.3 - not found
===>    Verifying for libiconv.so.3 in /usr/ports/converters/libiconv
===> Options unchanged
===> Fetching all distfiles required by libiconv-1.14_1 for building
===>  Extracting for libiconv-1.14_1
=> SHA256 Checksum OK for libiconv-1.14.tar.gz.
===>  Patching for libiconv-1.14_1
===>  Applying FreeBSD patches for libiconv-1.14_1
===>  Configuring for libiconv-1.14_1
env: ./configure: Permission denied
===>  Script "configure" failed unexpectedly.
Please report the problem to gnome@FreeBSD.org [maintainer] and attach the
"/var/ports/basejail/usr/ports/converters/libiconv/work/libiconv-1.14/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/sbin/pkg_info -Ea).
*** [do-configure] Error code 1

Stop in /basejail/usr/ports/converters/libiconv.
*** [install] Error code 1

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

Stop in /basejail/usr/ports/devel/gettext.
*** [install] Error code 1

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

Stop in /basejail/usr/ports/devel/gmake.
*** [install] Error code 1

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

Stop in /basejail/usr/ports/net/haproxy.
*** [install] Error code 1

Stop in /basejail/usr/ports/net/haproxy.
root@newjail:/usr/ports/net/haproxy #

I'm going back to try to give permissions to the mount point port, I can not think of anything more :(

Regards
 
I just had the same problem, and your thread helped me solve it. Thanks!

In summary, I could not execute commands in my jails. I was getting errors such as this when building ports:
Code:
/usr/local/sbin/pkg-static: Permission denied

After reading this thread I realised the jails were in a ZFS dataset that had exec=off set. This was resolved by setting:
Code:
# zfs set exec=on DATASET
 
Back
Top