| Summary: | %rename macro mismatch | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Giuseppe Ghibò <ghibomgx> |
| Component: | RPM Packages | Assignee: | Thierry Vignaud <thierry.vignaud> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | jani.valimaa, pterjan |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | rpm-mageia-setup-2.56-2.mga8.src.rpm | CVE: | |
| Status comment: | |||
| Attachments: |
patch to fix the %rename macro in rpm-mageia-setup
makes it take an optional 2nd argument in order to set the obsolete VR in stone |
||
Looking deeper, this macro is not part of rpm package but rather of the package rpm-mageia-setup. Source RPM:
rpm-4.16.0-0.beta1.4.mga8.src.rpm =>
rpm-mageia-setup-2.56-2.mga8.src.rpm I attach a patch for the fix. Created attachment 11703 [details]
patch to fix the %rename macro in rpm-mageia-setup
going back to here: https://gitweb.mageia.org/software/rpm/rpm-setup/commit/?id=73f9d115e69ab000a2fa4fadd3b4bf31f4c94534 and here: https://gitweb.mageia.org/software/rpm/rpm-setup/commit/?id=5172a8d2bcd354f2d0dcaf8d804ac5bdb0932dc9 I've never liked the whole %rename macro and I would drop it. I don't think anyone else than we and omdv are using it. I don't like the idea that version and release it's using are variables. It's better to use fixed version and release in obsoletes so it gives an idea when the obsoletes was added. But if we are going to fix something in it, we should also stop to add epoch 0 if epoch isn't defined. CC:
(none) =>
jani.valimaa The omv version of %rename, is the one of 2006, without the %epoch change. RH/FC and Suse have not defined it. Actually the %rename macro is used in the following 73 packages: avidemux baloo broadcom-wl caja-beesu caja-extensions celt cross-mipsel-binutils cudf db52 db53 digikam dolphin engrampa exfatprogs fglrx file ghostscript gnu-free-fonts gtk4.0 hunspell-et igal2 isl kactivities kernel kernel-540-joeghi kernel-firmware kernel-firmware-nonfree kernel-joeghi kfilemetadata krunner ktexteditor libglvnd libkdcraw libkexiv2 libkgeomap libkolab libkscreen libutempter maelstrom mate-applets mesa motif npth nvidia304 nvidia340 nvidia-current ocaml-migrate-parsetree ocaml-sexplib ocaml-sqlite3 ocs-url paraview perl perl-DelimMatch perl-Dist-Zilla-Role-File-ChangeNotification perl-Reaper plasma-nm pluma python qt4 qt5-fsarchiver rpm-mageia-setup spyder sysvinit-legacy telepathy-kde-accounts-kcm texlive texmacs texstudio usbredir x11-server xcb-util-image xcb-util-keysyms xz zziplib Thank you Giuseppe for the report, and wealth of very expert comment. Why not join us? https://wiki.mageia.org/en/Becoming_a_Mageia_Packager Assigning to tv for rpm-mageia-setup. Assignee:
bugsquad =>
thierry.vignaud That's not broken as rpmlib ignores self obsoletes (unless you can show a real world issue…) Resolution:
(none) =>
INVALID pterjan found this problem in the BS, for libglvd-1.3.1-6.mga8 (it creates the obsoletes causing the package to be immediately removed).
Giuseppe Ghibò
2020-06-19 20:03:57 CEST
CC:
(none) =>
pterjan Yes youri removes obsoleted packages after upload, even if they just got added. And I also agree with Jani in disliking that macro, mostly for the same reason that it causes a moving obsoletes rather than using a fixed evr at which the rename happened. Wouldn''t that be a bug in youri then? But ok we can fix the macro anyway. Done in git. About the second issue, it could maybe take a second argument to use and if not provided, fallback to EVR Resolution:
INVALID =>
FIXED Created attachment 11711 [details]
makes it take an optional 2nd argument in order to set the obsolete VR in stone
|
It seems that the %rename macro in current rpm is broken. Actually (you can check with rpm --eval %rename), it's shown as: Obsoletes: %{1} <= 0:%{version}-%{release} Provides: %{1} = 0:%{version}-%{release} which should instead be: Obsoletes: %{1} < 0:%{version}-%{release} Provides: %{1} = 0:%{version}-%{release} because in the first case the "<=" would tell that the new package will obsoletes itself. Also the rpm from mga7 (rpm-4.14.3-1.mga7) seems affected by the same problem.