Commit Graph

15 Commits

Author SHA1 Message Date
MichaIng
71e5024d7a
Packaging: Stop and disable service on DEB package removal (#59580)
* Stop and disable service on DEB package removal

The condition for this code to run applies on package removal only, not on upgrade or reinstall which generally invoke the prerm script as well.

Currently the service keeps running after package removal, failing at some point due to missing files. And if enabled, the attempted service start on every boot is doomed to fail.

If the invoke-rc.d command exists, it can be assumed that update-rc.d exists as well, as both are part of the same init-system-helpers package in dpkg distro repositories.

If neither systemd, nor the init system helper package is installed, the service is not tried to be disabled, since we cannot know a safe method to do so.

Compared to the postinst script, "set -e" is skipped here, since we do not run any command which is allowed to fail the whole package removal.

Signed-off-by: MichaIng <micha@dietpi.com>

* Add postrm script to package build

Signed-off-by: MichaIng <micha@dietpi.com>

* Remove redundant check

Co-authored-by: Dan Cech <dan@aussiedan.com>

---------

Signed-off-by: MichaIng <micha@dietpi.com>
Co-authored-by: Dan Cech <dan@aussiedan.com>
2023-02-21 10:40:38 -05:00
Julien Duchesne
a190e03133
Remove code to publish to RPM and deb repos (#61786)
This was replaced here: https://github.com/grafana/grafana/pull/53553 and it's no longer used
2023-02-01 09:39:33 -05:00
Serge Zaitsev
427db55204
Chore: Fix goimports order in RelEng packages (#62481)
fix goimports order
2023-01-30 15:53:38 +01:00
Kyle Brandt
55d2d872ec
Chore: Missed deprecations due to overly broad lint exclusion (#59732) 2022-12-14 12:32:45 +01:00
Kevin Minehart
69ffce4c42
CI: add a quick test, set enterprise2 when the enterprise2 flag is added (#59967)
* add a quick test, set enterprise2 when the enterprise2 flag is added

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-12-07 13:52:16 -05:00
Dan Cech
1dbc22d18b
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
2022-12-06 10:36:43 -05:00
Kevin Minehart
76a586195a
Packaging: Use rpm-digest sha256 when creating rpm packages (#59510)
* Use rpm-digest sha256 when creating rpm packages

* only append this argument with rpm builds
2022-11-30 09:35:02 -06:00
Dan Cech
de99ce139c
Server: Switch from separate server & cli to a unified grafana binary (#58286)
* avoid the need for a second bulky binary for grafana-cli

* look for grafana-server in $PATH as well as same directory

* implement unified "grafana" command

* update dockerfiles, fix grafana-cli -v

* update packaging to work with single binary

- add wrapper scripts for grafana and grafana-server
- update and sync package files
- implement --sign flag of build package command
- stop packaging scripts folder, they are not useful for end users
- add support for --configOverrides in server command
- remove unused nfpm.yaml config file

* windows support
2022-11-22 11:53:43 -05:00
Julien Duchesne
786c7faff2
Grafana Enterprise Packaging: Set to conflict with grafana, not replace (#58189)
* Grafana Enterprise Packaging: Set to conflict with `grafana`, not replace
When `grafana` and `grafana-enterprise` are in the same RPM repository, grafana-enterprise takes precedence over Grafana
This is not what we want. Users should be able to install either OSS or Enterprise

* Set it only one way. It's how it's currently tested
2022-11-08 13:08:01 +01:00
Dimitris Sotirakis
e829b50149
CI: Add CreateTempDir func and use it in publish packages logic (#57171)
* Add CreateTempDir func and use it in publish packages logic

* Fill err return in defer func
2022-10-19 12:58:22 +02:00
Dimitris Sotirakis
c96b6a6ab0
CI: Move CreateTempFile - use it for rpm/deb packages (#56990)
* Move CreateTempFile - use it for rpm/deb packages

* Fix typo

* Fix tests:
2022-10-17 16:23:57 +01:00
Dimitris Sotirakis
66e8f39ce8
Packaging: Change from 0750 to 0755 folder permissions when packaging (#56436)
* Change from 0750 to 0755

* Change to 0o755

* Skip lint when creating dir
2022-10-06 17:11:11 +03:00
Dimitris Sotirakis
3aacda5579
Move files under pkg/build/packaging (#56435) 2022-10-06 03:33:40 -04:00
Torkel Ödegaard
018733dd24
PluginDetails: Make plugin details page look good in topnav (#55571)
* PluginDetails: Make plugin details page look good in topnav

* Minor style tweak aligning things

* minor refactoring where I moved the logic to decide the default tab into its own hook.

* refactor(plugindetails): first pass at using navmodel for usePluginDetailsTabs hook

* refactor(plugindetails): move "reset page when uninstalling plugin" to installcontrols

this prevents a user from seeing a blank page if they uninstall an app plugin whilst viewing a
config page

* refactor(plugindetails): remove usage of toIconName and reduce nested if

* Trying to fix tests

* minor fix

* test(plugindetails): update selectors causing failing tests

* chore(plugindetails): remove commented out test code

* test(plugindetails): clean up - remove unnecesary usage of waitFor

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-26 15:04:07 +02:00
Kevin Minehart
2fadeeff4c
CI: move grabpl package command to pkg/build (#55651)
* add grabpl package

* update .drone.yml

* resolve lint errors
2022-09-23 11:49:07 -05:00