Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-25 Thread Roger Shimizu
On Sun, Mar 25, 2018 at 11:27 PM, Cyril Brulebois  wrote:
> Hey,
>
> Roger Shimizu  (2018-03-25):
>> On Sun, Mar 25, 2018 at 11:15 PM, Roger Shimizu  
>> wrote:
>> > Just a nitpicking.
>> > The build cannot be triggered again by "dpkg-buildpackage -uc -us"
>> > after one build.
>> > It was OK in previous version.
>>
>> I tested it again, and the problem is gone now.
>> Sorry for the false positive info. Bow!
>
> I had tested that and I wasn't able to reproduce this. Maybe what
> happened is you had a build with the build-deb directory, you renamed
> it build, and there were stray files from the previous build?

Maybe.

> You may want to push your tree to git too (I tried git fetch but found
> no new commits there). ;)

I already pushed the tag.
But still waiting the ftp-master to accept my upload, after that I can
safely push to master branch.

> Thanks for your swift actions, much appreciated!

No problem.
And I just don't want to break d-i.
(although I still need to fix armel later)

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1



Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-25 Thread Cyril Brulebois
Hey,

Roger Shimizu  (2018-03-25):
> On Sun, Mar 25, 2018 at 11:15 PM, Roger Shimizu  
> wrote:
> > Just a nitpicking.
> > The build cannot be triggered again by "dpkg-buildpackage -uc -us"
> > after one build.
> > It was OK in previous version.
> 
> I tested it again, and the problem is gone now.
> Sorry for the false positive info. Bow!

I had tested that and I wasn't able to reproduce this. Maybe what
happened is you had a build with the build-deb directory, you renamed
it build, and there were stray files from the previous build?

You may want to push your tree to git too (I tried git fetch but found
no new commits there). ;)

Thanks for your swift actions, much appreciated!


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


signature.asc
Description: PGP signature


Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-25 Thread Roger Shimizu
On Sun, Mar 25, 2018 at 11:15 PM, Roger Shimizu  wrote:
>
> Just a nitpicking.
> The build cannot be triggered again by "dpkg-buildpackage -uc -us"
> after one build.
> It was OK in previous version.

I tested it again, and the problem is gone now.
Sorry for the false positive info. Bow!

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1



Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-25 Thread Roger Shimizu
Dear KiBi,

On Sun, Mar 25, 2018 at 5:19 PM, Cyril Brulebois  wrote:
> Control: tag -1 patch
>
> Hi Roger,
>
> Roger Shimizu  (2018-03-25):
>> Do you have any suggestion, except adding udeb support to package flex?
>
> It looks acceptable to me to use the static library in the udeb, so I've
> tried building it against libfl.a, and that seems to do the job since
> the libfl2 dependency goes away. I'm not sure it's reasonable to do that
> for both the deb and the udeb, though; so I've looked into making it
> conditional, and only building the udeb against the static library.

Thanks for your suggestion and patches!
I agree with you that static linking for udeb only.

> Unfortunately, it looks like the build system doesn't support out of
> tree builds, so I've had to copy all files under build-{deb,udeb},
> instead of just running ../configure, make, make install from there.
> I've picked rsync to do this, but feel free to use anything else.

Yes, the build system is quite old, it's a software wrote 10 years ago.
Really thanks for your patches that overcome the issue.

I just don't like the name "build-deb", which is too close to "build-udeb".
So I change it to "build", with some other cleanups.
My patch is enclosed, and it's based on yours.

> I've also chosen to clean things up using an override_dh_auto_clean
> target, so that most modifications are seen at once in debian/rules, but
> you may want to use debian/clean instead.

Just a nitpicking.
The build cannot be triggered again by "dpkg-buildpackage -uc -us"
after one build.
It was OK in previous version.

However, this is small issue, so I already uploaded.

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1
From 42d2b0dd8694a92e5176c993b56f8ec3c54376ed Mon Sep 17 00:00:00 2001
From: Roger Shimizu 
Date: Sun, 25 Mar 2018 22:40:50 +0900
Subject: [PATCH] d/rules: Cleanup

Now build two versions under the directories below:
 - build: nornal version. The same as previous one.
 - build-udeb: udeb version, which staticly linked with libfl2 (flex
   library)
---
 debian/changelog |  3 ++-
 debian/rules | 36 
 2 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 200cc24..fb4b5ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,8 @@ wide-dhcpv6 (20080615-21) UNRELEASED; urgency=medium
 
   * debian/rules:
 - Introduce separate deb/udeb builds, copying source files under
