All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] transmission better choice over ctorrent according to users voices
@ 2010-09-09 20:28 Marcus Osdoba
  2010-09-09 20:28 ` [Buildroot] [PATCH] introducing transmission bittorrent client Marcus Osdoba
  0 siblings, 1 reply; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-09 20:28 UTC (permalink / raw)
  To: buildroot

a lot of people confirmed that ctorrent is segfaulting to often and resource intensiv,
they preferred transmission over ctorrent

transmission has a daemon mode which is quite excellent for headless embedded devices
the webinterface is a real eyecandy

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-09 20:28 [Buildroot] transmission better choice over ctorrent according to users voices Marcus Osdoba
@ 2010-09-09 20:28 ` Marcus Osdoba
  2010-09-10  5:07   ` Belisko Marek
  2010-09-10  6:55   ` Thomas Petazzoni
  0 siblings, 2 replies; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-09 20:28 UTC (permalink / raw)
  To: buildroot

introduces version 2.04 of transmission,
it has an excellent web interface which runs on port 9091 per default,
the patch provides two options, enable cli and/or remote component

the work is based on the patch from Kelvin Cheung

Signed-off-by: Marcus Osdoba <marcus.osdoba@googlemail.com>
---
 fs/skeleton/var/transmission         |    1 +
 package/Config.in                    |    1 +
 package/transmission/Config.in       |   23 +++++++++
 package/transmission/S92transmission |   88 ++++++++++++++++++++++++++++++++++
 package/transmission/transmission.mk |   32 ++++++++++++
 5 files changed, 145 insertions(+), 0 deletions(-)
 create mode 120000 fs/skeleton/var/transmission
 create mode 100755 package/transmission/Config.in
 create mode 100755 package/transmission/S92transmission
 create mode 100644 package/transmission/transmission.mk

diff --git a/fs/skeleton/var/transmission b/fs/skeleton/var/transmission
new file mode 120000
index 0000000..1431b0e
--- /dev/null
+++ b/fs/skeleton/var/transmission
@@ -0,0 +1 @@
+../tmp
\ No newline at end of file
diff --git a/package/Config.in b/package/Config.in
index d60d8ef..17386ad 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -427,6 +427,7 @@ source "package/thttpd/Config.in"
 source "package/tinyhttpd/Config.in"
 endif
 source "package/tn5250/Config.in"
+source "package/transmission/Config.in"
 source "package/ttcp/Config.in"
 source "package/udpcast/Config.in"
 source "package/vpnc/Config.in"
diff --git a/package/transmission/Config.in b/package/transmission/Config.in
new file mode 100755
index 0000000..49f618f
--- /dev/null
+++ b/package/transmission/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_TRANSMISSION
+	bool "transmission"
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBEVENT
+	default n
+	help
+	  transmission - Transmission BitTorrent Client
+
+config BR2_PACKAGE_TRANSMISSION_CLI
+	bool "transmissioncli"
+	depends on BR2_PACKAGE_TRANSMISSION
+	default no
+	help
+	  Install transmission command line interface.
+
+config BR2_PACKAGE_TRANSMISSION_REMOTE
+	bool "transmission-remote"
+	depends on BR2_PACKAGE_TRANSMISSION
+	default yes
+	help
+	  Install transmission remote management tool.
diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission
new file mode 100755
index 0000000..9c15aae
--- /dev/null
+++ b/package/transmission/S92transmission
@@ -0,0 +1,88 @@
+#!/bin/sh
+if [ ! -z "$2" ]; then
+	TRANSMISSION_ARGS="$2"
+else
+	TRANSMISSION_ARGS=""
+fi
+
+if [ ! -z "$3" ]; then
+	NET_INTERFACE="$3"
+else
+	NET_INTERFACE=""
+fi
+
+DESC="bittorrent client"
+NAME=transmission-daemon
+DAEMON=$(which $NAME)
+SCRIPTNAME=/etc/init.d/$0
+
+[ -x "$DAEMON" ] || exit 0
+
+do_start()
+{
+	if [ ! -z "$NET_INTERFACE" ]; then
+		# poll network interface
+		IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+		IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+		while [ -z "$IP_ADDR" ]
+		do
+			sleep 5
+			IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+			IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+		done
+	fi
+	if [ -z "$TRANSMISSION_ARGS" ]; then
+		start-stop-daemon -S -b -x ${DAEMON}
+	else
+		start-stop-daemon -S -b -x ${DAEMON} -- ${TRANSMISSION_ARGS}
+	fi
+	return $?
+}
+
+do_stop()
+{
+	start-stop-daemon -K -b -x ${DAEMON}
+	return $?
+}
+
+case "$1" in
+	start)
+		echo "Starting $DESC" "$NAME..."
+		do_start
+		case "$?" in
+			0) echo "   Start $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Start $DESC $NAME: FAILED"
+				exit 3
+				;;
+		esac
+		;;
+	stop)
+		echo "Stopping $DESC $NAME..."
+		do_stop
+		case "$?" in
+			0) echo "   Stop $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Stop $DESC $NAME: FAILED"
+				exit 3
+				;;
+		esac
+		;;
+	restart|force-reload)
+		echo "Restarting $DESC $NAME..."
+		do_stop
+		sleep 2
+		do_start
+		case "$?" in
+			0) echo "   Restart $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Restart $DESC $NAME: FAILED: couldn't start $NAME"
+				exit 3
+				;;
+		esac
+		;;
+	*)
+		echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+		exit 3
+		;;
+esac
diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk
new file mode 100644
index 0000000..71d4b43
--- /dev/null
+++ b/package/transmission/transmission.mk
@@ -0,0 +1,32 @@
+#############################################################
+#
+# transmission
+#
+#############################################################
+#
+#
+TRANSMISSION_VERSION=2.04
+TRANSMISSION_SOURCE=transmission-$(TRANSMISSION_VERSION).tar.bz2
+TRANSMISSION_SITE=http://mirrors.m0k.org/transmission/files/
+TRANSMISSION_LIBTOOL_PATCH=NO
+TRANSMISSION_DEPENDENCIES= host-pkg-config host-intltool zlib openssl libcurl libevent
+
+TRANSMISSION_CONF_OPT = --prefix=/usr \
+			--localstatedir=/var/transmission \
+			--disable-gtk \
+			--disable-libnotify \
+			--enable-daemon \
+			--with-zlib=$(STAGING_DIR) \
+			$(DISABLE_NLS) \
+			$(DISABLE_LARGEFILE)
+
+ifneq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
+TRANSMISSION_CONF_OPT += --disable-cli
+endif
+
+ifneq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
+TRANSMISSION_CONF_OPT += --disable-remote
+endif
+
+
+$(eval $(call AUTOTARGETS,package,transmission))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-09 20:28 ` [Buildroot] [PATCH] introducing transmission bittorrent client Marcus Osdoba
@ 2010-09-10  5:07   ` Belisko Marek
  2010-09-10  8:10     ` Thomas Petazzoni
  2010-09-10  6:55   ` Thomas Petazzoni
  1 sibling, 1 reply; 16+ messages in thread
