[Patch] logtmp plugin ppp compatibility fix

Charlie Brady <[email protected]> Thu, 30 Aug 2012 18:05:31 -0400 (EDT)
Newsgroups gmane.network.poptop
Message-ID <[email protected]>
The logtmp plugin in pptpd build from the bundled pptpd.spec doesn't work 
on any current distribution, because of the obsolete bundled 
plugins/patchlevel.h file. There is also non-strict version dependency for 
ppp (ppp >= 2.4.3). We can fix those issues. We also don't need 'INSTALL' 
for people installing via rpm (that's a bit of rpmlint which Dave Ludlow 
missed).

[These changes from Fedora's spec file (pptpd-1.3.4-1.fc13.src.rpm), which 
might differ in minor ways from your CVS.]

--- pptpd.spec	2010-09-11 09:09:46.000000000 -0400
+++ pptpd.spec.new	2012-08-30 18:04:12.214384000 -0400
@@ -8,17 +8,19 @@
 # --with    ipalloc
 # --without bcrelay
 #
+%define ppp_version %(rpm -q --qf='%{Version}\\n' ppp)
 
 Summary:	PoPToP Point to Point Tunneling Server
 Name:		pptpd
 Version:	1.3.4
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	GPLv2
 Group:		Applications/Internet
 URL:		http://poptop.sourceforge.net/
 Source0:	http://dl.sf.net/poptop/pptpd-%{version}.tar.gz
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:	ppp >= 2.4.3
+Requires:	ppp = %{ppp_version}
+BuildRequires:	ppp
 
 %if %{?_without_libwrap:0}%{!?_without_libwrap:1}
 BuildRequires: tcp_wrappers
@@ -35,6 +37,8 @@
 
 %prep
 %setup -q
+date +'#define DATE "%d %b %y"' > plugins/patchlevel.h
+echo '#define VERSION "%{ppp_version}"' >> plugins/patchlevel.h
 
 # Fix file permissions
 %{__chmod} 644 *.[ch]
@@ -56,7 +60,6 @@
 	%{?_with_ipalloc:--with-pppd-ip-alloc} \
 	%{!?_without_bcrelay:--with-bcrelay} \
 	%{?_without_bcrelay:--without-bcrelay}
-(echo '#undef VERSION'; echo '#define VERSION "2.4.3"') >> plugins/patchlevel.h
 %{__make} CFLAGS='-fno-builtin -fPIC -DSBINDIR=\"%{_sbindir}\" %{optflags}'
 
 %install
@@ -102,7 +105,7 @@
 
 %files
 %defattr(-,root,root,-)
-%doc COPYING INSTALL README* TODO ChangeLog* samples AUTHORS
+%doc COPYING README* TODO ChangeLog* samples AUTHORS
 %{_sbindir}/pptpd
 %{_sbindir}/pptpctrl
 %{_sbindir}/pptp-portslave
@@ -118,6 +121,12 @@
 %config(noreplace) /etc/ppp/options.pptpd
 
 %changelog
+* Thu Aug 30 2012 Charlie Brady <[email protected]> 1.3.4-2
+- Update pptpd-logwtmp plugin version compatibility to match buildsys
+  ppp version.
+- Enforce ppp version compatibility via strict dependency.
+- Remove 'INSTALL' file from documentation directory
+
 * Sat Sep 11 2010 Dave Ludlow <[email protected]> - 1.3.4-1
 - Update to 1.3.4
 - Tweaks to remove rpmlint warnings


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/