Re: OpenBSD wrapper for Linux/FreeBSD sendfile? (for ZoneMinder)

2021-11-19 Thread Ian Darwin
On Thu, Nov 18, 2021 at 06:04:26PM -0800, Steve Williams wrote:
> Hi,
> 
> I'm trying to compile a Linux/FreeBSD application (zoneminder) under OpenBSD
> 7.0.
> 
> I'm slowly working through it but have gotten stuck at the point where it
> has a dependency on sendfile(2) which OpenBSD doesn't have.

It's generally good to start with a "Is anybody else working on a
ZoneMinder port?"



Re: adventures with zoneminder

2017-12-11 Thread Stuart Henderson
Try looking at patches in FreeBSD port, this attempt was done before the 
switch to clang.


I stopped working on it after I'd got it to build and started to look at 
how to configure it and realised that this was much more complex than I 
wanted to be looking after.


In hindsight if I'd looked at the mixture of components required to run it 
earlier I probably wouldn't have spent time getting it to build 
(http://zoneminder.readthedocs.io/en/stable/userguide/components.html - and 
I didn't take it as a particularly good sign that they felt the need for 
infrastructure to restart crashed processes!).




On 11 December 2017 03:08:01 "Stephen Graf"  wrote:


As pointed out there is an openbsd wip port for zoneminder.  So I tried it.
I put together a spare server (x86) with the latest snapshot of openbsd and
ports. Then I copied in the wip port for zoneminder and did a make build.
It got right down to the build of the zoneminder code before it quit with
the error below.  I sort of get the idea of what is wrong, but have no clue
as to how to fix it. Does anyone have any quick suggestions?

[ 27%] Building CXX object src/CMakeFiles/zm.dir/zm_image.cpp.o
cd /usr/ports/pobj/zoneminder-1.29.0/build-i386/src &&
/usr/ports/pobj/zoneminder-1.29.0/bin/c++
-I/usr/ports/pobj/zoneminder-1.29.0/build-i386/src
-I/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src
-I/usr/ports/pobj/zoneminder-1.29.0/build-i386 -I/usr/local/include  -O2
-pipe -Wall -D__STDC_CONSTANT_MACROS -O2   -o
CMakeFiles/zm.dir/zm_image.cpp.o -c
/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src/zm_image.cpp
/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src/zm_image.cpp:1212:12
: warning: comparison of
  unsigned expression < 0 is always false [-Wtautological-compare]
if ( lo_x < 0 || hi_x > (width-1) || ( lo_y < 0 || hi_y > (height-1)
) )
      ^ ~
/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src/zm_image.cpp:1624:20
: error: call to 'abs' is
  ambiguous
