Changeset View
Standalone View
Makefile
Context not available. | |||||
PORTNAME= mesos | PORTNAME= mesos | ||||
PORTVERSION= 1.10.0 | PORTVERSION= 1.10.0 | ||||
PORTREVISION= 1 | PORTREVISION= 2 | ||||
CATEGORIES= sysutils | CATEGORIES= sysutils | ||||
MASTER_SITES= APACHE/mesos/${PORTVERSION} | MASTER_SITES= APACHE/mesos/${PORTVERSION}:mesos | ||||
PKGNAMEPREFIX= apache- | PKGNAMEPREFIX= apache- | ||||
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:mesos | |||||
DIST_SUBDIR= ${PKGNAMEPREFIX}${PORTNAME} | |||||
MAINTAINER= james.wright@digital-chaos.com | MAINTAINER= james.wright@digital-chaos.com | ||||
COMMENT= Cluster manager providing resource isolation and sharing | COMMENT= Cluster manager providing resource isolation and sharing | ||||
Context not available. | |||||
INSTALL_TARGET= install-strip | INSTALL_TARGET= install-strip | ||||
OPTIONS_DEFINE= DEPLOY | OPTIONS_DEFINE= DEPLOY JAVA | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
DEPLOY_DESC= Install deploy scripts | DEPLOY_DESC= Install deploy scripts | ||||
JAVA_DESC= Enable Java bindings | |||||
JAVA_CONFIGURE_ENABLE= java | |||||
JAVA_USE= java=yes | |||||
JAVA_BUILD_DEPENDS= mvn:devel/maven | |||||
JAVA_FETCH_DEPENDS= mvn:devel/maven | |||||
JAVA_CONFIGURE_ENV= PROTOBUF_JAR="${MAVEN_REPO}/com/google/protobuf/protobuf-java/${PROTOBUF_VERSION}/protobuf-java-${PROTOBUF_VERSION}.jar" | |||||
JAVA_MAKE_ENV= MAVEN_OPTS="${MAVEN_OPTS}" | |||||
JAVA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_java_mesos.pom.in | |||||
# REVIEW: Can we figure out the current Protobuf version in ports instead of hardcoding??? | |||||
PROTOBUF_VERSION= 3.12.2 | |||||
MAVEN_CMD= mvn | |||||
MAVEN_REPO= ${WRKDIR}/mesos-maven-deps-${PORTVERSION} | |||||
james.wright_digital-chaos.com: ${HOME}/.m2 is not writeable when built with poudriere (see link below), could we use… | |||||
Not Done Inline ActionsTBH I don't know what's the right solution of this. We probably need to consult people on -java@. lwhsu: TBH I don't know what's the right solution of this. We probably need to consult people on… | |||||
Done Inline ActionsAgreed. Although it does seem ${HOME}/.m2 is not going to work whatever is decided. Could we try another build if I change the local Maven repo to ${TMPDIR}/.m2? james.wright_digital-chaos.com: Agreed. Although it does seem ${HOME}/.m2 is not going to work whatever is decided. Could we… | |||||
Done Inline ActionsOh I totally forgot one thing, if we're using maven to download things to .m2, then it mean a violation of the rule of not downloading anything in the build phase. We need to check how other java ports resolve this, and/or ask on -ports@ and -java@. lwhsu: Oh I totally forgot one thing, if we're using maven to download things to .m2, then it mean a… | |||||
Done Inline ActionsIt's downloading all the dependencies upfront in the fetch phase not the build phase (see line 96 of the Makefile). Some other ports I looked at have bundled the dependencies into a tarball and hosted on a personal/private repo, which IMHO is suboptimal compared with fetching the artifacts directly from the offical Maven repo upfront in the fetch phase. james.wright_digital-chaos.com: It's downloading all the dependencies upfront in the fetch phase not the build phase (see line… | |||||
Done Inline ActionsOh ok this sounds better, but this files are not verified with checksum, which might not be good enough. Is there a way to download them to ${DISTDIR} or maybe ${DISTDIR}/m2 and put the checksum in distinfo for verifying in the checksum phase? lwhsu: Oh ok this sounds better, but this files are not verified with checksum, which might not be… | |||||
Done Inline ActionsI had considered downloading the maven deps into ${DISTDIR}/.m2, but then didn't know how i'd go about generating the distinfo with all the checksums (there are a lot of artifacts downloaded). Also it seems redundant doing our own checksumming/verifying when Maven itself is checksumming/verifying everything it does from the official repo. If we can't trust Maven to get it right, then we have bigger problem. :-) james.wright_digital-chaos.com: I had considered downloading the maven deps into ${DISTDIR}/.m2, but then didn't know how i'd… | |||||
Done Inline ActionsIndeed. I have this question for a long time, but still don't have a good solution. Do you mind to start a thread on -ports@ to discuss how should we deal with those java ports with maven? lwhsu: Indeed. I have this question for a long time, but still don't have a good solution. Do you mind… | |||||
MAVEN_OPTS= -Dmaven.repo.local=${MAVEN_REPO} | |||||
MAVEN_ENV= PROTOBUF_VERSION="${PROTOBUF_VERSION}" MAVEN_OPTS="${MAVEN_OPTS}" | |||||
MAVEN_POM= ${FILESDIR}/maven-deps.pom | |||||
DEV_BUILD_MODE= no | |||||
.if (${DEV_BUILD_MODE} == "yes") | |||||
# Fetch Maven build dependencies upfront into local Maven Repo | |||||
# Needs to be after extract (as WRKDIR gets wiped) but before Configure | |||||
post-extract-JAVA-on: | |||||
@${SETENV} ${MAVEN_ENV} \ | |||||
${MAVEN_CMD} -f ${MAVEN_POM} dependency:go-offline | |||||
.else | |||||
MASTER_SITES+= https://github.com/Digital-Chaos/mesos-maven-deps/archive/${DISTVERSION}/:maven | |||||
DISTFILES+= mesos-maven-deps-${DISTVERSION}${EXTRACT_SUFX}:maven | |||||
.endif | |||||
# Replace Protobuf version in src/java/mesos.pom.in | |||||
do-patch-JAVA-on: | |||||
@${REINPLACE_CMD} -e 's|@PROTOBUF_VERSION@|${PROTOBUF_VERSION}|g' ${WRKSRC}/src/java/mesos.pom.in | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> | ||||
Context not available. |
${HOME}/.m2 is not writeable when built with poudriere (see link below), could we use ${TMPDIR}/.m2 instead?
https://gist.github.com/lwhsu/7298ec52c6c4dad0c7af1cc5792cebdf