From a0e2896d73ce39620ee5dd84eb5fd563d1278351 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 25 Jul 2005 07:23:30 +0000 Subject: [PATCH] upgrading package: ngircd 0.8.3 -> 0.9.0 --- ngircd/ngircd.patch | 79 --------------------------------------------- ngircd/ngircd.spec | 7 ++-- 2 files changed, 3 insertions(+), 83 deletions(-) delete mode 100644 ngircd/ngircd.patch diff --git a/ngircd/ngircd.patch b/ngircd/ngircd.patch deleted file mode 100644 index d1a96768ab..0000000000 --- a/ngircd/ngircd.patch +++ /dev/null @@ -1,79 +0,0 @@ -Index: src/ngircd/ngircd.c ---- src/ngircd/ngircd.c.orig 2005-01-26 23:09:33 +0100 -+++ src/ngircd/ngircd.c 2005-03-16 13:15:05 +0100 -@@ -77,6 +77,9 @@ - #ifdef SNIFFER - NGIRCd_Sniffer = FALSE; - #endif -+#ifdef PID_FILE -+ strlcpy( NGIRCd_PidFile, "/dev/null", sizeof( NGIRCd_PidFile )); -+#endif - strlcpy( NGIRCd_ConfFile, SYSCONFDIR, sizeof( NGIRCd_ConfFile )); - strlcat( NGIRCd_ConfFile, CONFIG_FILE, sizeof( NGIRCd_ConfFile )); - -@@ -139,6 +142,19 @@ - Show_Version( ); - exit( 1 ); - } -+#ifdef PID_FILE -+ if( strcmp( argv[i], "--pidfile" ) == 0 ) -+ { -+ if( i + 1 < argc ) -+ { -+ /* Ok, there's an parameter left */ -+ strlcpy( NGIRCd_PidFile, argv[i + 1], sizeof( NGIRCd_PidFile )); -+ -+ /* next parameter */ -+ i++; ok = TRUE; -+ } -+ } -+#endif - } - else if(( argv[i][0] == '-' ) && ( argv[i][1] != '-' )) - { -@@ -282,6 +298,21 @@ - - /* Child-Prozess initialisieren */ - (VOID)setsid( ); -+#ifdef PID_FILE -+ { -+ mode_t old_umask; -+ pid_t pid; -+ FILE *fp; -+ -+ old_umask = umask((mode_t) 0022); -+ pid = getpid(); -+ if ((fp = fopen(NGIRCd_PidFile, "w")) == NULL) -+ syslog(LOG_ERR, "cannot write PID file '%s'", NGIRCd_PidFile); -+ fprintf(fp, "%ld\n", (long)pid); -+ fclose(fp); -+ umask(old_umask); -+ } -+#endif - chdir( "/" ); - } - -@@ -565,6 +596,9 @@ - puts( " -s, --sniffer enable network sniffer and display all IRC traffic" ); - #endif - puts( " -t, --configtest read, validate and display configuration; then exit" ); -+#ifdef PID_FILE -+ puts( " --pidfile write PID into file" ); -+#endif - puts( " --version output version information and exit" ); - puts( " --help display this help and exit" ); - } /* Show_Help */ -Index: src/ngircd/ngircd.h ---- src/ngircd/ngircd.h.orig 2002-12-26 17:48:14 +0100 -+++ src/ngircd/ngircd.h 2005-03-16 13:15:05 +0100 -@@ -45,6 +45,10 @@ - - GLOBAL CHAR NGIRCd_ConfFile[FNAME_LEN]; /* Konfigurationsdatei */ - -+#ifdef PID_FILE -+GLOBAL CHAR NGIRCd_PidFile[FNAME_LEN]; /* PID file */ -+#endif -+ - GLOBAL CHAR NGIRCd_ProtoID[COMMAND_LEN];/* Protokoll- und Server-Identifikation */ - - diff --git a/ngircd/ngircd.spec b/ngircd/ngircd.spec index 6df5b6104b..76a25ec0e2 100644 --- a/ngircd/ngircd.spec +++ b/ngircd/ngircd.spec @@ -32,8 +32,8 @@ Distribution: OpenPKG Class: EVAL Group: Network License: GNU -Version: 0.8.3 -Release: 20050411 +Version: 0.9.0 +Release: 20050725 # package options %option with_fsl yes @@ -42,7 +42,6 @@ Release: 20050411 Source0: ftp://ftp.berlios.de/pub/ngircd/ngircd-%{version}.tar.gz Source1: rc.ngircd Source2: fsl.ngircd -Patch0: ngircd.patch # build information Prefix: %{l_prefix} @@ -70,7 +69,6 @@ AutoReqProv: no %prep %setup -q - %patch -p0 %{l_shtool} subst \ -e 's;^\(docdir = $(datadir)/\)doc/\($(PACKAGE)\);\1\2;' \ doc/Makefile.in @@ -108,6 +106,7 @@ AutoReqProv: no -e 's|;\(ServerUID = \).*$|\1 %{l_ruid}|' \ -e 's|;\(ServerGID = \).*$|\1 %{l_rgid}|' \ -e 's|;\(MotdFile = \).*$|\1 %{l_prefix}/etc/ngircd/ngircd.motd|' \ + -e 's|;\(PidFile = \).*$|\1 %{l_prefix}/var/ngircd/run/ngircd.pid|' \ ngircd.conf \ $RPM_BUILD_ROOT%{l_prefix}/etc/ngircd/