Sat Aug 7 14:23:23 2010 UTC ()
Update to 0.2.3.
- new URLs for HOMEPAGE and MASTER_SITES
- smaller DESCR (avoids pkglint's complaints)
- remove patch-a{a,b,c} (paths seem to be fixed inside configure/make scripts).

Changelog:

* 0.2.3
** Language:
- <= constraints relating an expression metavariable to one or more
  inherited expression metavariables that it should be a subexpression of
- the -inplace and -outplace options have been renamed -in_place and
  -out_place.  -in_place no longer makes a backup.  A backup can be
  requested using the option -backup_suffix, eg -backup_suffix .bk
- identifiers can be constrained to be different from an inherited
  identifier metavariable, or from a set containing both concrete
  identifiers and inherited identifier metavariables.
- support for ocaml scripting
- ast available in ocaml scripts

** Features:
- drop inconsistent paths check when only one node was matched
- allow #define id with no definition
- attempt to add newlines in the generated code when function calls in the
  smpl cause passing column 80
- allow - in front of statement level nests, if everything inside the nest
  is also -
- 'configure' looks for some system libraries: menhirLib, sexplib, pycaml.
  Not available libraries are replaced by a copy provided with the sources.
- added static for a function goes just before what is specified in the
  semantic patch, not before any comments etc.
- Add a new option, -ignore_unknown_options, to ease the integration
  of Coccinelle as a checker in a toolchain.
- error in python code causes immediate abort of spatch
- use the same algorithm for collecting grep tokens as for collecting
  glimpse tokens
- Add scripts/spatch.bash_completion for automatic completion of common
  options under the bash shell.
- Print rule name when a script rule crashes
- Allow the declaration of an expression list or parameter list
  metavariable to specify the number of expressions or parameters,
  respectively.

** Bugfix:
- drop inconsistent paths check when only one node was matched
- better take into account virtual rules when selecting glimpse tokens
- print diff when only a comment is added
- the type of the C code !x should be int regardless of the type of x
- allow python code at the beginning of an included file
- better adjustment of whitespace when deleting adjacent lines.  Thanks to
  Wolfram Sang for pointing out the problem.
- allow metavariables to be inherited from included files
- allow ? on goto
- more graceful failure on finding a strange character in a macro parameter
  list
- support Parameter metavariables
- add space after the last comma in an added portion of an argument list
- SmPL nameless struct should only match a nameless struct, not a nameless
  union.  Thanks to Peter Tummeltshammer for pointing out the problem.
- adjustments to storage don't modify inline as well
- matching and transformation allowed on inline
- allow removed field between two ... in structure initialization
- allow removing an entire structure initialization
- manage labels within do while 0 macros
- added space after : in printing a conditional expression.  Thanks to Josh
  Triplett for noticing the problem.
- dropped trailing whitespace when code at the end of a line is deleted.
  Thanks to Josh Triplett for noticing the problem.
- Fixed environment management when script rule uses cache.  Thanks to
  Bissyande for finding the problem.
- when false matches if with no else
- ensure { ... } with whencode checks to the end of the function.  Thanks to
  Rene Rydhof Hansen for finding the problem.

* 0.2.2
** Language:
- Added ToTestExpression to iso language, see standard.iso for an
  explanation
- Added depends on to initialize and finalize script code

** Features:
- Update Emacs mode (cocci.el) to support 'virtual' rules and fix other
  keywords sush as 'depends on', 'using', 'disable'
- better treatment of != 0 in isos, communtativity for ==/!= for all
  constants
- allow adding // comments and blank lines (even after cocci + code)
- Add support for multiple -I options

** Bugfix:
- correct interaction between virtual rules and included .cocci files
- improvement in treatment of ! in isos, to avoid duplicating + code
- improvement in treatment of metavars as isos, to avoid duplicating + code
  between toplevel and variable instantiation
- test expression of smpl conditional, etc no longer assumed to have type
  int
- correct + line numbers in the patch produced when using *
- iso constant metavariable matches an identifier whose name is all capital
  letters, eg NULL
- allow / at the end of the name of a directory (-dir) or patch prefix
  (-patch)
- dropped space in + code after the binding of a type metavariable that is
  a pointer type
- better handling of . or .. in -dir name
- allow keywords and metavariable names in identifier constraints (not sure
  keywords is very useful, though)
- no lubtype on arguments of && and || in SmPL
- allow unknown as type for array indices in SmPL
- support matching of static annotation on functions that are both static
  and inline
- support ENOTDIR error in Common.lfile_exists, to allow for the case where
  an include file is in a subdirectory that exists but is an ordinary file,
  not a directory.
- better management of unbound position variables that appear in
  constraints
- cause python parser to skip over // comments, hoping that // is not
  meaningful inside python
- require + on every line of a multiline comment
- correct calculation of line numbers when there is script code
- always annotate arguments of && || and ! as test expressions in C code.

* 0.2.1
** Language:
- Add virtual identifiers
- Add coccilib.report and coccilib.trac Python modules
- coccilib.org and coccilib.report are imported by default but not loaded
  in the current scope.

** Features:
- Parse_error_msg now more helpful.  New option -verbose_parsing for even
  more information.
- Improve Python import handling. They are imported once during script
  initialization.

** Bugfix:
- correct treatment of depends on with || for virtual rules

* 0.2.0
** Language:

** Features:
- Remove duplicated code in disjunctions
- Better error message when grep finds nothing relevant.  Thanks to Joe
  Perches for the suggestion.
- added -keep_comments option for the unparsing of the transformed code
- Option "-version" now also gives information about built-in
  Python binding support.
- slightly faster environment manipulation in pathological cases
- hack added to accept well-formed #define after function header

** Bugfix:
- Proper consideration of #define macro arguments in checking for the use
  of metavariables and in computing the line numbers of complex terms
- Better parsing of included .cocci files
- Put included .cocci files in the right order
- Bind position variables only once for #include
- Fix bug in include_match that caused everything to halt when all matches
  were discarded
- Merge unlikely/likely iso rules under a iso rule named unlikely
- Some fixes to coccicheck rules, thanks to Andrew Lunn
- Support groups in regular expression, thanks to Michael Stefaniuc

* 0.1.11

** Language:
- Meta-identifier/function and constant could be filtered from SmPL by
  regular expressions using the "~=" and "!~=" operators followed by
  an OCaml regular expression (see man Str) in double quote.
- Virtual rules, which can be referenced in depends, and set and unset
  using the command-line options -D
- ++ for multiple additions

** Features:
- coccicheck: a framework to check a series of SmPL files on a project
  see scripts/coccicheck for more information

** Bugfix:
- bind position variables to the correct starting position in the case of a
  complex statement such as an if or while.  Thanks to Derek Jones for
  pointing out the problem.
- checking for non mentioned case lines in switch should be unchecked.
- space should be printed after sizeof when there are no parentheses around
  the argument.  Thanks to Daniel Walker for pointing out the problem.
- avoid introducing sharing in propagating ! over () in treatment of isos
- save_excursion has to handle and rethrow exceptions
- eliminate unnecessary consideration of CVS strings.  Thanks to David
  Young for pointing out the problem.
- completely new treatment of statement metavariables
- better type checking for macro definitions
- drop regression testing in -parse_c

* 0.1.10

** Language:
- declarations allowed in switch, suggested by Derek M. Jones

** Features:
- use interval timer for timeouts.  Thanks to Derek M. Jones for the
  implementation.
- more flexible env.sh, thanks to Derek Jones.
- faster Python invocation
- simplify unparsing in the sgrep case

** Bugfix:
- for glimpse there is no point to create a pattern containing a numeric
  constant because glimpse doesn't index them
- add spaces after commas in function calls and function headers
- made python integration more like the ubuntu version
  http://patches.ubuntu.com/by-release/extracted/debian/c/coccinelle/0.1.5dbs-2/01-system-pycaml
  this fixes some memory management problems with None, True, and False
- correct labels associated with a switch in the CFG so that a statement
  metavariable can match a switch.  Thanks to Derek Jones for pointing out
  the problem.
- keep switch pattern within switch body.  Thanks to Derek Jones for
  pointing out the problem.
- Allow expanded tokens to be stored in metavariables, as long as they are
  not removed.  But this does currently allow them in + code, which will
  produce the expansion.  Thanks to Ali-Erdem Ozcan for pointing out the
  problem.
- improved adjustment of spacing when code removed at the beginning of a line

* 0.1.9

** Language:
- allow fresh identifiers to be declared using ## such that the value mixes
  both strings and previously declared metavariables

** Features:
- better handling of expanded code containing ##. Now compute the
  result.
- more precise warning message for the "'\' outside define".
  Thanks to Nicholas Mc Guire for pointing out the problem.
- more precise warning message related to ifdefization.
  Thanks to Derek Jones for pointing out the problem.
- we don't create any more certain files in /tmp (they may be a cause
  of security problems).
  Thanks to Eugeniy Meshcheryakov for pointing out the problem.
