#3 perform serveral cleanups and update to 1.13.1
Merged 3 months ago by carlosrodrifernandez. Opened 5 months ago by carlosrodrifernandez.
rpms/ carlosrodrifernandez/dictd rawhide  into  rawhide

file added
+1
@@ -0,0 +1,1 @@ 

+ 1

file modified
+2 -6
@@ -1,6 +1,2 @@ 

- 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

+ *.tar.gz

+ *.src.rpm

@@ -1,3 +1,8 @@ 

+ From 3f72d457cc49bd52106c8bd7779d867ca7a57e0d Mon Sep 17 00:00:00 2001

+ From: Florian Weimer <fweimer@redhat.com>

+ 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.
@@ -7,9 +12,23 @@ 

  

  Submitted upstream: <https://sourceforge.net/p/dict/mailman/message/37772919/>

  

- 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

+ Related to:

+   <https://fedoraproject.org/wiki/Changes/PortingToModernC>

+   <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

+ ---

+  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

  @@ -20,6 +20,7 @@

   

   %{
@@ -18,9 +37,10 @@ 

   #define YYDEBUG 1

   #define YYERROR_VERBOSE

   

- 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

+ diff --git a/clientscan.l b/clientscan.l

+ index d47b5b8..dbcc8f6 100644

+ --- a/clientscan.l

+ +++ b/clientscan.l

  @@ -24,9 +24,7 @@

   

   #include "dict.h"
@@ -32,9 +52,11 @@ 

   #define RETURN(val) do {                  \

      yylval.token.src = src_get( yyleng );  \

      return val;                            \

- 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

+ diff --git a/lexparse.h b/lexparse.h

+ new file mode 100644

+ index 0000000..d7b1955

+ --- /dev/null

+ +++ b/lexparse.h

  @@ -0,0 +1,8 @@

  +/* Shared prototypes for lexers and parsers. */

  +
@@ -44,10 +66,11 @@ 

  +extern int yydebug;

  +extern FILE *yyin;

  +extern int yyparse( void );

- 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 @@

+ diff --git a/parse.c b/parse.c

+ index 1cdaf91..47c2ebc 100644

+ --- a/parse.c

+ +++ b/parse.c

+ @@ -24,13 +24,11 @@

   #include "dictP.h"

   #include "maa.h"

   #include "parse.h"
@@ -59,13 +82,13 @@ 

  -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 -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

+ diff --git a/servparse.y b/servparse.y

+ index 4d4e0bc..ae7fb39 100644

+ --- a/servparse.y

+ +++ b/servparse.y

  @@ -24,6 +24,7 @@

   #include "index.h"

   #include "data.h"
@@ -74,9 +97,10 @@ 

   

   #define YYDEBUG 1

   #define YYERROR_VERBOSE

- 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

+ diff --git a/servscan.l b/servscan.l

+ index 2001605..2460ea4 100644

+ --- a/servscan.l

+ +++ b/servscan.l

  @@ -22,9 +22,7 @@

   %{

   #include "dictd.h"
@@ -88,3 +112,6 @@ 

   static void include_file( void );

   static void include_complete( void );

   YY_BUFFER_STATE orig_buffer = NULL;

+ -- 

+ 2.43.0

+ 

@@ -1,33 +0,0 @@ 

- 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)){

@@ -1,12 +0,0 @@ 

- 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] = "";

-  

@@ -1,86 +0,0 @@ 

- 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) */

file added
+9
@@ -0,0 +1,9 @@ 

+ global {

+ }

+ 

+ # Add database definitions here...

+ 

+ # We stop the search here

+ database_exit

+ 

+ # Add hidden database definitions here...

file removed
-100
@@ -1,100 +0,0 @@ 

- #!/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

- 

file modified
+57 -106
@@ -1,41 +1,36 @@ 

- %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.12.1

- Release:   36%{?dist}

- License:   GPL+ and zlib and MIT

- Source0:   http://downloads.sourceforge.net/dict/%{name}-%{version}.tar.gz

+ Version:   1.13.1

