From 70cb4e88bafd9baebdd980a6943a247012ba549f Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Mon, 6 May 2024 20:59:05 +0800 Subject: [PATCH] use path environment variable to run uwsgi --- ...th-environment-variable-to-run-uwsgi.patch | 25 +++++++++++++++++++ patch-tracking.spec | 7 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0001-use-path-environment-variable-to-run-uwsgi.patch diff --git a/0001-use-path-environment-variable-to-run-uwsgi.patch b/0001-use-path-environment-variable-to-run-uwsgi.patch new file mode 100644 index 0000000..c03ea8e --- /dev/null +++ b/0001-use-path-environment-variable-to-run-uwsgi.patch @@ -0,0 +1,25 @@ +From c9e121754654cfadefff6e00c678178707058918 Mon Sep 17 00:00:00 2001 +From: hanjinpeng +Date: Mon, 6 May 2024 20:50:32 +0800 +Subject: [PATCH] use path environment variable to run uwsgi + +--- + patch_tracking/patch-tracking | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/patch_tracking/patch-tracking b/patch_tracking/patch-tracking +index d5794be..b0f4fce 100755 +--- a/patch_tracking/patch-tracking ++++ b/patch_tracking/patch-tracking +@@ -8,4 +8,7 @@ settings_file='/etc/patch-tracking/settings.conf' + + server=`grep 'LISTEN' $settings_file | awk -F'=' '{print $2}' | sed -e 's/^[ ]"//g' | sed -e 's/"$//g'` + +-/usr/sbin/uwsgi --master --https "${server},/etc/patch-tracking/self-signed.crt,/etc/patch-tracking/self-signed.key" --wsgi-file "${app_file}" --callable app --chdir "${chdir_path}" --threads 100 --lazy ++echo $PATH | grep -q -E "/usr/bin" || PATH=$PATH:/usr/bin ++echo $PATH | grep -q -E "/usr/sbin" || PATH=$PATH:/usr/sbin ++ ++uwsgi --master --https "${server},/etc/patch-tracking/self-signed.crt,/etc/patch-tracking/self-signed.key" --wsgi-file "${app_file}" --callable app --chdir "${chdir_path}" --threads 100 --lazy +-- +2.43.0 + diff --git a/patch-tracking.spec b/patch-tracking.spec index 77d2fc9..58a781a 100644 --- a/patch-tracking.spec +++ b/patch-tracking.spec @@ -1,12 +1,13 @@ Summary: This is a tool for automatically tracking upstream repository code patches Name: patch-tracking Version: 1.0.1 -Release: 5 +Release: 6 License: Mulan PSL v2 URL: https://gitee.com/openeuler/openEuler-Advisor Source0: patch-tracking-%{version}.tar Patch0000: fix-uwsgi-not-found.patch Patch0001: 0001-fix-uwsgi-path-issue.patch +Patch0002: 0001-use-path-environment-variable-to-run-uwsgi.patch BuildArch: noarch @@ -22,6 +23,7 @@ This is a tool for automatically tracking upstream repository code patches %setup -n patch-tracking-%{version} %patch0 -p1 %patch0001 -p1 +%patch0002 -p1 %build %py3_build @@ -56,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 6 2024 Han Jinpeng - 1.0.1-6 +- Use the path environment variable to run the uwsgi command + * Wed Apr 17 2024 Han Jinpeng - 1.0.1-5 - Fix uwsgi path issue to ensure patch-tracking service start up success -- Gitee