glideinWMS / glideinwms

The glideinWMS Project
http://tinyurl.com/glideinwms
Apache License 2.0
16 stars 46 forks source link

Shebang changed to /usr/bin/sh failing glideins #436

Closed mambelli closed 2 months ago

mambelli commented 2 months ago

Describe the bug The glideins are failing on some CMS sites because the shebang of gwms-python is #!/usr/bin/sh and /usr/bin does not exist on those sites.

To Reproduce Install 3.10.7 and submit jobs to the affected sites. The code has #!/bin/sh

Expected behavior Have #!/bin/sh as shebang

Screenshots NA

Info (please complete the following information):

Additional context Add any other context or supporting files about the problem here.

mambelli commented 2 months ago

The script in git has #!/bin/sh since the first version. The source tarball has #!/bin/sh. This seems to be a shebang mengling performed during the RPM building on Koji. https://asamalik.fedorapeople.org/tmp-docs-preview/packaging-guidelines/#_shebang_lines Mats after looking at rpm --showrc recommended to add %global __brp_mangle_shebangs %{nil} in the spec file. This was not affecting 3.10.6. There will be a fix in 3.10.8. For 3.10.7 the recommendation is to change the shebang in /var/lib/gwms-factory/web-base/gwms-python and issue a factory upgrade command.

The Fedora guidelines recommend to keep the mengling if. possible. Anyway, it can be disabled partially or totally with (see here):

%global __brp_mangle_shebangs_exclude_from */web-base/*
%global __brp_mangle_shebangs_exclude /bin/sh
%undefine __brp_mangle_shebangs