Re: sched_get_priority_* (was Re: WIP: mediatomb-0.12.1)

2010-09-23 Thread Federico G. Schwindt
On Thu, Sep 23, 2010 at 12:49:50PM +0200, David Coppa wrote:
> On Thu, Sep 23, 2010 at 12:40 PM, Stuart Henderson  wrote:
> 
> > we have support for thread priorities, see src/lib/libpthread/uthread/
> > and pthreads(3), just not the sched_get_priority_*() functions.
> >
> > it might make sense to add them though, we have patches in a few
> > ports for this:
> 
> I was being confused about this topic. I remember this was discussed
> in the past and got to conclusion that openbsd doesn't support
> priorities... Is it 0-31 correct then? If so, telephony/pjsua is wrong
> as it's using 0/0 for min/max by now :(
 
  Yes, 0-31 is correct. You need to revive the patch that was before 1.7

  f.-



Re: sched_get_priority_* (was Re: WIP: mediatomb-0.12.1)

2010-09-23 Thread Federico G. Schwindt
On Thu, Sep 23, 2010 at 12:17:54PM +0100, Stuart Henderson wrote:
> On 2010/09/23 12:06, Edd Barrett wrote:
> > On Thu, Sep 23, 2010 at 11:40:38AM +0100, Stuart Henderson wrote:
> > > we have support for thread priorities, see src/lib/libpthread/uthread/
> > > and pthreads(3), just not the sched_get_priority_*() functions.
> > 
> > Good, thanks for clarifying.
> > 
> > > it might make sense to add them though, we have patches in a few
> > > ports for this:
> > 
> > Adding this function would be the correct fix. These patches appear to
> > just workaround the real issue.
> > 
> > Is there any harm in also adding MAX/MIN to the pthread header? This will 
> > allow
> > us to rid of magic numbers until the function becomes available.
> 
> I don't see the point in that, it just means swapping one patch
> for another. If anything is added it should be the standard system
> calls so the patches can just be removed.
> 
> http://www.opengroup.org/onlinepubs/95399/functions/sched_get_priority_max.html

  Agreed. We probably want to remove PTHREAD_(MIN|MAX)_PRIORITY from the
pthread_schedparam(3) too.
 
> I see we do already have implementations for linux emulation, see
> /sys/compat/linux/linux_sched.c, which returns 0 for both min and max.

  This is different, though. We don't support process scheduling, only
pthreads scheduling.

  f.-



Re: WIP: mediatomb-0.12.1

2010-09-23 Thread Federico G. Schwindt
On Thu, Sep 23, 2010 at 11:25:08AM +0200, Antoine Jacoutot wrote:
> On Thu, 23 Sep 2010, Federico G. Schwindt wrote:
> 
> > > [..]
> > > Right, so I committed this, but we want to know what is going on in the
> > > threadpool.c diff.
> > > 
> > > Where did the magical numbers 0 and 31 come from?:
> > > +minPriority = 0;
> > > +maxPriority = 31;
> > > [..]
> > 
> >   egrep -r "PTHREAD_M(IN|AX)_PRIORITY" /usr/src//lib/libpthread/uthread/*.h
> 
> Of course, but I think the point was whether we wanted to use values 
> from private headers since PTHREAD_M(IN|AX)_PRIORITY is not accessible 
> from /usr/include.

  that teaches me not to skim over emails. the original code uses
sched_get_priority_min() and sched_get_priority_max() which we don't
have. that'd be the correct way to get those values.
  PTHREAD_MIN_PRIORITY and PTHREAD_MAX_PRIORITY are not standard.
  i don't remember if there is a reason not to have those but i guess 
we could provide them since we're already providing some of the realtime
functions.

  f.-



Re: sched_get_priority_* (was Re: WIP: mediatomb-0.12.1)

2010-09-23 Thread Stuart Henderson
On 2010/09/23 12:06, Edd Barrett wrote:
> On Thu, Sep 23, 2010 at 11:40:38AM +0100, Stuart Henderson wrote:
> > we have support for thread priorities, see src/lib/libpthread/uthread/
> > and pthreads(3), just not the sched_get_priority_*() functions.
> 
> Good, thanks for clarifying.
> 
> > it might make sense to add them though, we have patches in a few
> > ports for this:
> 
> Adding this function would be the correct fix. These patches appear to
> just workaround the real issue.
> 
> Is there any harm in also adding MAX/MIN to the pthread header? This will 
> allow
> us to rid of magic numbers until the function becomes available.

I don't see the point in that, it just means swapping one patch
for another. If anything is added it should be the standard system
calls so the patches can just be removed.

http://www.opengroup.org/onlinepubs/95399/functions/sched_get_priority_max.html

I see we do already have implementations for linux emulation, see
/sys/compat/linux/linux_sched.c, which returns 0 for both min and max.



Re: sched_get_priority_* (was Re: WIP: mediatomb-0.12.1)

2010-09-23 Thread Edd Barrett
On Thu, Sep 23, 2010 at 11:40:38AM +0100, Stuart Henderson wrote:
> we have support for thread priorities, see src/lib/libpthread/uthread/
> and pthreads(3), just not the sched_get_priority_*() functions.

