rabbitmqadmin shows %%VSN%% as version in Ubuntu

95 views
Skip to first unread message

alvin tang

unread,
Jun 25, 2019, 10:19:46 PM6/25/19
to rabbitmq-users
Hello!

This bug is reported in Ubuntu for rabbitmq-server package:


[Original Report]
When running 'rabbitmqadmin --version' it shows %%VSN%% as the version information on Ubuntu 18.04 and not the correct rabbitmq version.

Looking into rabbitmq_management/Makefile it seems that it is prepared to replace the %%VSN%% string with the correct project version via sed during make using the prepare-dist target. When building package, this target is not triggered, is that the expected case?

I proposed a fix for this by adding a target all in the Makefile to change the %%VSN%% string in the rabbitmq_management/bin/rabbitmqadmin file itself via sed. I attached the patch I proposed to Ubuntu and quoted the change below as well. Is this an acceptable fix?

++++ rabbitmq-server-3.6.10/deps/rabbitmq_management/Makefile
+@@ -40,6 +40,9 @@ include erlang.mk
+ # Distribution.
+ # --------------------------------------------------------------------
+
++all::
++    $(verbose) sed -i 's/%%VSN%%/$(PROJECT_VERSION)/' bin/rabbitmqadmin
++
+ list-dist-deps::
+     @echo bin/rabbitmqadmin
 
Thank you so much for your help!

All the best,
Alvin
3-1.0-1ubuntu2.debdiff

Luke Bakken

unread,
Jun 26, 2019, 11:39:54 AM6/26/19
to rabbitmq-users
Hi Alvin,

I don't think this is an issue with the packages that the RabbitMQ team provides. First of all, you're using a very old version of RabbitMQ (3.6.10) whereas the latest version is 3.7.15. Here's what I did:

I used the attached Vagrantfile to install Erlang and RabbitMQ on Ubuntu 18.

I then enabled the rabbitmq_management plugin via rabbitmq-plugins enable rabbitmq_management

Then, locate the rabbitmqadmin file that is deployed as part of the RabbitMQ package:

/var/lib/rabbitmq/mnesia/rabbit@UBUNTU-18-plugins-expand/rabbitmq_management-3.7.15/priv/www/cli/rabbitmqadmin

Then, get the version:

root@UBUNTU-18:~# python /var/lib/rabbitmq/mnesia/rabbit@UBUNTU-18-plugins-expand/rabbitmq_management-3.7.15/priv/www/cli/rabbitmqadmin --version
rabbitmqadmin 3.7.15

So, as you can see, when we build our packages, the prepare-dist target is called correctly. There must be some other issue.

Thanks -
Luke
Vagrantfile

alvin tang

unread,
Jul 1, 2019, 9:57:13 PM7/1/19
to rabbitmq-users
Alright, thank you very much for the clarifications. I'll look into other possible issues.

Bryce Harrington

unread,
Jul 3, 2019, 2:58:21 PM7/3/19
to rabbitmq-users
The release tarball archives posted at, for example, https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.15/, which the vagrant file you point to uses, contains this code for rabbitmqadmin:

./deps/rabbitmq_management/bin/rabbitmqadmin:VERSION = '%%VSN%%'

So is it intentional that the upstream release process does not set the version number in this file?
I would expect that a target named 'prepare-dist' to be run as part of the archive creation process, but is that not the case here?

Bryce

Luke Bakken

unread,
Jul 8, 2019, 10:09:05 AM7/8/19
to rabbitmq-users
Hi Bryce,

> which the vagrant file you point to uses

No, the Vagrantfile uses the .deb package available at that location since the provisioning script uses apt to install RabbitMQ

I think you're referring to this link ...


That archive just contains the source code used to compile RabbitMQ release packages and does not have any version set within it, since the version is set at compile / packaging time.

I have no idea how Ubuntu creates their rabbitmq-server package. If someone provides that information it would be helpful.

Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages