diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d27b44 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +ngircd-16.tar.gz +/ngircd-17.tar.gz +/ngircd-17.1.tar.gz +/ngircd-18.tar.gz +/ngircd-20.1.tar.gz +/ngircd-20.2.tar.gz +/ngircd-20.3.tar.gz +/ngircd-21.tar.gz +/ngircd-21.1.tar.gz +/ngircd-22.tar.gz +/ngircd-22.1.tar.gz +/ngircd-23.tar.gz +/ngircd-24.tar.gz +/ngircd-25.tar.gz +/ngircd-26.tar.gz +/ngircd-26.1.tar.gz +/ngircd-27.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index a72aec0..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -epel8-playground decommissioned : https://pagure.io/epel/issue/136 diff --git a/ngircd-cipher.patch b/ngircd-cipher.patch new file mode 100644 index 0000000..5782075 --- /dev/null +++ b/ngircd-cipher.patch @@ -0,0 +1,21 @@ +diff -up ngircd-23/doc/sample-ngircd.conf.tmpl.cipher ngircd-23/doc/sample-ngircd.conf.tmpl +--- ngircd-23/doc/sample-ngircd.conf.tmpl.cipher 2015-08-20 08:29:56.000000000 -0600 ++++ ngircd-23/doc/sample-ngircd.conf.tmpl 2015-11-17 10:30:10.124060823 -0700 +@@ -246,7 +246,7 @@ + # be used. (Default: not set) + ;WebircPassword = xyz + +-;[SSL] ++[SSL] + # SSL-related configuration options. Please note that this section + # is only available when ngIRCd is compiled with support for SSL! + # So don't forget to remove the ";" above if this is the case ... +@@ -262,6 +262,8 @@ + ;CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3 + # For GnuTLS: + ;CipherList = SECURE128:-VERS-SSL3.0 ++ # Set the default to use Fedora's site wide crypto policy. ++ CipherList = @SYSTEM + + # Diffie-Hellman parameters + ;DHFile = :ETCDIR:/ssl/dhparams.pem diff --git a/ngircd-configure-c99.patch b/ngircd-configure-c99.patch new file mode 100644 index 0000000..0a62d83 --- /dev/null +++ b/ngircd-configure-c99.patch @@ -0,0 +1,42 @@ +Include for memset in WORKING_GETADDRINFO probe. +Otherwise, the probe always fails with compilers which do not support +implicit function declarations. + +Submitted upstream: + +diff --git a/configure b/configure +index 4435369c657b6fd6..242230bc334f7d4e 100755 +--- a/configure ++++ b/configure +@@ -6286,6 +6286,7 @@ else + #include + #include + #include ++#include + int + main(int argc, char **argv) + { +diff --git a/configure.ac b/configure.ac +index 609be364e0d03fef..1d98fd965a844808 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,6 +101,7 @@ AC_DEFUN([WORKING_GETADDRINFO],[ + #include + #include + #include ++#include + int + main(int argc, char **argv) + { +diff --git a/configure.ng b/configure.ng +index 59d9d9fe8fd5e469..1195b9e53af2364c 100644 +--- a/configure.ng ++++ b/configure.ng +@@ -101,6 +101,7 @@ AC_DEFUN([WORKING_GETADDRINFO],[ + #include + #include + #include ++#include + int + main(int argc, char **argv) + { diff --git a/ngircd-fedora.patch b/ngircd-fedora.patch new file mode 100644 index 0000000..5e997b2 --- /dev/null +++ b/ngircd-fedora.patch @@ -0,0 +1,27 @@ +diff --color -Nur ngircd-27.orig/doc/sample-ngircd.conf.tmpl ngircd-27/doc/sample-ngircd.conf.tmpl +--- ngircd-27.orig/doc/sample-ngircd.conf.tmpl 2024-05-11 16:18:32.156364779 -0700 ++++ ngircd-27/doc/sample-ngircd.conf.tmpl 2024-05-11 16:19:47.972042211 -0700 +@@ -49,6 +49,7 @@ + # "0.0.0.0" or (if compiled with IPv6 support) "::,0.0.0.0" + # so the server listens on all IP addresses of the system by default. + ;Listen = 127.0.0.1,192.168.0.1 ++ Listen = 127.0.0.1 + + # Text file with the "message of the day" (MOTD). This message will + # be shown to all users connecting to the server: Default: a built-in +@@ -82,6 +83,7 @@ + # of the group or the numerical ID. ATTENTION: For this to work the + # server must have been started with root privileges! + ;ServerGID = 65534 ++ ServerGID = ngircd + + # 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 +@@ -89,6 +91,7 @@ + # the configuration and MOTD files must be readable by this user, + # otherwise RESTART and REHASH won't work! + ;ServerUID = 65534 ++ ServerUID = ngircd + + [Limits] + # Define some limits and timeouts for this ngIRCd instance. Default diff --git a/ngircd-service.patch b/ngircd-service.patch new file mode 100644 index 0000000..c49250f --- /dev/null +++ b/ngircd-service.patch @@ -0,0 +1,37 @@ +diff --color -Nur ngircd-27.orig/contrib/ngircd.service ngircd-27/contrib/ngircd.service +--- ngircd-27.orig/contrib/ngircd.service 2024-04-13 02:33:33.000000000 -0700 ++++ ngircd-27/contrib/ngircd.service 2024-05-12 09:07:55.595471549 -0700 +@@ -12,10 +12,10 @@ + + [Service] + Type=notify +-User=irc +-Group=irc ++User=ngircd ++Group=ngircd + # Settings & limits: +-CapabilityBoundingSet=CAP_SYS_CHROOT CAP_NET_BIND_SERVICE ++CapabilityBoundingSet=CAP_SYS_CHROOT CAP_NET_BIND_SERVICE CAP_KILL + MemoryDenyWriteExecute=yes + NoNewPrivileges=yes + PrivateDevices=yes +@@ -27,17 +27,12 @@ + ProtectSystem=full + RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX + RestrictRealtime=yes +-RuntimeDirectory=ircd ++RuntimeDirectory=ngircd + RuntimeDirectoryMode=750 + StandardError=journal + StandardOutput=journal +-# Try to load "default files" from any Debian package variant to keep this +-# unit generic. +-EnvironmentFile=-/etc/default/ngircd +-EnvironmentFile=-/etc/default/ngircd-full +-EnvironmentFile=-/etc/default/ngircd-full-dbg + # Start ngIRCd. Note: systemd doesn't allow to use $DAEMON here! +-ExecStart=/usr/sbin/ngircd --nodaemon --syslog $PARAMS ++ExecStart=/usr/sbin/ngircd --nodaemon --syslog + ExecReload=/bin/kill -HUP $MAINPID + # Error handling: + # ngIRCd tries to "ping" the service manager every 3 seconds. diff --git a/ngircd.init b/ngircd.init new file mode 100755 index 0000000..69a5b3f --- /dev/null +++ b/ngircd.init @@ -0,0 +1,81 @@ +#!/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/ngircd.pid +### BEGIN INIT INFO +# Provides: ngircd +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Short-Description: start and stop the ngircd IRC daemon +# Description: ngircd is an IRC daemon +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +prog=ngircd +RETVAL=0 + +mkdir -p /var/run/ngircd 2>/dev/null +chown ngircd /var/run/ngircd + +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.service b/ngircd.service new file mode 100644 index 0000000..721ac58 --- /dev/null +++ b/ngircd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Next Generation IRC Daemon +Documentation=man:ngircd(8) man:ngircd.conf(5) http://ngircd.barton.de/documentation.php.en +After=network.target + +[Service] +CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_SYS_CHROOT CAP_NET_BIND_SERVICE CAP_KILL +PrivateTmp=yes +NoNewPrivileges=true +ExecStart=/usr/sbin/ngircd -n +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/ngircd.spec b/ngircd.spec new file mode 100644 index 0000000..acb4468 --- /dev/null +++ b/ngircd.spec @@ -0,0 +1,333 @@ +Name: ngircd +Version: 27 +Release: 6%{?dist} +Summary: Next Generation IRC Daemon +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +URL: http://ngircd.barton.de/ +Source0: http://ngircd.barton.de/pub/ngircd/ngircd-%{version}.tar.gz +Source1: ngircd.init +Source2: ngircd.service +# Listen only on localhost by default, set user/group +Patch0: ngircd-fedora.patch +# Use system cipher list +Patch1: ngircd-cipher.patch +# Patch for service file - no forking, no user/group for SSL key access, add doc, +# add CAP_KILL to allow reload +Patch2: ngircd-service.patch + +BuildRequires: make +BuildRequires: gcc +BuildRequires: zlib-devel, avahi-compat-howl-devel +BuildRequires: gnutls-devel +BuildRequires: pam-devel +# Needed for tests +BuildRequires: expect procps-ng telnet openssl +BuildRequires: systemd +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + + +%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 +%autosetup -p1 + +# Create a sysusers.d config file +cat >ngircd.sysusers.conf < %{buildroot}%{_tmpfilesdir}/ngircd.conf + +install -m0644 -D ngircd.sysusers.conf %{buildroot}%{_sysusersdir}/ngircd.conf + +%check +make check + + +%post +%systemd_post ngircd.service + +%preun +%systemd_preun ngircd.service + +%postun +%systemd_postun_with_restart ngircd.service + +%files +%{!?_licensedir:%global license %%doc} +%license COPYING +%config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/ngircd.conf +%config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/pam.d/ngircd +%ghost %config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/ngircd.motd +%{_unitdir}/ngircd.service +%{_sbindir}/ngircd +%{_docdir}/ngircd/ +%{_mandir}/man5/ngircd.conf* +%{_mandir}/man8/ngircd.8* +%{_tmpfilesdir}/ngircd.conf +%{_sysusersdir}/ngircd.conf + +%changelog +* Thu Jul 24 2025 Fedora Release Engineering - 27-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 27-5 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Fri Jan 17 2025 Fedora Release Engineering - 27-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 26 2024 Miroslav Suchý - 27-3 +- convert license to SPDX + +* Thu Jul 18 2024 Fedora Release Engineering - 27-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat May 11 2024 Kevin Fenzi - 27-1 +- Update to 27. Fixes rhbz#2274888 +- Clean up and drop old conditionals. + +* Thu Jan 25 2024 Fedora Release Engineering - 26.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 26.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 26.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Feb 02 2023 Florian Weimer - 26.1-8 +- Port configure script to C99 + +* Thu Jan 19 2023 Fedora Release Engineering - 26.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 26.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 26.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 26.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 26.1-3 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 26.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sun Jan 03 2021 Kevin Fenzi - 26.1-1 +- Update to 26.1. rhbz#1912027 + +* Tue Jul 28 2020 Fedora Release Engineering - 26-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun Jun 28 2020 Kevin Fenzi - 26-3 +- Fix arch conditional for tests. :( + +* Sun Jun 28 2020 Kevin Fenzi - 26-2 +- Drop gcc10 workaround (fixed upstream) +- Disable tests on i686 for now as they seem sporadically broken. ( https://github.com/ngircd/ngircd/issues/280 ) + +* Wed Jun 24 2020 Kevin Fenzi - 26-1 +- Update to 26. Fixes bug 1849314 + +* Sat May 16 2020 Kevin Fenzi - 25-7 +- rhel8 also has system cypher support, so add that before initial epel8 package. + +* Sun Mar 29 2020 Kevin Fenzi - 25-6 +- Build with -fcommon for now until upstream gcc10 fixes land. Fixes FTBFS bug #1799688 + +* Wed Jan 29 2020 Fedora Release Engineering - 25-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 14 2020 Orion Poplawski - 25-4 +- Build without libident (bz#1790478) + +* Thu Jul 25 2019 Fedora Release Engineering - 25-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 25-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 30 2019 Kevin Fenzi - 25-1 +- Update to 25. Fixes bug #1668960 + +* Fri Jul 13 2018 Fedora Release Engineering - 24-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 24-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Dec 02 2017 Kevin Fenzi - 24-5 +- Drop tcpwrappers support. Fixes bug #1518770 + +* Thu Aug 03 2017 Fedora Release Engineering - 24-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 24-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 20 2017 Kevin Fenzi - 24-1 +- Update to 24. Fixes bug #1415350 + +* Thu Feb 04 2016 Fedora Release Engineering - 23-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 17 2015 Orion Poplawski 23-1 +- Update to 23 +- Update service file from upstream +- Base config file on upstream +- Use %%license, upstream doc install + +* Wed Jun 17 2015 Fedora Release Engineering - 22.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Apr 06 2015 Kevin Fenzi 22.1-1 +- Update to 22.1 + +* Mon Jan 19 2015 Kevin Fenzi 22-2 +- Set default gnutls ciphers to "@SYSTEM". Fixes bug #1179328 + +* Mon Oct 13 2014 Kevin Fenzi 22-1 +- Update to 22. Fixes bug #1152080 + +* Fri Oct 03 2014 Kevin Fenzi 21.1-6 +- Sync ngircd.conf with sample template version. Fixes bug #1149012 + +* Sun Aug 17 2014 Fedora Release Engineering - 21.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Aug 11 2014 Kevin Fenzi 21.1-4 +- Set pam config to allow connections by default. + +* Sat Jun 07 2014 Fedora Release Engineering - 21.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Apr 29 2014 Kevin Fenzi 21.1-2 +- Enable pam support. Fixes bug #1092706 + +* Wed Mar 26 2014 Kevin Fenzi 21.1-1 +- Update to 21.1 + +* Fri Nov 01 2013 Kevin Fenzi 21-1 +- Update to 21 + +* Wed Sep 04 2013 Kevin Fenzi 20.3-2 +- Fix docs to not include Makefiles. Fixes bug #1004557 + +* Sat Aug 24 2013 Kevin Fenzi 20.3-1 +- Update to 20.3. Fixes bug #1000690 +- Fix for CVE-2013-5580 + +* Sat Aug 03 2013 Fedora Release Engineering - 20.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Mar 29 2013 Kevin Fenzi 20.2-1 +- Update to 20.2. +- Fix for CVE-2013-1747 + +* Thu Mar 7 2013 Tomáš Mráz 20.1-2 +- Rebuilt with new GnuTLS + +* Sat Feb 2 2013 Kevin Fenzi 20.1-1 +- Update to 20.1 +- Convert to systemd units for f19+ + +* Fri Jul 20 2012 Fedora Release Engineering - 18-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Aug 22 2011 Kevin Fenzi - 18-2 +- Fix config file typo. + +* Mon Aug 22 2011 Kevin Fenzi - 18-1 +- Update to 18 + +* Tue Feb 08 2011 Fedora Release Engineering - 17.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Jan 23 2011 Kevin Fenzi - 17.1-2 +- Fix up for tmpfs /var/run +- Remove fedora-usermgmt stuff +- Fix username in config file to match up. + +* Tue Dec 21 2010 Kevin Fenzi - 17.1-1 +- Update to 17.1 + +* Sun Nov 21 2010 Kevin Fenzi - 17-1 +- Update to 17 + +* Sun Jul 04 2010 Kevin Fenzi - 16-1 +- Update to 16 +- Add ssl support with gnutls +- Add zeroconf support + +* Sat Jul 25 2009 Fedora Release Engineering - 0.12.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0.12.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Oct 23 2008 Andreas Thienemann 0.12.1-1 +- Updated to 0.12.1 +- Updated configuration sample + +* Mon Aug 11 2008 Tom "spot" Callaway 0.11.0-2 +- fix license tag + +* 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 new file mode 100644 index 0000000..0e9026e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ngircd-27.tar.gz) = 54ad38b3f5a9a899106c1163f53f45c5b021f6bad3ea3b7cb9b06e619434d76416d494b046508f588b334daba5b39a451bbf28e6196ef8fffa0408e395ea3839