[Bug 1155792] New: Packaging bug updating Corosync
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792 Bug ID: 1155792 Summary: Packaging bug updating Corosync Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Maintenance Assignee: bnc-team-screening@forge.provo.novell.com Reporter: criguada+opensuse@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- A few days ago, while updating Tumbleweed, got this message from zypper: (272/354) Installazione di: corosync-2.4.5-4.1.x86_64 .................................................................................................................................[fine] Output aggiuntivo di rpm: Updating /etc/sysconfig/corosync ... /var/tmp/rpm-tmp.HB28jI: line 67: [: -eq: unary operator expected /var/tmp/rpm-tmp.HB28jI: line 71: [: -gt: unary operator expected According to comments in openSUSE forums, this seems to be a packaging bug. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c1
Andrei Borzenkov
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
Yuan Ren
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c2
--- Comment #2 from Yuan Ren
Corosync %post includes
%{fillup_and_insserv -n corosync} %service_add_post corosync.service corosync-notifyd.service
expansion of %fillup_and_insserv resets parameters, like
... set -- $INSSRV_ARRAY while [ ${#*} -gt 0 ] ; do SCRIPTNAME=$1 SV_VALUE=$2 shift 2
so %service_add_post which expands to
... if [ $1 -eq 1 ]; then ...
gets empty $1.
I guess %service_add_post and other systemd-rpm-macros need follow the suite of %fillup_and_insserv:
test -n "$FIRST_ARG" || FIRST_ARG=$1 ... if test "$FIRST_ARG" = "1" -a "$SV_VALUE" = "no" ; then
corosync will then need to be rebuilt against updated systemd-rmp-macros.
Cc corosync and systemd maintainers.
Thanks for detailed information, those noisy outputs also occurred in corosync-2.4.4(%fillup_and_insserv used). The weird thing is this only happened on the tumbleweed. I'm not too familiar with RPM macro implements detail. But still investigating. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c3
--- Comment #3 from Yuan Ren
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c5
--- Comment #5 from Yuan Ren
It's because of %postun kicks in the upgrade process I guess. You might delete it. I don't think so, The updated spec file is : https://build.opensuse.org/package/view_file/home:yuanren10/Corosync-2_4_5/c... But the disappear situation still occurs.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c6
--- Comment #6 from Andrei Borzenkov
The updated spec file is : https://build.opensuse.org/package/view_file/home:yuanren10/Corosync-2_4_5/ corosync.spec?expand=1 But the disappear situation still occurs.
Was corosync rebuilt after this change? Downloaded package still contains unconditional "rm /etc/sysconfig/corosync". You should check whether this is final uninstall or update before removing file. Also if [ ! -e %{_sysconfdir}/sysconfig/corosync ]; then %fillup_only -n corosync fi This is wrong. It means /etc/sysconfig/corosync will miss any changes in updated package (i.e. any new parameter won't appear in /etc/sysconfig/corosync). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c7
--- Comment #7 from Yuan Ren
Was corosync rebuilt after this change? Downloaded package still contains unconditional "rm /etc/sysconfig/corosync". You should check whether this is final uninstall or update before removing file.
Also
if [ ! -e %{_sysconfdir}/sysconfig/corosync ]; then %fillup_only -n corosync fi
This is wrong. It means /etc/sysconfig/corosync will miss any changes in updated package (i.e. any new parameter won't appear in /etc/sysconfig/corosync). Yes, that's what I want. Because some users want to keep the original sysconfig.corosync after the update. But the problem now is it will be deleted after update based on installed in
Not push to Factory, I still test in my home repo. So, it's already updated in https://build.opensuse.org/package/show/home:yuanren10/Corosync-2_4_5 previous. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c8
--- Comment #8 from Andrei Borzenkov
Not push to Factory, I still test in my home repo.
Of course I downloaded from your home repo.
Also
if [ ! -e %{_sysconfdir}/sysconfig/corosync ]; then %fillup_only -n corosync fi
This is wrong. It means /etc/sysconfig/corosync will miss any changes in updated package (i.e. any new parameter won't appear in /etc/sysconfig/corosync). Yes, that's what I want. Because some users want to keep the original sysconfig.corosync after the update.
You probably misunderstand what fillup does. It is not supposed to overwrite user changes, only merge new content. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c9
--- Comment #9 from Yuan Ren
(In reply to Yuan Ren from comment #7)
You probably misunderstand what fillup does. It is not supposed to overwrite user changes, only merge new content.
Yes, I understand. The problem caused by inherited "rm /etc/sysconfig/corosync" from the previous corosync package, rather than some system-rpm-macro wrong used. (https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#orderi...) could be a nice reference. Using "%fillup_only" can keep the original configured "/etc/sysconfig/corosync" reuse firstly(bsc#1153502 is one of this case). So "%fillup_only" use is the right way. So, I decided to add some scripts to make sure sysconfig reinstalled after the upgrade because "rm /etc/sysconfig/corosync" already existed in the previous corosync version. Thanks for helping get from Roger and Andrei. Bests, Yuan -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c10
--- Comment #10 from Andrei Borzenkov
So, I decided to add some scripts to make sure sysconfig reinstalled after the upgrade because
%post /usr/lib/corosync/upgrade.sh %{fillup_only -n corosync} # restore configured /etc/sysconfig/corosync(bsc#1155792) mv /etc/sysconfig/corosync /etc/sysconfig/corosync_bak This unconditionally deletes /etc/sysconfig/corosync. Why bother to call fillup in the first place? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c11
--- Comment #11 from Yuan Ren
%post /usr/lib/corosync/upgrade.sh %{fillup_only -n corosync} # restore configured /etc/sysconfig/corosync(bsc#1155792) mv /etc/sysconfig/corosync /etc/sysconfig/corosync_bak
This unconditionally deletes /etc/sysconfig/corosync. Why bother to call fillup in the first place?
If the corosync is installed the first time rather than from the upgrade? And It does not delete/etc/sysconfig/corosync, just to make a copy to prevent "rm /etc/sysconfig/corosync" from previous RPM version. Latter will use %posttrans to recover. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c12
--- Comment #12 from Yuan Ren
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792
http://bugzilla.opensuse.org/show_bug.cgi?id=1155792#c13
Yuan Ren
participants (1)
-
bugzilla_noreply@novell.com