Conversation
|
There is a problem and I think your patch will fix it for RH/Fedora and probably also other Linuxes. We will have to look into this a bit more. |
|
Hi Andreas, |
arogge
left a comment
There was a problem hiding this comment.
Your changes make sense for Red Hat / Fedora, but they break portability. We can probably implement your changes in a system-specific way, but it will be a lot harder to do so.
| @@ -1,4 +1,4 @@ | |||
| #! /bin/sh | |||
| #!/usr/bin/sh | |||
There was a problem hiding this comment.
As we dropped support for RHEL6, we should probably remove the old initscripts instead of maintaining them further.
Could you remove these files and see if the build still works? They shouldn't be installed when building with systemd anyway.
| @@ -1,4 +1,4 @@ | |||
| #! /bin/sh | |||
| #!/usr/bin/sh | |||
| @@ -1,4 +1,4 @@ | |||
| #! /bin/sh | |||
| #!/usr/bin/sh | |||
| @@ -1,3 +1,4 @@ | |||
| #!/usr/bin/sh | |||
There was a problem hiding this comment.
the resulting file should not be executable. So we shouldn't add a shebang, but remove exectuable permissions (this can be done somewhere in a CMakeLists.txt)
| @@ -1,4 +1,4 @@ | |||
| #!/bin/sh | |||
| #!/usr/bin/sh | |||
There was a problem hiding this comment.
Sorry, but /usr/bin/sh is Red Hat / Fedora specific. In POSIX the path to the standard shell is /bin/sh. This change would break everything, but Red Hat / Fedora.
You can provide a patch that applies this change for Fedora/Red Hat only or you can change the specfile to ignore silence the warning using __brp_mangle_shebangs_exclude.
| @@ -1,4 +1,4 @@ | |||
| #!/bin/sh | |||
| #!/usr/bin/sh | |||
| @@ -1,4 +1,4 @@ | |||
| #!/bin/sh | |||
| #!/usr/bin/sh | |||
| @@ -1,4 +1,4 @@ | |||
| #!/bin/sh | |||
| #!/usr/bin/sh | |||
| @@ -1,4 +1,4 @@ | |||
| #!/bin/sh | |||
| #!/usr/bin/sh | |||
| @@ -1,4 +1,4 @@ | |||
| #!/usr/bin/env perl | |||
| #!/usr/bin/perl | |||
There was a problem hiding this comment.
you're not wrong, but we will have to support systems that have perl in unusual places (i.e. FreeBSD has it in /usr/local/bin/perl).
So far /usr/bin/env has worked well. We could change this, but we would have to configure the path system specific and detect the path to perl in CMake and set it using a variable.
If you propose a patch, I'll test and implement it.
Having said that, we're trying to remove/replace all perl scripts anyways, so I'm not really sure it is worth the effort anymore.
|
It's been three months without reply now. I close the PR. |
When building the rpm package, many errors/warnings about an wrong shebang is shown.