Own/Private FreeBSD port and portmaster -da problem

Hello,

In the company I work for we are using FreeBSD to run our servers. We also develop a large number of web (not only) applications. To facilitate the process of installing/deinstalling/upgrading of our software I want to write ports, and from them packages, for our libraries and applications. Most of our applications are written in Perl (and some on C++). So we use Module::Build to make the installer and write the port to make a package.

So I started with one simple application to compare two running databases (just to try to write some ports). After some reading I prepared the port and the package and everything looks great until I try to run portmaster -da:
Code:
===>>> Returning to update check of installed ports

===>>> Launching child to reinstall p5-DBCMP-1.0.0

===>>> All >> p5-DBCMP-1.0.0 (12/12)

        ===>>> No /usr/ports/devel/DBCMP exists, and no information
        ===>>> about devel/DBCMP can be found in /usr/ports/MOVED

===>>> No valid installed port, or port directory given
===>>> Try portmaster --help


===>>> Update for p5-DBCMP-1.0.0 failed
===>>> Aborting update

===>>> Killing background jobs
Terminated
===>>> Exiting

Here is the Makefile I've created for the port:
Code:
# $FreeBSD$

PORTNAME=       DBCMP
PORTVERSION=    1.0.0
CATEGORIES=     devel perl5
#MASTER_SITES=  CPAN
PKGNAMEPREFIX=  p5-
DISTNAME=       ${PORTNAME}-v${PORTVERSION}

MAINTAINER=     kaloyan@digsys.bg
COMMENT=        Comparing two active databases. Compares tables structure and data

BUILD_DEPENDS= p5-DBI>=1.52:${PORTSDIR}/databases/p5-DBI\
			 p5-DBD-Pg>=2.19.3:${PORTSDIR}/databases/p5-DBD-Pg \

RUN_DEPENDS:=   ${BUILD_DEPENDS}

CONFIGURE_ARGS+= install_path=etc="${PREFIX}/etc/"

PERL_MODBUILD=YES
PERL_CONFIGURE= yes

MAN3=  		  DBCMP.3 DBCMP::Private::BL.3 DBCMP::Private::DB.3

post-install:
	@if [ ! -f ${PREFIX}/etc/DBCMP/DBCMPConfig.pm ]; then \
		${CP} -p ${PREFIX}/etc/DBCMP/DBCMPConfig.pm.sample ${PREFIX}/etc/DBCMP/DBCMPConfig.pm ; \
	fi

.include <bsd.port.mk>

I want to distribute to the servers only the packages and not the ports. But I want to be able to update the servers with portmaster. I would really appreciate if someone pointed out what I did wrong. I Googled for some days but could not find anything on the topic.

Thanks in advance.
Kaloyan
 
Interesting question; something I've also been looking into for some Java based in-house software which my company uses.

Now, keep well in mind that its perfectly possible that I overlooked something. But when I looked into this I came to conclude that the ports collection (and the related tools such as portmaster) are not the best way to distribute your own software.

That is; the ports guidelines are an excellent and awesome way to package your software, which you can then distribute. But adding a private port into the ports collection is something I never saw working out.

The problem is that your ports collection isn't 'managed' by you. The moment you run portsnap (or svn) to update your ports collection then all the config files you might be able to change to include your private port will get overwritten again, and your port would then be gone from that moment on.

At least that's what I eventually concluded.

So I ended up using the ports system to build my own packages (using the make package command straight from the 'virtual port' directory). The packages are then placed in an FTP directory (though I'm considering to use NFS in the near future) where the clients use wget to check if anything new is available. If there is then the package(s) gets automatically retrieved and installed (through use of a simple shell script).
 
Subversion will not overwrite your additions to a local working copy. The index file might be a problem.
 
ShelLuser said:
Interesting question; something I've also been looking into for some Java based in-house software which my company uses.

Now, keep well in mind that its perfectly possible that I overlooked something. But when I looked into this I came to conclude that the ports collection (and the related tools such as portmaster) are not the best way to distribute your own software.

That is; the ports guidelines are an excellent and awesome way to package your software, which you can then distribute. But adding a private port into the ports collection is something I never saw working out.

The problem is that your ports collection isn't 'managed' by you. The moment you run portsnap (or svn) to update your ports collection then all the config files you might be able to change to include your private port will get overwritten again, and your port would then be gone from that moment on.

At least that's what I eventually concluded.

So I ended up using the ports system to build my own packages (using the make package command straight from the 'virtual port' directory). The packages are then placed in an FTP directory (though I'm considering to use NFS in the near future) where the clients use wget to check if anything new is available. If there is then the package(s) gets automatically retrieved and installed (through use of a simple shell script).

Hi,

That is exactly what I am trying to do. I made a port just to use make package. I never distribute the port, only the package. But nevertheless when I install the package and then try to upgrade the installed packages by portmaster -da I see the error from my original post. Could you look for any obvious difference between my port and any of yours? Thanks in advance.

Best regards,
Kaloyan Iliev

P.S. I am using pkgng if that matters and fetch ports by portsnap.
 
Hi,

This probably was a portmaster problem. With portupgrade there was no such problem. And after the last upgrade of portmaster the problem is resolved.

Sorry for the noise.

Best regards,
Kaloyan Iliev
 
Back
Top