Bug 20862 - Upgrade from Mageia 5 to 6 using RC Classic ISOs yielded an error for asterisk package
Summary: Upgrade from Mageia 5 to 6 using RC Classic ISOs yielded an error for asteris...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2017-05-15 21:54 CEST by Lewis Smith
Modified: 2017-05-19 10:58 CEST (History)
2 users (show)

See Also:
Source RPM: asterisk-11.23.1-1.mga5
CVE:
Status comment:


Attachments
Log files from M5->6 upgrade which yielded a single asterisk pkg error (737.55 KB, application/zip)
2017-05-15 21:58 CEST, Lewis Smith
Details

Description Lewis Smith 2017-05-15 21:54:15 CEST
Description of problem:
Upgrading an up-to-date and very bloated Mageia 5 system to 6 (nearly 4000 pkgs), using RC Classic ISOs, yielded a single error near or at the end of the 2hr upgrade:
"ERROR 'script' failed asterisk-11.23.1-1.mga5.x86_64"

Clicking 'OK' proceeded OK. The upgraded system worked, but whether asterisk does I cannot say - I never used it (meaningfully) previously.
This happened with two successive ISOs, 8 & 14 May, on the same starting M5 system; so was not 'one-off'. All the upgrade log files will be attached.

Version-Release number of selected component:
Mageia 5 -> 6, RC
Comment 1 Lewis Smith 2017-05-15 21:58:18 CEST
Created attachment 9307 [details]
Log files from M5->6 upgrade which yielded a single asterisk pkg error

Zip file of all upgrade logs from /root/drakx/ (which was cleared out before the upgrade). To view contents, $ unzip -l bugfile.zip
Comment 2 Rémi Verschelde 2017-05-15 22:14:04 CEST
This actually needs to be fixed in Mageia 5, asterisk is no longer provided in Mageia 6 (it was obsoleted by David Walser in task-obsolete due to it not having an active maintainer).