- More optimization for the case of just deleting a complete function.
  Allows this to happen without tracing through all the control-flow
  paths.  Thanks to Francois Bissyande for pointing out the problem.
- prevent code from being added to the beginning or end of a disjunction
- more information about why a script is not applied when using -debug option
- added -no_safe_expressions option
- added -no_loops option.  Ignores back edges derived from looping
  constructs.  This is unsafe, but perhaps useful for bug finding, as it can
  be more efficient.
- for semantic matches, allow "minus" on same code with multiple
  environments
- better error message for mismatch of parenthesis in column 0 with normal
  parenthesis.  Thanks to Derek Jones for pointing out the problem.
- allow disjunctions on function return types.  Thanks to Pierre Habouzit
  for pointing this out.

** Bugfix:
- keep disjunction in the proper order for structure initialization fields
- variables declared in different places should not seem to match each
  other
- drop complaints about label metavariables not being used
- drop test information from the type of an expression when the expression
  is bound to a metavariable
- nests should not extend beyond the before and after code, even if the
  before and after code matches the nest code
- nests should extend into conditionals that end in error exit
- take into account metavariables on "else".  Thanks to Derek Jones for
  pointing out the problem.
- print single quotes on generated character constants
- better typedef handling in the initialisation/affectation builtin
  isomorphism, cf -test init_affect_typedef
