update code
This commit is contained in:
parent
3276ac576a
commit
c4004681ad
@ -1,29 +0,0 @@
|
|||||||
From f2193587e8e51aa42b192c17ad39467931e2d4c2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
|
||||||
Date: Wed, 19 Sep 2018 09:51:43 +0200
|
|
||||||
Subject: [PATCH] Fix segfault on arm machines
|
|
||||||
|
|
||||||
Some ARM cpus does not report the cache size or say it is -1 in sysfs.
|
|
||||||
It has been observed on xgene and thunderx machines.
|
|
||||||
|
|
||||||
Fall back to the generic cache size when that happens so we don't
|
|
||||||
segfault.
|
|
||||||
|
|
||||||
Should fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866306
|
|
||||||
---
|
|
||||||
src/havegetune.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/havegetune.c b/src/havegetune.c
|
|
||||||
index f1a99f2..de39c53 100644
|
|
||||||
--- a/src/havegetune.c
|
|
||||||
+++ b/src/havegetune.c
|
|
||||||
@@ -795,6 +795,8 @@ static int vfs_configInfoCache(
|
|
||||||
ctype = vfs_configFile(pAnchor, path, vfs_configType);
|
|
||||||
strcpy(path+plen, "size");
|
|
||||||
size = vfs_configFile(pAnchor, path, vfs_configInt);
|
|
||||||
+ if (size == -1)
|
|
||||||
+ size = ctype == 'I' ? GENERIC_ICACHE : GENERIC_DCACHE;
|
|
||||||
cfg_cacheAdd(pAnchor, SRC_VFS_INDEX, pArgs[1], level, ctype, size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +1,9 @@
|
|||||||
From 9ab2ff6874db0182714d8c09dceda9ee22e177f8 Mon Sep 17 00:00:00 2001
|
From 9ab2ff6874db0182714d8c09dceda9ee22e177f8 Mon Sep 17 00:00:00 2001
|
||||||
From: zhangtianxing <zhangtianxing3@huawei.com>
|
From: zhangtianxing <zhangtianxing3@huawei.com>
|
||||||
Date: Fri, 6 Sep 2019 19:09:13 +0800
|
Date: Fri, 6 Sep 2019 19:09:13 +0800
|
||||||
Subject: [PATCH] huawei fix the core file problem
|
Subject: [PATCH] fix the core file problem
|
||||||
|
|
||||||
|
Reason: fix the core file problem
|
||||||
|
|
||||||
Signed-off-by: zhangtianxing <zhangtianxing3@huawei.com>
|
Signed-off-by: zhangtianxing <zhangtianxing3@huawei.com>
|
||||||
---
|
---
|
||||||
@ -9,18 +11,18 @@ Signed-off-by: zhangtianxing <zhangtianxing3@huawei.com>
|
|||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/haveged.c b/src/haveged.c
|
diff --git a/src/haveged.c b/src/haveged.c
|
||||||
index d629e17..7496f56 100644
|
index e061079..daf81c9 100644
|
||||||
--- a/src/haveged.c
|
--- a/src/haveged.c
|
||||||
+++ b/src/haveged.c
|
+++ b/src/haveged.c
|
||||||
@@ -351,6 +351,7 @@ int main(int argc, char **argv)
|
@@ -470,6 +470,7 @@ int main(int argc, char **argv)
|
||||||
else run_daemon(handle);
|
else run_daemon(handle, path, argv);
|
||||||
#endif
|
#endif
|
||||||
havege_destroy(handle);
|
havege_destroy(handle);
|
||||||
+ handle = NULL;
|
+ handle = NULL;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#ifndef NO_DAEMON
|
#ifndef NO_DAEMON
|
||||||
@@ -513,6 +514,7 @@ static void error_exit( /* RETURN: nothing */
|
@@ -706,6 +707,7 @@ void error_exit( /* RETURN: nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
havege_destroy(handle);
|
havege_destroy(handle);
|
||||||
@ -29,4 +31,5 @@ index d629e17..7496f56 100644
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
--
|
--
|
||||||
1.8.3.1
|
2.19.1
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
haveged-1.9.8.tar.gz
Normal file
BIN
haveged-1.9.8.tar.gz
Normal file
Binary file not shown.
23
haveged.spec
23
haveged.spec
@ -2,15 +2,13 @@
|
|||||||
# and made some modifications. The exactly file path is ./contrib/build/fedora.spec.
|
# and made some modifications. The exactly file path is ./contrib/build/fedora.spec.
|
||||||
Summary: A Linux entropy source using the HAVEGE algorithm
|
Summary: A Linux entropy source using the HAVEGE algorithm
|
||||||
Name: haveged
|
Name: haveged
|
||||||
Version: 1.9.1
|
Version: 1.9.8
|
||||||
Release: 3
|
Release: 1
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
URL: https://github.com/jirka-h/haveged
|
||||||
URL: http://www.irisa.fr/caps/projects/hipsor/
|
Source0: https://github.com/jirka-h/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Source0: http://www.issihosts.com/haveged/%{name}-%{version}.tar.gz
|
|
||||||
Source1: haveged.service
|
Source1: haveged.service
|
||||||
|
|
||||||
Patch6000: bugfix-cpu-cache-size-detection.patch
|
|
||||||
Patch9000: fix-the-core-file-problem.patch
|
Patch9000: fix-the-core-file-problem.patch
|
||||||
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
@ -42,17 +40,13 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
Headers and shared object symbolic links for the HAVEGE algorithm
|
Headers and shared object symbolic links for the HAVEGE algorithm
|
||||||
|
|
||||||
%package help
|
%package_help
|
||||||
Summary: Help information for user.
|
|
||||||
|
|
||||||
%description help
|
|
||||||
Help information for user.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-olt=no
|
%configure
|
||||||
make
|
make
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -71,7 +65,7 @@ mkdir -p .%{_unitdir}
|
|||||||
install -p -m644 %{SOURCE1} .%{_unitdir}/haveged.service
|
install -p -m644 %{SOURCE1} .%{_unitdir}/haveged.service
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm -rf %{buildroot}%{_libdir}/libhavege.*a
|
%delete_la_and_a
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -107,6 +101,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/man3/libhavege.3*
|
%{_mandir}/man3/libhavege.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.8-1
|
||||||
|
- update to 1.9.8-1
|
||||||
|
|
||||||
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-3
|
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-3
|
||||||
- fix the core file problem
|
- fix the core file problem
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user