[NEW] net/irssi-fish

2017-03-18 Thread Pedro de Oliveira
Hi ports@,

FiSH is an encryption plugin for the irssi IRC client.

Heres my port for it, I named it "net/irssi-fish" to make it comply with
the other irssi modules.

Comments? OK?


irssi-fish.tar.gz
Description: GNU Zip compressed data


Re: Help to port missing PHP extensions required for running Laravel

2017-01-18 Thread Pedro de Oliveira
I run a laravel site on my OpenBSD server, everything works correctly.

On Wed, Jan 18, 2017 at 1:34 PM, Erling Westenvik <
erling.westen...@gmail.com> wrote:

> Hi,
> A customer require a PHP project to be developed using the Laravel
> framework. According to their home page, Laravel requires:
>
> - OpenSSL PHP Extension
> - PDO PHP Extension
> - Mbstring PHP Extension
> - Tokenizer PHP Extension
> - XML PHP Extension
>
> AFAIK, only the PDO Extension is available for PHP in OpenBSD as for now.
>
> I'd prefer to do the development using my OpenBSD machines. The
> alternatives are rather depressing:
>
> - either set up a dedicated Linux machine, or
> - try running a Linux VM in QEMU
>
> My question:
>
> Would it be easy for me to create ports for the extensions above? And if
> so, if someone would be kind enough to point me in the right direction?
>
> I'm running amd64-current on both my primary workstation and on my laptop.
>
> Thanks in advance for any help.
>
> Erling
>
> --
> Erling Westenvik
>
>


Re: NEW: htop 2.0.0

2016-02-15 Thread Pedro de Oliveira
Hi again,

Here is an updated version, with two patches from github, it now also
passes portcheck.
I believe that in the next version both patches will already be in upstream.

https://github.com/hishamhm/htop/pull/398
https://github.com/hishamhm/htop/pull/376

On Sun, Feb 14, 2016 at 10:08 PM, Juan Francisco Cantero Hurtado
<i...@juanfra.info> wrote:
> On Thu, Feb 11, 2016 at 08:53:42PM -0500, Michael McConville wrote:
>> Pedro de Oliveira wrote:
>> > Hi,
>> >
>> > Attached is a new port for sysutils/htop.The new 2.0.0 release now
>> > supports OpenBSD.
>> > It's my first port, so be easy!
>> >
>> > Any comments? OK to import?
>> >
>> > Regards,
>> > Pedro de Oliveira
>>
>> Hi, Pedro.
>>
>> I wrote the OpenBSD-specific htop code. I was planning on making a
>> proper port ASAP; thanks for beating me to it!  :-)  I'll try to review
>> it this weekend.
>>
>> It's too late to get it into 5.9, sadly. This gives us more time to
>> improve the OS-specific code, though.
>>
>> If you want to help with that, you could review and test this patch by
>> juanfra@:
>>
>> https://github.com/hishamhm/htop/pull/376
>
> I've seeing a bunch of double-free and use-after-free in htop. Please,
> run your tests with "MALLOC_OPTIONS=CFGJU htop" and fix the code
> yourself in the upstream github repo if you can.
>
> --
> Juan Francisco Cantero Hurtado http://juanfra.info
>


htop.tgz
Description: GNU Zip compressed data


NEW: htop 2.0.0

2016-02-11 Thread Pedro de Oliveira
Hi,

Attached is a new port for sysutils/htop.The new 2.0.0 release now
supports OpenBSD.
It's my first port, so be easy!

Any comments? OK to import?

Regards,
Pedro de Oliveira


htop.tgz
Description: GNU Zip compressed data


Re: www/apache-httpd segfaults

2016-01-16 Thread Pedro de Oliveira
Hello,

Following your tips I built Apache with -O0 and the segfaults in
"mpm_prefork" no longer happen. Maybe its a gcc optimization issue.
I dont know which -O OpenBSD uses by default, but I will try it also with
-O1 and report back.

Now that it doesnt crash I fiddled a bit more with http2.

