From 4f418f0e1dd9e702490bd3500143cf8251434732 Mon Sep 17 00:00:00 2001 From: motodiary Date: Sun, 28 Apr 2024 10:08:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?replace=20=E2=80=98&&=E2=80=99=20with=20AND?= =?UTF-8?q?=20in=20sql=20in=20as=5Fpgsql=5Fresource.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eplace-with-AND-in-as_pgsql_resource.patch | 25 +++++++++++++++++++ slurm.spec | 5 +++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0003-replace-with-AND-in-as_pgsql_resource.patch diff --git a/0003-replace-with-AND-in-as_pgsql_resource.patch b/0003-replace-with-AND-in-as_pgsql_resource.patch new file mode 100644 index 0000000..fbb856f --- /dev/null +++ b/0003-replace-with-AND-in-as_pgsql_resource.patch @@ -0,0 +1,25 @@ +From 319ebfe23d5381935786e951870d4b6c3c073098 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Sun, 28 Apr 2024 09:50:21 +0800 +Subject: [PATCH] replace && with AND in sql,because pgsql only supports AND + +--- + src/plugins/accounting_storage/pgsql/as_pgsql_resource.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c b/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c +index 1905f92..07f79fc 100755 +--- a/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c ++++ b/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c +@@ -776,7 +776,7 @@ extern List as_pgsql_get_res(pgsql_conn_t *pgsql_conn, uid_t uid, + "id", + tmp, res_table, clus_res_table, + (!res_cond || !res_cond->with_deleted) ? +- " && t2.deleted=0" : "", ++ " AND t2.deleted=0" : "", + extra); + xfree(tmp); + xfree(extra); +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index abe8724..fee0582 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 5 +%define rel 6 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -710,6 +710,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Sun Apr 28 2024 Xing Liu - 21.08.8-6 +- replace ‘&&’ with AND in sql in as_pgsql_resource.c + * Thu Apr 25 2024 Xing Liu - 21.08.8-5 - move autoreconf command from %prep to %build -- Gitee From 7bcb49b1bd3d3a5a216fb591e3b2dd34b9298a2b Mon Sep 17 00:00:00 2001 From: motodiary Date: Sun, 28 Apr 2024 10:19:55 +0800 Subject: [PATCH 2/2] add Patch3 in slurm.spec --- slurm.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/slurm.spec b/slurm.spec index fee0582..6dc710b 100644 --- a/slurm.spec +++ b/slurm.spec @@ -18,6 +18,7 @@ URL: https://slurm.schedmd.com/ Source: %{slurm_source_dir}.tar.bz2 Patch1: 0001-support-oversubscribe-in-submit_job-restapi.patch Patch2: 0002-add-pgsql-plugin.patch +Patch3: 0003-replace-with-AND-in-as_pgsql_resource.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -711,6 +712,7 @@ rm -rf %{buildroot} %changelog * Sun Apr 28 2024 Xing Liu - 21.08.8-6 +- add Patch3 in slurm.spec - replace ‘&&’ with AND in sql in as_pgsql_resource.c * Thu Apr 25 2024 Xing Liu - 21.08.8-5 -- Gitee