Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] coreutils: reenable statx(2) support on glibc
@ 2020-04-02 12:06 pullmoll
  2020-04-02 12:10 ` xtraeme
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pullmoll @ 2020-04-02 12:06 UTC (permalink / raw)
  To: ml

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

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

https://github.com/pullmoll/void-packages coreutils-legacy
https://github.com/void-linux/void-packages/pull/20570

coreutils: reenable statx(2) support on glibc
Also create a coreutils-legacy package for use on old kernels (<= 4.19)
which does not try to use statx(2).

Supersedes: #20569

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-coreutils-legacy-20570.patch --]
[-- Type: text/x-diff, Size: 5059 bytes --]

From d612f33fe89f43263c092ece10a1bab36bfac65a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Thu, 2 Apr 2020 14:00:45 +0200
Subject: [PATCH] coreutils: reenable statx(2) support on glibc

Also create a coreutils-legacy package for use on old kernels (<= 4.19)
which does not try to use statx(2).

Supersedes: #20569
---
 srcpkgs/coreutils-legacy   |  1 +
 srcpkgs/coreutils/template | 73 +++++++++++++++++++++++++++++++++-----
 2 files changed, 66 insertions(+), 8 deletions(-)
 create mode 120000 srcpkgs/coreutils-legacy

diff --git a/srcpkgs/coreutils-legacy b/srcpkgs/coreutils-legacy
new file mode 120000
index 00000000000..a4b710b1789
--- /dev/null
+++ b/srcpkgs/coreutils-legacy
@@ -0,0 +1 @@
+coreutils
\ No newline at end of file
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 16a2c9e1dbe..f690eb3066e 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,7 +1,7 @@
 # Template file for 'coreutils'
 pkgname=coreutils
 version=8.32
-revision=3
+revision=4
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
 short_desc="GNU core utilities"
@@ -11,7 +11,7 @@ homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
 checksum=4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa
-
+conflicts="coreutils-legacy>=0"
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 
 if [ "$CHROOT_READY" ]; then
@@ -40,6 +40,9 @@ pre_configure() {
 		make install
 		make distclean
 	fi
+	mkdir ../${pkgname}-${version}-legacy
+	cp -aR . ../${pkgname}-${version}-legacy
+	mv ../${pkgname}-${version}-legacy .
 }
 
 do_configure() {
@@ -51,9 +54,6 @@ do_configure() {
 	case "$XBPS_TARGET_MACHINE" in
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
-		# XXX disable statx(), needs glibc>=2.28 and linux>=4.11
-		# XXX seems to fail on travis always returning EACCES.
-		*) configure_args+=" ac_cv_func_statx=no";;
 	esac
 	#
 	# Do not install kill: provided by util-linux.
@@ -69,6 +69,12 @@ do_configure() {
 		sed -e 's;^\(cu_install_program =\).*;\1 install;' \
 			Makefile.cfg.orig >Makefile
 	fi
+	msg_normal "Configuring legacy build ...\n"
+	cd ${sourcepkg}-${version}-legacy
+	env $_force_unsafe_configure ./configure ${configure_args} \
+		--enable-install-program=arch,hostname \
+		--enable-no-install-program=kill,uptime \
+		--disable-rpath ac_cv_func_statx=no
 }
 
 do_build() {
@@ -88,6 +94,24 @@ do_build() {
 		sed -e '/hostname.1/d' Makefile.bak > Makefile
 	fi
 	make ${makejobs}
+	msg_normal "Building legacy version ...\n"
+	cd ${sourcepkg}-${version}-legacy
+	if [ "$CROSS_BUILD" ]; then
+		cp Makefile Makefile.orig
+		sed '/src_make_prime_list/d' Makefile.orig > Makefile
+		depbase=$(echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||')
+		cc -std=gnu99  -I. -I./lib  -Ilib -I./lib -Isrc -I./src  \
+			-fdiagnostics-show-option -funit-at-a-time -g -O2 -MT \
+			src/make-prime-list.o -MD -MP -MF $depbase.Tpo -c \
+			-o src/make-prime-list.o \
+			src/make-prime-list.c
+		mv -f $depbase.Tpo $depbase.Po
+		cc -std=gnu99 -fdiagnostics-show-option -funit-at-a-time -g -O2 \
+			-Wl,--as-needed  -o src/make-prime-list src/make-prime-list.o
+		cp Makefile Makefile.bak
+		sed -e '/hostname.1/d' Makefile.bak > Makefile
+	fi
+	make ${makejobs}
 }
 
 do_check() {
@@ -107,16 +131,49 @@ do_check() {
 	done
 
 	make check
+
+	cd ${sourcepkg}-${version}-legacy
+
+	# chgrp tests fail inside a chroot
+	sed -i '/tests\/chgrp/d' Makefile
+
+	# Tests that fail due to being inside a chroot
+	exeext_tests="chown lchown fchownat"
+
+	# Tests that depend on the tests reemoved
+	exeext_tests+=" fchmodat fchdir"
+
+	for test in $exeext_tests ; do
+		sed -i "/test-$test\$(EXEEXT)/d" gnulib-tests/Makefile
+	done
+
+	make check
 }
 
 do_install() {
 	make DESTDIR=${DESTDIR} install
 	if [ "$CROSS_BUILD" ]; then
-		mv ${wrksrc}/coreutils-${XBPS_MACHINE}/share/man \
+		mv coreutils-${XBPS_MACHINE}/share/man \
 			${DESTDIR}/usr/share
 		# provided by procps-ng
 		rm -f ${DESTDIR}/usr/share/man/man1/{kill,uptime}.1
 	fi
-	mv ${DESTDIR}/usr/bin/hostname ${DESTDIR}/usr/bin/hostname-coreutils
-	mv ${DESTDIR}/usr/share/man/man1/hostname.1 ${DESTDIR}/usr/share/man/man1/hostname-coreutils.1
+	mv ${DESTDIR}/usr/bin/hostname{,-coreutils}
+	mv ${DESTDIR}/usr/share/man/man1/hostname{,-coreutils}.1
+}
+
+coreutils-legacy_package() {
+	short_desc+=" - legacy build for old kernels"
+	pkg_install() {
+		cd ${sourcepkg}-${version}-legacy
+		make DESTDIR=${PKGDESTDIR} install
+		if [ "$CROSS_BUILD" ]; then
+			mv coreutils-${XBPS_MACHINE}/share/man \
+				${PKGDESTDIR}/usr/share
+			# provided by procps-ng
+			rm -f ${PKGDESTDIR}/usr/share/man/man1/{kill,uptime}.1
+		fi
+		mv ${PKGDESTDIR}/usr/bin/hostname{,-coreutils}
+		mv ${PKGDESTDIR}/usr/share/man/man1/hostname{,-coreutils}.1
+	}
 }

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

* Re: coreutils: reenable statx(2) support on glibc
  2020-04-02 12:06 [PR PATCH] coreutils: reenable statx(2) support on glibc pullmoll
@ 2020-04-02 12:10 ` xtraeme
  2020-04-02 12:18 ` [PR PATCH] [Updated] " pullmoll
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: xtraeme @ 2020-04-02 12:10 UTC (permalink / raw)
  To: ml

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

New comment by xtraeme on void-packages repository

https://github.com/void-linux/void-packages/pull/20570#issuecomment-607807227

Comment:
```
VERSIONS
       statx() was added to Linux in kernel 4.11; library support was added in
       glibc 2.28.