- support disjunction of types on variable declaration
- allow @ within strings in script code.  ignore // comment lines in script
  code.
- don't drop + code placed after the transformed code
- drop spaces produced by removing code before semicolons
- adjusted spacing within generated code
- less verbose -sp.  Thanks to Derek Jones for pointing out the problem.
- accept multiple type names in a SmPL typedef declaration.


(jym)
diff -r1.1.1.1 -r1.2 pkgsrc/devel/coccinelle/DESCR
diff -r1.8 -r1.9 pkgsrc/devel/coccinelle/Makefile
diff -r1.4 -r1.5 pkgsrc/devel/coccinelle/PLIST
diff -r1.6 -r1.7 pkgsrc/devel/coccinelle/distinfo
diff -r1.3 -r0 pkgsrc/devel/coccinelle/patches/patch-aa
diff -r1.3 -r0 pkgsrc/devel/coccinelle/patches/patch-ab
diff -r1.3 -r0 pkgsrc/devel/coccinelle/patches/patch-ac

cvs diff -r1.1.1.1 -r1.2 pkgsrc/devel/coccinelle/DESCR (expand / switch to unified diff)

--- pkgsrc/devel/coccinelle/DESCR 2009/03/21 23:50:53 1.1.1.1
+++ pkgsrc/devel/coccinelle/DESCR 2010/08/07 14:23:23 1.2
@@ -1,32 +1,9 @@ @@ -1,32 +1,9 @@
1The Linux operating system (OS) is evolving rapidly to improve 1Coccinelle is a program matching and transformation engine which provides
2performance and to provide new features. This evolution, however, 2the language SmPL (Semantic Patch Language) for specifying desired matches
3makes it difficult to maintain platform-specific code such as device 3and transformations in C code. Coccinelle was initially targeted towards
4drivers. Indeed, an evolution in a driver support library often 4performing collateral evolutions in Linux. Such evolutions comprise the
5triggers the need for multiple collateral evolutions in dependent 5changes that are needed in client code in response to evolutions in library
6device drivers, to bring the drivers up to date with the new library 6APIs, and may include modifications such as renaming a function, adding a
7API. Currently, collateral evolutions are mostly done manually. 7function argument whose value is somehow context-dependent, and reorganizing
8The large number of drivers, however, implies that this approach 8a data structure. Beyond collateral evolutions, Coccinelle is successfully
9is time-consuming and unreliable, leading to subtle errors when 9used (by us and others) for finding and fixing bugs in systems code.
10modifications are not done consistently. Moreover, as these collateral 
11evolutions are often poorly documented, the resulting maintenance 
12is difficult and costly, frequently introducing errors. If a driver 
13maintainer becomes unavailable, the driver quickly falls behind 
14the rest of the OS. 
15 
16In this project, we propose a language-based approach to address 
17the problem of collateral evolution in drivers. Specifically, we 
18are developing the development environment, Coccinelle, that provides 
19a transformation language for precisely expressing collateral 
20evolutions and an interactive transformation tool for applying 
21them. The key idea of Coccinelle is to shift the burden of collateral 
22evolution from the driver maintainer to the OS developer who performs 
23the original OS evolution, and who thus understands this evolution 
24best. In our vision, the OS developer first uses the Coccinelle 
25transformation language to write a semantic patch describing the 
26required collateral evolution in device drivers and then uses the 
27Coccinelle transformation tool to validate the semantic patch on 
28the drivers in the Linux source distribution. When he has confidence 
29in the correctness of the semantic patch, he distributes it for 
30use by the maintainers of other drivers. Overall, Coccinelle will 
31provide a means for formally documenting collateral evolutions and 
32for easing the application of these evolutions to driver code. 

