Github messages for voidlinux
 help / color / Atom feed
* [PR PATCH] dracut: dynamic link against libfts on musl
@ 2019-11-08 11:53 voidlinux-github
  2019-11-08 22:37 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-08 11:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

There is a new pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages dracut-dynamic-link-libfts
https://github.com/void-linux/void-packages/pull/16229

dracut: dynamic link against libfts on musl
Static link against libfts is BSD-violation if we don't ship their
license.

A patch file from https://github.com/void-linux/void-packages/pull/16229.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-dracut-dynamic-link-libfts-16229.patch --]
[-- Type: text/x-diff, Size: 4052 bytes --]

From 592515ba2adffe2711bd314de95f8f187c1ab607 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 8 Nov 2019 18:49:13 +0700
Subject: [PATCH] dracut: dynamic link against libfts on musl

Static link against libfts is BSD-violation if we don't ship their
license.
---
 ...find-cflags-and-libs-for-fts-on-musl.patch | 96 +++++++++++++++++++
 srcpkgs/dracut/template                       |  8 +-
 2 files changed, 97 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/dracut/patches/0001-configure-find-cflags-and-libs-for-fts-on-musl.patch

diff --git a/srcpkgs/dracut/patches/0001-configure-find-cflags-and-libs-for-fts-on-musl.patch b/srcpkgs/dracut/patches/0001-configure-find-cflags-and-libs-for-fts-on-musl.patch
new file mode 100644
index 00000000000..a57a443dc1d
--- /dev/null
+++ b/srcpkgs/dracut/patches/0001-configure-find-cflags-and-libs-for-fts-on-musl.patch
@@ -0,0 +1,96 @@
+From 5ac43335bbf7620a04146130bcf37e4f17cd5a8e Mon Sep 17 00:00:00 2001
+From: Doan Tran Cong Danh <congdanhqx@gmail.com>
+Date: Wed, 6 Nov 2019 18:35:12 +0700
+Subject: [PATCH 1/3] configure: find cflags and libs for fts on musl
+
+Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
+---
+ Makefile  |  2 +-
+ configure | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+), 1 deletion(-)
+
+diff --git Makefile Makefile
+index 31545899..f9b42b96 100644
+--- Makefile
++++ Makefile
+@@ -62,7 +62,7 @@ install/util.o: install/util.c install/util.h install/macro.h install/log.h
+ install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h
+ 
+ install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
+-	$(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS)
++	$(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(FTS_LIBS) $(KMOD_LIBS)
+ 
+ logtee: logtee.c
+ 	$(CC) $(LDFLAGS) -o $@ $<
+diff --git configure configure
+index b55fb609..3f724ef2 100755
+--- configure
++++ configure
+@@ -7,6 +7,7 @@ prefix=/usr
+ 
+ enable_documentation=yes
+ 
++CC="${CC:-cc}"
+ PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
+ 
+ # Little helper function for reading args from the commandline.
+@@ -57,6 +58,48 @@ if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 23 "; then
+     exit 1
+ fi
+ 
++cat <<EOF >conftest.c
++#include <fts.h>
++int main() {
++	return 0;
++}
++EOF
++
++${CC} $CFLAGS $LDFLAGS conftest.c >/dev/null 2>&1
++ret=$?
++rm -f conftest.c a.out
++
++# musl doesn't have fts.h included
++if test $ret -ne 0; then
++	echo "dracut needs fts development files." >&2
++	exit 1
++fi
++
++cat <<EOF >conftest.c
++#include <fts.h>
++int main(void) {
++	fts_open(0, 0, 0);
++	return 0;
++}
++EOF
++
++found=no
++for lib in "-lc" "-lfts"; do
++	${CC} $CFLAGS -Wl,$lib $LDFLAGS conftest.c >/dev/null 2>&1
++	ret=$?
++	if test $ret -eq 0; then
++		FTS_LIBS="$lib"
++		found=yes
++		break;
++	fi
++done
++rm -f conftest.c a.out
++
++if test $found = no; then
++	echo "dracut couldn't find usable fts library" >&2
++	exit 1
++fi
++
+ cat > Makefile.inc.$$ <<EOF
+ prefix ?= ${prefix}
+ libdir ?= ${libdir:-${prefix}/lib}
+@@ -68,6 +111,7 @@ enable_documentation ?= ${enable_documentation:-yes}
+ bindir ?= ${bindir:-${prefix}/bin}
+ KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ")
+ KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ")
++FTS_LIBS ?= ${FTS_LIBS}
+ EOF
+ 
+ {
+-- 
+2.24.0.9.g35b3684e14
+
diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template
index f5e420eb6bd..568d219b54e 100644
--- a/srcpkgs/dracut/template
+++ b/srcpkgs/dracut/template
@@ -1,7 +1,7 @@
 # Template file for 'dracut'
 pkgname=dracut
 version=049
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc"
 conf_files="/etc/dracut.conf"
@@ -25,12 +25,6 @@ case "$XBPS_TARGET_MACHINE" in
 	;;
 esac
 
-do_build() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) make ${makejobs} LDLIBS="${XBPS_CROSS_BASE}/usr/lib/libfts.a";;
-	esac
-}
-
 do_check() {
 	# Requires the distfile to be a git repository
 	:

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] dracut: dynamic link against libfts on musl
  2019-11-08 11:53 [PR PATCH] dracut: dynamic link against libfts on musl voidlinux-github
