# Trying to upgrade Apache



## mdudley (Aug 28, 2013)

I am trying to upgrade Apache from 2.2.22_5 to 2.2.25.  After a number of problems, primarily with it wanting libiconv uninstalled every time I did a `make`, I finally got it to `make` successfully. I ran a `make install`, and it appeared to have completed successfully. But when I check the version installed, it is unchanged. I ran it with the environment set to FORCE_PACKAGE_REGISTER so as to not delete the old working version until it was ready to update it. Anyway, if I do a `find` for "httpd" this is what I get:


```
find / -name "httpd"
/usr/local/sbin/httpd
/usr/ports/www/apache22/work/httpd-2.2.25/httpd
/usr/backups/extra/usr/local/etc/apache22/bin/httpd
/usr/extract/usr/local/etc/apache22/bin/httpd
```

When I check these entries I get:


```
-rwxr-xr-x  1 root  wheel  1097343 Jul  2  2012 /usr/local/sbin/httpd
-rwxr-xr-x  1 root  wheel  1102797 Aug 28 12:56 /usr/ports/www/apache22/work/httpd-2.2.25/httpd
-rwxr-xr-x  1 root  wheel  1325725 Jan 12  2012 /usr/backups/extra/usr/local/etc/apache22/bin/httpd
-rwxr-xr-x  1 root  wheel  1325725 Jan 12  2012 /usr/extract/usr/local/etc/apache22/bin/httpd
```

So my working copy has not been updated.  But there seems to be a copy in the apache22/work/httpd-2.2.25 directory.

Was this some type of failure?  Or did the FORCE_PACKAGE_REGISTER cause it to not update the working copy? Can I simply copy the new on over the working copy and expect it to work ok?

Thanks,

Marshall


----------



## ShelLuser (Aug 28, 2013)

mdudley said:
			
		

> I am trying to upgrade Apache from 2.2.22_5 to 2.2.25.  After a number of problems, primarily with it wanting libiconv uninstalled every time I did a make, I finally got it to make successfully.


That's a bit weird because converters/libiconv is both a run and build dependency for Apache. So when building Apache it wouldn't want libiconv completely removed. Unless of course you're using an older version.

Either way; because upgrading from 2.2.22_5 to 2.2.25 is basically a minor upgrade it really is better left to your regular port upgrading tools; there are no major changes in the configuration or anything.

My advice would be to let portmaster sort it all out and simply be done with it.



			
				mdudley said:
			
		

> But when I check the version installed, it is unchanged.
> 
> I ran it with the environment set to FORCE_PACKAGE_REGISTER so as to not delete the old working version until it was ready to update it.


That leads me wondering how you checked the version number?  Also, the official setting is FORCE_PKG_REGISTER, see /usr/ports/Mk/bsd.port.mk for that. So it's quite likely that your setting didn't do anything which you'd expected there.



			
				mdudley said:
			
		

> So my working copy has not been updated.  But there seems to be a copy in the apache22/work/httpd-2.2.25 directory.
> 
> Was this some type of failure?  Or did the FORCE_PACKAGE_REGISTER cause it to not update the working copy?  Can I simply copy the new on over the working copy and expect it to work ok?


It makes me wonder where your working copy exactly resides. Under normal circumstances it should be located in /usr/local/sbin/httpd, and from what you pasted there my conclusion would be that this is exactly what happened.

Although, as mentioned, you used the wrong variable which could of course have messed something up. But when looking at directories such as /usr/extract and /usr/backup I can't help wonder if your whole setup isn't highly customized and changed. Because those are not regular directories.

As such I also can't rule out the option that you customized the port process to such extremes that something went amiss something down the road.

From what I read though my conclusion would be that everything was updated like normal.


----------



## wblock@ (Aug 28, 2013)

mdudley said:
			
		

> I ran it with the environment set to FORCE_PACKAGE_REGISTER so as to not delete the old working version until it was ready to update it.



That is not what that is for, it's like `make reinstall`.  But you can build or rebuild a port all you want, and the installed binaries will not be removed until `make deinstall` is run.

Please show the contents of /etc/make.conf and the exact commands you used.  There is something odd that was done.


----------



## mdudley (Aug 29, 2013)

I never configure to use anything but the default directories.  

Anyway, I simply copied the copy I found in the work directory with the find command over to the directory it suppose to be in, and restarted Apache, and it worked fine.  The version number of Apache is easily found with the status command from the browser and after copying it over it is now saying it is the latest version.

Thanks for all the suggestions.

Marshall


----------



## wblock@ (Aug 29, 2013)

Something magic happened.  A brute-force solution does not solve that problem, which is just waiting to jump out and surprise you in the worst possible moment.


----------



## SirDice (Aug 29, 2013)

I do have the idea you now have both apache22-2.2.22_5 and apache22-2.2.25 installed. That's going to be fun on the next update 

Verify with [cmd=]pkg_version -vI | grep apache[/cmd].


----------

