Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 791202 - net-fs/autofs: glibc patch breaks musl
Summary: net-fs/autofs: glibc patch breaks musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-20 12:31 UTC by Fabian Groffen
Modified: 2021-05-21 01:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2021-05-20 12:31:21 UTC
Hi, the glibc patch for autofs introduces a block using __WORDSIZE.  This isn't available on musl, unless bits/reg.h is included.

Please review and approve the following changes to autofs:

% cat files/autofs-5.1.6-musl.patch
--- a/include/automount.h
+++ b/include/automount.h
@@ -25,6 +25,9 @@
 #include "list.h"
 
 #include <linux/auto_fs4.h>
+#ifndef __GLIBC__
+#include <bits/reg.h>
+#endif
 
 #include "defaults.h"
 #include "state.h"


--- autofs-5.1.6-r1.ebuild      2021-01-06 10:06:16.068379650 +0100
+++ autofs-5.1.6-r1.ebuild      2021-05-20 14:17:03.749218690 +0200
@@ -38,6 +38,7 @@
 
 PATCHES=(
        "${FILESDIR}/${P}-glibc.patch"
+       "${FILESDIR}/${P}-musl.patch"
        "${FILESDIR}/${P}-pid.patch"
 )
 

the same applies to version 5.1.7.

Thanks!
Comment 1 Michael 'veremitz' Everitt 2021-05-20 12:45:52 UTC
LGTM ! Is this something upstream is aware of? musl/hardened team do try to push patches 'up' where possible - many upstreams are accommodating as musl gains popularity.

Also, glad to have you amongst the team! :]
Comment 2 Fabian Groffen gentoo-dev 2021-05-20 12:47:37 UTC
well, no, because this is introduced by a glibc patch that we apply :(
Comment 3 Yixun Lan archtester gentoo-dev 2021-05-21 01:02:13 UTC
(In reply to Michael 'veremitz' Everitt from comment #1)
> LGTM ! Is this something upstream is aware of? musl/hardened team do try to
> push patches 'up' where possible - many upstreams are accommodating as musl
> gains popularity.
> 
exactly, you right! we should really push those patches to upstream ..
(which I planed to, but haven't really sit down to do it..)
Comment 4 Larry the Git Cow gentoo-dev 2021-05-21 01:07:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ec73cec03b0a344d2aa4dad638cac47219e3611

commit 0ec73cec03b0a344d2aa4dad638cac47219e3611
Author:     Yixun Lan <dlan@gentoo.org>
AuthorDate: 2021-05-21 01:06:21 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2021-05-21 01:06:36 +0000

    net-fs/autofs: fix musl build error
    
    Closes: https://bugs.gentoo.org/791202
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 net-fs/autofs/autofs-5.1.6-r1.ebuild        |  1 +
 net-fs/autofs/autofs-5.1.7.ebuild           |  1 +
 net-fs/autofs/files/autofs-5.1.6-musl.patch | 12 ++++++++++++
 3 files changed, 14 insertions(+)