Skip to content
Snippets Groups Projects
Commit 73a375b9 authored by Aleš Mrázek's avatar Aleš Mrázek Committed by Vladimír Čunát
Browse files

manager: unnecessary scripts removed

parent e3cd3e61
Branches
Tags
1 merge request!1410manager: new-policy cleanup
This diff is collapsed.
......@@ -53,7 +53,6 @@ knot-resolver = 'knot_resolver_manager.__main__:run'
[tool.poe.tasks]
run = { cmd = "scripts/run", help = "Run the manager" }
run-new-policy = { cmd = "scripts/run-new-policy", help = "Run the manager with 'new-policy' kresd" }
run-debug = { cmd = "scripts/run-debug", help = "Run the manager under debugger" }
docs = { cmd = "scripts/docs", help = "Create HTML documentation" }
test = { shell = "env PYTHONPATH=. pytest --junitxml=unit.junit.xml --cov=knot_resolver_manager --show-capture=all tests/unit/", help = "Run tests" }
......
......@@ -50,36 +50,3 @@ function build_kresd {
export PATH="$(realpath manager/.install_kresd)/sbin:$PATH"
popd
}
function build_kresd_new_policy {
echo
echo Building Knot Resolver
echo ----------------------
echo -e "${blue}In case of an compilation error, run this command to try to fix it:${reset}"
echo -e "\t${blue}rm -r $(realpath .install_kresd) $(realpath .build_kresd)${reset}"
echo
pushd ..
rm -rf manager/.install_kresd manager/.build_kresd
mkdir -p manager/.build_kresd manager/.install_kresd
if [ -d "kres-new-policy" ]
then
echo updating repository...
cd kres-new-policy
git pull
else
echo cloning repository...
git clone -b new-policy https://gitlab.nic.cz/knot/knot-resolver.git kres-new-policy
cd kres-new-policy
git submodule update --init --recursive
fi
meson setup ../manager/.build_kresd --prefix=$(realpath ../manager/.install_kresd) --default-library=static --buildtype=debug
ninja -C ../manager/.build_kresd
ninja install -C ../manager/.build_kresd
cd ..
export PATH="$(realpath manager/.install_kresd)/sbin:$PATH"
popd
}
\ No newline at end of file
#!/bin/bash
# ensure consistent behaviour
src_dir="$(dirname "$(realpath "$0")")"
source $src_dir/_env.sh
build_kresd_new_policy
echo
echo Building Knot Resolver Manager native extensions
echo ------------------------------------------------
poetry build
# copy native modules from build directory to source directory
shopt -s globstar
shopt -s nullglob
for d in build/lib*; do
for f in "$d/"**/*.so; do
cp -v "$f" ${f#"$d/"}
done
done
shopt -u globstar
shopt -u nullglob
echo
echo Knot Manager API is accessible on http://localhost:5000
echo -------------------------------------------------------
python3 -m knot_resolver_manager -c etc/knot-resolver/config.policy.dev.yml $@
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment