forked from pool/dictd
Still WIP gh#cheusov/dictd#21 still not fixed.
Update to version 1.13.1+git.1730572217.cccab00: * dictd: listen to ipv6 and ipv4 by default * remove use of deprecated inet_aton and inet_ntoa * dictd: install dictd*.conf files to ${DATADIR}/examples/dictd by default * Fix problems with DICT_CONFIG_PATH and other defined came from Makefile * dict/Makefile: do not copy man page to ${BINDIR} :-) * dict/Makefile: formatting * dict: install samples dict.conf and dict2.conf to ${EGDIR} * Move examples/dict1.conf to dict/
This commit is contained in:
parent
c0d0a8c0c7
commit
a2add63921
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.osc
|
||||
dictd*/
|
||||
|
15
_service
Normal file
15
_service
Normal file
@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/cheusov/dictd.git</param>
|
||||
<param name="versionprefix">1.13.1+git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="changesauthor">mcepl@cepl.eu</param>
|
||||
</service>
|
||||
<service name="tar" mode="buildtime"/>
|
||||
<service name="recompress" mode="buildtime">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual"/>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/cheusov/dictd.git</param>
|
||||
<param name="changesrevision">cccab00fe9eea071f35474c0f7d1c95daa5eeb22</param></service></servicedata>
|
BIN
dictd-1.13.1+git.1730572217.cccab00.obscpio
(Stored with Git LFS)
Normal file
BIN
dictd-1.13.1+git.1730572217.cccab00.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a00bfa802354217d355bef2846b69bf81628af9a137651da74a8366ef55ecc16
|
||||
size 338581
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 02 21:08:57 UTC 2024 - mcepl@cepl.eu
|
||||
|
||||
- Update to version 1.13.1+git.1730572217.cccab00:
|
||||
* dictd: listen to ipv6 and ipv4 by default
|
||||
* remove use of deprecated inet_aton and inet_ntoa
|
||||
* dictd: install dictd*.conf files to ${DATADIR}/examples/dictd by default
|
||||
* Fix problems with DICT_CONFIG_PATH and other defined came from Makefile
|
||||
* dict/Makefile: do not copy man page to ${BINDIR} :-)
|
||||
* dict/Makefile: formatting
|
||||
* dict: install samples dict.conf and dict2.conf to ${EGDIR}
|
||||
* Move examples/dict1.conf to dict/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 7 18:18:01 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
name: dictd
|
||||
version: 1.12.1.git.1520674574.9a2f53e
|
||||
mtime: 1520674574
|
||||
commit: 9a2f53ec26ec7eb1880437f1cafae6291634c98d
|
||||
|
||||
version: 1.13.1+git.1730572217.cccab00
|
||||
mtime: 1730572217
|
||||
commit: cccab00fe9eea071f35474c0f7d1c95daa5eeb22
|
||||
|
32
dictd.spec
32
dictd.spec
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: dictd
|
||||
Version: 1.13.1
|
||||
Version: 1.13.1+git.1730572217.cccab00
|
||||
Release: 0
|
||||
Summary: DICT protocol (RFC 2229) server and command-line client
|
||||
License: BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
|
||||
@ -27,14 +27,20 @@ Source0: https://github.com/cheusov/dictd/archive/%{version}.tar.gz#/dict
|
||||
Source1: colorit.conf
|
||||
Source2: dictd.service
|
||||
Source99: dictd-rpmlintrc
|
||||
Patch0: dictd-1.12.1-unused-return.patch
|
||||
BuildRequires: autoconf
|
||||
# Patch0: dictd-1.12.1-unused-return.patch
|
||||
# PATCH-FIX-UPSTREAM gcc-14.patch bsc#[0-9]+ mcepl@suse.com
|
||||
# Inspiration from the thread https://lists.gnu.org/r/bug-bison/2022-01/msg00009.html
|
||||
# and https://lists.gnu.org/r/bug-bison/2022-01/msg00012.html
|
||||
# Patch published upstream as gh#cheusov/dictd!26
|
||||
Patch1: gcc-14.patch
|
||||
BuildRequires: mk-configure
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: gawk
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libdbi-devel
|
||||
BuildRequires: libmaa-devel
|
||||
BuildRequires: judy-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: zlib-devel
|
||||
@ -53,10 +59,8 @@ execute `dict grunt` at a command line. See the man pages of dict and
|
||||
dictd for details.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
%autosetup -p1
|
||||
|
||||
autoreconf -fv
|
||||
|
||||
%package devel
|
||||
Summary: Development files for dictd
|
||||
@ -75,12 +79,22 @@ This package contains development files for the dictd package.
|
||||
|
||||
%build
|
||||
export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC"
|
||||
%configure --enable-dictorg --with-plugin-dbi
|
||||
export USE_PLUGIN=1
|
||||
export PREFIX="%{_prefix}"
|
||||
export MANDIR="%{_mandir}"
|
||||
export SYSCONFDIR="%{_sysconfdir}"
|
||||
export CC="%{__cc}"
|
||||
export DESTDIR="%{buildroot}"
|
||||
export COPTS="%{optflags} -fPIC"
|
||||
mkc_compiler_settings
|
||||
mkcmake all
|
||||
# %%configure --enable-dictorg --with-plugin-dbi
|
||||
# --disable-plugin
|
||||
%make_build
|
||||
# %%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
# %%make_install
|
||||
mkcmake install
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/colorit.conf
|
||||
cat <<EOF >%{buildroot}/%{_sysconfdir}/dictd.conf
|
||||
global {
|
||||
|
107
gcc-14.patch
Normal file
107
gcc-14.patch
Normal file
@ -0,0 +1,107 @@
|
||||
---
|
||||
dict/clientparse.y | 3 +++
|
||||
dictd/dictd.c | 4 ++--
|
||||
dictd/plugin.c | 5 +++--
|
||||
dictd/plugin.h | 4 ++--
|
||||
dictd/servparse.y | 4 ++++
|
||||
dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c | 2 ++
|
||||
6 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/dict/clientparse.y
|
||||
+++ b/dict/clientparse.y
|
||||
@@ -29,6 +29,9 @@ extern void yyerror(const char *);
|
||||
#define YYERROR_VERBOSE
|
||||
|
||||
static dictServer *s;
|
||||
+
|
||||
+int yylex (void);
|
||||
+void yyerror (const char *);
|
||||
%}
|
||||
|
||||
%union {
|
||||
--- a/dictd/dictd.c
|
||||
+++ b/dictd/dictd.c
|
||||
@@ -767,7 +767,7 @@ static int init_mime_db_list (const void
|
||||
static int init_plugin( const void *datum )
|
||||
{
|
||||
#ifdef USE_PLUGIN
|
||||
- dictDatabase *db = (dictDatabase *)datum;
|
||||
+ const dictDatabase *db = (const dictDatabase *)datum;
|
||||
dict_plugin_init(db);
|
||||
#endif
|
||||
|
||||
@@ -1002,7 +1002,7 @@ static int init_database_short (const vo
|
||||
static int close_plugin(const void *datum)
|
||||
{
|
||||
#ifdef USE_PLUGIN
|
||||
- dictDatabase *db = (dictDatabase *)datum;
|
||||
+ const dictDatabase *db = (const dictDatabase *)datum;
|
||||
dict_plugin_destroy (db);
|
||||
#endif
|
||||
|
||||
--- a/dictd/plugin.c
|
||||
+++ b/dictd/plugin.c
|
||||
@@ -16,6 +16,7 @@
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
+#include "common.h"
|
||||
#include "dictd.h"
|
||||
#include "plugin.h"
|
||||
#include "strategy.h"
|
||||
@@ -555,7 +556,7 @@ static dictPlugin *create_plugin (
|
||||
return plugin;
|
||||
}
|
||||
|
||||
-int dict_plugin_init(dictDatabase *db)
|
||||
+int dict_plugin_init(const dictDatabase *db)
|
||||
{
|
||||
int ret = 0;
|
||||
lst_List list;
|
||||
@@ -604,7 +605,7 @@ int dict_plugin_init(dictDatabase *db)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void dict_plugin_destroy ( dictDatabase *db )
|
||||
+void dict_plugin_destroy (const dictDatabase *db )
|
||||
{
|
||||
int ret;
|
||||
|
||||
--- a/dictd/plugin.h
|
||||
+++ b/dictd/plugin.h
|
||||
@@ -24,9 +24,9 @@
|
||||
#include "dictdplugin.h"
|
||||
|
||||
/* initialize the plugin associated with db*/
|
||||
-extern int dict_plugin_init (dictDatabase *db);
|
||||
+extern int dict_plugin_init (const dictDatabase *db);
|
||||
/* destroy the plugin associated with db*/
|
||||
-extern void dict_plugin_destroy (dictDatabase *db);
|
||||
+extern void dict_plugin_destroy (const dictDatabase *db);
|
||||
|
||||
/* search */
|
||||
extern int dict_search_plugin (
|
||||
--- a/dictd/servparse.y
|
||||
+++ b/dictd/servparse.y
|
||||
@@ -57,6 +57,10 @@ static int string2bool (const char *str)
|
||||
src_parse_error( stderr, s.src, #field "already set" ); \
|
||||
db->field = t.string; \
|
||||
} while(0);
|
||||
+
|
||||
+int yylex (void);
|
||||
+void yyerror (const char *);
|
||||
+
|
||||
%}
|
||||
|
||||
%union {
|
||||
--- a/dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c
|
||||
+++ b/dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <dbi/dbi.h>
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <assert.h>
|
||||
|
||||
#define BUFSIZE 4096
|
||||
|
Loading…
Reference in New Issue
Block a user