Skip to content
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

[packages] Fix incorrect OS value set in Mimir v2.3.* RPM package #3221

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

wilfriedroset
Copy link
Collaborator

What this PR does

When creating the packages on MacOS the OS applied on the package is not correct. The documentation says:

--rpm-os OS
The operating system to target this rpm for. You want to set this to ‘linux’ if you are using fpm on OS X, for example

See: https://fpm.readthedocs.io/en/latest/packages/rpm.html

Which issue(s) this PR fixes or relates to

Fixes #3216

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@wilfriedroset wilfriedroset requested a review from a team as a code owner October 14, 2022 16:57
@wilfriedroset
Copy link
Collaborator Author

wilfriedroset commented Oct 14, 2022

Here is the resulting package build with this patch mimir.zip

[root@wr ~]# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)
[root@wr ~]# rpm -qp --qf '%{OS}\n' mimir-*.rpm
linux
[root@wr ~]# yum install mimir-2.3.1_amd64.rpm
Last metadata expiration check: 0:45:28 ago on Fri 14 Oct 2022 04:22:38 PM UTC.
Dependencies resolved.
==============================================================================================================================================================
 Package                            Architecture                        Version                               Repository                                 Size
==============================================================================================================================================================
Installing:
 mimir                              x86_64                              2.3.1-1                               @commandline                               17 M

Transaction Summary
==============================================================================================================================================================
Install  1 Package

Total size: 17 M
Installed size: 50 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                      1/1
  Installing       : mimir-2.3.1-1.x86_64                                                                                                                 1/1
  Running scriptlet: mimir-2.3.1-1.x86_64                                                                                                                 1/1
  Verifying        : mimir-2.3.1-1.x86_64                                                                                                                 1/1

Installed:
  mimir-2.3.1-1.x86_64

Complete!

When creating the packages on MacOS the `OS` applied on the package is
not correct. The documentation says:

    --rpm-os OS
    The operating system to target this rpm for. You want to set this to ‘linux’ if you are using fpm on OS X, for example

See: https://fpm.readthedocs.io/en/latest/packages/rpm.html
Fixes: grafana#3216

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
Copy link
Contributor

@treid314 treid314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@treid314 treid314 merged commit 80e6fc1 into grafana:main Oct 14, 2022
@pracucci pracucci mentioned this pull request Oct 17, 2022
45 tasks
@grafanabot
Copy link
Contributor

The backport to release-2.4 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-3221-to-release-2.4 origin/release-2.4
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 80e6fc10e7328fc38e156327be48b11d0c1f02e2
# Push it to GitHub
git push --set-upstream origin backport-3221-to-release-2.4
git switch main
# Remove the local backport branch
git branch -D backport-3221-to-release-2.4

Then, create a pull request where the base branch is release-2.4 and the compare/head branch is backport-3221-to-release-2.4.

pracucci pushed a commit that referenced this pull request Oct 17, 2022
)

When creating the packages on MacOS the `OS` applied on the package is
not correct. The documentation says:

    --rpm-os OS
    The operating system to target this rpm for. You want to set this to ‘linux’ if you are using fpm on OS X, for example

See: https://fpm.readthedocs.io/en/latest/packages/rpm.html
Fixes: #3216

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
(cherry picked from commit 80e6fc1)
@pracucci pracucci mentioned this pull request Oct 17, 2022
pracucci added a commit that referenced this pull request Oct 17, 2022
) (#3226)

When creating the packages on MacOS the `OS` applied on the package is
not correct. The documentation says:

    --rpm-os OS
    The operating system to target this rpm for. You want to set this to ‘linux’ if you are using fpm on OS X, for example

See: https://fpm.readthedocs.io/en/latest/packages/rpm.html
Fixes: #3216

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
(cherry picked from commit 80e6fc1)

Co-authored-by: wilfriedroset <wilfriedroset@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect OS value set in Mimir v2.3.* RPM packages
4 participants