From 57a196d2fc9da93cb0e71315f0047a0300d16695 Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Wed, 8 May 2024 17:30:45 +0800 Subject: [PATCH] fix uwsgi path not found issue --- 0001-fix-uwsgi-path-not-found-issue.patch | 25 +++++++++++++++++++++++ fix-uwsgi-not-found.patch | 9 -------- patch-tracking.spec | 12 ++++++++--- 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 0001-fix-uwsgi-path-not-found-issue.patch delete mode 100644 fix-uwsgi-not-found.patch diff --git a/0001-fix-uwsgi-path-not-found-issue.patch b/0001-fix-uwsgi-path-not-found-issue.patch new file mode 100644 index 0000000..241b0c0 --- /dev/null +++ b/0001-fix-uwsgi-path-not-found-issue.patch @@ -0,0 +1,25 @@ +From b756c4d49636d935adab3422b3d7967992b4cfdc Mon Sep 17 00:00:00 2001 +From: hanjinpeng +Date: Tue, 7 May 2024 11:05:48 +0800 +Subject: [PATCH] fix uwsgi path not found issue + +--- + 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 f5961fc..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/local/bin/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/fix-uwsgi-not-found.patch b/fix-uwsgi-not-found.patch deleted file mode 100644 index 57d44d0..0000000 --- a/fix-uwsgi-not-found.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --color -Nur a/patch_tracking/patch-tracking b/patch_tracking/patch-tracking ---- a/patch_tracking/patch-tracking 2020-09-07 18:26:52.000000000 +0800 -+++ b/patch_tracking/patch-tracking 2022-03-07 19:54:18.156108927 +0800 -@@ -8,4 +8,4 @@ - - server=`grep 'LISTEN' $settings_file | awk -F'=' '{print $2}' | sed -e 's/^[ ]"//g' | sed -e 's/"$//g'` - --/usr/local/bin/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 -+/usr/bin/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 diff --git a/patch-tracking.spec b/patch-tracking.spec index 49ed769..6c7a257 100644 --- a/patch-tracking.spec +++ b/patch-tracking.spec @@ -1,13 +1,13 @@ Summary: This is a tool for automatically tracking upstream repository code patches Name: patch-tracking Version: 1.0.1 -Release: 4 +Release: 6 License: Mulan PSL v2 URL: https://gitee.com/openeuler/openEuler-Advisor Source0: patch-tracking-%{version}.tar -Patch0000: fix-uwsgi-not-found.patch -BuildArch: noarch +Patch0: 0001-fix-uwsgi-path-not-found-issue.patch +BuildArch: noarch BuildRequires: python3-setuptools systemd Requires: python3-uWSGI python3-flask python3-Flask-SQLAlchemy python3-pandas @@ -53,6 +53,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 7 2024 Han Jinpeng - 1.0.1-6 +- Fix uwsgi not found issue, 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 + * Tue Feb 28 2023 liheavy - 1.0.1-4 - Add ReadMe and add install Requires -- Gitee