From: Belisko Marek @ 2010-09-10  5:07 UTC (permalink / raw)
  To: buildroot

To be honest I post patch for transmission 4 months ago and also
splashy package month ago
and the're still not in the release. Why?

On Thu, Sep 9, 2010 at 10:28 PM, Marcus Osdoba
<marcus.osdoba@googlemail.com> wrote:
> introduces version 2.04 of transmission,
> it has an excellent web interface which runs on port 9091 per default,
> the patch provides two options, enable cli and/or remote component
>
> the work is based on the patch from Kelvin Cheung
>
> Signed-off-by: Marcus Osdoba <marcus.osdoba@googlemail.com>
> ---
> ?fs/skeleton/var/transmission ? ? ? ? | ? ?1 +
> ?package/Config.in ? ? ? ? ? ? ? ? ? ?| ? ?1 +
> ?package/transmission/Config.in ? ? ? | ? 23 +++++++++
> ?package/transmission/S92transmission | ? 88 ++++++++++++++++++++++++++++++++++
> ?package/transmission/transmission.mk | ? 32 ++++++++++++
> ?5 files changed, 145 insertions(+), 0 deletions(-)
> ?create mode 120000 fs/skeleton/var/transmission
> ?create mode 100755 package/transmission/Config.in
> ?create mode 100755 package/transmission/S92transmission
> ?create mode 100644 package/transmission/transmission.mk
>
> diff --git a/fs/skeleton/var/transmission b/fs/skeleton/var/transmission
> new file mode 120000
> index 0000000..1431b0e
> --- /dev/null
> +++ b/fs/skeleton/var/transmission
> @@ -0,0 +1 @@
> +../tmp
> \ No newline at end of file
> diff --git a/package/Config.in b/package/Config.in
> index d60d8ef..17386ad 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -427,6 +427,7 @@ source "package/thttpd/Config.in"
> ?source "package/tinyhttpd/Config.in"
> ?endif
> ?source "package/tn5250/Config.in"
> +source "package/transmission/Config.in"
> ?source "package/ttcp/Config.in"
> ?source "package/udpcast/Config.in"
> ?source "package/vpnc/Config.in"
> diff --git a/package/transmission/Config.in b/package/transmission/Config.in
> new file mode 100755
> index 0000000..49f618f
> --- /dev/null
> +++ b/package/transmission/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_TRANSMISSION
> + ? ? ? bool "transmission"
> + ? ? ? select BR2_PACKAGE_ZLIB
> + ? ? ? select BR2_PACKAGE_OPENSSL
> + ? ? ? select BR2_PACKAGE_LIBCURL
> + ? ? ? select BR2_PACKAGE_LIBEVENT
> + ? ? ? default n
> + ? ? ? help
> + ? ? ? ? transmission - Transmission BitTorrent Client
> +
> +config BR2_PACKAGE_TRANSMISSION_CLI
> + ? ? ? bool "transmissioncli"
> + ? ? ? depends on BR2_PACKAGE_TRANSMISSION
> + ? ? ? default no
> + ? ? ? help
> + ? ? ? ? Install transmission command line interface.
> +
> +config BR2_PACKAGE_TRANSMISSION_REMOTE
> + ? ? ? bool "transmission-remote"
> + ? ? ? depends on BR2_PACKAGE_TRANSMISSION
> + ? ? ? default yes
> + ? ? ? help
> + ? ? ? ? Install transmission remote management tool.
> diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission
> new file mode 100755
> index 0000000..9c15aae
> --- /dev/null
> +++ b/package/transmission/S92transmission
> @@ -0,0 +1,88 @@
> +#!/bin/sh
> +if [ ! -z "$2" ]; then
> + ? ? ? TRANSMISSION_ARGS="$2"
> +else
> + ? ? ? TRANSMISSION_ARGS=""
> +fi
> +
> +if [ ! -z "$3" ]; then
> + ? ? ? NET_INTERFACE="$3"
> +else
> + ? ? ? NET_INTERFACE=""
> +fi
> +
> +DESC="bittorrent client"
> +NAME=transmission-daemon
> +DAEMON=$(which $NAME)
> +SCRIPTNAME=/etc/init.d/$0
> +
> +[ -x "$DAEMON" ] || exit 0
> +
> +do_start()
> +{
> + ? ? ? if [ ! -z "$NET_INTERFACE" ]; then
> + ? ? ? ? ? ? ? # poll network interface
> + ? ? ? ? ? ? ? IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
> + ? ? ? ? ? ? ? IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
> + ? ? ? ? ? ? ? while [ -z "$IP_ADDR" ]
> + ? ? ? ? ? ? ? do
> + ? ? ? ? ? ? ? ? ? ? ? sleep 5
> + ? ? ? ? ? ? ? ? ? ? ? IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
> + ? ? ? ? ? ? ? ? ? ? ? IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
> + ? ? ? ? ? ? ? done
> + ? ? ? fi
> + ? ? ? if [ -z "$TRANSMISSION_ARGS" ]; then
> + ? ? ? ? ? ? ? start-stop-daemon -S -b -x ${DAEMON}
> + ? ? ? else
> + ? ? ? ? ? ? ? start-stop-daemon -S -b -x ${DAEMON} -- ${TRANSMISSION_ARGS}
> + ? ? ? fi
> + ? ? ? return $?
> +}
> +
> +do_stop()
> +{
> + ? ? ? start-stop-daemon -K -b -x ${DAEMON}
> + ? ? ? return $?
> +}
> +
> +case "$1" in
> + ? ? ? start)
> + ? ? ? ? ? ? ? echo "Starting $DESC" "$NAME..."
> + ? ? ? ? ? ? ? do_start
> + ? ? ? ? ? ? ? case "$?" in
> + ? ? ? ? ? ? ? ? ? ? ? 0) echo " ? Start $DESC $NAME: SUCCESS" ;;
> + ? ? ? ? ? ? ? ? ? ? ? *)
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? echo " ? Start $DESC $NAME: FAILED"
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? exit 3
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ;;
> + ? ? ? ? ? ? ? esac
> + ? ? ? ? ? ? ? ;;
> + ? ? ? stop)
> + ? ? ? ? ? ? ? echo "Stopping $DESC $NAME..."
> + ? ? ? ? ? ? ? do_stop
> + ? ? ? ? ? ? ? case "$?" in
> + ? ? ? ? ? ? ? ? ? ? ? 0) echo " ? Stop $DESC $NAME: SUCCESS" ;;
> + ? ? ? ? ? ? ? ? ? ? ? *)
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? echo " ? Stop $DESC $NAME: FAILED"
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? exit 3
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ;;
> + ? ? ? ? ? ? ? esac
> + ? ? ? ? ? ? ? ;;
> + ? ? ? restart|force-reload)
> + ? ? ? ? ? ? ? echo "Restarting $DESC $NAME..."
> + ? ? ? ? ? ? ? do_stop
> + ? ? ? ? ? ? ? sleep 2
> + ? ? ? ? ? ? ? do_start
> + ? ? ? ? ? ? ? case "$?" in
> + ? ? ? ? ? ? ? ? ? ? ? 0) echo " ? Restart $DESC $NAME: SUCCESS" ;;
> + ? ? ? ? ? ? ? ? ? ? ? *)
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? echo " ? Restart $DESC $NAME: FAILED: couldn't start $NAME"
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? exit 3
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ;;
> + ? ? ? ? ? ? ? esac
> + ? ? ? ? ? ? ? ;;
> + ? ? ? *)
> + ? ? ? ? ? ? ? echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
> + ? ? ? ? ? ? ? exit 3
> + ? ? ? ? ? ? ? ;;
> +esac
> diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk
> new file mode 100644
> index 0000000..71d4b43
> --- /dev/null
> +++ b/package/transmission/transmission.mk
> @@ -0,0 +1,32 @@
> +#############################################################
> +#
> +# transmission
> +#
> +#############################################################
> +#
> +#
> +TRANSMISSION_VERSION=2.04
> +TRANSMISSION_SOURCE=transmission-$(TRANSMISSION_VERSION).tar.bz2
> +TRANSMISSION_SITE=http://mirrors.m0k.org/transmission/files/
> +TRANSMISSION_LIBTOOL_PATCH=NO
> +TRANSMISSION_DEPENDENCIES= host-pkg-config host-intltool zlib openssl libcurl libevent
> +
> +TRANSMISSION_CONF_OPT = --prefix=/usr \
> + ? ? ? ? ? ? ? ? ? ? ? --localstatedir=/var/transmission \
> + ? ? ? ? ? ? ? ? ? ? ? --disable-gtk \
> + ? ? ? ? ? ? ? ? ? ? ? --disable-libnotify \
> + ? ? ? ? ? ? ? ? ? ? ? --enable-daemon \
> + ? ? ? ? ? ? ? ? ? ? ? --with-zlib=$(STAGING_DIR) \
> + ? ? ? ? ? ? ? ? ? ? ? $(DISABLE_NLS) \
> + ? ? ? ? ? ? ? ? ? ? ? $(DISABLE_LARGEFILE)
> +
> +ifneq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
> +TRANSMISSION_CONF_OPT += --disable-cli
> +endif
> +
> +ifneq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
> +TRANSMISSION_CONF_OPT += --disable-remote
> +endif
> +
> +
> +$(eval $(call AUTOTARGETS,package,transmission))
> --
> 1.7.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-09 20:28 ` [Buildroot] [PATCH] introducing transmission bittorrent client Marcus Osdoba
  2010-09-10  5:07   ` Belisko Marek
