Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 21:53:48 +0200
From:      =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= <fernando.apesteguia@gmail.com>
To:        =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@bluelife.at>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: [new-port] JDownloader
Message-ID:  <CAGwOe2Z8RxcLMGALs4Uyog1p7ZV7nP0Ccu27hjuW0bLiyB1Pxg@mail.gmail.com>
In-Reply-To: <CAGwOe2bsQb3-4e2peErD-pzqs4gR9U-tGLveh2a1H3Tyj3aL1Q@mail.gmail.com>
References:  <CAGwOe2bbBCOqcTpudF8sGKNQYf46a8xRdBKTP12OwQ6hesOTmw@mail.gmail.com> <1341164678.10569.2.camel@Nokia-N900-42-11> <CAGwOe2aA0Q3DtGiapU1AgC3w9wyG4sLdEhebTx4GagCbFKsr_Q@mail.gmail.com> <1341168064.10742.2.camel@Nokia-N900-42-11> <CAGwOe2ZRm1VdFmr4RY42=rR08okZo98vDH2D0krUUsLziNgCiw@mail.gmail.com> <CAE-m3X2GgFSM2JKmFp4K1b7emPFxSjuHUhG-dGp%2Bx4oXt0tnvw@mail.gmail.com> <CAGwOe2bsQb3-4e2peErD-pzqs4gR9U-tGLveh2a1H3Tyj3aL1Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 2, 2012 at 9:59 AM, Fernando Apestegu=EDa
<fernando.apesteguia@gmail.com> wrote:
>
> El 02/07/2012 09:51, "Bernhard Fr=F6hlich" <decke@bluelife.at> escribi=F3=
:
>
>
>>
>> On Sun, Jul 1, 2012 at 11:49 PM, Fernando Apestegu=EDa
>> <fernando.apesteguia@gmail.com> wrote:
>> >
>> > El 01/07/2012 20:45, "Bernhard Fr=F6hlich" <decke@bluelife.at> escribi=
=F3:
>> >>
>> >> On So.,   1. Jul. 2012 20:09:09 CEST, Fernando Apestegu=EDa
>> >> <fernando.apesteguia@gmail.com> wrote:
>> >>
>> >> > On Sun, Jul 1, 2012 at 7:44 PM, Bernhard Fr=F6hlich <decke@bluelife=
.at>
>> >> > wrote:
>> >> > > On So.,     1. Jul. 2012 19:32:58 CEST, Fernando Apestegu=EDa
>> >> > > <fernando.apesteguia@gmail.com> wrote:
>> >> > >
>> >> > > > Hi all,
>> >> > > >
>> >> > > > I have a preliminary version of a port for JDownloader[1] since
>> >> > > > it
>> >> > > > seems to be a wanted port[2]
>> >> > > >
>> >> > > > Here is the Makefile:
>> >> > > >
>> >> > > >
>> >> > > >
>> >> > > > ---------------------------------------------------------------=
--------
>> >> > > > # New ports collection makefile for:       jdownloader
>> >> > > > # Date created:
>> >> > > > Sun Jul 1 2012
>> >> > > > # Whom:                                       Fernando Apestegu=
ia
>> >> > > > <fernando.apesteguia@gmail.com> #
>> >> > > > # $FreeBSD$
>> >> > > >
>> >> > > > PORTNAME=3D       jdownloader
>> >> > > > PORTVERSION=3D       1.0
>> >> > > > CATEGORIES=3D       java ftp
>> >> > > > MASTER_SITES=3D       http://212.117.163.148/
>> >> > > > DISTNAME=3D       jd.sh
>> >> > > > EXTRACT_SUFX=3D
>> >> > > >
>> >> > > > MAINTAINER=3D       fernando.apesteguia@gmail.com
>> >> > > > COMMENT=3D       Download management for one-click-hosters
>> >> > > >
>> >> > > > RUN_DEPENDS=3D
>> >> > > > ${LOCALBASE}/bin/java:${PORTSDIR}/java/diablo-jdk16
>> >> > > > RUN_DEPENDS+=3D       ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wge=
t
>> >> > > >
>> >> > > > USE_JAVA=3D       yes
>> >> > > > JAVA_VERSION=3D       1.6+
>> >> > > > NO_BUILD=3D       yes
>> >> > > >
>> >> > > > WRKSRC=3D               ${WRKDIR}
>> >> > > >
>> >> > > > do-extract:
>> >> > > > @${MKDIR} ${WRKDIR}
>> >> > > > @${CP} ${DISTDIR}/jd.sh ${WRKSRC}
>> >> > > >
>> >> > > > do-install:
>> >> > > > @${MKDIR} ${PREFIX}/${PORTNAME}
>> >> > > > @${INSTALL_SCRIPT} ${WRKSRC}/jd.sh ${PREFIX}/bin
>> >> > > >
>> >> > > > post-install:
>> >> > > > @${ECHO_MSG} ""
>> >> > > > @${ECHO_MSG}
>> >> > > >
>> >> > > >
>> >> > > > "**************************************************************=
***********"
>> >> > > > @${ECHO_MSG} JDownloader will update itself to the latest versi=
on
>> >> > > > when it runs for the       @${ECHO_MSG} first time. Please run
>> >> > > > ${LOCALBASE}/bin/jd.sh       @${ECHO_MSG} to complete the
>> >> > > > installation
>> >> > > > @${ECHO_MSG}
>> >> > > >
>> >> > > >
>> >> > > > "**************************************************************=
***********"
>> >> > > > @${ECHO_MSG} ""       @${CAT} ${PKGMESSAGE}
>> >> > > >
>> >> > > > .include <bsd.port.mk>
>> >> > > >
>> >> > > >
>> >> > > > ---------------------------------------------------------------=
--------
>> >> > > >
>> >> > > > The port just needs a simple patch file (patch-jd.sh):
>> >> > > >
>> >> > > >
>> >> > > >
>> >> > > > ---------------------------------------------------------------=
--------
>> >> > > > --- jd.sh.orig       2012-07-01 14:23:07.000000000 +0200
>> >> > > > +++ jd.sh       2012-07-01 14:24:15.000000000 +0200
>> >> > > > @@ -1,4 +1,4 @@
>> >> > > > -#!/bin/bash
>> >> > > > +#!/bin/sh
>> >> > > > #JD Installer/Starter Version 0.2
>> >> > > > #by Jiaz(JD-Team), jiaz@jdownloader.org
>> >> > > > #You need at least:
>> >> > > >
>> >> > > >
>> >> > > > ---------------------------------------------------------------=
--------
>> >> > > >
>> >> > > > The jd.sh runs fine with sh(1) so there is no need for a new ru=
n
>> >> > > > dependency for bash(1).
>> >> > > >
>> >> > > > The port installs one single file (jd.sh). This script when
>> >> > > > executed,
>> >> > > > checks for the presence of the JDownloader jar files under the
>> >> > > > ~/.jd
>> >> > > > directory. If they don't exist it starts the uploader applicati=
on
>> >> > > > and
>> >> > > > downloads the latest files. If the files were already present, =
it
>> >> > > > launches the installation and if the installation is already
>> >> > > > present,
>> >> > > > it launches the program.
>> >> > > > Uninstalling the port uninstalls the jd.sh file but _not_ the
>> >> > > > actual
>> >> > > > application that might be installed by the users in their
>> >> > > > respective
>> >> > > > home directories. Taking into account that JDownloader can be
>> >> > > > installed anyway just by downloading the source I don't suppose
>> >> > > > this
>> >> > > > is a concern. Since the program can act as a server (it install=
s
>> >> > > > a
>> >> > > > plugin for remote controlling the application similarly to what
>> >> > > > transmission torrent does), it shows a message after the
>> >> > > > installation.
>> >> > > >
>> >> > > > I haven't submitted a PR yet, so any suggestions are welcomed.
>> >> > > >
>> >> > > > Thanks in advance.
>> >> > > >
>> >> > > > [1] http://jdownloader.org/
>> >> > > > [2] http://wiki.freebsd.org/WantedPorts
>> >> > >
>> >> > > Is there a reason why you explicitly add diablo-jdk16 as runtime
>> >> > > dependency? The use_java stuff should be sufficient.
>> >> >
>> >> > You're right, doesn't seem to be necessary.
>> >> >
>> >> > >
>> >> > > Why have you decided to download and install the jar files on fir=
st
>> >> > > run of the shellscript? That doesn't sound like a good idea to me
>> >> > > because it breaks proper updates, deinstall and creates useless
>> >> > > binary
>> >> > > packages.
>> >> >
>> >> > I haven't. jd.sh is provided by the upstream project. The alternati=
ve
>> >> > is another "nicer" installation program.
>> >>
>> >> FreeBSD portstree is exactly that nicer installer that you are talkin=
g
>> >> about.
>> >>
>> >> > Since this is just a wrapper to do several things and the actual
>> >> > software is installed in the user's home directory, I agree we coul=
d
>> >> > have two different users with two different versions of JDownloader=
.
>> >> > By the way, the jd.sh script tries to update _just the first time_
>> >> > but
>> >> > after that, the user can always look for new versions from inside
>> >> > JDownloader (in fact, it checks for new versions from the java code
>> >> > every time it runs).
>> >>
>> >> Yeah many projects implement their own update mechanism mostly becaus=
e
>> >> windows has no package management. For a FreeBSD user and administrat=
or
>> >> it
>> >> should be an seamless integration so that he doesn't need to search f=
or
>> >> update dialogs or buttons within installed programms. Even fully
>> >> automated
>> >> updating is a problem in case of regressions and for major changes in
>> >> functionality.
>> >>
>> >> So what we need is a port that properly installs the few jar files in=
to
>> >> system paths and a shellscript that launches a jvm with that jar file=
s.
>> >> Additionally we should disable the automatic updating stuff. Have a
>> >> look at
>> >> other java based ports on how to do that.
>> >
>> > Do you know of any ports doing something similar?
>>
>> finance/jgnash and www/helma would be examples
>
> I'll have a look at them ad come back to the list.

I had a look at it and it doesn't look promising...

The application is simply not designed to be installed once and used
by several users. It just expects to be installed in ~/. Besides, it
needs write permissions just to run and the auto updates are nailed in
the code and can't be disabled by configuration or command line[1].
This is pretty ugly and forces to heavily patch the code in order to
deactivate updates.
Archlinux seemed to face the same problems[2] and used the Fedora approach.

Regards

[1] http://board.jdownloader.org/showthread.php?t=3D14507
[2] https://aur.archlinux.org/packages.php?ID=3D29288&comments=3Dall

>
> Thank you very much.
>
>>
>> --
>> Bernhard Fr=F6hlich
>> http://www.bluelife.at/



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