if (
(unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(thr...
   ^~~
/usr/include/stdlib.h:98:6: note: candidate function
int  abs(int);
 ^
/usr/include/c++/v1/stdlib.h:115:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long  abs( long __x) _NOEXCEPT
{return  labs(__x);}
   ^
/usr/include/c++/v1/stdlib.h:117:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT
{return llabs(__x);}
   ^
/usr/include/c++/v1/math.h:646:1: note: candidate function
abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
^
/usr/include/c++/v1/math.h:650:1: note: candidate function
abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
^
/usr/include/c++/v1/math.h:654:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
^


14 warnings and 1 error generated.
*** Error 1 in . (src/CMakeFiles/zm.dir/build.make:402
'src/CMakeFiles/zm.dir/zm_image.cpp.o')
*** Error 1 in . (CMakeFiles/Makefile2:376 'src/CMakeFiles/zm.dir/all')
*** Error 1 in /usr/ports/pobj/zoneminder-1.29.0/build-i386 (Makefile:133
'all')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2742
'/usr/ports/pobj/zoneminder-1.29.0/build-i386/.build_done')
*** Error 1 in /usr/ports/multimedia/zoneminder
(/usr/ports/infrastructure/mk/bsd.port.mk:2419 'build')







adventures with zoneminder

2017-12-10 Thread Stephen Graf
As pointed out there is an openbsd wip port for zoneminder.  So I tried it.
I put together a spare server (x86) with the latest snapshot of openbsd and
ports. Then I copied in the wip port for zoneminder and did a make build.
It got right down to the build of the zoneminder code before it quit with
the error below.  I sort of get the idea of what is wrong, but have no clue
as to how to fix it. Does anyone have any quick suggestions?

[ 27%] Building CXX object src/CMakeFiles/zm.dir/zm_image.cpp.o
cd /usr/ports/pobj/zoneminder-1.29.0/build-i386/src &&
/usr/ports/pobj/zoneminder-1.29.0/bin/c++
-I/usr/ports/pobj/zoneminder-1.29.0/build-i386/src
-I/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src
-I/usr/ports/pobj/zoneminder-1.29.0/build-i386 -I/usr/local/include  -O2
-pipe -Wall -D__STDC_CONSTANT_MACROS -O2   -o
CMakeFiles/zm.dir/zm_image.cpp.o -c
/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src/zm_image.cpp
/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src/zm_image.cpp:1212:12
: warning: comparison of
  unsigned expression < 0 is always false [-Wtautological-compare]
if ( lo_x < 0 || hi_x > (width-1) || ( lo_y < 0 || hi_y > (height-1)
) )
 ~~~~ ^ ~
/usr/ports/pobj/zoneminder-1.29.0/ZoneMinder-1.29.0/src/zm_image.cpp:1624:20
: error: call to 'abs' is
  ambiguous
if (
(unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(thr...
   ^~~
/usr/include/stdlib.h:98:6: note: candidate function
int  abs(int);
 ^
/usr/include/c++/v1/stdlib.h:115:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long  abs( long __x) _NOEXCEPT
{return  labs(__x);}
   ^
/usr/include/c++/v1/stdlib.h:117:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT
{return llabs(__x);}
   ^
/usr/include/c++/v1/math.h:646:1: note: candidate function
abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
^
/usr/include/c++/v1/math.h:650:1: note: candidate function
abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
^
/usr/include/c++/v1/math.h:654:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
^


14 warnings and 1 error generated.
*** Error 1 in . (src/CMakeFiles/zm.dir/build.make:402
'src/CMakeFiles/zm.dir/zm_image.cpp.o')
*** Error 1 in . (CMakeFiles/Makefile2:376 'src/CMakeFiles/zm.dir/all')
*** Error 1 in /usr/ports/pobj/zoneminder-1.29.0/build-i386 (Makefile:133
'all')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2742
'/usr/ports/pobj/zoneminder-1.29.0/build-i386/.build_done')
*** Error 1 in /usr/ports/multimedia/zoneminder
(/usr/ports/infrastructure/mk/bsd.port.mk:2419 'build')




Re: ZoneMinder

2017-12-09 Thread Michael Plura
Am Fri, 8 Dec 2017 16:28:00 -0800
schrieb "Stephen Graf" :

> Thank you all for your comments.
> I am experimenting with an IP surveillance camera and plan to put a
> number of such cameras around the exterior of my house.

Some time ago I used "motion" with linux. Not that easy to set up, but
worked flawless and didn't use much cpu. OpenBSD has a port i haven't
tested yet: multimedia/motion

#--

motion-3.4.1p3 – motion detection software for video
Description

Motion is a C program that monitors the video signal from one or
more V4L2/video(4) cameras or network-based webcams, and is able to
detect whether a significant part of the picture has changed. Or in
other words, it can detect motion.

Motion is a command line based tool. It has absolutely no graphical
user interface. Everything is setup either via the command line or
via a set of configuration files (simple ASCII files that can be
edited by any ASCII editor).

Motion can output JPEG/PPM images and MPEG video sequences, call
external programs, log to a database, etc.

Motion hasn't had an official release for some time; at present,
this package uses the forked code at https://github.com/Mr-Dave/motion/

Flavours:
bktr - build with bktr(4) support instead of video(4)
mysql - build with MySQL/MariaDB database support
pgsql - build with PostgreSQL database support




Re: ZoneMinder

2017-12-08 Thread Stephen Graf
Thank you all for your comments.

 

I am experimenting with an IP surveillance camera and plan to put a number of 
such cameras around the exterior of my house.

 

I have tried ZoneMinder with Linux and it seems to have all the features and 
works.  Another alternative is ContaCam which is also open source, but only 
runs on MS Windows. I have experimented with it and it seems to be simple yet 
very effective.  I doubt a port from windows is very easy.  These systems tend 
to require a lot of cpu power especially if the frame rates and resolutions are 
kept high and so will probably require a dedicated server.

 

I will look at the wip port and possibly try to build ZoneMinder on an OpenBsd 
system.

 

From: Base Pr1me [mailto:tlemery5...@gmail.com] 
Sent: Friday, December 8, 2017 1:01 PM
To: Stuart Henderson 
Cc: Ian Darwin ; Stephen Graf ; 
ports@openbsd.org
Subject: Re: ZoneMinder

 

For sure! Plus, it's full of irritation, if you've ever setup and run it! LOL

 

A newer, streamlined solution might be better than a port. I don't know. These 
are all the thoughts I've rattled around, which I later forget about.

 

On Fri, Dec 8, 2017 at 1:34 PM, Stuart Henderson mailto:s...@spacehopper.org> > wrote:

Just note that it's not a beginner porter task, zm is rather complicated..

-- 
 Sent from a phone, apologies for poor formatting.





On 8 December 2017 19:46:20 Ian Darwin mailto:i...@darwinsys.com> > wrote:

On 2017-12-08 1:25 PM, Stephen Graf wrote:

Has anyone ever attempted or have interest in porting ZoneMinder?
https://zoneminder.com



There is a start at one in openbsd-wip, under multimedia/zoneminder.
Feel free to finish it :-)

 

 



Re: ZoneMinder

2017-12-08 Thread Base Pr1me
For sure! Plus, it's full of irritation, if you've ever setup and run it!
LOL

A newer, streamlined solution might be better than a port. I don't know.
These are all the thoughts I've rattled around, which I later forget about.

On Fri, Dec 8, 2017 at 1:34 PM, Stuart Henderson 
wrote:

> Just note that it's not a beginner porter task, zm is rather complicated..
>
> --
>  Sent from a phone, apologies for poor formatting.
>
>
>
>
> On 8 December 2017 19:46:20 Ian Darwin  wrote:
>
> On 2017-12-08 1:25 PM, Stephen Graf wrote:
>>
>>> Has anyone ever attempted or have interest in porting ZoneMinder?
>>> https://zoneminder.com
>>>
>>>
>>> There is a start at one in openbsd-wip, under multimedia/zoneminder.
>> Feel free to finish it :-)
>>
>>
>
>


Re: ZoneMinder

2017-12-08 Thread Stuart Henderson

Just note that it's not a beginner porter task, zm is rather complicated..

--
 Sent from a phone, apologies for poor formatting.



On 8 December 2017 19:46:20 Ian Darwin  wrote:


On 2017-12-08 1:25 PM, Stephen Graf wrote:

Has anyone ever attempted or have interest in porting ZoneMinder?
https://zoneminder.com



There is a start at one in openbsd-wip, under multimedia/zoneminder.
Feel free to finish it :-)






Re: ZoneMinder

2017-12-08 Thread Ian Darwin

On 2017-12-08 1:25 PM, Stephen Graf wrote:

Has anyone ever attempted or have interest in porting ZoneMinder?
https://zoneminder.com


There is a start at one in openbsd-wip, under multimedia/zoneminder. 
Feel free to finish it :-)




