Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-06-02 Thread Rob Browning
Rob Browning  writes:

> Rob Browning  writes:
>
>> Yep -- I'm not sure yet, but I may lean toward providing:
>>
>>   bin/guile -> ./guile-2.2  # or whatever the selected alternative is
>>   bin/guild -> ./guild-2.2  # or whatever the selected alternative is
>
> OK, I think I'll have an upload this weekend using the built in
> ./configure --program-suffix support.  That produces a nearly identical
> install tree (though I'll need to double check the debs), excepting
> changes that should solve our problems, i.e. it installs:


Uploaded 2.2.4+1-2 to sid:

  https://salsa.debian.org/rlb/deb-guile/commits/deb/guile-2.2/v/2.2.4+1-2

Which includes:

  commit 4885ac01ce33474021b51695ef896661f237bd40
  Author: Rob Browning 
  Date:   Sat Jun 1 13:20:41 2019 -0500

  Handle guile-config/guile-snarf/guild as alternatives

  Arrange for guile-config, guile-snarf, guild (and guile-tools) to be
  handled via update-alternatives with all of the other tools dependent on
  guile-config.

  Configure with "--program-suffix -2.2" which gives the binaries the
  correct names from the start, so that we don't have to manually change
  them in debian/rules.  This also arranges for guile-config, etc. to
  refer to the versioned guile in their #! lines, which is what we should
  have been doing all along.

  Thanks to Ahmed El-Mahmoudy and Norbert Preining for reporting the
  problem, Kari Pahula and Vagrant Cascadian for help devising the fix,
  and Thibaut Paumard for help testing.

  Closes: 926182

I also included an upstream fix for the popen.test failures which I'd
begun hitting on amd64 too.  I'll see about badgering the release team
if it the buildds like it, but feel free to ping me if I wander off.

Thanks for all the help
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-30 Thread Rob Browning
Rob Browning  writes:

> Yep -- I'm not sure yet, but I may lean toward providing:
>
>   bin/guile -> ./guile-2.2  # or whatever the selected alternative is
>   bin/guild -> ./guild-2.2  # or whatever the selected alternative is

OK, I think I'll have an upload this weekend using the built in
./configure --program-suffix support.  That produces a nearly identical
install tree (though I'll need to double check the debs), excepting
changes that should solve our problems, i.e. it installs:

  debian/tmp/usr/bin/guild-2.2
  debian/tmp/usr/bin/guile-tools-2.2 -> guild-2.2
  debian/tmp/usr/bin/guile-config-2.2
  debian/tmp/usr/bin/guile-snarf-2.2
  debian/tmp/usr/bin/guile-2.2

And then we can just move guile-2.2 to its current location and add the
guile-dev postinst/prerm to handle alternatives for the rest.

As pointed out, since we don't allow more than one version of the dev
package to be installed, the utilities can stay in /usr/bin for now.

The --program-suffix also arranges for the scripts to refer to their
corresponding guile-X.Y, which should fix the other potential problem
mentioned.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-26 Thread Rob Browning
Vagrant Cascadian  writes:

> It seems like simply providing the binaries with the versioned links
> would be sufficient, since guile-2.2-dev conflicts/provides
> libguile-dev, guile-2.0-dev and guile-2.2-dev can't be installed at the
> same time.
>
> I guess it's possible the alternative for "guile" could be out of sync
> with the installed guile-2.2-dev binaries, although the newer versions
> have higher alternative default priority...
>
> The configure scripts seem to prefer the versioned binaries anyways...

Yep -- I'm not sure yet, but I may lean toward providing:

  bin/guile -> ./guile-2.2  # or whatever the selected alternative is
  bin/guild -> ./guild-2.2  # or whatever the selected alternative is
  ...

And then make sure that guild-X.Y, etc. refer specifically to guile-X.Y
(in, for example their #! lines), which I don't think they do right now.

In the longer run, I'd like to match as much as possible what upstream
does.  We've supported multiple versions for longer, but I suspect
upstream's approach is probably better (and more complete) than ours.
(That and of course it's always better not to differ unless we need to.)

Right now I'm poking around to see how where we might be headed
eventually compares to what's feasible to do at the moment (given
guile-2.0 and given the freeze).

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-25 Thread Thibaut Paumard
Le 25/05/2019 à 01:18, Rob Browning a écrit :
> Rob Browning  writes:
> 
>> I'm not certain, but I'm planning to work on guile over the next week.
>> If so, I should be able to take a look.
> 
> Just as an update, I obviously didn't get to it earlier this week, but
> I'm looking in to it now.
> 
> After I poke around a bit, I suspect the next step will be to contact
> the release managers to see what they think about any proposed changes
> because of course if they're not in favor, then the changes may have to
> wait.
> 
> I expect I'll be able to report back in a couple of days.

Dear Rob,

Since this change would be revertible in sid, you can safely upload
already and then contact the release team with the unblock request and a
source debdiff.

Kind regards, Thibaut.



signature.asc
Description: OpenPGP digital signature


Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-24 Thread Rob Browning
Rob Browning  writes:

> I'm not certain, but I'm planning to work on guile over the next week.
> If so, I should be able to take a look.

Just as an update, I obviously didn't get to it earlier this week, but
I'm looking in to it now.

After I poke around a bit, I suspect the next step will be to contact
the release managers to see what they think about any proposed changes
because of course if they're not in favor, then the changes may have to
wait.

I expect I'll be able to report back in a couple of days.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-23 Thread Vagrant Cascadian
On 2019-05-03, Kari Pahula wrote:
> /usr/bin/guile uses alternatives system and the real binary is under
> /usr/lib, as well as providing /usr/bin/guile-2.2 as a symlink.

It seems like simply providing the binaries with the versioned links
would be sufficient, since guile-2.2-dev conflicts/provides
libguile-dev, guile-2.0-dev and guile-2.2-dev can't be installed at the
same time.

I guess it's possible the alternative for "guile" could be out of sync
with the installed guile-2.2-dev binaries, although the newer versions
have higher alternative default priority...

The configure scripts seem to prefer the versioned binaries anyways...

live well,
  vagrant


> diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.install 
> guile-2.2-2.2.4+1/debian/guile-dev.install
> --- guile-2.2-2.2.4+1/debian/guile-dev.install2018-07-28 
> 23:10:09.0 +0300
> +++ guile-2.2-2.2.4+1/debian/guile-dev.install2019-05-03 
> 21:56:57.0 +0300
> @@ -1,7 +1,7 @@
> -debian/tmp/usr/bin/guild
> -debian/tmp/usr/bin/guile-config
> -debian/tmp/usr/bin/guile-snarf
> -debian/tmp/usr/bin/guile-tools
> +debian/tmp/usr/bin/guild /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
> +debian/tmp/usr/bin/guile-config /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
> +debian/tmp/usr/bin/guile-snarf /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
> +debian/tmp/usr/bin/guile-tools /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
>  debian/tmp/usr/include/*
>  debian/tmp/usr/lib/*/*.a
>  debian/tmp/usr/lib/*/libguile-@DEB_SRC_EFF_VER@.so
> diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.links 
> guile-2.2-2.2.4+1/debian/guile-dev.links
> --- guile-2.2-2.2.4+1/debian/guile-dev.links  1970-01-01 02:00:00.0 
> +0200
> +++ guile-2.2-2.2.4+1/debian/guile-dev.links  2019-05-03 21:56:57.0 
> +0300
> @@ -0,0 +1,4 @@
> +usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guild 
> usr/bin/guild-@DEB_SRC_EFF_VER@
> +usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guile-config 
> usr/bin/guile-config-@DEB_SRC_EFF_VER@
> +usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guile-snarf 
> usr/bin/guile-snarf-@DEB_SRC_EFF_VER@
> +usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guile-tools 
> usr/bin/guile-tools-@DEB_SRC_EFF_VER@
> diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.postinst 
> guile-2.2-2.2.4+1/debian/guile-dev.postinst
> --- guile-2.2-2.2.4+1/debian/guile-dev.postinst   1970-01-01 
> 02:00:00.0 +0200
> +++ guile-2.2-2.2.4+1/debian/guile-dev.postinst   2019-05-03 
> 21:56:57.0 +0300
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +
> +set -e
> +
> +for bin in guild guile-config guile-snarf guile-tools; do
> +update-alternatives \
> +--install \
> +/usr/bin/$bin \
> +$bin \
> +/usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/$bin \
> +@DEB_ALT_PRIORITY@
> +done
> +
> +#DEBHELPER#
> diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.prerm 
> guile-2.2-2.2.4+1/debian/guile-dev.prerm
> --- guile-2.2-2.2.4+1/debian/guile-dev.prerm  1970-01-01 02:00:00.0 
> +0200
> +++ guile-2.2-2.2.4+1/debian/guile-dev.prerm  2019-05-03 21:56:57.0 
> +0300
> @@ -0,0 +1,12 @@
> +#! /bin/sh
> +
> +set -e
> +
> +if [ "$1" != "upgrade" ] ; then
> +for bin in guild guile-config guile-snarf guile-tools; do
> +update-alternatives --remove $bin \
> +/usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/$bin
> +done
> +fi
> +
> +#DEBHELPER#
> diff -Nru guile-2.2-2.2.4+1/debian/rules guile-2.2-2.2.4+1/debian/rules
> --- guile-2.2-2.2.4+1/debian/rules2018-07-28 23:10:09.0 +0300
> +++ guile-2.2-2.2.4+1/debian/rules2019-05-03 21:56:57.0 +0300
> @@ -129,6 +129,7 @@
>guile-$(deb_src_eff_ver).menu \
>guile-$(deb_src_eff_ver).undocumented \
>guile-$(deb_src_eff_ver)-dev.install \
> +  guile-$(deb_src_eff_ver)-dev.links \
>guile-$(deb_src_eff_ver)-doc.README.Debian \
>guile-$(deb_src_eff_ver)-doc.install \
>guile-$(deb_src_eff_ver)-libs.install \
> @@ -137,6 +138,8 @@
>  autogen_installdeb_files := $(addprefix debian/, \
>guile-$(deb_src_eff_ver).postinst \
>guile-$(deb_src_eff_ver).prerm \
> +  guile-$(deb_src_eff_ver)-dev.postinst \
> +  guile-$(deb_src_eff_ver)-dev.prerm \
>guile-$(deb_src_eff_ver)-doc.postinst \
>guile-$(deb_src_eff_ver)-doc.prerm \
>guile-$(deb_src_eff_ver)-libs.postinst \
> @@ -233,12 +236,6 @@
> 
> -Xusr/lib/$(march)guile/$(deb_src_eff_ver)/extensions/guile-readline.a \
> 
> -Xusr/lib/$(march)guile/$(deb_src_eff_ver)/extensions/guile-readline.la
>  
> - sed -i'' '0,\|/usr/bin/guile|s||$(deb_guile_bin_path)|' \
> -   debian/$(deb_pkg_basename)-dev/usr/bin/guile-config
> -
> - sed -i'' '0,\|\$${exec_prefix}/bin/guile|s||$(deb_guile_bin_path)|' \
> -   debian/$(deb_pkg_basename)-dev/usr/bin/guild
> -
>   test -e $(gdb_ext)
>   mkdir -p $(gdb_ext_dir)
>   mv $(gdb_ext) $(gdb_ext_dir)


signature.asc
Description: PGP signature


Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-16 Thread Thibaut Paumard
Le 16/05/2019 à 03:45, Rob Browning a écrit :
> Thibaut Paumard  writes:
> 
>> I'm checking your patch, which looks good (compiling guile for testing
>> takes a lot o time but the patch itself is pretty straightforward and
>> clean). Do you intend on NMUing this? Given the age of this RC bug, I
>> think you should.
> 
> I'm not certain, but I'm planning to work on guile over the next week.
> If so, I should be able to take a look.
> 
> Thanks
> 

Thanks Rob.

For what it's worth,  I now tested the patch and I think it is ready to
go for Buster:
 - it does fix the RC bug (tested);
 - I think the approach is sound;
 - for this approach, the patch is minimal. It doesn't do anything that
   is not required to fix the bug.

As a bonus, it can go through unstable.

Kind regards, Thibaut.



signature.asc
Description: OpenPGP digital signature


Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-15 Thread Rob Browning
Thibaut Paumard  writes:

> I'm checking your patch, which looks good (compiling guile for testing
> takes a lot o time but the patch itself is pretty straightforward and
> clean). Do you intend on NMUing this? Given the age of this RC bug, I
> think you should.

I'm not certain, but I'm planning to work on guile over the next week.
If so, I should be able to take a look.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-15 Thread Thibaut Paumard
On Fri, 3 May 2019 23:09:33 +0300 Kari Pahula  wrote:
> tags 926182 + patch
> thanks
> 
> Hi.
> 
> /usr/bin/guile uses alternatives system and the real binary is under
> /usr/lib, as well as providing /usr/bin/guile-2.2 as a symlink.
> 
> My patch gives the same treatment for the binaries in guile-2.2-dev.

Dear Kari,

I'm checking your patch, which looks good (compiling guile for testing
takes a lot o time but the patch itself is pretty straightforward and
clean). Do you intend on NMUing this? Given the age of this RC bug, I
think you should.

Regards, Thibaut.



signature.asc
Description: OpenPGP digital signature


Bug#926182: Patch: Use alternatives system for guile-2.2-dev binaries

2019-05-03 Thread Kari Pahula
tags 926182 + patch
thanks

Hi.

/usr/bin/guile uses alternatives system and the real binary is under
/usr/lib, as well as providing /usr/bin/guile-2.2 as a symlink.

My patch gives the same treatment for the binaries in guile-2.2-dev.
diff -Nru guile-2.2-2.2.4+1/debian/changelog guile-2.2-2.2.4+1/debian/changelog
--- guile-2.2-2.2.4+1/debian/changelog	2018-07-28 23:10:51.0 +0300
+++ guile-2.2-2.2.4+1/debian/changelog	2019-05-03 21:58:01.0 +0300
@@ -1,3 +1,11 @@
+guile-2.2 (2.2.4+1-1.1) unstable; urgency=medium
+
+  * NMU
+  * Use alternatives system for guild, guile-config, guile-snarf and
+guile-tools and use version suffixed names. (Closes: #926182)
+
+ -- Kari Pahula   Fri, 03 May 2019 21:58:01 +0300
+
 guile-2.2 (2.2.4+1-1) unstable; urgency=medium
 
   * Upgrade to 2.2.4.
diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.install guile-2.2-2.2.4+1/debian/guile-dev.install
--- guile-2.2-2.2.4+1/debian/guile-dev.install	2018-07-28 23:10:09.0 +0300
+++ guile-2.2-2.2.4+1/debian/guile-dev.install	2019-05-03 21:56:57.0 +0300
@@ -1,7 +1,7 @@
-debian/tmp/usr/bin/guild
-debian/tmp/usr/bin/guile-config
-debian/tmp/usr/bin/guile-snarf
-debian/tmp/usr/bin/guile-tools
+debian/tmp/usr/bin/guild /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
+debian/tmp/usr/bin/guile-config /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
+debian/tmp/usr/bin/guile-snarf /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
+debian/tmp/usr/bin/guile-tools /usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin
 debian/tmp/usr/include/*
 debian/tmp/usr/lib/*/*.a
 debian/tmp/usr/lib/*/libguile-@DEB_SRC_EFF_VER@.so
diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.links guile-2.2-2.2.4+1/debian/guile-dev.links
--- guile-2.2-2.2.4+1/debian/guile-dev.links	1970-01-01 02:00:00.0 +0200
+++ guile-2.2-2.2.4+1/debian/guile-dev.links	2019-05-03 21:56:57.0 +0300
@@ -0,0 +1,4 @@
+usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guild usr/bin/guild-@DEB_SRC_EFF_VER@
+usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guile-config usr/bin/guile-config-@DEB_SRC_EFF_VER@
+usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guile-snarf usr/bin/guile-snarf-@DEB_SRC_EFF_VER@
+usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/guile-tools usr/bin/guile-tools-@DEB_SRC_EFF_VER@
diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.postinst guile-2.2-2.2.4+1/debian/guile-dev.postinst
--- guile-2.2-2.2.4+1/debian/guile-dev.postinst	1970-01-01 02:00:00.0 +0200
+++ guile-2.2-2.2.4+1/debian/guile-dev.postinst	2019-05-03 21:56:57.0 +0300
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+for bin in guild guile-config guile-snarf guile-tools; do
+update-alternatives \
+--install \
+/usr/bin/$bin \
+$bin \
+/usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/$bin \
+@DEB_ALT_PRIORITY@
+done
+
+#DEBHELPER#
diff -Nru guile-2.2-2.2.4+1/debian/guile-dev.prerm guile-2.2-2.2.4+1/debian/guile-dev.prerm
--- guile-2.2-2.2.4+1/debian/guile-dev.prerm	1970-01-01 02:00:00.0 +0200
+++ guile-2.2-2.2.4+1/debian/guile-dev.prerm	2019-05-03 21:56:57.0 +0300
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" != "upgrade" ] ; then
+for bin in guild guile-config guile-snarf guile-tools; do
+update-alternatives --remove $bin \
+/usr/lib/@MARCH@guile-@DEB_SRC_EFF_VER@/bin/$bin
+done
+fi
+
+#DEBHELPER#
diff -Nru guile-2.2-2.2.4+1/debian/rules guile-2.2-2.2.4+1/debian/rules
--- guile-2.2-2.2.4+1/debian/rules	2018-07-28 23:10:09.0 +0300
+++ guile-2.2-2.2.4+1/debian/rules	2019-05-03 21:56:57.0 +0300
@@ -129,6 +129,7 @@
   guile-$(deb_src_eff_ver).menu \
   guile-$(deb_src_eff_ver).undocumented \
   guile-$(deb_src_eff_ver)-dev.install \
+  guile-$(deb_src_eff_ver)-dev.links \
   guile-$(deb_src_eff_ver)-doc.README.Debian \
   guile-$(deb_src_eff_ver)-doc.install \
   guile-$(deb_src_eff_ver)-libs.install \
@@ -137,6 +138,8 @@
 autogen_installdeb_files := $(addprefix debian/, \
   guile-$(deb_src_eff_ver).postinst \
   guile-$(deb_src_eff_ver).prerm \
+  guile-$(deb_src_eff_ver)-dev.postinst \
+  guile-$(deb_src_eff_ver)-dev.prerm \
   guile-$(deb_src_eff_ver)-doc.postinst \
   guile-$(deb_src_eff_ver)-doc.prerm \
   guile-$(deb_src_eff_ver)-libs.postinst \
@@ -233,12 +236,6 @@
 	  -Xusr/lib/$(march)guile/$(deb_src_eff_ver)/extensions/guile-readline.a \
 	  -Xusr/lib/$(march)guile/$(deb_src_eff_ver)/extensions/guile-readline.la
 
-	sed -i'' '0,\|/usr/bin/guile|s||$(deb_guile_bin_path)|' \
-	  debian/$(deb_pkg_basename)-dev/usr/bin/guile-config
-
-	sed -i'' '0,\|\$${exec_prefix}/bin/guile|s||$(deb_guile_bin_path)|' \
-	  debian/$(deb_pkg_basename)-dev/usr/bin/guild
-
 	test -e $(gdb_ext)
 	mkdir -p $(gdb_ext_dir)
 	mv $(gdb_ext) $(gdb_ext_dir)