SHA256
1
0
forked from pool/coccinelle

Accepting request 1187230 from home:olh:branches:devel:tools

- update to version 1.2
  See included changes.txt for details

OBS-URL: https://build.opensuse.org/request/show/1187230
OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=95
This commit is contained in:
Jan Engelhardt 2024-07-13 10:36:17 +00:00 committed by Git OBS Bridge
commit 8965dfd702
9 changed files with 521 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

21
_service Normal file
View File

@ -0,0 +1,21 @@
<services>
<service name="tar_scm" mode="manual">
<param name="url">https://github.com/coccinelle/coccinelle.git</param>
<param name="scm">git</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="revision">969cb12e9e9b7d4f42c2ff15296fd927f1ba63af</param>
<param name="filename">coccinelle</param>
<param name="exclude">bundles/menhirLib</param>
<param name="exclude">bundles/parmap</param>
<param name="exclude">bundles/pcre</param>
<param name="exclude">bundles/pyml</param>
<param name="exclude">bundles/stdcompat</param>
<!--
-->
</service>
<service name="recompress" mode="manual">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="manual"/>
</services>

BIN
coccinelle-1.1.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
coccinelle-1.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

343
coccinelle.changes Normal file
View File

@ -0,0 +1,343 @@
-------------------------------------------------------------------
Fri Jul 12 12:12:12 UTC 2024 - ohering@suse.de
- update to version 1.2
See included changes.txt for details
-------------------------------------------------------------------
Tue Nov 29 10:51:36 UTC 2022 - Andreas Schwab <schwab@suse.de>
- Enable build on riscv64
- Increase stack size
-------------------------------------------------------------------
Wed Dec 29 21:21:21 UTC 2021 - ohering@suse.de
- trim list of supported archs to aarch64 ppc64le s390x x86_64
-------------------------------------------------------------------
Fri Dec 10 10:10:10 UTC 2021 - ohering@suse.de
- update to version 1.1.1
See included changes.txt for details
- install ocaml support, add coccinelle.rpmlintrc (bsc#1192695)
-------------------------------------------------------------------
Fri Sep 24 22:36:26 UTC 2021 - Cristian Rodríguez <crrodriguez@opensuse.org>
- Further testing shows that grep, which and findutils are also
required.
-------------------------------------------------------------------
Tue Sep 21 00:36:44 UTC 2021 - Cristian Rodríguez <crrodriguez@opensuse.org>
- Fix totally broken python support, set the correct python3
interpreter, otherwise it defaults to python, which in our case
is python 2.7. (changed kill-env.diff, spec)
-------------------------------------------------------------------
Sat Sep 11 12:34:56 UTC 2021 - ohering@suse.de
- build with VERBOSE=yes
-------------------------------------------------------------------
Tue May 25 10:47:33 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Add wrapper script to set COCCINELLE_HOME [boo#1184563]
-------------------------------------------------------------------
Tue Apr 13 13:13:13 UTC 2021 - ohering@suse.de
- update to version 1.1.0
See included changes.txt for details
-------------------------------------------------------------------
Tue Apr 28 08:11:49 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Switch to python3
-------------------------------------------------------------------
Tue Feb 18 11:11:11 UTC 2020 - olaf@aepfle.de
- The used buildsystem relies on ocaml.opt
-------------------------------------------------------------------
Wed Jan 15 17:10:38 UTC 2020 - olaf@aepfle.de
- Use _service file to trim the bundles directory
-------------------------------------------------------------------
Fri Jan 10 10:35:20 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Update to new source URL.
-------------------------------------------------------------------
Tue Jan 7 07:45:29 UTC 2020 - nick wang <nwang@suse.com>
- bsc#1160194, change the python library to site-packages hierarchy.
-------------------------------------------------------------------
Thu Oct 24 13:10:02 UTC 2019 - olaf@aepfle.de
- Update to new upstream release 1.0.8
See included changes.txt for details
- Remove usage of camlp4
- Remove pkg-config. It is not required, but pulled in anyway
by other packages
- Disable parallel build due to internal copy of stdcompat
-------------------------------------------------------------------
Thu Aug 22 14:04:45 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to new upstream release 1.0.7
* Allow constraints on any metavariables. Constraints can be
specified by comprehension (= { … } or != { … }, with each
item referring to a constant identifier or an inherited
meta-variable, and curly-brackets can be omitted for a single
item), regular expression (~ "..." or !~ "..."), integer
comparison (<, <, >=, >) or scripts (:script:…). Constraints
can be used in conjunctions (&&), disjunctions (||) and can
be negated (!) and parenthesed.
* Allow script finalizers for parallel computation. See
tests/countcalls.cocci and tests/countcalls_python.cocci
* Allow disjunctions on a wider range of syntactic
constructions (function definitions, variable declarations
…).
-------------------------------------------------------------------
Mon Jul 29 09:43:52 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
- Drop pre-shipped binaries for spgen and spgen.opt: since these
are x86_64 binaries, they would not be usable on i586 builds of
coccinella.
-------------------------------------------------------------------
Wed Jan 24 11:30:59 UTC 2018 - jengelh@inai.de
- Build under rpm 4.14
-------------------------------------------------------------------
Tue Nov 28 10:25:02 UTC 2017 - jengelh@inai.de
- Add kill-env.diff
-------------------------------------------------------------------
Tue Nov 28 01:14:03 UTC 2017 - aavindraa@gmail.com
- use %make_install macro
- remove useless directory creation
-------------------------------------------------------------------
Sun Nov 26 22:45:58 UTC 2017 - jengelh@inai.de
- Update to new upstream release 1.0.6
* Allow \ in #define in semantic patch rules, to allow body
with multiple lines, potentially including changes. As a side
effect, \ is also allowed in when specifications, again to
allow patterns to stretch over multiple lines.
* Add identifier list metavariables for #define parameter lists
* Support for Python 3. Pycaml has been patched.
- Remove coccinelle-1.0.4.patch (merged)
-------------------------------------------------------------------
Mon May 30 08:22:09 UTC 2016 - olaf@aepfle.de
- Use ocamlfind(camlp4) to refer to camlp4
- Add coccinelle-1.0.4.patch
-------------------------------------------------------------------
Tue May 24 14:20:12 UTC 2016 - olaf@aepfle.de
- Fix build with ocaml-4.03
Use ocaml-parmap and ocaml-menhir instead of old built-in copies
Use ocaml-pcre
-------------------------------------------------------------------
Tue Dec 15 00:00:00 CET 2015 - dsterba@suse.cz
- Update to 1.0.4
* Language:
* Length for statement list metavariables
* Conjunction (analogous to disjunction)
* Drop Circles, Stars
* Drop Unique
* Default values for script metavariables
* Features:
* Introduce .cocciconfig configuration file
* Add some support for MetaStmtList. Allowed at top level of {}.
* timeout of 0 is no timeout, to allow cancelling this option.
* Bugfixes:
* Allow virtual variable definition to contain an =.
* Improvement when exists rule contains when forall.
-------------------------------------------------------------------
Sat Aug 22 14:30:59 UTC 2015 - mpluskal@suse.com
- Update to 1.0.2
* Positions of C tokens are now computed while lexing rather than
during a distinct pass. This makes use of the Lexing.new_line
function which has been introduced in OCaml 3.11. Coccinelle
can thus no longer be compiled with OCaml 3.10. --use-gitgrep
falls back to --use-coccigrep for a non-git repository.
* ocaml coccilib allows propagating identifiers, expressions,
statements, listlens, and positions to subsequent matching rules
* Allow @S, for statement metavariable S on expressions
* Exploit explicit positive constraints (no regexps) on
identifiers in file filtering
* Ability to declare a rule as matching an identifier. Doesn't
work properly for names of typedefs, enums, structures, or
unions.
* Iso: allow mixed for model for the case where the model is just
a metavar
* Allow ! to propagate into == or other ops in more cases.
-------------------------------------------------------------------
Wed Aug 5 14:22:01 UTC 2015 - mpluskal@suse.com
- Update to 1.0.1
* Language:
+ allow static on type-level declarers
* Features:
+ add --use-gitgrep option, for scanning with git grep
* Bugfix:
+ Take into account constraints when determining whether a
metavar is pure don't add switch fall through when a default
is hidden under another case label.
-------------------------------------------------------------------
Tue May 5 12:43:14 UTC 2015 - mpluskal@suse.com
- Update to release 1.0.0
* see changes.txt for full list of changes
-------------------------------------------------------------------
Fri Feb 20 00:00:00 CET 2015 - dsterba@suse.cz
- Update to new upstream release 1.0.0~rc24
* global expression x
* Varargs support
* Inline in function prototypes
* #ifdef on kernel version
* Parallelism in Coccinelle
* --jobs <int>: Run the specified number of jobs in parallel.
* --chunksize <int>. The specified number of files are dispatched as a
single unit of parallelism.
- Update to new upstream release 1.0.0~rc23
* Ability to add, but not match or remove, attributes.
* Some parsing and pretty printing improvements.
-------------------------------------------------------------------
Thu Nov 27 13:21:13 UTC 2014 - jslaby@suse.com
- fix spatch link. The target did not exist.
-------------------------------------------------------------------
Thu Oct 2 15:01:42 UTC 2014 - jengelh@inai.de
- Update to new upstream release 1.0.0~rc22
* Limited matching of decimal format strings, with the --ibm option
* Better support for functions that have no specified return type.
- Drop fix-no_prepare_ocamlcocci-arguments.patch (merged)
-------------------------------------------------------------------
Thu Sep 9 14:25:25 UTC 2013 - mcgrof@suse.com
- Update to new upstream release 1.0.0~rc21
* Support decimal type with the --ibm option
* Support some matching on pragmas
* Initialize and finalize rules contain a metavariable declaration
region.
* Allow some parameters of a function not to have names.
* Eliminate the reliance on grep in most cases for worth trying,
to improve performance.
* Allow multidecls when removing variable names or when modifying
type.
* Take fresh declarations into account when computing
get_constants to create dependencies
* Leave ifdefs-like directives in unparsed code, if they don't have
beginning or ending counterparts.
* Improve type inference performance when many files included by
using maps.
- Add fix-no_prepare_ocamlcocci-arguments.patch: fix incorrect
call to two functions
-------------------------------------------------------------------
Thu May 9 17:51:39 UTC 2013 - jengelh@inai.de
- Switch to using pkgconfig()-type BuildRequires
-------------------------------------------------------------------
Fri May 3 06:30:09 UTC 2013 - jengelh@inai.de
- Update to new upstream release 1.0.0~rc17
* allow __ at the beginning of a struct or union name
* unparsing with precedence (insertion of parentheses when needed)
* Type metavariables no longer match a case where there is no type
in the C code.
* An expression list metavariable can now be attached with @ to a
parameter list metavariable, to allow using the parameter names as
an argument list.
-------------------------------------------------------------------
Wed Oct 3 16:18:10 UTC 2012 - jengelh@inai.de
- Update to new upstream release 1.0.0~rc15
* See http://coccinelle.lip6.fr/distrib/changes.html for
the (quite large) set of new features and bugfixes
-------------------------------------------------------------------
Thu Sep 6 01:17:08 UTC 2012 - jengelh@inai.de
- spatch requires the python base modules (like site.py) to run
-------------------------------------------------------------------
Mon Feb 13 10:45:09 UTC 2012 - coolo@suse.com
- patch license to follow spdx.org standard
-------------------------------------------------------------------
Sun Jul 10 19:08:55 UTC 2011 - jengelh@medozas.de
- Update to new upstream release 1.0.0
* Addition of initializer list metavariables.
* Allow multiple position variables per token
* ++ can now be associated with - code
* Allow /* */ comments as smpl comments, not only as + code
* Add support for && (label addresses)
* local idexpression metavariable no longer matches static local x
* see http://coccinelle.lip6.fr/distrib/changes.html for details
-------------------------------------------------------------------
Thu Jan 20 13:41:16 UTC 2011 - jengelh@medozas.de
- Update to version 0.2.5-rc2
* Make a very small attempt to parse C++ code, amounting to
accepting identifiers containing ::, tilde, and template
invocations.
* support matching and removing some preprocessor directives
* support for ocaml scripting
* print rule name when a script rule crashes
- Fix python x.y.0 detection
-------------------------------------------------------------------
Sat Apr 24 19:14:40 UTC 2010 - jengelh@medozas.de
- disable stripping on ocaml -custom binaries to make program
usable
-------------------------------------------------------------------
Thu Mar 25 00:51:20 UTC 2010 - jengelh@medozas.de
- install all files required by spatch, not just the binary itself
(otherwise it does not even run)
-------------------------------------------------------------------
Mon Mar 15 12:25:23 UTC 2010 - jengelh@medozas.de
- new upstream release: 0.2.2
-------------------------------------------------------------------
Thu Feb 25 00:34:23 UTC 2010 - jengelh@medozas.de
- Initial submission of version 0.2.1

1
coccinelle.rpmlintrc Normal file
View File

@ -0,0 +1 @@
addFilter('devel-file-in-non-devel-package')

107
coccinelle.spec Normal file
View File

@ -0,0 +1,107 @@
#
# spec file for package coccinelle
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: coccinelle
Version: 1.2
Release: 0
Summary: Semantic patch utility
License: GPL-2.0-only
Group: Productivity/Text/Utilities
URL: http://coccinelle.lip6.fr/
Source0: %name-%version.tar.xz
Source1: %name.rpmlintrc
Patch1: kill-env.diff
ExclusiveArch: aarch64 ppc64le s390x x86_64 riscv64
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: ncurses-devel
BuildRequires: ocaml-ocamldoc >= 3.11
BuildRequires: python-rpm-macros
BuildRequires: ocaml(ocaml.opt)
BuildRequires: ocamlfind(findlib)
BuildRequires: ocamlfind(menhir)
BuildRequires: ocamlfind(parmap)
BuildRequires: ocamlfind(pcre)
BuildRequires: ocamlfind(pyml)
BuildRequires: ocamlfind(stdcompat)
BuildRequires: pkgconfig(python3)
Requires: findutils
Requires: grep
Requires: python3-base
Requires: which
%description
Coccinelle is a program matching and transformation engine which
provides the language SmPL (Semantic Patch Language) for specifying
desired matches and transformations in C code. [It does not recognize
C++.]
Coccinelle performs collateral evolutions in software. Such
evolutions comprise the changes that are needed in client code in
response to evolutions in library APIs, and may include modifications
such as renaming a function, adding a function argument whose value
is somehow context-dependent, and reorganizing a data structure.
Beyond collateral evolutions, Coccinelle is used for finding and
fixing bugs in systems code.
%prep
%autosetup -p1
%build
autoreconf -fi
%configure --with-python=%python_for_executables
# Compiling the generated parser requires an extraordinary amount of stack
%if 0%{?qemu_user_space_build}
export QEMU_STACK_SIZE=$((32768*1024))
%else
ulimit -s 32768
%endif
%make_build -j1 VERBOSE=yes
%install
b="%buildroot"
# "because it is simply not possible to strip ocaml binaries that are built
# with the -custom option."
export NO_BRP_STRIP_DEBUG=true
export NO_DEBUGINFO_STRIP_DEBUG=true
%define __debug_install_post %nil
: >debugfiles.list
: >debugsources.list
: >debugsourcefiles.list
%make_install
%fdupes $b/%_prefix
# Python library have been named after directories in the site-packages hierarchy
mkdir -p "$b/%python3_sitelib"
mv "$b/%_libdir/%name/python/coccilib" "$b/%python3_sitelib"
%fdupes $b/%python3_sitelib/coccilib
%files
%doc authors.txt bugs.txt changes.txt copyright.txt credits.txt
%license license.txt
%doc readme.txt
%python3_sitelib/coccilib
%_mandir/man?/*
%_bindir/sp*
%_libdir/%name
%_datadir/bash-completion/
%changelog

19
kill-env.diff Normal file
View File

@ -0,0 +1,19 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2017-11-28 11:24:59.025640109 +0100
Don't choose arbitrary python interpreters from $PATH.
(It also misleads the rpm autodep scanner.)
---
tools/pycocci | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: coccinelle-1.1.0/tools/pycocci
===================================================================
--- coccinelle-1.1.0.orig/tools/pycocci
+++ coccinelle-1.1.0/tools/pycocci
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
#
# Copyright (c) 2014 Luis R. Rodriguez <mcgrof@suse.com>
# Copyright (c) 2013 Johannes Berg <johannes@sipsolutions.net>