From 96c088968daec8e4aa27ea51833bf5bf36fb12193eb0584ac7211e55c161b933 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 26 Nov 2017 22:48:19 +0000 Subject: [PATCH 1/6] coccinelle-1.0.6 OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=54 --- coccinelle-1.0.4.patch | 15 --------------- coccinelle-1.0.4.tgz | 3 --- coccinelle-1.0.6.tgz | 3 +++ coccinelle.changes | 11 +++++++++++ coccinelle.spec | 14 ++++++-------- 5 files changed, 20 insertions(+), 26 deletions(-) delete mode 100644 coccinelle-1.0.4.patch delete mode 100644 coccinelle-1.0.4.tgz create mode 100644 coccinelle-1.0.6.tgz diff --git a/coccinelle-1.0.4.patch b/coccinelle-1.0.4.patch deleted file mode 100644 index 3c79b95..0000000 --- a/coccinelle-1.0.4.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - setup/cocci.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/setup/cocci.m4 -+++ b/setup/cocci.m4 -@@ -285,7 +285,7 @@ AC_DEFUN([AC_COCCI_TOOL], - AC_SUBST([$1], [no]) - ], - [dnl find the tool -- AC_COCCI_FINDTOOL([$1],[[$]$1]) -+ AC_COCCI_FINDTOOL([$1],[$2]) - ]) - - AS_IF([test -z "[$]$1" -o "x[$]$1" = xno], diff --git a/coccinelle-1.0.4.tgz b/coccinelle-1.0.4.tgz deleted file mode 100644 index b214f00..0000000 --- a/coccinelle-1.0.4.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f823813a2ea299c0f6c01d8419b83c4dc6617116d32ba99d726443a1c22b06d -size 2484218 diff --git a/coccinelle-1.0.6.tgz b/coccinelle-1.0.6.tgz new file mode 100644 index 0000000..82167fb --- /dev/null +++ b/coccinelle-1.0.6.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8452ed265c209dae99cbb33b67bc7912e72f8bca1e24f33f1a88ba3d7985e909 +size 6684278 diff --git a/coccinelle.changes b/coccinelle.changes index e8b8fce..bb8de0c 100644 --- a/coccinelle.changes +++ b/coccinelle.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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. + ------------------------------------------------------------------- Mon May 30 08:22:09 UTC 2016 - olaf@aepfle.de diff --git a/coccinelle.spec b/coccinelle.spec index d8474b5..1557395 100644 --- a/coccinelle.spec +++ b/coccinelle.spec @@ -1,7 +1,7 @@ # # spec file for package coccinelle # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -17,7 +17,7 @@ Name: coccinelle -Version: 1.0.4 +Version: 1.0.6 Release: 0 Summary: Semantic patch utility License: GPL-2.0 @@ -26,7 +26,6 @@ Url: http://coccinelle.lip6.fr/ #Git-Clone: git://github.com/coccinelle/coccinelle Source: http://coccinelle.lip6.fr/distrib/%name-%version.tgz -Patch0: coccinelle-1.0.4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -58,7 +57,6 @@ used (by us and others) for finding and fixing bugs in systems code. %prep %setup -qn %name-%version -%patch0 -p1 %build autoreconf -fi @@ -70,7 +68,7 @@ make # with the -custom option." export NO_BRP_STRIP_DEBUG=true export NO_DEBUGINFO_STRIP_DEBUG=true -%define __debug_install_post %{nil} +%define __debug_install_post %nil : >debugfiles.list : >debugsources.list @@ -78,9 +76,9 @@ b="%buildroot" make install DESTDIR="$b" # Remove coccilib, don't have the deps rm -Rf "$b/%_libdir/%name"/{commons,globals,ocaml,parsing_c} \ - "$b/%_mandir/man3"/Coccilib*; + "$b/%_mandir/man3"/Coccilib* -mkdir -p "$b/%_libdir"; +mkdir -p "$b/%_libdir" %fdupes %buildroot/%_prefix %files @@ -88,7 +86,7 @@ mkdir -p "$b/%_libdir"; %doc authors.txt bugs.txt changes.txt copyright.txt credits.txt %doc license.txt readme.txt %_mandir/man?/* -%_bindir/spatch* +%_bindir/sp* %_bindir/pycocci %_libdir/%name From ae3670802f72151b90f86b11073421d2752f5ebb1ea93bcffbe5132669b19f8c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 26 Nov 2017 22:48:38 +0000 Subject: [PATCH 2/6] OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=55 --- coccinelle.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/coccinelle.changes b/coccinelle.changes index bb8de0c..b507fa2 100644 --- a/coccinelle.changes +++ b/coccinelle.changes @@ -8,6 +8,7 @@ Sun Nov 26 22:45:58 UTC 2017 - jengelh@inai.de 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 From 9bae13f456a5cd1250aebbdd6942ff21f7f85af8c21430223d73b0477a73e72c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 27 Nov 2017 10:37:26 +0000 Subject: [PATCH 3/6] enable parallel build OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=56 --- coccinelle.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coccinelle.spec b/coccinelle.spec index 1557395..9919a04 100644 --- a/coccinelle.spec +++ b/coccinelle.spec @@ -56,15 +56,15 @@ structure. Beyond collateral evolutions, Coccinelle is successfully used (by us and others) for finding and fixing bugs in systems code. %prep -%setup -qn %name-%version +%setup -q %build autoreconf -fi %configure -make +make %{?_smp_mflags} %install -# "because it is simply not possible to strip ocaml binaries that are built +# "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 From aae8944b753ec2f1c03ca262284095d1b506a9c979af05b177dffeedd68335cb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 27 Nov 2017 10:39:29 +0000 Subject: [PATCH 4/6] generalize description; add C++ note OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=57 --- coccinelle.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/coccinelle.spec b/coccinelle.spec index 9919a04..c6b2c8d 100644 --- a/coccinelle.spec +++ b/coccinelle.spec @@ -46,14 +46,16 @@ Requires: python-base %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. Coccinelle was -initially targeted towards performing collateral evolutions in Linux. -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 successfully -used (by us and others) for finding and fixing bugs in systems code. +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 %setup -q From baf4361e1e08be890f0e495e4bef2dce31389675e879f48173a2ef2c1b54bfc0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 28 Nov 2017 10:23:09 +0000 Subject: [PATCH 5/6] cherry-pick 546128 OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=58 --- coccinelle.changes | 6 ++++++ coccinelle.spec | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/coccinelle.changes b/coccinelle.changes index b507fa2..3d9e295 100644 --- a/coccinelle.changes +++ b/coccinelle.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/coccinelle.spec b/coccinelle.spec index c6b2c8d..3be8e31 100644 --- a/coccinelle.spec +++ b/coccinelle.spec @@ -74,13 +74,10 @@ export NO_DEBUGINFO_STRIP_DEBUG=true : >debugfiles.list : >debugsources.list -b="%buildroot" -make install DESTDIR="$b" +%make_install # Remove coccilib, don't have the deps -rm -Rf "$b/%_libdir/%name"/{commons,globals,ocaml,parsing_c} \ - "$b/%_mandir/man3"/Coccilib* - -mkdir -p "$b/%_libdir" +rm -Rf "%buildroot/%_libdir/%name"/{commons,globals,ocaml,parsing_c} \ + "%buildroot/%_mandir/man3"/Coccilib* %fdupes %buildroot/%_prefix %files From 58af012f1a535ff66340fac06e0b2f2b3d71dfee5d957d676e8288112dc1ea96 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 28 Nov 2017 10:27:21 +0000 Subject: [PATCH 6/6] - Add kill-env.diff OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=59 --- coccinelle.changes | 5 +++++ coccinelle.spec | 2 ++ kill-env.diff | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 kill-env.diff diff --git a/coccinelle.changes b/coccinelle.changes index 3d9e295..54c465b 100644 --- a/coccinelle.changes +++ b/coccinelle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/coccinelle.spec b/coccinelle.spec index 3be8e31..7227558 100644 --- a/coccinelle.spec +++ b/coccinelle.spec @@ -26,6 +26,7 @@ Url: http://coccinelle.lip6.fr/ #Git-Clone: git://github.com/coccinelle/coccinelle Source: http://coccinelle.lip6.fr/distrib/%name-%version.tgz +Patch1: kill-env.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -59,6 +60,7 @@ fixing bugs in systems code. %prep %setup -q +%patch -P 1 -p1 %build autoreconf -fi diff --git a/kill-env.diff b/kill-env.diff new file mode 100644 index 0000000..4f4aac6 --- /dev/null +++ b/kill-env.diff @@ -0,0 +1,19 @@ +From: Jan Engelhardt +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.0.6/tools/pycocci +=================================================================== +--- coccinelle-1.0.6.orig/tools/pycocci ++++ coccinelle-1.0.6/tools/pycocci +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # + # Copyright (c) 2014 Luis R. Rodriguez + # Copyright (c) 2013 Johannes Berg