Re: Building 6.4.2p1 without ssl?

2019-09-03 Thread Ede Wolf

Hello,

Thanks for bringing back openssl support. I've read about it in another 
post from you:


"Note that LibreSSL is my target, OpenSSL is only supported as long as 
it doesn't get in my way and make the code full of ifdefs. I think we'll 
be fine for the years to come..."


so I've thought my setup was broken and as the 6.4.2p1 release was 
relatively recently, I suspected it to being somewhat close to git.


Completely wrong here, thanks to Reio for the heads up, the git version 
build fine with just some warnings. So I will continue my quest for 
lightweight lmtp delivery at the end of the week.


Thanks to all for your help again

Ede.



Am 02.09.19 um 16:29 schrieb gil...@poolp.org:

September 2, 2019 9:48 AM, "Ede Wolf"  wrote:


Hello,

trying to compile opensmtp it fails with openssl errors, so I've tried to 
specify --without-libssl
at configure time, as at least for testing and learning the basics it is not 
really that important,
but it does not seem to get honored.

Any idea, what I may have to change?

Thanks

Ede

In case anybody has an idea for building with openssl, here are the final words 
of the compiler:



OpenSMTPD no longer supports OpenSSL but I made it build again, so the
next release (6.6.0) due in a few weeks will build fine for you on any
supported system that ships with OpenSSL 1.1.x.

There is no way to disable TLS support, this is a mandatory dependency
just like libevent.

Gilles






Re: Building 6.4.2p1 without ssl?

2019-09-02 Thread gilles
September 2, 2019 9:48 AM, "Ede Wolf"  wrote:

> Hello,
> 
> trying to compile opensmtp it fails with openssl errors, so I've tried to 
> specify --without-libssl
> at configure time, as at least for testing and learning the basics it is not 
> really that important,
> but it does not seem to get honored.
> 
> Any idea, what I may have to change?
> 
> Thanks
> 
> Ede
> 
> In case anybody has an idea for building with openssl, here are the final 
> words of the compiler:
> 

OpenSMTPD no longer supports OpenSSL but I made it build again, so the
next release (6.6.0) due in a few weeks will build fine for you on any
supported system that ships with OpenSSL 1.1.x.

There is no way to disable TLS support, this is a mandatory dependency
just like libevent.

Gilles



Re: Building 6.4.2p1 without ssl?

2019-09-02 Thread Reio Remma
I would suggest getting the latest portable branch from Github - that 
compiles nicely with OpenSSL.


Good luck,
Reio

On 02/09/2019 10:48, Ede Wolf wrote:

Hello,

trying to compile opensmtp it fails with openssl errors, so I've tried 
to specify --without-libssl at configure time, as at least for testing 
and learning the basics it is not really that important, but it does 
not seem to get honored.


Any idea, what I may have to change?

Thanks

Ede



In case anybody has an idea for building with openssl, here are the 
final words of the compiler:



# gcc --version
gcc (Gentoo 8.3.0-r1 p1.1) 8.3.0

# openssl version
OpenSSL 1.1.1c  28 May 2019



...

gcc -DHAVE_CONFIG_H -I. -I..  -I../smtpd -I../openbsd-compat 
-I../openbsd-compat/err_h -I/usr/include   -mtune=skylake 
-march=skylake -fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall 
-Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security 
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fPIE -D_BSD_SOURCE 
-D_DEFAULT_SOURCE  -c -o fmt_scaled.o fmt_scaled.c