Re: ZoneMinder

2017-12-08 Thread Base Pr1me
I stick to base with those key services. That's also why I haven't gone
down the nginx road.
YMMV. Still would like to look at this someday!

On Fri, Dec 8, 2017 at 12:16 PM, Stephen Graf  wrote:

> I have read about a port to armbian using nginx, which is closer to httpd.
>
>
>
> http://zoneminder.blogspot.ca/p/zoneminder-on-orange-pi-plus-2.html
>
>
>
>
>
> *From:* Base Pr1me [mailto:tlemery5...@gmail.com]
> *Sent:* Friday, December 8, 2017 11:05 AM
> *To:* Stephen Graf 
> *Cc:* ports@openbsd.org
> *Subject:* Re: ZoneMinder
>
>
>
> I've thought about it and am interested! Just no time to look at it and ZM
> is Apache centric, which puts me off. If it could be ported to work with
> base httpd, then it would be much better.
>
>
>
> On Fri, Dec 8, 2017 at 11:25 AM, Stephen Graf  wrote:
>
> Has anyone ever attempted or have interest in porting ZoneMinder?
> https://zoneminder.com
>
>
>


Re: ZoneMinder

2017-12-08 Thread Stephen Graf
I have read about a port to armbian using nginx, which is closer to httpd.

 