-  build-{deb,udeb} since support for out-of-tree build seems broken.
+  {build,build-udeb} since support for out-of-tree build seems
+  broken.
 - Don't try to build only the dhcp6c binary in the udeb tree, as the
   install target tries to install everything anyway.
 - Patch Makefile.in to build the dhcp6c binary against static flex
diff --git a/debian/rules b/debian/rules
index 1f021df..724bb1e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,28 +9,26 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 %:
 	dh $@
 
-build-deb/.stamp:
-	rsync --exclude debian/ --exclude .pc/ -a * build-deb && touch $@
-
-build-udeb/.stamp:
-	rsync --exclude debian/ --exclude .pc/ -a * build-udeb && touch $@
-	# Build against the static flex library to avoid picking an extra dependency on libfl2 (#893988):
-	sed "s,^CLIENTLIBS=.*,CLIENTLIBS=$$(find /usr/lib/$$(dpkg-architecture -qDEB_BUILD_MULTIARCH) -name libfl.a)," -i build-udeb/Makefile.in
-
-override_dh_auto_configure: build-deb/.stamp build-udeb/.stamp
-	cd build-deb && \
-	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
-		--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6
-	cd build-udeb && \
-	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
-		--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6
+override_dh_auto_configure:
+	# sed command below is to build against the static flex library
+	# to avoid picking an extra dependency on libfl2 (#893988)
+	for dir in build build-udeb; do \
+		rsync -a --exclude debian/ --exclude .pc/ --exclude .git/ . $$dir; \
+		[ $$dir = "build-udeb" ] && \
+		sed "s,^CLIENTLIBS=.*,CLIENTLIBS=$$(find /usr/lib/$$(dpkg-architecture -qDEB_BUILD_MULTIARCH) -name libfl.a)," \
+			-i $$dir/Makefile.in; \
+		cd $$dir && \
+		./configure --prefix=/usr --mandir=\$${prefix}/share/man \
+			--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6 && \
+		cd -; \
+	done
 
 override_dh_auto_build:
-	$(MAKE) -C build-deb
+	$(MAKE) -C build
 	$(MAKE) -C build-udeb
 
 override_dh_auto_install:
-	$(MAKE) -C build-deb prefix=$(CURDIR)/debian/tmp/usr install
+	$(MAKE) -C build prefix=$(CURDIR)/debian/tmp/usr install
 	$(MAKE) -C build-udeb prefix=$(CURDIR)/debian/tmp-udeb/usr install
 
 override_dh_installinit:
@@ -42,6 +40,4 @@ override_dh_fixperms:
 
 override_dh_auto_clean:
 	dh_auto_clean
-	rm -rf build-deb
-	rm -rf build-udeb
-	rm -rf debian/tmp-udeb
+	rm -rf build 

Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-25 Thread Cyril Brulebois
Control: tag -1 patch

Hi Roger,

Roger Shimizu  (2018-03-25):
> Do you have any suggestion, except adding udeb support to package flex?

It looks acceptable to me to use the static library in the udeb, so I've
tried building it against libfl.a, and that seems to do the job since
the libfl2 dependency goes away. I'm not sure it's reasonable to do that
for both the deb and the udeb, though; so I've looked into making it
conditional, and only building the udeb against the static library.

Unfortunately, it looks like the build system doesn't support out of
tree builds, so I've had to copy all files under build-{deb,udeb},
instead of just running ../configure, make, make install from there.
I've picked rsync to do this, but feel free to use anything else.

I've also chosen to clean things up using an override_dh_auto_clean
target, so that most modifications are seen at once in debian/rules, but
you may want to use debian/clean instead.

You'll find a patch series attached. I haven't tested the runtime
though.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant
From e63dad86c15e39c56505f0e22428b4d3a158b17e Mon Sep 17 00:00:00 2001
From: Cyril Brulebois 
Date: Sun, 25 Mar 2018 09:40:23 +0200
Subject: [PATCH 1/8] Build under build-deb.

This is a first step to introduce separate deb vs. udeb builds.
---
 debian/rules | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 67e9104..96b2b3b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,12 +9,19 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 %:
 	dh $@
 
-override_dh_auto_configure:
+build-deb/.stamp:
+	rsync --exclude debian/ --exclude .pc/ -a * build-deb && touch $@
+
+override_dh_auto_configure: build-deb/.stamp
+	cd build-deb && \
 	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
 		--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6
 
