[Bug 1773324] Re: [SRU] rabbitmqadmin shows %%VSN%% as version
Bryce Harrington
1773324 at bugs.launchpad.net
Wed Jul 3 17:47:09 UTC 2019
Hi Alvin, have you had a chance to test out their packaging approach
yet? I'm really curious why it would work where ours doesn't, and
despite digging through it this morning am still perplexed.
I dug through their packaging to try and understand why it works where
ours doesn't, but didn't spot anything obvious. I verified we're using
the same orig.tar.xz archive as provided by them:
3b2e7514a016a81859443723f6be514b ../upstream/rabbitmq-server-3.6.10.tar.xz
3b2e7514a016a81859443723f6be514b ../bionic/rabbitmq-server_3.6.10.orig.tar.xz
But we can see the %%VSN%% is not substituted in the production of these
archives:
upstream/rabbitmq-server-3.6.10$ grep -sr %%VSN *
deps/rabbitmq_management/Makefile: $(verbose) sed 's/%%VSN%%/$(PROJECT_VERSION)/' bin/rabbitmqadmin
deps/rabbitmq_management/bin/rabbitmqadmin:VERSION = '%%VSN%%'
You can see this is still true in the 3.7.9 package:
https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.9/
rabbitmq-server-3.7.9$ grep %%VSN -sr .
./deps/rabbitmq_management/Makefile: $(verbose) sed 's/%%VSN%%/$(PROJECT_VERSION)/' bin/rabbitmqadmin \
./deps/rabbitmq_management/bin/rabbitmqadmin:VERSION = '%%VSN%%'
Normally, like with C++ projects, the 'dist' target is what you run to
create the release tarball, so is only pertinent to upstream and not
supposed to be used for debian packaging. From the name, I would expect
this same to be true with a target named 'prepare-dist' as well.
Indeed, digging through their makefiles I found this comment:
# If the application's Makefile defines a `list-dist-deps` target, we
# use it to populate the dependencies list. This is useful when the
# application has also a `prepare-dist` target to modify the created
# tree before we make an archive out of it.
That makes me think that their intention is indeed that prepare-dist is
intended to run *prior* to making the archive (i.e. tarball) of it. But
since rabbitmqadmin still shows %%VSN%% for version in the rabbitmqadmin
script from the tarball posted on rabbitmq's website, I don't know if
it's just a bug in the release process, or if I've misunderstood
something.
I wondered if perhaps the `rabbitmq-plugins enable rabbitmq_management`
they mention does a VSN substitution, however in reviewing that code I
didn't see a step that does that.
It would be useful to know if upstream intends for the rabbitmqadmin in
their release tarballs to have %%VSN%% as the value for VERSION, or if
that should be showing the actual version number. Assuming the former,
then question #2 is whether they intend the prepare-dist target to be
used in the production of the release archive (e.g. like in a
traditional 'make dist'), or if that is intended to be run by the
packager/user (e.g. like as part of the 'make && make install' step).
I hope what I've written is sensible.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to rabbitmq-server in Ubuntu.
https://bugs.launchpad.net/bugs/1773324
Title:
[SRU] rabbitmqadmin shows %%VSN%% as version
Status in rabbitmq-server package in Ubuntu:
Triaged
Status in rabbitmq-server source package in Bionic:
Triaged
Status in rabbitmq-server source package in Cosmic:
Triaged
Status in rabbitmq-server source package in Disco:
Triaged
Status in rabbitmq-server source package in Eoan:
Triaged
Bug description:
[Impact]
Version information is displayed by rabbitmq-server, preventing configuration management tools from deploying and maintaining the services properly.
[Test Case]
$ rabbitmqadmin --version
rabbitmqadmin %%VSN%%
[Regression Potential]
Very low. The patch simply adds a step to the makefile. Things to look for would be build-time related problems; none are expected.
[Fix]
Upstream's release scripts substitute in the version string, but that logic isn't triggered during the regular debian package build. It's straightforward to fix by inserting an equivalent sed command to the makefile during our build.
This issue affects rabbitmq-server from Bionic forward, and will need
carried in our own packaging. The fix may be worth forwarding to
debian as well, once it's confirmed their package is affected as well.
For testing, a PPA with packages containing the fix is available at:
https://launchpad.net/~bryce/+archive/ubuntu/sru.1773324
[Discussion]
[Original Report]
When running 'rabbitmqadmin --version' it shows %%VSN%% as the version information on Ubuntu 18.04 and not the correct rabbitmq version. We are using puppet to install and configure rabbitmq server and the puppet-rabbitmq modules [1] are using the version information from that command internally. Currently they are failing in Ubuntu 18.04.
Used versions:
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
rabbitmq-server: 3.6.10-1
[1] https://github.com/voxpupuli/puppet-rabbitmq
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: rabbitmq-server 3.6.10-1
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
Date: Fri May 25 09:46:18 2018
PackageArchitecture: all
SourcePackage: rabbitmq-server
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.default.rabbitmq-server: [modified]
mtime.conffile..etc.default.rabbitmq-server: 2018-05-24T07:06:38.256492
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/1773324/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list