# gdb --args httpd2 -X
(gdb) run
Starting program: /usr/local/sbin/httpd2 -X
...

And when I do a "curl -v -http2 http://vhost.with.http2;

...
Program received signal SIGABRT, Aborted.
[Switching to thread 1016704]
0x05c7a6ae089a in thrkill () at :2
2   : No such file or directory.
in 
Current language:  auto; currently asm
(gdb) bt full
#0  0x05c7a6ae089a in thrkill () at :2
No locals.
#1  0x05c7a6adbf59 in *_libc_abort () at
/usr/src/lib/libc/stdlib/abort.c:52
mask = 4294967263
sa = {__sigaction_u = {__sa_handler = 0x1, __sa_sigaction = 0x1},
sa_mask = 49, sa_flags = 0}
#2  0x05c7e7fa336b in apr_table_copy () from
/usr/local/lib/libapr-1.so.5.0
No symbol table info available.
#3  0x05c805c85fa5 in h2_request_create_rec (req=0x5c840c98600,
conn=0x5c84dcb5400) at h2_request.c:361
r = (request_rec *) 0x5c76fbf2400
p = (apr_pool_t *) 0x5c84dcb5000
access_status = 200
#4  0x05c805c9b1cf in h2_task_process_request (req=0x5c840c98600,
c=0x5c84dcb5400) at h2_task.c:223
r = (request_rec *) 0x5c804d7bb40
cs = (conn_state_t *) 0x5c7dbcde2e0
#5  0x05c805c9b4dd in h2_task_process_conn (c=0x5c84dcb5400) at
h2_task.c:255
ctx = (h2_ctx *) 0x5c804d7bb40
#6  0x05c566b71f43 in ap_run_process_connection (c=0x5c84dcb5400) at
connection.c:41
pHook = (ap_LINK_process_connection_t *) 0x5c84d082600
n = 0
rv = -1
#7  0x05c566b7245d in ap_process_connection (c=0x5c84dcb5400,
csd=0x5c77f4a4280) at connection.c:213
rc = -2
#8  0x05c805c9ae43 in h2_task_do (task=0x5c7dbcdee80,
worker=0x5c79f7f8880) at h2_task.c:186
status = 0
#9  0x05c805ca1386 in execute (thread=0x5c82c394800,
wctx=0x5c79f7f8880) at h2_worker.c:58
worker = (h2_worker *) 0x5c79f7f8880
status = 0
m = (h2_mplx *) 0x5c84dcb5300
#10 0x05c845c2c77e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:145
retval = Variable "retval" is not available.
(gdb)

Any hints?

On Sat, Jan 16, 2016 at 6:16 AM, David CARLIER <devne...@gmail.com> wrote:

> Hi,
>
> all depends on the configuration. Also, what would be possible is to
> try to compile apache with debug symbols (-O0) to have better trace of
> the bug (the bug might occur line 732 of server/mpm/prefork/prefork.c
> but it is just guess).
>
> Regards.
>
> On 15 January 2016 at 23:41, Stuart Henderson <st...@openbsd.org> wrote:
> > I've disabled mod_http2 from being packaged for now, not sure how
> > to debug it further at present.
> >
> >
> > On 2016/01/14 18:58, Pedro de Oliveira wrote:
> >> Hi there,
> >>
> >> Yesterday I was trying to play with the http2 module on Apache from
> >> ports, as I saw it was added to the ports file list. The problem is
> >> that the module isnt working correctly.
> >>
> >> If you try it on a http vhost, it simply returns the page via the
> >> normal way (http).
> >> And if you enable it on a https vhost, the vhost stops working (doesnt
> >> serve anything).
> >>
> >> So I went to https://httpd.apache.org/dev/debugging.html , and saw the
> >> instructions on how to debug Apache, and ran httpd2 on gdb with the -X
> >> option.
> >>
> >> After a few requests, httpd2 segfaults, but only when using the
> >> "mpm_prefork" module. With "mpm_event" or "mpm_worker" it doesnt
> >> crash.
> >>
> >> # gdb --args httpd2 -X
> >> (gdb) run
> >> Starting program: /usr/local/sbin/httpd2 -X
> >> AH00557: httpd2: apr_sockaddr_info_get() failed for web.my.domain
> >> AH00558: httpd2: Could not reliably determine the server's fully
> >> qualified domain name, using 127.0.0.1. Set the 'ServerName' directive
> >> globally to suppress this message
> >>
> >> Program received signal SIGSEGV, Segmentation fault.
> >> 0x14a785962a1b in ap_mpm_pod_check () from /usr/local/sbin/httpd2
> >> (gdb) bt
> >> #0  0x14a785962a1b in ap_mpm_pod_check () from
> /usr/local/sbin/httpd2
> >> #1  0x14aa29a81f9e in child_main ()
> >>from /usr/local/lib/apache2/mod_mpm_prefork.so
> >> #2  0x14aa29a82321 in make_child ()
> >>from /usr/local/lib/apache2/mod_mpm_prefork.so
> >> #3  0x14aa29a833cf in prefork_run ()
> >>fr

