From c5d512498635d8dd764800721e257214b66c2fdd Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 20 Nov 2007 18:48:09 +0000 Subject: [PATCH 1/4] Initialize branch F-7 for ngircd --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..c48525c --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-7 From 3b7dfb58f168cdca3f64271616ef4b89df1ee8f9 Mon Sep 17 00:00:00 2001 From: Andreas Thienemann Date: Mon, 11 Feb 2008 17:05:29 +0000 Subject: [PATCH 2/4] - Updated to 0.11.0 --- .cvsignore | 1 + ngircd.conf | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ngircd.init | 71 ++++++++++++++++++++ ngircd.spec | 111 +++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 370 insertions(+) create mode 100644 ngircd.conf create mode 100755 ngircd.init create mode 100644 ngircd.spec diff --git a/.cvsignore b/.cvsignore index e69de29..ebc53e3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ngircd-0.11.0.tar.gz diff --git a/ngircd.conf b/ngircd.conf new file mode 100644 index 0000000..bca3325 --- /dev/null +++ b/ngircd.conf @@ -0,0 +1,186 @@ +# $Id$ + +# +# This is a sample configuration file for the ngIRCd, which must be adepted +# to the local preferences and needs. +# +# Comments are started with "#" or ";". +# +# Use "ngircd --configtest" (see manual page ngircd(8)) to validate that the +# server interprets the configuration file as expected! +# + +[Global] + # The [Global] section of this file is used to define the main + # configuration of the server, like the server name and the ports + # on which the server should be listening. + + # Server name in the IRC network, must contain at least one dot + # (".") and be unique in the IRC network. Required! + Name = irc.the.net + + # Info text of the server. This will be shown by WHOIS and + # LINKS requests for example. + Info = Server Info Text + + # Global password for all users needed to connect to the server + ;Password = abc + + # Information about the server and the administrator, used by the + # ADMIN command. Not required by server but by RFC! + ;AdminInfo1 = Description + ;AdminInfo2 = Location + ;AdminEMail = admin@irc.server + + # Ports on which the server should listen. There may be more than + # one port, separated with ",". (Default: 6667) + ;Ports = 6667, 6668, 6669 + + # IP address on which the server should listen. (Default: empty, + # so the server listens on all IP addresses of the system) + ;Listen = 1.2.3.4 + + # Text file with the "message of the day" (MOTD). This message will + # be shown to all users connecting to the server: + ;MotdFile = /etc/ngircd.motd + + # A simple Phrase (<256 chars) if you don't want to use a motd file. + # If it is set no MotdFile will be read at all. + ;MotdPhrase = "Hello world!" + + # User ID under which the server should run; you can use the name + # of the user or the numerical ID. ATTENTION: For this to work the + # server must have been started with root privileges! In addition, + # the configuration and MOTD files must be readable by this user, + # otherwise RESTART and REHASH won't work! + ServerUID = ngirc + + # Group ID under which the ngircd should run; you can use the name + # of the group or the numerical ID. ATTENTION: For this to work the + # server must have been started with root privileges! + ServerGID = ngirc + + # A directory to chroot in when everything is initialized. It + # doesn't need to be populated if ngIRCd is compiled as a static + # binary. By default ngIRCd won't use the chroot() feature. + # ATTENTION: For this to work the server must have been started + # with root privileges! + ;ChrootDir = /var/empty + + # This tells ngircd to write its current process id to a file. + # Note that the pidfile is written AFTER chroot and switching uid, + # i. e. the Directory the pidfile resides in must be writeable by + # the ngircd user and exist in the chroot directory. + PidFile = /var/run/ngircd/ngircd.pid + + # After seconds of inactivity the server will send a + # PING to the peer to test whether it is alive or not. + ;PingTimeout = 120 + + # If a client fails to answer a PING with a PONG within + # seconds, it will be disconnected by the server. + ;PongTimeout = 20 + + # The server tries every seconds to establish a link + # to not yet (or no longer) connected servers. + ;ConnectRetry = 60 + + # Should IRC Operators be allowed to use the MODE command even if + # they are not(!) channel-operators? + ;OperCanUseMode = no + + # Mask IRC Operator mode requests as if they were coming from the + # server? (This is a compatibility hack for ircd-irc2 servers) + ;OperServerMode = no + + # Allow Pre-Defined Channels only (see Section [Channels]) + ;PredefChannelsOnly = no + + # Maximum number of simultaneous connection the server is allowed + # to accept (<=0: unlimited): + ;MaxConnections = -1 + + # Maximum number of simultaneous connections from a single IP address + # the server will accept (<=0: unlimited): + ;MaxConnectionsIP = 5 + + # Maximum number of channels a user can be member of (<=0: no limit): + ;MaxJoins = 10 + +[Operator] + # [Operator] sections are used to define IRC Operators. There may be + # more than one [Operator] block, one for each local operator. + + # ID of the operator (may be different of the nick name) + ;Name = TheOper + + # Password of the IRC operator + ;Password = ThePwd + + # Optional Mask from which /OPER will be accepted + ;Mask = *!ident@somewhere.example.com + +[Operator] + # More [Operator] sections, if you like ... + +[Server] + # Other servers are configured in [Server] sections. If you + # configure a port for the connection, then this ngircd tries to + # connect to to the other server on the given port; if not it waits + # for the other server to connect. + # There may be more than one server block, one for each server. + # + # Server Groups: + # The ngIRCd allows "server groups": You can assign an "ID" to every + # server with which you want this ngIRCd to link. If a server of a + # group won't answer, the ngIRCd tries to connect to the next server + # in the given group. But the ngircd never tries to connect to two + # servers with the same group ID. + + # IRC name of the remote server, must match the "Name" variable in + # the [Global] section of the other server (when using ngIRCd). + ;Name = irc2.the.net + + # Internet host name or IP address of the peer (only required when + # this server should establish the connection). + ;Host = connect-to-host.the.net + + # Port of the server to which the ngIRCd should connect. If you + # assign no port the ngIRCd waits for incoming connections. + ;Port = 6667 + + # Own password for the connection. This password has to be configured + # as "PeerPassword" on the other server. + ;MyPassword = MySecret + + # Foreign password for this connection. This password has to be + # configured as "MyPassword" on the other server. + ;PeerPassword = PeerSecret + + # Group of this server (optional) + ;Group = 123 + +[Server] + # More [Server] sections, if you like ... + +[Channel] + # Pre-defined channels can be configured in [Channel] sections. + # Such channels are created by the server when starting up and even + # persist when there are no more members left. + # Persistent channels are marked with the mode 'P', which can be set + # and unset by IRC operators like other modes on the fly. + # There may be more than one [Channel] block, one for each channel. + + # Name of the channel + ;Name = #TheName + + # Topic for this channel + ;Topic = a great topic + + # Initial channel modes + ;Modes = tn + +[Channel] + # More [Channel] sections, if you like ... + +# -eof- diff --git a/ngircd.init b/ngircd.init new file mode 100755 index 0000000..3c810f0 --- /dev/null +++ b/ngircd.init @@ -0,0 +1,71 @@ +#!/bin/bash +# +# ngircd This shell script takes care of starting and stopping +# the ngircd IRC daemon. +# +# chkconfig: - 80 30 +# description: ngircd is an IRC daemon +# processname: ngircd +# pidfile: /var/run/ngircd.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +prog=ngircd +RETVAL=0 + +start() { + echo -n $"Starting $prog: " + daemon ngircd + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch /var/lock/subsys/ngircd + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc ngircd + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/ngircd +} + +reload() { + echo -n $"Reloading $prog: " + killproc ngircd -HUP + RETVAL=$? + echo +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status ngircd + RETVAL=$? + ;; + restart) + stop + start + ;; + reload) + reload + ;; + condrestart) + if [ -f /var/run/ngircd/ngircd.pid ] ; then + stop + start + fi + ;; + *) + echo $"Usage: $prog {start|stop|restart|reload|condrestart|status|help}" + exit 1 +esac + +exit $RETVAL diff --git a/ngircd.spec b/ngircd.spec new file mode 100644 index 0000000..799cabd --- /dev/null +++ b/ngircd.spec @@ -0,0 +1,111 @@ +%define uid 36 +%define username ngircd +%define homedir /tmp +%define gecos "Next Generation IRC Daemon" + +Name: ngircd +Version: 0.11.0 +Release: 1%{?dist} +Summary: Next Generation IRC Daemon +Group: System Environment/Daemons +License: GPL +URL: http://ngircd.barton.de/ +Source0: ftp://ftp.berlios.de/pub/ngircd/ngircd-%{version}.tar.gz +Source1: ngircd.init +Source2: ngircd.conf +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel, avahi-compat-howl-devel, tcp_wrappers-devel +BuildRequires: libident-devel +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service +Requires(pre): fedora-usermgmt +Requires(postun): fedora-usermgmt + + +%description +ngIRCd is a free open source daemon for Internet Relay Chat (IRC), +developed under the GNU General Public License (GPL). It's written from +scratch and is not based upon the original IRCd like many others. + +%prep +%setup -q + +%build +%configure \ + --with-syslog \ + --with-zlib \ + --with-epoll \ + --with-zeroconf \ + --with-tcp-wrappers \ + --with-ident + +make %{?_smp_mflags} + + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} +install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/ngircd +install -D -m 660 %{SOURCE2} %{buildroot}%{_sysconfdir}/ngircd.conf +touch %{buildroot}%{_sysconfdir}/ngircd.motd +rm -rf %{buildroot}%{_docdir}/ngircd +mkdir -p %{buildroot}%{_localstatedir}/run/ngircd + +%clean +rm -rf %{buildroot} + +%pre +/usr/sbin/fedora-groupadd %uid -r %username &>/dev/null || : +/usr/sbin/fedora-useradd %uid -r -s /sbin/nologin -d %homedir -M \ + -c '%gecos' -g %username %username &>/dev/null || : + +%post +# This adds the proper /etc/rc*.d links for the script +/sbin/chkconfig --add ngircd + +%preun +if [ $1 = 0 ]; then + /sbin/service ngircd stop >/dev/null 2>&1 || : + /sbin/chkconfig --del ngircd +fi + +%postun +if [ "$1" -ge "1" ]; then + /sbin/service ngircd condrestart >/dev/null 2>&1 || : +fi +test "$1" != 0 || /usr/sbin/fedora-userdel %username &>/dev/null || : +test "$1" != 0 || /usr/sbin/fedora-groupdel %username &>/dev/null || : + + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING ChangeLog NEWS README doc/* +%config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/ngircd.conf +%ghost %config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/ngircd.motd +%{_initrddir}/ngircd +%{_sbindir}/ngircd +%{_mandir}/man5/ngircd.conf* +%{_mandir}/man8/ngircd.8* +%dir %attr(775, root, ngircd) %{_localstatedir}/run/ngircd/ + + +%changelog +* Mon Feb 11 2008 Andreas Thienemann 0.11.0-1 +- Updated to 0.11.0 + +* Tue Nov 20 2007 Andreas Thienemann 0.10.3-1 +- Rebased to 0.10.3 +- Incorporated patches from fw@strlen.de + +* Thu Apr 26 2007 Andreas Thienemann 0.10.1-3 +- Removed libident requirement +- Added patch from fw fixing server connections + +* Mon Apr 02 2007 Andreas Thienemann 0.10.1-2 +- Added ngirc user + +* Sat Mar 31 2007 Andreas Thienemann 0.10.1-1 +- Initial package + diff --git a/sources b/sources index e69de29..a0e1d89 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c322656b173ecec3d626355c0c3e875f ngircd-0.11.0.tar.gz From d6ebd4a89754658a159814e98be5bbec4496017c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:23:31 +0000 Subject: [PATCH 3/4] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f57c7d1..5879934 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := ngircd SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 43c9523d272251bc38a54ce78c4a776333f166c7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 04:25:58 +0000 Subject: [PATCH 4/4] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 5879934..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: ngircd -# $Id$ -NAME := ngircd -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index c48525c..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-7