Resolve FTBFS

Resolves: rhbz#1863678
This commit is contained in:
Tomas Korbar 2020-08-04 12:57:20 +02:00
parent 40d1e1f90d
commit 6e70f59bda
3 changed files with 49 additions and 8 deletions

View File

@ -1,7 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

41
memcached-sigignore.patch Normal file
View File

@ -0,0 +1,41 @@
diff --git a/memcached.c b/memcached.c
index d796abb4b..dc67267c4 100644
--- a/memcached.c
+++ b/memcached.c
@@ -8400,18 +8400,6 @@ static void sig_usrhandler(const int sig) {
stop_main_loop = GRACE_STOP;
}
-#ifndef HAVE_SIGIGNORE
-static int sigignore(int sig) {
- struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 };
-
- if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) {
- return -1;
- }
- return 0;
-}
-#endif
-
-
/*
* On systems that supports multiple page sizes we may reduce the
* number of TLB-misses by using the biggest available page size
@@ -10097,7 +10085,7 @@ int main (int argc, char **argv) {
/* daemonize if requested */
/* if we want to ensure our ability to dump core, don't chdir to / */
if (do_daemonize) {
- if (sigignore(SIGHUP) == -1) {
+ if (signal(SIGHUP, SIG_IGN) == SIG_ERR) {
perror("Failed to ignore SIGHUP");
}
if (daemonize(maxcore, settings.verbose) == -1) {
@@ -10247,7 +10235,7 @@ int main (int argc, char **argv) {
* ignore SIGPIPE signals; we can use errno == EPIPE if we
* need that information
*/
- if (sigignore(SIGPIPE) == -1) {
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
perror("failed to ignore SIGPIPE; sigaction");
exit(EX_OSERR);
}

View File

@ -12,7 +12,7 @@
Name: memcached
Version: 1.6.6
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 0
Summary: High Performance, Distributed Memory Object Cache
@ -24,6 +24,7 @@ Source1: memcached.sysconfig
Source2: https://releases.pagure.org/memcached-selinux/memcached-selinux-1.0.2.tar.gz
Patch1: memcached-unit.patch
Patch2: memcached-sigignore.patch
BuildRequires: gcc libevent-devel systemd
BuildRequires: perl-generators
@ -68,6 +69,9 @@ optimised for use with this version of memcached.
# and SELinux policy sources into memcached-selinux-X.X
%setup -q -b 2
%patch1 -p1 -b .unit
# sigignore is deprecated and memcached treats all warnings
# as errors so remove it
%patch2 -p1 -b .sigignore
%build
%configure \
@ -173,6 +177,9 @@ fi
%license ../%{selinuxmoduledir}/COPYING
%changelog
* Tue Aug 04 2020 Tomas Korbar <tkorbar@redhat.com> - 0:1.6.6-4
- Resolve FTBFS (#1863678)
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6.6-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild