Control: reassign -1 musl-dev
Control: retitle -1 musl-dev should remove crypt functionality and let it be 
provided by src:libxcrypt
Control: tags -1 + patch

Hi Reiner,

On Wed, Apr 28, 2021 at 06:21:14PM +0200, Reiner Herrmann wrote:
> during a discussion on IRC today another option has been presented.
> Upstream mentioned [0] some time ago that it is possible to link with
> libxcrypt without using musl's crypt functions:
> 
> > You can just not install the musl crypt.h.
> > Linking libxcrypt should automatically cause
> > it to get used instead of the functions in libc.
> 
> I like this option as it would allow programs using musl to also use
> newer crypt methods from libxcrypt.
> 
> In order to prevent accidental usage of musl's crypt functions (e.g.
> by forgetting to pass -lcrypt), I will disable/remove the functions
> in libc.so.
> And additionaly musl's crypt.h will not be shipped.

Thank you. I'm attaching a patch for your convenience. Contrary to what
I indicated on irc, a timely upload (to experimental) would be good,
because libcrypt-dev needs to declare versioned Breaks+Replaces against
musl-dev for taking over crypt.h.

Helmut
--- a/debian/rules
+++ b/debian/rules
@@ -68,6 +68,9 @@
 override_dh_auto_configure: debian/scripts/$(MUSL_TRIPLE).path
 	dh_auto_configure -- --libdir=/usr/lib/$(MUSL_TRIPLE) --includedir=/usr/include/$(MUSL_TRIPLE) --host=$(DEB_HOST_GNU_TYPE) --enable-gcc-wrapper --enable-debug

+execute_after_dh_auto_install:
+	rm debian/tmp/usr/lib/$(MUSL_TRIPLE)/libcrypt.a
+
 override_dh_fixperms:
 	dh_fixperms --exclude libc.so

@@ -75,6 +78,7 @@
 	dh_gencontrol -- $(GENCTRL_OPTIONS)

 override_dh_clean:
+	rm -Rf src/crypt include/crypt.h
 	rm -f debian/musl-dev.postinst debian/musl-dev.postrm
 	dh_clean

Reply via email to