fmt_scaled.c: In function 'fmt_scaled':
fmt_scaled.c:243:52: warning: '%1lld' directive output may be 
truncated writing between 1 and 17 bytes into a region of size between 
0 and 5 [-Wformat-truncation=]

   (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c",
    ^
fmt_scaled.c:243:46: note: directive argument in the range 
[-9007199254740991, 9007199254740991]

   (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c",
  ^~
In file included from /usr/include/stdio.h:867,
 from openbsd-compat.h:189,
 from includes.h:67,
 from fmt_scaled.c:41:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' 
output between 5 and 40 bytes into a destination of size 7

   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~
    __bos (__s), __fmt, __va_arg_pack ());
    ~
gcc -DHAVE_CONFIG_H -I. -I..  -I../smtpd -I../openbsd-compat 
-I../openbsd-compat/err_h -I/usr/include   -mtune=skylake 
-march=skylake -fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall 
-Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security 
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fPIE -D_BSD_SOURCE 
-D_DEFAULT_SOURCE  -c -o fparseln.o fparseln.c

rm -f libopenbsd-compat.a
/usr/bin/ar cru libopenbsd-compat.a base64.o bsd-getpeereid.o 
bsd-misc.o bsd-waitpid.o entropy.o event_asr_run.o fgetln.o freezero.o 
getopt.o imsg.o imsg-buffer.o pidfile.o pw_dup.o reallocarray.o 
recallocarray.o setproctitle.o setresguid.o strlcat.o strlcpy.o 
strmode.o strtonum.o strsep.o vis.o xmalloc.o crypt_checkpass.o  
bsd-closefrom.o   bsd-err.o errc.o fmt_scaled.o  fparseln.o

ranlib libopenbsd-compat.a
make[2]: Leaving directory '/root/build/opensmtpd-6.4.2p1/openbsd-compat'
Making all in mk
make[2]: Entering directory '/root/build/opensmtpd-6.4.2p1/mk'
Making all in smtpd
make[3]: Entering directory '/root/build/opensmtpd-6.4.2p1/mk/smtpd'
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../smtpd -I../../openbsd-compat 
-I../../openbsd-compat/err_h -I../../openbsd-compat/paths_h -I. 
-I/usr/include -DSMTPD_CONFDIR=\"/opt/smptd/etc\" 
-DPATH_CHROOT=\"/opt/smptd/var/empty\" 
-DPATH_SMTPCTL=\"/opt/smptd/sbin/smtpctl\" 
-DPATH_MAILLOCAL=\"/opt/smptd/libexec/opensmtpd/mail.local\" 
-DPATH_LIBEXEC=\"/opt/smptd/libexec/opensmtpd\" -DHAVE_CONFIG_H 
-DIO_SSL -DCA_FILE=\"/etc/ssl/cert.pem\" -mtune=skylake -march=skylake 
-fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall -Wpointer-arith 
-Wuninitialized -Wsign-compare -Wformat-security 
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fPIE -D_BSD_SOURCE 
-D_DEFAULT_SOURCE  -D_GNU_SOURCE -DNEED_EVENT_ASR_RUN -c -o 
../../smtpd/smtpd-aliases.o `test -f '../../smtpd/aliases.c' || echo 
'./'`../../smtpd/aliases.c

../../smtpd/aliases.c: In function 'aliases_get':
../../smtpd/aliases.c:56:23: warning: variable 'userbase' set but not 
used [-Wunused-but-set-variable]

  struct table    *userbase = NULL;
   ^~~~
../../smtpd/aliases.c: In function 'aliases_virtual_get':
../../smtpd/aliases.c:114:23: warning: variable 'userbase' set but not 
used [-Wunused-but-set-variable]

  struct table    *userbase = NULL;
   ^~~~
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../smtpd -I../../openbsd-compat 
-I../../openbsd-compat/err_h -I../../openbsd-compat/paths_h -I. 
-I/usr/include -DSMTPD_CONFDIR=\"/opt/smptd/etc\" 
-DPATH_CHROOT=\"/opt/smptd/var/empty\" 
-DPATH_SMTPCTL=\"/opt/smptd/sbin/smtpctl\" 
-DPATH_MAILLOCAL=\"/opt/smptd/libexec/opensmtpd/mail.local\" 

Building 6.4.2p1 without ssl?

2019-09-02 Thread Ede Wolf

Hello,

trying to compile opensmtp it fails with openssl errors, so I've tried 
to specify --without-libssl at configure time, as at least for testing 
and learning the basics it is not really that important, but it does not 
seem to get honored.


Any idea, what I may have to change?

Thanks

Ede



In case anybody has an idea for building with openssl, here are the 
final words of the compiler:



# gcc --version
gcc (Gentoo 8.3.0-r1 p1.1) 8.3.0

# openssl version
OpenSSL 1.1.1c  28 May 2019



...

gcc -DHAVE_CONFIG_H -I. -I..  -I../smtpd -I../openbsd-compat 
-I../openbsd-compat/err_h -I/usr/include   -mtune=skylake -march=skylake 
-fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall -Wpointer-arith 
-Wuninitialized -Wsign-compare -Wformat-security 
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fPIE -D_BSD_SOURCE 
-D_DEFAULT_SOURCE  -c -o fmt_scaled.o fmt_scaled.c

fmt_scaled.c: In function 'fmt_scaled':
fmt_scaled.c:243:52: warning: '%1lld' directive output may be truncated 
writing between 1 and 17 bytes into a region of size between 0 and 5 
[-Wformat-truncation=]

   (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c",
^
fmt_scaled.c:243:46: note: directive argument in the range 
[-9007199254740991, 9007199254740991]

   (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c",
  ^~
In file included from /usr/include/stdio.h:867,
 from openbsd-compat.h:189,
 from includes.h:67,
 from fmt_scaled.c:41:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' 
output between 5 and 40 bytes into a destination of size 7

   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  ^~~~
__bos (__s), __fmt, __va_arg_pack ());
~
gcc -DHAVE_CONFIG_H -I. -I..  -I../smtpd -I../openbsd-compat 
-I../openbsd-compat/err_h -I/usr/include   -mtune=skylake -march=skylake 
-fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall -Wpointer-arith 
-Wuninitialized -Wsign-compare -Wformat-security 
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fPIE -D_BSD_SOURCE 
-D_DEFAULT_SOURCE  -c -o fparseln.o fparseln.c

rm -f libopenbsd-compat.a
/usr/bin/ar cru libopenbsd-compat.a base64.o bsd-getpeereid.o bsd-misc.o 
bsd-waitpid.o entropy.o event_asr_run.o fgetln.o freezero.o getopt.o 
imsg.o imsg-buffer.o pidfile.o pw_dup.o reallocarray.o recallocarray.o 
setproctitle.o setresguid.o strlcat.o strlcpy.o strmode.o strtonum.o 
strsep.o vis.o xmalloc.o  crypt_checkpass.o  bsd-closefrom.o   bsd-err.o 
errc.o  fmt_scaled.o  fparseln.o

ranlib libopenbsd-compat.a
make[2]: Leaving directory '/root/build/opensmtpd-6.4.2p1/openbsd-compat'
Making all in mk
make[2]: Entering directory '/root/build/opensmtpd-6.4.2p1/mk'
Making all in smtpd
make[3]: Entering directory '/root/build/opensmtpd-6.4.2p1/mk/smtpd'
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../smtpd -I../../openbsd-compat 
-I../../openbsd-compat/err_h -I../../openbsd-compat/paths_h -I. 
-I/usr/include  -DSMTPD_CONFDIR=\"/opt/smptd/etc\" 
-DPATH_CHROOT=\"/opt/smptd/var/empty\" 
-DPATH_SMTPCTL=\"/opt/smptd/sbin/smtpctl\" 
-DPATH_MAILLOCAL=\"/opt/smptd/libexec/opensmtpd/mail.local\" 
-DPATH_LIBEXEC=\"/opt/smptd/libexec/opensmtpd\" -DHAVE_CONFIG_H -DIO_SSL 
-DCA_FILE=\"/etc/ssl/cert.pem\" -mtune=skylake -march=skylake 
-fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall -Wpointer-arith 
-Wuninitialized -Wsign-compare -Wformat-security 
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fPIE -D_BSD_SOURCE 
-D_DEFAULT_SOURCE  -D_GNU_SOURCE -DNEED_EVENT_ASR_RUN -c -o 
../../smtpd/smtpd-aliases.o `test -f '../../smtpd/aliases.c' || echo 
'./'`../../smtpd/aliases.c

../../smtpd/aliases.c: In function 'aliases_get':
../../smtpd/aliases.c:56:23: warning: variable 'userbase' set but not 
used [-Wunused-but-set-variable]

  struct table*userbase = NULL;
   ^~~~
../../smtpd/aliases.c: In function 'aliases_virtual_get':
../../smtpd/aliases.c:114:23: warning: variable 'userbase' set but not 
used [-Wunused-but-set-variable]

  struct table*userbase = NULL;
   ^~~~
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../smtpd -I../../openbsd-compat 
-I../../openbsd-compat/err_h -I../../openbsd-compat/paths_h -I. 
-I/usr/include  -DSMTPD_CONFDIR=\"/opt/smptd/etc\" 
-DPATH_CHROOT=\"/opt/smptd/var/empty\" 
-DPATH_SMTPCTL=\"/opt/smptd/sbin/smtpctl\" 
-DPATH_MAILLOCAL=\"/opt/smptd/libexec/opensmtpd/mail.local\" 
-DPATH_LIBEXEC=\"/opt/smptd/libexec/opensmtpd\" -DHAVE_CONFIG_H -DIO_SSL 
-DCA_FILE=\"/etc/ssl/cert.pem\" -mtune=skylake -march=skylake 
-fomit-frame-pointer -O2 -pipe  -fPIC -DPIC -Wall