Re: www/apache-httpd segfaults

2016-01-16 Thread Pedro de Oliveira
Ignore what I said in the earlier email about "mpm_prefork", I wasnt
using it. Sorry.

It still crashes after a few requests. This is the backtrace from
apache build with -O0 and -ggdb.

# gdb --args httpd2 -X
(gdb) run
Starting program: /usr/local/sbin/httpd2 -X
...
Program received signal SIGSEGV, Segmentation fault.
0x18a9b2875638 in ap_mpm_pod_check (pod=0x0) at mpm_unix.c:459
459 rv = apr_file_read(pod->pod_in, , );
(gdb) bt full
#0  0x18a9b2875638 in ap_mpm_pod_check (pod=0x0) at mpm_unix.c:459
c = -1 '▒'
len = 1
rv = 2
#1  0x18ac9892d3bb in child_main (child_num_arg=0, child_bucket=0)
at prefork.c:732
current_conn = (conn_rec *) 0x18abbed08f00
csd = (void *) 0x18abb4508000
thd = (apr_thread_t *) 0x18ac9e058b40
osthd = 0x18abeee85920
ptrans = (apr_pool_t *) 0x18abc3acce00
allocator = (apr_allocator_t *) 0x18abe0001700
status = 0
i = -1
lr = (ap_listen_rec *) 0x18abfdd7be00
pollset = (apr_pollset_t *) 0x18abb4509e00
sbh = (ap_sb_handle_t *) 0x18abed2a6e40
bucket_alloc = (apr_bucket_alloc_t *) 0x18ac537a7028
last_poll_idx = 1
lockfile = 0x7f7d4d20 ""
#2  0x18ac9892d4d5 in make_child (s=0x18ac45b90d00, slot=0,
bucket=0) at prefork.c:767
pid = 1
#3  0x18ac9892dc2d in prefork_run (_pconf=0x18abc7307d00,
plog=0x18abc7307700, s=0x18ac45b90d00) at prefork.c:979
index = 6316
remaining_children_to_start = 2134903585
i = 6315
#4  0x18a9b283a8b7 in ap_run_mpm (pconf=0x18abc7307d00,
plog=0x18abc7307700, s=0x18ac45b90d00) at mpm_common.c:94
pHook = (ap_LINK_mpm_t *) 0x18abd5664000
n = 0
rv = -1
#5  0x18a9b28324a3 in main (argc=2, argv=0x7f7d5158) at main.c:777
c = 88 'X'
showcompile = 0
showdirectives = 0
confname = 0x18a9b299083b "/etc/apache2/httpd2.conf"
def_server_root = 0x18a9b2990854 "/var/www"
temp_error_log = 0x0
error = 0x0
process = (process_rec *) 0x18ac9cb312c0
pconf = (apr_pool_t *) 0x18abc7307d00
plog = (apr_pool_t *) 0x18abc7307700
ptemp = (apr_pool_t *) 0x18abbb0bb800
pcommands = (apr_pool_t *) 0x18ac5cf89500
opt = (apr_getopt_t *) 0x18ac48aed600
rv = 0
mod = (module **) 0x18a9b2cac518
opt_arg = 0x0
signal_server = (apr_OFN_ap_signal_server_t *) 0x18a9b2875ee5