Good, thanks for clarifying.

> it might make sense to add them though, we have patches in a few
> ports for this:

Adding this function would be the correct fix. These patches appear to
just workaround the real issue.

Is there any harm in also adding MAX/MIN to the pthread header? This will allow
us to rid of magic numbers until the function becomes available.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: sched_get_priority_* (was Re: WIP: mediatomb-0.12.1)

2010-09-23 Thread David Coppa
On Thu, Sep 23, 2010 at 12:40 PM, Stuart Henderson  wrote:

> we have support for thread priorities, see src/lib/libpthread/uthread/
> and pthreads(3), just not the sched_get_priority_*() functions.
>
> it might make sense to add them though, we have patches in a few
> ports for this:

I was being confused about this topic. I remember this was discussed
in the past and got to conclusion that openbsd doesn't support
priorities... Is it 0-31 correct then? If so, telephony/pjsua is wrong
as it's using 0/0 for min/max by now :(

ciao,
david



sched_get_priority_* (was Re: WIP: mediatomb-0.12.1)

2010-09-23 Thread Stuart Henderson
On 2010/09/23 11:25, Edd Barrett wrote:
> > > > 
> > > > Where did the magical numbers 0 and 31 come from?:
> > > > +minPriority = 0;
> > > > +maxPriority = 31;
> > > > [..]
> > > 
> > >   egrep -r "PTHREAD_M(IN|AX)_PRIORITY" 
> > > /usr/src//lib/libpthread/uthread/*.h
> > 
> > Of course, but I think the point was whether we wanted to use values 
> > from private headers since PTHREAD_M(IN|AX)_PRIORITY is not accessible 
> > from /usr/include.
> 
> I'm still confused as to what level of support OpenBSD has for thread
> priorities. Setting both min and max to 0 breaks mediatomb, so they must
> be supported in some fashion.

we have support for thread priorities, see src/lib/libpthread/uthread/
and pthreads(3), just not the sched_get_priority_*() functions.

it might make sense to add them though, we have patches in a few
ports for this:

$ find . -type d -and -path '*/patches' -print0 | xargs -0 grep -ER 
'(sched_get_priority|_POSIX_THREAD_PRIORITY_SCHEDULING)'
./audio/daapd/patches/patch-daapd_cc:-#if defined( 
_POSIX_THREAD_PRIORITY_SCHEDULING) 
./audio/daapd/patches/patch-daapd_cc:+#if defined( 
_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(__OpenBSD__)
./devel/nspr/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptthread_c:+#undef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./devel/nspr/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptthread_c: /* In 
Open C sched_get_priority_min/max do not work properly, so we undefine
./emulators/BasiliskII/patches/patch-src_Unix_main_unix_cpp:+#undef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./emulators/BasiliskII/patches/patch-src_Unix_main_unix_cpp: #if 
defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
./multimedia/xine-lib/patches/patch-src_xine-engine_audio_decoder_c: #ifdef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./multimedia/xine-lib/patches/patch-src_xine-engine_audio_decoder_c: 
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
./multimedia/xine-lib/patches/patch-src_xine-engine_video_decoder_c: #ifdef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./multimedia/xine-lib/patches/patch-src_xine-engine_video_decoder_c: 
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
./multimedia/xine-ui/patches/patch-src_xitk_panel_c: #ifdef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./multimedia/xine-ui/patches/patch-src_xitk_panel_c: 
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
./multimedia/xine-ui/patches/patch-src_xitk_xine-toolkit_label_c: #ifdef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./multimedia/xine-ui/patches/patch-src_xitk_xine-toolkit_label_c:   
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
./multimedia/xine-ui/patches/patch-src_xitk_xine-toolkit_tips_c: #ifdef 
_POSIX_THREAD_PRIORITY_SCHEDULING
./multimedia/xine-ui/patches/patch-src_xitk_xine-toolkit_tips_c: 
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
./multimedia/mediatomb/patches/patch-tombupnp_threadutil_src_ThreadPool_c: 
minPriority = sched_get_priority_min( currentPolicy );
./multimedia/mediatomb/patches/patch-tombupnp_threadutil_src_ThreadPool_c: 
maxPriority = sched_get_priority_max( currentPolicy );
./net/poco/patches/patch-Foundation_src_Thread_POSIX_cpp:   return 
sched_get_priority_min(SCHED_OTHER);
./net/poco/patches/patch-Foundation_src_Thread_POSIX_cpp:   return 
sched_get_priority_max(SCHED_OTHER);
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:we do not have 
sched_get_priority_{min/max}, fix was inspired by patch to pjsua
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:-   maxPri = 
sched_get_priority_max(SCHEDULER_POLICY);
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:+// maxPri = 
sched_get_priority_max(SCHEDULER_POLICY);
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:-   b->priority = 
(sched_get_priority_max(SCHEDULER_POLICY) -
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:-   
sched_get_priority_min(SCHEDULER_POLICY)) / 2;
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:+// b->priority = 
(sched_get_priority_max(SCHEDULER_POLICY) -
./telephony/iaxclient/patches/patch-lib_unixfuncs_c:+// 
sched_get_priority_min(SCHEDULER_POLICY)) / 2;