@ 2010-09-10  6:55   ` Thomas Petazzoni
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2010-09-10  6:55 UTC (permalink / raw)
  To: buildroot

Hello Marcus,

On Thu,  9 Sep 2010 22:28:52 +0200
Marcus Osdoba <marcus.osdoba@googlemail.com> wrote:

>  fs/skeleton/var/transmission         |    1 +

I'd prefer not to add this to the generic skeleton, and instead have
the Transmission installation process create this symlink.

> --- /dev/null
> +++ b/package/transmission/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_TRANSMISSION
> +	bool "transmission"
> +	select BR2_PACKAGE_ZLIB
> +	select BR2_PACKAGE_OPENSSL
> +	select BR2_PACKAGE_LIBCURL
> +	select BR2_PACKAGE_LIBEVENT
> +	default n

default n is not needed, as this is the default.

> +	help
> +	  transmission - Transmission BitTorrent Client
> +
> +config BR2_PACKAGE_TRANSMISSION_CLI
> +	bool "transmissioncli"
> +	depends on BR2_PACKAGE_TRANSMISSION
> +	default no

Not needed.

> +	help
> +	  Install transmission command line interface.
> +
> +config BR2_PACKAGE_TRANSMISSION_REMOTE
> +	bool "transmission-remote"
> +	depends on BR2_PACKAGE_TRANSMISSION
> +	default yes

I'm not sure "default yes" works, we use "default y" everywhere.

> +	help
> +	  Install transmission remote management tool.
> +	if [ ! -z "$NET_INTERFACE" ]; then
> +		# poll network interface
> +		IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
> +		IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
> +		while [ -z "$IP_ADDR" ]
> +		do
> +			sleep 5
> +			IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
> +			IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
> +		done

Hum, this will stall the boot process quite a bit. We don't have any
other solution ?

(I think for the initial introduction of transmission to Buildroot,
it's ok, since it won't be a regression, but in the long run, having
such scripts doesn't really look nice).

> +++ b/package/transmission/transmission.mk
> @@ -0,0 +1,32 @@
> +#############################################################
> +#
> +# transmission
> +#
> +#############################################################
> +#
> +#
> +TRANSMISSION_VERSION=2.04
> +TRANSMISSION_SOURCE=transmission-$(TRANSMISSION_VERSION).tar.bz2
> +TRANSMISSION_SITE=http://mirrors.m0k.org/transmission/files/
> +TRANSMISSION_LIBTOOL_PATCH=NO
> +TRANSMISSION_DEPENDENCIES= host-pkg-config host-intltool zlib openssl libcurl libevent
> +
> +TRANSMISSION_CONF_OPT = --prefix=/usr \

Remove --prefix=/usr, that's the default.

> +			--localstatedir=/var/transmission \
> +			--disable-gtk \
> +			--disable-libnotify \
> +			--enable-daemon \
> +			--with-zlib=$(STAGING_DIR) \
> +			$(DISABLE_NLS) \
> +			$(DISABLE_LARGEFILE)

Remove $(DISABLE_NLS) and $(DISABLE_LARGEFILE), that's the default.

To know what the default options are, look at:
 http://git.buildroot.net/buildroot/tree/package/Makefile.autotools.in#n88

The rest looks good to me.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-10  5:07   ` Belisko Marek
@ 2010-09-10  8:10     ` Thomas Petazzoni
  2010-09-10  8:15       ` Belisko Marek
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2010-09-10  8:10 UTC (permalink / raw)
  To: buildroot

