RPM compilation with XB_VERSION_EXTRA creates a strange RPM version

Bug #1467424 reported by Julien Pivotto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Medium
Tomislav Plavcic
2.1
Invalid
Undecided
Unassigned
2.2
Fix Released
Medium
Tomislav Plavcic
2.3
Fix Released
Medium
Tomislav Plavcic

Bug Description

Context: we are building a RPM of Xtrabackup with our own patch

in the code:

if [ -z "${XB_VERSION_EXTRA:-}" ]; then
  EXTRAVER="%{nil}"
  RPM_EXTRAVER=1
else
  EXTRAVER=${XB_VERSION_EXTRA}
  RPM_EXTRAVER=.${XB_VERSION_EXTRA#-}
fi

if we set XB_VERSION_EXTRA to -foo1

it creates percona-xtrabackup-debuginfo-2.2.11-.foo1.el7.centos.x86_64.rpm. There is a extra dot.

Revision history for this message
Julien Pivotto (roidelapluie) wrote :
summary: - RPM compilation with a extraversion creates a strange RPM version
+ RPM compilation with XB_VERSION_EXTRAcreates a strange RPM version
summary: - RPM compilation with XB_VERSION_EXTRAcreates a strange RPM version
+ RPM compilation with XB_VERSION_EXTRA creates a strange RPM version
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

This is easy to confirm:

[openxs@chief percona-xtrabackup-2.2]$ grep -rn XB_VERSION_EXTRA *
cmake/mysql_version.cmake:72: MYSQL_GET_CONFIG_VALUE("XB_VERSION_EXTRA" XB_EXTRA_VERSION XB_VERSION)
storage/innobase/xtrabackup/utils/build-rpm.sh:100:XTRABACKUP_VERSION="${XB_VERSION_MAJOR}.${XB_VERSION_MINOR}.${XB_VERSION_PATCH}${XB_VERSION_EXTRA}"
storage/innobase/xtrabackup/utils/build-rpm.sh:140:if [ -z "${XB_VERSION_EXTRA:-}" ]; then
storage/innobase/xtrabackup/utils/build-rpm.sh:144: EXTRAVER=${XB_VERSION_EXTR }
storage/innobase/xtrabackup/utils/build-rpm.sh:145: RPM_EXTRAVER=.${XB_VERSION_EXTRA#-}
storage/innobase/xtrabackup/utils/build-rpm.sh:149:sed -i "s:@@XB_VERSION_EXTRA@@:${EXTRAVER}:g" SPECS/percona-xtrabackup.spec
storage/innobase/xtrabackup/utils/build-binary.sh:83:XTRABACKUP_VERSION="${XB_VERSION_MAJOR}.${XB_VERSION_MINOR}.${XB_VERSION_PATCH}${XB_VERSION_EXTRA}"
storage/innobase/xtrabackup/utils/percona-xtrabackup.spec:4:%define xb_version_extra @@XB_VERSION_EXTRA@@
storage/innobase/xtrabackup/utils/build-dpkg.sh:48:XTRABACKUP_VERSION="${XB_VERSION_MAJOR}.${XB_VERSION_MINOR}.${XB_VERSION_PATCH}${XB_VERSION_EXTRA}"
XB_VERSION:4:XB_VERSION_EXTRA=
[openxs@chief percona-xtrabackup-2.2]$

We can clearly see that extra dot for RPM_EXTRAVER.

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Not valid for 2.1

nilnandan.joshi@bm-support01:~/percona-xtrabackup-2.1.9$ grep -rn XB_VERSION_EXTRA *
nilnandan.joshi@bm-support01:~/percona-xtrabackup-2.1.9$

Changed in percona-xtrabackup:
status: New → Confirmed
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-730

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.