cvs diff -r1.8 -r1.9 pkgsrc/devel/coccinelle/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/coccinelle/Makefile 2010/05/28 14:05:39 1.8
+++ pkgsrc/devel/coccinelle/Makefile 2010/08/07 14:23:23 1.9
@@ -1,24 +1,22 @@ @@ -1,24 +1,22 @@
1# $NetBSD: Makefile,v 1.8 2010/05/28 14:05:39 joerg Exp $ 1# $NetBSD: Makefile,v 1.9 2010/08/07 14:23:23 jym Exp $
2 2
3DISTNAME= coccinelle-0.1.8 3DISTNAME= coccinelle-0.2.3
4PKGREVISION= 1 
5CATEGORIES= devel 4CATEGORIES= devel
6MASTER_SITES= http://www.emn.fr/x-info/coccinelle/distrib/ 5MASTER_SITES= http://coccinelle.lip6.fr/distrib/
7#http://aryx.cs.uiuc.edu/~pad/software/project-coccinelle/ 
8EXTRACT_SUFX= .tgz 6EXTRACT_SUFX= .tgz
9 7
10MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.emn.fr/x-info/coccinelle/ 9HOMEPAGE= http://coccinelle.lip6.fr/
12COMMENT= Tool for writing and applying semantic patches 10COMMENT= Tool for writing and applying semantic patches
13LICENSE= gnu-gpl-v2 11LICENSE= gnu-gpl-v2
14 12
15BUILD_DEPENDS+= ocaml-findlib-[0-9]*:../../devel/ocaml-findlib 13BUILD_DEPENDS+= ocaml-findlib-[0-9]*:../../devel/ocaml-findlib
16DEPENDS+= menhir-[0-9]*:../../devel/menhir 14DEPENDS+= menhir-[0-9]*:../../devel/menhir
17 15
18PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
19MAKE_JOBS_SAFE= no 17MAKE_JOBS_SAFE= no
20 18
21HAS_CONFIGURE= yes 19HAS_CONFIGURE= yes
22USE_TOOLS= gmake perl 20USE_TOOLS= gmake perl
23REPLACE_PERL= configure 21REPLACE_PERL= configure
24BUILD_TARGET= all all.opt 22BUILD_TARGET= all all.opt

cvs diff -r1.4 -r1.5 pkgsrc/devel/coccinelle/PLIST (expand / switch to unified diff)

--- pkgsrc/devel/coccinelle/PLIST 2009/06/14 17:48:37 1.4
+++ pkgsrc/devel/coccinelle/PLIST 2010/08/07 14:23:23 1.5
@@ -1,24 +1,25 @@ @@ -1,24 +1,25 @@
1@comment $NetBSD: PLIST,v 1.4 2009/06/14 17:48:37 joerg Exp $ 1@comment $NetBSD: PLIST,v 1.5 2010/08/07 14:23:23 jym Exp $
2bin/spatch 2bin/spatch
3bin/spatch.opt 3bin/spatch.opt
4lib/dllpycaml_stubs.so 4lib/dllpycaml_stubs.so
5man/man1/spatch.1 5man/man1/spatch.1
 6share/coccinelle/ocaml/coccilib.cmi
