rpms/mailx/devel mailx-12.3-pager.patch, NONE, 1.1 mailx.spec, 1.30, 1.31

Dmitry Butskoy (buc) fedora-extras-commits at redhat.com
Thu Jun 26 16:11:05 UTC 2008


Author: buc

Update of /cvs/extras/rpms/mailx/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15197

Modified Files:
	mailx.spec 
Added Files:
	mailx-12.3-pager.patch 
Log Message:


- add missed BR for krb5-devel
- activate IPv6 support
- change config to /etc/mail.rc for compatibility
- add triggerpostun scriptlets against previous mailx and nail
  to check and merge (when possible) their user config changes
- use proper config filename in manuals
- use "less" instead of non-provided "pg" for nobsdcompat mode



mailx-12.3-pager.patch:

--- NEW FILE mailx-12.3-pager.patch ---
diff -Nrbu mailx-12.3/cmd1.c mailx-12.3-OK/cmd1.c
--- mailx-12.3/cmd1.c	2007-06-16 16:48:39.000000000 +0400
+++ mailx-12.3-OK/cmd1.c	2008-06-26 19:57:38.000000000 +0400
@@ -78,7 +78,7 @@
 
 	cp = value("PAGER");
 	if (cp == NULL || *cp == '\0')
-		cp = value("bsdcompat") ? "more" : "pg";
+		cp = value("bsdcompat") ? "more" : "less";
 	return cp;
 }
 


Index: mailx.spec
===================================================================
RCS file: /cvs/extras/rpms/mailx/devel/mailx.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- mailx.spec	18 Jun 2008 14:32:51 -0000	1.30
+++ mailx.spec	26 Jun 2008 16:10:21 -0000	1.31
@@ -1,4 +1,5 @@
 %define	use_nss	1
+%define mailrc	%{_sysconfdir}/mail.rc
 
 Summary: Enhanced implementation of the mailx command
 Name: mailx
@@ -10,15 +11,16 @@
 Source0: http://dl.sourceforge.net/heirloom/mailx-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Patch0: nail-11.25-config.patch
+Patch1: mailx-12.3-pager.patch
 
 %if %{use_nss}
-BuildRequires: nss-devel, pkgconfig
+BuildRequires: nss-devel, pkgconfig, krb5-devel
 %else
 BuildRequires: openssl-devel
 %endif
 
 Obsoletes: nail <= 12.3
-Provides: nail
+Provides: nail = %{version}
 
 
 %description
@@ -43,14 +45,9 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
-# TODO:
-# - Choose proper config file name (currently /etc/mailx.rc)
-# - Avoid any referencies of "nail" in the doc and code (mailx.1)
-# - When "nobsdcompat", "pg" pager is chosen, which is missed in Linux...
-# - Work with upstream to differ config files and/or config directives
-# depending on the actual program name (fe. to allow "mail" with "bsdcompat",
-# but POSIX's "mailx" without "bsdcompat").
+sed -i 's,/etc/nail.rc,%{mailrc},g' mailx.1 mailx.1.html
 
 
 %build
@@ -64,14 +61,16 @@
 	BINDIR=%{_bindir} \
 	MANDIR=%{_mandir} \
 	SYSCONFDIR=%{_sysconfdir} \
-	MAILRC=%{_sysconfdir}/%{name}.rc \
+	MAILRC=%{mailrc} \
 	MAILSPOOL=%{_localstatedir}/mail \
 	SENDMAIL=%{_sbindir}/sendmail \
 	UCBINSTALL=install \
 > makeflags
 
 #  %{?_smp_mflags} cannot be used here
-make `cat makeflags` CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
+make `cat makeflags` \
+	CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" \
+	IPv6=-DHAVE_IPv6_FUNCS
 
 
 %install
@@ -102,20 +101,51 @@
 rm -rf $RPM_BUILD_ROOT
 
 
+%triggerpostun -- mailx < 12
+[ -f %{mailrc}.rpmnew ] && {
+    # old config was changed. Merge both together.
+    ( echo '# The settings above was inherited from the old mailx-8.x config'
+      echo
+      cat %{mailrc}.rpmnew
+    ) >>%{mailrc}
+} || :
+
+
+%triggerpostun -- nail <= 12.3
+
+[ -f %{_sysconfdir}/nail.rc.rpmsave ] && {
+    # old config was changed...
+    save=%{mailrc}.rpmnew
+    [ -f $save ] && save=%{mailrc}.rpmsave
+
+    mv -f %{mailrc} $save
+    mv -f %{_sysconfdir}/nail.rc.rpmsave %{mailrc}
+} || :
+
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING AUTHORS README
-%config(noreplace) %{_sysconfdir}/%{name}.rc
+%config(noreplace) %{mailrc}
 /bin/*
 %{_bindir}/*
 %{_mandir}/*/*
 
 
 %changelog
+* Thu Jun 26 2008 Dmitry Butskoy <Dmitry at Butskoy.name>
+- add missed BR for krb5-devel
+- activate IPv6 support
+- change config to /etc/mail.rc for compatibility
+- add triggerpostun scriptlets against previous mailx and nail
+  to check and merge (when possible) their user config changes
+- use proper config filename in manuals
+- use "less" instead of non-provided "pg" for nobsdcompat mode
+
 * Wed Jun 18 2008 Dmitry Butskoy <Dmitry at Butskoy.name> - 12.3-0
 - Change the name from "nail" to upstream's "mailx".
   Merge with the ordinary "mailx" cvs tree for Fedora 10.
-  Now this stuff supersedes the old ancient mailx-8.x in Feedora.
+  Now this stuff supersedes the old ancient mailx-8.x in Fedora.
 - Build with nss instead of openssl, for "Security Consolidation" process.
 
 * Mon Feb 18 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 12.3-4




More information about the fedora-extras-commits mailing list