diff --git a/.gitignore b/.gitignore index 57affb6..a239776 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .osc +/dictd/ +/dictd-*+git.*/ diff --git a/FTBFS-servparse.patch b/FTBFS-servparse.patch new file mode 100644 index 0000000..ff846d5 --- /dev/null +++ b/FTBFS-servparse.patch @@ -0,0 +1,80 @@ +--- + dictd/dictd.c | 4 ++-- + dictd/plugin.c | 5 +++-- + dictd/plugin.h | 4 ++-- + dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c | 2 ++ + 4 files changed, 9 insertions(+), 6 deletions(-) + +--- a/dictd/dictd.c ++++ b/dictd/dictd.c +@@ -766,7 +766,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 + +@@ -1001,7 +1001,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/dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c ++++ b/dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c +@@ -27,6 +27,8 @@ + #include + + #include ++#include ++#include + + #define BUFSIZE 4096 + diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..9bfe3dc --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1710531037 +commit: c0d0a8c0c724fd03940c87631cf5f31a9e44a88acd66db9b855d739332c20ce5 +url: https://src.opensuse.org/pool/dictd +revision: factory diff --git a/_service b/_service new file mode 100644 index 0000000..12d4a0e --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + 1.13.1+git + https://github.com/cheusov/dictd.git + git + .git* + enable + mcepl@cepl.eu + + + + *.tar + gz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..9fcd06f --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/cheusov/dictd.git + c480a4c25f5a24f77f438690db4084cbc4d96bfa \ No newline at end of file diff --git a/dictd-1.12.1-unused-return.patch b/dictd-1.12.1-unused-return.patch deleted file mode 100644 index 8df4c7f..0000000 --- a/dictd-1.12.1-unused-return.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- a/dictd.c -+++ b/dictd.c -@@ -332,6 +332,7 @@ static void xsigprocmask (int how, const - } - } - -+/* - static void block_signals (void) - { - sigset_t set; -@@ -353,6 +354,7 @@ static void unblock_signals (void) - - xsigprocmask (SIG_UNBLOCK, &set, NULL); - } -+*/ - - static void handler( int sig ) - { -@@ -1266,21 +1268,22 @@ static void release_root_privileges( voi - * -- Bob Hilliard - */ - { -+ int unused __attribute__((unused)); - if (geteuid() == 0) { - struct passwd *pwd; - - if ((pwd = getpwnam("dictd"))) { -- setgid(pwd->pw_gid); -+ unused = setgid(pwd->pw_gid); - initgroups("dictd",pwd->pw_gid); -- setuid(pwd->pw_uid); -+ unused = setuid(pwd->pw_uid); - } else if ((pwd = getpwnam("nobody"))) { -- setgid(pwd->pw_gid); -+ unused = setgid(pwd->pw_gid); - initgroups("nobody",pwd->pw_gid); -- setuid(pwd->pw_uid); -+ unused = setuid(pwd->pw_uid); - } else { -- setgid(GID_NOGROUP); -+ unused = setgid(GID_NOGROUP); - initgroups("nobody", GID_NOGROUP); -- setuid(UID_NOBODY); -+ unused = setuid(UID_NOBODY); - } - } - } -@@ -1464,6 +1467,7 @@ static void pid_file_write () - static void reopen_012 (void) - { - int fd = open ("/dev/null", O_RDWR); -+ int unused __attribute__((unused)); - if (fd == -1) - err_fatal_errno (__func__, ":E: can't open /dev/null"); - -@@ -1471,9 +1475,9 @@ static void reopen_012 (void) - close (1); - close (2); - -- dup (fd); -- dup (fd); -- dup (fd); -+ unused = dup (fd); -+ unused = dup (fd); -+ unused = dup (fd); - } - - int main (int argc, char **argv, char **envp) -@@ -1489,6 +1493,7 @@ int main (int argc, char **argv, char ** - int i; - - int errno_accept = 0; -+ int unused __attribute__((unused)); - - const char * default_strategy_arg = "???"; - -@@ -1707,7 +1712,7 @@ int main (int argc, char **argv, char ** - - if (detach){ - /* become a daemon */ -- daemon (0, 1); -+ unused = daemon (0, 1); - reopen_012 (); - - /* after fork from daemon(3) */ diff --git a/dictd-1.13.1+git.1714073710.c480a4c.obscpio b/dictd-1.13.1+git.1714073710.c480a4c.obscpio new file mode 100644 index 0000000..0acfbf8 --- /dev/null +++ b/dictd-1.13.1+git.1714073710.c480a4c.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fd4215cab7a46b3607ec8aa3eee60ff5d8b1fb37d88014a97da514bf8bc9a9e +size 1890828 diff --git a/dictd-1.13.1.tar.gz b/dictd-1.13.1.tar.gz deleted file mode 100644 index 9936e29..0000000 --- a/dictd-1.13.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a00bfa802354217d355bef2846b69bf81628af9a137651da74a8366ef55ecc16 -size 338581 diff --git a/dictd.changes b/dictd.changes index 09b8b47..52b67a2 100644 --- a/dictd.changes +++ b/dictd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu May 09 12:55:59 UTC 2024 - mcepl@cepl.eu + +- Update to version 1.13.1+git.1714073710.c480a4c: + * 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/ + * Rename makefile to Makefile + ------------------------------------------------------------------- Thu Mar 7 18:18:01 UTC 2024 - Matej Cepl diff --git a/dictd.obsinfo b/dictd.obsinfo index 181e1f8..df7d5af 100644 --- a/dictd.obsinfo +++ b/dictd.obsinfo @@ -1,5 +1,4 @@ name: dictd -version: 1.12.1.git.1520674574.9a2f53e -mtime: 1520674574 -commit: 9a2f53ec26ec7eb1880437f1cafae6291634c98d - +version: 1.13.1+git.1714073710.c480a4c +mtime: 1714073710 +commit: c480a4c25f5a24f77f438690db4084cbc4d96bfa diff --git a/dictd.spec b/dictd.spec index 127751e..0b57332 100644 --- a/dictd.spec +++ b/dictd.spec @@ -17,25 +17,30 @@ Name: dictd -Version: 1.13.1 +Version: 1.13.1+git.1714073710.c480a4c 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 Group: Productivity/Office/Dictionary URL: https://github.com/cheusov/dictd -Source0: https://github.com/cheusov/dictd/archive/%{version}.tar.gz#/dictd-%{version}.tar.gz +# Source0: https://github.com/cheusov/dictd/archive/%%{version}.tar.gz#/dictd-%%{version}.tar.gz +Source0: dictd-%{version}.tar.gz Source1: colorit.conf Source2: dictd.service Source99: dictd-rpmlintrc -Patch0: dictd-1.12.1-unused-return.patch +# PATCH-FIX-UPSTREAM FTBFS-servparse.patch gh#cheusov/dictd#21 mcepl@suse.com +# remove warnings leading to build failures +Patch0: FTBFS-servparse.patch BuildRequires: autoconf BuildRequires: bison BuildRequires: flex BuildRequires: gawk BuildRequires: gcc +BuildRequires: judy-devel BuildRequires: libdbi-devel BuildRequires: libmaa-devel BuildRequires: libtool +BuildRequires: mk-configure BuildRequires: pkgconfig BuildRequires: zlib-devel BuildRequires: pkgconfig(systemd) @@ -56,8 +61,6 @@ dictd for details. %setup -q %autopatch -p1 -autoreconf -fv - %package devel Summary: Development files for dictd Group: Development/Languages/C and C++ @@ -75,12 +78,22 @@ This package contains development files for the dictd package. %build export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC" -%configure --enable-dictorg --with-plugin-dbi -# --disable-plugin -%make_build +export PREFIX=%{_prefix} +export MANDIR=%{_mandir} +export SYSCONFDIR=%{_sysconfdir} +export DESTDIR=%{buildroot} +export COPTS="${CPPFLAGS}" +export USE_PLUGIN=1 +mkc_compiler_settings +mkcmake all %install -%make_install +export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC" +export PREFIX=%{_prefix} +export MANDIR=%{_mandir} +export SYSCONFDIR=%{_sysconfdir} +export DESTDIR=%{buildroot} +mkcmake install install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/colorit.conf cat <%{buildroot}/%{_sysconfdir}/dictd.conf global { @@ -101,14 +114,14 @@ install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/dictd.service ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcdictd -# Makefile doesn't work correctly with libdir -if [ "x%{_libdir}" != "x%{_libexecdir}" ] ; then - mkdir -p %{buildroot}%{_libdir}/ - install -p -v -m 0755 %{buildroot}%{_libexecdir}/dictdplugin* \ - %{buildroot}%{_libdir}/ - rm -rv %{buildroot}%{_libexecdir} -fi -rm -fv %{buildroot}%{_libdir}/*.{la,a} +# # Makefile doesn't work correctly with libdir +# if [ "x%%{_libdir}" != "x%%{_libexecdir}" ] ; then +# mkdir -p %%{buildroot}%%{_libdir}/ +# install -p -v -m 0755 %%{buildroot}%%{_libexecdir}/dictdplugin* \ +# %%{buildroot}%%{_libdir}/ +# rm -rv %%{buildroot}%%{_libexecdir} +# fi +# rm -fv %%{buildroot}%%{_libdir}/*.{la,a} %pre %service_add_pre dictd.service @@ -124,9 +137,13 @@ chmod 644 %{_localstatedir}/log/dictd %postun %service_del_postun dictd.service +tumbleweed-pkg:dictd-1.13.1+git.1714073710.c480a4c $ ls doc +ANNOUNCE COPYING dicf.ms INITSCRIPT INSTALL.pod Makefile.in NEWS rfc.ms rfc.sh rfc2229.txt security.doc toc.ms TODO +tumbleweed-pkg:dictd-1.13.1+git.1714073710.c480a4c $ + %files -%license COPYING -%doc ANNOUNCE NEWS README example* +%license doc/COPYING +%doc doc/ANNOUNCE doc/NEWS README.pod %doc doc/dicf.ms doc/rfc.ms doc/rfc2229.txt doc/security.doc %{_bindir}/dict* %{_bindir}/colorit