summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--opendkim.lua_load_dump.patch107
-rw-r--r--opendkim.spec17
2 files changed, 120 insertions, 4 deletions
diff --git a/opendkim.lua_load_dump.patch b/opendkim.lua_load_dump.patch
new file mode 100644
index 0000000..d5ba92d
--- /dev/null
+++ b/opendkim.lua_load_dump.patch
@@ -0,0 +1,107 @@
+diff --git a/miltertest/miltertest.c b/miltertest/miltertest.c
+index 04e50c0..c96d9e3 100644
+--- a/miltertest/miltertest.c
++++ b/miltertest/miltertest.c
+@@ -4168,7 +4168,7 @@ main(int argc, char **argv)
+ script == NULL ? "(stdin)" : script, NULL))
+ #else /* LUA_VERSION_NUM == 502 */
+ switch (lua_load(l, mt_lua_reader, (void *) &io,
+- script == NULL ? "(stdin)" : script))
++ script == NULL ? "(stdin)" : script, NULL))
+ #endif /* LUA_VERSION_NUM == 502 */
+ {
+ case 0:
+diff --git a/opendkim/opendkim-lua.c b/opendkim/opendkim-lua.c
+index 4720862..e265ba9 100644
+--- a/opendkim/opendkim-lua.c
++++ b/opendkim/opendkim-lua.c
+@@ -535,7 +535,7 @@ dkimf_lua_setup_hook(void *ctx, const char *script, size_t scriptlen,
+ # if LUA_VERSION_NUM == 502
+ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # else /* LUA_VERSION_NUM == 502 */
+- switch (lua_load(l, dkimf_lua_reader, (void *) &io, name))
++ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # endif /* LUA_VERSION_NUM == 502 */
+ {
+ case 0:
+@@ -564,7 +564,7 @@ dkimf_lua_setup_hook(void *ctx, const char *script, size_t scriptlen,
+ io.lua_io_len = 0;
+ io.lua_io_alloc = 0;
+
+- if (lua_dump(l, dkimf_lua_writer, &io) == 0)
++ if (lua_dump(l, dkimf_lua_writer, &io, NULL) == 0)
+ {
+ *keep = (void *) io.lua_io_script;
+ *funclen = io.lua_io_len;
+@@ -680,7 +680,7 @@ dkimf_lua_screen_hook(void *ctx, const char *script, size_t scriptlen,
+ # if LUA_VERSION_NUM == 502
+ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # else /* LUA_VERSION_NUM == 502 */
+- switch (lua_load(l, dkimf_lua_reader, (void *) &io, name))
++ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # endif /* LUA_VERSION_NUM == 502 */
+ {
+ case 0:
+@@ -709,7 +709,7 @@ dkimf_lua_screen_hook(void *ctx, const char *script, size_t scriptlen,
+ io.lua_io_len = 0;
+ io.lua_io_alloc = 0;
+
+- if (lua_dump(l, dkimf_lua_writer, &io) == 0)
++ if (lua_dump(l, dkimf_lua_writer, &io, NULL) == 0)
+ {
+ *keep = (void *) io.lua_io_script;
+ *funclen = io.lua_io_len;
+@@ -917,7 +917,7 @@ dkimf_lua_stats_hook(void *ctx, const char *script, size_t scriptlen,
+ # if LUA_VERSION_NUM == 502
+ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # else /* LUA_VERSION_NUM == 502 */
+- switch (lua_load(l, dkimf_lua_reader, (void *) &io, name))
++ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # endif /* LUA_VERSION_NUM == 502 */
+ {
+ case 0:
+@@ -946,7 +946,7 @@ dkimf_lua_stats_hook(void *ctx, const char *script, size_t scriptlen,
+ io.lua_io_len = 0;
+ io.lua_io_alloc = 0;
+
+- if (lua_dump(l, dkimf_lua_writer, &io) == 0)
++ if (lua_dump(l, dkimf_lua_writer, &io, NULL) == 0)
+ {
+ *keep = (void *) io.lua_io_script;
+ *funclen = io.lua_io_len;
+@@ -1154,7 +1154,7 @@ dkimf_lua_final_hook(void *ctx, const char *script, size_t scriptlen,
+ # if LUA_VERSION_NUM == 502
+ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # else /* LUA_VERSION_NUM == 502 */
+- switch (lua_load(l, dkimf_lua_reader, (void *) &io, name))
++ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL))
+ # endif /* LUA_VERSION_NUM == 502 */
+ {
+ case 0:
+@@ -1183,7 +1183,7 @@ dkimf_lua_final_hook(void *ctx, const char *script, size_t scriptlen,
+ io.lua_io_len = 0;
+ io.lua_io_alloc = 0;
+
+- if (lua_dump(l, dkimf_lua_writer, &io) == 0)
++ if (lua_dump(l, dkimf_lua_writer, &io, NULL) == 0)
+ {
+ *keep = (void *) io.lua_io_script;
+ *funclen = io.lua_io_len;
+@@ -1255,7 +1255,7 @@ dkimf_lua_db_hook(const char *script, size_t scriptlen, const char *query,
+ # if LUA_VERSION_NUM == 502
+ switch (lua_load(l, dkimf_lua_reader, (void *) &io, script, NULL))
+ # else /* LUA_VERSION_NUM == 502 */
+- switch (lua_load(l, dkimf_lua_reader, (void *) &io, script))
++ switch (lua_load(l, dkimf_lua_reader, (void *) &io, script, NULL))
+ # endif /* LUA_VERSION_NUM == 502 */
+ {
+ case 0:
+@@ -1284,7 +1284,7 @@ dkimf_lua_db_hook(const char *script, size_t scriptlen, const char *query,
+ io.lua_io_len = 0;
+ io.lua_io_alloc = 0;
+
+- if (lua_dump(l, dkimf_lua_writer, &io) == 0)
++ if (lua_dump(l, dkimf_lua_writer, &io, NULL) == 0)
+ {
+ *keep = (void *) io.lua_io_script;
+ *funclen = io.lua_io_len;
diff --git a/opendkim.spec b/opendkim.spec
index d58ae0b..a884fb4 100644
--- a/opendkim.spec
+++ b/opendkim.spec
@@ -5,7 +5,7 @@
Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
Name: opendkim
Version: 2.11.0
-Release: 0.9%{?dist}
+Release: 0.11%{?dist}
License: BSD and Sendmail
URL: http://%{name}.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.Alpha0.tar.gz
@@ -14,10 +14,11 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.Alpha0.tar.
# https://sourceforge.net/p/opendkim/patches/37/
# Patches rediffed and combined (both modify configure)
Patch0: %{name}.ticket35+37.patch
+Patch1: %{name}.lua_load_dump.patch
# Required for all versions
Requires: lib%{name}%{?_isa} = %{version}-%{release}
-BuildRequires: openssl-devel, libtool, pkgconfig, libbsd, libbsd-devel, opendbx-devel
+BuildRequires: openssl-devel, libtool, pkgconfig, libbsd, libbsd-devel, opendbx-devel, lua-devel
Requires(pre): shadow-utils
%if %systemd
@@ -79,10 +80,10 @@ required for developing applications against libopendkim.
%if %systemd
# Configure with options available to systemd
-%configure --with-odbx --with-db --with-libmemcached --with-openldap --enable-query_cache
+%configure --with-odbx --with-db --with-libmemcached --with-openldap --enable-query_cache --with-lua
%else
# Configure with options available to SysV
-%configure --with-odbx --with-db --with-openldap --enable-query_cache
+%configure --with-odbx --with-db --with-openldap --enable-query_cache --with-lua
%endif
# Remove rpath
@@ -484,6 +485,7 @@ exit 0
%config(noreplace) %attr(0640,%{name},%{name}) %{_sysconfdir}/%{name}/KeyTable
%config(noreplace) %attr(0640,%{name},%{name}) %{_sysconfdir}/%{name}/TrustedHosts
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+%{_bindir}/miltertest
%{_sbindir}/*
%{_mandir}/*/*
%dir %attr(-,%{name},%{name}) %{_localstatedir}/spool/%{name}
@@ -519,6 +521,13 @@ exit 0
%{_libdir}/pkgconfig/*.pc
%changelog
+* Fri Apr 24 2020 Tomas Korbar <tkorbar@redhat.com> - 2.11.0-0.11
+- Rebuilt with lua support
+- Credit: Breno Brand Fernandes brandfbb@gmail.com
+
+* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.0-0.10
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.0-0.9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild