make-kpkg broken for lucid?

2011-06-22 Thread Christoph Mathys
Hello!

I'm trying to build a 2.6.39 low latency kernel using make-kpkg on
lucid. The current state of kernel-package makes this a bit painful,
here are my experiences.

The first problem is that initrd is not created when the linux-image
package is installed. This can be solved by having kernel-package
include different maintainer scripts into the packages it builds, e.g.
copy the scripts from the stock 2.6.32-generic kernel package (as
described in https://help.ubuntu.com/community/Kernel/Compile).

This leads straight to the second problem: The symlink in
/lib/modules//build is broken and does not get corrected by the
maintainer scripts copied from 2.6.32. This breaks stuff like dkms. I
solved this second problem by copying the missing code from the
original kernel-packages postinst into the postinst script copied from
2.6.32 (patch attached).

Did I miss some switch in kernel-package which makes the above
problems resolve itself? Or is there a new way to build custom kernel
packages without too much hassle?

Christoph
--- linux-2.6.32-generic/linux-2.6.32/debian/control-scripts/postinst	2011-06-21 11:07:45.0 +0200
+++ kernel-package/pkg/image/postinst	2011-06-22 10:46:17.864393049 +0200
@@ -32,12 +32,16 @@
 my $prerm_hook= '';  #Normally we do not
 my $minimal_swap  = '';  # Do not swap symlinks
 my $ignore_depmod_err = '';  # normally we do not
+my $relink_src_link= 'YES'; # There is no harm in checking the link
+my $relink_build_link  = 'YES'; # There is no harm in checking the link
+my $force_build_link   = '';# There is no harm in checking the link
 my $kernel_arch   = "=B";
 my $ramdisk   = "/usr/sbin/update-initramfs";  # List of tools to create initial ram fs.
 my $notifier  = "/usr/share/update-notifier/notify-reboot-required";
 my $package_name  = "linux-image-$version";
 my $explicit_do_loader = 'Yes';
 
+
 my $Loader  = "NoLOADER"; #
 $Loader = "LILO" if $loader =~ /^lilo/io;
 $Loader = "SILO" if $loader =~ /^silo/io;
@@ -129,6 +133,9 @@
   $warn_reboot = 'Yes' if /^\s*warn_reboot\s*=\s*(yes|true|1)\s*$/ig;
   $minimal_swap= 'Yes' if /^\s*minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
   $ignore_depmod_err = 'Yes' if /^\s*ignore_depmod_err\s*=\s*(yes|true|1)\s*$/ig;
+  $relink_src_link   = '' if /relink_src_link\s*=\s*(no|false|0)\s*$/ig;
+  $relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/ig;
+  $force_build_link  = '' if /force_build_link\s*=\s*(no|false|0)\s*$/ig;
 
   $image_dest  = "$1"  if /^\s*image_dest\s*=\s*(\S+)/ig;
   $postinst_hook   = "$1"  if /^\s*postinst_hook\s*=\s*(\S+)/ig;
@@ -190,6 +197,88 @@
   . "$kimage-$version)\n" unless -e $realimageloc
   . "$kimage-$version";
 
+
+##
+## Fix the build link
+##
+sub fix_build_link {
+  return unless -d "$modules_base/$version";
+  # if we saved a build link in preinst, restore the link
+  if (! -e "$modules_base/$version/build" && 
+  -l "$modules_base/$version/build.save" ) {
+rename("$modules_base/$version/build.save", "$modules_base/$version/build") ||
+  die "failed to move $modules_base/$version/build:$!";
+  }
+  if ($relink_build_link || $force_build_link) {
+my $build_target;
+my $real_target = '';
+if (-l "$modules_base/$version/build") {
+  $build_target = readlink "$modules_base/$version/build";
+} else {
+  return;
+}
+# Determine what the real file name is, and test that for existence
+$real_target = abs_path($build_target) if defined($build_target);
+if (!defined($build_target) || ! -d "$real_target") { # Danglink link
+  warn qq(
+ Hmm. There is a symbolic link $modules_base/$version/build
+ However, I can not read it: $!
+ Therefore, I am deleting $modules_base/$version/build\n
+);
+  my $num = unlink "$modules_base/$version/build";
+  if ($num != 1) {
+warn "error unlinking $modules_base/$version/build";
+  } else {
+if ($force_build_link || -d "/usr/src/=ST-headers-$version") {
+  my $result = symlink ("/usr/src/=ST-headers-$version",
+"$modules_base/$version/build");
+  if (! $result) {
+warn "Could not link /usr/src/=ST-headers-$version to $modules_base/$version/build:$!"
+  }
+}
+  }
+}
+  }
+}
+
+if ($relink_build_link || $force_build_link) {
+  &fix_build_link();
+}
+##
+## Fix the source link
+##
+sub fix_source_link {
+  return unless -d "$modules_base/$version";
+  if ($relink_src_link) {
+my $source_target;
+my $real_target = '';
+
+if (-l "$modules_base/$version/source") {
+  $source_tar

Firefox 5, reach 11.04?

2011-06-22 Thread Chris Jones
First off, my apologies if someone has asked this already, but I've only
been skimming over the mailing list lately.

Simple question, will Firefox 5 reach Natty 11.04?
Or will any releases part of the new rapid release cycle from Mozilla be
held off until 11.10?


Regards

Chris Jones
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Firefox 5, reach 11.04?

2011-06-22 Thread Micah Gersten
On 06/23/2011 12:00 AM, Chris Jones wrote:
> First off, my apologies if someone has asked this already, but I've
> only been skimming over the mailing list lately.
>
> Simple question, will Firefox 5 reach Natty 11.04?
> Or will any releases part of the new rapid release cycle from Mozilla
> be held off until 11.10?
>
>
> Regards
>
> Chris Jones

It's already in natty-updates and natty-security.

Thanks,
Micah

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Firefox 5, reach 11.04?

2011-06-22 Thread Andrew Starr-Bochicchio
On Thu, Jun 23, 2011 at 1:00 AM, Chris Jones  wrote:
> Simple question, will Firefox 5 reach Natty 11.04?
> Or will any releases part of the new rapid release cycle from Mozilla be
> held off until 11.10?

Already has...

$ apt-cache policy firefox
firefox:
  Installed: 5.0+build1+nobinonly-0ubuntu0.11.04.1
  Candidate: 5.0+build1+nobinonly-0ubuntu0.11.04.1
  Version table:
 *** 5.0+build1+nobinonly-0ubuntu0.11.04.1 0
500 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/
natty-updates/main i386 Packages
500 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/
natty-security/main i386 Packages
100 /var/lib/dpkg/status
 4.0+nobinonly-0ubuntu3 0
500 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/
natty/main i386 Packages

Cheers,

-- Andrew Starr-Bochicchio

   Ubuntu Developer 
   Debian Contributor

   PGP/GPG Key ID: D53FDCB1

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Firefox 5, reach 11.04?

2011-06-22 Thread Chris Jones
On Thu, Jun 23, 2011 at 4:11 PM, Chris Jones  wrote:

> On Thu, Jun 23, 2011 at 3:05 PM, Chandru  wrote:
>
>> The update is available in the repos.
>>
>> --
>> Chandra Sekar.S
>>
>>
>

Ok, now I just feel like an idiot. Posting to this mailing list from FF5 now
through Gmail.

I updated aptitude and then performed update and it came through. I probably
should have tried that before I started ranting on the mailing list.

Sorry for bothering everyone.


Cheers

Chris Jones
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss