Commit Graph

26 Commits

Author SHA1 Message Date
Michael Klishin 968eefa1bb
Bump (c) line year
There are no functional changes to this massive diff.
2025-01-01 17:54:10 -05:00
Michael Klishin 3fe8dec150
Two more (c) update spots 2023-11-21 23:32:51 -05:00
Luke Bakken 7dabdd152e
Small changes to follow name and quote style. 2020-10-13 06:54:42 -07:00
Chunyi Lyu 3811258de8 Capture and return rabbitmq-plugins exit code in rabbitmq-script-wrapper 2020-10-13 14:03:05 +01:00
Michael Klishin 858ef574c0
Switch to MPL 2.0 2020-07-17 16:10:14 +03:00
Jean-Sébastien Pédron 9022b9ce0c
scripts/rabbitmq-script-wrapper: Don't mess with console redirection
Console output is handled in the SysV init scripts consistently (no more
differences between the Debian and RPM packages). See the previous
commit.

This fixes an issue for users who used to define $RABBITMQ_LOG_BASE in
the environment and called this script directly (i.e. not using the SysV
init scripts). Before commit 4b7048205d
(which made it to RabbitMQ 3.8.4), `rabbitmq-script-wrapper` took
$RABBITMQ_LOG_BASE from rabbitmq-env(8) or the environment. After the
mentionned commit, $RABBITMQ_LOG_BASE was hard-coded to setup console
redirection (in the case of Debian only) because rabbitmq-env(8) didn't
have the variable anymore and thus was not sourced.

For those users, it meant they couldn't override $RABBITMQ_LOG_BASE in
the environment and call this script, even if they wanted to change the
location of RabbitMQ actual log files.

Now that console redirection is handled by the SysV init scripts, we can
get rid of that code in `rabbitmq-script-wrapper`.

Fixes rabbitmq/rabbitmq-server-release#131.
2020-06-08 15:43:02 +02:00
Jean-Sébastien Pédron 1cf3af5a79
Update copyright (year 2020) 2020-03-10 16:49:26 +01:00
Michael Klishin b0f49e1517
(c) bump 2019-12-29 05:50:35 +03:00
Jean-Sébastien Pédron 4b7048205d
packaging: Don't load rabbitmq-env from init scripts
This was used to define `$RABBITMQ_LOG_BASE`, but this variable is no
longer define there.

rabbitmq-env would also load `rabbitmq-env.conf` which could redefine
`$RABBITMQ_LOG_BASE`, but this is a corner case and doesn't fit
packaging well: packages already prepare a location for log files and
will clean this location up on removal.

