From owner-freebsd-pkg@FreeBSD.ORG Tue May 13 12:37:27 2014 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61448A1C; Tue, 13 May 2014 12:37:27 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2628821D7; Tue, 13 May 2014 12:37:27 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id ar20so228114iec.29 for ; Tue, 13 May 2014 05:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=rThmXYSlXya26lyDukSpkaUhtrcfRIJFCD7Wt9h8aiI=; b=foZy644I/n/ia5Uf5zAkQCe86lQOfANCGIY6BmE4VTRBeTptl/xJ8v+BgBUP5RwtK5 TgVJuLUwgeMZfd20ydvxn8ALCN+9ObHstSIh1lKNynwhw8O3So6VYI7P2OEDhSgtB4LT 54Q/RLkfrhUqPFb9RvhruHbHuTPSwE42Patx9Wsd/TY9D7drXoTMDixGgkiWA8yCZ8Ws yc3J9vUa7zvrxLstSYXR4KizmwzpMBGDItfLsGwxb3eC+n9hBAXRbabWaDAAUSnwktvq gCyNT++AonE9pVOLZqzad+yBrl5HxboOVsum9FuadX4RdqWFgUnZke9OKv8CoSCB9xEO zkPg== X-Received: by 10.50.119.132 with SMTP id ku4mr54689905igb.35.1399984646564; Tue, 13 May 2014 05:37:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.250.147 with HTTP; Tue, 13 May 2014 05:36:45 -0700 (PDT) Reply-To: hamza.abdelkebir@gmail.com In-Reply-To: <5371EB62.9090805@FreeBSD.org> References: <5371EB62.9090805@FreeBSD.org> From: Hamza Abdelkebir Date: Tue, 13 May 2014 14:36:45 +0200 Message-ID: Subject: Re: Mysql server dependency To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-pkg@freebsd.org X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 12:37:27 -0000 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 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 > > >