#1930 Issue closed: chroot: failed to run command '/bin/ldd': No such file or directory

Labels: support / question, fixed / solved / done

mailinglists35 opened issue at 2018-10-15 18:26:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.4-git.0.5410104.unknown / 2018-10-09

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):

[root@gw2 ~]# cat /etc/rear/os.conf
OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=7.5

[root@gw2 ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: OracleServer
Description:    Oracle Linux Server release 7.5
Release:    7.5
Codename:   n/a

[root@gw2 ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="7.5"
ID="ol"
VERSION_ID="7.5"
PRETTY_NAME="Oracle Linux Server 7.5"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:5:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.5
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.5
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
BACKUP=NETFS
OUTPUT=PXE
BACKUP_PROG=rsync
BACKUP_URL=nfs://backup/srv/bkp/backups/jump
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/home/csl/rpmbuild*' '/home/cst/rpmbuild*' )
PROGS=(
zfs
zpool
zdb
zstreamdump
mount.zfs
)
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    bare metal

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    amd64

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    bios

  • Storage (lokal disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    local

  • Description of the issue (ideally so that others can reproduce it):
    there is no /bin/ldd in the chroot environment with the PROGS line enabled in the config
    I don't know what causes the program to barf when I enable PROGS variable, but it works without it. however I need it to work with PROGS too

  • Work-around, if any:

mailinglists35 commented at 2018-10-15 18:31:

rear-gw2.log

mailinglists35 commented at 2018-10-15 18:32:

grepping the log I see 'type ldd' to obtain ldd path. this is wrong. it should do a readlink -f $(type -p ldd) to find the real path to ldd

mailinglists35 commented at 2018-10-15 19:09:

it DOES work if instead I copy REQUIRED_PROGS from /usr/share/rear/conf/default.conf to local.conf and add my binaries there

jsmeix commented at 2018-10-16 07:48:

Your

PROGS=(
zfs
zpool
zdb
zstreamdump
mount.zfs
)

is wrong (or more precisely ReaR does exactly what you specified this way).
Read the initial comments in usr/share/rear/conf/default.conf
https://raw.githubusercontent.com/rear/rear/master/usr/share/rear/conf/default.conf
how to correctly add items to an existing bash array.

jsmeix commented at 2018-10-16 07:50:

FYI:
Regarding default PROGS versus default REQUIRED_PROGS
see the related https://github.com/rear/rear/issues/892

mailinglists35 commented at 2018-10-16 08:44:

I tried also with PROGS=( 'zfs' 'zpool' ) and get the same result

gdha commented at 2018-10-16 09:28:

@mailinglists35 if you add binaries to PROG or REQUIRED_PROGS always make sure that the previous content of the array is not lost, e.g.
PROGS=( "${PROGS[@]}" zfs zpool )


[Export of Github issue for rear/rear.]