diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index d820c84..75d1f94 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ -*.tar.gz -*.src.rpm +dictd-1.11.0.tar.gz +libmaa-1.1.0.tar.gz +/libmaa-1.3.0.tar.gz +/dictd-1.12.0.tar.gz +/dictd-1.12.1.tar.gz +/libmaa-1.3.2.tar.gz diff --git a/0001-remove-use-of-deprecated-inet_aton-and-inet_ntoa.patch b/0001-remove-use-of-deprecated-inet_aton-and-inet_ntoa.patch deleted file mode 100644 index 3acc6a7..0000000 --- a/0001-remove-use-of-deprecated-inet_aton-and-inet_ntoa.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 941a0027855ae2d55b6672a692a750a33a0d3260 Mon Sep 17 00:00:00 2001 -From: Carlos Rodriguez-Fernandez -Date: Mon, 11 Mar 2024 20:20:39 -0700 -Subject: [PATCH] remove use of deprecated inet_aton and inet_ntoa - ---- - daemon.c | 43 +++++++++++++++++++++++++++++++------------ - 1 file changed, 31 insertions(+), 12 deletions(-) - -diff --git a/daemon.c b/daemon.c -index 449caca..4d9f078 100644 ---- a/daemon.c -+++ b/daemon.c -@@ -90,6 +90,8 @@ static struct { - }; - #define COMMANDS (sizeof(commandInfo)/sizeof(commandInfo[0])) - -+#define ADDR_LEN 64 -+ - static command_t lookup_command( int argc, const char **argv ) - { - size_t i; -@@ -199,7 +201,7 @@ static int daemon_check_mask(const char *spec, const char *ip) - { - char *tmp = alloca(strlen(spec) + 1); - char *pt; -- char tstring[64], mstring[64]; -+ char tstring[ADDR_LEN], mstring[ADDR_LEN]; - struct in_addr target, mask; - int bits; - unsigned long bitmask; -@@ -216,11 +218,18 @@ static int daemon_check_mask(const char *spec, const char *ip) - return DICT_DENY; - } - -- inet_aton(ip, &target); -- inet_aton(tmp, &mask); -+ -+ if (inet_pton(AF_INET, ip, &target) < 1) { -+ log_info( ":E: Unable to parse '%s' as an IPv4 address\n", ip); -+ return DICT_DENY; -+ } -+ if (inet_pton(AF_INET, tmp, &mask) < 1) { -+ log_info( ":E: Unable to parse '%s' as an IPv4 address\n", tmp); -+ return DICT_DENY; -+ } - bits = strtol(pt, NULL, 10); -- strcpy(tstring, inet_ntoa(target)); -- strcpy(mstring, inet_ntoa(mask)); -+ inet_ntop(AF_INET, &target, tstring, ADDR_LEN); -+ inet_ntop(AF_INET, &mask, mstring, ADDR_LEN); - if (bits < 0 || bits > 32) { - log_info( ":E: Bit count (%d) out of range, denying access to %s\n", - bits, ip); -@@ -240,7 +249,7 @@ static int daemon_check_range(const char *spec, const char *ip) - { - char *tmp = alloca(strlen(spec) + 1); - char *pt; -- char tstring[64], minstring[64], maxstring[64]; -+ char tstring[ADDR_LEN], minstring[ADDR_LEN], maxstring[ADDR_LEN]; - struct in_addr target, min, max; - - strcpy(tmp, spec); -@@ -258,13 +267,23 @@ static int daemon_check_range(const char *spec, const char *ip) - log_info( ":E: Misformed range %s, denying access to %s\n", spec, ip); - return DICT_DENY; - } -+ -+ if (inet_pton(AF_INET, ip, &target) < 1) { -+ log_info( ":E: Unable to parse '%s' as an IPv4 address\n", ip); -+ return DICT_DENY; -+ } -+ if (inet_pton(AF_INET, tmp, &min) < 1) { -+ log_info( ":E: Unable to parse '%s' as an IPv4 address\n", tmp); -+ return DICT_DENY; -+ } -+ if (inet_pton(AF_INET, pt, &max) < 1) { -+ log_info( ":E: Unable to parse '%s' as an IPv4 address\n", pt); -+ return DICT_DENY; -+ } - -- inet_aton(ip, &target); -- inet_aton(tmp, &min); -- inet_aton(pt, &max); -- strcpy(tstring, inet_ntoa(target)); -- strcpy(minstring, inet_ntoa(min)); -- strcpy(maxstring, inet_ntoa(max)); -+ inet_ntop(AF_INET, &target, tstring, ADDR_LEN); -+ inet_ntop(AF_INET, &min, minstring, ADDR_LEN); -+ inet_ntop(AF_INET, &max, maxstring, ADDR_LEN); - if (ntohl(target.s_addr) >= ntohl(min.s_addr) - && ntohl(target.s_addr) <= ntohl(max.s_addr)) { - PRINTF(DBG_AUTH,("%s in range from %s to %s\n", --- -2.44.0 - diff --git a/dict.conf b/dict.conf deleted file mode 100644 index 1f0b681..0000000 --- a/dict.conf +++ /dev/null @@ -1 +0,0 @@ -server dict.org diff --git a/dictd-1.12.0-unusedvar.patch b/dictd-1.12.0-unusedvar.patch new file mode 100644 index 0000000..ab92b1c --- /dev/null +++ b/dictd-1.12.0-unusedvar.patch @@ -0,0 +1,33 @@ +diff -up dictd-1.12.0/libmaa/pr.c.unusedvar dictd-1.12.0/libmaa/pr.c +--- dictd-1.12.0/libmaa/pr.c.unusedvar 2011-07-04 13:40:12.130732584 +0200 ++++ dictd-1.12.0/libmaa/pr.c 2011-07-04 13:40:33.479732586 +0200 +@@ -386,7 +386,7 @@ int pr_filter( const char *command, + const char *inBuffer, int inLen, + char *outBuffer, int outMaxLen ) + { +- int pid; ++ __attribute__((__unused__)) int pid; + int in, out; + + pid = pr_open( command, PR_CREATE_STDIN | PR_CREATE_STDOUT, +diff -up dictd-1.12.0/libmaa/string.c.unusedvar dictd-1.12.0/libmaa/string.c +--- dictd-1.12.0/libmaa/string.c.unusedvar 2008-12-07 15:58:11.000000000 +0100 ++++ dictd-1.12.0/libmaa/string.c 2011-07-04 13:39:40.787732580 +0200 +@@ -111,7 +111,7 @@ int str_pool_iterate( + hsh_HashTable hash = p -> hash; + hsh_Position hash_pos; + void *key; +- void *datum; ++ __attribute__((__unused__)) void *datum; + + /* printf ("inside str_pool_iterate\n"); */ + +@@ -140,7 +140,7 @@ int str_pool_iterate_arg( + hsh_HashTable hash = p -> hash; + hsh_Position hash_pos; + void *key; +- void *datum; ++ __attribute__((__unused__)) void *datum; + + HSH_ITERATE (hash, hash_pos, key, datum){ + if ((*iterator) (key, arg)){ diff --git a/dictd-1.12.1-maa-bufsize.patch b/dictd-1.12.1-maa-bufsize.patch new file mode 100644 index 0000000..14dc235 --- /dev/null +++ b/dictd-1.12.1-maa-bufsize.patch @@ -0,0 +1,12 @@ +diff -up dictd-1.12.1/libmaa/log.c.size dictd-1.12.1/libmaa/log.c +--- dictd-1.12.1/libmaa/log.c.size 2018-02-13 15:13:53.441469899 +0100 ++++ dictd-1.12.1/libmaa/log.c 2018-02-13 15:18:35.743558067 +0100 +@@ -297,7 +297,7 @@ static void _log_base_va( + { + va_list ap_copy; + time_t t; +- static char buf [4096] = ""; ++ static char buf [4608] = ""; + static char buf_main [4096] = ""; + static char buf_preamble [256] = ""; + diff --git a/dictd-1.12.1-unused-return.patch b/dictd-1.12.1-unused-return.patch new file mode 100644 index 0000000..3edcb6a --- /dev/null +++ b/dictd-1.12.1-unused-return.patch @@ -0,0 +1,86 @@ +diff -purN dictd-1.12.1/dictd.c dictd-1.12.1_new/dictd.c +--- dictd-1.12.1/dictd.c 2011-01-09 17:53:27.000000000 +0100 ++++ dictd-1.12.1_new/dictd.c 2014-02-25 16:12:49.752301674 +0100 +@@ -329,6 +329,7 @@ static void xsigprocmask (int how, const + } + } + ++/* + static void block_signals (void) + { + sigset_t set; +@@ -350,6 +351,7 @@ static void unblock_signals (void) + + xsigprocmask (SIG_UNBLOCK, &set, NULL); + } ++*/ + + static void handler( int sig ) + { +@@ -1264,21 +1266,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 = "???"; + +@@ -1696,7 +1701,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/0001-Fix-C99-compatibility-issues-in-lexer-parser-integra.patch b/dictd-c99.patch similarity index 58% rename from 0001-Fix-C99-compatibility-issues-in-lexer-parser-integra.patch rename to dictd-c99.patch index bdca78f..e674948 100644 --- a/0001-Fix-C99-compatibility-issues-in-lexer-parser-integra.patch +++ b/dictd-c99.patch @@ -1,8 +1,3 @@ -From 3f72d457cc49bd52106c8bd7779d867ca7a57e0d Mon Sep 17 00:00:00 2001 -From: Florian Weimer -Date: Thu, 11 Jan 2024 08:53:25 -0700 -Subject: [PATCH] Fix C99 compatibility issues in lexer/parser integration - Consolidate all lexer/parser declarations in lexparse.h and include this file in both the generated lexers and parsers and the code that invokes them. @@ -12,23 +7,9 @@ future compilers. Submitted upstream: -Related to: - - ---- - clientparse.y | 1 + - clientscan.l | 4 +--- - lexparse.h | 8 ++++++++ - parse.c | 4 +--- - servparse.y | 1 + - servscan.l | 4 +--- - 6 files changed, 13 insertions(+), 9 deletions(-) - create mode 100644 lexparse.h - -diff --git a/clientparse.y b/clientparse.y -index f4162e6..073c85a 100644 ---- a/clientparse.y -+++ b/clientparse.y +diff -ur dictd-1.12.1.orig/clientparse.y dictd-1.12.1/clientparse.y +--- dictd-1.12.1.orig/clientparse.y 2008-12-07 17:50:05.000000000 +0100 ++++ dictd-1.12.1/clientparse.y 2023-02-02 17:24:40.745626699 +0100 @@ -20,6 +20,7 @@ %{ @@ -37,10 +18,9 @@ index f4162e6..073c85a 100644 #define YYDEBUG 1 #define YYERROR_VERBOSE -diff --git a/clientscan.l b/clientscan.l -index d47b5b8..dbcc8f6 100644 ---- a/clientscan.l -+++ b/clientscan.l +diff -ur dictd-1.12.1.orig/clientscan.l dictd-1.12.1/clientscan.l +--- dictd-1.12.1.orig/clientscan.l 2008-12-07 17:50:05.000000000 +0100 ++++ dictd-1.12.1/clientscan.l 2023-02-02 17:24:40.745626699 +0100 @@ -24,9 +24,7 @@ #include "dict.h" @@ -52,11 +32,9 @@ index d47b5b8..dbcc8f6 100644 #define RETURN(val) do { \ yylval.token.src = src_get( yyleng ); \ return val; \ -diff --git a/lexparse.h b/lexparse.h -new file mode 100644 -index 0000000..d7b1955 ---- /dev/null -+++ b/lexparse.h +diff -ur dictd-1.12.1.orig/lexparse.h dictd-1.12.1/lexparse.h +--- dictd-1.12.1.orig/lexparse.h 2023-02-02 17:26:45.585386576 +0100 ++++ dictd-1.12.1/lexparse.h 2023-02-02 17:42:35.003954718 +0100 @@ -0,0 +1,8 @@ +/* Shared prototypes for lexers and parsers. */ + @@ -66,11 +44,10 @@ index 0000000..d7b1955 +extern int yydebug; +extern FILE *yyin; +extern int yyparse( void ); -diff --git a/parse.c b/parse.c -index 1cdaf91..47c2ebc 100644 ---- a/parse.c -+++ b/parse.c -@@ -24,13 +24,11 @@ +diff -ur dictd-1.12.1.orig/parse.c dictd-1.12.1/parse.c +--- dictd-1.12.1.orig/parse.c 2008-12-07 17:50:05.000000000 +0100 ++++ dictd-1.12.1/parse.c 2023-02-02 17:31:20.149658981 +0100 +@@ -24,14 +24,11 @@ #include "dictP.h" #include "maa.h" #include "parse.h" @@ -82,13 +59,13 @@ index 1cdaf91..47c2ebc 100644 -extern int yydebug; -extern FILE *yyin; -extern int yyparse( void ); - +- /* \doc |prs_set_debug| specifies the value of |yyerror| that |prs_file| will use. */ -diff --git a/servparse.y b/servparse.y -index 4d4e0bc..ae7fb39 100644 ---- a/servparse.y -+++ b/servparse.y + +diff -ur dictd-1.12.1.orig/servparse.y dictd-1.12.1/servparse.y +--- dictd-1.12.1.orig/servparse.y 2008-12-07 17:50:05.000000000 +0100 ++++ dictd-1.12.1/servparse.y 2023-02-02 17:24:40.745626699 +0100 @@ -24,6 +24,7 @@ #include "index.h" #include "data.h" @@ -97,10 +74,9 @@ index 4d4e0bc..ae7fb39 100644 #define YYDEBUG 1 #define YYERROR_VERBOSE -diff --git a/servscan.l b/servscan.l -index 2001605..2460ea4 100644 ---- a/servscan.l -+++ b/servscan.l +diff -ur dictd-1.12.1.orig/servscan.l dictd-1.12.1/servscan.l +--- dictd-1.12.1.orig/servscan.l 2008-12-07 17:50:05.000000000 +0100 ++++ dictd-1.12.1/servscan.l 2023-02-02 17:24:40.745626699 +0100 @@ -22,9 +22,7 @@ %{ #include "dictd.h" @@ -112,6 +88,3 @@ index 2001605..2460ea4 100644 static void include_file( void ); static void include_complete( void ); YY_BUFFER_STATE orig_buffer = NULL; --- -2.43.0 - diff --git a/dictd.conf b/dictd.conf deleted file mode 100644 index dc8e906..0000000 --- a/dictd.conf +++ /dev/null @@ -1,9 +0,0 @@ -global { -} - -# Add database definitions here... - -# We stop the search here -database_exit - -# Add hidden database definitions here... diff --git a/dictd.init b/dictd.init new file mode 100644 index 0000000..91501ea --- /dev/null +++ b/dictd.init @@ -0,0 +1,100 @@ +#!/bin/sh +# +# chkconfig: - 91 9 +# description: Starts and stops the dict server +# processname: dictd +# config: /etc/dictd.conf + +### BEGIN INIT INFO +# Provides: dictd +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 1 2 4 6 +# Short-Description: start|stop|restart|try-restart|status|force-reload dictd +# Description: control dictionary server which allows clients access to +# dictionary definitions from a set of natural language dictionary databases +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + + +DICTD=/usr/sbin/dictd +DICTD_FLAGS= +LOCKFILE=/var/lock/subsys/dictd +prog=dictd + +[ -e /etc/sysconfig/dictd ] && . /etc/sysconfig/dictd + +function start +{ + unset RETVAL + if [ -x $DICTD ]; then + echo -n $"Starting $prog: " + if [ -s /etc/dictd.conf ]; then + daemon $DICTD $DICTD_FLAGS + echo + else + echo -n $"no dictionaries installed" + echo_failure + echo + RETVAL=6 + fi + else + echo "$0: cannot find $DICTD or it's not executable" + RETVAL=1 + fi + + RETVAL=${RETVAL:-$?} + [ $RETVAL -eq 0 ] && touch $LOCKFILE +} + +function stop +{ + echo -n $"Shutting down $prog: " + killproc $prog + RETVAL=$? + echo + rm -f $LOCKFILE +} + +function restart +{ + stop + start +} + +# See how we were called. +case "$1" in + start) start + ;; + stop) stop + ;; + restart | force-reload) restart + ;; + reload) + killproc $prog -HUP + RETVAL=$? + ;; + force-reload) + killproc $prog -USR1 + killproc $prog -HUP + RETVAL=$? + ;; + try-restart | condrestart ) + RETVAL=0 + test -f $LOCKFILE && restart + ;; + status) + status dictd + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|status}" + exit 1 + ;; +esac + +exit $RETVAL + diff --git a/dictd.rpmlintrc b/dictd.rpmlintrc deleted file mode 100644 index ae705c3..0000000 --- a/dictd.rpmlintrc +++ /dev/null @@ -1,2 +0,0 @@ -addFilter('.*incorrect-fsf-address.*') -addFilter('.*zero-length.*') diff --git a/dictd.spec b/dictd.spec index 71ad2ca..f25d4f5 100644 --- a/dictd.spec +++ b/dictd.spec @@ -1,38 +1,41 @@ +%if 0%{?rhel} > 6 || 0%{?fedora} >= 16 +%bcond_with fedora +%bcond_without systemd +%else +%bcond_without fedora +%bcond_with systemd +%endif %global _hardened_build 1 # Do no change username -- hardcoded in dictd.c %global username dictd %global homedir %{_datadir}/dict/dictd %global selinux_variants mls targeted +%define libmaaVersion 1.3.2 Summary: DICT protocol (RFC 2229) server and command-line client Name: dictd -Version: 1.13.3 -Release: 2%{?dist} -License: GPL-2.0-only AND GPL-2.0-or-later AND GPL-1.0-or-later AND GPL-3.0-or-later AND MIT AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain -Source0: https://github.com/cheusov/dictd/archive/%{version}/%{name}-%{version}.tar.gz +Version: 1.12.1 +Release: 33%{?dist} +License: GPL+ and zlib and MIT +Source0: http://downloads.sourceforge.net/dict/%{name}-%{version}.tar.gz Source1: dictd.service -Source2: dictd2.te -Source3: dictd.conf -Source4: dict.conf -Patch0: 0001-Fix-C99-compatibility-issues-in-lexer-parser-integra.patch -Patch1: 0001-remove-use-of-deprecated-inet_aton-and-inet_ntoa.patch +Source2: libmaa-%{libmaaVersion}.tar.gz +Source3: dictd2.te +Source4: dictd.init +Patch0: dictd-1.12.1-unused-return.patch +Patch1: dictd-1.12.1-maa-bufsize.patch +Patch2: dictd-c99.patch URL: http://www.dict.org/ -BuildRequires: flex -BuildRequires: flex-devel -Buildrequires: autoconf -BuildRequires: bison -BuildRequires: libtool -BuildRequires: libtool-ltdl-devel -BuildRequires: libmaa-devel -BuildRequires: byacc -BuildRequires: libdbi-devel -BuildRequires: zlib-devel -BuildRequires: gawk -BuildRequires: gcc -BuildRequires: pkgconfig(systemd) -BuildRequires: checkpolicy, selinux-policy-devel - +BuildRequires: flex bison libtool libtool-ltdl-devel byacc +BuildRequires: libdbi-devel, zlib-devel, gawk, gcc +%if %{with systemd} +BuildRequires: systemd +%endif +BuildRequires: checkpolicy, selinux-policy-devel +BuildRequires: make +# , /usr/share/selinux/devel/policyhelp +Requires(pre): shadow-utils %description Command-line client for the DICT protocol. The Dictionary Server @@ -42,9 +45,15 @@ language dictionary databases. %package server Summary: Server for the Dictionary Server Protocol (DICT) +%if %{with systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd +%else +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(postun): initscripts +%endif %if "%{_selinux_policy_version}" != "" Requires: selinux-policy >= %{_selinux_policy_version} %endif @@ -56,38 +65,63 @@ ftp://ftp.dict.org/pub/dict/pre/ More information can be found in the INSTALL file in this package. %prep -%autosetup -p1 - -autoreconf -fiv +%setup -q +tar xzf %{SOURCE2} +mv libmaa-%{libmaaVersion} libmaa +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 mkdir SELinux -cp -p %{SOURCE2} SELinux - -# Create a sysusers.d config file -cat >dictd.sysusers.conf < $RPM_BUILD_ROOT/%{_sysconfdir}/dictd.conf +global { + #syslog + #syslog_facility daemon +} + +# Add database definitions here... + +# We stop the search here +database_exit + +# Add hidden database definitions here... + +EOF for selinuxvariant in %{selinux_variants} do @@ -96,93 +130,69 @@ do %{buildroot}%{_datadir}/selinux/${selinuxvariant}/dictd2.pp done -install -m0644 -D dictd.sysusers.conf %{buildroot}%{_sysusersdir}/dictd.conf - %post server +%if %{with systemd} %systemd_post dictd.service +%else +if [ $1 = 1 ]; then + /sbin/chkconfig --add dictd +fi +%endif %preun server +%if %{with systemd} %systemd_preun dictd.service +%else +if [ $1 = 0 ]; then + # Stop the service (otherwise userdel will fail) + /etc/rc.d/init.d/dictd stop &>/dev/null || : + /sbin/chkconfig --del dictd +fi +%endif %postun server +%if %{with systemd} %systemd_postun_with_restart dictd.service +%else +if [ $1 -ge 1 ] ; then + /sbin/service dictd condrestart > /dev/null 2>&1 || : +fi +%endif +%pre +getent group %{username} >/dev/null || groupadd -r %{username} +getent passwd %{username} >/dev/null || \ + useradd -r -g %{username} -d %{homedir} -s /sbin/nologin \ + -c "dictd dictionary server" %{username} +exit 0 %files -%doc ANNOUNCE COPYING README doc/rfc2229.txt doc/security.doc +%doc ANNOUNCE COPYING ChangeLog README doc/rfc2229.txt doc/security.doc %doc examples/dict1.conf %{_bindir}/dict %{_mandir}/man1/dict.1* -%config(noreplace) %{_sysconfdir}/dict.conf + %files server -%doc ANNOUNCE COPYING INSTALL README doc/rfc2229.txt doc/security.doc +%doc ANNOUNCE COPYING INSTALL ChangeLog README doc/rfc2229.txt doc/security.doc %doc examples/dictd* %exclude %{_mandir}/man1/dict.1* %exclude %{_bindir}/dict -%{_bindir}/dict_lookup -%{_bindir}/dictfmt -%{_bindir}/dictfmt_index2suffix -%{_bindir}/dictfmt_index2word -%{_bindir}/dictl -%{_bindir}/dictunformat -%{_bindir}/dictzip -%{_bindir}/colorit -%{_sbindir}/dictd -%{_mandir}/man1/colorit.1* -%{_mandir}/man1/dict_lookup.1* -%{_mandir}/man1/dictfmt.1* -%{_mandir}/man1/dictfmt_index2suffix.1* -%{_mandir}/man1/dictfmt_index2word.1* -%{_mandir}/man1/dictl.1* -%{_mandir}/man1/dictunformat.1* -%{_mandir}/man1/dictzip.1* -%{_mandir}/man8/dictd.8* +%{_bindir}/* +%{_sbindir}/* +%{_mandir}/man?/* +%if %{with systemd} %attr(0644,root,root) %{_unitdir}/dictd.service -%{_sysusersdir}/dictd.conf +%else +%{_sysconfdir}/rc.d/init.d/* +%endif %{homedir} %config(noreplace) %{_sysconfdir}/dictd.conf %doc SELinux %{_datadir}/selinux/*/dictd2.pp %changelog -* Wed Jul 23 2025 Fedora Release Engineering - 1.13.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Apr 17 2025 Carlos Rodriguez-Fernandez - 1.13.3-1 -- Update to 1.13.3 - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 1.13.1-7 -- Add sysusers.d config file to allow rpm to create users/groups automatically - -* Wed Jan 29 2025 Carlos Rodriguez-Fernandez - 1.13.1-6 -- Set default client configuration to use dict.org - -* Thu Jan 16 2025 Fedora Release Engineering - 1.13.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 17 2024 Fedora Release Engineering - 1.13.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Mar 11 2024 Carlos Rodriguez-Fernandez 1.13.1-3 -- Remove use of deprecated functions - -* Sun Mar 10 2024 Miroslav Suchy 1.13.1-2 -- Correct typo in license name - -* Sat Mar 02 2024 Carlos Rodriguez-Fernandez - 1.13.1-1 -- Update to version 1.13.1 - -* Wed Jan 24 2024 Fedora Release Engineering - 1.12.1-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1.12.1-35 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 1.12.1-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - * Thu Feb 02 2023 Florian Weimer - 1.12.1-33 - Fix C99 compatibility issues in lexer/parser integration diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 5c82166..0000000 --- a/gating.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- !Policy -product_versions: - - fedora-* -decision_context: bodhi_update_push_testing -subject_type: koji_build -rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} ---- !Policy -product_versions: - - fedora-* -decision_context: bodhi_update_push_stable -subject_type: koji_build -rules: -# - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} # known issue rhbz#2268949 - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/plans/main.fmf b/plans/main.fmf deleted file mode 100644 index c1627f9..0000000 --- a/plans/main.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: Basic smoke test -discover: - how: fmf -execute: - how: tmt diff --git a/sources b/sources index e522365..4be4c3c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (dictd-1.13.3.tar.gz) = fb118a7594566a8e4e3fdff9bf79c37ed29f1f2eb3a9f380ba7c57740839b723537a0ed8864c0b425774b564f78ae50624756c3ca3a372a971002bcaca7fb934 +62696491174c22079f664830d07c0623 dictd-1.12.1.tar.gz +01dab2cde2e0a322653e45bfa63537ee libmaa-1.3.2.tar.gz diff --git a/tests/core/data/dict.conf b/tests/core/data/dict.conf deleted file mode 100644 index d2682cb..0000000 --- a/tests/core/data/dict.conf +++ /dev/null @@ -1 +0,0 @@ -server localhost diff --git a/tests/core/data/dictd.conf b/tests/core/data/dictd.conf deleted file mode 100644 index 19c56d0..0000000 --- a/tests/core/data/dictd.conf +++ /dev/null @@ -1,11 +0,0 @@ -global { - #syslog - #syslog_facility daemon -} - -database hello { data "/usr/share/dict/dictd/hello.dict" - index "/usr/share/dict/dictd/hello.index" } - -database_exit - -# Add hidden database definitions here... diff --git a/tests/core/data/hello.dict b/tests/core/data/hello.dict deleted file mode 100644 index bc873e4..0000000 --- a/tests/core/data/hello.dict +++ /dev/null @@ -1,25 +0,0 @@ - -The original data is available from: - unknown - -The original data was distributed with the notice shown below. No -additional restrictions are claimed. Please redistribute this changed -version under the same conditions and restriction that apply to the -original version. - -Привет - hello1 -Прывітанне - hello2 -Привіт - hello4 -Hello - hello3 -haló - hello5 -dobrý den - hello6 -unknown -00-database-short - unknown - abdehlnoróýавеинпртыі diff --git a/tests/core/data/hello.index b/tests/core/data/hello.index deleted file mode 100644 index 3e62622..0000000 --- a/tests/core/data/hello.index +++ /dev/null @@ -1,11 +0,0 @@ -00databasealphabet G9 j -00databaseinfo B ET -00databaseshort Ge f -00databaseurl GW I -00databaseutf8 A B -dobrý den GB V -haló Fx Q -hello Fh Q -привет EU X -привіт FK X -прывітанне Er f diff --git a/tests/core/main.fmf b/tests/core/main.fmf deleted file mode 100644 index 03de3c5..0000000 --- a/tests/core/main.fmf +++ /dev/null @@ -1 +0,0 @@ -summary: dict and dictd smoke test diff --git a/tests/core/test.sh b/tests/core/test.sh deleted file mode 100755 index c96411c..0000000 --- a/tests/core/test.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -rlJournalStart - rlPhaseStartSetup - rlRun "cp ./data/hello.dict /usr/share/dict/dictd/" 0 "Copying hello dict" - rlRun "cp ./data/hello.index /usr/share/dict/dictd/" 0 "Copying hello index" - rlFileBackup --missing-ok "/etc/dictd.conf" - rlFileBackup --missing-ok "/etc/dict.conf" - rlRun "cp ./data/dictd.conf /etc/dictd.conf" 0 "Setting up hello db" - rlRun "cp ./data/dict.conf /etc/dict.conf" 0 "Setting up client" - rlServiceStop "dictd.service" - rlServiceStart "dictd.service" - rlPhaseEnd - - rlPhaseStartTest - rlRun -s "dict -I" 0 "Validate connectivity to local server" - rlAssertGrep "dictd" "$rlRun_LOG" - rlAssertGrep "up" "$rlRun_LOG" - rlAssertGrep "hello" "$rlRun_LOG" - rlPhaseEnd - - rlPhaseStartTest - rlRun -s "dict haló" 0 "Search haló" - rlAssertGrep "hello5" "$rlRun_LOG" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "rm -f /usr/share/dict/dictd/hello.*" - rlFileRestore "/etc/dictd.conf" - rlFileRestore "/etc/dict.conf" - rlServiceRestore "dictd.service" - rlPhaseEnd -rlJournalEnd diff --git a/tests/main.fmf b/tests/main.fmf deleted file mode 100644 index 034a796..0000000 --- a/tests/main.fmf +++ /dev/null @@ -1,3 +0,0 @@ -summary: dict and dictd smoke test -test: ./test.sh -framework: beakerlib diff --git a/tests/manpages/main.fmf b/tests/manpages/main.fmf deleted file mode 100644 index 3ee823e..0000000 --- a/tests/manpages/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -summary: verify manpages -require: [man-db] diff --git a/tests/manpages/test.sh b/tests/manpages/test.sh deleted file mode 100755 index 91f3fa9..0000000 --- a/tests/manpages/test.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -expected_manpages=( - 'dict(1)' - 'dictd(8)' - 'dictzip(1)' - 'colorit(1)' - 'dict_lookup(1)' - 'dictfmt(1)' - 'dictfmt_index2suffix(1)' - 'dictfmt_index2word(1)' - 'dictl(1)' - 'dictunformat(1)' -) - -rlJournalStart - for page in "${expected_manpages[@]}"; do - rlPhaseStartTest "test ${page}" - rlRun "man --pager=cat '${page}'" - rlPhaseEnd - done -rlJournalEnd diff --git a/tests/selinux/main.fmf b/tests/selinux/main.fmf deleted file mode 100644 index d625b4a..0000000 --- a/tests/selinux/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -summary: verify selinux configuration -require: [audit] \ No newline at end of file diff --git a/tests/selinux/test.sh b/tests/selinux/test.sh deleted file mode 100755 index d104512..0000000 --- a/tests/selinux/test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -rlJournalStart - rlPhaseStartSetup - rlServiceStop "dictd.service" - rlServiceStart "dictd.service" - rlPhaseEnd - - rlPhaseStartTest - rlRun "ausearch -m AVC -c dictd" 1 "Should find no audit for dictd" - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "dictd.service" - rlPhaseEnd -rlJournalEnd