On Sat, Jan 16, 2016 at 7:28 PM, Michael McConville <mm...@mykolab.com> wrote:
> Pedro de Oliveira wrote:
>> Following your tips I built Apache with -O0 and the segfaults in
>> "mpm_prefork" no longer happen. Maybe its a gcc optimization issue. I
>> dont know which -O OpenBSD uses by default, but I will try it also
>> with -O1 and report back.
>
> Remember, compiler optimizations can worsen the impact of undefined
> behavior. That seems more likely than a compiler bug to me.



www/apache-httpd segfaults

2016-01-14 Thread Pedro de Oliveira
Hi there,

Yesterday I was trying to play with the http2 module on Apache from
ports, as I saw it was added to the ports file list. The problem is
that the module isnt working correctly.

If you try it on a http vhost, it simply returns the page via the
normal way (http).
And if you enable it on a https vhost, the vhost stops working (doesnt
serve anything).

So I went to https://httpd.apache.org/dev/debugging.html , and saw the
instructions on how to debug Apache, and ran httpd2 on gdb with the -X
option.

After a few requests, httpd2 segfaults, but only when using the
"mpm_prefork" module. With "mpm_event" or "mpm_worker" it doesnt
crash.

# gdb --args httpd2 -X
(gdb) run
Starting program: /usr/local/sbin/httpd2 -X
AH00557: httpd2: apr_sockaddr_info_get() failed for web.my.domain
AH00558: httpd2: Could not reliably determine the server's fully
qualified domain name, using 127.0.0.1. Set the 'ServerName' directive
globally to suppress this message

Program received signal SIGSEGV, Segmentation fault.
0x14a785962a1b in ap_mpm_pod_check () from /usr/local/sbin/httpd2
(gdb) bt
#0  0x14a785962a1b in ap_mpm_pod_check () from /usr/local/sbin/httpd2
#1  0x14aa29a81f9e in child_main ()
   from /usr/local/lib/apache2/mod_mpm_prefork.so
#2  0x14aa29a82321 in make_child ()
   from /usr/local/lib/apache2/mod_mpm_prefork.so
#3  0x14aa29a833cf in prefork_run ()
   from /usr/local/lib/apache2/mod_mpm_prefork.so
#4  0x14a785937d12 in ap_run_mpm () from /usr/local/sbin/httpd2
#5  0x14a7859318b3 in main () from /usr/local/sbin/httpd2

And if you run httpd2 -X and try to access an SSL vhost it also crashes.

Program received signal SIGPIPE, Broken pipe.
[Switching to thread 1003084]
0x1ff81dfaf1aa in writev () at :2
2   : No such file or directory.
in 
Current language:  auto; currently asm
(gdb) bt
#0  0x1ff81dfaf1aa in writev () at :2
#1  0x1ff7a7eec2ed in writev (fd=19, iov=0x1ff7789a7780, iovcnt=1)
at /usr/src/lib/librthread/rthread_cancel.c:621
#2  0x1ff75d837311 in apr_socket_sendv () from
/usr/local/lib/libapr-1.so.5.0
#3  0x1ff53a44f3b8 in writev_nonblocking () from /usr/local/sbin/httpd2
#4  0x1ff53a44f6e3 in send_brigade_nonblocking () from
/usr/local/sbin/httpd2
#5  0x1ff53a44fbc9 in ap_core_output_filter () from /usr/local/sbin/httpd2
#6  0x1ff7e916011c in bio_filter_out_pass () from
/usr/local/lib/apache2/mod_ssl.so
#7  0x1ff7e9161955 in bio_filter_out_ctrl () from
/usr/local/lib/apache2/mod_ssl.so
#8  0x1ff7e9171d42 in modssl_smart_shutdown () from
/usr/local/lib/apache2/mod_ssl.so
#9  0x1ff7e916059c in ssl_filter_io_shutdown () from
/usr/local/lib/apache2/mod_ssl.so
#10 0x1ff7e9161dcf in ssl_io_filter_output () from
/usr/local/lib/apache2/mod_ssl.so
#11 0x1ff7e9162498 in ssl_io_filter_coalesce () from
/usr/local/lib/apache2/mod_ssl.so
#12 0x1ff53a45f72a in ap_shutdown_conn () from /usr/local/sbin/httpd2
#13 0x1ff53a45f798 in ap_start_lingering_close () from
/usr/local/sbin/httpd2
#14 0x1ff8185d03a4 in worker_thread () from
/usr/local/lib/apache2/mod_mpm_event.so
#15 0x1ff7a7ee977e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:145
#16 0x1ff81df9952b in __tfork_thread () at
/usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#17 0x in ?? ()

