From f0504f0447b6514cd92889dcc9057b6a728d7449 Mon Sep 17 00:00:00 2001 From: songnannan Date: Wed, 8 Jan 2020 15:58:51 +0800 Subject: [PATCH] optimization the spec --- gpm-1.20.1-lib-silent.patch | 19 -------- gpm-1.20.5-close-fds.patch | 17 ------- gpm-1.20.6-multilib.patch | 45 ------------------- ...hbz-668480-gpm-types-7-manpage-fixes.patch | 30 ------------- gpm.spec | 34 +++++++------- 5 files changed, 16 insertions(+), 129 deletions(-) delete mode 100644 gpm-1.20.1-lib-silent.patch delete mode 100644 gpm-1.20.5-close-fds.patch delete mode 100644 gpm-1.20.6-multilib.patch delete mode 100644 gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch diff --git a/gpm-1.20.1-lib-silent.patch b/gpm-1.20.1-lib-silent.patch deleted file mode 100644 index e770741..0000000 --- a/gpm-1.20.1-lib-silent.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- gpm-1.20.1/src/lib/report-lib.c.lib-silent 2002-12-24 23:57:16.000000000 +0100 -+++ gpm-1.20.1/src/lib/report-lib.c 2006-01-18 17:55:38.000000000 +0100 -@@ -24,8 +24,16 @@ - - #include "headers/message.h" - -+static int gpm_silent() { -+ if ( getenv( "GPM_VERBOSE" ) == NULL ) return 1; -+ return 0; -+} -+ - void gpm_report(int line, char *file, int stat, char *text, ... ) - { -+ if ( gpm_silent() && stat != GPM_STAT_OOPS ) -+ return; -+ - char *string = NULL; - int log_level; - va_list ap; diff --git a/gpm-1.20.5-close-fds.patch b/gpm-1.20.5-close-fds.patch deleted file mode 100644 index f33f07c..0000000 --- a/gpm-1.20.5-close-fds.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up gpm-1.20.5/src/daemon/startup.c.close-fds gpm-1.20.5/src/daemon/startup.c ---- gpm-1.20.5/src/daemon/startup.c.close-fds 2008-06-13 10:08:19.000000000 +0200 -+++ gpm-1.20.5/src/daemon/startup.c 2008-12-02 10:11:12.000000000 +0100 -@@ -135,6 +135,13 @@ void startup(int argc, char **argv) - check_uniqueness(); - gpm_report(GPM_PR_INFO,GPM_MESS_STARTED); - -+ // close extra fds -+ if (option.run_status == GPM_RUN_STARTUP ) { -+ close(0); -+ close(1); -+ close(2); -+ } -+ - //return mouse_table[1].fd; /* the second is handled in the main() */ - - /****************** OLD CODE from gpn.c END ***********************/ diff --git a/gpm-1.20.6-multilib.patch b/gpm-1.20.6-multilib.patch deleted file mode 100644 index 820db88..0000000 --- a/gpm-1.20.6-multilib.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up gpm-1.20.6/contrib/Makefile.in.multilib gpm-1.20.6/contrib/Makefile.in ---- gpm-1.20.6/contrib/Makefile.in.multilib 2008-06-19 07:48:48.000000000 +0200 -+++ gpm-1.20.6/contrib/Makefile.in 2009-02-24 10:36:09.000000000 +0100 -@@ -9,10 +9,10 @@ top_builddir = .. - - include $(top_builddir)/Makefile.include - --all: $(srcdir)/$(ELISP) -+all: $(filter-out %.elc,$(srcdir)/$(ELISP)) - - install: all -- if [ -n "$(ELISP)" ]; then for i in `echo $(ELISP)`; do \ -+ if [ -n "$(filter-out %.elc,$(ELISP))" ]; then for i in `echo $(filter-out %.elc,$(ELISP))`; do \ - $(INSTALL_DATA) $(srcdir)/$$i $(lispdir)/`basename $$i` ;\ - done; fi - -@@ -20,7 +20,7 @@ install: all - $(EMACS) -batch -l $(srcdir)/emacs/exec.el -exec '(byte-compile-file "$<")' - - uninstall: -- if [ -n "$(ELISP)" ]; then for i in `echo $(ELISP)`; do \ -+ if [ -n "$(filter-out %.elc,$(ELISP))" ]; then for i in `echo $(filter-out %.elc,$(ELISP))`; do \ - rm -f $(lispdir)/$$i ;\ - done; fi - -@@ -28,4 +28,4 @@ dist: - $(CP) -r $(srcdir) $(top_builddir)/gpm-$(release)/ - - clean distclean: -- $(RM) -f $(srcdir)/emacs/*.elc Makefile -+ $(RM) $(srcdir)/emacs/*.elc Makefile -diff -up gpm-1.20.6/doc/Makefile.in.multilib gpm-1.20.6/doc/Makefile.in ---- gpm-1.20.6/doc/Makefile.in.multilib 2009-02-09 10:58:53.000000000 +0100 -+++ gpm-1.20.6/doc/Makefile.in 2009-02-24 10:36:09.000000000 +0100 -@@ -130,8 +130,8 @@ install: all installdirs - #i keep all my infopages compressed and i'm tired to do it by - #hand, so check if there are any compressed pages and do this - #one too -- -ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \ -- && gzip -f $(infodir)/gpm.info -+ #-ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \ -+ # && gzip -f $(infodir)/gpm.info - # Hmm.... shouldn't man pages be compressed too? - # maybe they should, but at least at my system they are not. - diff --git a/gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch b/gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch deleted file mode 100644 index 6199462..0000000 --- a/gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur gpm-1.20.7.orig/doc/doc.gpm.in gpm-1.20.7/doc/doc.gpm.in ---- gpm-1.20.7.orig/doc/doc.gpm.in 2012-10-26 23:21:38.000000000 +0200 -+++ gpm-1.20.7/doc/doc.gpm.in 2013-07-19 19:40:33.374213536 +0200 -@@ -600,7 +600,7 @@ - that one of @t{\-o dtr}, @t{\-o rts}, @t{\-o both} can be specified to - toggle the control lines of the serial port. - --The following mouse type are corrently recognized: -+The following mouse type are currently recognized: - - @table @code - @item bare Microsoft -@@ -621,7 +621,7 @@ - this is your case, use the @samp{bare} mouse type. Some new - two-button devices are ``plug and play'', and they don't play - fair at all; in this case try @t{\-t pnp}. Many (most) -- three-button devices that use the microsoft protocol fail to -+ three-button devices that use the Microsoft protocol fail to - report some middle-button events during mouse motion. Since - the protocol does not distinguish between the middle button - going up and the middle button going down it would be liable -@@ -649,7 +649,7 @@ - decoder gets into a confused state where it thinks the middle - button is up when it's down and vice versa. (If you get sick - of having to do this, please don't blame gpm; blame your buggy -- mouse! Note that most three-button mice that do the microsoft -+ mouse! Note that most three-button mice that do the Microsoft - protocol can be made to do the MouseSystems protocol - instead. The ``3 Button Serial Mouse mini-HOWTO'' has - information about this.) This mouse decoder accepts standard diff --git a/gpm.spec b/gpm.spec index 0484d10..c3bb5a3 100644 --- a/gpm.spec +++ b/gpm.spec @@ -1,21 +1,17 @@ Name: gpm Version: 1.20.7 -Release: 19 +Release: 20 Summary: The gpm package contains a mouse server for the console and xterm License: GPLv2 and GPLv2+ with exceptions and GPLv3+ and Verbatim and Copyright only URL: https://www.nico.schottelius.org/software/gpm/ Source: https://www.nico.schottelius.org/software/gpm/archives/%{name}-%{version}.tar.gz Source1: gpm.service -Patch1: gpm-1.20.6-multilib.patch -Patch2: gpm-1.20.1-lib-silent.patch -Patch3: gpm-1.20.5-close-fds.patch -Patch4: gpm-1.20.1-weak-wgetch.patch -Patch5: gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch -Patch6: gpm-1.20.6-missing-header-dir-in-make-depend.patch -Patch7: gpm-format-security.patch -Patch8: gpm-1.20.7-sysmacros.patch -Patch9: gpm-1.20.7-sigemptyset.patch +Patch1: gpm-1.20.1-weak-wgetch.patch +Patch2: gpm-1.20.6-missing-header-dir-in-make-depend.patch +Patch3: gpm-format-security.patch +Patch4: gpm-1.20.7-sysmacros.patch +Patch5: gpm-1.20.7-sigemptyset.patch Patch6000: fix-highly-illegal-return-of-int-as-char-and-less-wo.patch Patch6001: fix-signedness-issue.patch @@ -54,15 +50,11 @@ for the gpm library. %prep %setup -q ./autogen.sh -%patch1 -p1 -b .multilib -%patch2 -p1 -b .lib-silent -%patch3 -p1 -b .close-fds -%patch4 -p1 -b .weak-wgetch +%patch1 -p1 -b .weak-wgetch +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 %patch6000 -p1 %patch6001 -p1 @@ -123,6 +115,12 @@ fi %{_mandir}/man?/* %changelog +* Wed Jan 8 2020 songnannan - 1.20.7-20 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: optimization the spec + * Tue Dec 31 2019 openEuler Buildteam - 1.20.7-19 - Type:NA - Id:NA