Bug#955210: kernel-wedge: regression causes kfreebsd-10 FTBFS

2020-03-29 Thread Steven Chamberlain
Hi!

Ben Hutchings wrote:
> Sorry about that.  I knew this was a relatively risky change, but
> thought I had test cases covering everything.

No problem.  The refactoring is much appreciated, and it is
understandable when regressions happen somewhere in this labyrinth of
sh/bash/perl.

> Would you mind adding a regression test for this case?

Good idea, I've done this now.  (By substituting $moddir with a symlink
to $moddir for all test cases;  having separate test series for
$moddir-is-symlink and $moddir-not-symlink would have been complicated).

Cyril Brulebois wrote:
> Feel free to push/upload as you see fit; thanks.

Thanks, I will do that.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


signature.asc
Description: Digital signature


Bug#955210: kernel-wedge: regression causes kfreebsd-10 FTBFS

2020-03-28 Thread Ben Hutchings
On Sat, 2020-03-28 at 13:41 +, Steven Chamberlain wrote:
[...]
>
kfreebsd-10 FTBFS, due to probably this change in kernel-wedge:
> 
https://salsa.debian.org/installer-team/kernel-wedge/-/commit/3827f1ee9f53540b104c592a8a2695f78d8629ed
[...]

On Sat, 2020-03-28 at 18:29 +, Steven Chamberlain wrote:
> tags -1 + patch
> thanks

Sorry about that.  I knew this was a relatively risky change, but
thought I had test cases covering everything.  Would you mind adding a
regression test for this case?

Ben.

-- 
Ben Hutchings
This sentence contradicts itself - no actually it doesn't.



signature.asc
Description: This is a digitally signed message part


Bug#955210: kernel-wedge: regression causes kfreebsd-10 FTBFS

2020-03-28 Thread Cyril Brulebois
Hi Steven,

Steven Chamberlain  (2020-03-28):
> tags -1 + patch
> thanks

Feel free to push/upload as you see fit; thanks.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Bug#955210: kernel-wedge: regression causes kfreebsd-10 FTBFS

2020-03-28 Thread Steven Chamberlain
tags -1 + patch
thanks
From 03477bf089926f7a599bbe89f67df53080b69bfa Mon Sep 17 00:00:00 2001
From: Steven Chamberlain 
Date: Sat, 28 Mar 2020 18:12:35 +
Subject: [PATCH] preprocess: If source directory is a symlink, follow it

Closes: #955210
---
 commands/preprocess | 9 +
 debian/changelog| 7 +++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/commands/preprocess b/commands/preprocess
index b60c0d7..0c77e52 100755
--- a/commands/preprocess
+++ b/commands/preprocess
@@ -25,15 +25,16 @@ my %loaded;
 sub find_all_modules {
 	my ($moddir) = @_;
 
-	File::Find::find(
-		sub {
+	File::Find::find({
+		follow => 1, # If $moddir is a symlink, follow it.
+		wanted => sub {
 			if (/\.ko$/) {
 push @module_files,
 File::Spec->abs2rel($File::Find::name,
 			$moddir);
 			}
-		},
-		$moddir);
+		}
+	}, $moddir);
 
 	if ($os eq 'linux') {
 		if (open(my $builtin, "$moddir/modules.builtin")) {
diff --git a/debian/changelog b/debian/changelog
index cf26ea1..46ffe4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+kernel-wedge (2.103) UNRELEASED; urgency=medium
+
+  * preprocess: If source directory is a symlink, follow it
+(Closes: #955210)
+
+ -- Steven Chamberlain   Sat, 28 Mar 2020 18:08:28 +
+
 kernel-wedge (2.102) unstable; urgency=medium
 
   * debian/tests: Correct expected exit code for preprocess missingdir case
-- 
2.1.4



signature.asc
Description: Digital signature


Bug#955210: kernel-wedge: regression causes kfreebsd-10 FTBFS

2020-03-28 Thread Steven Chamberlain
Package: kernel-wedge
Version: 2.102
Severity: important
X-Debbugs-Cc: debian-...@lists.debian.org

Hi,

kfreebsd-10 FTBFS, due to probably this change in kernel-wedge:
https://salsa.debian.org/installer-team/kernel-wedge/-/commit/3827f1ee9f53540b104c592a8a2695f78d8629ed

The kfreebsd-10 build process produces kernel modules including lpt.ko
and ppi.ko under:
debian/kfreebsd-image-10.3-0-amd64/lib/modules/10.3-0-amd64/

As of kernel-wedge=2.102, the preprocess step fails to find any modules:

KW_DEFCONFIG_DIR=debian/installer KW_CONFIG_DIR=debian/installer/amd64 \
perl -w /usr/share/kernel-wedge/commands/preprocess \
 debian/installer/amd64/modules/kfreebsd-amd64/parport-modules \
 debian/kfreebsd-image-10.3-0-amd64/lib/modules/10.3-0-amd64
missing module lpt
missing module ppi

but I notice that when adding a trailing slash to the second parameter
($moddir), then it does work again:

KW_DEFCONFIG_DIR=debian/installer KW_CONFIG_DIR=debian/installer/amd64 \
perl -w /usr/share/kernel-wedge/commands/preprocess \
 debian/installer/amd64/modules/kfreebsd-amd64/parport-modules \
 debian/kfreebsd-image-10.3-0-amd64/lib/modules/10.3-0-amd64/
lpt.ko
ppi.ko

Note that debian/kfreebsd-image-10.3-0-amd64/lib/modules/10.3-0-amd64
is a symlink, to ../../boot/modules/10.3-0-amd64

I think this has to do with a basename() somewhere removing the
"10.3-0-amd64" from the end of the path, so that it searches for .ko
files under:
debian/kfreebsd-image-10.3-0-amd64/lib/modules/
instead.

Thanks!

-- System Information:
Debian Release: 8.0
  APT prefers stable-kfreebsd-proposed-updates
  APT policy: (500, 'stable-kfreebsd-proposed-updates'), (500, 
'stable-kfreebsd')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 10.1-0-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)


signature.asc
Description: Digital signature