Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mailx for openSUSE:Factory checked 
in at 2023-12-11 21:49:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mailx (Old)
 and      /work/SRC/openSUSE:Factory/.mailx.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mailx"

Mon Dec 11 21:49:53 2023 rev:49 rq:1132451 version:12.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/mailx/mailx.changes      2023-11-07 
21:25:38.153917098 +0100
+++ /work/SRC/openSUSE:Factory/.mailx.new.25432/mailx.changes   2023-12-11 
21:49:59.938300688 +0100
@@ -1,0 +2,6 @@
+Wed Dec  6 12:02:04 UTC 2023 - Stefan Schubert <sch...@suse.com>
+
+- Moving /etc/mailrc to /usr/etc/mail.rc
+  * Add patch mailx-usr-etc.patch
+
+-------------------------------------------------------------------

New:
----
  mailx-usr-etc.patch

BETA DEBUG BEGIN:
  New:- Moving /etc/mailrc to /usr/etc/mail.rc
  * Add patch mailx-usr-etc.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mailx.spec ++++++
--- /var/tmp/diff_new_pack.8ax8Cw/_old  2023-12-11 21:50:00.674327945 +0100
+++ /var/tmp/diff_new_pack.8ax8Cw/_new  2023-12-11 21:50:00.674327945 +0100
@@ -72,6 +72,8 @@
 Patch14:        fix-sendmail-name.patch
 #PATCH-FIX-SUSE: bsc#1192916 - mailx does not send mails unless run via strace 
or in verbose mode
 Patch15:        mailx-12.5-systemd.patch
+#Moving /etc/mailrc to /usr/etc/mail.rc
+Patch16:        mailx-usr-etc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -99,13 +101,18 @@
 %patch14 -p1 -b .sendmail
 %patch15 -p0 -b .systemd
 %patch0 -p1 -b .0
+%patch16 -p1 -b .usretc
 
 %build
     CC=gcc
     CFLAGS="%{optflags} -pipe -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN 
$(pkg-config --cflags openssl)"
     export CC CFLAGS
     $SHELL ./makeconfig
+%if 0%{?suse_version} > 1500
+    make %{?_smp_mflags} PREFIX=/usr CC="$CC" CFLAGS="$CFLAGS" 
DISTCONF="-DDISTCONFMAILRC=\"\\\"/usr/etc/mail.rc\\\"\""
+%else
     make %{?_smp_mflags} PREFIX=/usr CC="$CC" CFLAGS="$CFLAGS"
+%endif
     tbl < mailx.1 | groff -mandocdb -Tps | grep -v %%%%CreationDate > manual.ps
     gzip -9fn manual.ps
 
@@ -153,7 +160,14 @@
 group=mail, Mail
 EOF
 %endif
+
+%if 0%{?suse_version} > 1500
+    mkdir -p %{buildroot}%{_distconfdir}
+    install -m 0644 mail.rc %{buildroot}%{_distconfdir}
+    rm %{buildroot}/etc/mail.rc
+%else
     install -m 0644 mail.rc %{buildroot}/etc
+%endif
     mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
 
 %if ! %{with libalternatives}
@@ -171,20 +185,40 @@
 if test ! -e %{_bindir}/mailx; then
   %{_sbindir}/update-alternatives --quiet --force --remove mail 
%{_bindir}/mailx
 fi
-%else
+%endif
 
 %pre
+echo "Calling pre installation script"
+%if %{with libalternatives}
 # removing old update-alternatives entries
 if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
   %{_sbindir}/update-alternatives --quiet --force --remove mail 
%{_bindir}/mailx
 fi
 %endif
+%if 0%{?suse_version} > 1500
+# Prepare for migration to /usr/etc; save any old .rpmsave
+for i in mail.rc; do
+   test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave 
%{_sysconfdir}/${i}.rpmsave.old ||:
+done
+%endif
+
+%if 0%{?suse_version} > 1500
+%posttrans
+# Migration to /usr/etc, restore just created .rpmsave
+for i in mail.rc; do
+   test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave 
%{_sysconfdir}/${i} ||:
+done
+%endif
 
 %files
 %defattr(-,root,root)
 %license COPYING
 %doc README manual.ps.gz nail.rc
+%if 0%{?suse_version} > 1500
+%{_distconfdir}/mail.rc
+%else
 %config /etc/mail.rc
+%endif
 %if 0%{?suse_version} < 1550
 /bin/mail
 %endif

++++++ mailx-usr-etc.patch ++++++
diff -ur a/main.c b/main.c
--- a/main.c    2023-12-05 09:54:32.727382197 +0100
+++ b/main.c    2023-12-06 11:07:50.176112126 +0100
@@ -454,8 +454,15 @@
        input = stdin;
        rcvmode = !to && !tflag;
        spreserve();
-       if (!nosrc)
-               load(PATH_MASTER_RC);
+       if (!nosrc) {
+#ifdef DISTCONFMAILRC
+               struct stat st;
+               if (stat(PATH_MASTER_RC, &st) < 0)
+                       load(DISTCONFMAILRC);
+               else
+#endif                 
+                       load(PATH_MASTER_RC);
+       }
        /*
         * Expand returns a savestr, but load only uses the file name
         * for fopen, so it's safe to do this.
diff -ur a/Makefile b/Makefile
--- a/Makefile  2023-12-05 09:54:32.727382197 +0100
+++ b/Makefile  2023-12-06 11:08:00.418064025 +0100
@@ -60,7 +60,7 @@
 ###########################################################################
 ###########################################################################
 
-FEATURES       = $(IPv6)
+FEATURES       = $(IPv6) $(DISTCONF)
 
 OBJ = aux.o base64.o cache.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o \
        dotlock.o edit.o fio.o getname.o getopt.o head.o hmac.o \

Reply via email to