```

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

* Re: [PR PATCH] [Updated] coreutils: reenable statx(2) support on glibc
  2020-04-02 12:06 [PR PATCH] coreutils: reenable statx(2) support on glibc pullmoll
  2020-04-02 12:10 ` xtraeme
@ 2020-04-02 12:18 ` pullmoll
  2020-04-02 12:24 ` [PR PATCH] [Closed]: " pullmoll
  2020-04-02 12:24 ` pullmoll
  3 siblings, 0 replies; 5+ messages in thread
From: pullmoll @ 2020-04-02 12:18 UTC (permalink / raw)
  To: ml

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

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

https://github.com/pullmoll/void-packages coreutils-legacy
https://github.com/void-linux/void-packages/pull/20570

coreutils: reenable statx(2) support on glibc
Also create a coreutils-legacy package for use on old kernels (<= 4.19)
which does not try to use statx(2).

Supersedes: #20569

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-coreutils-legacy-20570.patch --]
[-- Type: text/x-diff, Size: 4708 bytes --]

From a1d535ad506e209b98af30327c6f7e7012a3044f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Thu, 2 Apr 2020 14:00:45 +0200
Subject: [PATCH] coreutils: reenable statx(2) support on glibc

Also create a coreutils-legacy package for use on old kernels (< 4.11)
which does not try to use statx(2).

Supersedes: #20569
---
 srcpkgs/coreutils-legacy   |  1 +
 srcpkgs/coreutils/template | 73 ++++++++++++++++++++++++++++++++++----
 2 files changed, 67 insertions(+), 7 deletions(-)
 create mode 120000 srcpkgs/coreutils-legacy

diff --git a/srcpkgs/coreutils-legacy b/srcpkgs/coreutils-legacy
new file mode 120000
index 00000000000..a4b710b1789
--- /dev/null
+++ b/srcpkgs/coreutils-legacy
@@ -0,0 +1 @@
+coreutils
\ No newline at end of file
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 16a2c9e1dbe..98de979b5fc 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,7 +1,7 @@
 # Template file for 'coreutils'
 pkgname=coreutils
 version=8.32
-revision=3
+revision=4
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
 short_desc="GNU core utilities"
@@ -40,6 +40,9 @@ pre_configure() {
 		make install
 		make distclean
 	fi
+	mkdir ../${pkgname}-${version}-legacy
+	cp -aR . ../${pkgname}-${version}-legacy
+	mv ../${pkgname}-${version}-legacy .
 }
 
 do_configure() {
@@ -51,9 +54,6 @@ do_configure() {
 	case "$XBPS_TARGET_MACHINE" in
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
-		# XXX disable statx(), needs glibc>=2.28 and linux>=4.11
-		# XXX seems to fail on travis always returning EACCES.
-		*) configure_args+=" ac_cv_func_statx=no";;
 	esac
 	#
 	# Do not install kill: provided by util-linux.
@@ -69,6 +69,12 @@ do_configure() {
 		sed -e 's;^\(cu_install_program =\).*;\1 install;' \
 			Makefile.cfg.orig >Makefile
 	fi
+	msg_normal "Configuring legacy build ...\n"
+	cd ${sourcepkg}-${version}-legacy
+	env $_force_unsafe_configure ./configure ${configure_args} \
+		--enable-install-program=arch,hostname \
+		--enable-no-install-program=kill,uptime \
+		--disable-rpath ac_cv_func_statx=no
 }
 
 do_build() {
@@ -88,6 +94,24 @@ do_build() {
 		sed -e '/hostname.1/d' Makefile.bak > Makefile
 	fi
 	make ${makejobs}
+	msg_normal "Building legacy version ...\n"
+	cd ${sourcepkg}-${version}-legacy
+	if [ "$CROSS_BUILD" ]; then
+		cp Makefile Makefile.orig
+		sed '/src_make_prime_list/d' Makefile.orig > Makefile
+		depbase=$(echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||')
+		cc -std=gnu99  -I. -I./lib  -Ilib -I./lib -Isrc -I./src  \
+			-fdiagnostics-show-option -funit-at-a-time -g -O2 -MT \
+			src/make-prime-list.o -MD -MP -MF $depbase.Tpo -c \
+			-o src/make-prime-list.o \
+			src/make-prime-list.c
+		mv -f $depbase.Tpo $depbase.Po
+		cc -std=gnu99 -fdiagnostics-show-option -funit-at-a-time -g -O2 \
+			-Wl,--as-needed  -o src/make-prime-list src/make-prime-list.o
+		cp Makefile Makefile.bak
+		sed -e '/hostname.1/d' Makefile.bak > Makefile
+	fi
+	make ${makejobs}
 }
 
 do_check() {
@@ -107,16 +131,51 @@ do_check() {
 	done
 
 	make check
+
+	cd ${sourcepkg}-${version}-legacy
+
+	# chgrp tests fail inside a chroot
+	sed -i '/tests\/chgrp/d' Makefile
+
+	# Tests that fail due to being inside a chroot
+	exeext_tests="chown lchown fchownat"
+
+	# Tests that depend on the tests reemoved
+	exeext_tests+=" fchmodat fchdir"
+
+	for test in $exeext_tests ; do
+		sed -i "/test-$test\$(EXEEXT)/d" gnulib-tests/Makefile
+	done
+
+	make check
 }
 
 do_install() {
 	make DESTDIR=${DESTDIR} install
 	if [ "$CROSS_BUILD" ]; then
-		mv ${wrksrc}/coreutils-${XBPS_MACHINE}/share/man \
+		mv coreutils-${XBPS_MACHINE}/share/man \
 			${DESTDIR}/usr/share
 		# provided by procps-ng
 		rm -f ${DESTDIR}/usr/share/man/man1/{kill,uptime}.1
 	fi
-	mv ${DESTDIR}/usr/bin/hostname ${DESTDIR}/usr/bin/hostname-coreutils
-	mv ${DESTDIR}/usr/share/man/man1/hostname.1 ${DESTDIR}/usr/share/man/man1/hostname-coreutils.1
+	mv ${DESTDIR}/usr/bin/hostname{,-coreutils}
+	mv ${DESTDIR}/usr/share/man/man1/hostname{,-coreutils}.1
+}
+
+coreutils-legacy_package() {
+	short_desc+=" - legacy build for kernels < 4.11"
+	provides="coreutils-${version}_${revision}"
+	replaces="coreutils>=0"
+	pkg_install() {
+		cd ${sourcepkg}-${version}-legacy
+		make DESTDIR=${PKGDESTDIR} install
+		if [ "$CROSS_BUILD" ]; then
+			mv coreutils-${XBPS_MACHINE}/share/man \
+				${PKGDESTDIR}/usr/share
+			# provided by procps-ng
+			rm -f ${PKGDESTDIR}/usr/share/man/man1/{kill,uptime}.1
+		fi
+		mv ${PKGDESTDIR}/usr/bin/hostname{,-coreutils}
+		mv ${PKGDESTDIR}/usr/share/man/man1/hostname{,-coreutils}.1
+	}
 }

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

* Re: coreutils: reenable statx(2) support on glibc
  2020-04-02 12:06 [PR PATCH] coreutils: reenable statx(2) support on glibc pullmoll
                   ` (2 preceding siblings ...)
  2020-04-02 12:24 ` [PR PATCH] [Closed]: " pullmoll
@ 2020-04-02 12:24 ` pullmoll
  3 siblings, 0 replies; 5+ messages in thread
From: pullmoll @ 2020-04-02 12:24 UTC (permalink / raw)
  To: ml

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

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/20570#issuecomment-607813620

Comment:
Not really needed.

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

* Re: [PR PATCH] [Closed]: coreutils: reenable statx(2) support on glibc
  2020-04-02 12:06 [PR PATCH] coreutils: reenable statx(2) support on glibc pullmoll
  2020-04-02 12:10 ` xtraeme
  2020-04-02 12:18 ` [PR PATCH] [Updated] " pullmoll
@ 2020-04-02 12:24 ` pullmoll
  2020-04-02 12:24 ` pullmoll
  3 siblings, 0 replies; 5+ messages in thread
From: pullmoll @ 2020-04-02 12:24 UTC (permalink / raw)
  To: ml

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

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

coreutils: reenable statx(2) support on glibc
https://github.com/void-linux/void-packages/pull/20570

Description:
Also create a coreutils-legacy package for use on old kernels (<= 4.19)
which does not try to use statx(2).

Supersedes: #20569

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

end of thread, other threads:[~2020-04-02 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 12:06 [PR PATCH] coreutils: reenable statx(2) support on glibc pullmoll
2020-04-02 12:10 ` xtraeme
2020-04-02 12:18 ` [PR PATCH] [Updated] " pullmoll
2020-04-02 12:24 ` [PR PATCH] [Closed]: " pullmoll
2020-04-02 12:24 ` pullmoll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).