[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, debian, updated. debian/20081103.git7172ec57-1-1-g4e6f432

Luca Capello luca at pca.it
Wed Dec 17 10:51:28 UTC 2008


The following commit has been merged in the debian branch:
commit 4e6f432d739c51cd95ba382570e6f8d9ac737090
Author: Luca Capello <luca at pca.it>
Date:   Wed Dec 17 11:50:54 2008 +0100

    debian/*: manage /boot/uImage.bin symlink at postinst/prerm

diff --git a/debian/changelog b/debian/changelog
index f09d931..ea5ce40 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+linux-2.6-openmoko (20081103.git7172ec57-2) UNRELEASED; urgency=low
+
+  * This version explicitly does not support vfat /boot partition
+    anymore, since dpkg does not support non-POSIX filesystems.
+  * debian/postinst:
+    + create the uImage.bin symlink.
+  * debian/prerm:
+    - remove the uImage.bin symlink.
+  * debian/rules:
+    + fill in the Debian version in postinst.in and prerm.in.
+    - remove postinst and prerm at clean target.
+    - do not install uImage.bin in order to preserve space, thanks to
+      Timo Juhani Lindfors <timo.lindfors at iki.fi>.
+
+ --
+
 linux-2.6-openmoko (20081103.git7172ec57-1) pkg-fso; urgency=low
 
   * New Git Checkout:
diff --git a/debian/postinst.in b/debian/postinst.in
new file mode 100644
index 0000000..d74819f
--- /dev/null
+++ b/debian/postinst.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+# Create the /boot/uImage.bin symlink
+if [ "$1" = "configure" ]; then
+    VERSION=@PACKAGE_VERSION@
+    UBOOT_IMAGE=/boot/uImage.bin
+    if [ ! -e "$UBOOT_IMAGE" ]; then
+	cd /boot && ln -s vmlinuz-"$VERSION" "$UBOOT_IMAGE"
+    fi
+fi
diff --git a/debian/prerm.in b/debian/prerm.in
new file mode 100644
index 0000000..739045d
--- /dev/null
+++ b/debian/prerm.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+# Remove the /boot/uImage.bin symlink
+if [ "$1" = "remove" -o "$1" = "upgrade" ]; then
+    VERSION=@PACKAGE_VERSION@
+    UBOOT_IMAGE=/boot/uImage.bin
+    if [ "`readlink $UBOOT_IMAGE`" = "vmlinuz-$VERSION" ]; then
+	rm -f "$UBOOT_IMAGE"
+    fi
+fi
diff --git a/debian/rules b/debian/rules
index bed7507..804b936 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,12 +19,17 @@ build-stamp: $(QUILT_STAMPFN)
 
 	$(MAKE) ARCH=arm EXTRAVERSION=-$(VERSION_EXTRA)
 
+	# Prepare postinst/prerm
+	for I in postinst prerm; do \
+		sed -e 's/@PACKAGE_VERSION@/${VERSION_FULL}/' debian/$$I.in >debian/$$I; \
+	done
+
 	touch build-stamp
 
 clean: unpatch
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp
+	rm -f build-stamp debian/postinst debian/prerm
 
 	rm -f .config* linux.bin vmlinuz-$(VERSION_FULL)
 
@@ -51,7 +56,6 @@ install-stamp: build
 	# Install the uImage (this is an ugly hack, I know)
 	mkdir `pwd`/debian/`dh_listpackages`/boot/
 	cp vmlinuz-$(VERSION_FULL) `pwd`/debian/`dh_listpackages`/boot/
-	cp vmlinuz-$(VERSION_FULL) `pwd`/debian/`dh_listpackages`/boot/uImage.bin
 
 	# Install the modules.
 	$(MAKE) INSTALL_MOD_STRIP=1 \

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list