Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package coccigrep for openSUSE:Factory 
checked in at 2025-03-19 22:33:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/coccigrep (Old)
 and      /work/SRC/openSUSE:Factory/.coccigrep.new.4956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "coccigrep"

Wed Mar 19 22:33:40 2025 rev:18 rq:1254305 version:1.21

Changes:
--------
--- /work/SRC/openSUSE:Factory/coccigrep/coccigrep.changes      2023-04-12 
12:52:13.361150195 +0200
+++ /work/SRC/openSUSE:Factory/.coccigrep.new.4956/coccigrep.changes    
2025-03-19 22:33:55.162620042 +0100
@@ -1,0 +2,9 @@
+Wed Mar 19 05:59:06 UTC 2025 - Jiri Slaby <jsl...@suse.cz>
+
+- update to 1.21:
+  core: python 3.12 support
+- package vim plugin
+- %check section added
+- cleanup
+
+-------------------------------------------------------------------

Old:
----
  coccigrep-1.20.tar.gz

New:
----
  _scmsync.obsinfo
  coccigrep-1.21.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ coccigrep.spec ++++++
--- /var/tmp/diff_new_pack.PjJdiJ/_old  2025-03-19 22:33:56.122660458 +0100
+++ /var/tmp/diff_new_pack.PjJdiJ/_new  2025-03-19 22:33:56.138661131 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package coccigrep
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,16 +16,21 @@
 #
 
 
+%define     vimplugin_dir %{_datadir}/vim/site/plugin
+
 Name:           coccigrep
-Version:        1.20
+Version:        1.21
 Release:        0
 Summary:        Semantic grep tool for C, based on coccinelle
 License:        GPL-3.0-only
 Group:          Development/Libraries/C and C++
 URL:            https://github.com/regit/coccigrep
 Source:         
https://github.com/regit/coccigrep/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+BuildRequires:  coccinelle
+BuildRequires:  fdupes
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools
+BuildRequires:  vim
 BuildRequires:  xz
 Requires:       coccinelle
 Requires:       python3
@@ -38,8 +43,15 @@
 used to find where a given structure is used in code files. coccigrep depends 
on
 the spatch program which comes with coccinelle.
 
+%package vim-plugin
+Summary:        Vim plugin for coccigrep
+Requires:       coccigrep = %{version}
+
+%description vim-plugin
+A vim plugin to invoke coccigrep from vim.
+
 %prep
-%setup -q
+%autosetup
 chmod 644 README.rst
 
 %build
@@ -51,6 +63,24 @@
 install -d %{buildroot}/%{_mandir}/man1/
 install -m 644 coccigrep.1 %{buildroot}/%{_mandir}/man1/
 
+install -d %{buildroot}/%{vimplugin_dir}
+install -m 644 editors/cocci-grep.vim %{buildroot}/%{vimplugin_dir}
+
+%fdupes %{buildroot}%{python3_sitelib}
+
+%check
+cat >test.c <<EOF
+struct X { int x; };
+struct Y { int y, z; };
+int fun1(struct X *x) { return x->x; }
+int fun2(struct Y *y) { return y->y; }
+EOF
+export PYTHONPATH="%{buildroot}%{python3_sitelib}"
+export PATH="%{buildroot}%{_bindir}:$PATH"
+coccigrep -t 'struct X' test.c | grep -q fun1
+coccigrep -t 'struct Y' -a y test.c | grep -q fun2
+test $(coccigrep -t 'struct Y' -a z test.c | wc -c) -eq 0
+
 %files
 %license LICENSE
 %doc README.rst ChangeLog
@@ -58,3 +88,6 @@
 %{_bindir}/coccigrep
 %{_mandir}/man1/coccigrep.1%{?ext_man}
 
+%files vim-plugin
+%{vimplugin_dir}/cocci-grep.vim
+

++++++ _scmsync.obsinfo ++++++
mtime: 1742368613
commit: 641261f4d079e3b93076af34d888dcd7a2d3daac0e325ba78b8974f102b71056
url: https://src.opensuse.org/jirislaby/d-t-coccigrep.git
revision: master

++++++ coccigrep-1.20.tar.gz -> coccigrep-1.21.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coccigrep-1.20/src/coccigrep.py 
new/coccigrep-1.21/src/coccigrep.py
--- old/coccigrep-1.20/src/coccigrep.py 2020-05-05 09:56:05.000000000 +0200
+++ new/coccigrep-1.21/src/coccigrep.py 2024-10-13 18:23:32.000000000 +0200
@@ -15,9 +15,9 @@
 # 02110-1301, USA.
 
 try:
-    from configparser import SafeConfigParser
+    from configparser import ConfigParser as PyConfigParser
 except Exception:
-    from ConfigParser import SafeConfigParser
+    from ConfigParser import SafeConfigParser as PyConfigParser
 from os import unlink, path, listdir, getcwd
 from string import Template
 from subprocess import Popen, PIPE, STDOUT
@@ -27,7 +27,7 @@
 import re
 import sys
 
-COCCIGREP_VERSION = "1.20"
+COCCIGREP_VERSION = "1.21"
 
 have_multiprocessing = True
 try:
@@ -88,16 +88,16 @@
     (getcwd(), '.%s'))))
 
 
-class CocciGrepConfig(SafeConfigParser):
+class CocciGrepConfig(PyConfigParser):
     """
     Configuration handling class
 
     This class parses configuration and can be used to access to
     configuration item via get operations. CocciGrepConfig is derived
-    from SafeConfigParser
+    from ConfigParser
     """
     def __init__(self):
-        SafeConfigParser.__init__(self)
+        PyConfigParser.__init__(self)
         self._load_config()
 
     def _load_config(self):

Reply via email to