Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/watchdog/, sys-apps/watchdog/files/
Date: Mon, 05 Jun 2017 21:15:58
Message-Id: 1496697219.b25df17dd08aa5150ea3e09dbf79cdf7c73e02ed.robbat2@gentoo
1 commit: b25df17dd08aa5150ea3e09dbf79cdf7c73e02ed
2 Author: Felix Janda <felix.janda <AT> posteo <DOT> de>
3 AuthorDate: Fri Apr 14 21:56:20 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 5 21:13:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b25df17d
7
8 sys-apps/watchdog: add two musl patches and bump eapi
9
10 Gentoo-Bug: https://bugs.gentoo.org/604260
11 (cherry picked from commit 02ab37b0d2b57a6c40e0b93978d37d8c4dc611bb)
12 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
13 Fixes: https://github.com/gentoo/gentoo/pull/4423
14
15 .../watchdog/files/watchdog-5.15-musl-nfs.patch | 27 ++++++++++++++++++++++
16 sys-apps/watchdog/files/watchdog-5.15-musl.patch | 23 ++++++++++++++++++
17 sys-apps/watchdog/watchdog-5.15.ebuild | 9 ++++++--
18 3 files changed, 57 insertions(+), 2 deletions(-)
19
20 diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch
21 new file mode 100644
22 index 00000000000..bee4ddc8d7b
23 --- /dev/null
24 +++ b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch
25 @@ -0,0 +1,27 @@
26 +commit f52c40680f0aad44b9ae16648803453ec00cbb2c
27 +Author: Paul Crawford <psc@×××××××××××××.uk>
28 +Date: Fri Dec 30 15:55:45 2016 +0000
29 +
30 + Compile with musl when nfs is disabled
31 +
32 + musl does by default not ship with rpc headers. The watchdog should
33 + not require rpc headers when nfs support is disabled.
34 +
35 + Patch by Felix Janda <fjanda@××××××××.net>
36 +
37 +diff --git a/include/sundries.h b/include/sundries.h
38 +index 4379982..98c489a 100644
39 +--- a/include/sundries.h
40 ++++ b/include/sundries.h
41 +@@ -9,9 +9,11 @@
42 + #include <signal.h>
43 + #include <stdarg.h>
44 + #include <stdlib.h>
45 ++#if HAVE_NFS
46 + #if !defined(bool_t) && !defined(__GLIBC__)
47 + #include <rpc/types.h>
48 + #endif
49 ++#endif
50 +
51 + extern int mount_mount_quiet;
52 + extern int mount_verbose;
53
54 diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl.patch b/sys-apps/watchdog/files/watchdog-5.15-musl.patch
55 new file mode 100644
56 index 00000000000..ae62c8014e5
57 --- /dev/null
58 +++ b/sys-apps/watchdog/files/watchdog-5.15-musl.patch
59 @@ -0,0 +1,23 @@
60 +commit c5cb4e1a0339844ae3f55ff1dc4a716c28012f05
61 +Author: Paul Crawford <psc@×××××××××××××.uk>
62 +Date: Tue Jun 28 18:08:48 2016 +0100
63 +
64 + Include linux/param.h for EXEC_PAGESIZE definition
65 +
66 + Musl does not include linux/param.h whereas glibc does, so it fails
67 + to build on musl. Patch supplied by Khem Raj <raj.khem@×××××.com>
68 +
69 +diff --git a/src/watchdog.c b/src/watchdog.c
70 +index acf6450..486384a 100644
71 +--- a/src/watchdog.c
72 ++++ b/src/watchdog.c
73 +@@ -26,6 +26,9 @@
74 + #include <sys/param.h> /* For EXEC_PAGESIZE */
75 + #include <linux/oom.h>
76 + #include <linux/watchdog.h>
77 ++#ifdef __linux__
78 ++#include <linux/param.h>
79 ++#endif
80 + #include <string.h>
81 +
82 + #include <libgen.h>
83
84 diff --git a/sys-apps/watchdog/watchdog-5.15.ebuild b/sys-apps/watchdog/watchdog-5.15.ebuild
85 index 900a3d31388..887cff30080 100644
86 --- a/sys-apps/watchdog/watchdog-5.15.ebuild
87 +++ b/sys-apps/watchdog/watchdog-5.15.ebuild
88 @@ -1,7 +1,7 @@
89 -# Copyright 1999-2016 Gentoo Foundation
90 +# Copyright 1999-2017 Gentoo Foundation
91 # Distributed under the terms of the GNU General Public License v2
92
93 -EAPI=5
94 +EAPI=6
95
96 inherit toolchain-funcs flag-o-matic systemd
97
98 @@ -17,6 +17,11 @@ IUSE="nfs"
99 DEPEND="nfs? ( net-libs/libtirpc )"
100 RDEPEND="${DEPEND}"
101
102 +PATCHES=(
103 + "${FILESDIR}"/${P}-musl.patch
104 + "${FILESDIR}"/${P}-musl-nfs.patch
105 +)
106 +
107 src_configure() {
108 if use nfs ; then
109 tc-export PKG_CONFIG