From 3c40422a17077fd148b7b2e31894728723a20620 Mon Sep 17 00:00:00 2001 From: branch-fixup Date: Sat, 21 Mar 2009 23:50:53 +0000 Subject: [PATCH] Add files from parent branch HEAD: devel/coccinelle/DESCR devel/coccinelle/PLIST devel/coccinelle/patches/patch-aa --- devel/coccinelle/DESCR | 32 +++++++++++++++++++ devel/coccinelle/PLIST | 27 ++++++++++++++++ devel/coccinelle/patches/patch-aa | 52 +++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 devel/coccinelle/DESCR create mode 100644 devel/coccinelle/PLIST create mode 100644 devel/coccinelle/patches/patch-aa diff --git a/devel/coccinelle/DESCR b/devel/coccinelle/DESCR new file mode 100644 index 000000000000..7f11a030bbd6 --- /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/PLIST b/devel/coccinelle/PLIST new file mode 100644 index 000000000000..69fe093ec071 --- /dev/null +++ b/devel/coccinelle/PLIST @@ -0,0 +1,27 @@ +@comment $NetBSD$ +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/patches/patch-aa b/devel/coccinelle/patches/patch-aa new file mode 100644 index 000000000000..9902b59d58f2 --- /dev/null +++ b/devel/coccinelle/patches/patch-aa @@ -0,0 +1,52 @@ +$NetBSD$ + +--- 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: -- 2.41.0