LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kbuild: allow to specify a custom revision for .deb packages
@ 2008-02-13 10:18 Frans Pop
2008-02-13 11:42 ` [PATCH] kbuild: allow alternative hook script dir in " Frans Pop
2008-02-15 12:45 ` [PATCH] kbuild: allow to specify a custom revision for " Sam Ravnborg
0 siblings, 2 replies; 4+ messages in thread
From: Frans Pop @ 2008-02-13 10:18 UTC (permalink / raw)
To: linux-kernel; +Cc: sam
From: Frans Pop <elendil@planet.nl>
Allow to specify a custom revision for the generated .deb package
by exporting the environment variable KERNELDEBREVISION.
Signed-off-by: Frans Pop <elendil@planet.nl>
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ba6bf5d..2577dec 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -14,6 +14,11 @@ set -e
# Some variables and settings used throughout the script
version=$KERNELRELEASE
revision=`cat .version`
+if [ x"$KERNELDEBREVISION" = x ]; then
+ debrevision=$version-$revision
+else
+ debrevision=$KERNELDEBREVISION
+fi
tmpdir="$objtree/debian/tmp"
packagename=linux-$version
@@ -66,7 +71,7 @@ done
name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
# Generate a simple changelog template
cat <<EOF > debian/changelog
-linux ($version-$revision) unstable; urgency=low
+linux ($debrevision) unstable; urgency=low
* A standard release
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] kbuild: allow alternative hook script dir in .deb packages
2008-02-13 10:18 [PATCH] kbuild: allow to specify a custom revision for .deb packages Frans Pop
@ 2008-02-13 11:42 ` Frans Pop
2008-02-15 12:46 ` Sam Ravnborg
2008-02-15 12:45 ` [PATCH] kbuild: allow to specify a custom revision for " Sam Ravnborg
1 sibling, 1 reply; 4+ messages in thread
From: Frans Pop @ 2008-02-13 11:42 UTC (permalink / raw)
To: linux-kernel; +Cc: sam
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
From: Frans Pop <elendil@planet.nl>
Hook scripts in the default directory /etc/kernel are also
executed by packages created using make-kpkg (including official
Debian kernels). Allow to specify an alternative hook scripts
directory by exporting the environment variable KERNELDEBHOOKDIR
so that this can be avoided.
Signed-off-by: Frans Pop <elendil@planet.nl>
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 2577dec..c76bbf1 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -55,14 +55,17 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
fi
# Install the maintainer scripts
+# Note: hook scripts under /etc/kernel are also executed by kernel packages
+# built using make-kpkg (from the "kernelpackage" package)
+debhookdir=${KERNELDEBHOOKDIR:-/etc/kernel}
for script in postinst postrm preinst prerm ; do
- mkdir -p "$tmpdir/etc/kernel/$script.d"
+ mkdir -p "$tmpdir$debhookdir/$script.d"
cat <<EOF > "$tmpdir/DEBIAN/$script"
#!/bin/sh
set -e
-test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
+test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
exit 0
EOF
chmod 755 "$tmpdir/DEBIAN/$script"
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: allow to specify a custom revision for .deb packages
2008-02-13 10:18 [PATCH] kbuild: allow to specify a custom revision for .deb packages Frans Pop
2008-02-13 11:42 ` [PATCH] kbuild: allow alternative hook script dir in " Frans Pop
@ 2008-02-15 12:45 ` Sam Ravnborg
1 sibling, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2008-02-15 12:45 UTC (permalink / raw)
To: Frans Pop; +Cc: linux-kernel
On Wed, Feb 13, 2008 at 11:18:11AM +0100, Frans Pop wrote:
> From: Frans Pop <elendil@planet.nl>
>
> Allow to specify a custom revision for the generated .deb package
> by exporting the environment variable KERNELDEBREVISION.
If this is needed I think we need such functionality
across all package targets.
So please try to come up with a solution that would
fit rpm as well as deb.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: allow alternative hook script dir in .deb packages
2008-02-13 11:42 ` [PATCH] kbuild: allow alternative hook script dir in " Frans Pop
@ 2008-02-15 12:46 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2008-02-15 12:46 UTC (permalink / raw)
To: Frans Pop; +Cc: linux-kernel
On Wed, Feb 13, 2008 at 12:42:18PM +0100, Frans Pop wrote:
> From: Frans Pop <elendil@planet.nl>
>
> Hook scripts in the default directory /etc/kernel are also
> executed by packages created using make-kpkg (including official
> Debian kernels). Allow to specify an alternative hook scripts
> directory by exporting the environment variable KERNELDEBHOOKDIR
> so that this can be avoided.
Do we have similar hook scripts for rpm for instance?
If we have then a deb specific solution is not acceptable,
we would need something that works across all packages.
Does this btw have to be an environment variable?
Why not make it a config option?
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-15 12:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-13 10:18 [PATCH] kbuild: allow to specify a custom revision for .deb packages Frans Pop
2008-02-13 11:42 ` [PATCH] kbuild: allow alternative hook script dir in " Frans Pop
2008-02-15 12:46 ` Sam Ravnborg
2008-02-15 12:45 ` [PATCH] kbuild: allow to specify a custom revision for " Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).