mirror of
https://github.com/grafana/grafana.git
synced 2024-11-21 08:34:25 -06:00
Build: don't remove grafana-server and grafana-cli binaries from deb and rpm packages (#59890)
* don't remove grafana-server and grafana-cli binaries from /usr/share/grafana/bin in deb and rpm packages * don't add config overrides in /usr/sbin/grafana-server
This commit is contained in:
parent
f1fb202284
commit
1dbc22d18b
@ -5,18 +5,8 @@
|
||||
# the system-wide Grafana configuration that was bundled with the package as we
|
||||
# use the binary.
|
||||
|
||||
DEFAULT=/etc/default/grafana
|
||||
|
||||
GRAFANA_HOME="${GRAFANA_HOME:-/usr/share/grafana}"
|
||||
|
||||
CONF_DIR=/etc/grafana
|
||||
DATA_DIR=/var/lib/grafana
|
||||
PLUGINS_DIR=/var/lib/grafana/plugins
|
||||
LOG_DIR=/var/log/grafana
|
||||
|
||||
CONF_FILE=$CONF_DIR/grafana.ini
|
||||
PROVISIONING_CFG_DIR=$CONF_DIR/provisioning
|
||||
|
||||
EXECUTABLE="$GRAFANA_HOME/bin/grafana"
|
||||
|
||||
if [ ! -x $EXECUTABLE ]; then
|
||||
@ -24,18 +14,6 @@ if [ ! -x $EXECUTABLE ]; then
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# overwrite settings from default file
|
||||
if [ -f "$DEFAULT" ]; then
|
||||
. "$DEFAULT"
|
||||
fi
|
||||
|
||||
OPTS="--homepath=${GRAFANA_HOME} \
|
||||
--config=${CONF_FILE} \
|
||||
--configOverrides='cfg:default.paths.provisioning=$PROVISIONING_CFG_DIR \
|
||||
cfg:default.paths.data=${DATA_DIR} \
|
||||
cfg:default.paths.logs=${LOG_DIR} \
|
||||
cfg:default.paths.plugins=${PLUGINS_DIR}'"
|
||||
|
||||
CMD=server
|
||||
|
||||
eval $EXECUTABLE "$CMD" "$OPTS" "$@"
|
||||
eval $EXECUTABLE "$CMD" "$@"
|
||||
|
@ -340,18 +340,6 @@ func createPackage(srcDir string, options linuxPackageOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// remove unneeded binaries, these are exposed via wrappers that provide the needed configuration
|
||||
for _, fileName := range []string{
|
||||
cliBinary,
|
||||
cliBinary + ".md5",
|
||||
serverBinary,
|
||||
serverBinary + ".md5",
|
||||
} {
|
||||
if err := os.Remove(filepath.Join(packageRoot, options.homeBinDir, fileName)); err != nil {
|
||||
return fmt.Errorf("failed to remove %q: %w", filepath.Join(options.homeBinDir, fileName), err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := executeFPM(options, packageRoot, srcDir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user