+ Release:   1%{?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-PublicDomain

+ Source0:   https://github.com/cheusov/dictd/archive/%{version}/%{name}-%{version}.tar.gz

  Source1:   dictd.service

- 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

+ Source2:   dictd2.te

+ Source3:   dictd.conf

+ Patch0:    0001-Fix-C99-compatibility-issues-in-lexer-parser-integra.patch

  URL:       http://www.dict.org/

  

- 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

+ BuildRequires: flex

+ 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

+ 

+ Requires(pre): shadow-utils

  

  %description

  Command-line client for the DICT protocol.  The Dictionary Server
@@ -45,15 +40,9 @@ 

  

  %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
@@ -65,63 +54,32 @@ 

  More information can be found in the INSTALL file in this package.

  

  %prep

- %setup -q

- tar xzf %{SOURCE2}

- mv libmaa-%{libmaaVersion} libmaa

- %patch0 -p1

- %patch1 -p1

- %patch2 -p1

+ %autosetup -p1

+ 

+ autoreconf -fv

  mkdir SELinux

- cp -p %{SOURCE3} SELinux

+ cp -p %{SOURCE2} SELinux

  

  %build

- export CFLAGS="$RPM_OPT_FLAGS -fPIC"

- export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="$RPM_OPT_FLAGS -fPIC"

- pushd libmaa

- # Required for aarch64 support:

- %configure

- make %{?_smp_mflags}

- popd

- 

- cd SELinux

+ pushd SELinux

  for selinuxvariant in %{selinux_variants}

  do

    make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile

    mv dictd2.pp dictd2.pp.${selinuxvariant}

    make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean

  done

- cd -

+ popd

  

- export LDFLAGS="%{?__global_ldflags} -Llibmaa/.libs" CPPFLAGS="-Ilibmaa $RPM_OPT_FLAGS -fPIC"

  %configure --enable-dictorg --disable-plugin

  make %{?_smp_mflags}

  

  %install

- make install DESTDIR=$RPM_BUILD_ROOT

- mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}

- mkdir -p $RPM_BUILD_ROOT%{homedir}

- %if %{with systemd}

- mkdir -p $RPM_BUILD_ROOT%{_unitdir}

- install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/dictd.service

- %else

- mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d

- install -m 755 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/dictd

- %endif

- 

- cat <<EOF > $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

+ %make_install

+ mkdir -p %{buildroot}%{homedir}

+ mkdir -p %{buildroot}%{_unitdir}

+ install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/dictd.service

+ mkdir -p %{buildroot}%{_sysconfdir}

+ install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dictd.conf

  

  for selinuxvariant in %{selinux_variants}

  do
@@ -132,33 +90,13 @@ 

  

  

  %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}
@@ -168,31 +106,44 @@ 

  exit 0

  

  %files

- %doc ANNOUNCE COPYING ChangeLog README doc/rfc2229.txt doc/security.doc

+ %doc ANNOUNCE COPYING README doc/rfc2229.txt doc/security.doc

  %doc examples/dict1.conf

  %{_bindir}/dict

  %{_mandir}/man1/dict.1*

  

- 

  %files server

- %doc ANNOUNCE COPYING INSTALL ChangeLog README doc/rfc2229.txt doc/security.doc

+ %doc ANNOUNCE COPYING INSTALL README doc/rfc2229.txt doc/security.doc

  %doc examples/dictd*

  %exclude %{_mandir}/man1/dict.1*

  %exclude %{_bindir}/dict

- %{_bindir}/*

- %{_sbindir}/*

- %{_mandir}/man?/*

- %if %{with systemd}

+ %{_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*

  %attr(0644,root,root) %{_unitdir}/dictd.service

- %else

- %{_sysconfdir}/rc.d/init.d/*

- %endif

  %{homedir}

  %config(noreplace) %{_sysconfdir}/dictd.conf

  %doc SELinux

  %{_datadir}/selinux/*/dictd2.pp

  

  %changelog

+ * Sat Mar 02 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 1.13.1-1

+ - Update to version 1.13.1

+ 

  * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.1-36

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

  

file added
+19
@@ -0,0 +1,19 @@ 

+ --- !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}

+   - !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}

file added
+5
@@ -0,0 +1,5 @@ 

+ summary: Basic smoke test

+ discover:

+     how: fmf

+ execute:

+     how: tmt

@@ -0,0 +1,1 @@ 

+ server localhost

@@ -0,0 +1,11 @@ 

+ 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...

@@ -0,0 +1,25 @@ 

+ 

+ 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óýавеинпртыі

@@ -0,0 +1,11 @@ 

+ 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

file added
+1
@@ -0,0 +1,1 @@ 

+ summary: dict and dictd smoke test

file added
+35
@@ -0,0 +1,35 @@ 

+ #!/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

file added
+3
@@ -0,0 +1,3 @@ 

+ summary: dict and dictd smoke test

+ test: ./test.sh

+ framework: beakerlib

@@ -0,0 +1,2 @@ 

+ summary: verify manpages

+ require: [man-db]

@@ -0,0 +1,23 @@ 

+ #!/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

@@ -0,0 +1,2 @@ 

+ summary: verify selinux configuration

+ require: [audit] 

\ No newline at end of file

@@ -0,0 +1,18 @@ 

+ #!/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