Re: WIP: mediatomb-0.12.1

2010-09-23 Thread Edd Barrett
On Thu, Sep 23, 2010 at 11:25:08AM +0200, Antoine Jacoutot wrote:
> On Thu, 23 Sep 2010, Federico G. Schwindt wrote:
> 
> > > [..]
> > > Right, so I committed this, but we want to know what is going on in the
> > > threadpool.c diff.
> > > 
> > > Where did the magical numbers 0 and 31 come from?:
> > > +minPriority = 0;
> > > +maxPriority = 31;
> > > [..]
> > 
> >   egrep -r "PTHREAD_M(IN|AX)_PRIORITY" /usr/src//lib/libpthread/uthread/*.h
> 
> Of course, but I think the point was whether we wanted to use values 
> from private headers since PTHREAD_M(IN|AX)_PRIORITY is not accessible 
> from /usr/include.

I'm still confused as to what level of support OpenBSD has for thread
priorities. Setting both min and max to 0 breaks mediatomb, so they must
be supported in some fashion.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-09-23 Thread Antoine Jacoutot
On Thu, 23 Sep 2010, Federico G. Schwindt wrote:

> > [..]
> > Right, so I committed this, but we want to know what is going on in the
> > threadpool.c diff.
> > 
> > Where did the magical numbers 0 and 31 come from?:
> > +minPriority = 0;
> > +maxPriority = 31;
> > [..]
> 
>   egrep -r "PTHREAD_M(IN|AX)_PRIORITY" /usr/src//lib/libpthread/uthread/*.h

Of course, but I think the point was whether we wanted to use values 
from private headers since PTHREAD_M(IN|AX)_PRIORITY is not accessible 
from /usr/include.

-- 
Antoine



Re: WIP: mediatomb-0.12.1

2010-09-23 Thread Federico G. Schwindt
> [..]
> Right, so I committed this, but we want to know what is going on in the
> threadpool.c diff.
> 
> Where did the magical numbers 0 and 31 come from?:
> +minPriority = 0;
> +maxPriority = 31;
> [..]

  egrep -r "PTHREAD_M(IN|AX)_PRIORITY" /usr/src//lib/libpthread/uthread/*.h

  f.-



Re: WIP: mediatomb-0.12.1

2010-09-22 Thread Edd Barrett
On Sun, Aug 22, 2010 at 09:51:28PM +0100, Federico G. Schwindt wrote:
> On Sun, Aug 22, 2010 at 10:04:07PM +0200, Markus Bergkvist wrote:
> > A work-in-progress port of mediatomb, I'm stuck and need some help:
> > 
> > * the configure script picks up spidermonkey headers (jsapi.h) but
> > the libjs/libsmjs link fails, shouldn't "checking for JS_NewObject
> > in -ljs" work?
> > 
> > * how do I get it to pick up ffmpeg support?
> 
>   I've had a port for this for some time (based on djm@ submission) but
> never managed to mail it for one reason or another.
>   IIRC, I didn't have these issues so attached if you want to review it
> or play with it.  btw, at the time I tested it with ps3.
> 
>   f.-

Right, so I committed this, but we want to know what is going on in the
threadpool.c diff.

Where did the magical numbers 0 and 31 come from?:
+minPriority = 0;
+maxPriority = 31;

In the manual for pthread_setschedparam(3) it suggests we should use
PTHREAD_MIN_PRIORITY/PTHREAD_MAX_PRIORITY, but these are not defined in
/usr/include (only privately in the pthread sources apparently).

In some private emails we have been questioning the extent to which OpenBSD does
not support thread priorities. What I can tell you is that if you pass in 0/0
instead of 0/31, the web interface no longer works.

I'm guessing someone knows why, hence the patch ;)

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-09-20 Thread Edd Barrett
On Sun, Sep 19, 2010 at 08:27:37PM -0500, Abel Abraham Camarillo Ojeda wrote:
> Tested on OpenBSD -current on amd64 with a PS3.
> 

 * remove hard coded udn from config file.
 * allow mediatomb to write away it's own udn based on system uuid.
   (requires changing ownership of config file, done with @owner in PLIST)

Works for me. Please someone send an OK now!

--
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


mediatomb-udn.tgz
Description: application/tar-gz


Re: WIP: mediatomb-0.12.1

2010-09-19 Thread Abel Abraham Camarillo Ojeda
Edd Barrett  wrote:

> On Thu, Sep 16, 2010 at 05:31:55PM +0100, Edd Barrett wrote:
> > OK?
>
> Tested with PS3 from an x86 machine. Works for me (tm).
>
>
> -- 
> Best Regards
> Edd Barrett
>
> http://www.theunixzoo.co.uk

Sorry, I forgot to do a pkg_update -uv; after that mediatomb builds and works as
a charm.


Tested on OpenBSD -current on amd64 with a PS3.

