summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-03-13 14:39:03 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-05-27 12:08:54 +0200
commit7f465e693cd7fceefb284a0b3831504fd2ddbeb4 (patch)
tree344afed5165a89984a4aa5994fe387000fd7ddf4
parent8cde6f0d6e6b43c83f192ff8c1ff6107fa0736aa (diff)
downloadfreeipa-7f465e693cd7fceefb284a0b3831504fd2ddbeb4.tar.gz
freeipa-7f465e693cd7fceefb284a0b3831504fd2ddbeb4.tar.xz
freeipa-7f465e693cd7fceefb284a0b3831504fd2ddbeb4.zip
ipalib.version: Add VENDOR_VERSION
This will allow us to make vendors' lives easier by embedding a vendor tag to installation logs. Part of the work for: https://fedorahosted.org/freeipa/ticket/4219 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r--Makefile3
-rw-r--r--freeipa.spec.in8
-rw-r--r--ipapython/version.py.in3
3 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ee10e3aa7..918c8e7f3 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,8 @@ endif # beta
endif # pre
endif # ipa_version
+IPA_VENDOR_VERSION=$(IPA_VERSION)$(IPA_VENDOR_VERSION_SUFFIX)
+
TARBALL_PREFIX=freeipa-$(IPA_VERSION)
TARBALL=$(TARBALL_PREFIX).tar.gz
@@ -133,6 +135,7 @@ version-update: release-update
sed -e s/__NUM_VERSION__/$(IPA_NUM_VERSION)/ install/ui/src/libs/loader.js.in \
> install/ui/src/libs/loader.js
perl -pi -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" ipapython/version.py
+ perl -pi -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" ipapython/version.py
perl -pi -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" ipapython/version.py
touch -r ipapython/version.py.in ipapython/version.py
sed -e s/__VERSION__/$(IPA_VERSION)/ daemons/ipa-version.h.in \
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 23f3737cf..7ed989ec3 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -360,8 +360,10 @@ export SUPPORTED_PLATFORM=fedora18
export SUPPORTED_PLATFORM=fedora16
%endif
%endif
+
# Force re-generate of platform support
-rm -f ipapython/services.py
+export IPA_VENDOR_VERSION_SUFFIX=-%{release}
+rm -f ipapython/services.py ipapython/version.py
make version-update
cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
%if ! %{ONLY_CLIENT}
@@ -389,7 +391,9 @@ export SUPPORTED_PLATFORM=fedora16
%endif
%endif
# Force re-generate of platform support
-rm -f ipapython/services.py
+export IPA_VENDOR_VERSION_SUFFIX=-%{release}
+rm -f ipapython/services.py ipapython/version.py
+make version-update
%if ! %{ONLY_CLIENT}
make install DESTDIR=%{buildroot}
%else
diff --git a/ipapython/version.py.in b/ipapython/version.py.in
index 04cf5f81f..74ee3b31a 100644
--- a/ipapython/version.py.in
+++ b/ipapython/version.py.in
@@ -20,6 +20,9 @@
# The full version including strings
VERSION="__VERSION__"
+# A fuller version including the vendor tag (e.g. 3.3.3-34.fc20)
+VENDOR_VERSION="__VENDOR_VERSION__"
+
# Just the numeric portion of the version so one can do direct numeric
# comparisons to see if the API is compatible.