One of the %preun or %postun scripts seem to be failing (haven't checked the logs into detail yet):

-----

%preun
if [ "$1" = 0 ]; then
	echo "Removing setuid root from /usr/bin/mpg123"
	chmod u-s %{_bindir}/mpg123
fi

# Remove the G72x stuff
rm -f /usr/share/doc/asterisk/README.g72x.txt
rm -f /usr/$LIBNAME/asterisk/modules/codec_g723.so
rm -f /usr/$LIBNAME/asterisk/modules/codec_g729.so
rm -f /usr/bin/g729_my_enc
rm -f /usr/bin/g729_my_dec
rm -f /usr/bin/astconv

%_preun_service %{name}

%postun
%_postun_userdel asterisk
gpasswd -d asterisk dialout 1>/dev/null

-----

(from http://svnweb.mageia.org/packages/updates/5/asterisk/current/SPECS/asterisk.spec?view=markup )

Assignee: bugsquad => pkg-bugs
Source RPM: (none) => asterisk-11.23.1-1.mga5
CC: (none) => oe
Version: Cauldron => 5

Comment 3 Rémi Verschelde 2017-05-15 22:16:16 CEST
Here's the error from the install.log provided above:


gpasswd: user 'asterisk' is not a member of 'dialout'
%postun(asterisk-11.23.1-1.mga5.x86_64) scriptlet failed, exit status 3


This error can likely be reproduced directly by uninstalling asterisk on an existing Mageia 5 system.
Comment 4 Rémi Verschelde 2017-05-15 22:44:28 CEST
I pushed asterisk-11.23.1-1.1.mga5 to Mageia 5 core/updates_testing which should hopefully fix the issue (actually *silence* it, I did not try to find a proper fix as this package seems broken beyond repair and was dropped in Cauldron).

As far as QA is concerned, it should be enough to test that the update candidate installs and removes properly.

On my setup, I could not reproduce the error in comment 3 as apparently a new installation of the latest asterisk creates the right groups:

$ groups asterisk
asterisk : asterisk dialout

Still, in case it's not right when %preun runs, my changes will make it fail silently:


Index: SPECS/asterisk.spec
===================================================================
--- SPECS/asterisk.spec (révision 1057119)
+++ SPECS/asterisk.spec (copie de travail)
@@ -43,7 +43,8 @@
 
 Summary:       The Open Source PBX
 Name:          asterisk
-Version:       11.21.2
+Version:       11.23.1
+%define subrel 1
 Release:       %mkrel %{?beta:0.0.%{beta}.}1
 License:       GPLv2
 Group:         System/Servers
@@ -835,7 +836,7 @@
 
 %pre
 %_pre_useradd asterisk /var/lib/asterisk /bin/sh
-gpasswd -a asterisk dialout 1>/dev/null
+gpasswd -a asterisk dialout 1>/dev/null || :
 
 %post
 %create_ghostfile /var/lib/asterisk/astdb asterisk asterisk 640
@@ -872,8 +873,8 @@
 %_preun_service %{name}
 
 %postun
+gpasswd -d asterisk dialout 1>/dev/null || :
 %_postun_userdel asterisk
-gpasswd -d asterisk dialout 1>/dev/null
 
 %pre plugins-dahdi
 %{_sbindir}/usermod -a -G dahdi asterisk

Assignee: pkg-bugs => qa-bugs

Comment 5 Rémi Verschelde 2017-05-15 22:51:13 CEST
Advisory:
=========

Updated asterisk packages prevent upgrade issue

  A post-uninstall script in asterisk can fail if the 'asterisk' user does not
  belong to the 'dialout' group, producing a loud error during upgrades to
  Mageia 6. This cosmetic update silences this harmless failure to smooth the
  upgrade process.



SRPM in core/udpates_testing:
=============================

- asterisk-11.23.1-1.1.mga5


RPMs in core/updates_testing:
=============================

asterisk-11.23.1-1.1.mga5
asterisk-addons-11.23.1-1.1.mga5
asterisk-devel-11.23.1-1.1.mga5
asterisk-firmware-11.23.1-1.1.mga5
asterisk-gui-11.23.1-1.1.mga5
asterisk-plugins-corosync-11.23.1-1.1.mga5
asterisk-plugins-alsa-11.23.1-1.1.mga5
asterisk-plugins-calendar-11.23.1-1.1.mga5
asterisk-plugins-cel-11.23.1-1.1.mga5
asterisk-plugins-curl-11.23.1-1.1.mga5
asterisk-plugins-dahdi-11.23.1-1.1.mga5
asterisk-plugins-fax-11.23.1-1.1.mga5
asterisk-plugins-festival-11.23.1-1.1.mga5
asterisk-plugins-ices-11.23.1-1.1.mga5
asterisk-plugins-jabber-11.23.1-1.1.mga5
asterisk-plugins-jack-11.23.1-1.1.mga5
asterisk-plugins-lua-11.23.1-1.1.mga5
asterisk-plugins-ldap-11.23.1-1.1.mga5
asterisk-plugins-minivm-11.23.1-1.1.mga5
asterisk-plugins-mobile-11.23.1-1.1.mga5
asterisk-plugins-mp3-11.23.1-1.1.mga5
asterisk-plugins-mysql-11.23.1-1.1.mga5
asterisk-plugins-ooh323-11.23.1-1.1.mga5
asterisk-plugins-oss-11.23.1-1.1.mga5
asterisk-plugins-pktccops-11.23.1-1.1.mga5
asterisk-plugins-portaudio-11.23.1-1.1.mga5
asterisk-plugins-pgsql-11.23.1-1.1.mga5
asterisk-plugins-radius-11.23.1-1.1.mga5
asterisk-plugins-saycountpl-11.23.1-1.1.mga5
asterisk-plugins-skinny-11.23.1-1.1.mga5
asterisk-plugins-snmp-11.23.1-1.1.mga5
asterisk-plugins-speex-11.23.1-1.1.mga5
asterisk-plugins-sqlite-11.23.1-1.1.mga5
asterisk-plugins-tds-11.23.1-1.1.mga5
asterisk-plugins-osp-11.23.1-1.1.mga5
asterisk-plugins-unistim-11.23.1-1.1.mga5
asterisk-plugins-voicemail-11.23.1-1.1.mga5
asterisk-plugins-voicemail-imap-11.23.1-1.1.mga5
asterisk-plugins-voicemail-plain-11.23.1-1.1.mga5
lib{,64}asteriskssl1-11.23.1-1.1.mga5
Comment 6 Lewis Smith 2017-05-16 08:12:57 CEST
Thank you Rémi for all your work for such a useless problem.
Comment 2 "asterisk is no longer provided in Mageia 6 (it was obsoleted by David Walser".
Comment 4 "this package seems broken beyond repair and was dropped in Cauldron".
Looks like good news.

Once I have reverted my upgraded system to Mageia 5, I will apply and test this update (only that it works, not asterisk!). Then re-do the upgrade. If that goes silently, this can be closed. The problem is unlikely to arise in real life.
Comment 7 Lewis Smith 2017-05-16 09:19:05 CEST
Testing M5_64: the update itself.

BEFORE:
 asterisk-11.23.1-1.mga5
 [asterisk-core-sounds-en-1.4.22-5.mga5]
 asterisk-firmware-11.23.1-1.mga5
 [asterisk-moh-opsound-20091226-5.mga5]
 asterisk-plugins-pktccops-11.23.1-1.mga5
 lib64asteriskssl1-11.23.1-1.mga5

AFTER:
 asterisk-11.23.1-1.1.mga5
 [asterisk-core-sounds-en-1.4.22-5.mga5]
 asterisk-firmware-11.23.1-1.1.mga5
 [asterisk-moh-opsound-20091226-5.mga5]
 asterisk-plugins-pktccops-11.23.1-1.1.mga5
 lib64asteriskssl1-11.23.1-1.1.mga5
The update was seamless. Next to try the upgrade to M6.
Comment 8 Lewis Smith 2017-05-17 09:56:58 CEST
Have just done what ended as an abortive M5 -> 6 upgrade with an additional on-line medium added. I did that upgrade twice in one session from Classic ISO 14 May due to failures ending in 'installation failed', so do not know whether the log files relate to the 1st cycle, the 2nd, or both. (Timestamp between the two). 1st time added coffee, 2nd time free, mirrors.
Does the following help? Sorry it is so long.

 $ grep asterisk install.log 
removing package asterisk-core-sounds-en-1.4.22-5.mga5.noarch
removing package asterisk-firmware-11.23.1-1.1.mga5.x86_64
removing package asterisk-moh-opsound-20091226-5.mga5.noarch
removing package asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64
removing package asterisk-11.23.1-1.1.mga5.x86_64
gpasswd: user 'asterisk' is not a member of 'dialout'
removing package lib64asteriskssl1-11.23.1-1.1.mga5.x86_64

 $ grep  asterisk ddebug.log 
* auto-select: adding task-obsolete-6-110.mga6.noarch replacing asterisk-moh-opsound-20091226-5.mga5.noarch
* auto-select: adding task-obsolete-6-110.mga6.noarch replacing asterisk-11.23.1-1.1.mga5.x86_64
* auto-select: adding task-obsolete-6-110.mga6.noarch replacing asterisk-firmware-11.23.1-1.1.mga5.x86_64
* auto-select: adding task-obsolete-6-110.mga6.noarch replacing asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64
* auto-select: adding task-obsolete-6-110.mga6.noarch replacing lib64asteriskssl1-11.23.1-1.1.mga5.x86_64
* auto-select: adding task-obsolete-6-110.mga6.noarch replacing asterisk-core-sounds-en-1.4.22-5.mga5.noarch
* set_rejected: asterisk-11.23.1-1.1.mga5.x86_64
* set_rejected: asterisk-core-sounds-en-1.4.22-5.mga5.noarch
* set_rejected: asterisk-firmware-11.23.1-1.1.mga5.x86_64
* set_rejected: asterisk-moh-opsound-20091226-5.mga5.noarch
* set_rejected: asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64
* set_rejected: lib64asteriskssl1-11.23.1-1.1.mga5.x86_64
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied libasteriskssl.so.1()(64bit)
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-moh
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-firmware[== 11.23.1-1.1.mga5]
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-core-sounds
* installed asterisk-core-sounds-en-1.4.22-5.mga5.noarch is conflicting because of unsatisfied asterisk
* installed asterisk-moh-opsound-20091226-5.mga5.noarch is conflicting because of unsatisfied asterisk
* installed asterisk-firmware-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk[== 11.23.1-1.1.mga5]
* installed asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk[== 11.23.1-1.1.mga5]
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-plugins-pktccops[== 11.23.1-1.1.mga5]
* set_rejected: asterisk-11.23.1-1.1.mga5.x86_64
* set_rejected: asterisk-core-sounds-en-1.4.22-5.mga5.noarch
* set_rejected: asterisk-firmware-11.23.1-1.1.mga5.x86_64
* set_rejected: asterisk-moh-opsound-20091226-5.mga5.noarch
* set_rejected: asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64
* set_rejected: lib64asteriskssl1-11.23.1-1.1.mga5.x86_64
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-plugins-pktccops[== 11.23.1-1.1.mga5]
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-core-sounds
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied libasteriskssl.so.1()(64bit)
* installed asterisk-core-sounds-en-1.4.22-5.mga5.noarch is conflicting because of unsatisfied asterisk
* installed asterisk-moh-opsound-20091226-5.mga5.noarch is conflicting because of unsatisfied asterisk
* installed asterisk-firmware-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk[== 11.23.1-1.1.mga5]
* installed asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk[== 11.23.1-1.1.mga5]
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-moh
* installed asterisk-11.23.1-1.1.mga5.x86_64 is conflicting because of unsatisfied asterisk-firmware[== 11.23.1-1.1.mga5]
lewis@lmde /mnt/common/Mageia/logs $ 
lewis@lmde /mnt/common/Mageia/logs $ 
lewis@lmde /mnt/common/Mageia/logs $ ls
auto_inst.cfg.pl  ddebug.log  install.log
lewis@lmde /mnt/common/Mageia/logs $ 
lewis@lmde /mnt/common/Mageia/logs $ grep asterisk install.log 
removing package asterisk-core-sounds-en-1.4.22-5.mga5.noarch
removing package asterisk-firmware-11.23.1-1.1.mga5.x86_64
removing package asterisk-moh-opsound-20091226-5.mga5.noarch
removing package asterisk-plugins-pktccops-11.23.1-1.1.mga5.x86_64
removing package asterisk-11.23.1-1.1.mga5.x86_64
gpasswd: user 'asterisk' is not a member of 'dialout'
removing package lib64asteriskssl1-11.23.1-1.1.mga5.x86_64
Comment 9 Rémi Verschelde 2017-05-17 10:12:39 CEST
Thanks for the test, the absence of

%postun(asterisk-11.23.1-1.mga5.x86_64) scriptlet failed, exit status 3

confirms that the bug is "fixed", i.e. upgrades will no longer choke on asterisk. The command itself still fails, but no longer triggers a script error for RPM.

The rest of the log is normal, it's just RPM being very verbose about its decision process to satisfy the fact that task-obsolete prompts for the removal of asterisk and its related packages.

Whiteboard: (none) => MGA5-64-OK

Comment 10 Lewis Smith 2017-05-17 22:03:20 CEST
Thank you Rémi for your confirmation that the fix seems effective.
Adivisory uploaded, validating this to clear it off the list.

Whiteboard: MGA5-64-OK => MGA5-64-OK advisory
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 11 Mageia Robot 2017-05-19 10:58:34 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2017-0019.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.