Skip to content

Commit

Permalink
Support 32 bit 'tools' accelerating 64 bit binaries
Browse files Browse the repository at this point in the history
If the program is configured to dlopen in /usr/lib64 and sb2 can't
find it (because it's 32 bit) then try in /usr/lib

Signed-off-by: David Greaves <david.greaves@jolla.com>
  • Loading branch information
lbt committed May 18, 2020
1 parent cd0f7e3 commit 05d4c41
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions scratchbox2/modes/obs-rpm-build+pp/fs_rules.lua
Expand Up @@ -195,8 +195,6 @@ emulate_mode_rules_bin = {
actions=accelerated_program_actions},
{path="/bin/rmdir",
actions=accelerated_program_actions},
{path="/bin/rpm",
actions=accelerated_program_actions},
{path="/bin/sed",
actions=accelerated_program_actions},
{path="/bin/sh",
Expand Down Expand Up @@ -631,12 +629,31 @@ emulate_mode_rules_usr = {
{if_active_exec_policy_is = "Tools",
if_exists_then_map_to = tools,
protection = readonly_fs_always},
{if_active_exec_policy_is = "Host",
if_exists_then_replace_by = tools .. "/usr/lib64",
protection = readonly_fs_always},
{if_active_exec_policy_is = "Host",
if_exists_then_map_to = tools,
protection = readonly_fs_always},
{if_active_exec_policy_is = "Host",
if_exists_then_replace_by = tools .. "/usr/lib64",
protection = readonly_fs_always},
{if_active_exec_policy_is = "Host",
if_exists_then_map_to = tools,
protection = readonly_fs_always},
{ map_to = target_root, protection = readonly_fs_always },
},
},
-- and if the program looks in lib64 and the emulator can't find
-- it (because it's 32 bit) then look in /usr/lib...
{dir = "/usr/lib64", func_class = FUNC_CLASS_DLOPEN,
actions = {
{if_active_exec_policy_is = "Tools",
if_exists_then_replace_by = tools .. "/usr/lib",
protection = readonly_fs_always},
{if_active_exec_policy_is = "Tools",
if_exists_then_map_to = tools,
protection = readonly_fs_always},
{if_active_exec_policy_is = "Host",
if_exists_then_replace_by = tools .. "/usr/lib",
protection = readonly_fs_always},
{if_active_exec_policy_is = "Host",
if_exists_then_map_to = tools,
protection = readonly_fs_always},
{ map_to = target_root, protection = readonly_fs_always },
},
},
Expand Down

0 comments on commit 05d4c41

Please sign in to comment.