Hello Belisko,

On Fri, 10 Sep 2010 07:07:36 +0200
Belisko Marek <marek.belisko@gmail.com> wrote:

> To be honest I post patch for transmission 4 months ago and also
> splashy package month ago
> and the're still not in the release. Why?

We also have an enhancement bug since quite some time about
transmission: https://bugs.busybox.net/show_bug.cgi?id=743. Sorry about
this delay/lack of reaction on those topics.

Belisko, Marcus, could you take the of those three proposals, and
submit a new version of the patch ? I promess to take care of it and
make sure it gets merged.

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-10  8:10     ` Thomas Petazzoni
@ 2010-09-10  8:15       ` Belisko Marek
  2010-09-11 16:32         ` Marcus Osdoba
  0 siblings, 1 reply; 16+ messages in thread
From: Belisko Marek @ 2010-09-10  8:15 UTC (permalink / raw)
  To: buildroot

Hi,
On Fri, Sep 10, 2010 at 10:10 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello Belisko,
>
> On Fri, 10 Sep 2010 07:07:36 +0200
> Belisko Marek <marek.belisko@gmail.com> wrote:
>
>> To be honest I post patch for transmission 4 months ago and also
>> splashy package month ago
>> and the're still not in the release. Why?
>
> We also have an enhancement bug since quite some time about
> transmission: https://bugs.busybox.net/show_bug.cgi?id=743. Sorry about
> this delay/lack of reaction on those topics.
No problem about that but you have then more work for reading same
(similar) patches.
>
> Belisko, Marcus, could you take the of those three proposals, and
> submit a new version of the patch ? I promess to take care of it and
> make sure it gets merged.
Marcus could you please make update version and repost?
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

Thanks,

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-10  8:15       ` Belisko Marek
@ 2010-09-11 16:32         ` Marcus Osdoba
  0 siblings, 0 replies; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-11 16:32 UTC (permalink / raw)
  To: buildroot

  Am 10.09.2010 10:15, schrieb Belisko Marek:
> Belisko, Marcus, could you take the of those three proposals, and
> submit a new version of the patch ? I promess to take care of it and
> make sure it gets merged.
> Marcus could you please make update version and repost?
> Thanks,
>
> Marek
>
Hi,
I included Thomas' suggestions and the actual version I found in bugzilla.
The test-build before sending is currently running....

Regards,
Marcus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-27 21:46     ` Marcus Osdoba
@ 2010-09-29  8:22       ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2010-09-29  8:22 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Sep 2010 23:46:52 +0200
Marcus Osdoba <marcus.osdoba@googlemail.com> wrote:

> Btw: Thomas preferres another solution for the init-d skript (without 
> sleep 5 init). I wasn't able to figure out clearly, why and where the 
> IP_ADDR variable is used, so I'm experimenting with the "official" 
> init-d-skript from the transmission wiki.
> Would this be a problem in your eyes?

Well, for the moment, we can keep this loop. Fix the other problems
mentionned in my latest review, and resend a new version. We'll merge
that one.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-21  2:00   ` Kelvin Cheung
  2010-09-22 20:26     ` Marcus Osdoba
@ 2010-09-27 21:46     ` Marcus Osdoba
  2010-09-29  8:22       ` Thomas Petazzoni
  1 sibling, 1 reply; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-27 21:46 UTC (permalink / raw)
  To: buildroot

  Am 21.09.2010 04:00, schrieb Kelvin Cheung:
> Hi Marcus,
>
> I have tried the patch.
> It works fine.
Hi Kelvin,

I don't know why, but the transmission daemon is not able to create the 
temporary torrent and resume file.
All other config files were written without problems in the given 
config-dir. I haven't forwarded a specific port to the machine where 
embedded transmission runs on - until now.
Why won't transmssion write the temporary files? Or is it correct 
behaviour? I'm confused about "Couldn't save & Success" in the same 
status line.

Did you encounter similar errors with your installation?

Btw: Thomas preferres another solution for the init-d skript (without 
sleep 5 init). I wasn't able to figure out clearly, why and where the 
IP_ADDR variable is used, so I'm experimenting with the "official" 
init-d-skript from the transmission wiki.
Would this be a problem in your eyes?

