-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows-exe: optional sections in silent (/S) mode, bug fixes #15
Conversation
1. Command line controlled optional sections (Start Menu, Service Install, Service Run) - /NOSTARTMENU /NOSERVICEINSTALL /NOSERVICERUN command line flags 2. Move "Start RabbitMQ service" step to final window. 3. Check rabbitmq-service.bat exit code (and fail on error) 4. Use RABBITMQ_BASE, RABBITMQ_LOG_BASE, RABBITMQ_MNESIA_BASE and RABBITMQ_PLUGINS_DIR from environment - to put files (plugins, config) in right place and create right shortcuts) 5. Fix Erlang version check (compare right versions interval) 6. Unicode false - for makensis.exe >=3.07
The changed file is identical in all other branches (3.8.x, 3.9.x, 3.10.x) except 2 Pivotal/VMWare diffs in 3.8.x (which also should be fixed, imho). So, after this one will be approved, it can (and should) be easily picked to all other branches. The only difference is master, 3.10.x: 3.8.x, 3.9.x: |
Thank you! I'll find time within the next week or two to build and test an installer with these changes. |
@lukebakken and what about other branches? Or you prefer me to prepare 3 more almost identical PRs already? |
We will take care of back porting, no need to submit multiple identical PRs. |
@lukebakken @michaelklishin can you schedule PR review and testing, please? |
I will get to this today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is how I built the installer:
cd development/rabbitmq/rabbitmq-server
lbakken@shostakovich ~/development/rabbitmq/rabbitmq-server (master =)
$ ls ../rabbitmq-packaging/
common debs Makefile RPMS windows windows-exe
Note that the above clone is a branch with your master
branch merged in.
Here is the command I ran and the end of the output
make FULL=1 RABBITMQ_PACKAGING_REPO="/home/lbakken/development/rabbitmq/rabbitmq-packaging" UNIX_TO_DOS=unix2dos package-windows
End of output:
make -C windows-exe SOURCE_DIST_FILE="/home/lbakken/development/rabbitmq/rabbitmq-server/PACKAGES/rabbitmq-server-3.8.10+1443.gf95d2ba.tar.xz" PACKAGES_DIR="/home/lbakken/development/rabbitmq/PACKAGES" SIGNING_KEY="" all clean
make[2]: Entering directory '/home/lbakken/development/rabbitmq/rabbitmq-packaging/windows-exe'
sed \
-e 's|%%VERSION%%|3.8.10+1443.gf95d2ba|' \
-e 's|%%PRODUCT_VERSION%%|3.8.10.0|' \
rabbitmq_nsi.in > rabbitmq-3.8.10+1443.gf95d2ba.nsi
unzip -q /home/lbakken/development/rabbitmq/PACKAGES/rabbitmq-server-windows-3.8.10+1443.gf95d2ba.zip
makensis -V2 rabbitmq-3.8.10+1443.gf95d2ba.nsi
!insertmacro: macro "_If" requires 4 parameter(s), passed 3!
Error in script "rabbitmq-3.8.10+1443.gf95d2ba.nsi" on line 389 -- aborting creation process
make[2]: *** [Makefile:19: dist] Error 1
make[2]: Leaving directory '/home/lbakken/development/rabbitmq/rabbitmq-packaging/windows-exe'
make[1]: *** [Makefile:102: package-windows] Error 2
make[1]: Leaving directory '/home/lbakken/development/rabbitmq/rabbitmq-packaging'
make: *** [Makefile:392: package-windows] Error 2
NSIS version:
lbakken@shostakovich ~/development/rabbitmq/rabbitmq-server (master =)
$ pacman -Qi nsis
Name : nsis
Version : 3.08-1
Description : A professional open source system to create Windows installers
Architecture : x86_64
URL : http://nsis.sourceforge.net
Licenses : custom:zlib
Groups : None
Provides : None
Depends On : gcc-libs
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 8.57 MiB
Packager : Martchus <martchus@gmx.net>
Build Date : Thu 07 Oct 2021 05:58:43 AM PDT
Install Date : Thu 07 Oct 2021 12:55:23 PM PDT
Install Reason : Explicitly installed
Install Script : No
Validated By : SHA-256 Sum
@lukebakken I couldn't decide what should be the Erlang version upper limit, and finally left it invalid 😢 I fixed it now to support I think, it should exactly match the RabbitMQ and Erlang/OTP Compatibility Matrix, and it also must be updated together with this document (every new supported Erlang/OTP version). So, to support Erlang/OTP up to |
@lukebakken you may also prefer to keep |
@inikulshin that's actually fine and what we ended up doing for various reasons for our RPM and Debian packages. I have a minor naming request before this can go in, through. Can we rename |
@michaelklishin ok. But, note that the valid range is |
@inikulshin we don't use ERTS versions in any other package. I'd much prefer actual OTP release versions, since that's what you see or pin when you provision Erlang. |
@michaelklishin initially, I refactored and fixed Erlang version compare code just because I saw a very old |
@michaelklishin |
@inikulshin It means Very soon it will be |
I just returned from vacation and will re-test this week. Thanks. |
Thanks, I just built an installer successfully. I'll begin testing in more depth tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inikulshin there seems to be an issue with extracting to the plugins/
sub-directory of the installation directory. Please see the following transcript of env var I set (RABBITMQ_BASE
) and installation:
My guess is that this commit will fix the plugins issue - 0f5758b @inikulshin FYI the way you have forked this repository and patched In the future, our preferred workflow is:
If I were to then need to make minor changes, I could just push them directly to your fork. As it stands, you have to apply my commit 0f5758b manually or cherry-pick it. EDIT: Yes, commit 0f5758b does fix the issue. Please apply it to your repository:
|
Great, with the latest changes the following installs correctly:
I can start RabbitMQ via I'll continue testing tomorrow. |
@inikulshin this is likely related. I have noticed that Windows package builds have started failing with
Do you know what'd be the right way to address it? |
We will revert this PR until the above issue is addressed as a Windows package build failure blocks our pipelines. |
This reverts commit cb16535. With the above changes, `makensis' fails with ``` makensis -V2 rabbitmq-3.11.0-alpha.34.nsi !insertmacro: macro "FUNCTION_STRING_StrTok" requires 0 parameter(s), passed 5! Error in script "rabbitmq-3.11.0-alpha.34.nsi" on line 388 -- aborting creation process ```
This reverts commit c295e25. With the above changes, `makensis' fails with ``` makensis -V2 rabbitmq-3.11.0-alpha.34.nsi !insertmacro: macro "FUNCTION_STRING_StrTok" requires 0 parameter(s), passed 5! Error in script "rabbitmq-3.11.0-alpha.34.nsi" on line 388 -- aborting creation process ```
@michaelklishin which makensis version are you using for this build? |
It seems to be |
Ah, I tested with
|
That is only available in Debian Bookworm. Upgrading our pipelines to use it may not be possible in the short term. |
@lukebakken @inikulshin would it be possible to polish this to be |
I'll see if I can modify this PR for nsis 3.04. @inikulshin give it a try if you have time. |
@inikulshin if you'd like to build a docker image to build the windows installer using pretty much the same process we do, check this out - https://github.com/lukebakken/rabbitmq-packaging-15 |
@michaelklishin, good news, updating to Bullseye appears to resolve the issue since NSIS
I'll open a new PR with @inikulshin's changes. |
This reverts commit 3c4e52b.
This reverts commit 85ad8f6.
@michaelklishin all set with two new PRs. @inikulshin 's changes are in |
/NOSTARTMENU
/NOSERVICEINSTALL
/NOSERVICERUN
command line flagsRABBITMQ_BASE
,RABBITMQ_LOG_BASE
,RABBITMQ_MNESIA_BASE
andRABBITMQ_PLUGINS_DIR
from environment - to put files (plugins, config) in right place and create right shortcuts)Unicode false
- for makensis.exe >=3.07