Hello community, here is the log from the commit of package fortune for openSUSE:Factory checked in at 2019-06-19 20:58:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fortune (Old) and /work/SRC/openSUSE:Factory/.fortune.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fortune" Wed Jun 19 20:58:11 2019 rev:24 rq:704683 version:2.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/fortune/fortune.changes 2018-01-13 21:47:41.301960486 +0100 +++ /work/SRC/openSUSE:Factory/.fortune.new.4811/fortune.changes 2019-06-19 20:58:14.769972800 +0200 @@ -1,0 +2,11 @@ +Mon May 20 13:15:15 UTC 2019 - Marketa Calabkova <[email protected]> + +- Update to version 2.6.2 + * Debian patches merged upstream. + * Various other bugfixes (typos, memory leaks and so on). +- Dropped obsolete Debian patches +- Reapplied patch fortune-no-recode.patch + * Now it also avoids bsc#1124855. +- Reapplied patch move-debian-suse.diff --> fortune-no-games.patch + +------------------------------------------------------------------- Old: ---- fortune-mod_1.99.1-4.diff.gz fortune-mod_1.99.1.orig.tar.gz move-debian-suse.diff New: ---- fortune-mod-2.6.2.tar.gz fortune-no-games.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fortune.spec ++++++ --- /var/tmp/diff_new_pack.FGAgmE/_old 2019-06-19 20:58:15.673973609 +0200 +++ /var/tmp/diff_new_pack.FGAgmE/_new 2019-06-19 20:58:15.673973609 +0200 @@ -1,7 +1,7 @@ # # spec file for package fortune # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,25 +12,26 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -Url: ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune/ +%define CookieDir share/fortune Name: fortune -Version: 1.99.1 +Version: 2.6.2 Release: 0 Summary: Random Saying -# let's treat debian as upstream, they take a lot of care +# fortune is alive! License: BSD-3-Clause Group: Amusements/Toys/Other -Source: http://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_%{version}.orig.tar.gz -Patch0: http://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_1.99.1-4.diff.gz -# suse specifics -Patch1: move-debian-suse.diff -Patch2: fortune-no-recode.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune/ +Source: https://github.com/shlomif/fortune-mod/archive/fortune-mod-%{version}.tar.gz +Patch0: fortune-no-recode.patch +Patch1: fortune-no-games.patch +BuildRequires: cmake >= 3 +BuildRequires: gcc-c++ +BuildRequires: shlomif-cmake-modules %description Fortune displays a random text string from a set of files in a certain @@ -40,24 +41,23 @@ uncomment the respective lines in the user's .profile. %prep -%setup -n %name-mod-%version +%setup -q -n %{name}-mod-%{name}-mod-%{version}/fortune-mod %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build -make all %{?_smp_mflags} CC="%__cc" +%cmake +%cmake_build %install -make prefix="$RPM_BUILD_ROOT" install -sed -i 's!%{buildroot}!!' %{buildroot}/usr/share/man/man6/fortune.6 +%cmake_install %files -%defattr(-,root,root) %doc README Notes %{_mandir}/man1/* %{_mandir}/man6/* +%{_datadir}/fortune +%{_sbindir}/* %{_bindir}/* -/usr/share/fortune %changelog ++++++ fortune-no-games.patch ++++++ Index: fortune-mod/CMakeLists.txt =================================================================== --- fortune-mod.orig/CMakeLists.txt +++ fortune-mod/CMakeLists.txt @@ -84,9 +84,9 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TR SET (WITH_TEST_SUITE CACHE BOOL "") SET (NO_OFFENSIVE CACHE BOOL "Exclude the offensive option.") -SET (LOCALDIR "${CMAKE_INSTALL_PREFIX}/local/share/games/fortunes" CACHE STRING "LOCALDIR fortunes dir") +SET (LOCALDIR "${CMAKE_INSTALL_PREFIX}/share/fortune" CACHE STRING "LOCALDIR fortunes dir") SET (LOCALODIR "${LOCALDIR}/off" CACHE STRING "offensive fortunes localdir") -SET (COOKIEDIR "${CMAKE_INSTALL_PREFIX}/share/games/fortunes" CACHE STRING "cookie dir not under /usr/local") +SET (COOKIEDIR "${CMAKE_INSTALL_PREFIX}/share/fortune" CACHE STRING "cookie dir not under /usr/local") SET (OCOOKIEDIR "${COOKIEDIR}/off" CACHE STRING "offensive cookie dir not under /usr/local") SHLOMIF_ADD_COMMON_C_FLAGS() @@ -109,7 +109,7 @@ ENDMACRO() my_exe( "fortune" "fortune/fortune.c" - "games" + "bin" ) my_exe( ++++++ fortune-no-recode.patch ++++++ --- /var/tmp/diff_new_pack.FGAgmE/_old 2019-06-19 20:58:15.717973648 +0200 +++ /var/tmp/diff_new_pack.FGAgmE/_new 2019-06-19 20:58:15.717973648 +0200 @@ -13,132 +13,133 @@ fortune/fortune.c | 33 --------------------------------- 5 files changed, 2 insertions(+), 37 deletions(-) -Index: fortune-mod-1.99.1/Makefile +Index: fortune-mod/fortune/fortune.c =================================================================== ---- fortune-mod-1.99.1.orig/Makefile -+++ fortune-mod-1.99.1/Makefile -@@ -62,7 +62,7 @@ REGEXDEFS=-DHAVE_REGEX_H -DBSD_REGEX -DH - # - REGEXLIBS= - --RECODELIBS=-lrecode -+RECODELIBS= - - DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\"" -DLOCFORTDIR="\"$(LOCALDIR)\"" -DLOCOFFDIR="\"$(LOCALODIR)\"" - CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe -fsigned-char -Index: fortune-mod-1.99.1/datfiles/Makefile -=================================================================== ---- fortune-mod-1.99.1.orig/datfiles/Makefile -+++ fortune-mod-1.99.1/datfiles/Makefile -@@ -46,7 +46,6 @@ cookies-stamp: - if [ ! -f $$i.old ] ; then \ - cp $$i $$i.old; \ - fi; \ -- recode latin1..u8 $$i ; \ - $(STRFILE) $$i ; \ - ln -s $$i $$i.u8 || exit $? ; \ - done -Index: fortune-mod-1.99.1/datfiles/off/Makefile -=================================================================== ---- fortune-mod-1.99.1.orig/datfiles/off/Makefile -+++ fortune-mod-1.99.1/datfiles/off/Makefile -@@ -30,7 +30,6 @@ recoded-stamp: - if [ ! -f unrotated/$$i.old ]; then \ - cp unrotated/$$i unrotated/$$i.old ; \ - fi; \ -- recode latin1..u8 unrotated/$$i; \ - done - touch recoded-stamp - -Index: fortune-mod-1.99.1/datfiles/pets -=================================================================== ---- fortune-mod-1.99.1.orig/datfiles/pets -+++ fortune-mod-1.99.1/datfiles/pets -@@ -19,7 +19,7 @@ About the only thing on a farm that has - All intelligent species own cats. - % - Any Member introducing or causing to be introduced a dog into the Society's --premises shall be liable to a fine of £5 inflicted by the Treasurer. Any animal -+premises shall be liable to a fine of GBP 5 inflicted by the Treasurer. Any animal - leading a blind person shall be deemed to be a cat. Any animal entering on - Police business shall be deemed to be a wombat. - -- Rule 51, Oxford Union Society -Index: fortune-mod-1.99.1/fortune/fortune.c -=================================================================== ---- fortune-mod-1.99.1.orig/fortune/fortune.c -+++ fortune-mod-1.99.1/fortune/fortune.c -@@ -140,7 +140,6 @@ typedef enum - #include <errno.h> - #include <locale.h> - #include <langinfo.h> --#include <recode.h> - +--- fortune-mod.orig/fortune/fortune.c ++++ fortune-mod/fortune/fortune.c +@@ -118,7 +118,6 @@ static char rcsid[] = "$NetBSD: fortune. + #include <errno.h> + #include <locale.h> + #include <langinfo.h> +-#include <recode.h> + + + #ifdef HAVE_REGEX_H +@@ -215,9 +214,6 @@ static regex_t Re_pat; + #define NO_REGEX + #endif /* POSIX_REGEX */ - /* This makes GNU libc to prototype the BSD regex functions */ -@@ -253,9 +252,6 @@ regex_t Re_pat; - - #endif /* BSD_REGEX */ - --RECODE_REQUEST request; --RECODE_OUTER outer; +-static RECODE_REQUEST request; +-static RECODE_OUTER outer; - int add_dir(register FILEDESC *); - char *program_version(void) -@@ -1548,12 +1544,7 @@ void matches_in_list(FILEDESC * list) - *sp = '\0'; - nchar = sp - Fortbuf; - -- if (fp->utf8_charset && No_recode == FALSE) -- { -- output = recode_string (request, Fortbuf); -- } else { - output = Fortbuf; -- } - /* Should maybe rot13 Fortbuf -allover */ + static unsigned long my_random(unsigned long base) +@@ -1598,14 +1594,7 @@ static void matches_in_list(FILEDESC * l + *sp = '\0'; + nchar = (int)(sp - Fortbuf); + +- if (fp->utf8_charset) +- { +- output = recode_string (request, (const char *)Fortbuf); +- } +- else +- { + output = (char *)Fortbuf; +- } + /* Should maybe rot13 Fortbuf -allover */ if(fp->tbl.str_flags & STR_ROTATED) -@@ -1630,20 +1621,9 @@ void display(FILEDESC * fp) - *p = 'a' + (ch - 'a' + 13) % 26; - } - } -- if(fp->utf8_charset && No_recode == FALSE) { -- char *output; -- output = recode_string (request, line); -- fputs(output, stdout); -- free(output); -- } -- else - fputs(line, stdout); +@@ -1634,8 +1623,6 @@ static void matches_in_list(FILEDESC * l + printf("%c\n", fp->tbl.str_delim); + } + +- if (fp->utf8_charset) +- free (output); + + sp = Fortbuf; + } +@@ -1683,13 +1670,6 @@ static void display(FILEDESC * fp) + *p = 'a' + (ch - 'a' + 13) % 26; + } + } +- if(fp->utf8_charset) { +- char *output; +- output = recode_string (request, (const char *)line); +- fputs(output, stdout); +- free(output); +- } +- else + fputs((char *)line, stdout); } fflush(stdout); -- -- if(fp->utf8_charset) { -- recode_delete_request(request); -- } - } - - /* -@@ -1677,22 +1657,9 @@ int max(register int i, register int j) +@@ -1746,8 +1726,6 @@ static void free_desc(FILEDESC *ptr) int main(int ac, char *av[]) { -- char *ctype, *crequest; +- const char *ctype; +- char *crequest; + int exit_code = 0; + + env_lang=getenv("LC_ALL"); +@@ -1757,24 +1735,8 @@ int main(int ac, char *av[]) + getargs(ac, av); - outer = recode_new_outer(true); - request = recode_new_request (outer); -- + setlocale(LC_ALL,""); - ctype = nl_langinfo(CODESET); -- if(strcmp(ctype,"ANSI_X3.4-1968") == 0) +- if (!ctype || !*ctype) +- { +- ctype = "C"; +- } +- else if(strcmp(ctype,"ANSI_X3.4-1968") == 0) +- { - ctype="ISO-8859-1"; -- +- } +- - crequest = malloc(strlen(ctype) + 7 + 1); - sprintf(crequest, "UTF-8..%s", ctype); - recode_scan_request (request, crequest); - free(crequest); -- + #ifndef NO_REGEX if (Match) - exit(find_matches() != 0); +@@ -1811,9 +1773,6 @@ int main(int ac, char *av[]) + } + } + cleanup: +- recode_delete_request(request); +- recode_delete_outer(outer); +- + /* Free the File_list */ + free_desc(File_list); + free(Fortbuf); +Index: fortune-mod/CMakeLists.txt +=================================================================== +--- fortune-mod.orig/CMakeLists.txt ++++ fortune-mod/CMakeLists.txt +@@ -96,11 +96,7 @@ SHLOMIF_ADD_COMMON_C_FLAGS() + SHLOMIF_FINALIZE_FLAGS() + + INCLUDE(CheckIncludeFile) +-SET(_r "stdbool.h" "stdio.h" "recode.h") +-CHECK_INCLUDE_FILES("${_r}" HAVE_RECODE_H) +-IF (NOT "${HAVE_RECODE_H}") +- MESSAGE(FATAL_ERROR "Cannot find recode.h anywhere - please install lib recode") +-ENDIF () ++SET(_r "stdbool.h" "stdio.h") + + # So it can find config.h + INCLUDE_DIRECTORIES(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") +@@ -156,7 +152,7 @@ ADD_CUSTOM_TARGET( + INSTALL_RENAME_MAN("strfile.man" "1" "strfile" "util") + INSTALL_RENAME_MAN("fortune.6" "6" "fortune" "fortune") + +-TARGET_LINK_LIBRARIES("fortune" "recode") ++TARGET_LINK_LIBRARIES("fortune") + INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/util") + + ADD_DEFINITIONS("-DLOCOFFDIR=\"${LOCALODIR}\"")