Now, we set `$RABBITMQ_LOG_BASE` value in those scripts and get rid of
rabbitmq-env load.
2019-12-16 10:37:41 +01:00
Spring Operator 19b22db1f4 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://httpredir.debian.org/debian (302) with 1 occurrences could not be migrated:
   ([https](https://httpredir.debian.org/debian) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://nsis.sourceforge.net/Setting_Environment_Variables (301) with 1 occurrences migrated to:
  https://nsis.sourceforge.io/Setting_Environment_Variables ([https](https://nsis.sourceforge.net/Setting_Environment_Variables) result AnnotatedConnectException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).
* http://www.rabbitmq.com/releases/rabbitmq-server/v (404) with 1 occurrences migrated to:
  https://www.rabbitmq.com/releases/rabbitmq-server/v ([https](https://www.rabbitmq.com/releases/rabbitmq-server/v) result 404).
* http://www.rabbitmq.com/releases/rabbitmq-server/v% (404) with 1 occurrences migrated to:
  https://www.rabbitmq.com/releases/rabbitmq-server/v% ([https](https://www.rabbitmq.com/releases/rabbitmq-server/v%) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.debian.org/doc/debian-policy/ with 2 occurrences migrated to:
  https://www.debian.org/doc/debian-policy/ ([https](https://www.debian.org/doc/debian-policy/) result 200).
* http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ with 1 occurrences migrated to:
  https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ([https](https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/) result 200).
* http://www.rabbitmq.com/ with 2 occurrences migrated to:
  https://www.rabbitmq.com/ ([https](https://www.rabbitmq.com/) result 200).
* http://www.rabbitmq.com/debian/ with 3 occurrences migrated to:
  https://www.rabbitmq.com/debian/ ([https](https://www.rabbitmq.com/debian/) result 200).
* http://www.rabbitmq.com/monitoring.html with 2 occurrences migrated to:
  https://www.rabbitmq.com/monitoring.html ([https](https://www.rabbitmq.com/monitoring.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.debian-administration.org/articles/286 with 1 occurrences migrated to:
  https://www.debian-administration.org/articles/286 ([https](https://www.debian-administration.org/articles/286) result 301).
* http://www.erlang.org/download.html with 1 occurrences migrated to:
  https://www.erlang.org/download.html ([https](https://www.erlang.org/download.html) result 301).
* http://www.mozilla.org/MPL/ with 5 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:22:38 -05:00
Luke Bakken ad99cb2524
Use template in rabbitmq-script-wrapper for RabbitMQ user and group 2018-09-13 11:13:42 -07:00
Luke Bakken 79d5841224
Ensure ~rabbitmq/.erlang.cookie is readable after running a command as root
Fixes #85
2018-09-12 15:26:42 -07:00
Luke Bakken f410369672
Detect util-linux version of runuser
Alternative is to always use runuser invocation in else clause.

Fixes #44.
[#150221349]
2017-09-20 11:31:59 +02:00
Luke Bakken 617d1603d6
Use runuser in non-su-compatible mode
Remove argument quoting which is not necessary as long as command is
passed to `/sbin/runuser` and `/bin/su` as arguments instead of a
string.

Fixes #44.
[#150221349]
2017-09-20 11:31:59 +02:00
Jean-Sébastien Pedron aa84ddcf36 Define shell explicitly for runuser command
Because the rabbitmq user shell defaults to /bin/false, we must
explicitly define a shell when using the runuser command

Issue: rabbitmq/rabbitmq-server-release#32
PR: rabbitmq/rabbitmq-server-release#40

[#150221349]

Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
2017-08-31 16:56:26 +01:00
Daniil Fedotov ab705f8359 Change runuser arguments to support more platforms 2017-08-22 11:13:47 +01:00
Luke Bakken 402aab2857
Error message change from review. 2017-08-17 06:05:28 -07:00
Luke Bakken c8b6b74a9c
Fixes for SELinux support
Use /sbin/runuser to execute script as the `rabbitmq` user as this command
does not cause issues with SELinux. See #32 for details.
2017-08-16 20:13:30 -07:00
Jean-Sébastien Pédron 7ec9512aa3
Merge branch 'stable' 2017-08-01 18:17:39 +02:00
Jean-Sébastien Pédron ad1984130e
scripts/rabbitmq-script-wrapper: Run rabbitmq-plugin as root only
The previous patch was meant to make it clear that an unprivileged user
(other than `rabbitmq`) shouldn't run rabbitmq-plugins.

Unfortunately, it broke the script when called by root, because the
real script was executed as `rabbitmq`. This user doesn't have write
permissions to `/etc/rabbitmq` by default.

Now, rabbitmq-plugins' wrapper must be executed as root and so is the
real script. This should fix the problem described above.

[#149840153]
2017-08-01 15:35:35 +02:00
Jean-Sébastien Pedron 9de5b86e00 Ensure we are in a readable dir when running RabbitMQ scripts
If the current working directory is not readable, Erlang will crash.
This ensures that we run RabbitMQ scripts from a readable directory.

[#149425921]

Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
2017-07-28 18:32:49 +01:00
Jean-Sébastien Pedron cf7baacd03 Refactor rabbitmq-script-wrapper
The logic is a bit crazy, and the whole purpose of this script is
questionable, but until we get rid of it, we've refactor it to make it
more obvious just how crazy it actually is.

[#149425921]

Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
2017-07-28 17:06:46 +01:00
Gerhard Lazu 0eb3736a63 Merge branch 'stable' 2017-07-28 17:06:01 +01:00
Daniil Fedotov 2c5f833d98 Require root or rabbitmq user for rabbitmq-plugins.
For some reason, the rabbitmq-plugins command could be run
from arbitrary user, which would result in errors unable to
access a cookie file or plugins configuration files.
Changed to work the same way as rabbitmqctl - require root
or rabbitmq user.

[Fixes #149425921]
2017-07-24 17:50:11 +01:00
Daniil Fedotov f0583e6621 Integrate rabbitmq-cli deps to release build 2016-10-28 17:59:59 +01:00
Jean-Sébastien Pédron 14d7902ae6
scripts/rabbitmq-script-wrapper: Moved from rabbitmq-server
[#130659985]
2016-09-21 12:32:15 +02:00