From 4809aed341ce1ccfea978efdb266d98a0d420d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Wed, 14 Oct 2020 23:22:33 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/cscope#72bd7b5480e8c9cc400dcc3cbeb23e764367aa06 --- .gitignore | 7 + cscope-15.8-configure-in.patch | 11 + cscope-15.8-empty-function-array.patch | 14 ++ cscope-dblfree.patch | 11 + cscope-invindex-sizing.patch | 45 ++++ cscope.spec | 298 +++++++++++++++++++++++++ sources | 1 + 7 files changed, 387 insertions(+) create mode 100644 cscope-15.8-configure-in.patch create mode 100644 cscope-15.8-empty-function-array.patch create mode 100644 cscope-dblfree.patch create mode 100644 cscope-invindex-sizing.patch create mode 100644 cscope.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..87915eb 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,7 @@ +cscope-15.5.tar.gz +cscope-15.5-inverted.patch +cscope-15.6.tar.gz +cscope-15.7a.tar.bz2 +/cscope-15.8.tar.bz2 +/cscope-15.8b.tar.gz +/cscope-15.9.tar.gz diff --git a/cscope-15.8-configure-in.patch b/cscope-15.8-configure-in.patch new file mode 100644 index 0000000..47ae696 --- /dev/null +++ b/cscope-15.8-configure-in.patch @@ -0,0 +1,11 @@ +diff -up ./configure.in.orig ./configure.in +--- ./configure.in.orig 2013-03-25 11:56:12.588450042 -0400 ++++ ./configure.in 2013-03-25 11:56:19.723645454 -0400 +@@ -14,6 +14,7 @@ dnl AC_CHECK_YACC + dnl Checks for programs. + AC_PROG_INSTALL + AC_PROG_CC ++AM_PROG_CC_C_O + AC_EXEEXT + AM_PROG_LEX + AM_CONDITIONAL(USING_LEX, test "x$LEX" = "xlex") diff --git a/cscope-15.8-empty-function-array.patch b/cscope-15.8-empty-function-array.patch new file mode 100644 index 0000000..3a1ca62 --- /dev/null +++ b/cscope-15.8-empty-function-array.patch @@ -0,0 +1,14 @@ +diff -up ./src/find.c.orig ./src/find.c +--- ./src/find.c.orig 2014-04-15 12:17:44.412383314 -0400 ++++ ./src/find.c 2014-04-15 12:19:17.122065215 -0400 +@@ -1201,7 +1201,9 @@ getposting(void) + static void + putpostingref(POSTING *p, char *pat) + { +- static char function[PATLEN + 1]; /* function name */ ++ // initialize function to "unknown" so that the first line of temp1 ++ // is properly formed if symbol matches a header file entry first time ++ static char function[PATLEN + 1] = "unknown";/* function name */ + + if (p->fcnoffset == 0) { + if (p->type == FCNDEF) { /* need to find the function name */ diff --git a/cscope-dblfree.patch b/cscope-dblfree.patch new file mode 100644 index 0000000..d300d04 --- /dev/null +++ b/cscope-dblfree.patch @@ -0,0 +1,11 @@ +diff -up ./src/command.c.dblfree ./src/command.c +--- ./src/command.c.dblfree 2019-04-11 07:08:24.358253603 -0400 ++++ ./src/command.c 2019-04-11 07:08:43.955193615 -0400 +@@ -803,7 +803,6 @@ changestring(void) + } + changing = NO; + mousemenu(); +- fclose(script); + free(change); + return(anymarked); + } diff --git a/cscope-invindex-sizing.patch b/cscope-invindex-sizing.patch new file mode 100644 index 0000000..b84aed2 --- /dev/null +++ b/cscope-invindex-sizing.patch @@ -0,0 +1,45 @@ +diff -u -r1.20 invlib.c +--- src/invlib.c 12 Mar 2012 17:57:55 -0000 1.20 ++++ src/invlib.c 10 Jul 2012 19:57:51 -0000 +@@ -169,8 +169,8 @@ + numpost = 1; + + /* set up as though a block had come and gone, i.e., set up for new block */ +- /* FIXME HBB: magic number alert (16) */ +- amtused = 16; /* leave no space - init 3 words + one for luck */ ++ /* 3 longs needed for: numinvitems, next block, and previous block */ ++ amtused = 3 * sizeof(long); + numinvitems = 0; + numlogblk = 0; + lastinblk = sizeof(t_logicalblk); +@@ -371,8 +371,10 @@ + zipf[0]++; + #endif + len = strlen(thisterm); ++ /* length of term rounded up to long boundary */ + wdlen = (len + (sizeof(long) - 1)) / sizeof(long); +- /* HBB FIXME 20060419: magic number: 3 */ ++ /* each term needs 2 longs for its iteminfo and ++ * 1 long for its offset */ + numwilluse = (wdlen + 3) * sizeof(long); + /* new block if at least 1 item in block */ + if (numinvitems && numwilluse + amtused > sizeof(t_logicalblk)) { +@@ -435,7 +437,8 @@ + invcannotwrite(indexfile); + return(0); + } +- amtused = 16; ++ /* 3 longs needed for: numinvitems, next block, and previous block */ ++ amtused = 3 * sizeof(long); + numlogblk++; + /* check if had to back up, if so do it */ + if (backupflag) { +@@ -468,7 +471,7 @@ + while (tptr3 > tptr) + *--tptr2 = *--tptr3; + lastinblk -= j; +- amtused += (8 * backupflag + j); ++ amtused += ((2 * sizeof(long)) * backupflag + j); + for (i = 3; i < (backupflag * 2 + 2); i += 2) { + iteminfo.packword[0] = logicalblk.invblk[i]; + iteminfo.e.offset += (tptr2 - tptr3); diff --git a/cscope.spec b/cscope.spec new file mode 100644 index 0000000..547421f --- /dev/null +++ b/cscope.spec @@ -0,0 +1,298 @@ +Summary: C source code tree search and browse tool +Name: cscope +Version: 15.9 +Release: 8%{?dist} +Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz +URL: http://cscope.sourceforge.net +License: BSD and GPLv2+ +BuildRequires: gcc +BuildRequires: pkgconfig ncurses-devel flex bison m4 +BuildRequires: autoconf automake +Requires: emacs-filesystem coreutils +Requires: ed +%if !0%{?rhel} +Requires: xemacs-filesystem +%endif + +Patch1: cscope-dblfree.patch + +%define cscope_share_path %{_datadir}/cscope +%define xemacs_lisp_path %{_datadir}/xemacs/site-packages/lisp +%define emacs_lisp_path %{_datadir}/emacs/site-lisp +%define vim_plugin_path %{_datadir}/vim/vimfiles/plugin + + +%description +cscope is a mature, ncurses based, C source code tree browsing tool. It +allows users to search large source code bases for variables, functions, +macros, etc, as well as perform general regex and plain text searches. +Results are returned in lists, from which the user can select individual +matches for use in file editing. + +%prep +%setup -q +%patch1 -p1 + +autoreconf + +%build +%configure +make + +%install +rm -rf $RPM_BUILD_ROOT %{name}-%{version}.files +make DESTDIR=$RPM_BUILD_ROOT install +mkdir -p $RPM_BUILD_ROOT/var/lib/cs +mkdir -p $RPM_BUILD_ROOT%{cscope_share_path} +cp -a contrib/xcscope/xcscope.el $RPM_BUILD_ROOT%{cscope_share_path} +install -m 755 contrib/xcscope/cscope-indexer $RPM_BUILD_ROOT%{_bindir} +cp -a contrib/cctree.vim $RPM_BUILD_ROOT%{cscope_share_path} +for dir in %{xemacs_lisp_path} %{emacs_lisp_path} ; do + mkdir -p $RPM_BUILD_ROOT$dir + ln -s %{cscope_share_path}/xcscope.el $RPM_BUILD_ROOT$dir + touch $RPM_BUILD_ROOT$dir/xcscope.elc + echo "%ghost $dir/xcscope.el*" >> %{name}-%{version}.files +done + + + +%files -f %{name}-%{version}.files +%{_bindir}/* +%dir %{cscope_share_path} +%{cscope_share_path}/ +%{_mandir}/man1/* +%dir /var/lib/cs +%doc AUTHORS COPYING ChangeLog README TODO contrib/cctree.txt + +%if !0%{?rhel} +%triggerin -- xemacs +ln -sf %{cscope_share_path}/xcscope.el %{xemacs_lisp_path}/xcscope.el +%endif + +%triggerin -- emacs, emacs-nox, emacs-lucid +ln -sf %{cscope_share_path}/xcscope.el %{emacs_lisp_path}/xcscope.el + +%triggerin -- vim-filesystem +ln -sf %{cscope_share_path}/cctree.vim %{vim_plugin_path}/cctree.vim + +%if !0%{?rhel} +%triggerun -- xemacs +[ $2 -gt 0 ] && exit 0 +rm -f %{xemacs_lisp_path}/xcscope.el +%endif + +%triggerun -- emacs, emacs-nox, emacs-lucid +[ $2 -gt 0 ] && exit 0 +rm -f %{emacs_lisp_path}/xcscope.el + +%triggerun -- vim-filesystem +[ $2 -gt 0 ] && exit 0 +rm -f %{vim_plugin_path}/cctree.vim + +%changelog +* Wed Jul 29 2020 Neil Horman - 15.9-8 +- Adding missing dependency on ed (bz 1861697) + +* Mon Jul 27 2020 Fedora Release Engineering - 15.9-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 15.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 15.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Apr 11 2019 Neil Horman - 15.9-4 +- Fixing double free (bz 1657210) + +* Thu Jan 31 2019 Fedora Release Engineering - 15.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Dec 10 2018 Neil Horman - 15.9-2 +- update Requires to include coreutils (bz 1657775) + +* Tue Jul 24 2018 Neil Horman - 15.9-1 +- update to latest upstream + +* Thu Jul 12 2018 Fedora Release Engineering - 15.8b-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Mar 01 2018 Josh Boyer - 15.8b-8 +- Conditionalize xemacs + +* Wed Feb 07 2018 Fedora Release Engineering - 15.8b-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 15.8b-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 15.8b-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 15.8b-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Nov 28 2016 Neil Horman - 15.8b-3 +- Changed permissions on cscope-indexer (bz 1399108) + +* Wed Feb 03 2016 Fedora Release Engineering - 15.8b-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Aug 05 2015 Neil Horman - 15.8b-1 +- Update to latest upstream + +* Wed Jun 17 2015 Fedora Release Engineering - +* 15.8-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Sep 30 2014 Neil Horman - 15.8-11 +- Added triggerin support for emacs-nox (bz 961709) + +* Sat Aug 16 2014 Fedora Release Engineering - 15.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 15.8-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Apr 15 2014 Neil Horman - 15.8-8 +- Fixed formatting issue with empty function array (bz 1087940) + +* Sat Aug 03 2013 Fedora Release Engineering - 15.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Mar 25 2013 Neil Horman - 15.8-6 +- Fixed build break + +* Mon Mar 25 2013 Neil Horman - 15.8-5 +- Updated to run autoreconf for impending aarch64 introduction (bz 925201) + +* Wed Feb 13 2013 Fedora Release Engineering - 15.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 15.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 10 2012 Neil Horman - 15.8-2 +- Fix inverted index sizing + +* Mon Jun 18 2012 Neil Horman - 15.8 +- Update to latest upstream + +* Mon Mar 12 2012 Neil Horman -15.7a-10 +- Fixed a segfault in invlib construction ( bz 786523) + +* Mon Mar 05 2012 Neil Horman 15.7a-9 +- Fixed a segfault in the symbol assignment search (bz 799643) + +* Fri Jan 13 2012 Fedora Release Engineering - 15.7a-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Jun 30 2011 Neil Horman - 15.7a-7 +- Added LEXERR token to catch bad parsing before we crash (bz717545) + +* Fri Jun 24 2011 Neil Horman - 15.7a-6 +- Fixed licensing for xcscope.el (bz 715898) +- Fixed xemacs pkg. dependency (bz 719523) + +* Wed Jun 01 2011 Neil Horman - 15.7a-5 +- Fix scriptles macro expansion (bz 708499) + +* Thu May 26 2011 Neil Horman - 15.7a-4 +- Added cctree.vim vi plugin + +* Tue Feb 08 2011 Fedora Release Engineering - 15.7a-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Sep 30 2010 Neil Horman - 15.7a-1 +- Update to latest upstream release (bz 569043) + +* Fri Jul 24 2009 Fedora Release Engineering - 15.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jun 12 2009 Neil Horman +- Fix some buffer overflows (bz 505605) + +* Tue Feb 24 2009 Fedora Release Engineering - 15.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jul 08 2008 Neil Horman -15.6-2.dist +- Grab upstream patch for -q rebuld (bz 436648) + +* Tue Mar 27 2007 Neil Horman -15.6-1.dist +- Rebase to version 15.6 + +* Mon Mar 05 2007 Neil Horman -15.5-15.4.dist +- Make sigwinch handler only register for curses mode (bz 230862) + +* Mon Feb 05 2007 Neil Horman -15.5-15.3.dist +- Fixing dist label in release tag. + +* Thu Feb 01 2007 Neil Horman -15.5-15.2.dist +- Fixing changelog to not have macro in release + +* Wed Aug 23 2006 Neil Horman -15.5-15.1 +- fixed overflows per bz 203651 +- start using {dist} tag to make release numbering easier + +* Mon Jul 17 2006 Jesse Keating - 15.5-14 +- rebuild + +* Fri Jun 23 2006 Neil Horman +- Fix putstring overflow (bz 189666) + +* Fri Jun 23 2006 Neil Horman +- Fix putstring overflow (bz 189666) + +* Fri May 5 2006 Neil Horman +- Adding fix to put SYSDIR in right location (bz190580) + +* Fri Apr 21 2006 Neil Horman - 15.5-13.4 +- adding inverted index overflow patch + +* Fri Feb 10 2006 Jesse Keating - 15.5-13.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 15.5-13.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 16 2005 Jesse Keating +- rebuild on new gcc + +* Tue Nov 30 2004 Neil Horman +- added tempsec patch to fix bz140764/140765 + +* Mon Nov 29 2004 Neil Horman +- updated cscope resize patch to do less work in + signal handler and synced version nr. on dist. + +* Mon Nov 22 2004 Neil Horman +- added cscope-1.5.-resize patch to allow terminal + resizing while cscope is running + +* Tue Oct 5 2004 Neil Horman +- modified cscope-15.5.-inverted patch to be upstream + friendly + +* Tue Sep 28 2004 Neil Horman +- fixed inverted index bug (bz 133942) + +* Mon Sep 13 2004 Frank Ch. Eigler +- bumped release number to a plain "1" + +* Fri Jul 16 2004 Neil Horman +- Added cscope-indexer helper and xcscope lisp addon +- Added man page for xcscope +- Added triggers to add xcscope.el pkg to (x)emacs +- Thanks to Ville, Michael and Jens for thier help :) + +* Fri Jul 2 2004 Neil Horman +- Added upstream ocs fix +- Added feature to find symbol assignments +- Changed default SYSDIR directory to /var/lib/cs +- Incoproated M. Schwendt's fix for ocs -s + +* Fri Jun 18 2004 Neil Horman +- built the package diff --git a/sources b/sources new file mode 100644 index 0000000..007e52a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cscope-15.9.tar.gz) = 2cb84a85b03973cda8e9462b4b209495eb6c41e3f5fcfe7cf8605d8ac8875c5062e02d0da27ef7035388c5ebc3082e6ebd78590d305ff752cbe4276059dad81a