Build r2 with muon+samu ##ci

* Remove asm.arc leftovers
* Fix r2pm -r return value
This commit is contained in:
pancake 2022-07-08 22:44:46 +02:00 committed by GitHub
parent e7335cfebd
commit e3c09aa9c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 17 additions and 17 deletions

View File

@ -53,7 +53,7 @@ jobs:
sudo make symstall
- name: Building muon/samu
run: |
r2pm -gci muon # installs samurai as dependency
PATH="/usr/local/bin:$PATH" r2pm -gci muon # installs samurai as dependency
# ./preconfigure
# XXX muon setup m && samu -C m -j5
build-acr-gperf:

View File

@ -130,3 +130,7 @@ jobs:
run: r2pm -i muon
- name: Install muon (native)
run: R2PM_NATIVE=1 r2pm -i muon
- name: Building r2 with muon+samu
run: |
R2PM_NATIVE=1 r2pm -r muon setup b
R2PM_NATIVE=1 r2pm -r samu -C b 2>/dev/null

View File

@ -646,6 +646,7 @@ case "$1" in
-r|run)
shift
PATH="${R2PM_BINDIR}:${PATH}" "$@"
exit $?
;;
-v|version)
echo "r2pm ${R2_VERSION}"

View File

@ -41,7 +41,6 @@ anal.snes
anal.riscv
anal.propeller
esil.dummy
asm.arc
asm.arm_cs
asm.arm_gnu
asm.dalvik

View File

@ -29,7 +29,6 @@ anal.snes
anal.riscv
anal.propeller
esil.dummy
asm.arc
asm.arm_cs
asm.dalvik
asm.riscv

View File

@ -36,7 +36,6 @@ anal.wasm
anal.pyc
anal.i4004
esil.dummy
asm.arc
asm.arm_cs
asm.arm_gnu
asm.arm_winedbg

View File

@ -11,19 +11,10 @@ tags_r2_sources = [
'string'
]
script = '''#script
import os
from sys import argv
for fname in argv[1:]:
with open(fname) as f:
text = ' '.join(f.read().splitlines())
print('ft %s %s' % (os.path.basename(fname), text))
'''
custom_target('tags.r2',
input: tags_r2_sources,
output: 'tags.r2',
command: [py3_exe, '-c', script, '@INPUT@'],
command: [py3_exe, join_paths(meson.current_source_dir(),'tags.py'), '@INPUT@'],
capture: true,
build_by_default: true,
install: true,

6
libr/flag/d/tags.py Normal file
View File

@ -0,0 +1,6 @@
import os
from sys import argv
for fname in argv[1:]:
with open(fname) as f:
text = ' '.join(f.read().splitlines())
print('ft %s %s' % (os.path.basename(fname), text))

View File

@ -19,7 +19,7 @@ static int r_main_r2pm_sh(int argc, const char **argv) {
r_strbuf_appendf (sb, " %s", argv[i]);
}
char *cmd = r_strbuf_drain (sb);
int res = r_sandbox_system (cmd, 1);
int res = r_sandbox_system (cmd, 0);
free (cmd);
return res;
#endif

View File

@ -294,11 +294,12 @@ R_API int r_sandbox_system(const char *x, int n) {
}
#endif
char *bin_sh = r_file_binsh ();
if (execl (bin_sh, "sh", "-c", x, (const char*)NULL) == -1) {
int rc = execl (bin_sh, "sh", "-c", x, (const char*)NULL);
if (rc == -1) {
r_sys_perror ("execl");
}
free (bin_sh);
exit (1);
exit (rc);
#endif
return -1;
}