[bitlbee] Eliminate our own bitlbee.xinetd by patching the upstream one.
Matej Cepl
mcepl at fedoraproject.org
Sun May 11 23:00:56 UTC 2014
commit 75512a24f41f7635b6efa9847e0795f52bdc534c
Author: Matěj Cepl <mcepl at redhat.com>
Date: Wed Feb 5 01:21:25 2014 +0100
Eliminate our own bitlbee.xinetd by patching the upstream one.
bitlbee-xinetd.patch | 29 +++++++++++++++++++++++++++++
bitlbee.spec | 21 ++++++++++++++++-----
bitlbee.xinetd | 15 ---------------
3 files changed, 45 insertions(+), 20 deletions(-)
---
diff --git a/bitlbee-xinetd.patch b/bitlbee-xinetd.patch
new file mode 100644
index 0000000..a73e2ab
--- /dev/null
+++ b/bitlbee-xinetd.patch
@@ -0,0 +1,29 @@
+--- a/doc/bitlbee.xinetd
++++ b/doc/bitlbee.xinetd
+@@ -5,20 +5,23 @@
+ ## don't work, check that file first.
+ service ircd
+ {
++ disable = yes
+ socket_type = stream
+ protocol = tcp
+ wait = no
+
+ ## You most likely want to change these two
+- user = nobody
+- server = /usr/local/sbin/bitlbee -I
++ user = bitlbee
++ server = /usr/sbin/bitlbee -I
+
+ ## You might want to limit access to localhost only:
+- # bind = 127.0.0.1
++ bind = 127.0.0.1
+
+ ## Thanks a lot to friedman at splode.com for telling us about the type
+ ## argument, so now this file can be used without having to edit
+ ## /etc/services too.
+ type = UNLISTED
+ port = 6667
++
++ log_on_failure += USERID
+ }
diff --git a/bitlbee.spec b/bitlbee.spec
index 243e131..1342e21 100644
--- a/bitlbee.spec
+++ b/bitlbee.spec
@@ -13,13 +13,12 @@
Summary: IRC to other chat networks gateway
Name: bitlbee
Version: 3.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
URL: http://www.bitlbee.org/
Source0: http://get.bitlbee.org/src/%{name}-%{version}.tar.gz
-Source1: bitlbee.xinetd
-Source2: bitlbee-wrapper.h
+Source1: bitlbee-wrapper.h
# Always use 'install -p' instead of plain install to protect time stamps
Patch0: bitlbee-3.2-install.patch
# Support for old glibc (EL-5) which doesn't have ns_initparse and its friends
@@ -39,6 +38,8 @@ Patch5: bitlbee-3.2-libotr4.patch
# aka http://bugs.bitlbee.org/bitlbee/ticket/1008
# Open socket on IPv6 as well
Patch6: bitlbee-IPv6.patch
+# Local configurations of doc/bitlbee.xinetd
+Patch7: bitlbee-xinetd.patch
Requires(pre): shadow-utils
%if 0%{?rhel} == 5
@@ -100,6 +101,8 @@ echo With systemd %with_systemd
%patch3 -p1
%patch4 -p1
%patch6 -p1
+%else
+%patch7 -p1
%endif
%if 0%{?fedora} >= 20
@@ -139,14 +142,15 @@ mkdir -p $RPM_BUILD_ROOT{%{_localstatedir}/lib,%{_libdir}}/%{name}
install -p -d $RPM_BUILD_ROOT%{_unitdir}
install -p -m 644 init/%{name}{.service, at .service,.socket} $RPM_BUILD_ROOT%{_unitdir}
%else
-install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name}
+install -D -p -m 644 doc/%{name}.xinetd \
+ $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name}
%endif
install -D -p -m 644 %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
# Hack to allow parallel install of 32 bit and 64 bit -devel packages
%if 0%{?fedora}%{?rhel} < 6
mv -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config{,-%{_arch}}.h
-install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
+install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
%endif
# Convert everything to UTF-8
@@ -202,6 +206,10 @@ if [ $1 -ge 1 ]; then
/bin/systemctl try-restart %{name}.service > /dev/null 2>&1 || :
fi
%endif
+%else
+if [ $1 -eq 1 ]; then
+ /sbin/service xinetd condrestart > /dev/null 2>&1
+fi
%endif
%clean
@@ -237,6 +245,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Wed Feb 05 2014 Matěj Cepl <mcepl at redhat.com> - 3.2.1-3
+- Eliminate our own bitlbee.xinetd by patching the upstream one.
+
* Wed Dec 18 2013 Robert Scheck <robert at fedoraproject.org> 3.2.1-2
- Some spec file cleanups and ensure that RHEL 5 builds again
More information about the scm-commits
mailing list