I'm not entirely sure if this is a valid bug in the ebuild, but I spent quite a considerable amount of time trying to figure out why a bugfix backport I put into my user patches wasn't working. Turns out the zfs/zfs-kmod ebuilds only run eautoreconf for the 9999 version, and the patches in question modified the configure.ac input files, so they never actually took any effect. Most ebuilds I have seen just run eautoreconf unconditionally, even on release versions. So I think the zfs ebuilds should probably do the same.
(In reply to Timo Rothenpieler from comment #0) > I'm not entirely sure if this is a valid bug in the ebuild, but I spent > quite a considerable amount of time trying to figure out why a bugfix > backport I put into my user patches wasn't working. > > Turns out the zfs/zfs-kmod ebuilds only run eautoreconf for the 9999 > version, and the patches in question modified the configure.ac input files, > so they never actually took any effect. Right, this is kind of a frustrating case which user patches don't handle well right now. I guess some sort of way to say 'eautoreconf if user patches' or whatever would be useful. > > Most ebuilds I have seen just run eautoreconf unconditionally, even on > release versions. > This usually only happens if we're patching configure/*, something is wrong with the shipped files, or they're non-existent. > So I think the zfs ebuilds should probably do the same. It's useless delay. I tend to agree it's not THAT big of a deal, but adding it just for user patches seems a bit excessive to me. I'll close it WONTFIX, but assign because gyakovlev might accept that people often want to try bug fixes for ZFS. @gyakovlev, thoughts?
I wonder if there should be some universal way to signal that your user patches require a re-run of autoreconf. Or just plain re-run it if there are any user patches present? But even for that I don't see a clean way to implement it.
previous generation of zfs ebuilds used autotool-utils eclass, which had a nifty hook that was detecting if autoconf-worty files were patched and ran eautoreconf. this eclass is gone now. I've added unconditional inherit of autotools eclass in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3943a4d9506d78b2dbff79203f28f0ac6df2f15 so users can install a hook to run eautoreconf. what you can do, without editing ebuilds is the following create a file at /etc/portage/env/sys-fs/zfs with the following contents post_src_prepare() { eautoreconf ; } and ebuild will always run eautoreconf, this will extend src_prepare function. https://dev.gentoo.org/~zmedico/portage/doc/ch01s02.html you can make this file only work for specific versions like /etc/portage/env/sys-fs/zfs-2.1.0_rc5 I actually was planning on adding detection of user patches back but forgot about it =) zfs is a special package and historically we had such behavior, also users may want to add special, non-general public patches, or test possible fixes easier. I honestly think we should add it or at least a message to ebuild, with instructions how to run eautoreconf
here's previous implementation https://github.com/gentoo/gentoo/blob/b2432b263b4f698572288e0444b6b7ce8e918bfa/eclass/autotools-utils.eclass#L236 does not look too bad need to ask mgorny what he thinks about it
That looks quite good actually, though in this specific case, would actually not have caught it, since the fixes are in some .m4 files in config/. But just adding a random patch that adds a trivial change to configure.ac is easy enough.
we discussed it with sam and will probably just run it unconditionally, but I need to look at it first, and we probably will have to leave existing stable versions untouched. investigation in progress, so stay tuned. just curious, which patch and for what version you were testing?
and since conditional implementation will be inlined into ebuild, we can also check config/*.m4 files for changes, so it does not have to be too generic.
Missing 5.12 compatibility for the 2.1.0_rc5: https://github.com/openzfs/zfs/pull/12139 rc6 now has them included, so should not be a huge issue anymore now
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=919f0c385d58501b3b1aa32543ff3772aea483ee commit 919f0c385d58501b3b1aa32543ff3772aea483ee Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-06-04 01:20:37 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-06-04 01:25:13 +0000 sys-fs/zfs-kmod: revbump 2.0.4, add 5.12 support and fixes run eautoreconf, as a lot of m4 files changed Bug: https://bugs.gentoo.org/792627 Bug: https://bugs.gentoo.org/790686 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> .../files/zfs-8.0.4_5.12_compat_bio_max_segs.patch | 91 ++ .../zfs-8.0.4_5.12_compat_idmapped_mounts.patch | 1231 ++++++++++++++++++++ .../zfs-8.0.4_5.12_compat_iov_iter_advance.patch | 40 + .../files/zfs-8.0.4_5.12_compat_tmpfile.patch | 89 ++ .../files/zfs-8.0.4_5.12_compat_userns.patch | 173 +++ .../zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch | 59 + .../zfs-kmod/files/zfs-8.0.4_stream_resume.patch | 33 + sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild | 186 +++ 8 files changed, 1902 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68c48d16aec7330135cecb64ded53f535c2b4b74 commit 68c48d16aec7330135cecb64ded53f535c2b4b74 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-06-11 02:07:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-06-11 02:07:13 +0000 sys-fs/zfs: run eautoreconf unconditionally Closes: https://bugs.gentoo.org/792627 Signed-off-by: Sam James <sam@gentoo.org> sys-fs/zfs/zfs-2.1.0_rc7.ebuild | 8 +++++--- sys-fs/zfs/zfs-9999.ebuild | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddc94ea52b95a8274768f178b9a5390602b72a75 commit ddc94ea52b95a8274768f178b9a5390602b72a75 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-06-11 02:06:02 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-06-11 02:06:02 +0000 sys-fs/zfs-kmod: run eautoreconf unconditionally Bug: https://bugs.gentoo.org/792627 Signed-off-by: Sam James <sam@gentoo.org> sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild | 7 ++++--- sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-)