Kind regards,
Marcus


$ /usr/bin/transmission-daemon -f -a 192.168.1.* --config-dir=/data
[23:32:24.095] Transmission 2.04 (11151) started (session.c:622)
[23:32:24.097] RPC Server Adding address to whitelist: 192.168.1.* 
(rpc-server.c:767)
[23:32:24.100] RPC Server Serving RPC and Web requests on port 9091 
(rpc-server.c:940)
[23:32:24.102] RPC Server Whitelist enabled (rpc-server.c:944)
[23:32:24.104] DHT Generating new id (tr-dht.c:378)
[23:32:24.106] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) 
(natpmp.c:67)
[23:32:24.108] Port Forwarding (NAT-PMP) sendpublicaddressrequest 
succeeded (2) (natpmp.c:67)
[23:32:24.110] Using settings from "/data" (daemon.c:443)
[23:32:24.113] Saved "/data/settings.json" (bencode.c:1651)
[23:32:25.116] Port Forwarding (UPnP) Found Internet Gateway Device 
"http://192.168.1.1:49000/upnp/control/WANIPConn1" (upnp.c:113)
[23:32:25.118] Port Forwarding (UPnP) Local Address is "192.168.1.254" 
(upnp.c:115)
[23:32:25.120] Port Forwarding (UPnP) Port forwarding through 
"http://192.168.1.1:49000/upnp/control/WANIPConn1", service 
"urn:schemas-upnp-org:service:WANIPConnection:1".  (local address: 
192.168.1.254:51413) (upnp.c:202)
[23:32:25.123] Port Forwarding State changed from "Not forwarded" to 
"Starting" (port-forwarding.c:89)
[23:32:31.126] Port Forwarding State changed from "Starting" to "???" 
(port-forwarding.c:89)
[23:32:59.130] DHT Attempting bootstrap from dht.transmissionbt.com 
(tr-dht.c:234)
[23:33:16.135] Couldn't save file 
"/data/torrents/evbarmcd-5.0.2.iso.9fe3ef5b5a32e862.torrent": Success 
(bencode.c:1663)
[23:33:34.139] evbarmcd-5.0.2.iso Starting DHT announce (poor, 9 nodes) 
(tr-dht.c:669)
[23:34:23.146] Couldn't save file 
"/data/resume/evbarmcd-5.0.2.iso.9fe3ef5b5a32e862.resume": Success 
(bencode.c:1663)
[23:35:04.151] evbarmcd-5.0.2.iso Removing torrent (torrent.c:1557)
[23:35:04.154] evbarmcd-5.0.2.iso Pausing (torrent.c:1513)
Closing transmission session... done.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-22 20:26     ` Marcus Osdoba
@ 2010-09-22 23:06       ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2010-09-22 23:06 UTC (permalink / raw)
  To: buildroot

On Wed, 22 Sep 2010 22:26:15 +0200
Marcus Osdoba <marcus.osdoba@googlemail.com> wrote:

> Is a positive test sufficient for you to have a closer look at it?

Yes, of course! I just send a review.

> Just for the protocol, transmission build breaks with activated 
> config-cache. If I use it, I have to remove 
> outbut/build/transmission-2.04 and run make flush;make.

The configuration cache has been disabled by default since just before
the release of 2010.08. The current consensus seems to be that we
should simply get rid of this option completely, because it cannot be
really reliable.

Speed-up in the build process can come from parallel building of
different packages, but this needs some quite heavy changes in our
package infrastructure.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-19  8:23 Marcus Osdoba
  2010-09-19  9:53 ` Marcus Osdoba