+override_dh_auto_build:
+	$(MAKE) -C build-deb
+
 override_dh_auto_install:
-	$(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
+	$(MAKE) -C build-deb prefix=$(CURDIR)/debian/tmp/usr install
 
 override_dh_installinit:
 	dh_installinit --error-handler=true --restart-after-upgrade
@@ -22,3 +29,7 @@ override_dh_installinit:
 override_dh_fixperms:
 	dh_fixperms
 	chmod +x debian/wide-dhcpv6-client/etc/wide-dhcpv6/dhcp6c-*
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf build-deb
-- 
2.16.2

From 1f71d9b7fa5f05655fcfe1e7a6a974cdc18d2309 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois 
Date: Sun, 25 Mar 2018 09:40:27 +0200
Subject: [PATCH 2/8] Duplicate the deb build into a udeb build.

Let the main (deb) build install everything under debian/tmp as usual
which will let most helpers do the right thing as previously, and
install the results of the udeb build under debian/tmp-udeb.
---
 debian/rules | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 96b2b3b..a9ee5a3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,16 +12,24 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 build-deb/.stamp:
 	rsync --exclude debian/ --exclude .pc/ -a * build-deb && touch $@
 
-override_dh_auto_configure: build-deb/.stamp
+build-udeb/.stamp:
+	rsync --exclude debian/ --exclude .pc/ -a * build-udeb && touch $@
+
+override_dh_auto_configure: build-deb/.stamp build-udeb/.stamp
 	cd build-deb && \
 	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
 		--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6
+	cd build-udeb && \
+	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
+		--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6
 
 override_dh_auto_build:
 	$(MAKE) -C build-deb
+	$(MAKE) -C build-udeb
 
 override_dh_auto_install:
 	$(MAKE) -C build-deb prefix=$(CURDIR)/debian/tmp/usr install
+	$(MAKE) -C build-udeb prefix=$(CURDIR)/debian/tmp-udeb/usr install
 
 override_dh_installinit:
 	dh_installinit --error-handler=true --restart-after-upgrade
@@ -33,3 +41,4 @@ override_dh_fixperms:
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf build-deb
+	rm -rf build-udeb
-- 
2.16.2

From 0e9c3a98ec202285076bb3c44d79158b17a15b38 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois 
Date: Sun, 25 Mar 2018 09:47:05 +0200
Subject: [PATCH 3/8] wide-dhcpv6-client-udeb: ship the dhcp6c binary built in
 the udeb tree.

---
 debian/wide-dhcpv6-client-udeb.install | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/wide-dhcpv6-client-udeb.install b/debian/wide-dhcpv6-client-udeb.install
index 0af1fb6..04fb328 100644
--- a/debian/wide-dhcpv6-client-udeb.install
+++ b/debian/wide-dhcpv6-client-udeb.install
@@ -1 +1,2 @@
-usr/sbin/dhcp6c
+# Pick the binary built in the udeb tree:
+../tmp-udeb/usr/sbin/dhcp6c /usr/sbin/
-- 
2.16.2

From 10e34fb743810dea9ffad69824e1c45e35ac6157 Mon Sep 

Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-24 Thread Roger Shimizu
On Sun, Mar 25, 2018 at 9:35 AM, Cyril Brulebois  wrote:
> Package: wide-dhcpv6-client-udeb
> Version: 20080615-20
> Severity: serious
>
> (Please keep debian-b...@lists.debian.org and me in copy of your
> replies.)
>
> Hi,
>
> Your package is no longer installable because it depends on non-udeb
> libfl2. That makes netcfg uninstallable as well, which means a very
> serious regression for d-i.

Sorry for this regression.

I confirm if building under stretch, 20080615-20 is fine, without
depending on libfl2.
So obviously it's because the new flex package in unstable, 2.6.4-6.

If building the previous version, 20080615-19, under unstable, I guess
it would have the same result.

Now we need the fix.
Do you have any suggestion, except adding udeb support to package flex?

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1



Bug#893988: wide-dhcpv6-client-udeb: not installable: depends on non-udeb libfl2

2018-03-24 Thread Cyril Brulebois
Package: wide-dhcpv6-client-udeb
Version: 20080615-20
Severity: serious

(Please keep debian-b...@lists.debian.org and me in copy of your
replies.)

Hi,

Your package is no longer installable because it depends on non-udeb
libfl2. That makes netcfg uninstallable as well, which means a very
serious regression for d-i.


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