# portupgrade installation error



## steveninnewton (Oct 1, 2013)

I am receiving the following error when attempting to install portupgrade. I first got the error when attempting to upgrade and decided to `pkg_remove` it. Still stops with the same message. Any insight on how I can correct this issue would be appreciated.


```
root@base:/usr/ports/ports-mgmt/portupgrade # make install clean
===>  License BSD accepted by the user
===>  Found saved configuration for portupgrade-2.4.10.4_1,2
===> Fetching all distfiles required by portupgrade-2.4.11.2,2 for building
===>  Extracting for portupgrade-2.4.11.2,2
=> SHA256 Checksum OK for portupgrade/pkgtools-2.4.11.2.tar.bz2.
===>   portupgrade-2.4.11.2,2 depends on file: /usr/local/bin/ruby19 - found
===>  Patching for portupgrade-2.4.11.2,2
===>   portupgrade-2.4.11.2,2 depends on file: /usr/local/bin/ruby19 - found
===>   portupgrade-2.4.11.2,2 depends on file: /usr/local/bin/ruby19 - found
===>  Configuring for portupgrade-2.4.11.2,2
===>  Building for portupgrade-2.4.11.2,2
===> bin (all)

...

===>   Installing ldconfig configuration file
===>  Building package for portupgrade-2.4.11.2,2
Creating package /basejail/usr/ports/ports-mgmt/portupgrade/portupgrade-2.4.11.2,2.tbz
Registering depends: ruby19-bdb-0.6.6_1 db41-4.1.25_4 ruby-1.9.3.448,1 libexecinfo-1.1_3 libffi-3.0.13 libyaml-0.1.4_2.
Registering conflicts: portupgrade-devel-*.
Creating bzip'd tar ball in '/basejail/usr/ports/ports-mgmt/portupgrade/portupgrade-2.4.11.2,2.tbz'
tar: Failed to open '/basejail/usr/ports/ports-mgmt/portupgrade/portupgrade-2.4.11.2,2.tbz'
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1

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

Stop in /basejail/usr/ports/ports-mgmt/portupgrade.
```


----------



## chatwizrd (Oct 1, 2013)

Time to switch to ports-mgmt/portmaster.


----------



## elno (Oct 2, 2013)

Same thing here. Seems like `make` for some ports is trying to write into the ports directory which is mounted r/o for jails even if WRKDIRPREFIX is set.


----------



## johnblue (Oct 2, 2013)

> Failed to open '/basejail/usr/ports/ports-mgmt/portupgrade/portupgrade-2.4.11.2,2.tbz'



Could it be that it is a permissions issue with root and the jail?

Regarding one vs the other .. I thought this thread was a helpful comparison:

http://forums.freebsd.org/showthread.php?t=6078


----------



## steveninnewton (Oct 2, 2013)

elno said:
			
		

> Same thing here. Seems like MAKE for some ports is trying to write into the ports directory which is mounted r/o for jails even if WRKDIRPREFIX ist set...



It would be important for me to mention I am using sysutils/ezjail and this is occurring within a jail.   Worked fine on the host.

As for running `portmaster` vs `portupgrade`, I have been using the later since I have administered a FreeBSD server.  All of my documentation is written for ports-mgmt/portupgrade.  Guess I am just too stubborn to change.


----------



## steveninnewton (Oct 2, 2013)

johnblue said:
			
		

> Could it be that it is a permissions issue with root and the jail?



Have not tried it out yet but looks like yes.

http://www.freebsd.org/cgi/query-pr.cgi?pr=180739


----------



## steveninnewton (Oct 3, 2013)

chatwizrd said:
			
		

> Time to switch to ports-mgmt/portmaster



Nothing to do with ports-mgmt/portupgrade, it is an sysutils/ezjail issue.


```
root@base:/usr/ports/ports-mgmt/portmaster # make install clean

...

===>  License BSD accepted by the user
===>  Found saved configuration for portmaster-3.17.2
=> g-freebsd-portmaster-3.17.2-7359019.tar.gz doesn't seem to exist in /var/ports/distfiles/.
=> Attempting to fetch http://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/bdrewery/portmaster/g-freebsd-portmaster-3.17.2-7359019.tar.gz
g-freebsd-portmaster-3.17.2-7359019.tar.gz    100% of   43 kB  183 kBps
===> Fetching all distfiles required by portmaster-3.17.2 for building
===>  Extracting for portmaster-3.17.2
=> SHA256 Checksum OK for g-freebsd-portmaster-3.17.2-7359019.tar.gz.
===>  Patching for portmaster-3.17.2
===>  Configuring for portmaster-3.17.2
===>  Building for portmaster-3.17.2
/usr/bin/sed -e 's#/usr/local#/usr/local#g' /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/freebsd-portmaster-7359019/portmaster  > /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/portmaster
/usr/bin/sed -e 's#/usr/local#/usr/local#g' /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/freebsd-portmaster-7359019/files/portmaster.rc.sample  > /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/portmaster.rc.sample
===>  Staging for portmaster-3.17.2
===>   Generating temporary packing list
install  -o root -g wheel -m 555 /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/portmaster  /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/stage/usr/local/sbin/portmaster
install  -o root -g wheel -m 444 /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/portmaster.rc.sample  /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/stage/usr/local/etc
install  -o root -g wheel -m 444 /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/freebsd-portmaster-7359019/files/portmaster.8  /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/stage/usr/local/man/man8
/bin/mkdir -p /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/stage/usr/local/etc/bash_completion.d
install  -o root -g wheel -m 444 /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/freebsd-portmaster-7359019/files/bash-completions  /var/ports/basejail/usr/ports/ports-mgmt/portmaster/work/stage/usr/local/etc/bash_completion.d/portmaster.sh
====> Compressing man pages
===>  Building package for portmaster-3.17.2
Creating package /basejail/usr/ports/ports-mgmt/portmaster/portmaster-3.17.2.tbz
Registering depends:.
Creating bzip'd tar ball in '/basejail/usr/ports/ports-mgmt/portmaster/portmaster-3.17.2.tbz'
tar: Failed to open '/basejail/usr/ports/ports-mgmt/portmaster/portmaster-3.17.2.tbz'
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1

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

Stop in /basejail/usr/ports/ports-mgmt/portmaster.
```


----------



## SirDice (Oct 3, 2013)

It's neither. It seems to be a ports issue. It wants to create a package when it shouldn't. A package should only be created when instructed to do so.


----------



## steveninnewton (Oct 3, 2013)

SirDice said:
			
		

> It's neither. It seems to be a ports issue. It wants to create a package when it shouldn't. A package should only be created when instructed to do so.



You are correct.  Updated the ezjail ports tree just now using `ezjail-admin update -P` and the issue has been resolved. 

Thank you for the clarification.


----------

