Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
75bbb13
[sb2] Conditionally accelerate ccache. JB#61370
vigejolla Jan 9, 2024
20befb6
Merge pull request #24 from sailfishos/jb61370
vigejolla Jan 10, 2024
d6003d3
[wrappers] Replace calls to deprecated egrep. JB#59434
Thaodan Jan 16, 2024
7159b84
[sb2] Replace calls to deprecated fgrep, egrep and cleanup. JB#59434
Thaodan Jan 16, 2024
19f8f68
Merge pull request #26 from sailfishos/egrep_fpgrep
mlehtima Jan 29, 2024
0ecaef5
[sb2] Add gate for statx. JB#49501
mlehtima Dec 25, 2023
0418b16
Merge pull request #25 from sailfishos/statx
mlehtima Jan 29, 2024
2aa05f5
[sb2] Use GNU option for extended sed. JB#59434
Thaodan Jan 30, 2024
cdbddde
Merge pull request #27 from sailfishos/sed_use_gnu_instead_of_Posix_o…
mlehtima Feb 1, 2024
5eea920
[sb2] Use correct path when scanning ld.so.cache. JB#59434
Thaodan Feb 7, 2024
e32c40b
Merge branch 'jb59434_ldso_cache' [#28]
Thaodan Feb 8, 2024
04b140a
[sb2] Fix ldconfig use at build time. JB#61808
martyone Mar 22, 2024
76877e2
[sb2] Fix compatibility with LD_PRELOAD-based tools. JB#61781
martyone Mar 19, 2024
9ffea11
[sb2] Accelerate sh/bash installed under /usr. JB#61829
martyone Mar 26, 2024
6dedec5
[sb2] Accelerate env installed under /bin
martyone Mar 26, 2024
39f3a3a
[sb2] Fix acceleration of tar
martyone Mar 26, 2024
8efd361
Drop duplicate mapping rules
martyone Mar 26, 2024
9fb02fd
Merge pull request #29 from sailfishos/jb61808
martyone Mar 28, 2024
a70de08
Merge pull request #30 from sailfishos/jb61781
martyone Mar 28, 2024
fb8b7ac
Merge pull request #31 from sailfishos/jb61829
martyone Mar 28, 2024
c37287b
[sb2] Use Version instead of non-standard V variable
Thaodan Sep 9, 2023
ec1090b
[sb2] Correctly use $LUA_CFAGS to find lua.h
Thaodan Sep 10, 2023
74abd6c
[sb2] Specify lua-posix dependency correctly for OpenSuSE
Thaodan Sep 10, 2023
2cf92cb
Merge branch 'sb2_lua_fixes' [#22]
Thaodan Apr 29, 2024
7ef2e91
[preload] Fix declaration of tmpnam with glibc < 2.34 and gcc >= 11. …
mlehtima Jun 9, 2024
0b3cc25
Merge pull request #33 from sailfishos/jb62204
mlehtima Jun 11, 2024
003378c
[scratchbox] Accelerate gcc-go binaries. Contribues to JB#62642
direc85 Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AC_PROG_MAKE_SET
AC_CHECK_LIB([dl], [dlsym])

PKG_CHECK_MODULES([lua], lua >= 5.2.0)
PKG_CHECK_VAR(LUA_VERSION_MAJOR_MINOR, [lua], [V])
LUA_VERSION_MAJOR_MINOR=$($PKG_CONFIG --modversion lua | cut -d. -f1,2)
PKG_CHECK_VAR(LUA_LIBDIR, [lua], [libdir],
[
m4_foreach([lua_module], [[posix]],
Expand Down Expand Up @@ -164,6 +164,7 @@ setenv \
setxattr \
stat \
stat64 \
statx \
strchrnul \
symlink \
symlinkat \
Expand Down
2 changes: 1 addition & 1 deletion execs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ objs := $(D)/exec_ruletree_maint.o \
$(D)/sb_exec.o: preload/exported.h

execs/libexecs.a: $(objs)
execs/libexecs.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(SRCDIR)/$(LUASRC) -I$(OBJDIR)/preload -I$(SRCDIR)/preload -I$(SRCDIR)/execs \
execs/libexecs.a: override CFLAGS := $(CFLAGS) $(LUA_CFLAGS) -O2 -g -fPIC -Wall -W -I$(SRCDIR)/$(LUASRC) -I$(OBJDIR)/preload -I$(SRCDIR)/preload -I$(SRCDIR)/execs \
$(WERROR) -Wmissing-prototypes -Wstrict-prototypes
execs/libexecs.a: override LDFLAGS := $(LDFLAGS)
execs/libexecs.a: override LIBS :=
Expand Down
4 changes: 4 additions & 0 deletions include/sb2_stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ extern int real_fstatat64(int dirfd, const char *path, struct stat64 *statbuf, i
extern int i_virtualize_struct_stat(const char *realfnname,
struct stat *buf, struct stat64 *buf64);

#ifdef HAVE_STATX
extern int i_virtualize_struct_statx(const char *realfnname, struct statx *bufx);
#endif

extern int sb2_stat_file(const char *path, struct stat *buf, int *result_errno_ptr,
int (*statfn_with_ver_ptr)(int ver, const char *filename, struct stat *buf),
int ver,
Expand Down
1 change: 1 addition & 0 deletions lua_scripts/add_rules_to_rule_tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ local valid_keywords_in_exec_policy = {
native_app_ld_library_path_prefix = "string",
native_app_ld_library_path_suffix = "string",
native_app_ld_preload_prefix = "string",
native_app_ld_preload_suffix = "string",

native_app_ld_so = "string",
native_app_ld_so_rpath_prefix = "string",
Expand Down
5 changes: 4 additions & 1 deletion lua_scripts/argvenvp_gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ gcc_compilers = {
"g++",
"cpp",
"f77",
"g77"
"g77",
"gccgo",
"go.gcc",
"gofmt.gcc"
}

compiler_alternative_name = {
Expand Down
4 changes: 2 additions & 2 deletions luaif/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ objs := $(D)/sblib_luaif.o
$(D)/sblib_luaif.o: preload/exported.h

luaif/libluaif.a: $(objs)
luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(OBJDIR)/preload -I$(SRCDIR)/preload \
$(WERROR) -Wmissing-prototypes -Wstrict-prototypes $(LUA_CFLAGS)
luaif/libluaif.a: override CFLAGS := $(CFLAGS) $(LUA_CFLAGS) -O2 -g -fPIC -Wall -W -I$(OBJDIR)/preload -I$(SRCDIR)/preload \
$(WERROR) -Wmissing-prototypes -Wstrict-prototypes
luaif/libluaif.a: override LDFLAGS := $(LDFLAGS)
luaif/libluaif.a: override LIBS := $(LUA_LIBS)

Expand Down
8 changes: 4 additions & 4 deletions modes/accel/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ exec_policy_tools = {
native_app_ld_library_path_prefix = devel_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = devel_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = devel_mode_locale_path,
native_app_gconv_path = devel_mode_gconv_path,
Expand All @@ -94,7 +94,7 @@ exec_policy_tools_perl = {
native_app_ld_library_path_prefix = devel_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = devel_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = devel_mode_locale_path,
native_app_gconv_path = devel_mode_gconv_path,
Expand All @@ -116,7 +116,7 @@ exec_policy_tools_python = {
native_app_ld_library_path_prefix = devel_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = devel_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = devel_mode_locale_path,
native_app_gconv_path = devel_mode_gconv_path,
Expand Down Expand Up @@ -169,7 +169,7 @@ exec_policy_target = {

native_app_locale_path = conf_target_locale_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_ld_library_path_prefix = devel_mode_target_ld_library_path_prefix,
native_app_ld_library_path_suffix = devel_mode_target_ld_library_path_suffix,
Expand Down
8 changes: 4 additions & 4 deletions modes/emulate+toolchain+utils/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ rule_file_interface_version = "203"

exec_policy_host = {
name = "Host",
native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

exec_policy_toolchain = {
name = "Toolchain",
native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

-- For target binaries:
Expand Down Expand Up @@ -64,7 +64,7 @@ local exec_policy_target = {
native_app_locale_path = conf_target_locale_path,
native_app_gconv_path = conf_target_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

exec_flags = EXEC_FLAGS_FORCE_CPU_TRANSPARENCY,
}
Expand Down Expand Up @@ -115,7 +115,7 @@ local exec_policy_tools = {
native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}


Expand Down
8 changes: 4 additions & 4 deletions modes/emulate+toolchain/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ rule_file_interface_version = "203"

exec_policy_host = {
name = "Host",
native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

exec_policy_toolchain = {
name = "Toolchain",
native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

-- For target binaries:
Expand Down Expand Up @@ -64,7 +64,7 @@ local exec_policy_target = {
native_app_locale_path = conf_target_locale_path,
native_app_gconv_path = conf_target_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

exec_flags = EXEC_FLAGS_FORCE_CPU_TRANSPARENCY,
}
Expand Down Expand Up @@ -115,7 +115,7 @@ local exec_policy_tools = {
native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}


Expand Down
6 changes: 3 additions & 3 deletions modes/emulate/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rule_file_interface_version = "203"

exec_policy_host = {
name = "Host",
native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

-- For target binaries:
Expand Down Expand Up @@ -59,7 +59,7 @@ local exec_policy_target = {
native_app_locale_path = conf_target_locale_path,
native_app_gconv_path = conf_target_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

exec_flags = EXEC_FLAGS_FORCE_CPU_TRANSPARENCY,
}
Expand Down Expand Up @@ -110,7 +110,7 @@ local exec_policy_tools = {
native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}


Expand Down
12 changes: 6 additions & 6 deletions modes/obs-deb-build/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ rule_file_interface_version = "203"

exec_policy_host = {
name = "Host",
native_app_ld_preload_prefix = host_ld_preload_libsb2,
native_app_ld_preload_suffix = host_ld_preload_libsb2,
}

exec_policy_toolchain = {
name = "Toolchain",
native_app_ld_preload_prefix = host_ld_preload_libsb2,
native_app_ld_preload_suffix = host_ld_preload_libsb2,
}

-- For target binaries:
Expand Down Expand Up @@ -68,7 +68,7 @@ local exec_policy_target = {
native_app_locale_path = conf_target_locale_path,
native_app_gconv_path = conf_target_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

--
Expand Down Expand Up @@ -121,7 +121,7 @@ local exec_policy_tools = {
native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

script_log_level = "debug",
script_log_message = "SCRIPT from tools",
Expand All @@ -140,7 +140,7 @@ local exec_policy_tools_perl = {
native_app_ld_library_path_prefix = emulate_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = emulate_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,
Expand All @@ -162,7 +162,7 @@ local exec_policy_tools_python = {
native_app_ld_library_path_prefix = emulate_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = emulate_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,
Expand Down
8 changes: 8 additions & 0 deletions modes/obs-deb-build/sb2rc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ case "$sb2rc_mode" in
SBOX_WRAPPERS="gdb ldconfig pwd fakeroot"
;;

ldconfig)
# When ldconfig is used at build time, then it must be the case
# that it is used on the build artefacts (with the help of the
# '-n' option), so locking it to the target root would not be
# desired.
sbox_ldconfig_root=/
;;

*)
# Default.
;;
Expand Down
8 changes: 4 additions & 4 deletions modes/obs-deb-install/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ rule_file_interface_version = "203"

exec_policy_host = {
name = "Host",
native_app_ld_preload_prefix = host_ld_preload_libsb2,
native_app_ld_preload_suffix = host_ld_preload_libsb2,
}

exec_policy_toolchain = {
name = "Toolchain",
native_app_ld_preload_prefix = host_ld_preload_libsb2,
native_app_ld_preload_suffix = host_ld_preload_libsb2,
}

-- For target binaries:
Expand Down Expand Up @@ -69,7 +69,7 @@ local exec_policy_target = {
native_app_locale_path = conf_target_locale_path,
native_app_gconv_path = conf_target_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

--
Expand Down Expand Up @@ -118,7 +118,7 @@ local exec_policy_tools = {
native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}


Expand Down
12 changes: 6 additions & 6 deletions modes/obs-rpm-build+pp/exec_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ rule_file_interface_version = "203"

exec_policy_host = {
name = "Host",
native_app_ld_preload_prefix = host_ld_preload_libsb2,
native_app_ld_preload_suffix = host_ld_preload_libsb2,
}

exec_policy_toolchain = {
name = "Toolchain",
native_app_ld_preload_prefix = host_ld_preload_libsb2,
native_app_ld_preload_suffix = host_ld_preload_libsb2,
}

-- For target binaries:
Expand Down Expand Up @@ -64,7 +64,7 @@ local exec_policy_target = {
native_app_locale_path = conf_target_locale_path,
native_app_gconv_path = conf_target_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,
}

--
Expand Down Expand Up @@ -117,7 +117,7 @@ local exec_policy_tools = {
native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

script_log_level = "debug",
script_log_message = "SCRIPT from tools",
Expand All @@ -136,7 +136,7 @@ local exec_policy_tools_perl = {
native_app_ld_library_path_prefix = emulate_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = emulate_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,
Expand All @@ -158,7 +158,7 @@ local exec_policy_tools_python = {
native_app_ld_library_path_prefix = emulate_mode_tools_ld_library_path_prefix,
native_app_ld_library_path_suffix = emulate_mode_tools_ld_library_path_suffix,

native_app_ld_preload_prefix = host_ld_preload,
native_app_ld_preload_suffix = host_ld_preload,

native_app_locale_path = conf_tools_locale_path,
native_app_gconv_path = conf_tools_gconv_path,
Expand Down
Loading