mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 02:16:59 +02:00
Merge pull request #1611 from flatcar-linux/dongsu/gcc-10
Preparation for gcc 10
This commit is contained in:
commit
f3b79484d8
@ -0,0 +1,51 @@
|
|||||||
|
From 74dffbca5d6fa37ed4ecd9b3a75206e33497e3df Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <74dffbca5d6fa37ed4ecd9b3a75206e33497e3df.1644245904.git.dpark@linux.microsoft.com>
|
||||||
|
From: Dongsu Park <dpark@linux.microsoft.com>
|
||||||
|
Date: Mon, 7 Feb 2022 15:44:24 +0100
|
||||||
|
Subject: [PATCH] vmdk: fix build issues with gcc 10 or newer
|
||||||
|
|
||||||
|
As gcc 10 or newer defaults to `-fno-common`, we need to define only
|
||||||
|
once in a *.c file, instead of *.h that can be imported multiple times
|
||||||
|
by *.c files.
|
||||||
|
|
||||||
|
Otherwise, build would fail like:
|
||||||
|
```
|
||||||
|
.../x86_64-pc-linux-gnu/bin/ld:
|
||||||
|
../build/vmdk/mkdisk.o:.../vmdk/diskinfo.h:38:
|
||||||
|
multiple definition of `toolsVersion';
|
||||||
|
../build/vmdk/flat.o:.../vmdk/diskinfo.h:38: first defined here
|
||||||
|
```
|
||||||
|
---
|
||||||
|
vmdk/diskinfo.h | 2 +-
|
||||||
|
vmdk/mkdisk.c | 2 ++
|
||||||
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/vmdk/diskinfo.h b/vmdk/diskinfo.h
|
||||||
|
index 2b58f432..f4f94419 100644
|
||||||
|
--- a/vmdk/diskinfo.h
|
||||||
|
+++ b/vmdk/diskinfo.h
|
||||||
|
@@ -35,7 +35,7 @@ struct DiskInfo {
|
||||||
|
const DiskInfoVMT *vmt;
|
||||||
|
};
|
||||||
|
|
||||||
|
-char *toolsVersion; /* toolsVersion in metadata */
|
||||||
|
+extern char *toolsVersion; /* toolsVersion in metadata */
|
||||||
|
|
||||||
|
DiskInfo *Flat_Open(const char *fileName);
|
||||||
|
DiskInfo *Flat_Create(const char *fileName, off_t capacity);
|
||||||
|
diff --git a/vmdk/mkdisk.c b/vmdk/mkdisk.c
|
||||||
|
index b6c0cc94..b66b7d5d 100644
|
||||||
|
--- a/vmdk/mkdisk.c
|
||||||
|
+++ b/vmdk/mkdisk.c
|
||||||
|
@@ -24,6 +24,8 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
|
||||||
|
+char *toolsVersion; /* toolsVersion in metadata */
|
||||||
|
+
|
||||||
|
static int
|
||||||
|
copyData(DiskInfo *dst,
|
||||||
|
off_t dstOffset,
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -21,6 +21,10 @@ IUSE=""
|
|||||||
DEPEND=""
|
DEPEND=""
|
||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/vmdk-fix-build-issues-with-gcc-10-or-newer.patch"
|
||||||
|
)
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
emake DESTDIR="${D}" install
|
emake DESTDIR="${D}" install
|
||||||
}
|
}
|
||||||
|
1
sdk_container/src/third_party/coreos-overlay/changelog/updates/2022-02-08-gcc-10-prep.md
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/changelog/updates/2022-02-08-gcc-10-prep.md
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
- nfs-utils ([2.5.4](https://lore.kernel.org/linux-fsdevel/c8795653-7728-18a4-93dc-58943ad0fe09@redhat.com/))
|
@ -2,7 +2,7 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
CROS_WORKON_PROJECT="kinvolk/flatcar-dev-util"
|
CROS_WORKON_PROJECT="flatcar-linux/flatcar-dev-util"
|
||||||
CROS_WORKON_REPO="https://github.com"
|
CROS_WORKON_REPO="https://github.com"
|
||||||
CROS_WORKON_LOCALNAME="dev"
|
CROS_WORKON_LOCALNAME="dev"
|
||||||
CROS_WORKON_LOCALDIR="src/platform"
|
CROS_WORKON_LOCALDIR="src/platform"
|
||||||
@ -10,7 +10,7 @@ CROS_WORKON_LOCALDIR="src/platform"
|
|||||||
if [[ "${PV}" == 9999 ]]; then
|
if [[ "${PV}" == 9999 ]]; then
|
||||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||||
else
|
else
|
||||||
CROS_WORKON_COMMIT="9d4cad835bf6c0b60c750f7e40e8497e4281bc78" # flatcar-master
|
CROS_WORKON_COMMIT="e3cc627a3d2ef3433fa15f18cb1fdfeb72857541" # flatcar-master
|
||||||
KEYWORDS="amd64 arm arm64 x86"
|
KEYWORDS="amd64 arm arm64 x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ PYTHON_COMPAT=( python3_{6..10} )
|
|||||||
inherit cros-workon python-single-r1
|
inherit cros-workon python-single-r1
|
||||||
|
|
||||||
DESCRIPTION="emerge utilities for Flatcar developer images"
|
DESCRIPTION="emerge utilities for Flatcar developer images"
|
||||||
HOMEPAGE="https://github.com/kinvolk/flatcar-dev-util/"
|
HOMEPAGE="https://github.com/flatcar-linux/flatcar-dev-util/"
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
|
@ -1 +1 @@
|
|||||||
DIST nfs-utils-2.3.1.tar.bz2 854899 BLAKE2B f9541b9dc103d978f21d57d8ba0c14a3b30f6ba874b112239d014076c1c72b6654e8e02b4bfea686e658dac84d1e896b872bc2054591275ef1713ae4e7b7d005 SHA512 de3e70f8656bc5b5aa98262685a9e80929c6314234d9bbb74d4c7efcb7a8b2640d48d2100850b403157ebefc8f0eb48598b48238fae795f64c7a0e9a8bff93e3
|
DIST nfs-utils-2.5.4.tar.bz2 943373 BLAKE2B 72ed871613701f5b035941a7aed957771fe3b6a19fefee203130442c292bbbefde35721f2287fef19046d2d837faeda43b06a93a5acdb8ac6240eef90e6dd12c SHA512 b1395c5b06a06246666c48174594b1e08b71cf40b8f94b533497bd92625401a669e2c40e48dbd665891ad2247bc94d7d604d0c5d0f0b66bfe957b03d42e5d305
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
ripped from Debian
|
|
||||||
|
|
||||||
--- nfs-utils-1.1.4/utils/mount/fstab.c
|
|
||||||
+++ nfs-utils-1.1.4/utils/mount/fstab.c
|
|
||||||
@@ -57,7 +57,7 @@ mtab_does_not_exist(void) {
|
|
||||||
return var_mtab_does_not_exist;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int
|
|
||||||
+int
|
|
||||||
mtab_is_a_symlink(void) {
|
|
||||||
get_mtab_info();
|
|
||||||
return var_mtab_is_a_symlink;
|
|
||||||
--- nfs-utils-1.1.4/utils/mount/fstab.h
|
|
||||||
+++ nfs-utils-1.1.4/utils/mount/fstab.h
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
#define _PATH_FSTAB "/etc/fstab"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int mtab_is_a_symlink(void);
|
|
||||||
int mtab_is_writable(void);
|
|
||||||
int mtab_does_not_exist(void);
|
|
||||||
void reset_mtab_info(void);
|
|
||||||
--- nfs-utils-1.1.4/utils/mount/mount.c
|
|
||||||
+++ nfs-utils-1.1.4/utils/mount/mount.c
|
|
||||||
@@ -230,6 +230,13 @@ create_mtab (void) {
|
|
||||||
int flags;
|
|
||||||
mntFILE *mfp;
|
|
||||||
|
|
||||||
+ /* Avoid writing if the mtab is a symlink to /proc/mounts, since
|
|
||||||
+ that would create a file /proc/mounts in case the proc filesystem
|
|
||||||
+ is not mounted, and the fchmod below would also fail. */
|
|
||||||
+ if (mtab_is_a_symlink()) {
|
|
||||||
+ return EX_SUCCESS;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
lock_mtab();
|
|
||||||
|
|
||||||
mfp = nfs_setmntent (MOUNTED, "a+");
|
|
@ -1,48 +0,0 @@
|
|||||||
this is kind of hacky, but automake doesn't make this easy
|
|
||||||
for us atm, so hack away :(
|
|
||||||
|
|
||||||
(recent autotools will always add $(CFLAGS)/etc... to the compile)
|
|
||||||
|
|
||||||
--- a/tools/locktest/Makefile.am
|
|
||||||
+++ b/tools/locktest/Makefile.am
|
|
||||||
@@ -1,12 +1,11 @@
|
|
||||||
## Process this file with automake to produce Makefile.in
|
|
||||||
|
|
||||||
CC=$(CC_FOR_BUILD)
|
|
||||||
-LIBTOOL = @LIBTOOL@ --tag=CC
|
|
||||||
+CFLAGS=$(CFLAGS_FOR_BUILD)
|
|
||||||
+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
|
|
||||||
+LDFLAGS=$(LDFLAGS_FOR_BUILD)
|
|
||||||
|
|
||||||
noinst_PROGRAMS = testlk
|
|
||||||
testlk_SOURCES = testlk.c
|
|
||||||
-testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
|
|
||||||
-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
|
|
||||||
-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
|
||||||
--- a/tools/rpcgen/Makefile.am
|
|
||||||
+++ b/tools/rpcgen/Makefile.am
|
|
||||||
@@ -1,7 +1,9 @@
|
|
||||||
## Process this file with automake to produce Makefile.in
|
|
||||||
|
|
||||||
CC=$(CC_FOR_BUILD)
|
|
||||||
-LIBTOOL = @LIBTOOL@ --tag=CC
|
|
||||||
+CFLAGS=$(CFLAGS_FOR_BUILD)
|
|
||||||
+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
|
|
||||||
+LDFLAGS=$(LDFLAGS_FOR_BUILD)
|
|
||||||
|
|
||||||
noinst_PROGRAMS = rpcgen
|
|
||||||
rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
|
|
||||||
@@ -9,10 +11,6 @@
|
|
||||||
rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
|
|
||||||
rpc_scan.h rpc_util.h
|
|
||||||
|
|
||||||
-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
|
|
||||||
-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
|
|
||||||
-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
|
|
||||||
-rpcgen_LDADD=$(LIBTIRPC)
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
|
||||||
|
|
||||||
EXTRA_DIST = rpcgen.new.1
|
|
@ -1,40 +0,0 @@
|
|||||||
From 1451d7585bf1c622658ccc04abac7e79ffe40263 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Justin Mitchell <jumitche@redhat.com>
|
|
||||||
Date: Mon, 8 Jan 2018 09:14:11 -0500
|
|
||||||
Subject: [PATCH] svcgssd: Update svcgssd so that it builds
|
|
||||||
|
|
||||||
Since a15bd948 the --enable-svcgss option no longer builds
|
|
||||||
as svcgssd references functions which were changed at that time.
|
|
||||||
Fix those, and other function changes since then.
|
|
||||||
|
|
||||||
Signed-off-by: Justin Mitchell <jumitche@redhat.com>
|
|
||||||
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
||||||
---
|
|
||||||
utils/gssd/svcgssd.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c
|
|
||||||
index 3514ae1..23f0c0b 100644
|
|
||||||
--- a/utils/gssd/svcgssd.c
|
|
||||||
+++ b/utils/gssd/svcgssd.c
|
|
||||||
@@ -63,6 +63,8 @@
|
|
||||||
#include "err_util.h"
|
|
||||||
#include "conffile.h"
|
|
||||||
|
|
||||||
+struct state_paths etab;
|
|
||||||
+
|
|
||||||
void
|
|
||||||
sig_die(int signal)
|
|
||||||
{
|
|
||||||
@@ -101,7 +103,7 @@ main(int argc, char *argv[])
|
|
||||||
char *principal = NULL;
|
|
||||||
char *s;
|
|
||||||
|
|
||||||
- conf_init(NFS_CONFFILE);
|
|
||||||
+ conf_init_file(NFS_CONFFILE);
|
|
||||||
|
|
||||||
s = conf_get_str("svcgssd", "principal");
|
|
||||||
if (!s)
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
|||||||
|
From 6ab8c7c186bd4a547a0ca435ecabe10ee50039c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Frysinger <vapier@gentoo.org>
|
||||||
|
Date: Thu, 22 Oct 2020 19:44:34 +0200
|
||||||
|
Subject: [PATCH] Don't build with -Werror flags
|
||||||
|
|
||||||
|
https://bugs.gentoo.org/656984
|
||||||
|
|
||||||
|
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||||
|
---
|
||||||
|
configure.ac | 34 +---------------------------------
|
||||||
|
1 file changed, 1 insertion(+), 33 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 50847d8a..6bc18e93 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -631,47 +631,15 @@ AC_SUBST(CPPFLAGS_FOR_BUILD)
|
||||||
|
AC_SUBST(LDFLAGS_FOR_BUILD)
|
||||||
|
|
||||||
|
my_am_cflags="\
|
||||||
|
- -pipe \
|
||||||
|
-Wall \
|
||||||
|
-Wextra \
|
||||||
|
$rpcgen_cflags \
|
||||||
|
- -Werror=missing-prototypes \
|
||||||
|
- -Werror=missing-declarations \
|
||||||
|
- -Werror=format=2 \
|
||||||
|
- -Werror=undef \
|
||||||
|
- -Werror=missing-include-dirs \
|
||||||
|
- -Werror=strict-aliasing=2 \
|
||||||
|
- -Werror=init-self \
|
||||||
|
- -Werror=implicit-function-declaration \
|
||||||
|
- -Werror=return-type \
|
||||||
|
- -Werror=switch \
|
||||||
|
- -Werror=overflow \
|
||||||
|
- -Werror=parentheses \
|
||||||
|
- -Werror=aggregate-return \
|
||||||
|
- -Werror=unused-result \
|
||||||
|
-fno-strict-aliasing \
|
||||||
|
"
|
||||||
|
|
||||||
|
-AC_DEFUN([CHECK_CCSUPPORT], [
|
||||||
|
- my_save_cflags="$CFLAGS"
|
||||||
|
- CFLAGS="-Werror $1"
|
||||||
|
- AC_MSG_CHECKING([whether CC supports $1])
|
||||||
|
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||||
|
- [AC_MSG_RESULT([yes])]
|
||||||
|
- [$2+=$1],
|
||||||
|
- [AC_MSG_RESULT([no])]
|
||||||
|
- )
|
||||||
|
- CFLAGS="$my_save_cflags"
|
||||||
|
-])
|
||||||
|
-
|
||||||
|
-CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
|
||||||
|
-CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
|
||||||
|
-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
|
||||||
|
-CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
|
||||||
|
-CHECK_CCSUPPORT([-Wno-cast-function-type], [flg5])
|
||||||
|
AX_GCC_FUNC_ATTRIBUTE([format])
|
||||||
|
|
||||||
|
-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4 $flg5"])
|
||||||
|
+AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
|
||||||
|
|
||||||
|
# Make sure that $ACLOCAL_FLAGS are used during a rebuild
|
||||||
|
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
|
||||||
|
--
|
||||||
|
2.29.0
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=feb3dfc7127cf1337530ccb06ed90e818b026a07#patch1
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1979816
|
||||||
|
https://bugs.gentoo.org/808183
|
||||||
|
|
||||||
|
Slightly rebased by sam@ to account for version.h moving around.
|
||||||
|
|
||||||
|
From feb3dfc7127cf1337530ccb06ed90e818b026a07 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Dickson <steved@redhat.com>
|
||||||
|
Date: Wed, 22 Sep 2021 11:31:56 -0400
|
||||||
|
Subject: [PATCH] mountd: only do NFSv4 logging on supported kernels.
|
||||||
|
|
||||||
|
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979816
|
||||||
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
||||||
|
--- a/support/export/v4clients.c
|
||||||
|
+++ b/support/export/v4clients.c
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
#include <sys/inotify.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "export.h"
|
||||||
|
+#include "../../utils/mount/version.h"
|
||||||
|
|
||||||
|
/* search.h declares 'struct entry' and nfs_prot.h
|
||||||
|
* does too. Easiest fix is to trick search.h into
|
||||||
|
@@ -23,6 +24,8 @@ static int clients_fd = -1;
|
||||||
|
|
||||||
|
void v4clients_init(void)
|
||||||
|
{
|
||||||
|
+ if (linux_version_code() < MAKE_VERSION(5, 3, 0))
|
||||||
|
+ return;
|
||||||
|
if (clients_fd >= 0)
|
||||||
|
return;
|
||||||
|
clients_fd = inotify_init1(IN_NONBLOCK);
|
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<maintainer type="project">
|
<maintainer type="project">
|
||||||
<email>base-system@gentoo.org</email>
|
<email>base-system@gentoo.org</email>
|
||||||
<name>Gentoo Base System</name>
|
<name>Gentoo Base System</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<longdescription>NFS client and server daemons</longdescription>
|
|
||||||
<use>
|
<use>
|
||||||
<flag name="junction">Enable NFS junction support in nfsref</flag>
|
<flag name="junction">Enable NFS junction support in nfsref</flag>
|
||||||
<flag name="ldap">Add ldap support</flag>
|
<flag name="ldap">Add ldap support</flag>
|
||||||
|
@ -1,27 +1,26 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=6
|
EAPI=7
|
||||||
|
|
||||||
TMPFILES_OPTIONAL=1
|
TMPFILES_OPTIONAL=1
|
||||||
inherit autotools flag-o-matic multilib systemd tmpfiles
|
inherit autotools linux-info systemd tmpfiles
|
||||||
|
|
||||||
DESCRIPTION="NFS client and server daemons"
|
DESCRIPTION="NFS client and server daemons"
|
||||||
HOMEPAGE="http://linux-nfs.org/"
|
HOMEPAGE="http://linux-nfs.org/"
|
||||||
|
|
||||||
if [[ "${PV}" = *_rc* ]] ; then
|
if [[ "${PV}" = *_rc* ]] ; then
|
||||||
inherit versionator
|
MY_PV="$(ver_rs 1- -)"
|
||||||
MY_PV="$(replace_all_version_separators -)"
|
|
||||||
SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
|
SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
|
||||||
S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
|
S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
|
||||||
else
|
else
|
||||||
SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
|
SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
|
||||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE="caps ipv6 kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
|
IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 sasl selinux tcpd +uuid"
|
||||||
REQUIRED_USE="kerberos? ( nfsv4 )"
|
REQUIRED_USE="kerberos? ( nfsv4 )"
|
||||||
RESTRICT="test" #315573
|
RESTRICT="test" #315573
|
||||||
|
|
||||||
@ -29,17 +28,24 @@ RESTRICT="test" #315573
|
|||||||
# files, and nfs-utils doesn't build against heimdal either,
|
# files, and nfs-utils doesn't build against heimdal either,
|
||||||
# so don't depend on virtual/krb.
|
# so don't depend on virtual/krb.
|
||||||
# (04 Feb 2005 agriffis)
|
# (04 Feb 2005 agriffis)
|
||||||
DEPEND_COMMON="
|
COMMON_DEPEND="
|
||||||
|
dev-db/sqlite:3
|
||||||
|
dev-libs/libxml2
|
||||||
net-libs/libtirpc:=
|
net-libs/libtirpc:=
|
||||||
>=net-nds/rpcbind-0.2.4
|
>=net-nds/rpcbind-0.2.4
|
||||||
sys-libs/e2fsprogs-libs
|
sys-fs/e2fsprogs
|
||||||
caps? ( sys-libs/libcap )
|
caps? ( sys-libs/libcap )
|
||||||
ldap? ( net-nds/openldap )
|
ldap? (
|
||||||
|
net-nds/openldap
|
||||||
|
sasl? (
|
||||||
|
app-crypt/mit-krb5
|
||||||
|
dev-libs/cyrus-sasl:2
|
||||||
|
)
|
||||||
|
)
|
||||||
libmount? ( sys-apps/util-linux )
|
libmount? ( sys-apps/util-linux )
|
||||||
nfsdcld? ( >=dev-db/sqlite-3.3 )
|
|
||||||
nfsv4? (
|
nfsv4? (
|
||||||
dev-libs/libevent:=
|
dev-libs/libevent:=
|
||||||
>=sys-apps/keyutils-1.5.9
|
>=sys-apps/keyutils-1.5.9:=
|
||||||
kerberos? (
|
kerberos? (
|
||||||
>=net-libs/libtirpc-0.2.4-r1[kerberos]
|
>=net-libs/libtirpc-0.2.4-r1[kerberos]
|
||||||
app-crypt/mit-krb5
|
app-crypt/mit-krb5
|
||||||
@ -50,7 +56,10 @@ DEPEND_COMMON="
|
|||||||
)
|
)
|
||||||
tcpd? ( sys-apps/tcp-wrappers )
|
tcpd? ( sys-apps/tcp-wrappers )
|
||||||
uuid? ( sys-apps/util-linux )"
|
uuid? ( sys-apps/util-linux )"
|
||||||
RDEPEND="${DEPEND_COMMON}
|
DEPEND="${COMMON_DEPEND}
|
||||||
|
elibc_musl? ( sys-libs/queue-standalone )
|
||||||
|
"
|
||||||
|
RDEPEND="${COMMON_DEPEND}
|
||||||
!net-libs/libnfsidmap
|
!net-libs/libnfsidmap
|
||||||
!net-nds/portmap
|
!net-nds/portmap
|
||||||
!<sys-apps/openrc-0.13.9
|
!<sys-apps/openrc-0.13.9
|
||||||
@ -59,16 +68,27 @@ RDEPEND="${DEPEND_COMMON}
|
|||||||
sec-policy/selinux-rpcbind
|
sec-policy/selinux-rpcbind
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
DEPEND="${DEPEND_COMMON}
|
BDEPEND="
|
||||||
net-libs/rpcsvc-proto
|
net-libs/rpcsvc-proto
|
||||||
virtual/pkgconfig"
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
|
"${FILESDIR}"/${PN}-2.5.2-no-werror.patch
|
||||||
"${FILESDIR}"/${PN}-1.2.8-cross-build.patch
|
# Upstream, see bug #808183
|
||||||
"${FILESDIR}"/${P}-svcgssd_undefined_reference.patch #641912
|
"${FILESDIR}"/${P}-kernel-5.3-nfsv4.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
linux-info_pkg_setup
|
||||||
|
if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then
|
||||||
|
ewarn "Your NFS server will be unable to track clients across server restarts!"
|
||||||
|
ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode"
|
||||||
|
ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to"
|
||||||
|
ewarn "support the legacy, in-kernel client tracker."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
default
|
default
|
||||||
|
|
||||||
@ -82,16 +102,23 @@ src_prepare() {
|
|||||||
src_configure() {
|
src_configure() {
|
||||||
export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
|
export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
|
||||||
export ac_cv_header_keyutils_h=$(usex nfsidmap)
|
export ac_cv_header_keyutils_h=$(usex nfsidmap)
|
||||||
|
|
||||||
|
# SASL is consumed in a purely automagic way
|
||||||
|
export ac_cv_header_sasl_h=no
|
||||||
|
export ac_cv_header_sasl_sasl_h=$(usex sasl)
|
||||||
|
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
--with-statedir="${EPREFIX%/}"/var/lib/nfs
|
--disable-static
|
||||||
|
--with-statedir="${EPREFIX}"/var/lib/nfs
|
||||||
--enable-tirpc
|
--enable-tirpc
|
||||||
--with-tirpcinclude="${EPREFIX%/}"/usr/include/tirpc/
|
--with-tirpcinclude="${ESYSROOT}"/usr/include/tirpc/
|
||||||
--with-pluginpath="${EPREFIX%/}"/usr/$(get_libdir)/libnfsidmap
|
--with-pluginpath="${EPREFIX}"/usr/$(get_libdir)/libnfsidmap
|
||||||
--with-rpcgen
|
--with-rpcgen
|
||||||
--with-systemd="$(systemd_get_systemunitdir)"
|
--with-systemd="$(systemd_get_systemunitdir)"
|
||||||
--without-gssglue
|
--without-gssglue
|
||||||
$(use_enable caps)
|
$(use_enable caps)
|
||||||
$(use_enable ipv6)
|
$(use_enable ipv6)
|
||||||
|
$(use_enable junction)
|
||||||
$(use_enable kerberos gss)
|
$(use_enable kerberos gss)
|
||||||
$(use_enable kerberos svcgss)
|
$(use_enable kerberos svcgss)
|
||||||
$(use_enable ldap)
|
$(use_enable ldap)
|
||||||
@ -105,7 +132,7 @@ src_configure() {
|
|||||||
econf "${myeconfargs[@]}"
|
econf "${myeconfargs[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile(){
|
src_compile() {
|
||||||
# remove compiled files bundled in the tarball
|
# remove compiled files bundled in the tarball
|
||||||
emake clean
|
emake clean
|
||||||
default
|
default
|
||||||
@ -119,9 +146,12 @@ src_install() {
|
|||||||
# Don't overwrite existing xtab/etab, install the original
|
# Don't overwrite existing xtab/etab, install the original
|
||||||
# versions somewhere safe... more info in pkg_postinst
|
# versions somewhere safe... more info in pkg_postinst
|
||||||
keepdir /var/lib/nfs/{,sm,sm.bak}
|
keepdir /var/lib/nfs/{,sm,sm.bak}
|
||||||
mv "${ED%/}"/var/lib/nfs "${ED%/}"/usr/$(get_libdir)/ || die
|
mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die
|
||||||
|
|
||||||
if use nfsv4 && use nfsidmap ; then
|
if use nfsv4 && use nfsidmap ; then
|
||||||
|
insinto /etc
|
||||||
|
doins support/nfsidmap/idmapd.conf
|
||||||
|
|
||||||
# Install a config file for idmappers in newer kernels. #415625
|
# Install a config file for idmappers in newer kernels. #415625
|
||||||
insinto /etc/request-key.d
|
insinto /etc/request-key.d
|
||||||
echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
|
echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
|
||||||
@ -131,7 +161,7 @@ src_install() {
|
|||||||
dotmpfiles "${FILESDIR}"/nfs-utils.conf
|
dotmpfiles "${FILESDIR}"/nfs-utils.conf
|
||||||
|
|
||||||
# Provide an empty xtab for compatibility with the old tmpfiles config.
|
# Provide an empty xtab for compatibility with the old tmpfiles config.
|
||||||
touch "${ED%/}"/usr/$(get_libdir)/nfs/xtab
|
touch "${ED}"/usr/$(get_libdir)/nfs/xtab
|
||||||
|
|
||||||
# Maintain compatibility with the old gentoo systemd unit names, since nfs-utils has units upstream now.
|
# Maintain compatibility with the old gentoo systemd unit names, since nfs-utils has units upstream now.
|
||||||
dosym nfs-server.service "$(systemd_get_systemunitdir)"/nfsd.service
|
dosym nfs-server.service "$(systemd_get_systemunitdir)"/nfsd.service
|
@ -51,7 +51,7 @@ dev-util/patchelf *
|
|||||||
|
|
||||||
=sys-apps/man-db-2.7.6.1-r2 ~arm64
|
=sys-apps/man-db-2.7.6.1-r2 ~arm64
|
||||||
=sys-apps/policycoreutils-3.1-r3 ~arm64
|
=sys-apps/policycoreutils-3.1-r3 ~arm64
|
||||||
=sys-apps/kexec-tools-2.0.17-r1 ~arm64
|
=sys-apps/kexec-tools-2.0.22 ~arm64
|
||||||
|
|
||||||
# needed to force enable rng-tools for arm64
|
# needed to force enable rng-tools for arm64
|
||||||
=sys-apps/rng-tools-5-r2 **
|
=sys-apps/rng-tools-5-r2 **
|
||||||
@ -73,7 +73,7 @@ dev-util/patchelf *
|
|||||||
=sys-libs/libselinux-3.1-r2 ~arm64
|
=sys-libs/libselinux-3.1-r2 ~arm64
|
||||||
=sys-libs/libsemanage-3.1-r1 ~arm64
|
=sys-libs/libsemanage-3.1-r1 ~arm64
|
||||||
=sys-libs/libsepol-3.1 ~arm64
|
=sys-libs/libsepol-3.1 ~arm64
|
||||||
=sys-power/iasl-20161222 ~arm64
|
=sys-power/iasl-20200326 ~arm64
|
||||||
=sys-process/tini-0.18.0 ~arm64
|
=sys-process/tini-0.18.0 ~arm64
|
||||||
=virtual/krb5-0-r1 ~arm64
|
=virtual/krb5-0-r1 ~arm64
|
||||||
=virtual/libusb-1-r2 ~arm64
|
=virtual/libusb-1-r2 ~arm64
|
||||||
|
@ -40,9 +40,8 @@ dev-util/checkbashisms
|
|||||||
# All versions are ~amd64 and not enabled on arm64
|
# All versions are ~amd64 and not enabled on arm64
|
||||||
=sys-apps/nvme-cli-1.1 **
|
=sys-apps/nvme-cli-1.1 **
|
||||||
|
|
||||||
# Upgrade to GCC 9.3.0 to support latest glibc builds
|
# Upgrade to GCC 10.3.0 to support latest glibc builds
|
||||||
=sys-devel/binutils-2.37_p1 ~amd64 ~arm64
|
=sys-devel/binutils-2.37_p1 ~amd64 ~arm64
|
||||||
=sys-devel/gcc-config-1.9.1 ~amd64 ~arm64
|
|
||||||
=sys-libs/binutils-libs-2.37_p1 ~amd64 ~arm64
|
=sys-libs/binutils-libs-2.37_p1 ~amd64 ~arm64
|
||||||
|
|
||||||
=sys-fs/cryptsetup-2.4.1-r1 ~amd64 ~arm64
|
=sys-fs/cryptsetup-2.4.1-r1 ~amd64 ~arm64
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
# certificate store provided in NSS rather than the Gentoo/Debian package.
|
# certificate store provided in NSS rather than the Gentoo/Debian package.
|
||||||
>=app-misc/ca-certificates-20000000
|
>=app-misc/ca-certificates-20000000
|
||||||
|
|
||||||
# Since version 2, it tries to write liblto symlinks with absolute paths that
|
|
||||||
# don't work when building for the board root directories.
|
|
||||||
>=sys-devel/gcc-config-2
|
|
||||||
|
|
||||||
# Overwrite portage-stable mask. We are delaying the transition to
|
# Overwrite portage-stable mask. We are delaying the transition to
|
||||||
# libxcrypt, because we need to figure out how to solve the dep loop
|
# libxcrypt, because we need to figure out how to solve the dep loop
|
||||||
# that results from the migration (python -> virtual/libcrypt ->
|
# that results from the migration (python -> virtual/libcrypt ->
|
||||||
|
Loading…
Reference in New Issue
Block a user