Skip to contentSkip to conversation

deb target

RFC PATCH In review Wichert Akkerman 2 participants 4 messages Oct 11, 2003 – Oct 19, 2003 Kbuild

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 deb target

I sent this to the listed contact for kbuild first, but Michael Elizabeth Chastain tells me he is no longer active in kernel development and the kbuild-devel list seems both inactive and defunct (my post never made it to any of the list archives), so I'm reposting this here.

For a while now I've been missing a deb target in kbuild, especially since there is a simple rpm target. While Debian does have a tool to create kernel packages (make-kpkg from the kernel-package package) I felt there was a need for a simpler method build into kbuild.

The patch is imperfect and could use some changes from someone who is more familiar with kbuild, but It Works For Me(tm). I would appreciate any feedback people have on it.

Wichert.

Makefile +14 -1
diff -wurN linux-2.6.0-test7/Makefile linux-2.5/Makefile
@@ -780,7 +780,7 @@
 
 quiet_cmd_rmclean = RM  $$(CLEAN_FILES)
 cmd_rmclean	  = rm -f $(CLEAN_FILES)
-clean: archclean $(clean-dirs)
+clean: archclean debclean $(clean-dirs)
 	$(call cmd,rmclean)
 	@find . $(RCS_FIND_IGNORE) \
 	 	\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
@@ -843,6 +843,19 @@
 tags: FORCE
 	$(call cmd,tags)
 
+# DEB target
+# ---------------------------------------------------------------------------
+
+.PHONY: deb debclean
+
+debclean:
+	rm -rf debian/tmp
+	rm -f debian/changelog debian/control debian/files
+	rmdir debian
+
+deb:
+	$(srctree)/scripts/builddeb
+
 # RPM target
 # ---------------------------------------------------------------------------
 
scripts/builddeb +74 -0

74 lines not on this page · raw message

Signature · 9 lines
Wichert Akkerman <[email protected]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.


----- End forwarded message -----

-- 
Wichert Akkerman <[email protected]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.
#1 lore raw
Quoted 5 lines · Wichert Akkerman

For a while now I've been missing a deb target in kbuild, especially since there is a simple rpm target. While Debian does have a tool to create kernel packages (make-kpkg from the kernel-package package) I felt there was a need for a simpler method build into kbuild.

Thanks.
I will save the patch until later.
For now we are in bug-fix mode, and this is clearly new functionality.

Sam

#2 lore raw
In reply to Wichert Akkerman

Here is a new versino of my make deb patch. There are a few changes since the previous version:

* no longer use make install, since that will call installkernel which should not happen on package creation. Instead manually install the kernel image, config and system.map using a trick taken from scripts/mkspec to guess the filename of the kernel image.

* no longer use Linus' name and email address but generate a name and email address based on the currently logged in user. This to prevent possible unwanted email to Linus.

* use /etc/kernel/ for install/removal handling scripts. This will also be supported by the next version of Debian's kernel-package.

* obligatory typo fixes.

As always, any comments, bugreports and other forms of feedback are welcome.

Wichert.

Makefile +15 -1
diff -wurN linux-2.6.0-test8/Makefile linux-2.5/Makefile
@@ -780,7 +780,7 @@
 
 quiet_cmd_rmclean = RM  $$(CLEAN_FILES)
 cmd_rmclean	  = rm -f $(CLEAN_FILES)
-clean: archclean $(clean-dirs)
+clean: archclean debclean $(clean-dirs)
 	$(call cmd,rmclean)
 	@find . $(RCS_FIND_IGNORE) \
 	 	\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
@@ -843,6 +843,20 @@
 tags: FORCE
 	$(call cmd,tags)
 
+# DEB target
+# ---------------------------------------------------------------------------
+
+.PHONY: deb debclean
+
+debclean:
+	rm -rf debian/tmp
+	rm -f debian/changelog debian/control debian/files
+	-rmdir debian
+
+deb: boot
+	@echo '  Creating kernel deb package'
+	@$(srctree)/scripts/builddeb
+
 # RPM target
 # ---------------------------------------------------------------------------
 
scripts/builddeb +77 -0

77 lines not on this page · raw message

Signature · 2 lines
Wichert Akkerman <[email protected]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.
#3 lore raw

A third version of this patch. A few important changes:

* make boot does not exist, use make all (oops)

* do not try to install modules if they are not enabled

* update the comments in the scripts/builddeb script to reflect the new naming for pre- and postinstall scripts.

* do not abort when running make debclean when there is nothing to clean

Wichert.

Makefile +15 -1
diff -wurN linux-2.6.0-test8/Makefile linux-2.5/Makefile
@@ -780,7 +780,7 @@
 
 quiet_cmd_rmclean = RM  $$(CLEAN_FILES)
 cmd_rmclean	  = rm -f $(CLEAN_FILES)
-clean: archclean $(clean-dirs)
+clean: archclean debclean $(clean-dirs)
 	$(call cmd,rmclean)
 	@find . $(RCS_FIND_IGNORE) \
 	 	\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
@@ -843,6 +843,20 @@
 tags: FORCE
 	$(call cmd,tags)
 
+# DEB target
+# ---------------------------------------------------------------------------
+
+.PHONY: deb debclean
+
+debclean:
+	rm -rf debian/tmp
+	rm -f debian/changelog debian/control debian/files
+	-rmdir debian
+
+deb: all
+	@echo '  Creating kernel deb package'
+	@$(srctree)/scripts/builddeb
+
 # RPM target
 # ---------------------------------------------------------------------------
 
scripts/builddeb +82 -0

82 lines not on this page · raw message

Signature · 2 lines
Wichert Akkerman <[email protected]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.