-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Remove chown -R root:root from specfile #3180
Conversation
%install is run as non-root and as such, chown root is not allowed to be done it. The correct way of achieving a setting of ownership in RPM specfiles is to do it in the %files section(s). Signed-off-by: Brian J. Murrell <[email protected]>
Kudos, SonarCloud Quality Gate passed!
|
Can this be reviewed and landed? This preventing this project from being able to build into an RPM. |
I think this is causing the CentOS build to fail on this:
|
Well, before the PR the CentOS build should have been failing anyway, as the #1 golden rule of building RPMs (just like building any other piece of software) is to never, ever build RPMs as root. There is no properly built build system in the world that builds RPMs as root, so trying to do anything that actually requires root permissions in an RPM specfile is will be broken and will not build on any such properly built build system. So the answer here is absolutely not to revert this change as that is just substituting one flavour of broken for another. That said, what does not make any sense is
was successful. Here is what running the
So my first suggestion to working this out would be to stop building the RPMs as root and see if the problem persists. |
Well, Azure is building these, not me. Here's the build log: https://dev.azure.com/jellyfin-project/jellyfin/_build/results?buildId=34942&view=logs&j=5404562b-245d-5392-77db-b338601c3067&t=94e8c372-eb87-5491-597a-f5fcde0ab6d6 As far as I can tell, it is not running as root, and we have nothing in the CI config that should cause it to run as root. Worth mentioning that any time you see |
Right. But Azure it building them per the supplied |
Maybe you could do |
Web builds for centos and now fedora have been broken in CI for a month now. Can we get some commitment to fixing this @brianjmurrell? This change is responsible for completely breaking our unstable build pipeline as well as the 10.8 alphas. |
@thornbill I disagree. The breakage in CI is not really the fault of this PR. This PR fixed brokenness in the That the CI build was depending on the I will see if I can take a look at some point (hopefully soon), but the unfortunate reality is that Do PRs normally do RPM builds? I didn't see any failures in this PR. Would any PR reproduce the build failure you are seeing? Can you point to a recent example of a CI build failing? |
Look at the Azure build of every commit to master since this was merged for examples of failures. Frankly I don’t care if the rpm spec was technically incorrect previously. I do care that all unstable builds of web have been failing for a month due to this. |
I found https://dev.azure.com/jellyfin-project/jellyfin/_build/results?buildId=35141&view=logs&j=b8f1083d-0e74-517d-1ebe-6648c20a9fa9&t=1744f064-bb38-5491-66a4-58fbbd5263c6. I assume that's the kind of breakage to which you are referring. If so, that has nothing to do with this PR and looks more related to the last two commits to https://github.com/jellyfin/jellyfin-web/commits/master/fedora/Makefile. TBH, it seems really odd to replace the proper git-tag derived package version with date-stamp-type version jellyfin-web/deployment/build.fedora Line 17 in 9515733
Release: so that the Version: maintains some semblance of the real version the nightly/unstable build is based on.
But if that is really what you want to do, I can see if I can make those last two commits compatible with that. I'm still puzzled why the PRs that tested those two commits did not fail these package build stages. Are they not run for PRs? |
But again, this PR is not the reason for the failures and again do PRs not do the package building tests in CI? |
I see the problem(s). Working on a fix. But if PRs don't build packages, how will we know it actually fixes the problem? |
And now we are back to the original problem the specfile was broken to fix:
But it makes no sense at all. So what is so funky about this environment that would cause such contradictions? |
Changes
%install
is run as non-root and as such, chown root is not allowed to be done it.The correct way of achieving a setting of ownership in RPM specfiles is to do it
in the
%files
section(s) (as it is already done).Signed-off-by: Brian J. Murrell [email protected]