Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mailx for openSUSE:Factory checked in at 2022-02-21 17:45:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mailx (Old) and /work/SRC/openSUSE:Factory/.mailx.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mailx" Mon Feb 21 17:45:51 2022 rev:45 rq:955885 version:12.5 Changes: -------- --- /work/SRC/openSUSE:Factory/mailx/mailx.changes 2021-11-27 00:50:49.962903920 +0100 +++ /work/SRC/openSUSE:Factory/.mailx.new.1958/mailx.changes 2022-02-21 17:46:07.743585615 +0100 @@ -1,0 +2,5 @@ +Thu Feb 17 21:22:49 UTC 2022 - Stefan Schubert <sch...@suse.de> + +- Use libalternatives instead of update-alternatives. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mailx.spec ++++++ --- /var/tmp/diff_new_pack.WGl03h/_old 2022-02-21 17:46:08.583585865 +0100 +++ /var/tmp/diff_new_pack.WGl03h/_new 2022-02-21 17:46:08.587585866 +0100 @@ -1,7 +1,7 @@ # # spec file for package mailx # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + Name: mailx BuildRequires: groff BuildRequires: krb5-devel @@ -25,8 +31,13 @@ BuildRequires: postfix BuildRequires: update-alternatives BuildRequires: pkgconfig(openssl) +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun):update-alternatives +%endif URL: http://heirloom.sourceforge.net/mailx.html Provides: mail Recommends: smtp_daemon @@ -102,6 +113,8 @@ %make_install PREFIX=/usr rm -rf %{buildroot}/bin mkdir %{buildroot}/bin +%if ! %{with libalternatives} + # create symlinks for update-alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives %if !0%{?usrmerged} ln -sf %{_sysconfdir}/alternatives/binmail %{buildroot}/bin/mail @@ -118,9 +131,32 @@ ln -sf %{_bindir}/mailx %{buildroot}%{_sysconfdir}/alternatives/mail ln -sf %{_mandir}/man1/mailx.1%{?ext_man} %{buildroot}%{_sysconfdir}/alternatives/Mail.1%{?ext_man} ln -sf %{_mandir}/man1/mailx.1%{?ext_man} %{buildroot}%{_sysconfdir}/alternatives/mail.1%{?ext_man} +%else + ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/Mail +%if !0%{?usrmerged} + ln -sf %{_bindir}/alts %{buildroot}/bin/Mail +%endif + mkdir -p %{buildroot}%{_datadir}/libalternatives/Mail + cat > %{buildroot}%{_datadir}/libalternatives/Mail/20.conf <<EOF +binary=%{_bindir}/mailx +man=mailx.1 +group=mail, Mail +EOF + ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/mail +%if !0%{?usrmerged} + ln -sf %{_bindir}/alts %{buildroot}/bin/mail +%endif + mkdir -p %{buildroot}%{_datadir}/libalternatives/mail + cat > %{buildroot}%{_datadir}/libalternatives/mail/20.conf <<EOF +binary=%{_bindir}/mailx +man=mailx.1 +group=mail, Mail +EOF +%endif install -m 0644 mail.rc %{buildroot}/etc mkdir -p %{buildroot}%{_defaultdocdir}/%{name} +%if ! %{with libalternatives} %post %{_sbindir}/update-alternatives --quiet --force \ --install %{_bindir}/mail mail %{_bindir}/mailx 20 \ @@ -135,6 +171,13 @@ if test ! -e %{_bindir}/mailx; then %{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mailx fi +%else +%pre +# removing old update-alternatives entries +if [ "$1" > 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then + %{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mailx +fi +%endif %files %defattr(-,root,root) @@ -143,17 +186,28 @@ %config /etc/mail.rc %if !0%{?usrmerged} /bin/mail +%endif +/usr/bin/Mail +/usr/bin/mail +%if ! 0%{with libalternatives} +%if !0%{?usrmerged} %ghost %config %{_sysconfdir}/alternatives/binmail %endif %ghost %config %{_sysconfdir}/alternatives/Mail %ghost %config %{_sysconfdir}/alternatives/mail %ghost %config %{_sysconfdir}/alternatives/Mail.1%{?ext_man} %ghost %config %{_sysconfdir}/alternatives/mail.1%{?ext_man} -/usr/bin/Mail -/usr/bin/mail -/usr/bin/mailx %doc %{_mandir}/man1/Mail.1.gz %doc %{_mandir}/man1/mail.1.gz +%else +%dir %{_datadir}/libalternatives +%dir %{_datadir}/libalternatives/mail +%dir %{_datadir}/libalternatives/Mail +%{_datadir}/libalternatives/Mail/20.conf +%{_datadir}/libalternatives/mail/20.conf +%endif + +/usr/bin/mailx %doc %{_mandir}/man1/mailx.1.gz %changelog