From 22497671b80f297ff33f47bf2f07dd559aa6f2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 20 Jan 2014 22:29:54 +0200 Subject: [PATCH] Don't order service after syslog.target (#1055209). - Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS. - Fix build with -Werror=format-security. --- ...ix-build-with-Werror-format-security.patch | 25 +++++++++++++++++ ...-t-order-service-after-syslog.target.patch | 28 +++++++++++++++++++ numad.spec | 13 +++++++-- 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-build-with-Werror-format-security.patch create mode 100644 0002-Don-t-order-service-after-syslog.target.patch diff --git a/0001-Fix-build-with-Werror-format-security.patch b/0001-Fix-build-with-Werror-format-security.patch new file mode 100644 index 0000000..76106b1 --- /dev/null +++ b/0001-Fix-build-with-Werror-format-security.patch @@ -0,0 +1,25 @@ +From 6ab732334bc765d4b5883ddde0e9891b4813d136 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Mon, 20 Jan 2014 22:25:58 +0200 +Subject: [PATCH 1/2] Fix build with -Werror=format-security + +--- + numad.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/numad.c b/numad.c +index 2d8ae95..3e2816b 100644 +--- a/numad.c ++++ b/numad.c +@@ -141,7 +141,7 @@ void numad_log(int level, const char *fmt, ...) { + } + char buf[BUF_SIZE]; + time_t ts = time(NULL); +- sprintf(buf, ctime(&ts)); ++ sprintf(buf, "%s", ctime(&ts)); + char *p = &buf[strlen(buf) - 1]; + *p++ = ':'; + *p++ = ' '; +-- +1.8.3.1 + diff --git a/0002-Don-t-order-service-after-syslog.target.patch b/0002-Don-t-order-service-after-syslog.target.patch new file mode 100644 index 0000000..8fac29d --- /dev/null +++ b/0002-Don-t-order-service-after-syslog.target.patch @@ -0,0 +1,28 @@ +From 49cb22039f299350bb0d19b372e1662a38d29018 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sun, 19 Jan 2014 17:29:50 +0200 +Subject: [PATCH 2/2] Don't order service after syslog.target + +http://www.freedesktop.org/wiki/Software/systemd/syslog/ +https://fedorahosted.org/fpc/ticket/177#comment:2 +http://lists.opensuse.org/archive/opensuse-packaging/2013-05/msg00102.html + +https://bugzilla.redhat.com/show_bug.cgi?id=1055209 +--- + numad.service | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/numad.service b/numad.service +index 478559a..73a4f34 100644 +--- a/numad.service ++++ b/numad.service +@@ -1,6 +1,5 @@ + [Unit] + Description=numad - The NUMA daemon that manages application locality. +-After=syslog.target + + [Service] + Type=forking +-- +1.8.3.1 + diff --git a/numad.spec b/numad.spec index f60eee0..964c064 100644 --- a/numad.spec +++ b/numad.spec @@ -2,7 +2,7 @@ Name: numad Version: 0.5 -Release: 12.20130814git%{?dist} +Release: 13.20130814git%{?dist} Summary: NUMA user daemon License: LGPLv2 @@ -14,6 +14,8 @@ URL: http://git.fedorahosted.org/git/?p=numad.git # tar --exclude-vcs -cJf numad-0.5git.tar.xz numad-0.5git/ Source0: %{name}-%{version}git.tar.xz Patch0: numad-0.5git-pthread.patch +Patch1: 0001-Fix-build-with-Werror-format-security.patch +Patch2: 0002-Don-t-order-service-after-syslog.target.patch Requires: systemd-units, initscripts Requires(post): systemd-units, initscripts @@ -30,9 +32,11 @@ and memory to minimize memory latency and thus provide optimum performance. %prep %setup -q -n %{name}-%{version}git %patch0 -p0 +%patch1 -p1 +%patch2 -p1 %build -make CFLAGS="-std=gnu99 -g" LDFLAGS="-lpthread -lrt" +make CFLAGS="$RPM_OPT_FLAGS -std=gnu99" LDFLAGS="$RPM_LD_FLAGS -lpthread -lrt" %install mkdir -p %{buildroot}%{_bindir} @@ -61,6 +65,11 @@ make install prefix=%{buildroot}/usr %systemd_postun numad.service %changelog +* Mon Jan 20 2014 Ville Skyttä - 0.5-13.20130814git +- Don't order service after syslog.target (#1055209). +- Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS. +- Fix build with -Werror=format-security. + * Wed Aug 14 2013 Jan Synáček - 0.5-12.20130814git - Update to 20130814