Bug 31083 - dnsmasq package : rpm post script bug : "Failed to try-restart dnsmasq.service.service: Unit dnsmasq.service.service not found."
Summary: dnsmasq package : rpm post script bug : "Failed to try-restart dnsmasq.servic...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Julien Moragny
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-06 11:01 CET by PC LX
Modified: 2022-11-12 23:27 CET (History)
1 user (show)

See Also:
Source RPM: dnsmasq-2.87-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description PC LX 2022-11-06 11:01:18 CET
Description of problem:

When upgrading from Mageia 8 to Mageia 9/cauldron I see the following error messages:

"""
Failed to try-restart dnsmasq.service.service: Unit dnsmasq.service.service not found.
warning: %post(dnsmasq-2.87-1.mga9.x86_64) scriptlet failed, exit status 5
ERROR: 'script' failed for dnsmasq-2.87-1.mga9.x86_64
"""



Version-Release number of selected component (if applicable):

dnsmasq-2.87-1.mga9.x86_64



How reproducible:

Always.



Steps to Reproduce:
1. Start with a Mageia 8 system with dnsmasq-2.85-4.mga8 installed. Other dnsmasq mga8 versions probably also produce the same result.
2. Upgrade the repositories to Mageia 9/cauldron using: urpmi.removemedia -a ; urpmi.addmedia --distrib MAGEIA_CAULDRON_REPOSITORY_URL.
3. Run: urpmi --auto-update
Comment 1 Dave Hodgins 2022-11-06 16:38:32 CET
# rpm -q --scripts dnsmasq
preinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-user dnsmasq $1 dnsmasq /dev/null /sbin/nologin
postinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-service dnsmasq $1 dnsmasq
preuninstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/del-service dnsmasq $1 dnsmasq.service
postuninstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/del-user dnsmasq $1 dnsmasq

Looks like the preuninstall scriplet should not have the ".service".

Assigning to Julien, the registered maintainer.

Problem is also present in Mageia 8, so the only way to avoid this during
upgrade is update it in Mageia 8, which will trigger the error message
there when the update is installed there.

CC: (none) => davidwhodgins
Assignee: bugsquad => gouessej

Comment 2 Julien Gouesse 2022-11-06 23:36:00 CET
I'm not the registered maintainer, it's probably a mistake.
Comment 3 Dave Hodgins 2022-11-07 00:01:10 CET
Sorry, assigning to the correct Julien.

Assignee: gouessej => julien.moragny

Comment 4 PC LX 2022-11-12 11:10:56 CET
Retesting upgrading from Mageia 8 to Mageia 9/cauldron. This issue is still present.

# LANGUAGE=C urpmi dnsmasq
    http://ftp.free.fr/mirrors/mageia.org/distrib/cauldron/x86_64/media/core/release/dnsmasq-2.87-1.mga9.x86_64.rpm
installing dnsmasq-2.87-1.mga9.x86_64.rpm from /var/cache/urpmi/rpms                                                                                                                                                                       
Preparing...                     ##############
      1/1: dnsmasq               ##############
Warning: Problems encountered when activating services.
  Please check and enable manually if necessary.
  Service units affected: dnsmasq.service.service
# rpm -q dnsmasq 
dnsmasq-2.87-1.mga9
# rpm -q --scripts dnsmasq
preinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-user dnsmasq $1 dnsmasq /dev/null /sbin/nologin
postinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-service dnsmasq $1 dnsmasq.service
preuninstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/del-service dnsmasq $1 dnsmasq.service
postuninstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/del-user dnsmasq $1 dnsmasq
Comment 5 Julien Moragny 2022-11-12 18:30:07 CET
Hello,

I just pushed dnsmasq 2.87-2 to cauldron which fix the issue with upgrading.

for 8, it only impacts uninstallation where the service is not stopped when uninstalled.
I'll submit an update to 8 if no other problem emerge with cauldron after some days.

regards
julien
Comment 6 PC LX 2022-11-12 23:27:05 CET
This issue seems to be fixed in cauldron and no other issues found on the quick tests I did.


# uname -a
Linux vm-jupiter-mageia-9 6.0.8-desktop-1.mga9 #1 SMP PREEMPT_DYNAMIC Fri Nov 11 15:23:14 UTC 2022 x86_64 GNU/Linux
# urpmi dnsmasq


    $MIRRORLIST: media/core/release/dnsmasq-2.87-2.mga9.x86_64.rpm
installing dnsmasq-2.87-2.mga9.x86_64.rpm from /var/cache/urpmi/rpms                                                                                                                                                                       
Preparing...                     ##############
      1/1: dnsmasq               ##############
# rpm -q dnsmasq 
dnsmasq-2.87-2.mga9
# rpm -q --scripts dnsmasq 
preinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-user dnsmasq $1 dnsmasq /dev/null /sbin/nologin
postinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-service dnsmasq $1 dnsmasq
preuninstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/del-service dnsmasq $1 dnsmasq
# urpme dnsmasq 
removing dnsmasq-2.87-2.mga9.x86_64
removing package dnsmasq-2.87-2.mga9.x86_64
      1/1: removing dnsmasq-2.87-2.mga9.x86_64
                                 ###############

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