@ 2019-11-08 22:37 ` " voidlinux-github
  2019-11-08 23:53 ` voidlinux-github
  2019-11-09 18:50 ` [PR PATCH] [Merged]: " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-08 22:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

There is an updated pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages dracut-dynamic-link-libfts
https://github.com/void-linux/void-packages/pull/16229

dracut: dynamic link against libfts on musl
Static link against libfts is BSD-violation if we don't ship their
license.

A patch file from https://github.com/void-linux/void-packages/pull/16229.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-dracut-dynamic-link-libfts-16229.patch --]
[-- Type: text/x-diff, Size: 1016 bytes --]

From 549a6ccd23489787f7b0ffcebb72a49cbf474603 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 8 Nov 2019 18:49:13 +0700
Subject: [PATCH] dracut: dynamic link against libfts on musl

Static link against libfts is BSD-violation if we don't ship their
license.
---
 srcpkgs/dracut/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template
index f5e420eb6bd..8496d89d34f 100644
--- a/srcpkgs/dracut/template
+++ b/srcpkgs/dracut/template
@@ -1,7 +1,7 @@
 # Template file for 'dracut'
 pkgname=dracut
 version=049
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc"
 conf_files="/etc/dracut.conf"
@@ -25,9 +25,9 @@ case "$XBPS_TARGET_MACHINE" in
 	;;
 esac
 
-do_build() {
+post_configure () {
 	case "$XBPS_TARGET_MACHINE" in
-		*-musl) make ${makejobs} LDLIBS="${XBPS_CROSS_BASE}/usr/lib/libfts.a";;
+	*-musl) echo "LBLIBS= -lfts" >> Makefile.inc ;;
 	esac
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] dracut: dynamic link against libfts on musl
  2019-11-08 11:53 [PR PATCH] dracut: dynamic link against libfts on musl voidlinux-github
  2019-11-08 22:37 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-11-08 23:53 ` voidlinux-github
  2019-11-09 18:50 ` [PR PATCH] [Merged]: " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-08 23:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

There is an updated pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages dracut-dynamic-link-libfts
https://github.com/void-linux/void-packages/pull/16229

dracut: dynamic link against libfts on musl
Static link against libfts is BSD-violation if we don't ship their
license.

A patch file from https://github.com/void-linux/void-packages/pull/16229.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-dracut-dynamic-link-libfts-16229.patch --]
[-- Type: text/x-diff, Size: 952 bytes --]

From 1337d7caa0c8b3c05856c86331a6976da475cd1e Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 8 Nov 2019 18:49:13 +0700
Subject: [PATCH] dracut: dynamic link against libfts on musl

Static link against libfts is BSD-violation if we don't ship their
license.
---
 srcpkgs/dracut/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template
index f5e420eb6bd..cd5602148df 100644
--- a/srcpkgs/dracut/template
+++ b/srcpkgs/dracut/template
@@ -1,7 +1,7 @@
 # Template file for 'dracut'
 pkgname=dracut
 version=049
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc"
 conf_files="/etc/dracut.conf"
@@ -27,7 +27,7 @@ esac
 
 do_build() {
 	case "$XBPS_TARGET_MACHINE" in
-		*-musl) make ${makejobs} LDLIBS="${XBPS_CROSS_BASE}/usr/lib/libfts.a";;
+		*-musl) make ${makejobs} LDLIBS="-lfts" ;;
 	esac
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: dracut: dynamic link against libfts on musl
  2019-11-08 11:53 [PR PATCH] dracut: dynamic link against libfts on musl voidlinux-github
  2019-11-08 22:37 ` [PR PATCH] [Updated] " voidlinux-github
  2019-11-08 23:53 ` voidlinux-github
@ 2019-11-09 18:50 ` " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-09 18:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

There's a merged pull request on the void-packages repository

dracut: dynamic link against libfts on musl
https://github.com/void-linux/void-packages/pull/16229

Description:
Static link against libfts is BSD-violation if we don't ship their
license.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 11:53 [PR PATCH] dracut: dynamic link against libfts on musl voidlinux-github
2019-11-08 22:37 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-08 23:53 ` voidlinux-github
2019-11-09 18:50 ` [PR PATCH] [Merged]: " voidlinux-github

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git