# Package Management of newly compiled software



## doa379 (Jul 4, 2014)

I understand the ports collection manages the install and deinstall of packages already in the /usr/ports/ collection. What about the management of other packages which are not in the ports collection? Install is simple with `make install`. How can I manage the deinstall and update (via version tracking) of those? What is the method of version tracking packages in FreeBSD?


----------



## wblock@ (Jul 4, 2014)

BSD--user said:
			
		

> I understand the Ports collection manages the install and deinstall of packages already in the /usr/ports/ collection.



Well, the package database does.  A port, once installed, is just another package.



> What about the management of other packages which are not in the ports collection? Install is simple with `make install`. How can I manage the deinstall and update (via version tracking) of those?



This is one of the key advantages of ports and packages, the ability to cleanly deinstall or update.  The answer is: there is nothing that tracks software installed outside of the ports/packages system.  It's up to the user to keep track of those files and directories.  This is why many of us always suggest using a port, or even creating a port when one does not yet exist.


----------



## doa379 (Jul 4, 2014)

Is there a simple answer to creating a port when one does not exist? Such as retaining the Makefile of the project/package?


----------



## kpa (Jul 4, 2014)

The quick porting part of the Porter's Handbook:

http://www.freebsd.org/doc/en/books/porters-handbook/


----------



## fonz (Jul 4, 2014)

wblock@ said:
			
		

> The answer is: there is nothing that tracks software installed outside of the ports/packages system.  It's up to the user to keep track of those files and directories.  This is why many of us always suggest using a port, or even creating a port when one does not yet exist.


I also recommend that when one does install software outside the ports/packages framework, one puts it in a /opt directory tree (e.g. /opt/bin, /opt/etc, /opt/lib, etc. or even something like /opt/maple18) rather than in /usr/local (which is for ports/packages) or - even worse - / (which is for the base system). This tends to make it easier to keep track of installed stuff from outside the ports/packages framework.


----------



## uzsolt (Jul 7, 2014)

BSD--user said:
			
		

> How can I manage the deinstall and update (via version tracking) of those?


Which package?


----------



## doa379 (Jul 8, 2014)

uzsolt said:
			
		

> Which package?




Hi, it doesn't matter which package. I am simply interested as a matter of principle really.


----------



## uzsolt (Jul 9, 2014)

I've asked because maybe it has an alternative, maybe can simply create a port (as you asked here), etc.


----------



## asteriskRoss (Jul 9, 2014)

If you want to integrate your own software with FreeBSD's package management, but it isn't suitable for sharing publicly in the ports collection, have a look at using ports-mgmt/portshaker to build your own customized ports tree.  You would still need to do the work to parcel up your own software into a port.  You could also consider using ports-mgmt/poudriere to build your own package repository (it can be used in combination with ports-mgmt/portshaker), which would be particularly useful if you wanted to use your customized ports tree with multiple machines.


----------