@ 2010-09-22 23:05 ` Thomas Petazzoni
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2010-09-22 23:05 UTC (permalink / raw)
  To: buildroot

On Sun, 19 Sep 2010 10:23:24 +0200
Marcus Osdoba <marcus.osdoba@googlemail.com> wrote:

> +		IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
> +		IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
> +		while [ -z "$IP_ADDR" ]
> +		do
> +			sleep 5
> +			IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
> +			IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
> +		done

I'm still not a big fan of this loop. There's really no other solution ?

> +	start)
> +		echo "Starting $DESC" "$NAME..."
> +		do_start
> +		case "$?" in
> +			0) echo "   Start $DESC $NAME: SUCCESS" ;;
> +			*)
> +				echo "   Start $DESC $NAME: FAILED"
> +				exit 3
> +				;;
> +		esac
> +		;;

I don't think we have all this message printing handling in other S??*
scripts, could you simplify this a little bit, for example to make it
similar to package/dropbear/S50dropbear ?

> +ifneq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
> +TRANSMISSION_CONF_OPT += --disable-remote
> +endif

Add a new line here.

> +ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
> +define TRANSMISSION_INITDSKRIPT_INSTALL

INITDSKRIPT looks strange. INIT_SCRIPT instead ?

> +	# install start/stop script
> +	$(call MESSAGE,"Installing S92transmission init script")
> +	if [ ! -f $(TARGET_DIR)/etc/init.d/S92transmission ]; then \
> +		$(INSTALL) -m 0755 -D package/transmission/S92transmission \
> +		$(TARGET_DIR)/etc/init.d/S92transmission; \
> +	fi
> +	$(Q)touch $@

The touch here is not needed.

Otherwise, looks good to me. Care to fix these and resend an updated
version ?

Thanks a lot for all your efforts and your patience!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-21  2:00   ` Kelvin Cheung
@ 2010-09-22 20:26     ` Marcus Osdoba
  2010-09-22 23:06       ` Thomas Petazzoni
  2010-09-27 21:46     ` Marcus Osdoba
  1 sibling, 1 reply; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-22 20:26 UTC (permalink / raw)
  To: buildroot

  Am 21.09.2010 04:00, schrieb Kelvin Cheung:
> Hi Marcus,
>
> I have tried the patch.
> It works fine.
>
> 2010/9/19 Marcus Osdoba <marcus.osdoba@googlemail.com 
> <mailto:marcus.osdoba@googlemail.com>>
>
>      Am 19.09.2010 10:23, schrieb Marcus Osdoba:
>
>         the client has an excellent webinterface
>         and seems to be ideal for headless systems,
>         the statedirectory is stored in /var/transmission which links
>         to tmp,
>         the user should provide a writable config direcory
>
>         Based on work by: Kelvin Cheung<keguang.zhang@gmail.com
>         <mailto:keguang.zhang@gmail.com>>
>
>         Signed-off-by: Marcus Osdoba<marcus.osdoba@googlemail.com
>         <mailto:marcus.osdoba@googlemail.com>>
>         ---
>         [...]
>
>     Hi Marek and Kelvin,
>
>     Are you able to test the new patch for your targets and send some
>     (hopefully) positive test results in reply to this patch on the
>     mailinglist. Maybe this would fasten the inclusion into upcoming
>     release 2010.11.
>
>     Regards,
>     Marcus
>
>
> -- 
> Best Regards!
> Kelvin
>
Hi Thomas and Peter,

Is a positive test sufficient for you to have a closer look at it?

Just for the protocol, transmission build breaks with activated 
config-cache. If I use it, I have to remove 
outbut/build/transmission-2.04 and run make flush;make.

I followed the cache discussion on the mailinglist and I know that this 
feature has been marked experimental (which is my preferred solution, 
too). But I still use it anyway to speed up the development cycle.

Regards,
Marcus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100922/e9dcdd98/attachment.html>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-19  9:53 ` Marcus Osdoba
@ 2010-09-21  2:00   ` Kelvin Cheung
  2010-09-22 20:26     ` Marcus Osdoba
  2010-09-27 21:46     ` Marcus Osdoba
  0 siblings, 2 replies; 16+ messages in thread
From: Kelvin Cheung @ 2010-09-21  2:00 UTC (permalink / raw)
  To: buildroot

Hi Marcus,

I have tried the patch.
It works fine.

2010/9/19 Marcus Osdoba <marcus.osdoba@googlemail.com>

>  Am 19.09.2010 10:23, schrieb Marcus Osdoba:
>
>> the client has an excellent webinterface
>> and seems to be ideal for headless systems,
>> the statedirectory is stored in /var/transmission which links to tmp,
>> the user should provide a writable config direcory
>>
>> Based on work by: Kelvin Cheung<keguang.zhang@gmail.com>
>>
>> Signed-off-by: Marcus Osdoba<marcus.osdoba@googlemail.com>
>> ---
>> [...]
>>
> Hi Marek and Kelvin,
>
> Are you able to test the new patch for your targets and send some
> (hopefully) positive test results in reply to this patch on the mailinglist.
> Maybe this would fasten the inclusion into upcoming release 2010.11.
>
> Regards,
> Marcus
>



-- 
Best Regards!
Kelvin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100921/afbea320/attachment.html>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-19  8:23 Marcus Osdoba
@ 2010-09-19  9:53 ` Marcus Osdoba
  2010-09-21  2:00   ` Kelvin Cheung
  2010-09-22 23:05 ` Thomas Petazzoni
  1 sibling, 1 reply; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-19  9:53 UTC (permalink / raw)
  To: buildroot

  Am 19.09.2010 10:23, schrieb Marcus Osdoba:
> the client has an excellent webinterface
> and seems to be ideal for headless systems,
> the statedirectory is stored in /var/transmission which links to tmp,
> the user should provide a writable config direcory
>
> Based on work by: Kelvin Cheung<keguang.zhang@gmail.com>
>
> Signed-off-by: Marcus Osdoba<marcus.osdoba@googlemail.com>
> ---
> [...]
Hi Marek and Kelvin,

Are you able to test the new patch for your targets and send some 
(hopefully) positive test results in reply to this patch on the 
mailinglist. Maybe this would fasten the inclusion into upcoming release 
2010.11.

Regards,
Marcus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
@ 2010-09-19  8:23 Marcus Osdoba
  2010-09-19  9:53 ` Marcus Osdoba
  2010-09-22 23:05 ` Thomas Petazzoni
  0 siblings, 2 replies; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-19  8:23 UTC (permalink / raw)
  To: buildroot

the client has an excellent webinterface
and seems to be ideal for headless systems,
the statedirectory is stored in /var/transmission which links to tmp,
the user should provide a writable config direcory

Based on work by: Kelvin Cheung <keguang.zhang@gmail.com>

Signed-off-by: Marcus Osdoba <marcus.osdoba@googlemail.com>
---
 package/Config.in                    |    1 +
 package/transmission/Config.in       |   21 ++++++++
 package/transmission/S92transmission |   88 ++++++++++++++++++++++++++++++++++
 package/transmission/transmission.mk |   49 +++++++++++++++++++
 4 files changed, 159 insertions(+), 0 deletions(-)
 create mode 100644 package/transmission/Config.in
 create mode 100644 package/transmission/S92transmission
 create mode 100644 package/transmission/transmission.mk

diff --git a/package/Config.in b/package/Config.in
index 2209b55..9a63828 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -420,6 +420,7 @@ source "package/thttpd/Config.in"
 source "package/tinyhttpd/Config.in"
 endif
 source "package/tn5250/Config.in"
+source "package/transmission/Config.in"
 source "package/ttcp/Config.in"
 source "package/udpcast/Config.in"
 source "package/vpnc/Config.in"
