From 5efb5bf2b756bca5881e2c0c312d5db555395cb5 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 10:43:30 +0000 Subject: [PATCH] auto-import changelog data from ppp-2.4.2-2.src.rpm Fri May 07 2004 Nils Philippsen 2.4.2-2 - don't write to /etc (#118837) Wed Mar 10 2004 Nalin Dahyabhai 2.4.2-1 - update to 2.4.2 --- .cvsignore | 2 +- ppp-2.4.2-bpf.patch | 23 ++++++++++ ppp-2.4.2-dontwriteetc.patch | 56 +++++++++++++++++++++++ ppp-2.4.2-lib64.patch | 51 +++++++++++++++++++++ ppp-2.4.2-libutil.patch | 86 ++++++++++++++++++++++++++++++++++ ppp-2.4.2-make.patch | 89 ++++++++++++++++++++++++++++++++++++ ppp.logrotate | 9 ++++ ppp.spec | 59 ++++++++++++++++-------- sources | 2 +- 9 files changed, 356 insertions(+), 21 deletions(-) create mode 100644 ppp-2.4.2-bpf.patch create mode 100644 ppp-2.4.2-dontwriteetc.patch create mode 100644 ppp-2.4.2-lib64.patch create mode 100644 ppp-2.4.2-libutil.patch create mode 100644 ppp-2.4.2-make.patch create mode 100644 ppp.logrotate diff --git a/.cvsignore b/.cvsignore index bddfc79..6ba2d18 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ppp-2.4.1.tar.gz +ppp-2.4.2.tar.gz diff --git a/ppp-2.4.2-bpf.patch b/ppp-2.4.2-bpf.patch new file mode 100644 index 0000000..859e72e --- /dev/null +++ b/ppp-2.4.2-bpf.patch @@ -0,0 +1,23 @@ +I think this is the right fix, but ICBW. +--- ppp-2.4.2/pppd/demand.c 2004-03-10 19:12:16.000000000 -0500 ++++ ppp-2.4.2/pppd/demand.c 2004-03-10 19:12:12.000000000 -0500 +@@ -50,7 +50,7 @@ + #include + #ifdef PPP_FILTER + #include +-#include ++#include + #include + #endif + +--- ppp-2.4.2/pppd/sys-linux.c 2004-03-10 19:11:56.000000000 -0500 ++++ ppp-2.4.2/pppd/sys-linux.c 2004-03-10 19:12:05.000000000 -0500 +@@ -141,7 +141,7 @@ + #endif /* IPX_CHANGE */ + + #ifdef PPP_FILTER +-#include ++#include + #include + #endif /* PPP_FILTER */ + diff --git a/ppp-2.4.2-dontwriteetc.patch b/ppp-2.4.2-dontwriteetc.patch new file mode 100644 index 0000000..5786ab1 --- /dev/null +++ b/ppp-2.4.2-dontwriteetc.patch @@ -0,0 +1,56 @@ +--- ppp-2.4.2/chat/chat.8.dontwriteetc 2002-09-07 12:37:49.000000000 +0200 ++++ ppp-2.4.2/chat/chat.8 2004-05-07 10:45:30.000000000 +0200 +@@ -200,7 +200,7 @@ + at the terminal via standard error. If \fBchat\fR is being run by + pppd, and pppd is running as a daemon (detached from its controlling + terminal), standard error will normally be redirected to the file +-/etc/ppp/connect-errors. ++/var/log/ppp/connect-errors. + .LP + \fBSAY\fR strings must be enclosed in single or double quotes. If + carriage return and line feed are needed in the string to be output, +--- ppp-2.4.2/linux/Makefile.top.dontwriteetc 2002-09-07 12:37:49.000000000 +0200 ++++ ppp-2.4.2/linux/Makefile.top 2004-05-07 10:44:40.000000000 +0200 +@@ -5,6 +5,8 @@ + INCDIR = $(DESTDIR)/usr/include + MANDIR = $(DESTDIR)/usr/man + ETCDIR = $(DESTDIR)/etc/ppp ++RUNDIR = $(DESTDIR)/var/run/ppp ++LOGDIR = $(DESTDIR)/var/log/ppp + + # uid 0 = root + INSTALL= install +@@ -16,7 +18,7 @@ + cd pppstats; $(MAKE) $(MFLAGS) all + cd pppdump; $(MAKE) $(MFLAGS) all + +-install: $(BINDIR) $(MANDIR)/man8 install-progs install-etcppp install-devel ++install: $(BINDIR) $(RUNDIR) $(LOGDIR) $(MANDIR)/man8 install-progs install-etcppp install-devel + + install-progs: + cd chat; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) $(MFLAGS) install +@@ -44,6 +46,10 @@ + $(INSTALL) -d -m 755 $@ + $(ETCDIR): + $(INSTALL) -d -m 755 $@ ++$(RUNDIR): ++ $(INSTALL) -d -m 755 $@ ++$(LOGDIR): ++ $(INSTALL) -d -m 755 $@ + + clean: + rm -f `find . -name '*.[oas]' -print` +--- ppp-2.4.2/pppd/pathnames.h.dontwriteetc 2004-05-07 10:29:29.000000000 +0200 ++++ ppp-2.4.2/pppd/pathnames.h 2004-05-07 11:40:08.000000000 +0200 +@@ -27,9 +27,9 @@ + #define _PATH_AUTHUP _ROOT_PATH "/etc/ppp/auth-up" + #define _PATH_AUTHDOWN _ROOT_PATH "/etc/ppp/auth-down" + #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." +-#define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" ++#define _PATH_CONNERRS _ROOT_PATH "/var/log/ppp/connect-errors" + #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" +-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf" ++#define _PATH_RESOLV _ROOT_PATH "/var/run/ppp/resolv.conf" + + #define _PATH_USEROPT ".ppprc" + #define _PATH_PSEUDONYM ".ppp_pseudonym" diff --git a/ppp-2.4.2-lib64.patch b/ppp-2.4.2-lib64.patch new file mode 100644 index 0000000..005ca77 --- /dev/null +++ b/ppp-2.4.2-lib64.patch @@ -0,0 +1,51 @@ +If CC supports the "-print-multi-os-directory" option, use it to determine +where to check for the existence libcrypt. If it doesn't, then we get /usr/lib. + +--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500 ++++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 17:44:04.000000000 -0500 +@@ -7,6 +7,7 @@ + BINDIR = $(DESTDIR)/usr/sbin + MANDIR = $(DESTDIR)/usr/man + INCDIR = $(DESTDIR)/usr/include ++LIBDIR = $(DESTDIR)/usr/lib/$(shell gcc -print-multi-os-directory 2> /dev/null) + + TARGETS = pppd + +@@ -31,7 +32,7 @@ + + CC = gcc + # +-COPTS = -Wall $(RPM_OPT_FLAGS) ++COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\" + LIBS = -lutil + + # Uncomment the next 2 lines to include support for Microsoft's +@@ -119,7 +120,7 @@ + ifneq ($(wildcard /usr/include/crypt.h),) + CFLAGS += -DHAVE_CRYPT_H=1 + endif +-ifneq ($(wildcard /usr/lib/libcrypt.*),) ++ifneq ($(wildcard $(LIBDIR)/libcrypt.*),) + LIBS += -lcrypt + endif + +--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:40:27.000000000 -0500 ++++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500 +@@ -21,7 +21,7 @@ + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ + + VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h) +-LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION) ++LIBDIR = $(DESTDIR)/usr/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION) + + install: $(PLUGINS) + $(INSTALL) -d $(LIBDIR) +--- ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:15.000000000 -0500 ++++ ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:10.000000000 -0500 +@@ -55,5 +55,5 @@ + #endif /* __STDC__ */ + + #ifdef PLUGIN +-#define _PATH_PLUGIN "/usr/lib/pppd/" VERSION ++#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION + #endif /* PLUGIN */ diff --git a/ppp-2.4.2-libutil.patch b/ppp-2.4.2-libutil.patch new file mode 100644 index 0000000..7789365 --- /dev/null +++ b/ppp-2.4.2-libutil.patch @@ -0,0 +1,86 @@ +glibc provides logwtmp in libutil, so we'll use that instead. + +--- ppp-2.4.2/pppd/sys-linux.c 2004-03-10 18:26:53.000000000 -0500 ++++ ppp-2.4.2/pppd/sys-linux.c 2004-03-10 18:26:40.000000000 -0500 +@@ -2151,81 +2151,6 @@ + + /******************************************************************** + * +- * Update the wtmp file with the appropriate user name and tty device. +- */ +- +-void logwtmp (const char *line, const char *name, const char *host) +-{ +- struct utmp ut, *utp; +- pid_t mypid = getpid(); +-#if __GLIBC__ < 2 +- int wtmp; +-#endif +- +-/* +- * Update the signon database for users. +- * Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996 +- */ +- utmpname(_PATH_UTMP); +- setutent(); +- while ((utp = getutent()) && (utp->ut_pid != mypid)) +- /* nothing */; +- +- if (utp) +- memcpy(&ut, utp, sizeof(ut)); +- else +- /* some gettys/telnetds don't initialize utmp... */ +- memset(&ut, 0, sizeof(ut)); +- +- if (ut.ut_id[0] == 0) +- strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); +- +- strncpy(ut.ut_user, name, sizeof(ut.ut_user)); +- strncpy(ut.ut_line, line, sizeof(ut.ut_line)); +- +- time(&ut.ut_time); +- +- ut.ut_type = USER_PROCESS; +- ut.ut_pid = mypid; +- +- /* Insert the host name if one is supplied */ +- if (*host) +- strncpy (ut.ut_host, host, sizeof(ut.ut_host)); +- +- /* Insert the IP address of the remote system if IP is enabled */ +- if (ipcp_protent.enabled_flag && ipcp_hisoptions[0].neg_addr) +- memcpy(&ut.ut_addr, (char *) &ipcp_hisoptions[0].hisaddr, +- sizeof(ut.ut_addr)); +- +- /* CL: Makes sure that the logout works */ +- if (*host == 0 && *name==0) +- ut.ut_host[0]=0; +- +- pututline(&ut); +- endutent(); +-/* +- * Update the wtmp file. +- */ +-#if __GLIBC__ >= 2 +- updwtmp(_PATH_WTMP, &ut); +-#else +- wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY); +- if (wtmp >= 0) { +- flock(wtmp, LOCK_EX); +- +- if (write (wtmp, (char *)&ut, sizeof(ut)) != sizeof(ut)) +- warn("error writing %s: %m", _PATH_WTMP); +- +- flock(wtmp, LOCK_UN); +- +- close (wtmp); +- } +-#endif +-} +- +- +-/******************************************************************** +- * + * sifvjcomp - config tcp header compression + */ + diff --git a/ppp-2.4.2-make.patch b/ppp-2.4.2-make.patch new file mode 100644 index 0000000..88a5b32 --- /dev/null +++ b/ppp-2.4.2-make.patch @@ -0,0 +1,89 @@ +Obey RPM_OPT_FLAGS, link with pppd with libutil to get logwtmp(), and enable +PAM support. +--- ppp-2.4.2/chat/Makefile.linux 2004-01-12 22:57:55.000000000 -0500 ++++ ppp-2.4.2/chat/Makefile.linux 2004-03-10 18:32:39.000000000 -0500 +@@ -6,7 +6,7 @@ + CDEF4= -DFNDELAY=O_NDELAY # Old name value + CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4) + +-COPTS= -O2 -g -pipe $(CDEFS) ++COPTS= $(RPM_OPT_FLAGS) $(CDEFS) + CFLAGS= $(COPTS) $(CDEFS) + + INSTALL= install +--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500 ++++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 18:32:46.000000000 -0500 +@@ -29,10 +29,10 @@ + include .depend + endif + +-# CC = gcc ++CC = gcc + # +-COPTS = -O2 -pipe -Wall -g +-LIBS = ++COPTS = -Wall $(RPM_OPT_FLAGS) ++LIBS = -lutil + + # Uncomment the next 2 lines to include support for Microsoft's + # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. +@@ -60,7 +60,7 @@ + USE_TDB=y + + HAS_SHADOW=y +-#USE_PAM=y ++USE_PAM=y +-#HAVE_INET6=y ++#HAVE_INET6=y + + # Enable plugins +--- ppp-2.4.2/pppdump/Makefile.linux 1999-07-26 07:09:29.000000000 -0400 ++++ ppp-2.4.2/pppdump/Makefile.linux 2004-03-10 18:32:47.000000000 -0500 +@@ -1,4 +1,4 @@ +-CFLAGS= -O -I../include/net ++CFLAGS= $(RPM_OPT_FLAGS) -I../include/net + OBJS = pppdump.o bsd-comp.o deflate.o zlib.o + + INSTALL= install +--- ppp-2.4.2/pppstats/Makefile.linux 2002-11-09 06:24:43.000000000 -0500 ++++ ppp-2.4.2/pppstats/Makefile.linux 2004-03-10 18:32:55.000000000 -0500 +@@ -7,7 +7,7 @@ + PPPSTATOBJS = pppstats.o + + #CC = gcc +-COPTS = -O ++COPTS = $(RPM_OPT_FLAGS) + COMPILE_FLAGS = -I../include + LIBS = + +--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-01-12 22:56:24.000000000 -0500 ++++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500 +@@ -1,5 +1,5 @@ + CC = gcc +-COPTS = -O2 -g ++COPTS = $(RPM_OPT_FLAGS) + CFLAGS = $(COPTS) -I.. -I../../include -fPIC + LDFLAGS = -shared + INSTALL = install -o root +--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-03-10 18:46:36.000000000 -0500 ++++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-03-10 18:46:44.000000000 -0500 +@@ -5,7 +5,7 @@ + + MANDIR=/usr/man + PLUGIN=radius.so radattr.so radrealms.so +-CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2 ++CFLAGS=-I../.. -I../../../include -Iradiusclient/include $(RPM_OPT_FLAGS) + + # Uncomment the next line to include support for Microsoft's + # MS-CHAP authentication protocol. +--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-03-10 18:46:52.000000000 -0500 ++++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-03-10 18:46:58.000000000 -0500 +@@ -16,7 +16,7 @@ + # Version is set ONLY IN THE MAKEFILE! Don't delete this! + VERSION=3.3 + +-COPTS=-O2 -g ++COPTS=$(RPM_OPT_FLAGS) + CFLAGS=$(COPTS) -I../../../include/linux + all: rp-pppoe.so + diff --git a/ppp.logrotate b/ppp.logrotate new file mode 100644 index 0000000..94b8973 --- /dev/null +++ b/ppp.logrotate @@ -0,0 +1,9 @@ +# Logrotate file for ppp RPM + +/var/log/ppp/connect-errors { + compress + notifempty + daily + rotate 5 + create 0600 root root +} diff --git a/ppp.spec b/ppp.spec index 49e3da2..09ef7b3 100644 --- a/ppp.spec +++ b/ppp.spec @@ -1,22 +1,23 @@ Summary: The PPP (Point-to-Point Protocol) daemon. Name: ppp -Version: 2.4.1 -Release: 16 +Version: 2.4.2 +Release: 2 License: distributable Group: System Environment/Daemons Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz Source1: ppp-2.3.5-pamd.conf -Patch0: ppp-2.4.1-make.patch +Source2: ppp.logrotate +Patch0: ppp-2.4.2-make.patch Patch1: ppp-2.3.6-sample.patch -Patch2: ppp-2.3.9-wtmp.patch -Patch3: ppp-2.4.0-reap.patch -Patch4: ppp-2.3.11-pam_session.patch -Patch5: ppp-2.4.1-warnings.patch -Patch6: ppp-2.4.1-varargs.patch -Patch7: ppp-2.4.1-lib64.patch +Patch2: ppp-2.4.2-libutil.patch +Patch3: ppp-2.4.1-varargs.patch +Patch4: ppp-2.4.2-lib64.patch +Patch5: ppp-2.4.2-bpf.patch +Patch6: ppp-2.4.2-dontwriteetc.patch + BuildRoot: %{_tmppath}/%{name}-root -BuildPrereq: pam-devel -Requires: glibc >= 2.0.6, /etc/pam.d/system-auth +BuildPrereq: pam-devel, libpcap +Requires: glibc >= 2.0.6, /etc/pam.d/system-auth, logrotate %description The ppp package contains the PPP (Point-to-Point Protocol) daemon and @@ -30,13 +31,12 @@ organization over a modem and phone line. %patch0 -p1 -b .make %patch1 -p1 -b .sample # patch 2 depends on the -lutil in patch 0 -%patch2 -p1 -b .wtmp -%patch3 -p1 -b .reap -%patch4 -p1 -b .pam_session -%patch5 -p1 -b .warnings -%patch6 -p1 -b .varargs -# patch 7 depends on the -lutil in patch 0 -%patch7 -p1 -b .lib64 +%patch2 -p1 -b .libutil +%patch3 -p1 -b .varargs +# patch 4 depends on the -lutil in patch 0 +%patch4 -p1 -b .lib64 +%patch5 -p1 -b .bpf +%patch6 -p1 -b .dontwriteetc find . -type f -name "*.sample" | xargs rm -f %build @@ -51,9 +51,19 @@ make install DESTDIR=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir} BINDIR=$RP #chmod 755 $RPM_BUILD_ROOT/usr/sbin/pppd chmod go+r scripts/* +chmod ugo-x scripts/autopppd +chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/pppd/%{version}/*.so mkdir -p $RPM_BUILD_ROOT/etc/pam.d install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/ppp +# Provide pointers for people who expect stuff in old places +ln -s ../../var/log/ppp/connect-errors $RPM_BUILD_ROOT/etc/ppp/connect-errors +ln -s ../../var/run/ppp/resolv.conf $RPM_BUILD_ROOT/etc/ppp/resolv.conf + +# Logrotate script +mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ppp + %clean rm -rf $RPM_BUILD_ROOT @@ -67,14 +77,25 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/pppd.8* %{_mandir}/man8/pppdump.8* %{_mandir}/man8/pppstats.8* +%{_includedir}/pppd +%{_libdir}/pppd %dir /etc/ppp +%dir /var/run/ppp +%attr(700, root, root) %dir /var/log/ppp %config /etc/ppp/chap-secrets %config /etc/ppp/options %config /etc/ppp/pap-secrets %config /etc/pam.d/ppp -%doc README README.linux scripts sample +%config /etc/logrotate.d/ppp +%doc FAQ PLUGINS README README.cbcp README.linux README.MPPE README.MSCHAP80 README.MSCHAP81 README.pwfd README.pppoe scripts sample %changelog +* Fri May 07 2004 Nils Philippsen 2.4.2-2 +- don't write to /etc (#118837) + +* Wed Mar 10 2004 Nalin Dahyabhai 2.4.2-1 +- update to 2.4.2 + * Fri Feb 13 2004 Elliot Lee - rebuilt diff --git a/sources b/sources index 029fd39..59aeeac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fbc256801d5fcd8015039b149ae95eb0 ppp-2.4.1.tar.gz +362bcf218fba8afbb9afbee7471e5dac ppp-2.4.2.tar.gz