--
DISCLAIMER: http://goldmark.org/jeff/stupid-disclaimers/ 
This message will self-destruct in 3 seconds.



Re: WIP: mediatomb-0.12.1

2010-09-19 Thread Abel Abraham Camarillo Ojeda
Edd Barrett  wrote:

> On Thu, Sep 16, 2010 at 05:31:55PM +0100, Edd Barrett wrote:
> > OK?
>
> Tested with PS3 from an x86 machine. Works for me (tm).
>
>
> -- 
> Best Regards
> Edd Barrett
>
> http://www.theunixzoo.co.uk


It doesn't work with me... it complains about orc->4.0, while trying to build
ffmpegthumbnailer, I'm running -current:

===>  Looking for mediatomb-0.12.1.tgz in $PKG_PATH - not found
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 1577 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
===>  Checking files for mediatomb-0.12.1
`/usr/ports/distfiles/mediatomb-0.12.1.tar.gz' is up to date.
>> (SHA256) mediatomb-0.12.1.tar.gz: OK
===>  mediatomb-0.12.1 depends on: ffmpegthumbnailer-* - not found
===>  Verifying install for ffmpegthumbnailer-* in graphics/ffmpegthumbnailer
===>  Looking for ffmpegthumbnailer-2.0.2p1.tgz in $PKG_PATH - not found
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 1577 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
===>  Checking files for ffmpegthumbnailer-2.0.2p1
`/usr/ports/distfiles/ffmpegthumbnailer-2.0.2.tar.gz' is up to date.
>> (SHA256) ffmpegthumbnailer-2.0.2.tar.gz: OK
===>  Verifying specs: avcodec.>=14 avformat.>=13 avutil.>=7 swscale.>=2 
png.>=6 jpeg avcodec.>=14 avformat.>=13 avutil.>=7 swscale.>=2 png.>=6 jpeg bz2 
c faac faad gsm m mp3lame ogg pthread  stdc++ theora vorbis vorbisenc x264 z  
orc-0.4 schroedinger-1.0 speex bz2 c faac faad gsm m mp3lame ogg pthread  
stdc++ theora vorbis vorbisenc x264 z  orc-0.4 schroedinger-1.0 speex
Missing library for orc-0.4.>=0.0
Fatal error
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 1860 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 2173 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 1585 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 1585 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 2138 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 1613 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/ffmpegthumbnailer (line 2121 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 1770 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 2173 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 1585 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 1585 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 2138 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 1613 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/multimedia/mediatomb (line 2121 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
 .

--
DISCLAIMER: http://goldmark.org/jeff/stupid-disclaimers/ 
This message will self-destruct in 3 seconds.



Re: WIP: mediatomb-0.12.1

2010-09-18 Thread Edd Barrett
On Thu, Sep 16, 2010 at 05:31:55PM +0100, Edd Barrett wrote:
> OK?

Tested with PS3 from an x86 machine. Works for me (tm).


-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-09-16 Thread Abel Abraham Camarillo Ojeda
On Thu, Sep 16, 2010 at 11:31 AM, Edd Barrett  wrote:
> Hi,
>
> On Tue, Sep 14, 2010 at 11:10:59PM +0100, Robert Bronsdon wrote:
>> Should rc.local check for an active network connection? Can it?
>>
>> It's just mediatomb will fail to start unless it can bind itself to
>> an address/port.
>
> It should bind loopback atleast, but ideally i recommend a network card; that 
> is
> a reponsibility of the user ;)
>
> New port attached:
>  * fix sthen's comments.
>  * use /var/empty for _mediatomb home, like mpd does.
>
> mediatomb user is reserved in user.list.
>
> OK?
>
> --
> Best Regards
> Edd Barrett
>
> http://www.theunixzoo.co.uk
>

I must try this port... my PS3 wants for it...



Re: WIP: mediatomb-0.12.1

2010-09-16 Thread Edd Barrett
Hi,

On Tue, Sep 14, 2010 at 11:10:59PM +0100, Robert Bronsdon wrote:
> Should rc.local check for an active network connection? Can it?
> 
> It's just mediatomb will fail to start unless it can bind itself to
> an address/port.

It should bind loopback atleast, but ideally i recommend a network card; that is
a reponsibility of the user ;)

New port attached:
 * fix sthen's comments.
 * use /var/empty for _mediatomb home, like mpd does.

mediatomb user is reserved in user.list.

OK?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


mediatomb-foo.tgz
Description: application/tar-gz


Re: WIP: mediatomb-0.12.1

2010-09-14 Thread Robert Bronsdon

Should rc.local check for an active network connection? Can it?

It's just mediatomb will fail to start unless it can bind itself to an  
address/port.


--
Robert Bronsdon



Re: WIP: mediatomb-0.12.1

