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

Fix shebang error on rpmbuild #695

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/platforms/redhat/bareos-dir.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

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.

#
# bareos This shell script takes care of starting and stopping
# the bareos Director daemon
Expand Down
2 changes: 1 addition & 1 deletion core/platforms/redhat/bareos-fd.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# bareos This shell script takes care of starting and stopping
# the bareos File daemon.
Expand Down
2 changes: 1 addition & 1 deletion core/platforms/redhat/bareos-sd.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# bareos This shell script takes care of starting and stopping
# the bareos Storage daemon.
Expand Down
1 change: 1 addition & 0 deletions core/scripts/bareos-config-lib.sh.in
@@ -1,3 +1,4 @@
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

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)

# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2013-2020 Bareos GmbH & Co. KG
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos-config.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

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.


LIB=@scriptdir@/bareos-config-lib.sh

Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos-ctl-dir.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# bareos-ctl-dir This shell script takes care of starting and stopping
# the bareos Director daemon
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos-ctl-fd.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# bareos-ctl-fd This shell script takes care of starting and stopping
# the bareos File daemon.
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos-ctl-funcs
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above


# A function to find the pid of a program.
pidofproc() {
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos-ctl-sd.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# bareos-ctl-sd This shell script takes care of starting and stopping
# the bareos Storage daemon
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos-explorer.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/bareos.in
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# bareos This shell script takes care of starting and stopping
# the bareos daemons.
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/btraceback.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# Script to do a stack trace of a Bareos daemon/program
# and create a core-file for postmortem debugging.
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/disk-changer.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS interface to virtual autoloader using disk storage
#
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/mtx-changer.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# Bareos interface to mtx autoloader
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/create_bareos_database.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/delete_catalog_backup.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/drop_bareos_database.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/drop_bareos_tables.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/grant_bareos_privileges.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/make_bareos_tables.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/make_catalog_backup.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

see above

#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/make_catalog_backup.pl.in
@@ -1,4 +1,4 @@
#!/usr/bin/env perl
#!/usr/bin/perl
Copy link
Member

Choose a reason for hiding this comment

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

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.

use strict;

=head1 SCRIPT
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/update_bareos_tables.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
Expand Down