Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2014 14:36:45 +0200
From:      Hamza Abdelkebir <hamza.abdelkebir@gmail.com>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: Mysql server dependency
Message-ID:  <CA%2BQjPv4cinx0Y6MjsQAreb0ogWZry8DKexJsdtiH2ydCqCmSFw@mail.gmail.com>
In-Reply-To: <5371EB62.9090805@FreeBSD.org>
References:  <CA%2BQjPv4kuihvDhK1708Q8WnHX-4SXv4JM-te8g_Z2z01m3BWgg@mail.gmail.com> <5371EB62.9090805@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Matthew,

Thank you for your help.
I'm packaging an internal app for the company I'm working for. It's a
webapp which runs on tomcat, mysql server on  a FreeBSD 9.2. The app should
be delivered to production using a pkgng formatted archive and not in a
form of a port. i.e.
the user will install it using *pkg add appname-version.txz* (all packages
that this app depends on are also given to the user).

I made the changes you recommended but it does not seem to work.
Mysql56-server dependency is not in the produced package.

# make build-depends-list
/usr/ports/archivers/unzip
/usr/ports/ports-mgmt/pkg
/usr/ports/www/tomcat7

# make actual-package-depends
servlet-api: {origin: www/servlet-api, version: "2.5_3"}
tomcat7: {origin: www/tomcat7, version: "7.0.50"}
openjdk: {origin: java/openjdk7, version: "7.51.13_1,1"}

--> mysql-server does not show in the dependencies

Here's a chunk of the current Makefile: http://pastebin.com/5rWcFXR5
Here's the make log: http://pastebin.com/kqr0Yepv
My pkg.conf :
PKG_CACHEDIR: /usr/local/tmp
repos_dir: [
                "/usr/local/etc/pkg/repos"
]

Thanks,

Hamza



On Tue, May 13, 2014 at 11:52 AM, Matthew Seaman <matthew@freebsd.org>wrote:

> On 13/05/2014 08:55, Hamza Abdelkebir wrote:
> > Hi all,
> >
> > I'm having trouble with the packaging of a port which should depend on
> > mysql56-server (requirement).
> >
> > I use this in my Makefile :
> >
> > ....
> >
> > BUILD_DEPENDS+=    ${LOCALBASE}/apache-tomcat-7.0:${PORTSDIR}/www/tomcat7
> > BUILD_DEPENDS+=
> > ${LOCALBASE}/apache-tomcat-7.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7
>
> No point in having two build dependencies on the same port.  Also, you
> need a file rather than a directory in dependency lines, so choose the
> 2nd line above.
>
> > BUILD_DEPENDS+=
> > ${LOCALBASE}/bin/mysql:${PORTSDIR}/databases/mysql56-server
> > BUILD_DEPENDS+=
> > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server
>
> In this case, you've already covered this by 'USE_MYSQL' below.  No need
> to add any more dependencies.
>
> > RUN_DEPENDS+=
>  ${LOCALBASE}/bin/mysql:${PORTSDIR}/databases/mysql56-server
> > RUN_DEPENDS+=
> > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server
>
> Same: the RUN_DEPENDS on mysql56-server is supplied via 'USE_MYSQL'
>
> > RUN_DEPENDS+=
>  ${JAVAJARDIR}/servlet-api.jar:${PORTSDIR}/www/servlet-api
> > RUN_DEPENDS+=
> > ${LOCALBASE}/apache-tomcat-7.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7
>
> Everything else there looks OK.
>
> > USE_MYSQL=     server
> > WITH_MYSQL_VER= 56
> >
>
> If this is your own port, then you should be using
>
> WANT_MYSQL_VER= 56
>
> inside the port's Makefile.  WITH_MYSQL_VER is what you used to put in
> /etc/make.conf to set a system wide preference, but that has largely
> beed superceeded by the new "DEFAULT_VERSIONS+= mysql=5.6" style nowadays.
>
> >
> > Then, I create the package using *make package*.
>
> Try fixing the duplicates in your RUN_ and BUILD_DEPENDS first, and use
> WANT_MYSQL_VER rather than WITH_MYSQL_VER.  Then if you're still having
> problems please do ask again -- although this is really a question for
> freebsd-ports@...  It will help if you explain exactly which port you're
> dealing with -- if it's a new port not yet in the tree then please show
> us the code by putting it up on a pasteboard site.  Also show us the
> output when you try and build a package.
>
> > Thank you for your help.
>
>         Service is our only joy,
>
>         Matthew
>
> --
> Dr Matthew J Seaman MA, D.Phil.
> PGP: http://www.infracaninophile.co.uk/pgpkey
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BQjPv4cinx0Y6MjsQAreb0ogWZry8DKexJsdtiH2ydCqCmSFw>