FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-23-2009, 01:38 PM
Andy Whitcroft
 
Default UBUNTU: mainline-build -- add build machinary for mainline builds

Add support for mainline builds within our tree. From a repository with
an ubuntu kernel with a remote containing the required mainline build we
are able to build .debs for those releases. These are packaged such that
they do not collide with our own builds.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
debian/scripts/misc/mainline-build | 127 ++++++++++++++++++++++++++++++++++++
1 files changed, 127 insertions(+), 0 deletions(-)
create mode 100755 debian/scripts/misc/mainline-build

diff --git a/debian/scripts/misc/mainline-build b/debian/scripts/misc/mainline-build
new file mode 100755
index 0000000..969cffa
--- /dev/null
+++ b/debian/scripts/misc/mainline-build
@@ -0,0 +1,127 @@
+#! /bin/bash
+
+P="mainline-build"
+
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $P <tag>" 1>&2
+ exit 1
+fi
+
+commit="$1"
+
+long=`git describe "$commit"`
+if [ "$?" -ne 0 ]; then
+ echo "$P: $commit: invalid commit" 1>&2
+ exit 1
+fi
+case "$long" in
+v*-*)
+ full_version="${long#v}"
+ full_version="${full_version%%-*}"
+ abinum="$full_version${long##*-}"
+ ;;
+v*)
+ full_version="${long#v}"
+ abinum="$full_version"
+ ;;
+*)
+ echo "$P: $commit: mapped to '$long' unable to process" 1>&2
+ exit 1
+esac
+
+# The base version is always the first X.Y.Z part of the version number. If we
+# do not maintain this then the modules directory will not match uname -r.
+version=`echo "$full_version" | sed -e 's/([0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*).*/1/'`
+
+# Encode the real version number plus the abbreviated sha1 from git describe
+# output as the ABI. We encode the version number by expanding the numbers
+# to be 2 digits and removing the '.' and '-' characters, for example:
+#
+# 2.6.27.12 02062712
+# 2.6.29-rc3 020629rc3
+#
+abinum=`echo "$abinum" | awk -F'[.-]' '{
+ for (i = 1; i <= NF; i++) {
+ if ($i ~ /^[0-9][0-9]*$/) {
+ printf("%02d", $i);
+ } else {
+ printf("%s", $i);
+ }
+ }
+}'`
+
+release=`pwd`
+release=${release#*/ubuntu-}
+release=${release%-build}
+
+echo "full_version<$full_version>"
+echo "version<$version>"
+echo "long<$long>"
+echo "abinum<$abinum>"
+
+# NOTE: a - in the branch name seems to be causing issues.
+branch="BUILD.$abinum"
+branch=`echo "$branch" | sed -e 's/-/./g'`
+
+git checkout -f origin/master
+git branch -D "$branch"
+
+#
+# Checkout the source at the specified version.
+#
+git checkout -b "$branch" "v$full_version" -- || exit 1
+
+#
+# Pull in the packaging from the head of our tree.
+#
+git checkout origin/master -- debian
+git commit -a -m "base packaging"
+
+#
+# Rebuild the changelog.
+#
+rm -f debian/changelog
+EDITOR=":" dch -v "${version}-$abinum" --distribution "$release"
+ --package linux --create
+sed -e "s/* .*/* Mainline release $version/"
+ <debian/changelog >debian/changelog.new
+mv -f debian/changelog.new debian/changelog
+git commit -a -m "debian changelog"
+
+#
+# Default any new configuration options.
+#
+debian/rules defaultconfigs
+git commit -a -m "default configs"
+
+#
+# Disable the ABI, module, and aliases checks.
+#
+cat - <<EOM >debian/scripts/abi-check
+#!/bin/sh
+exit 0
+EOM
+chmod 755 debian/scripts/abi-check
+
+cat - <<EOM >debian/scripts/module-check
+#!/bin/sh
+exit 0
+EOM
+chmod 755 debian/scripts/module-check
+
+cat - <<EOM >debian/tests/check-aliases
+#!/bin/sh
+exit 0
+EOM
+chmod 755 debian/tests/check-aliases
+
+#
+# Build the packages.
+#
+#dpkg-buildpackage -S -sd -rfakeroot -I.git -I.gitignore -i'.git.*'
+#dpkg-buildpackage -b
+
+schroot -c "$release-amd64" fakeroot debian/rules clean
+schroot -c "$release-amd64" fakeroot debian/rules binary-indep binary-arch
+schroot -c "$release-i386" fakeroot debian/rules clean
+schroot -c "$release-i386" fakeroot debian/rules binary-arch
--
1.6.1.258.g7ff14.dirty


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 07:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org