diff --git a/package/transmission/Config.in b/package/transmission/Config.in
new file mode 100644
index 0000000..f634f8b
--- /dev/null
+++ b/package/transmission/Config.in
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_TRANSMISSION
+	bool "transmission"
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBEVENT
+	help
+	  Transmission is a cross-platform BitTorrent client.
+
+config BR2_PACKAGE_TRANSMISSION_CLI
+	bool "transmissioncli"
+	depends on BR2_PACKAGE_TRANSMISSION
+	help
+	  Install transmission command line interface.
+
+config BR2_PACKAGE_TRANSMISSION_REMOTE
+	bool "transmission-remote"
+	depends on BR2_PACKAGE_TRANSMISSION
+	default y
+	help
+	  Install transmission remote management tool.
diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission
new file mode 100644
index 0000000..9c15aae
--- /dev/null
+++ b/package/transmission/S92transmission
@@ -0,0 +1,88 @@
+#!/bin/sh
+if [ ! -z "$2" ]; then
+	TRANSMISSION_ARGS="$2"
+else
+	TRANSMISSION_ARGS=""
+fi
+
+if [ ! -z "$3" ]; then
+	NET_INTERFACE="$3"
+else
+	NET_INTERFACE=""
+fi
+
+DESC="bittorrent client"
+NAME=transmission-daemon
+DAEMON=$(which $NAME)
+SCRIPTNAME=/etc/init.d/$0
+
+[ -x "$DAEMON" ] || exit 0
+
+do_start()
+{
+	if [ ! -z "$NET_INTERFACE" ]; then
+		# poll network interface
+		IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+		IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+		while [ -z "$IP_ADDR" ]
+		do
+			sleep 5
+			IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+			IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+		done
+	fi
+	if [ -z "$TRANSMISSION_ARGS" ]; then
+		start-stop-daemon -S -b -x ${DAEMON}
+	else
+		start-stop-daemon -S -b -x ${DAEMON} -- ${TRANSMISSION_ARGS}
+	fi
+	return $?
+}
+
+do_stop()
+{
+	start-stop-daemon -K -b -x ${DAEMON}
+	return $?
+}
+
+case "$1" in
+	start)
+		echo "Starting $DESC" "$NAME..."
+		do_start
+		case "$?" in
+			0) echo "   Start $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Start $DESC $NAME: FAILED"
+				exit 3
+				;;
+		esac
+		;;
+	stop)
+		echo "Stopping $DESC $NAME..."
+		do_stop
+		case "$?" in
+			0) echo "   Stop $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Stop $DESC $NAME: FAILED"
+				exit 3
+				;;
+		esac
+		;;
+	restart|force-reload)
+		echo "Restarting $DESC $NAME..."
+		do_stop
+		sleep 2
+		do_start
+		case "$?" in
+			0) echo "   Restart $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Restart $DESC $NAME: FAILED: couldn't start $NAME"
+				exit 3
+				;;
+		esac
+		;;
+	*)
+		echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+		exit 3
+		;;
+esac
diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk
new file mode 100644
index 0000000..b571c7d
--- /dev/null
+++ b/package/transmission/transmission.mk
@@ -0,0 +1,49 @@
+#############################################################
+#
+# transmission
+#
+#############################################################
+TRANSMISSION_VERSION=2.04
+TRANSMISSION_SOURCE=transmission-$(TRANSMISSION_VERSION).tar.bz2
+TRANSMISSION_SITE=http://mirrors.m0k.org/transmission/files/
+TRANSMISSION_LIBTOOL_PATCH=NO
+TRANSMISSION_DEPENDENCIES= host-pkg-config host-intltool zlib openssl libcurl libevent
+
+TRANSMISSION_CONF_OPT = --disable-gtk \
+			--disable-libnotify \
+			--enable-daemon \
+			--localstatedir=/var/transmission-statedir \
+			--with-zlib=$(STAGING_DIR) \
+
+ifneq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
+TRANSMISSION_CONF_OPT += --disable-cli
+else
+TRANSMISSION_CONF_OPT += --enable-cli
+endif
+
+
+ifneq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
+TRANSMISSION_CONF_OPT += --disable-remote
+endif
+ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
+define TRANSMISSION_INITDSKRIPT_INSTALL
+	# install start/stop script
+	$(call MESSAGE,"Installing S92transmission init script")
+	if [ ! -f $(TARGET_DIR)/etc/init.d/S92transmission ]; then \
+		$(INSTALL) -m 0755 -D package/transmission/S92transmission \
+		$(TARGET_DIR)/etc/init.d/S92transmission; \
+	fi
+	$(Q)touch $@
+endef
+TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_INITDSKRIPT_INSTALL
+endif
+
+
+define TRANSMISSION_STATEDIRLINK_INSTALL
+	$(call MESSAGE,"Creating link for transmission statedirectory")
+	ln -sf /tmp $(TARGET_DIR)/var/transmission-statedir
+endef
+TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_STATEDIRLINK_INSTALL
+
+
+$(eval $(call AUTOTARGETS,package,transmission))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] introducing transmission bittorrent client
  2010-09-13 18:07 [Buildroot] resend transmission bittorrent client after 1st review by Thomas Marcus Osdoba