I dont know if this is expected on OpenBSD or already known, if it is,
please ignore this message.

This is making debugging Apache to figure out why http2 isnt working impossible.

Regards.



mod_ssl of apache-httpd not working

2015-09-06 Thread Pedro de Oliveira
Hi,

In the current OpenBSD snapshot of today, it isnt possible to load mod_ssl
in Apache. This is maybe related to any change made on LibreSSL.

The init script just gives (failed), but I tried to start it with apachectl2

# apachectl2 start
/usr/local/sbin/httpd2:/usr/local/lib/apache2/mod_ssl.so: undefined symbol
'SSLv3_server_method'
/usr/local/sbin/httpd2:/usr/local/lib/apache2/mod_ssl.so: undefined symbol
'SSLv3_client_method'
httpd2: Syntax error on line 141 of /etc/apache2/httpd2.conf: Cannot load
/usr/local/lib/apache2/mod_ssl.so into server: Cannot load specified object

I even tried to disable SSLv2 and SSLv3 with

SSLProtocol ALL -SSLv2 -SSLv3


But it simply fails on the load of mod_ssl.

If any more info is required please ask me.


Problems building rrdtool 1.2.23 [undefined reference to `main']

2007-11-25 Thread Pedro de Oliveira
Hello, 

Since the version 1.2.x of rrdtool hit the ports I've been trying to build
it, but since it has been committed it hasn't built for me, it always gives
the same error. Have anyone successfully built this? I really wanted this
version because of the anti aliased fonts!

Here's the log of what happens to me during the compilation:

(cd .libs  rm -f librrd_th.la  ln -s ../librrd_th.la librrd_th.la)
/usr/local/bin/libtool  --tag=CC --mode=link cc  -O2 -pipe
-fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wshadow -Wpointer-arith
-Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-Winline -W  -fPIC -DPIC  -L/usr/local/lib -L/usr/X11R6/lib -o rrdtool
librrd.la
cc -O2 -pipe -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wshadow
-Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -Winline -W -fPIC -DPIC -o .libs/rrdtool  -L/usr/local/lib
-L/usr/X11R6/lib -L./.libs -lrrd -lart_lgpl_2 -lm -lz -lpng -lfreetype
-Wl,-rpath,/usr/local/lib
/usr/local/lib/librrd.so.0.0: warning: strcpy() is almost always misused,
please use strlcpy()
/usr/local/lib/librrd.so.0.0: warning: sprintf() is often misused, please
use snprintf()
/usr/local/lib/librrd.so.0.0: warning: strcat() is almost always misused,
please use strlcat()
/usr/bin/ld: warning: libpng.so.5.2, needed by /usr/local/lib/librrd.so.0.0,
may conflict with libpng.so.6.0
/usr/lib/crt0.o(.text+0xa4): In function `___start':
: undefined reference to `main'
collect2: ld returned 1 exit status
gmake[2]: *** [rrdtool] Error 1
gmake[2]: Leaving directory
`/usr/ports/net/rrdtool/w-rrdtool-1.2.23/rrdtool-1.2.23/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/usr/ports/net/rrdtool/w-rrdtool-1.2.23/rrdtool-1.2.23'
gmake: *** [all] Error 2
*** Error code 2