More renames of r2 to rizin

This commit is contained in:
Anton Kochkov 2020-11-06 12:44:10 +08:00 committed by Anton Kochkov
parent 7ad49af155
commit e1d83487a6
24 changed files with 79 additions and 80 deletions

View file

@ -5,8 +5,8 @@ int main(int argc, char **argv) {
void *a = dlopen(NULL, RTLD_LAZY);
void *m = dlsym (a, "rz_main_rizin");
if (m) {
int (*r2main)(int argc, char **argv) = m;
return r2main (argc, argv);
int (*rz_main)(int argc, char **argv) = m;
return rz_main (argc, argv);
}
return 0;
}

View file

@ -44,7 +44,7 @@ void rz_asmjs_openurl(void *kore, const char *url) {
}
}
#else
static void r2cmd(int in, int out, const char *cmd) {
static void rz_cmd(int in, int out, const char *cmd) {
write (out, cmd, strlen (cmd) + 1);
write (out, "\n", 1);
int bufsz = (1024 * 64);
@ -77,10 +77,10 @@ static int rz_main_rzpipe(int argc, const char **argv) {
int in = atoi (_in);
int out = atoi (_out);
for (i = 1; i < argc; i++) {
r2cmd (in, out, argv[i]);
rz_cmd (in, out, argv[i]);
}
} else {
eprintf ("Error: R2PIPE_(IN|OUT) environment not set\n");
eprintf ("Error: RZ_PIPE_(IN|OUT) environment not set\n");
eprintf ("Usage: rizin -c '!*rzp x' # run commands via rzpipe\n");
rc = 1;
}

View file

@ -157,7 +157,7 @@ typedef struct rz_test_test_result_info_t {
RzTest *test;
RzTestResult result;
bool timeout;
bool run_failed; // something went seriously wrong (e.g. r2 not found)
bool run_failed; // something went seriously wrong (e.g. rizin not found)
union {
RzTestProcessOutput *proc_out; // for test->type == RZ_TEST_TYPE_CMD, RZ_TEST_TYPE_JSON or RZ_TEST_TYPE_FUZZ
RzAsmTestOutput *asm_out; // for test->type == RZ_TEST_TYPE_ASM

View file

@ -12,11 +12,11 @@ Usage example
Start in one terminal the following command to wait for incoming connections:
r2 rap://:9999
rizin rap://:9999
In another machine or terminal connect it:
r2 rap://localhost:9999//bin/ls
rizin rap://localhost:9999//bin/ls
As you see, the path of the remote file to load must be specified, and this handled
by the open() packet.

View file

@ -50,9 +50,9 @@ Install a package
.Pp
$ rz-pm install yara3
.Pp
Install a test package (don't git pull on $R2PM_GITDIR/yara3)
Install a test package (don't git pull on $RZPM_GITDIR/yara3)
.Pp
$ R2PM_GITSKIP=1 r2pm install yara3
$ RZPM_GITSKIP=1 rz-pm install yara3
.Pp
Uninstall a package
.Pp

View file

@ -150,7 +150,7 @@ if not capstone_dep.found() or not get_option('use_sys_capstone')
capstone_includes += [include_directories('capstone/include/capstone')]
endif
librzcapstone = static_library('r2capstone', cs_files,
librzcapstone = static_library('rzcapstone', cs_files,
c_args: [
'-DCAPSTONE_X86_ATT_DISABLE_NO',
'-DCAPSTONE_X86_REDUCE_NO',
@ -246,7 +246,7 @@ bochs_files = [
bochs_inc = [platform_inc, include_directories('bochs/include')]
librzbochs = static_library('r2bochs', bochs_files,
librzbochs = static_library('rzbochs', bochs_files,
dependencies: [rz_util_dep],
include_directories: bochs_inc,
implicit_include_directories: false
@ -269,7 +269,7 @@ java_files = [
java_inc = [platform_inc, include_directories('java')]
librzjava = static_library('r2java', java_files,
librzjava = static_library('rzjava', java_files,
dependencies: [rz_util_dep],
include_directories: java_inc,
implicit_include_directories: false
@ -292,7 +292,7 @@ qnx_files = [
qnx_inc = [platform_inc, include_directories('qnx/include')]
librzqnx = static_library('r2qnx', qnx_files,
librzqnx = static_library('rzqnx', qnx_files,
dependencies: [rz_socket_dep],
include_directories: qnx_inc,
implicit_include_directories: false
@ -313,7 +313,7 @@ tcc_files = [
tcc_inc = [platform_inc, include_directories('tcc')]
librztcc = static_library('r2tcc', tcc_files,
librztcc = static_library('rztcc', tcc_files,
dependencies: [rz_util_dep],
include_directories: tcc_inc,
implicit_include_directories: false
@ -335,7 +335,7 @@ if not lz4_dep.found() or not get_option('use_sys_lz4')
lz4_inc = [platform_inc, include_directories('lz4')]
librzlz4 = static_library('r2lz4', lz4_files,
librzlz4 = static_library('rzlz4', lz4_files,
include_directories: lz4_inc,
implicit_include_directories: false
)
@ -441,7 +441,7 @@ if not zip_dep.found() or not get_option('use_sys_zip')
zip_inc = [platform_inc, include_directories('zip/include')]
librzzip = static_library('r2zip', zip_files,
librzzip = static_library('rzzip', zip_files,
include_directories: zip_inc,
implicit_include_directories: false,
dependencies: zlib_dep
@ -466,7 +466,7 @@ winkd_files = [
winkd_inc = [platform_inc, include_directories('winkd')]
librzwinkd = static_library('r2winkd', winkd_files,
librzwinkd = static_library('rzwinkd', winkd_files,
dependencies: [rz_hash_dep, rz_crypto_dep, rz_socket_dep, rz_util_dep],
include_directories: winkd_inc,
implicit_include_directories: false
@ -485,7 +485,7 @@ ar_files = [
ar_inc = [platform_inc, include_directories(['ar'])]
librzar = static_library('r2ar', ar_files,
librzar = static_library('rzar', ar_files,
dependencies: [rz_util_dep],
include_directories: ar_inc,
implicit_include_directories: false
@ -513,7 +513,7 @@ mpc_files = [
mpc_inc = [platform_inc, include_directories(['mpc'])]
libmpc = static_library('r2mpc', mpc_files,
libmpc = static_library('rzmpc', mpc_files,
include_directories: mpc_inc,
implicit_include_directories: false
)
@ -530,7 +530,7 @@ yxml_files = [
yxml_inc = [platform_inc, include_directories(['yxml'])]
libyxml = static_library('r2yxml', yxml_files,
libyxml = static_library('rzyxml', yxml_files,
include_directories: yxml_inc,
implicit_include_directories: false
)

View file

@ -1,7 +1,7 @@
w32dbg_wrap_inc = include_directories('include')
w32dbg_wrap_src = ['src/w32dbg_wrap.c']
w32dbg_wrap_lib = static_library(
'r2w32dbg_wrap',
'rzw32dbg_wrap',
w32dbg_wrap_src,
include_directories : w32dbg_wrap_inc,
)

View file

@ -1,8 +1,8 @@
#!/bin/sh
# path to rizin-bin repo
R2B="${PWD}/../rizin-bin"
# source of r2, where rizin tarballs live
R2T="${PWD}"
RZB="${PWD}/../rizin-bin"
# source of rizin, where rizin tarballs live
RZT="${PWD}"
ARCHS="arm mips aarch64 x86"
countdown() {
@ -21,9 +21,9 @@ msg() {
}
echo
echo "Building r2 tarballs for the Android App"
echo "Building rizin tarballs for the Android App"
echo "========================================"
echo " This script will build r2 tarballs for all Android targets"
echo " This script will build rizin tarballs for all Android targets"
echo " and commit them into the rizin-bin repository which are"
echo " used by the Android app."
echo
@ -48,32 +48,32 @@ makeReadme() {
echo "Version: $v"
}
if [ ! -d "${R2B}" ]; then
mkdir -p "${R2B}"
cd "${R2B}/.."
if [ ! -d "${RZB}" ]; then
mkdir -p "${RZB}"
cd "${RZB}/.."
git clone https://github.com/rizinorg/rizin-bin
fi
cd "$R2B"
cd "$RZB"
for a in ${ARCHS} ; do
echo "Releasing $a ..."
git checkout android-${a} || exit 1
if [ -f "${R2T}/rizin-${v}-android-${a}.tar.gz" ]; then
if [ -f "${RZT}/rizin-${v}-android-${a}.tar.gz" ]; then
msg "[*] Dist tarball already built for ${a}."
else
msg "[>] Building Android dist for ${a}..."
(
cd "${R2T}"
cd "${RZT}"
sys/android-build.sh ${a} > rizin-${v}-android-${a}.log
)
fi
if [ ! -f "${R2T}/rizin-${v}-android-${a}.tar.gz" ]; then
if [ ! -f "${RZT}/rizin-${v}-android-${a}.tar.gz" ]; then
msg "[X] Build for $a has failed"
exit 1
fi
msg "[>] Committing $a into rizin-bin..."
# cp -f "${R2T}/rizin-${v}-android-${a}.tar.gz" . || exit 1
cp -f "${R2T}/rizin-${v}-android-${a}.tar.gz" . # || exit 1
# cp -f "${RZT}/rizin-${v}-android-${a}.tar.gz" . || exit 1
cp -f "${RZT}/rizin-${v}-android-${a}.tar.gz" . # || exit 1
rm -f README.md
makeReadme $a > README.md
cat README.md

View file

@ -55,9 +55,9 @@ OS=`uname|tr 'A-Z' 'a-z'`
if [ ! -x /work ]; then
echo "Building android locally with NDK instead of dockcross..."
# TODO: autodetect or gtfo
if [ -f ~/.r2androidrc ]; then
. ~/.r2androidrc
echo "Using data from ${HOME}/.r2androidrc.."
if [ -f ~/.rzandroidrc ]; then
. ~/.rzandroidrc
echo "Using data from ${HOME}/.rzandroidrc.."
else
#[ -z "${SDK}" ] && SDK="${HOME}/Downloads/android-sdk-${OS}"
if [ -z "${NDK}" ]; then
@ -98,7 +98,7 @@ ln -fs clang++ ndk-g++
if [ "${BUILD}" != 0 ]; then
if [ ! -d "${NDK}" ]; then
echo "Cannot find Android NDK ${NDK}" >&2
echo "echo NDK=/path/to/ndk > ~/.r2androidrc" >&2
echo "echo NDK=/path/to/ndk > ~/.rzandroidrc" >&2
exit 1
fi
PATH=/tmp/ndk/bin:$PATH
@ -110,7 +110,7 @@ if [ "${BUILD}" != 0 ]; then
SHELL=sh
CC=ndk-gcc
CXX=ndk-g++
PS1="[r2-android-${NDK_ARCH}]> "
PS1="[rizin-android-${NDK_ARCH}]> "
export CC
export CXX
export PS1

View file

@ -1 +1 @@
@echo @"%%~dp0\rizin" %%*> %MESON_INSTALL_PREFIX%\bin\r2.bat
@echo @"%%~dp0\rizin" %%*> %MESON_INSTALL_PREFIX%\bin\rz.bat

View file

@ -12,7 +12,7 @@ P=`readlink $0`
cd `dirname $P`/..
if [ -z "${IFILE}" ]; then
echo "Usage: r2-indent [-a|-i|-u|-c] [file] [...]"
echo "Usage: rz-indent [-a|-i|-u|-c] [file] [...]"
echo " -a indent all whitelisted files"
echo " -i indent in place (modify file)"
echo " -u unified diff of the file"

View file

@ -39,20 +39,20 @@ fi
makeDeb() {
make -C binrz ios-sdk-sign
rm -rf /tmp/r2ios
make install DESTDIR=/tmp/r2ios
rm -rf /tmp/r2ios/${PREFIX}/share/rizin/*/www/enyo/node_modules
( cd /tmp/r2ios && tar czvf ../r2ios-${CPU}.tar.gz ./* )
rm -rf /tmp/rzios
make install DESTDIR=/tmp/rzios
rm -rf /tmp/rzios/${PREFIX}/share/rizin/*/www/enyo/node_modules
( cd /tmp/rzios && tar czvf ../rzios-${CPU}.tar.gz ./* )
rm -rf sys/cydia/rizin/root
mkdir -p sys/cydia/rizin/root
sudo tar xpzvf /tmp/r2ios-${CPU}.tar.gz -C sys/cydia/rizin/root
sudo tar xpzvf /tmp/rzios-${CPU}.tar.gz -C sys/cydia/rizin/root
rm -f sys/cydia/rizin/root/${PREFIX}/lib/*.{a,dylib,dSYM}
if [ "$static" = 1 ]; then
(
rm -f sys/cydia/rizin/root/${PREFIX}/bin/*
cp -f binrz/blob/rizin sys/cydia/rizin/root/${PREFIX}/bin
cd sys/cydia/rizin/root/${PREFIX}/bin
for a in r2 rz_bin rz_run rz_asm rz_gg rz_hash rz_ax rz_find rz_diff ; do ln -fs rizin $a ; done
for a in rizin rz_bin rz_run rz_asm rz_gg rz_hash rz_ax rz_find rz_diff ; do ln -fs rizin $a ; done
)
echo "Signing rizin"
ldid2 -Sbinr/rizin/rizin_ios.xml sys/cydia/rizin/root/usr/bin/rizin
@ -111,7 +111,7 @@ else
ls -l librz/flag/librz_flag.a || exit 1
rm -f librz/*/*.dylib
(
cd binrz ; make clean ;
cd binrz ; make clean ;
cd blob ; make USE_LTO=1
xcrun --sdk iphoneos strip rizin
)

View file

@ -2,7 +2,7 @@
# You can modify these variables
PREFIX="/usr"
INSTALL_DST="/tmp/r2ios"
INSTALL_DST="/tmp/rzios"
USE_SIMULATOR=0
#SIMULATOR_ARCHS="i386+x86_64"
SIMULATOR_ARCHS="x86_64"
@ -11,7 +11,7 @@ EMBED_BITCODE=1
CFLAGS="-O2 -miphoneos-version-min=10.0"
DOSH=0
ARCHS="" # Will be set by -archs argument. If you want to set it -> e.g. ARCHS="armv7+arm64".
MERGE_LIBS=1 # Will merge libs if you build for arm and simulator
MERGE_LIBS=1 # Will merge libs if you build for arm and simulator
# Environment variables
export PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH
@ -99,7 +99,7 @@ showHelp() {
echo " -a, --archs"
echo " Select the archs, you want to build for."
echo " Available archs: armv7, armv7s, arm64, all"
echo " Available archs: armv7, armv7s, arm64, all"
echo " You can select multiple archs by concatenating"
echo " them with a '+' sign."
echo " Or specify 'all' to build for armv7+armv7s+arm64."
@ -139,7 +139,7 @@ if [ $# -eq 0 ] && [ "${#ARCHS}" = 0 ] && [ "${USE_SIMULATOR}" = 0 ]; then
fi
while test $# -gt 0; do
case "$1" in
case "$1" in
-full|--full|-f)
shift
ARCHS="armv7s+arm64"

View file

@ -81,13 +81,13 @@ if [ $? = 0 ]; then
( cd librz ; make librz.dylib )
if [ $? = 0 ]; then
( cd binrz/rizin ; make ios_sdk_sign )
rm -rf /tmp/r2ios
make install DESTDIR=/tmp/r2ios
rm -rf /tmp/r2ios/usr/share/rizin/*/www/enyo/node_modules
( cd /tmp/r2ios && tar czvf ../r2ios-${CPU}.tar.gz ./* )
rm -rf /tmp/rzios
make install DESTDIR=/tmp/rzios
rm -rf /tmp/rzios/usr/share/rizin/*/www/enyo/node_modules
( cd /tmp/rzios && tar czvf ../rzios-${CPU}.tar.gz ./* )
rm -rf sys/cydia/rizin/root
mkdir -p sys/cydia/rizin/root
sudo tar xpzvf /tmp/r2ios-${CPU}.tar.gz -C sys/cydia/rizin/root
sudo tar xpzvf /tmp/rzios-${CPU}.tar.gz -C sys/cydia/rizin/root
( cd sys/cydia/rizin ; sudo make clean ; sudo make )
fi
fi

View file

@ -85,13 +85,13 @@ if [ $? = 0 ]; then
)
fi
( cd binrz/rizin ; ${MAKE} ios_sdk_sign )
rm -rf /tmp/r2ios
${MAKE} install DESTDIR=/tmp/r2ios
rm -rf /tmp/r2ios/usr/share/rizin/*/www/enyo/node_modules
( cd /tmp/r2ios && tar czvf ../r2ios-static-${CPU}.tar.gz ./* )
rm -rf /tmp/rzios
${MAKE} install DESTDIR=/tmp/rzios
rm -rf /tmp/rzios/usr/share/rizin/*/www/enyo/node_modules
( cd /tmp/rzios && tar czvf ../rzios-static-${CPU}.tar.gz ./* )
rm -rf sys/cydia/rizin/root
mkdir -p sys/cydia/rizin/root
sudo tar xpzvf /tmp/r2ios-static-${CPU}.tar.gz -C sys/cydia/rizin/root
sudo tar xpzvf /tmp/rzios-static-${CPU}.tar.gz -C sys/cydia/rizin/root
# ( cd sys/cydia/rizin ; sudo ${MAKE} clean ; sudo ${MAKE} )
# Creating tarball

View file

@ -7,7 +7,7 @@ if test -w $LD ; then
D="$(dirname "$P")"
if [ /usr != "$D" ]; then
echo "$P" > "$LD/rizin.conf"
# do not update symlinks to avoid r2 install issues
# do not update symlinks to avoid rizin install issues
ldconfig -X
fi
fi

View file

@ -17,7 +17,7 @@ sys/meson.py --options use_libuv=false use_sys_magic=false || exit 1
${AR} rs ../librz.a */*.o
)
)
D=r2sdk
D=rizin-sdk
rm -rf $D
mkdir -p $D/lib || exit 1
cp -rf librz/include $D

View file

@ -41,7 +41,7 @@ def set_global_variables():
logging.basicConfig(format='[%(name)s][%(levelname)s]: %(message)s',
level=logging.DEBUG)
log = logging.getLogger('r2-meson')
log = logging.getLogger('rz-meson')
with open(os.path.join(ROOT, 'configure.acr')) as f:
f.readline()

View file

@ -6,7 +6,7 @@
# to uninstall:
# sudo pkgutil --forget org.rizin.rizin
SRC=/tmp/r2osx
SRC=/tmp/rzosx
PREFIX=/usr/local
DST="$(pwd)/sys/osx-pkg/rizin.unpkg"
if [ -n "$1" ]; then

View file

@ -22,5 +22,5 @@
</choice>
<pkg-ref id="org.rizin.rizin" version="0" onConclusion="none" installKBytes="51182">#rizin.pkg</pkg-ref>
<welcome file="welcome.rtf" mime-type="text/enriched"/>
<background file="r2logo.png" mime-type="image/png" alignment="bottomleft"/>
<background file="rizin-logo.png" mime-type="image/png" alignment="bottomleft"/>
</installer-gui-script>

View file

@ -6,8 +6,7 @@ if [ -z "${MAKE}" ]; then
[ $? = 0 ] && MAKE=gmake
fi
echo "All files related to current and previous installations
of r2 (including libraries) will be deleted. Continue? (y/n) "
echo "All files related to current and previous installations of rizin (including libraries) will be deleted. Continue? (y/n) "
read answer
case "$answer" in
y|Y)

View file

@ -69,10 +69,10 @@ shell|sh|-s)
rm -rf dockervol
mkdir -p dockervol
cp -f "$1" "dockervol/$F"
docker run ${ALLOW_DEBUG} ${DEFAULT_CAP} -v $PWD/dockervol:/mnt -p 9090:9090 -ti rizin/rizin:latest r2 ${R2FLAGS} /mnt/$F
docker run ${ALLOW_DEBUG} ${DEFAULT_CAP} -v $PWD/dockervol:/mnt -p 9090:9090 -ti rizin/rizin:latest rizin ${RZFLAGS} /mnt/$F
rm -rf dockervol
else
docker run ${ALLOW_DEBUG} ${DEFAULT_CAP} -v $PWD/dockervol:/mnt -p 9090:9090 -ti rizin/rizin:latest r2 ${R2FLAGS} $1
docker run ${ALLOW_DEBUG} ${DEFAULT_CAP} -v $PWD/dockervol:/mnt -p 9090:9090 -ti rizin/rizin:latest rizin ${RZFLAGS} $1
fi
;;
esac

View file

@ -1,6 +1,6 @@
#!/bin/sh
# Sets up env for programs that use r2 libs, and r2 is installed in a
# Sets up env for programs that use rizin libs, and rizin is installed in a
# non-standard location.
export PKG_CONFIG_PATH="`r2 -H RZ_LIBDIR`/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
export LD_LIBRARY_PATH="`r2 -H RZ_LIBDIR`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
export PKG_CONFIG_PATH="`rizin -H RZ_LIBDIR`/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
export LD_LIBRARY_PATH="`rizin -H RZ_LIBDIR`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"

View file

@ -1,7 +1,7 @@
#!/bin/sh
WRKDIR=/tmp
SDKDIR=${WRKDIR}/r2-sdk
SDKDIR=${WRKDIR}/rizin-sdk
if [ -n "$1" ]; then
if [ -f "$1" ]; then
echo "Target directory exists. Cant build the SDK in there"
@ -31,13 +31,13 @@ FILES=`find librz shlr -iname '*.a'`
cp -f ${FILES} "${SDKDIR}"/lib
OS=`uname`
AR=`uname -m`
SF=r2sdk-${OS}-${AR}
SF=rizin-sdk-${OS}-${AR}
(
cd "${WRKDIR}"
mv r2-sdk "${SF}"
mv rizin-sdk "${SF}"
zip -r "${SF}".zip "${SF}"
)
mv "${WRKDIR}/${SF}" .
mv "${WRKDIR}/${SF}".zip .
ln -fs "${SF}" r2sdk
ln -fs "${SF}" rizin-sdk