2010-09-14 Thread Stuart Henderson
On 2010/09/14 22:39, Edd Barrett wrote:
> On Mon, Sep 13, 2010 at 10:39:02PM +0200, Markus Bergkvist wrote:
> > It still ignores any signals. Might this be related?
> > http://marc.info/?l=openbsd-tech&m=128398746609607&w=2
> 
> Maybe, unsure. Maybe someone >me knows?
>  
> > Will this remove the database on pkg_add -u too?
> > @extraunexec rm -rf /var/db/mediatomb/*
> 
> Only if you use pkg_delete -c.
>  
> > $ diff -u Makefile.orig Makefile
> > 
> 
> New tarball attached. Also adds SYSCONFDIR to message as jasper said.

> # GPL

which version?

> ..files.xml..

some other /usr/local needs patching to ${TRUEPREFIX} in here

> To start mediatomb at boot time, place the following in
> ${SYSCONFDIR}/rc.local:

this should be /etc/rc.local, it's a system file (SYSCONFDIR is just
for files from ports)

> if [ -x ${TRUEPREFIX}/bin/mediatomb ] ; then
> echo -n ' mediatomb'
> su _mediatomb -c "${TRUEPREFIX}/bin/mediatomb \
> -c ${SYSCONFDIR}/mediatomb/config.xml -d"

and this is of course correct as SYSCONFDIR

> @newgroup _mediatomb:654
> @newuser _mediatomb:654:_mediatomb:daemon:Mediatomb 
> Account:/var/db/mediatomb:/bin/sh

656 now; go and reserve it in infra/db/user.list now and update it in
your tree so you don't need to fiddle with it again :-)





Re: WIP: mediatomb-0.12.1

2010-09-14 Thread Antoine Jacoutot
On Tue, 14 Sep 2010, Edd Barrett wrote:

> On Mon, Sep 13, 2010 at 10:39:02PM +0200, Markus Bergkvist wrote:
> > It still ignores any signals. Might this be related?
> > http://marc.info/?l=openbsd-tech&m=128398746609607&w=2
> 
> Maybe, unsure. Maybe someone >me knows?
>  
> > Will this remove the database on pkg_add -u too?
> > @extraunexec rm -rf /var/db/mediatomb/*
> 
> Only if you use pkg_delete -c.
>  
> > $ diff -u Makefile.orig Makefile
> > 
> 
> New tarball attached. Also adds SYSCONFDIR to message as jasper said.

This is wrong:
To start mediatomb at boot time, place the following in 
${SYSCONFDIR}/rc.local:

rc.local will always be under /etc whatever value SYSCONFDIR is set to.

-- 
Antoine



Re: WIP: mediatomb-0.12.1

2010-09-14 Thread Edd Barrett
On Mon, Sep 13, 2010 at 10:39:02PM +0200, Markus Bergkvist wrote:
> It still ignores any signals. Might this be related?
> http://marc.info/?l=openbsd-tech&m=128398746609607&w=2

Maybe, unsure. Maybe someone >me knows?
 
> Will this remove the database on pkg_add -u too?
> @extraunexec rm -rf /var/db/mediatomb/*

Only if you use pkg_delete -c.
 
> $ diff -u Makefile.orig Makefile
> 

New tarball attached. Also adds SYSCONFDIR to message as jasper said.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


mediatomb-again.tgz
Description: application/tar-gz


Re: WIP: mediatomb-0.12.1

2010-09-14 Thread Jasper Lievisse Adriaanse
On Mon, Sep 13, 2010 at 10:39:02PM +0200, Markus Bergkvist wrote:
> 
> On 09/10/10 13:43, Edd Barrett wrote:
> >>Here is an updated (unfinished) port. There is a bug in mediatomb where it
> >>ignores -c. I don't have any more time to look at this now, so a I am 
> >>posting my
> >>work thus far. This port creates a new user and prints a installation 
> >>message
> >>suitible for rc.local.
> >
> >No bug - forgot to quote su -c "...".
> >
> >Try this.. attached.
> >
> >  * picks up system-wide config
> >  * puts database in /var/db/mediatomb
> >
> 
> It still ignores any signals. Might this be related?
> http://marc.info/?l=openbsd-tech&m=128398746609607&w=2
> 
> Will this remove the database on pkg_add -u too?
> @extraunexec rm -rf /var/db/mediatomb/*
> 
> $ diff -u Makefile.orig Makefile
> 
> 
> --- Makefile.orig Mon Sep 13 22:15:54 2010
> +++ Makefile  Mon Sep 13 22:16:04 2010
> @@ -25,7 +25,6 @@
>  LIB_DEPENDS =::graphics/ffmpegthumbnailer \
>   ::net/curl \
>   ::graphics/libexif \
> - ::graphics/ffmpegthumbnailer \
>   ::lang/spidermonkey \
>   ::devel/libmagic \
>   ::databases/sqlite3 \
> 
> $ diff -u pkg/MESSAGE.orig pkg/MESSAGE
> 
> 
> --- pkg/MESSAGE.orig  Fri Sep 10 13:32:53 2010
> +++ pkg/MESSAGE   Mon Sep 13 22:11:17 2010
> @@ -1,4 +1,4 @@
> -To start mediatomb at boot time, place the following in rc.local:
> +To start mediatomb at boot time, place the following in /etc/rc.local:
> 
>  if [ -x ${TRUEPREFIX}/bin/mediatomb ] ; then
>   echo -n ' mediatomb'

Please use ${SYSCONFDIR} instead of hardcoding /etc.

-- 
Stay Hungry. Stay Foolish.



Re: WIP: mediatomb-0.12.1

2010-09-13 Thread Markus Bergkvist


On 09/10/10 13:43, Edd Barrett wrote:

Here is an updated (unfinished) port. There is a bug in mediatomb where it
ignores -c. I don't have any more time to look at this now, so a I am posting my
work thus far. This port creates a new user and prints a installation message
suitible for rc.local.


No bug - forgot to quote su -c "...".

Try this.. attached.

  * picks up system-wide config
  * puts database in /var/db/mediatomb



It still ignores any signals. Might this be related?
http://marc.info/?l=openbsd-tech&m=128398746609607&w=2

Will this remove the database on pkg_add -u too?
@extraunexec rm -rf /var/db/mediatomb/*

$ diff -u Makefile.orig Makefile 



--- Makefile.orig   Mon Sep 13 22:15:54 2010
+++ MakefileMon Sep 13 22:16:04 2010
@@ -25,7 +25,6 @@
 LIB_DEPENDS =  ::graphics/ffmpegthumbnailer \
::net/curl \
::graphics/libexif \
-   ::graphics/ffmpegthumbnailer \
::lang/spidermonkey \
::devel/libmagic \
::databases/sqlite3 \

$ diff -u pkg/MESSAGE.orig pkg/MESSAGE 



--- pkg/MESSAGE.origFri Sep 10 13:32:53 2010
+++ pkg/MESSAGE Mon Sep 13 22:11:17 2010
@@ -1,4 +1,4 @@
-To start mediatomb at boot time, place the following in rc.local:
+To start mediatomb at boot time, place the following in /etc/rc.local:

 if [ -x ${TRUEPREFIX}/bin/mediatomb ] ; then
echo -n ' mediatomb'



Re: WIP: mediatomb-0.12.1

2010-09-10 Thread Edd Barrett
On Tue, Sep 07, 2010 at 03:00:18PM +0100, Edd Barrett wrote:
> On Sun, Sep 05, 2010 at 04:12:52PM -0700, Allie Daneman wrote:
> > I'll try this very soon as well, I can dump the linux box I'm running
> > mediatomb on now if it works ;) Thanks for the portthis will be huge
> > if it works well.
> 
> It will be moderatley sized perhaps, yes.
> 
> Here is an updated (unfinished) port. There is a bug in mediatomb where it
> ignores -c. I don't have any more time to look at this now, so a I am posting 
> my
> work thus far. This port creates a new user and prints a installation message
> suitible for rc.local.

No bug - forgot to quote su -c "...".

Try this.. attached.

 * picks up system-wide config
 * puts database in /var/db/mediatomb

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


mediatomb-sysconf.tgz
Description: application/tar-gz


Re: WIP: mediatomb-0.12.1

2010-09-07 Thread Edd Barrett
On Sun, Sep 05, 2010 at 04:12:52PM -0700, Allie Daneman wrote:
> I'll try this very soon as well, I can dump the linux box I'm running
> mediatomb on now if it works ;) Thanks for the portthis will be huge
> if it works well.

It will be moderatley sized perhaps, yes.

Here is an updated (unfinished) port. There is a bug in mediatomb where it
ignores -c. I don't have any more time to look at this now, so a I am posting my
work thus far. This port creates a new user and prints a installation message
suitible for rc.local.

Next:
 * get it picking up the config in /etc/mediatomb
 * make sure the database is in /var/db/mediatomb

Cheers

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


mediatomb.tgz
Description: application/tar-gz


Re: WIP: mediatomb-0.12.1

2010-09-05 Thread Allie Daneman
I'll try this very soon as well, I can dump the linux box I'm running
mediatomb on now if it works ;) Thanks for the portthis will be huge
if it works well.

> On Sat, 04 Sep 2010 12:50:43 +0100, Edd Barrett  wrote:
>
>> Does someone with an account have a PS3 to test this with. It would be
>> awesome to get this in. My new housemate is bringing a ps3 sometimethis
>> week ;)
>
> Tested with a PS3 and seems to be working OK.
>
> Just a quick note, when you run mediatomb for the first time it will
> generate a default configuration file. There are some comments on enabling
> PS3 support in this file, you must do this otherwise things will break.
>
>
> --
> Robert Bronsdon
>
>



Re: WIP: mediatomb-0.12.1

2010-09-05 Thread Edd Barrett
On Sun, Sep 05, 2010 at 12:31:22PM +0200, Markus Bergkvist wrote:
> What home directory should be used?
> What user/group should mediatomb be executed as?
> Should we add a _mediatomb user/group?

I don't see why not. This would be the OpenBSD way to do it ;)

I will have a look at this shortly.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-09-05 Thread Markus Bergkvist



On 09/04/10 14:29, Edd Barrett wrote:

On Sat, Sep 04, 2010 at 12:50:43PM +0100, Edd Barrett wrote:

On Tue, Aug 24, 2010 at 04:23:48PM +0200, Markus Bergkvist wrote:

Builds with no warnings now. Didn't notice them previously, was only
redirecting stdout to portslogger.


Does someone with an account have a PS3 to test this with. It would be awesome
to get this in. My new housemate is bringing a ps3 sometime this week ;)


Couple of comments:
   * needs instructions of what to add to rc.local

Not sure I understand what you expect to see here.

What home directory should be used?
What user/group should mediatomb be executed as?
Should we add a _mediatomb user/group?


   * ::graphics/ffmpegthumbnailer listed twice.


Thanks, fixed.


Appears to run and bring up www interface fine, but no uPnP device to test.

Done basic testing with ps3, streaming audio and video. Works fine. 
ffmpegthumbnailer works. Not tested youtube.


/Markus


mediatomb-0.12.1.tar.gz
Description: application/gzip


Re: WIP: mediatomb-0.12.1

2010-09-04 Thread Edd Barrett
On Sat, Sep 04, 2010 at 04:18:24PM +0100, Robert Bronsdon wrote:
> On Sat, 04 Sep 2010 12:50:43 +0100, Edd Barrett  wrote:
> 
> >Does someone with an account have a PS3 to test this with. It
> >would be awesome to get this in. My new housemate is bringing a
> >ps3 sometimethis week ;)
> 
> Tested with a PS3 and seems to be working OK.
> 
> Just a quick note, when you run mediatomb for the first time it will
> generate a default configuration file. There are some comments on
> enabling PS3 support in this file, you must do this otherwise things
> will break.

I think that is fine - It is quite clear by looking at the config; ie. it says
"uncomment this for ps3".

Using this port I was able to stream ogg and flv to my windows 7 laptop using
xbmc. Windows media player saw the server but didnt play anything, not even
mp3.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-09-04 Thread Robert Bronsdon

On Sat, 04 Sep 2010 12:50:43 +0100, Edd Barrett  wrote:

Does someone with an account have a PS3 to test this with. It would be  
awesome to get this in. My new housemate is bringing a ps3 sometimethis  
week ;)


Tested with a PS3 and seems to be working OK.

Just a quick note, when you run mediatomb for the first time it will  
generate a default configuration file. There are some comments on enabling  
PS3 support in this file, you must do this otherwise things will break.



--
Robert Bronsdon



Re: WIP: mediatomb-0.12.1

2010-09-04 Thread Edd Barrett
On Sat, Sep 04, 2010 at 12:50:43PM +0100, Edd Barrett wrote:
> On Tue, Aug 24, 2010 at 04:23:48PM +0200, Markus Bergkvist wrote:
> > Builds with no warnings now. Didn't notice them previously, was only
> > redirecting stdout to portslogger.
> 
> Does someone with an account have a PS3 to test this with. It would be awesome
> to get this in. My new housemate is bringing a ps3 sometime this week ;)

Couple of comments:
  * needs instructions of what to add to rc.local
  * ::graphics/ffmpegthumbnailer listed twice.

Appears to run and bring up www interface fine, but no uPnP device to test.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-09-04 Thread Edd Barrett
On Tue, Aug 24, 2010 at 04:23:48PM +0200, Markus Bergkvist wrote:
> Builds with no warnings now. Didn't notice them previously, was only
> redirecting stdout to portslogger.

Does someone with an account have a PS3 to test this with. It would be awesome
to get this in. My new housemate is bringing a ps3 sometime this week ;)

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: WIP: mediatomb-0.12.1

2010-08-24 Thread Markus Bergkvist


On 08/24/10 13:28, Federico G. Schwindt wrote:


   Your patch for ThreadPool.c is wrong. You didn't remove OpenBSD from the
first ifdef. As for the first part of it, although my diff was wrong you
still want to return the min/max priorities, so it should be something
like this (not a real diff so you'll have to adapt it):

#if (defined(HAVE_SCHED_GET_PRIORITY_MIN)&&  
defined(HAVE_SCHED_GET_PRIORITY_MAX)) || defined(__OpenBSD__)
..
+#if !defined(__OpenBSD__)
  minPriority = sched_get_priority_min( currentPolicy );
  maxPriority = sched_get_priority_max( currentPolicy );
+#else
+minPriority = 0;
+maxPriority = 31;
+#endif
..

   OpenBSD does not have those functions but does have the priorities.
   A few other comments:

   - Look at the Makefile.template and try to follow it (spaces, order, etc)
   - Switch to new dependency style (I've been hit with the cluestick so why
 not pass this knowledge)

   Other than that untested.

   f.-




* ThreadPool.c updated according to your comments.
* New patches to remove the compiler warnings.
* Makefile follows template.
* Switched to new dependency style.

Builds with no warnings now. Didn't notice them previously, was only 
redirecting stdout to portslogger.


/Markus


mediatomb.tar.gz
Description: application/gzip


Re: WIP: mediatomb-0.12.1

2010-08-24 Thread Federico G. Schwindt
On Mon, Aug 23, 2010 at 10:51:53PM +0200, Markus Bergkvist wrote:
> 
> On 08/22/10 22:51, Federico G. Schwindt wrote:
> >On Sun, Aug 22, 2010 at 10:04:07PM +0200, Markus Bergkvist wrote:
> >>A work-in-progress port of mediatomb, I'm stuck and need some help:
> >>
> >>* the configure script picks up spidermonkey headers (jsapi.h) but
> >>the libjs/libsmjs link fails, shouldn't "checking for JS_NewObject
> >>in -ljs" work?
> >>
> >>* how do I get it to pick up ffmpeg support?
> >
> >   I've had a port for this for some time (based on djm@ submission) but
> >never managed to mail it for one reason or another.
> >   IIRC, I didn't have these issues so attached if you want to review it
> >or play with it.  btw, at the time I tested it with ps3.
> >
> >   f.-
> Thanks.
> The libs needed -pthread to be picked up by configure.
> 
> I've been tweaking your port with
>  * added --disable-inotify
>  * added ffmpegthumbnailer
>  * the first part of the ThreadPool.c patch seemed superflous so I
> removed it, correct me if I was wrong.
> 
> Will play some more with it and my ps3 tomorrow.

  Your patch for ThreadPool.c is wrong. You didn't remove OpenBSD from the
first ifdef. As for the first part of it, although my diff was wrong you
still want to return the min/max priorities, so it should be something
like this (not a real diff so you'll have to adapt it):

#if (defined(HAVE_SCHED_GET_PRIORITY_MIN) && 
defined(HAVE_SCHED_GET_PRIORITY_MAX)) || defined(__OpenBSD__)
..
+#if !defined(__OpenBSD__)
 minPriority = sched_get_priority_min( currentPolicy );
 maxPriority = sched_get_priority_max( currentPolicy );
+#else
+minPriority = 0;
+maxPriority = 31;
+#endif
..

  OpenBSD does not have those functions but does have the priorities.
  A few other comments:

  - Look at the Makefile.template and try to follow it (spaces, order, etc)
  - Switch to new dependency style (I've been hit with the cluestick so why
not pass this knowledge)

  Other than that untested.

  f.-



Re: WIP: mediatomb-0.12.1

2010-08-23 Thread Markus Bergkvist


On 08/22/10 22:51, Federico G. Schwindt wrote:

On Sun, Aug 22, 2010 at 10:04:07PM +0200, Markus Bergkvist wrote:

A work-in-progress port of mediatomb, I'm stuck and need some help:

* the configure script picks up spidermonkey headers (jsapi.h) but
the libjs/libsmjs link fails, shouldn't "checking for JS_NewObject
in -ljs" work?

* how do I get it to pick up ffmpeg support?


   I've had a port for this for some time (based on djm@ submission) but
never managed to mail it for one reason or another.
   IIRC, I didn't have these issues so attached if you want to review it
or play with it.  btw, at the time I tested it with ps3.

   f.-

Thanks.
The libs needed -pthread to be picked up by configure.

I've been tweaking your port with
 * added --disable-inotify
 * added ffmpegthumbnailer
 * the first part of the ThreadPool.c patch seemed superflous so I 
removed it, correct me if I was wrong.


Will play some more with it and my ps3 tomorrow.

/Markus


mediatomb.tar.gz
Description: application/gzip


Re: WIP: mediatomb-0.12.1

2010-08-23 Thread Nick Templeton
I've been working on a mediatomb port for a bit myself. When I get home I can 
share what I did to work around this. I'm sure it's wrong, but it got it 
working.



-Nick
On Aug 22, 2010 3:06 PM, Markus Bergkvist  
wrote: 

A work-in-progress port of mediatomb, I'm stuck and need some help:



* the configure script picks up spidermonkey headers (jsapi.h) but the 

libjs/libsmjs link fails, shouldn't "checking for JS_NewObject in -ljs" 

work?



* how do I get it to pick up ffmpeg support?



/Markus




Re: WIP: mediatomb-0.12.1

2010-08-22 Thread Federico G. Schwindt
On Sun, Aug 22, 2010 at 10:04:07PM +0200, Markus Bergkvist wrote:
> A work-in-progress port of mediatomb, I'm stuck and need some help:
> 
> * the configure script picks up spidermonkey headers (jsapi.h) but
> the libjs/libsmjs link fails, shouldn't "checking for JS_NewObject
> in -ljs" work?
> 
> * how do I get it to pick up ffmpeg support?

  I've had a port for this for some time (based on djm@ submission) but
never managed to mail it for one reason or another.
  IIRC, I didn't have these issues so attached if you want to review it
or play with it.  btw, at the time I tested it with ps3.

  f.-


mediatomb.tgz
Description: application/tar-gz


WIP: mediatomb-0.12.1

2010-08-22 Thread Markus Bergkvist

A work-in-progress port of mediatomb, I'm stuck and need some help:

* the configure script picks up spidermonkey headers (jsapi.h) but the 
libjs/libsmjs link fails, shouldn't "checking for JS_NewObject in -ljs" 
work?


* how do I get it to pick up ffmpeg support?

/Markus


mediatomb-0.12.1.tar.gz
Description: application/gzip