diff options
author | wiz <wiz@pkgsrc.org> | 2009-03-21 23:50:53 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2009-03-21 23:50:53 +0000 |
commit | 6c727a4354a27bd4d325448890944e33e40b2a45 (patch) | |
tree | 09f95c078f38bdcde1209221ddd098560afdac94 /devel | |
parent | 3d774c235b854d89dbff05cc1d7ba391c01e865b (diff) | |
download | pkgsrc-6c727a4354a27bd4d325448890944e33e40b2a45.tar.gz |
Initial import of coccinelle-0.1.6:
The Linux operating system (OS) is evolving rapidly to improve
performance and to provide new features. This evolution, however,
makes it difficult to maintain platform-specific code such as device
drivers. Indeed, an evolution in a driver support library often
triggers the need for multiple collateral evolutions in dependent
device drivers, to bring the drivers up to date with the new library
API. Currently, collateral evolutions are mostly done manually.
The large number of drivers, however, implies that this approach
is time-consuming and unreliable, leading to subtle errors when
modifications are not done consistently. Moreover, as these collateral
evolutions are often poorly documented, the resulting maintenance
is difficult and costly, frequently introducing errors. If a driver
maintainer becomes unavailable, the driver quickly falls behind
the rest of the OS.
In this project, we propose a language-based approach to address
the problem of collateral evolution in drivers. Specifically, we
are developing the development environment, Coccinelle, that provides
a transformation language for precisely expressing collateral
evolutions and an interactive transformation tool for applying
them. The key idea of Coccinelle is to shift the burden of collateral
evolution from the driver maintainer to the OS developer who performs
the original OS evolution, and who thus understands this evolution
best. In our vision, the OS developer first uses the Coccinelle
transformation language to write a semantic patch describing the
required collateral evolution in device drivers and then uses the
Coccinelle transformation tool to validate the semantic patch on
the drivers in the Linux source distribution. When he has confidence
in the correctness of the semantic patch, he distributes it for
use by the maintainers of other drivers. Overall, Coccinelle will
provide a means for formally documenting collateral evolutions and
for easing the application of these evolutions to driver code.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/coccinelle/DESCR | 32 | ||||
-rw-r--r-- | devel/coccinelle/Makefile | 38 | ||||
-rw-r--r-- | devel/coccinelle/PLIST | 27 | ||||
-rw-r--r-- | devel/coccinelle/distinfo | 6 | ||||
-rw-r--r-- | devel/coccinelle/patches/patch-aa | 52 |
5 files changed, 155 insertions, 0 deletions
diff --git a/devel/coccinelle/DESCR b/devel/coccinelle/DESCR new file mode 100644 index 00000000000..7f11a030bbd --- /dev/null +++ b/devel/coccinelle/DESCR @@ -0,0 +1,32 @@ +The Linux operating system (OS) is evolving rapidly to improve +performance and to provide new features. This evolution, however, +makes it difficult to maintain platform-specific code such as device +drivers. Indeed, an evolution in a driver support library often +triggers the need for multiple collateral evolutions in dependent +device drivers, to bring the drivers up to date with the new library +API. Currently, collateral evolutions are mostly done manually. +The large number of drivers, however, implies that this approach +is time-consuming and unreliable, leading to subtle errors when +modifications are not done consistently. Moreover, as these collateral +evolutions are often poorly documented, the resulting maintenance +is difficult and costly, frequently introducing errors. If a driver +maintainer becomes unavailable, the driver quickly falls behind +the rest of the OS. + +In this project, we propose a language-based approach to address +the problem of collateral evolution in drivers. Specifically, we +are developing the development environment, Coccinelle, that provides +a transformation language for precisely expressing collateral +evolutions and an interactive transformation tool for applying +them. The key idea of Coccinelle is to shift the burden of collateral +evolution from the driver maintainer to the OS developer who performs +the original OS evolution, and who thus understands this evolution +best. In our vision, the OS developer first uses the Coccinelle +transformation language to write a semantic patch describing the +required collateral evolution in device drivers and then uses the +Coccinelle transformation tool to validate the semantic patch on +the drivers in the Linux source distribution. When he has confidence +in the correctness of the semantic patch, he distributes it for +use by the maintainers of other drivers. Overall, Coccinelle will +provide a means for formally documenting collateral evolutions and +for easing the application of these evolutions to driver code. diff --git a/devel/coccinelle/Makefile b/devel/coccinelle/Makefile new file mode 100644 index 00000000000..ffb07c3fdc4 --- /dev/null +++ b/devel/coccinelle/Makefile @@ -0,0 +1,38 @@ +# $NetBSD: Makefile,v 1.1.1.1 2009/03/21 23:50:53 wiz Exp $ +# + +DISTNAME= coccinelle-0.1.6 +CATEGORIES= devel +MASTER_SITES= http://www.emn.fr/x-info/coccinelle/distrib/ +EXTRACT_SUFX= .tgz + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.emn.fr/x-info/coccinelle/ +COMMENT= Tool for writing and applying semantic patches + +PKG_DESTDIR_SUPPORT= user-destdir + +HAS_CONFIGURE= yes +USE_TOOLS= gmake perl +REPLACE_PERL= configure + +CONFIGURE_ARGS+= --prefix=${PREFIX} +CONFIG_SHELL= ${PERL5} + +SUBST_CLASSES+= python +SUBST_FILES.python+= pycaml/Makefile +SUBST_SED.python+= -e "s, python , ${PYTHONBIN} ,g" +SUBST_STAGE.python= post-configure +SUBST_MESSAGE.python= Fixing python executable name. + +TEST_TARGET= test + +.include "../../mk/bsd.fast.prefs.mk" + +.if ${OPSYS} != "Linux" +BUILDLINK_TRANSFORM+= rm:-ldl +.endif + +.include "../../lang/ocaml/buildlink3.mk" +.include "../../lang/python/application.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/coccinelle/PLIST b/devel/coccinelle/PLIST new file mode 100644 index 00000000000..0af4067ed78 --- /dev/null +++ b/devel/coccinelle/PLIST @@ -0,0 +1,27 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2009/03/21 23:50:53 wiz Exp $ +bin/spatch +lib/dllpycaml_stubs.so +man/man1/spatch.1 +share/coccinelle/python/coccilib/Makefile +share/coccinelle/python/coccilib/__init__.py +share/coccinelle/python/coccilib/coccigui/Makefile +share/coccinelle/python/coccilib/coccigui/__init__.py +share/coccinelle/python/coccilib/coccigui/coccigui.py +share/coccinelle/python/coccilib/coccigui/pycoccimodel.py +share/coccinelle/python/coccilib/coccigui/pygui.glade +share/coccinelle/python/coccilib/coccigui/pygui.gladep +share/coccinelle/python/coccilib/coccigui/vim.py +share/coccinelle/python/coccilib/coccigui/vimcom.py +share/coccinelle/python/coccilib/coccigui/vimeditor.py +share/coccinelle/python/coccilib/coccigui/vimembed.py +share/coccinelle/python/coccilib/elems.py +share/coccinelle/python/coccilib/output.py +share/coccinelle/python/coccilib/output_base.py +share/coccinelle/python/coccilib/output_trac.py +share/coccinelle/spatch.opt +share/coccinelle/standard.h +share/coccinelle/standard.iso +@dirrm share/coccinelle/python/coccilib/coccigui +@dirrm share/coccinelle/python/coccilib +@dirrm share/coccinelle/python +@dirrm share/coccinelle diff --git a/devel/coccinelle/distinfo b/devel/coccinelle/distinfo new file mode 100644 index 00000000000..325b1edbe10 --- /dev/null +++ b/devel/coccinelle/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2009/03/21 23:50:53 wiz Exp $ + +SHA1 (coccinelle-0.1.6.tgz) = f027dc3f14b7e9b9ad0c28d73e57c01dc7ac02a6 +RMD160 (coccinelle-0.1.6.tgz) = 2836e816aa16147d18051265563164b6de73a447 +Size (coccinelle-0.1.6.tgz) = 3308204 bytes +SHA1 (patch-aa) = 4322764ba5a7572aafe9d5fdd8d8ce7e6bc43cc1 diff --git a/devel/coccinelle/patches/patch-aa b/devel/coccinelle/patches/patch-aa new file mode 100644 index 00000000000..138b434cf3e --- /dev/null +++ b/devel/coccinelle/patches/patch-aa @@ -0,0 +1,52 @@ +$NetBSD: patch-aa,v 1.1.1.1 2009/03/21 23:50:53 wiz Exp $ + +--- Makefile.orig 2009-03-20 18:15:41.000000000 +0000 ++++ Makefile +@@ -207,12 +207,19 @@ install-common: + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(SHAREDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 +- cp standard.h $(DESTDIR)$(SHAREDIR) +- cp standard.iso $(DESTDIR)$(SHAREDIR) +- cp docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/ ++ ${BSD_INSTALL_DATA} standard.h $(DESTDIR)$(SHAREDIR) ++ ${BSD_INSTALL_DATA} standard.iso $(DESTDIR)$(SHAREDIR) ++ ${BSD_INSTALL_DATA} docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/ + mkdir -p $(DESTDIR)$(SHAREDIR)/python +- cp -a python/coccilib $(DESTDIR)$(SHAREDIR)/python +- cp -f dllpycaml_stubs.so $(DESTDIR)$(LIBDIR) ++ mkdir -p $(DESTDIR)$(SHAREDIR)/python/coccilib ++ ${BSD_INSTALL_DATA} python/coccilib/Makefile \ ++ $(DESTDIR)$(SHAREDIR)/python/coccilib ++ ${BSD_INSTALL_DATA} python/coccilib/*.* \ ++ $(DESTDIR)$(SHAREDIR)/python/coccilib ++ mkdir -p $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui ++ ${BSD_INSTALL_DATA} python/coccilib/coccigui/* \ ++ $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui ++ ${BSD_INSTALL_LIB} dllpycaml_stubs.so $(DESTDIR)$(LIBDIR) + @echo "" + @echo "You can also install spatch by copying the program spatch" + @echo "(available in this directory) anywhere you want and" +@@ -221,17 +228,18 @@ install-common: + + # user will use spatch to run spatch.opt (native) + install: all.opt install-common +- cp spatch.opt $(DESTDIR)$(SHAREDIR) +- cat scripts/spatch.sh | sed "s|SHAREDIR|$(DESTDIR)$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch ++ ${BSD_INSTALL_PROGRAM} spatch.opt $(DESTDIR)$(SHAREDIR) ++ cat scripts/spatch.sh | sed "s|SHAREDIR|$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch ++ chmod 555 $(DESTDIR)$(BINDIR)/spatch + + # user will use spatch to run spatch (bytecode) + install-byte: all install-common +- cp spatch $(DESTDIR)$(SHAREDIR) ++ ${BSD_INSTALL_PROGRAM} spatch $(DESTDIR)$(SHAREDIR) + cat scripts/spatch.sh | sed "s|\.opt||" | sed "s|SHAREDIR|$(DESTDIR)$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch + + # user will use spatch.opt to run spatch.opt (native) + install-opt: all.opt install-common +- cp spatch.opt $(DESTDIR)$(SHAREDIR) ++ ${BSD_INSTALL_PROGRAM} spatch.opt $(DESTDIR)$(SHAREDIR) + cat scripts/spatch.sh | sed "s|SHAREDIR|$(DESTDIR)$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch.opt + + uninstall: |