6share/coccinelle/python/coccilib/__init__.py 7share/coccinelle/python/coccilib/__init__.py
7share/coccinelle/python/coccilib/coccigui/__init__.py 8share/coccinelle/python/coccilib/coccigui/__init__.py
8share/coccinelle/python/coccilib/coccigui/coccigui.py 9share/coccinelle/python/coccilib/coccigui/coccigui.py
9share/coccinelle/python/coccilib/coccigui/pycoccimodel.py 10share/coccinelle/python/coccilib/coccigui/pycoccimodel.py
10share/coccinelle/python/coccilib/coccigui/pygui.glade 11share/coccinelle/python/coccilib/coccigui/pygui.glade
11share/coccinelle/python/coccilib/coccigui/pygui.gladep 12share/coccinelle/python/coccilib/coccigui/pygui.gladep
12share/coccinelle/python/coccilib/coccigui/vim.py 13share/coccinelle/python/coccilib/coccigui/vim.py
13share/coccinelle/python/coccilib/coccigui/vimcom.py 14share/coccinelle/python/coccilib/coccigui/vimcom.py
14share/coccinelle/python/coccilib/coccigui/vimeditor.py 15share/coccinelle/python/coccilib/coccigui/vimeditor.py
15share/coccinelle/python/coccilib/coccigui/vimembed.py 16share/coccinelle/python/coccilib/coccigui/vimembed.py
16share/coccinelle/python/coccilib/elems.py 17share/coccinelle/python/coccilib/elems.py
 18share/coccinelle/python/coccilib/org.py
17share/coccinelle/python/coccilib/output.py 19share/coccinelle/python/coccilib/output.py
18share/coccinelle/python/coccilib/output_base.py 20share/coccinelle/python/coccilib/report.py
19share/coccinelle/python/coccilib/output_gui.py 21share/coccinelle/python/coccilib/trac.py
20share/coccinelle/python/coccilib/output_trac.py 
21share/coccinelle/spatch 22share/coccinelle/spatch
22share/coccinelle/spatch.opt 23share/coccinelle/spatch.opt
23share/coccinelle/standard.h 24share/coccinelle/standard.h
24share/coccinelle/standard.iso 25share/coccinelle/standard.iso

cvs diff -r1.6 -r1.7 pkgsrc/devel/coccinelle/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/coccinelle/distinfo 2009/09/25 09:13:58 1.6
+++ pkgsrc/devel/coccinelle/distinfo 2010/08/07 14:23:23 1.7
@@ -1,8 +1,5 @@ @@ -1,8 +1,5 @@
1$NetBSD: distinfo,v 1.6 2009/09/25 09:13:58 wiz Exp $ 1$NetBSD: distinfo,v 1.7 2010/08/07 14:23:23 jym Exp $
2 2
3SHA1 (coccinelle-0.1.8.tgz) = 8531f601873950ea79f60671ea8de76365d86277 3SHA1 (coccinelle-0.2.3.tgz) = 98e0221e5b180cebc8191a0e1b78f295d897d902
4RMD160 (coccinelle-0.1.8.tgz) = b55954f191bfd286df7005836ba5bb025d077cf3 4RMD160 (coccinelle-0.2.3.tgz) = 92e3ff5faeaa383a3ca186a76d46e662bec77965
5Size (coccinelle-0.1.8.tgz) = 1914684 bytes 5Size (coccinelle-0.2.3.tgz) = 2228130 bytes
6SHA1 (patch-aa) = 12614a91c49a3bbf4d707b4a65fee5e3aba58b3f 
7SHA1 (patch-ab) = 0be4fb19afdb530c5d27f0611cc9d245b6db0bad 
8SHA1 (patch-ac) = c74bfbb076b80143a8ecc5e65b6e48bbd12acce5 

File Deleted: pkgsrc/devel/coccinelle/patches/Attic/patch-aa

File Deleted: pkgsrc/devel/coccinelle/patches/Attic/patch-ab

File Deleted: pkgsrc/devel/coccinelle/patches/Attic/patch-ac