http://zoneminder.blogspot.ca/p/zoneminder-on-orange-pi-plus-2.html

 

 

From: Base Pr1me [mailto:tlemery5...@gmail.com] 
Sent: Friday, December 8, 2017 11:05 AM
To: Stephen Graf 
Cc: ports@openbsd.org
Subject: Re: ZoneMinder

 

I've thought about it and am interested! Just no time to look at it and ZM is 
Apache centric, which puts me off. If it could be ported to work with base 
httpd, then it would be much better.

 

On Fri, Dec 8, 2017 at 11:25 AM, Stephen Graf mailto:s_g...@telus.net> > wrote:

Has anyone ever attempted or have interest in porting ZoneMinder?
https://zoneminder.com



 



Re: ZoneMinder

2017-12-08 Thread Base Pr1me
I've thought about it and am interested! Just no time to look at it and ZM
is Apache centric, which puts me off. If it could be ported to work with
base httpd, then it would be much better.

On Fri, Dec 8, 2017 at 11:25 AM, Stephen Graf  wrote:

> Has anyone ever attempted or have interest in porting ZoneMinder?
> https://zoneminder.com
>
>
>


ZoneMinder

2017-12-08 Thread Stephen Graf
Has anyone ever attempted or have interest in porting ZoneMinder?
https://zoneminder.com




Re: Anybody interested in / working on ZoneMinder?

2016-04-11 Thread Ian Darwin
On Thu, Apr 07, 2016 at 08:12:12AM -0700, Eric Lalonde wrote:
> > Attention turns to ZoneMinder instead. There is a FreeBSD port but it will 
> > take, ahh, some work 
> > to get it going. Anybody already started down this rabbit hole?

> I have a linux zoneminder installation and would love to move it over to 
> openbsd. I can help test at the very least.

Thank. Your mail just arrived now!  

The port compiles and packages but doesn't work yet. It's in openbsd-wip on 
gitub,
which you probably know is a tree parallel to ports, for works in progress. 
Look in multimedia/zoneminder.
I did the initial work and Stu did a major revision, that's what's in WIP at 
the momement.

zonmon-DEVEL-ian $ doas zmu -d /dev/video0 -q -v 
zonmon-DEVEL-ian $ echo $?
210
zonmon-DEVEL-ian $ doas zmu -d /dev/NOSUCHVIDEO -q -v
zonmon-DEVEL-ian $ echo $?
210
zonmon-DEVEL-ian $ 

So it doesn't seem to be getting very far yet :-) But maybe it just needs 
someone that knows how to configure it -
do you edit config files or use the php web front-end?
 
At any rate the weekend is over so I'm back to paying work for a while...



Re: Anybody interested in / working on ZoneMinder?

2016-04-07 Thread Stuart Henderson
On 2016/04/06 21:03, Ian Darwin wrote:
> Generally suspicious of the cheapo security camera systems; suspicions
> confirmed after reading
> https://www.pentestpartners.com/blog/pwning-cctv-cameras/
> 
> Attention turns to ZoneMinder instead. There is a FreeBSD port but it will
> take, ahh, some work to get it going. Anybody already started down this
> rabbit hole?
> 

I haven't, it should be possible but there will likely be a few
challenges along the way.

If something simpler might work for you, look at ports/multimedia/motion.



Anybody interested in / working on ZoneMinder?

2016-04-06 Thread Ian Darwin
Generally suspicious of the cheapo security camera systems; suspicions 
confirmed after reading 
https://www.pentestpartners.com/blog/pwning-cctv-cameras/


Attention turns to ZoneMinder instead. There is a FreeBSD port but it 
will take, ahh, some work to get it going. Anybody already started down 
this rabbit hole?