diff options
author | Philip Kuryloski <kuryloskip@vmware.com> | 2021-02-26 11:49:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 11:49:58 +0100 |
commit | d8188839a20c7179dd552b25f19c3b87794e8ed2 (patch) | |
tree | 6fd546c4a1f4cb76be84eff26c623881fd1c8b4c | |
parent | 9f0bec8def6c43c13fc654262dd0ed671b924982 (diff) | |
parent | a3cfac3232ac84369f6b58cb51322e3517ea1559 (diff) | |
download | rabbitmq-server-git-d8188839a20c7179dd552b25f19c3b87794e8ed2.tar.gz |
Merge pull request #2849 from rabbitmq/rabbitmq-server-2848
Restore `make package-rpm-rhel7`
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | packaging/Makefile | 78 | ||||
-rw-r--r-- | packaging/debs/apt-repository/Makefile | 31 | ||||
-rw-r--r-- | packaging/debs/apt-repository/README | 17 | ||||
-rw-r--r-- | packaging/debs/apt-repository/README-real-repository | 130 | ||||
-rw-r--r-- | packaging/debs/apt-repository/distributions | 7 | ||||
-rw-r--r-- | packaging/debs/apt-repository/dupload.conf | 16 | ||||
-rw-r--r-- | packaging/windows-exe/Makefile | 36 | ||||
-rw-r--r-- | packaging/windows-exe/plugins/ExecDos.dll | bin | 6656 -> 0 bytes | |||
-rwxr-xr-x | packaging/windows-exe/plugins/ShellLink.dll | bin | 4608 -> 0 bytes | |||
-rw-r--r-- | packaging/windows-exe/rabbitmq.ico | bin | 4286 -> 0 bytes | |||
-rw-r--r-- | packaging/windows-exe/rabbitmq_nsi.in | 299 | ||||
-rw-r--r-- | packaging/windows/Makefile | 66 | ||||
-rw-r--r-- | packaging/windows/README-etc | 7 |
14 files changed, 18 insertions, 686 deletions
@@ -353,15 +353,28 @@ clean-unpacked-source-dist: # archive. PACKAGES_SOURCE_DIST_FILE ?= $(firstword $(SOURCE_DIST_FILES)) -packages package-deb package-rpm \ +RABBITMQ_PACKAGING_TARGETS = package-deb package-rpm \ package-rpm-redhat package-rpm-fedora package-rpm-rhel6 package-rpm-rhel7 \ package-rpm-rhel8 package-rpm-suse package-rpm-opensuse package-rpm-sles11 \ -package-windows \ +package-windows + +ifneq ($(filter $(RABBITMQ_PACKAGING_TARGETS),$(MAKECMDGOALS)),) +ifeq ($(RABBITMQ_PACKAGING_REPO),) +$(error Cannot find rabbitmq-packaging repository dir; please clone from rabbitmq/rabbitmq-packaging and specify RABBITMQ_PACKAGING_REPO) +endif +endif + +$(RABBITMQ_PACKAGING_TARGETS): $(PACKAGES_SOURCE_DIST_FILE) + $(verbose) $(MAKE) -C $(RABBITMQ_PACKAGING_REPO) $@ \ + SOURCE_DIST_FILE=$(abspath $(PACKAGES_SOURCE_DIST_FILE)) + package-generic-unix \ docker-image: $(PACKAGES_SOURCE_DIST_FILE) $(verbose) $(MAKE) -C packaging $@ \ SOURCE_DIST_FILE=$(abspath $(PACKAGES_SOURCE_DIST_FILE)) +packages: package-deb package-rpm package-windows package-generic-unix + # -------------------------------------------------------------------- # Installation. # -------------------------------------------------------------------- diff --git a/packaging/Makefile b/packaging/Makefile index 47253dcb7f..619ad522e7 100644 --- a/packaging/Makefile +++ b/packaging/Makefile @@ -1,45 +1,11 @@ -# Platform detection. - -ifeq ($(PLATFORM),) -UNAME_S := $(shell uname -s) - -ifeq ($(UNAME_S),Linux) -PLATFORM = linux -else ifeq ($(UNAME_S),Darwin) -PLATFORM = darwin -else ifeq ($(UNAME_S),SunOS) -PLATFORM = solaris -else ifeq ($(UNAME_S),GNU) -PLATFORM = gnu -else ifeq ($(UNAME_S),FreeBSD) -PLATFORM = freebsd -else ifeq ($(UNAME_S),NetBSD) -PLATFORM = netbsd -else ifeq ($(UNAME_S),OpenBSD) -PLATFORM = openbsd -else ifeq ($(UNAME_S),DragonFly) -PLATFORM = dragonfly -else ifeq ($(shell uname -o),Msys) -PLATFORM = msys2 -else -$(error Unable to detect platform. Please open a ticket with the output of uname -a.) -endif -endif - -all: packages +all: package-generic-unix @: # -------------------------------------------------------------------- # Packaging. # -------------------------------------------------------------------- -.PHONY: packages package-deb \ - package-rpm \ - package-rpm-redhat package-rpm-fedora \ - package-rpm-rhel6 package-rpm-rhel7 package-rpm-rhel8 \ - package-rpm-suse package-rpm-opensuse package-rpm-sles11 \ - package-windows \ - package-generic-unix \ +.PHONY: package-generic-unix \ docker-image \ docker-image-push @@ -69,44 +35,6 @@ VARS = SOURCE_DIST_FILE="$(abspath $(SOURCE_DIST_FILE))" \ PACKAGES_DIR="$(abspath $(PACKAGES_DIR))" \ SIGNING_KEY="$(SIGNING_KEY)" -packages: package-deb package-rpm package-windows package-generic-unix - @: - -package-deb: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C debs/Debian $(VARS) all $(DO_CLEAN) - -package-rpm: package-rpm-redhat package-rpm-suse - @: - -# FIXME: Why not package-rpm-fedora? -package-rpm-redhat: package-rpm-rhel6 package-rpm-rhel7 package-rpm-rhel8 - @: - -package-rpm-fedora: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) all $(DO_CLEAN) - -package-rpm-rhel6: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=rhel6 all $(DO_CLEAN) - -package-rpm-rhel7: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=rhel7 all $(DO_CLEAN) - -package-rpm-rhel8: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=rhel8 all $(DO_CLEAN) - -package-rpm-suse: package-rpm-opensuse package-rpm-sles11 - @: - -package-rpm-opensuse: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=opensuse all $(DO_CLEAN) - -package-rpm-sles11: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=sles11 all $(DO_CLEAN) - -package-windows: $(SOURCE_DIST_FILE) - $(gen_verbose) $(MAKE) -C windows $(VARS) all $(DO_CLEAN) - $(verbose) $(MAKE) -C windows-exe $(VARS) all $(DO_CLEAN) - package-generic-unix: $(SOURCE_DIST_FILE) $(gen_verbose) $(MAKE) -C generic-unix $(VARS) all $(DO_CLEAN) @@ -119,6 +47,6 @@ docker-image-push: .PHONY: clean clean: - for subdir in debs/Debian RPMS/Fedora windows windows-exe generic-unix docker-image; do \ + for subdir in generic-unix docker-image; do \ $(MAKE) -C "$$subdir" clean; \ done diff --git a/packaging/debs/apt-repository/Makefile b/packaging/debs/apt-repository/Makefile deleted file mode 100644 index dbf8871a51..0000000000 --- a/packaging/debs/apt-repository/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -PACKAGES_DIR ?= ../../../PACKAGES -REPO_DIR ?= debian - -SIGNING_KEY ?= default - -ifeq "$(UNOFFICIAL_RELEASE)" "" -HOME_ARG = HOME=$(GNUPG_PATH) -endif - -all: debian_apt_repository - -clean: - rm -rf $(REPO_DIR) - -CAN_HAS_REPREPRO=$(shell [ -f /usr/bin/reprepro ] && echo true) -ifeq ($(CAN_HAS_REPREPRO), true) -debian_apt_repository: clean - mkdir -p $(REPO_DIR)/conf - cp -a distributions $(REPO_DIR)/conf -ifeq "$(UNOFFICIAL_RELEASE)" "" - echo SignWith: $(SIGNING_KEY) >> $(REPO_DIR)/conf/distributions -endif - for FILE in $(PACKAGES_DIR)/*.changes ; do \ - $(HOME_ARG) reprepro --ignore=wrongdistribution \ - -Vb $(REPO_DIR) include kitten $${FILE} ; \ - done - reprepro -Vb $(REPO_DIR) createsymlinks -else -debian_apt_repository: - @echo Not building APT repository as reprepro could not be found -endif diff --git a/packaging/debs/apt-repository/README b/packaging/debs/apt-repository/README deleted file mode 100644 index 514a37f33e..0000000000 --- a/packaging/debs/apt-repository/README +++ /dev/null @@ -1,17 +0,0 @@ -APT repository for RabbitMQ - -Previously we've attempted to run a repository in the same way that -Debian would: have repository management software installed on the -server, and upload new packages to the repository as and when they're -ready. - -This turned out to be both fiddly and annoying to do (and more -particularly to automate) so since our repository is always going to be -small it's easier just to create the entire repository as part of the -build process, just like a package. It can then be moved into place as a -single unit. The make target "debian_apt_repository" (invoked by "dist") -will create it, and it can get moved onto the server with the rest of -the packages. - -Read "README-real-repository" for information on how we used to do -this. diff --git a/packaging/debs/apt-repository/README-real-repository b/packaging/debs/apt-repository/README-real-repository deleted file mode 100644 index faa7b62425..0000000000 --- a/packaging/debs/apt-repository/README-real-repository +++ /dev/null @@ -1,130 +0,0 @@ -APT Repository for RabbitMQ in Debian -===================================== - -First, a note on what we're trying to do. We want a single "testing" -repository. When RabbitMQ is more stable we will also want a -"stable" repository. It is very important to understand that these refer -to the state of the rabbit code, *NOT* which Debian distribution they go -with. At the moment our dependencies are very simple so our packages can -be used with any current Debian version (etch, lenny, sid) as well as -with Ubuntu. So although we have a "testing" distribution, this is not -codenamed "lenny". Instead it's currently codenamed "kitten" since -that's a baby rabbit. - -Secondly, a note on software. We need a tool to manage the repository, -and a tool to perform uploads to the repository. Debian being Debian -there are quite a few of each. We will use "reprepro" to manage the -repository since it's modern, maintained, and fairly simple. We will use -"dupload" to perform the uploads since it gives us the ability to run -arbitrary commands after the upload, which means we don't need to run a -cron job on the web server to process uploads. - -Creating a repository -===================== - -Much of this was cribbed from: -https://www.debian-administration.org/articles/286 - -The repository is fundamentally just some files in a folder, served over -HTTP (or FTP etc). So let's make it "debian" in the root of -www.rabbitmq.com. - -This means the repository will be at https://www.rabbitmq.com/debian/ and -can be added to a sources.list as: - -deb https://www.rabbitmq.com/debian/ testing main -deb-src https://www.rabbitmq.com/debian/ testing main - -Inside this folder we need a "conf" folder, and in -that we need a "distributions" configuration file - see the file in this -folder. Note that: - -* We list all architectures so that people can install rabbitmq-server - on to anything. -* We don't list the "all" architecture even though we use it; it's - implied. -* We only have a "main" component, we could have non-free and contrib - here if it was relevant. -* We list the email address associated with the key we want to use to - sign the repository. Yes, even after signing packages we still want to - sign the repository. - -We're now ready to go. Assuming the path to our repository is /path, -(and hence configuration is in /path/conf) we can upload a file to the -repository (creating it in the process) by doing something like this on -the repository host: - -$ reprepro --ignore=wrongdistribution -Vb /path include kitten \ - rabbitmq-server_1.0.0-alpha-1_i386.changes - -Note that we upload to the distribution "kitten" rather than "testing". -We also pass --ignore=wrongdistribution since the current packages are -built to go in "unstable" (this will be changed obviously). - -Note also that the .changes file claims to be for i386 even though the -package is for architecture "all". This is a bug in debhelper. - -Finally, if you've just created a repository, you want to run: - -$ reprepro -Vb /path createsymlinks - -since this will create "kitten" -> "testing" symlinks. You only need to -do this once. - -Removing packages -================= - -Fairly simple: - -$ reprepro --ignore=wrongdistribution -Vb /path remove kitten \ - rabbitmq-server - -Subsequent updates and "dupload" -================================ - -You can run the "reprepro" command above again to update the versions of -software in the repository. Since we probably don't want to have to log -into the machine in question to do this, we can use "dupload". This is a -tool which uploads Debian packages. The supplied file "dupload.conf" can -be renamed to ~/.dupload.conf. If you then run: - -$ dupload -to rabbit --nomail . - -in the folder with the .changes file, dupload will: - -* create an incoming folder in your home directory on the repository -machine -* upload everything there -* run reprepro to move the packages into the repository -* "rm -rf" the uploads folder - -This is a bit cheesy but should be enough for our purposes. The -dupload.conf uses scp and ssh so you need a public-key login (or type -your password lots). - -There's still an open question as to whether dupload is really needed -for our case. - -Keys and signing -================ - -We currently sign the package as we build it; but we also need to sign -the repository. The key is currently on my machine (mrforgetful) and has -ID 056E8E56. We should put it on CDs though. - -reprepro will automatically sign the repository if we have the right -SignWith line in the configuration, AND the secret key is installed on -the repository server. This is obviously not ideal; not sure what the -solution is right now. - -You can export the public key with: - -$ gpg --export --armor 056E8E56 > rabbit.pub - -(Open question: do we want to get our key on subkeys.pgp.net?) - -We can then add this key to the website and tell our users to import the -key into apt with: - -# apt-key add rabbit.pub - diff --git a/packaging/debs/apt-repository/distributions b/packaging/debs/apt-repository/distributions deleted file mode 100644 index 00d6b219f1..0000000000 --- a/packaging/debs/apt-repository/distributions +++ /dev/null @@ -1,7 +0,0 @@ -Origin: RabbitMQ -Label: RabbitMQ Repository for Debian / Ubuntu etc -Suite: testing -Codename: kitten -Architectures: alpha amd64 arm arm64 armeb armel armhf avr32 hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m32 m32r m68k mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el netbsd-alpha netbsd-i386 nios2 or1k powerpc powerpcel ppc64 ppc64el s390 s390x sh sh3 sh3eb sh4 sh4eb sparc sparc64 tilegx source -Components: main -Description: RabbitMQ Repository for Debian / Ubuntu etc diff --git a/packaging/debs/apt-repository/dupload.conf b/packaging/debs/apt-repository/dupload.conf deleted file mode 100644 index 9ceed76000..0000000000 --- a/packaging/debs/apt-repository/dupload.conf +++ /dev/null @@ -1,16 +0,0 @@ -package config; - -$rabbit_user = "simon"; -$rabbit_host = "mrforgetful.lshift.net"; -$rabbit_repo_path = "/srv/debian"; -$rabbit_reprepro_extra_args = "--ignore=wrongdistribution"; - -$cfg{'rabbit'} = { - fqdn => "$rabbit_host", - login => "$rabbit_user", - method => "scp", - incoming => "incoming", -}; - -$preupload{'deb'} = "ssh ${rabbit_host} mkdir incoming"; -$postupload{'deb'} = "ssh ${rabbit_host} \"cd incoming && reprepro ${$rabbit_reprepro_extra_args} -Vb ${rabbit_repo_path} include kitten *.changes && cd .. && rm -r incoming\""; diff --git a/packaging/windows-exe/Makefile b/packaging/windows-exe/Makefile deleted file mode 100644 index 2d2adeefdb..0000000000 --- a/packaging/windows-exe/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -ifeq ($(PACKAGES_DIR),) -ZIP_DIR = ../windows -else -ZIP_DIR = $(PACKAGES_DIR) -endif -ZIP = $(notdir $(wildcard $(ZIP_DIR)/rabbitmq-server-windows-*.zip)) - -VERSION = $(patsubst rabbitmq-server-windows-%.zip,%,$(ZIP)) -PRODUCT_VERSION ?= $(shell echo "$(VERSION)" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1.0/') - -unexport DEPS_DIR -unexport ERL_LIBS -MAKEOVERRIDES = - -all: dist - @: - -dist: rabbitmq-$(VERSION).nsi rabbitmq_server-$(VERSION) - makensis -V2 rabbitmq-$(VERSION).nsi - - if test "$(PACKAGES_DIR)"; then \ - mkdir -p "$(PACKAGES_DIR)"; \ - mv rabbitmq-server-$(VERSION).exe "$(PACKAGES_DIR)"; \ - fi - -rabbitmq-$(VERSION).nsi: rabbitmq_nsi.in - sed \ - -e 's|%%VERSION%%|$(VERSION)|' \ - -e 's|%%PRODUCT_VERSION%%|$(PRODUCT_VERSION)|' \ - $< > $@ - -rabbitmq_server-$(VERSION): - unzip -q $(ZIP_DIR)/$(ZIP) - -clean: - rm -rf rabbitmq-*.nsi rabbitmq_server-* rabbitmq-server-*.exe diff --git a/packaging/windows-exe/plugins/ExecDos.dll b/packaging/windows-exe/plugins/ExecDos.dll Binary files differdeleted file mode 100644 index 0d8a871a9d..0000000000 --- a/packaging/windows-exe/plugins/ExecDos.dll +++ /dev/null diff --git a/packaging/windows-exe/plugins/ShellLink.dll b/packaging/windows-exe/plugins/ShellLink.dll Binary files differdeleted file mode 100755 index f57ded34da..0000000000 --- a/packaging/windows-exe/plugins/ShellLink.dll +++ /dev/null diff --git a/packaging/windows-exe/rabbitmq.ico b/packaging/windows-exe/rabbitmq.ico Binary files differdeleted file mode 100644 index 5e169a7996..0000000000 --- a/packaging/windows-exe/rabbitmq.ico +++ /dev/null diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in deleted file mode 100644 index 665d176c1d..0000000000 --- a/packaging/windows-exe/rabbitmq_nsi.in +++ /dev/null @@ -1,299 +0,0 @@ -; Use the "Modern" UI -!include MUI2.nsh -!include LogicLib.nsh -!include WinMessages.nsh -!include FileFunc.nsh -!include WordFunc.nsh -!include x64.nsh - -!addplugindir plugins - -!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' -!define uninstall "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" -!define MUI_FINISHPAGE_NOAUTOCLOSE -!define MUI_UNFINISHPAGE_NOAUTOCLOSE - -;-------------------------------- - -; The name of the installer -Name "RabbitMQ Server %%VERSION%%" - -; The file to write -OutFile "rabbitmq-server-%%VERSION%%.exe" - -; Icons -!define MUI_ICON "rabbitmq.ico" - -; The default installation directory is empty. The .onInit function -; below takes care of selecting the appropriate (32-bit vs. 64-bit) -; "Program Files". -InstallDir "" - -; Registry key to check for directory (so if you install again, it will -; overwrite the old one automatically) -InstallDirRegKey HKLM "Software\VMware, Inc.\RabbitMQ Server" "Install_Dir" - -; Request application privileges for Windows Vista -RequestExecutionLevel admin - -SetCompressor /solid lzma - -;-------------------------------- - -; Pages - - -; !insertmacro MUI_PAGE_LICENSE "..\..\LICENSE-MPL-RabbitMQ" - !insertmacro MUI_PAGE_COMPONENTS - !insertmacro MUI_PAGE_DIRECTORY - !insertmacro MUI_PAGE_INSTFILES - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - !define MUI_FINISHPAGE_TEXT "RabbitMQ Server %%VERSION%% has been uninstalled from your computer.$\n$\nPlease note that the log and database directories located at $APPDATA\RabbitMQ have not been removed. You can remove them manually if desired." - !insertmacro MUI_UNPAGE_FINISH - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - -;-------------------------------- - -VIProductVersion "%%PRODUCT_VERSION%%" -VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "%%VERSION%%" -VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "RabbitMQ Server" -;VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "" -VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "VMware, Inc." -;VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" ; TODO ? -VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved." -VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "RabbitMQ Server" -VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "%%VERSION%%" - -; The stuff to install -Section "RabbitMQ Server (required)" Rabbit - - SectionIn RO - - ; Set output path to the installation directory. - SetOutPath $INSTDIR - - ; Put files there - File /r "rabbitmq_server-%%VERSION%%" - File "rabbitmq.ico" - - ; Set output path to the user's data directory - SetOutPath $APPDATA\RabbitMQ - - IfFileExists advanced.config 0 +2 - Goto config_written - IfFileExists rabbitmq.config 0 +3 - Rename rabbitmq.config advanced.config - Goto config_written - ClearErrors - FileOpen $0 advanced.config w - IfErrors config_written - FileWrite $0 "[]." - FileClose $0 - config_written: - - ; Write the installation path into the registry - WriteRegStr HKLM "SOFTWARE\VMware, Inc.\RabbitMQ Server" "Install_Dir" "$INSTDIR" - - ; Write the uninstall keys for Windows - WriteRegStr HKLM ${uninstall} "DisplayName" "RabbitMQ Server %%VERSION%%" - WriteRegStr HKLM ${uninstall} "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegStr HKLM ${uninstall} "DisplayIcon" "$INSTDIR\rabbitmq.ico" - WriteRegStr HKLM ${uninstall} "Publisher" "VMware, Inc." - WriteRegStr HKLM ${uninstall} "DisplayVersion" "%%VERSION%%" - WriteRegDWORD HKLM ${uninstall} "NoModify" 1 - WriteRegDWORD HKLM ${uninstall} "NoRepair" 1 - - ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 - IntFmt $0 "0x%08X" $0 - WriteRegDWORD HKLM "${uninstall}" "EstimatedSize" "$0" - - WriteUninstaller "uninstall.exe" -SectionEnd - -;-------------------------------- - -Section "RabbitMQ Service" RabbitService - DetailPrint "Installing RabbitMQ service..." - ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" install' "" - DetailPrint "Starting RabbitMQ service..." - ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" start' "" - ReadEnvStr $1 "HOMEDRIVE" - ReadEnvStr $2 "HOMEPATH" - Delete "$1$2\.erlang.cookie" - ${If} ${RunningX64} - ${DisableX64FSRedirection} - ${EndIf} - IfFileExists "$SYSDIR\config\systemprofile\.erlang.cookie" 0 cookie_check_windir - CopyFiles "$SYSDIR\config\systemprofile\.erlang.cookie" "$1$2\.erlang.cookie" - Goto cookie_done - cookie_check_windir: - IfFileExists "$WINDIR\.erlang.cookie" 0 cookie_done - CopyFiles "$WINDIR\.erlang.cookie" "$1$2\.erlang.cookie" - cookie_done: - ${If} ${RunningX64} - ${EnableX64FSRedirection} - ${EndIf} -SectionEnd - -;-------------------------------- - -Section "Start Menu" RabbitStartMenu - ; In case the service is not installed, or the service installation fails, - ; make sure these exist or Explorer will get confused. - CreateDirectory "$APPDATA\RabbitMQ\log" - CreateDirectory "$APPDATA\RabbitMQ\db" - - CreateDirectory "$SMPROGRAMS\RabbitMQ Server" - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\Uninstall RabbitMQ.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Plugins.lnk" "$INSTDIR\rabbitmq_server-%%VERSION%%\plugins" - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Logs.lnk" "$APPDATA\RabbitMQ\log" - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Database Directory.lnk" "$APPDATA\RabbitMQ\db" - - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - (re)install.lnk" "%comspec%" '/k "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" install & if not errorlevel 1 exit /b 0' "$INSTDIR\rabbitmq.ico" - ShellLink::SetRunAsAdministrator "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - (re)install.lnk" - - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - remove.lnk" "%comspec%" '/k "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" remove & if not errorlevel 1 exit /b 0' "$INSTDIR\rabbitmq.ico" - ShellLink::SetRunAsAdministrator "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - remove.lnk" - - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - start.lnk" "%comspec%" '/k "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" start & if not errorlevel 1 exit /b 0' "$INSTDIR\rabbitmq.ico" - ShellLink::SetRunAsAdministrator "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - start.lnk" - - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - stop.lnk" "%comspec%" '/k "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" stop & if not errorlevel 1 exit /b 0' "$INSTDIR\rabbitmq.ico" - ShellLink::SetRunAsAdministrator "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - stop.lnk" - - SetOutPath "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin" - CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Command Prompt (sbin dir).lnk" "$SYSDIR\cmd.exe" "/k cd /d $INSTDIR\rabbitmq_server-%%VERSION%%\sbin" "$SYSDIR\cmd.exe" - ShellLink::SetRunAsAdministrator "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Command Prompt (sbin dir).lnk" - - SetOutPath $INSTDIR -SectionEnd - -;-------------------------------- - -; Section descriptions - -LangString DESC_Rabbit ${LANG_ENGLISH} "The RabbitMQ Server." -LangString DESC_RabbitService ${LANG_ENGLISH} "Set up RabbitMQ as a Windows Service." -LangString DESC_RabbitStartMenu ${LANG_ENGLISH} "Add some useful links to the start menu." - -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${Rabbit} $(DESC_Rabbit) - !insertmacro MUI_DESCRIPTION_TEXT ${RabbitService} $(DESC_RabbitService) - !insertmacro MUI_DESCRIPTION_TEXT ${RabbitStartMenu} $(DESC_RabbitStartMenu) -!insertmacro MUI_FUNCTION_DESCRIPTION_END - -;-------------------------------- - -; Uninstaller - -Section "Uninstall" - - ; Remove registry keys - DeleteRegKey HKLM ${uninstall} - DeleteRegKey HKLM "SOFTWARE\VMware, Inc.\RabbitMQ Server" - - ; TODO these will fail if the service is not installed - do we care? - DetailPrint "Stopping RabbitMQ service..." - ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" stop' "" - DetailPrint "Removing RabbitMQ service..." - ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" remove' "" - - ; Remove files and uninstaller - RMDir /r "$INSTDIR\rabbitmq_server-%%VERSION%%" - Delete "$INSTDIR\rabbitmq.ico" - Delete "$INSTDIR\uninstall.exe" - RMDir "$INSTDIR" - - ; Remove start menu items - RMDir /r "$SMPROGRAMS\RabbitMQ Server" - - DeleteRegValue ${env_hklm} ERLANG_HOME - SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - -SectionEnd - -;-------------------------------- - -; Functions - -Function .onInit - ; By default, always install in "\Program Files", not matter if we run - ; on a 32-bit or 64-bit Windows. - ${If} $INSTDIR == ""; - ${If} ${RunningX64} - StrCpy $INSTDIR "$PROGRAMFILES64\RabbitMQ Server" - ${Else} - StrCpy $INSTDIR "$PROGRAMFILES\RabbitMQ Server" - ${EndIf} - ${EndIf} - - Call findErlang - - ReadRegStr $0 HKLM ${uninstall} "UninstallString" - ${If} $0 != "" - MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "RabbitMQ is already installed. $\n$\nClick 'OK' to remove the previous version or 'Cancel' to cancel this installation." /SD IDOK IDOK rununinstall IDCANCEL norun - - norun: - Abort - - rununinstall: - ;Run the uninstaller - ClearErrors - ExecWait '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR' - Delete "$INSTDIR\uninstall.exe" - RMDir "$INSTDIR" - ; the unistaller removes the ERLANG_HOME. - ; called again since this is an update - Call findErlang - - ${EndIf} -FunctionEnd - -Function findErlang - - StrCpy $0 0 - StrCpy $2 "not-found" - ${Do} - EnumRegKey $1 HKLM Software\Ericsson\Erlang $0 - ${If} $1 = "" - ${Break} - ${EndIf} - ${If} $1 <> "ErlSrv" - StrCpy $2 $1 - ${EndIf} - - IntOp $0 $0 + 1 - ${Loop} - - ${If} $2 = "not-found" - MessageBox MB_YESNO|MB_ICONEXCLAMATION "Erlang could not be detected.$\nYou must install Erlang before installing RabbitMQ. Would you like the installer to open a browser window to the Erlang download site?" IDNO abort - ExecShell "open" "https://www.erlang.org/download.html" - abort: - Abort - ${Else} - ${VersionCompare} $2 "8.3" $0 - - ${If} $0 = 2 - MessageBox MB_OK|MB_ICONEXCLAMATION "Your installed version of Erlang ($2) is too old. Please install a more recent version." - Abort - ${EndIf} - - ReadRegStr $0 HKLM "Software\Ericsson\Erlang\$2" "" - - ; See https://nsis.sourceforge.io/Setting_Environment_Variables - WriteRegExpandStr ${env_hklm} ERLANG_HOME $0 - SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - - ; On Windows XP changing the permanent environment does not change *our* - ; environment, so do that as well. - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("ERLANG_HOME", "$0").r0' - ${EndIf} - -FunctionEnd diff --git a/packaging/windows/Makefile b/packaging/windows/Makefile deleted file mode 100644 index 1ff655aeaa..0000000000 --- a/packaging/windows/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz) - -ifneq ($(filter-out clean,$(MAKECMDGOALS)),) -ifeq ($(SOURCE_DIST_FILE),) -$(error Cannot find source archive; please specify SOURCE_DIST_FILE) -endif -ifneq ($(words $(SOURCE_DIST_FILE)),1) -$(error Multiple source archives found; please specify SOURCE_DIST_FILE) -endif - -VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE))) -ifeq ($(VERSION),) -$(error Cannot determine version; please specify VERSION) -endif -endif - -SOURCE_DIR = rabbitmq-server-$(VERSION) -TARGET_DIR = rabbitmq_server-$(VERSION) -TARGET_ZIP = rabbitmq-server-windows-$(VERSION) - -unexport DEPS_DIR -unexport ERL_LIBS -MAKEOVERRIDES = - -# See comment below about `$(HOME)` and Freedesktop.org variables. -XDG_DATA_HOME ?= $(HOME)/.local/share -XDG_CONFIG_HOME ?= $(HOME)/.config - -all: dist - @: - -dist: -# Log Erlang version. - @echo - @echo '--------------------------------------------------' - @echo "Erlang and Elixir versions used to compile:" - @elixir --version - @echo '--------------------------------------------------' - @echo - xzcat $(SOURCE_DIST_FILE) | tar -xf - - -# We explicitely set $HOME as a Make variable below because some package -# builders do that, as part of cleaning the build environment. It -# exercises our hack to convince mix(1) to work offline because that -# hack depends on `$HOME`. A Make variable on the command line takes -# precedence over variables declared in Makefiles, so our hack needs -# to consider this. We do the same with the Freedesktop.org-specified -# variables ($XDG_*_HOME). - $(MAKE) -C $(SOURCE_DIR) install-windows \ - DESTDIR=$(abspath $(TARGET_DIR)) \ - WINDOWS_PREFIX= \ - HOME="$(HOME)" \ - XDG_DATA_HOME="$(XDG_DATA_HOME)" \ - XDG_CONFIG_HOME="$(XDG_CONFIG_HOME)" - - cp -a README-etc $(TARGET_DIR)/etc/README.txt - - zip -q -r $(TARGET_ZIP).zip $(TARGET_DIR) - - if test "$(PACKAGES_DIR)"; then \ - mkdir -p "$(PACKAGES_DIR)"; \ - mv $(TARGET_ZIP).zip "$(PACKAGES_DIR)"; \ - fi - -clean: - rm -rf rabbitmq-server-* rabbitmq_server-* diff --git a/packaging/windows/README-etc b/packaging/windows/README-etc deleted file mode 100644 index b431247c6b..0000000000 --- a/packaging/windows/README-etc +++ /dev/null @@ -1,7 +0,0 @@ -In this directory you can find an example configuration file for RabbitMQ.
-
-Note that this directory is *not* where the real RabbitMQ
-configuration lives. The default location for the real configuration
-file is %APPDATA%\RabbitMQ\rabbitmq.config.
-
-%APPDATA% usually expands to C:\Users\%USERNAME%\AppData\Roaming or similar.
|