[PATCH] show patch names

Oliver Xymoron (oxymoron@waste.org)
Wed, 13 Jan 1999 11:32:19 -0600 (CST)


This four-line patch provides a means for listing what patches have been
built into a kernel. This will help track non-standard kernel versions,
such as those released by Redhat, or Alan's ac series, etc. more easily.

With this patch in place, each new patch can include a file of the form
"patchname.[identifier]" in the top level source directory and
[identifier] will then be added to the kernel version string. For
instance, Alan's ac patches could include a file named patchdesc.ac2
(containing a change log, perhaps), and the resulting kernel would be
identified as 2.2.0-pre6+ac2, both at boot and by uname.

This may prove especially useful for tracking problems with kernels built
by distribution packagers and problems reported by automated tools.

diff -uNr linux-2.2.0-pre6/Makefile linux/Makefile
--- linux-2.2.0-pre6/Makefile Wed Jan 6 17:01:15 1999
+++ linux/Makefile Tue Jan 12 17:31:33 1999
@@ -281,7 +281,10 @@
@mv -f .ver $@

include/linux/version.h: ./Makefile
- @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
+ @echo -n \#define UTS_RELEASE \"$(KERNELRELEASE) > .ver
+ @find -maxdepth 1 -name 'patchdesc.*[^~]' -printf '+%f' | \
+ sed -e 's/+patchdesc\./+/g' >> .ver
+ @echo \" >> .ver
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
@mv -f .ver $@
diff -uNr linux-2.2.0-pre6/patchdesc.names linux/patchdesc.names
--- linux-2.2.0-pre6/patchdesc.names Wed Dec 31 18:00:00 1969
+++ linux/patchdesc.names Tue Jan 12 17:30:49 1999
@@ -0,0 +1,7 @@
+This patch adds a simple method to identify patched kernels. Patches
+that include a file named 'patchdesc.*' in the top level source
+directory will cause the kernel to add the file extension to the
+version that is reported by uname(1). For instance, this file will
+result in the 2.x.x+name being reported.
+
+oxymoron@waste.org Jan 12 1999

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/