Bug 25903 - Syntax error in %triggerun of samba-client package
Summary: Syntax error in %triggerun of samba-client package
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Buchan Milne
QA Contact:
URL:
Whiteboard:
Keywords:
: 26139 (view as bug list)
Depends on: 26113
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-19 20:08 CET by diaphane d.
Modified: 2020-01-28 19:31 CET (History)
2 users (show)

See Also:
Source RPM: samba-4.10.11-1.mga7.src.rpm
CVE:
Status comment:


Attachments

Description diaphane d. 2019-12-19 20:08:12 CET
Description of problem:

The security update MGASA-2019-0397 (2019-12-19 ; #25644) comes with an error in samba-client package.
There is a typo in samba.spec file (line 910)
http://svnweb.mageia.org/packages/updates/7/samba/current/SPECS/samba.spec?view=markup&pathrev=1467227#l910

Line 910:
[[ $1 ==0 || $2 == 0 ]]  && rm -f %{cups_serverbin}/backend/smb
should be:
[[ $1 == 0 || $2 == 0 ]]  && rm -f %{cups_serverbin}/backend/smb


During upgrade:
/var/tmp/rpm-tmp.lB2KRM: ligne 1: opérateur binaire conditionnel attendu
/var/tmp/rpm-tmp.lB2KRM: ligne 1: erreur de syntaxe près de « ==0 »
/var/tmp/rpm-tmp.lB2KRM: ligne 1: `[[ $1 ==0 || $2 == 0 ]]  && rm -f /usr/lib/cups/backend/smb'
attention : %triggerun(samba-client-4.10.8-3.mga7.x86_64) scriptlet échoué, état de sortie 2
Error: ERROR: 'script' failed for samba-client-4.10.8-3.mga7.x86_64                                                                 
/var/tmp/rpm-tmp.UElQLT: ligne 1: /usr/sbin/ : est un dossier
/var/tmp/rpm-tmp.0rwdiX: ligne 1: /usr/sbin/ : est un dossier


This error comes from samba-client-4.10.8-3.mga7.x86_64 but is still present in samba-client-4.10.11-1.mga7:
$ rpm -q --triggers samba-client
...
# Remove the symlink if either samba-client or cups is removed
triggerun scriptlet (using /bin/sh) -- cups
[[ $1 ==0 || $2 == 0 ]]  && rm -f /usr/lib/cups/backend/smb
...

$ rpm -q samba-client
samba-client-4.10.11-1.mga7
Comment 1 Lewis Smith 2019-12-19 21:48:13 CET
Thank you for this detailed and well documented fault, with the update bug number. [Without that, I was puzzled by only seeing samba-4.10.8-3.mga7.src.rpm ; the update has yet to filter through].
Curious that the error should have gone undetected by the update testing.

Assigning to Buchan as he is the registered maintainer, and did the 4.10.11 build.

Assignee: bugsquad => bgmilne

Comment 2 Florian Hubold 2020-01-05 15:37:12 CET
FWIW, the 2 other errors about "/usr/sbin/ : is a directory" come from an additional blank in line 891: http://svnweb.mageia.org/packages/cauldron/samba/current/SPECS/samba.spec?view=markup#l891

which starts with

> %{_sbindir}/ update-alternatives

this should obviously be

> %{_sbindir}/update-alternatives

CC: (none) => doktor5000

Comment 3 David Walser 2020-01-05 19:34:04 CET
Thanks to you both.  I've fixed both syntax errors in SVN, so the next update should be OK.
Comment 4 David Walser 2020-01-28 18:34:04 CET
*** Bug 26139 has been marked as a duplicate of this bug. ***

CC: (none) => bittwister2

Comment 5 David Walser 2020-01-28 18:35:30 CET
Fixed in:
https://advisories.mageia.org/MGASA-2020-0058.html

CC: (none) => luigiwalser
Depends on: (none) => 26113

Comment 6 David Walser 2020-01-28 19:31:53 CET
Closing (note to Bit Twister, errors in previous versions' %*un scriplets are not fixable).

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


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