[prev in list] [next in list] [prev in thread] [next in thread]
List: fedora-extras-commits
Subject: hguemar pushed to LogService (epel7). "Rebuilt against OmniORB 4.2 (..more)"
From: notifications () fedoraproject ! org
Date: 2017-11-30 22:15:26
Message-ID: 20171130221526.E651960FCD42 () bastion01 ! phx2 ! fedoraproject ! org
[Download RAW message or body]
From fdb24d8fce6e547e9be4d2ac4d1b10178c75e760 Mon Sep 17 00:00:00 2001
From: Haïkel Guémar <hguemar@fedoraproject.org>
Date: May 11 2014 13:39:40 +0000
Subject: Rebuilt against OmniORB 4.2
Use macroize systemd scriptlets
Drop SysV initscript
Fix FTBFS with Werror=format-security
---
diff --git a/0001-fix-FTBFS-with-Werror-format-security.patch \
b/0001-fix-FTBFS-with-Werror-format-security.patch new file mode 100644
index 0000000..d5c5c23
--- /dev/null
+++ b/0001-fix-FTBFS-with-Werror-format-security.patch
@@ -0,0 +1,42 @@
+From 04ec438941a11c162314c906af2f955166a64e8d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Haïkel Guémar?= <hguemar@fedoraproject.org>
+Date: Sun, 11 May 2014 15:05:53 +0200
+Subject: [PATCH] fix FTBFS with Werror=format-security
+
+---
+ src/utils/ORBTools.cc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/utils/ORBTools.cc b/src/utils/ORBTools.cc
+index 762dd4c..4b4134d 100644
+--- a/src/utils/ORBTools.cc
++++ b/src/utils/ORBTools.cc
+@@ -197,10 +197,10 @@ ORBTools::registerServant(const char* contextName, const char* \
contextKind, + context.length(1);
+ size_t sz1 = strlen(contextName) + 1;
+ context[0].id = new char[sz1];
+- snprintf(context[0].id, sz1, contextName);
++ strncpy(context[0].id, contextName, sz1);
+ size_t sz2 = strlen(contextKind) + 1;
+ context[0].kind = new char[sz2];
+- snprintf(context[0].kind, sz2, contextKind);
++ strncpy(context[0].kind, contextKind, sz2);
+ CosNaming::NamingContext_var testContext;
+ try {
+ testContext = rootContext->bind_new_context(context);
+@@ -217,10 +217,10 @@ ORBTools::registerServant(const char* contextName, const char* \
contextKind, + object.length(1);
+ sz1 = strlen(name) + 1;
+ object[0].id = new char[sz1];
+- snprintf(object[0].id, sz1, name);
++ strncpy(object[0].id, name, sz1);
+ sz2 = strlen(kind) + 1;
+ object[0].kind = new char[sz2];
+- snprintf(object[0].kind, sz2, kind);
++ strncpy(object[0].kind, kind, sz2);
+
+ try {
+ testContext->bind(object, objref);
+--
+1.9.0
+
diff --git a/LogCentral.init b/LogCentral.init
deleted file mode 100644
index 4664f45..0000000
--- a/LogCentral.init
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-#
-# LogCentral distributed logging server
-#
-# chkconfig: - 20 80
-# description: LogCentral distributed logging server
-
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-exec="/usr/bin/LogCentral"
-prog="LogCentral"
-user="LogCentral"
-config="/etc/sysconfig/LogCentral"
-pidfile="/var/run/LogCentral.pid"
-lockfile=/var/lock/subsys/$prog
-
-cmd="$exec"
-params="-config $config"
-
-[ -f $config ]
-
-
-start() {
- [ -f $config ] || exit 6
- echo -n $"Starting $prog: "
- # we need to rename the running process so we can easily shutdown it
- daemon --user $user "exec -a $prog $cmd $params &>/dev/null &"
- retval=$?
- LogCentral_pid=$(pidofproc LogCentral)
- [ -n "$LogCentral_pid" ] && echo $LogCentral_pid > $pidfile
- echo
- [ $retval -eq 0 ] && touch $lockfile
- return $retval
-}
-
-stop() {
- echo -n $"Stopping $prog: "
- killproc $prog
- retval=$?
- echo
- [ $retval -eq 0 ] && rm -f $lockfile && rm -f $pidfile
- return $retval
-}
-
-restart() {
- stop
- start
-}
-
-reload() {
- restart
-}
-
-force_reload() {
- restart
-}
-
-rh_status() {
- # run checks to determine if the service is running or use generic status
- status $prog
-}
-
-rh_status_q() {
- rh_status >/dev/null 2>&1
-}
-
-
-case "$1" in
- start)
- rh_status_q && exit 0
- $1
- ;;
- stop)
- rh_status_q || exit 0
- $1
- ;;
- restart)
- $1
- ;;
- reload)
- rh_status_q || exit 7
- $1
- ;;
- force-reload)
- force_reload
- ;;
- status)
- rh_status
- ;;
- condrestart|try-restart)
- rh_status_q || exit 0
- restart
- ;;
- *)
- echo $"Usage: $0 \
{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- exit 2
-esac
-exit $?
-
diff --git a/LogService.spec b/LogService.spec
index c954bae..1fd881a 100644
--- a/LogService.spec
+++ b/LogService.spec
@@ -1,21 +1,17 @@
-%if 0%{?fedora} > 14 || 0%{?rhel} > 6
-%global with_systemd 1
-%endif
-
%global upstream_name LogCentral
Name: LogService
Version: 2.8.0
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: DIET middleware logging service
Group: System Environment/Daemons
License: CeCILL
URL: http://graal.ens-lyon.fr/DIET/diet-tools/logservice
Source0: %{name}-%{version}.tar.gz
-Source1: %{upstream_name}.init
-Source2: %{upstream_name}.config
-Source3: %{upstream_name}.service
+Source1: %{upstream_name}.config
+Source2: %{upstream_name}.service
+Patch0: 0001-fix-FTBFS-with-Werror-format-security.patch
BuildRequires: cmake >= 2.6.3
BuildRequires: chrpath
@@ -23,17 +19,11 @@ BuildRequires: omniORB-devel >= 4.1.2
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: python-docutils
-%if 0%{?with_systemd}
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Requires(pre): shadow-utils
-# This is for /sbin/service
-Requires(postun): initscripts
-%endif
+BuildRequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+
%description
DIET grid middleware logging service
@@ -48,10 +38,12 @@ This package contains development files for %{name}.
%prep
%setup -q
+%patch0 -p1 -b .werror
# disable timestamp in Doxygen page footers to avoid conflict between
# multiarch -devel packages (this flag defaults to NO in Fedora doxygen)
sed -i '/^HTML_TIMESTAMP/d' Cmake/Doxyfile.in
+
%build
%cmake -DLOGSERVICE_BUILD_DOXYGEN:BOOL=ON .
make %{?_smp_mflags}
@@ -64,15 +56,10 @@ make install DESTDIR=%{buildroot}
rm -rf __tmp_doc ; mkdir __tmp_doc
mv %{buildroot}%{_docdir}/%{name}/html __tmp_doc
-%if 0%{?with_systemd}
mkdir -p %{buildroot}/lib/systemd/system/
-install -m 0644 %{SOURCE3} %{buildroot}/lib/systemd/system/
-%else
-# install service init script
-install -D -m0755 %{SOURCE1} %{buildroot}%{_initddir}/%{upstream_name}
-%endif
+install -m 0644 %{SOURCE2} %{buildroot}/lib/systemd/system/
# install service configuration file
-install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{upstream_name}
+install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{upstream_name}
chrpath --delete %{buildroot}%{_bindir}/*
chrpath --delete %{buildroot}%{_libdir}/*
@@ -85,53 +72,21 @@ useradd -r -g %{upstream_name} -d \
%{_sharedstatedir}/%{upstream_name} -s /sbin/n exit 0
-%if 0%{?with_systemd}
%post
-if [ $1 -eq 1 ]; then
- # Package install, not upgrade
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post %{upstream_name}.service
/sbin/ldconfig
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl disable %{upstream_name}.service > /dev/null 2>&1 || :
- /bin/systemctl stop %{upstream_name}.service > /dev/null 2>&1 || :
-fi
+%systemd_preun %{upstream_name}.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart %{upstream_name}.service >/dev/null 2>&1 || :
-fi
-/sbin/ldconfig
-%else
-%post
-/sbin/chkconfig --add %{upstream_name}
+%systemd_postun %{upstream_name}.service
/sbin/ldconfig
-%preun
-if [ $1 = 0 ] ; then
- /sbin/service stop >/dev/null 2>&1
- /sbin/chkconfig --del %{upstream_name}
-fi
-
-%postun
-if [ "$1" -ge "1" ] ; then
- /sbin/service %{nameserver} condrestart >/dev/null 2>&1 || :
-fi
-/sbin/ldconfig
-%endif
%files
%doc README LICENCE_eng LICENCE_fr ChangeLog
-%if 0%{?with_systemd}
/lib/systemd/system/%{upstream_name}.service
-%else
-%{_initddir}/%{upstream_name}
-%endif
%config(noreplace) %{_sysconfdir}/sysconfig/%{upstream_name}
%{_bindir}/logForwarder
%{_bindir}/LogCentral
@@ -151,6 +106,12 @@ fi
%{_mandir}/man3/*
%changelog
+* Sun May 11 2014 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8.0-6
+- Rebuilt against OmniORB 4.2
+- Use macroized systemd scriptlets
+- Drop SysV initscript
+- fix FTBFS with -Werror=format-security
+
* Sun Dec 15 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 2.8.0-5
- Fix duplicate documentation (#1001301) by using only %%doc magic
- Add BR graphviz (for images in doxygen docs)
https://src.fedoraproject.org/rpms/LogService/c/fdb24d8fce6e547e9be4d2ac4d1b10178c75e760?branch=epel7
_______________________________________________
scm-commits mailing list -- scm-commits@lists.fedoraproject.org
To unsubscribe send an email to scm-commits-leave@lists.fedoraproject.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic