Re: [gentoo-user] SRC_URISRC_URI.mirror

2014-09-20 Thread Michael Orlitzky
On 09/20/2014 01:07 PM, James wrote:
> Hello,
> 
> So I'm working on apache spark (overlay) ebuild. 
> I cannot see to get the sources to download.
> 
> Here are the sources:
> http://www.apache.org/dist/spark/spark-1.1.0/
> or here:
> http://mir2.ovh.net/ftp.apache.org/dist/spark/spark-1.1.0/
> 
> ...
> 
> So based on 'repoman scan spark-1.1.0.ebuild' I add:
> 
> SRC_URI.mirror="mirror://apache/spark/spark/1.1.0/spark-1.1.0.tgz"
> and comment out the  original "SRC_URI" line.

The SRC_URI.mirror warning indicates that your original ebuild has a
suspicious entry in SRC_URI, namely one of Gentoo's 3rd party mirrors.
Repoman gives a warning because you probably don't need it, and I think
it's right in this case.

The entries of the SRC_URI variable are all logical-ANDed together
rather than logical-OR. In other words, every entry is downloaded and
considered part of the source. You only need the first one (from
apache.org); Gentoo will ultimately take care of mirroring it if the
ebuild makes its way into the tree.




[gentoo-user] SRC_URISRC_URI.mirror

2014-09-20 Thread James
Hello,

So I'm working on apache spark (overlay) ebuild. 
I cannot see to get the sources to download.

Here are the sources:
http://www.apache.org/dist/spark/spark-1.1.0/
or here:
http://mir2.ovh.net/ftp.apache.org/dist/spark/spark-1.1.0/

My local ebuild has these etries:



MY_PV=${PV/_/}

SRC_URI="http://www.apache.org/dist/spark/spark/${PV}/${P}.tgz
http://mir2.ovh.net/ftp.apache.org/dist/spark/spark/${PV}/${P}.tgz";

'ebuild spark-1.1.0.ebuild manifest'

When attemping to compile (emerge spark<###> ) I get:
!!! Couldn't download 'spark-1.1.0.tgz'. Aborting.
!!! Fetch failed for spark-1.1.0.tgz, can't update Manifest

So based on 'repoman scan spark-1.1.0.ebuild' I add:

SRC_URI.mirror="mirror://apache/spark/spark/1.1.0/spark-1.1.0.tgz"
and comment out the  original "SRC_URI" line.

I can then update the  manifest, but ti fails to build:

" /usr/local/portage/sys-cluster/spark/spark-1.1.0.ebuild: line 19:
SRC_URI.mirror=mirror://apache/spark/spark/1.1.0/spark-1.1.0.tgz: No such
file or directory
"

I've tried dozens and dozens of varous SRC_URI, but it just will
not download the file.

ideas?


And here is the rest, just in case anyone wants to make suggestions.

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="java python scala"

DEPEND="python? ( dev-lang/python dev-python/boto )
java? ( virtual/jdk )
scala? ( dev-lang/scala )
dev-java/maven-bin
${DEPEND}"

RDEPEND=" python? ( dev-lang/python )
  >=virtual/jdk-1.6
  scala? ( dev-lang/scala )
  dev-java/maven-bin"

S="${WORKDIR}/${P}"

ECONF_SOURCE="${S}"

src_prepare() {
mkdir "${S}/build" || die
}

src_configure() {
cd "${S}/build"
econf \
$(use_enable python) \
$(use_enable java)
}

src_compile() {
cd "${S}/build"
emake -j1 V=1
}

src_install() {
cd "${S}/build"