@ 2010-09-13 18:07 ` Marcus Osdoba
  0 siblings, 0 replies; 16+ messages in thread
From: Marcus Osdoba @ 2010-09-13 18:07 UTC (permalink / raw)
  To: buildroot

the client has an excellent webinterface
and seems to be ideal for headless systems,
according to some user voices
the package ctorrent segfaults quite often and consumes more resources

Based on work by: Kelvin Cheung <keguang.zhang@gmail.com>

Signed-off-by: Marcus Osdoba <marcus.osdoba@googlemail.com>
---
 package/Config.in                    |    1 +
 package/transmission/Config.in       |   21 ++++++++
 package/transmission/S92transmission |   88 ++++++++++++++++++++++++++++++++++
 package/transmission/transmission.mk |   49 +++++++++++++++++++
 4 files changed, 159 insertions(+), 0 deletions(-)
 create mode 100644 package/transmission/Config.in
 create mode 100644 package/transmission/S92transmission
 create mode 100644 package/transmission/transmission.mk

diff --git a/package/Config.in b/package/Config.in
index d60d8ef..17386ad 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -427,6 +427,7 @@ source "package/thttpd/Config.in"
 source "package/tinyhttpd/Config.in"
 endif
 source "package/tn5250/Config.in"
+source "package/transmission/Config.in"
 source "package/ttcp/Config.in"
 source "package/udpcast/Config.in"
 source "package/vpnc/Config.in"
diff --git a/package/transmission/Config.in b/package/transmission/Config.in
new file mode 100644
index 0000000..f634f8b
--- /dev/null
+++ b/package/transmission/Config.in
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_TRANSMISSION
+	bool "transmission"
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBEVENT
+	help
+	  Transmission is a cross-platform BitTorrent client.
+
+config BR2_PACKAGE_TRANSMISSION_CLI
+	bool "transmissioncli"
+	depends on BR2_PACKAGE_TRANSMISSION
+	help
+	  Install transmission command line interface.
+
+config BR2_PACKAGE_TRANSMISSION_REMOTE
+	bool "transmission-remote"
+	depends on BR2_PACKAGE_TRANSMISSION
+	default y
+	help
+	  Install transmission remote management tool.
diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission
new file mode 100644
index 0000000..9c15aae
--- /dev/null
+++ b/package/transmission/S92transmission
@@ -0,0 +1,88 @@
+#!/bin/sh
+if [ ! -z "$2" ]; then
+	TRANSMISSION_ARGS="$2"
+else
+	TRANSMISSION_ARGS=""
+fi
+
+if [ ! -z "$3" ]; then
+	NET_INTERFACE="$3"
+else
+	NET_INTERFACE=""
+fi
+
+DESC="bittorrent client"
+NAME=transmission-daemon
+DAEMON=$(which $NAME)
+SCRIPTNAME=/etc/init.d/$0
+
+[ -x "$DAEMON" ] || exit 0
+
+do_start()
+{
+	if [ ! -z "$NET_INTERFACE" ]; then
+		# poll network interface
+		IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+		IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+		while [ -z "$IP_ADDR" ]
+		do
+			sleep 5
+			IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+			IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+		done
+	fi
+	if [ -z "$TRANSMISSION_ARGS" ]; then
+		start-stop-daemon -S -b -x ${DAEMON}
+	else
+		start-stop-daemon -S -b -x ${DAEMON} -- ${TRANSMISSION_ARGS}
+	fi
+	return $?
+}
+
+do_stop()
+{
+	start-stop-daemon -K -b -x ${DAEMON}
+	return $?
+}
+
+case "$1" in
+	start)
+		echo "Starting $DESC" "$NAME..."
+		do_start
+		case "$?" in
+			0) echo "   Start $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Start $DESC $NAME: FAILED"
+				exit 3
+				;;
+		esac
+		;;
+	stop)
+		echo "Stopping $DESC $NAME..."
+		do_stop
+		case "$?" in
+			0) echo "   Stop $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Stop $DESC $NAME: FAILED"
+				exit 3
+				;;
+		esac
+		;;
+	restart|force-reload)
+		echo "Restarting $DESC $NAME..."
+		do_stop
+		sleep 2
+		do_start
+		case "$?" in
+			0) echo "   Restart $DESC $NAME: SUCCESS" ;;
+			*)
+				echo "   Restart $DESC $NAME: FAILED: couldn't start $NAME"
+				exit 3
+				;;
+		esac
+		;;
+	*)
+		echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+		exit 3
+		;;
+esac
diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk
new file mode 100644
index 0000000..d50129a
--- /dev/null
+++ b/package/transmission/transmission.mk
@@ -0,0 +1,49 @@
+#############################################################
+#
+# transmission
+#
+#############################################################
+TRANSMISSION_VERSION=2.04
+TRANSMISSION_SOURCE=transmission-$(TRANSMISSION_VERSION).tar.bz2
+TRANSMISSION_SITE=http://mirrors.m0k.org/transmission/files/
+TRANSMISSION_LIBTOOL_PATCH=NO
+TRANSMISSION_DEPENDENCIES= host-pkg-config host-intltool zlib openssl libcurl libevent
+
+TRANSMISSION_CONF_OPT = --disable-gtk \
+			--disable-libnotify \
+			--enable-daemon \
+			--localstatedir=/var/transmission-statedir \
+			--with-zlib=$(STAGING_DIR) \
+
+ifneq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
+TRANSMISSION_CONF_OPT += --disable-cli
+else
+TRANSMISSION_CONF_OPT += --enable-cli
+endif
+
+
+ifneq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
+TRANSMISSION_CONF_OPT += --disable-remote
+endif
+ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
+define TRANSMISSION_INITDSKRIPT_INSTALL
+	# install start/stop script
+	$(call MESSAGE,"Installing S92transmission init script")
+	if [ ! -f $(TARGET_DIR)/etc/init.d/S92transmission ]; then \
+		$(INSTALL) -m 0755 -D package/transmission/S92transmission \
+		$(TARGET_DIR)/etc/init.d/S92transmission; \
+	fi
+	$(Q)touch $@
+endef
+TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_INITDSKRIPT_INSTALL
+endif
+
+
+define TRANSMISSION_STATEDIRLINK_INSTALL
+	$(call MESSAGE,"Creating link for transmission statedirectory")
+	ln -sf /tmp/transmission $(TARGET_DIR)/var/transmission-statedir
+endef
+TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_STATEDIRLINK_INSTALL
+
+
+$(eval $(call AUTOTARGETS,package,transmission))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-09-29  8:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09 20:28 [Buildroot] transmission better choice over ctorrent according to users voices Marcus Osdoba
2010-09-09 20:28 ` [Buildroot] [PATCH] introducing transmission bittorrent client Marcus Osdoba
2010-09-10  5:07   ` Belisko Marek
2010-09-10  8:10     ` Thomas Petazzoni
2010-09-10  8:15       ` Belisko Marek
2010-09-11 16:32         ` Marcus Osdoba
2010-09-10  6:55   ` Thomas Petazzoni
2010-09-13 18:07 [Buildroot] resend transmission bittorrent client after 1st review by Thomas Marcus Osdoba
2010-09-13 18:07 ` [Buildroot] [PATCH] introducing transmission bittorrent client Marcus Osdoba
2010-09-19  8:23 Marcus Osdoba
2010-09-19  9:53 ` Marcus Osdoba
2010-09-21  2:00   ` Kelvin Cheung
2010-09-22 20:26     ` Marcus Osdoba
2010-09-22 23:06       ` Thomas Petazzoni
2010-09-27 21:46     ` Marcus Osdoba
2010-09-29  8:22       ` Thomas Petazzoni
2010-09-22 23:05 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.