OpenPBS/rpm をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
***rpmbuildの下準備 [#j273d720]
っで、まずは下準備
#code(nonumber){{
[root@openpbs ~]# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
[root@openpbs ~]#
[root@openpbs ~]# mkdir -p ~/rpmbuild/{SOURCES,SPECS}
}}
***pbsproソースファイルの作成 [#d82340c1]
[[https://github.com/openpbs/openpbs>+https://github.com/...
&size(10){最新の「a84a5315fb860037bd9d0b380396e2010511237...
&size(10){tagのv23.06.06には無害なのですが「pbs_mom;TPP;p...
&size(10){2024.10時点では「20e112a2c16968eec72c4b16a9dbd3...
#code(nonumber){{
[root@openpbs ~]# git clone https://github.com/openpbs/op...
[root@openpbs ~]# cd openpbs/
[root@openpbs openpbs]# git tag | tail -n 3
v20.0.1
v22.05.11
v23.06.06
[root@openpbs openpbs]# git checkout -b v23.06.06 refs/ta...
Switched to a new branch 'v23.06.06'
[root@openpbs openpbs]# git branch
master
* v23.06.06
[root@openpbs openpbs]# less openpbs.spec
:
%if !%{defined pbs_version}
%define pbs_version 23.06.06
:
[root@openpbs openpbs]#
}}
ジョブ名に「/」があるとエラーになるので、回避策を入れます...
#code(diff,nonumber){{
--- a/src/lib/Libcmds/ck_job_name.c
+++ b/src/lib/Libcmds/ck_job_name.c
@@ -59,7 +59,7 @@ isalnumspch(int c)
if (isalnum(c) != 0)
return c;
- if (c == '-' || c == '_' || c == '+' || c == '.')
+ if (c == '-' || c == '_' || c == '+' || c == '.' ...
return c;
return 0;
}}
***rpmbuildでビルドするための準備 [#lf45984a]
#code(nonumber){{
[root@openpbs openpbs]# cd ..
[root@openpbs ~]# tar --exclude-vcs --transform 's/openpb...
}}
これで「~/rpmbuild/SOURCES」にソースtarballが用意される(...
あとはopenpbsのspecファイルを「~/rpmbuild/SPECS/」内に配...
幸い openpbs の git にはopenpbs.specファイルが用意されて...
#code(nonumber){{
[root@openpbs ~]# cp openpbs/openpbs.spec ~/rpmbuild/SPECS/
}}
そのままでもいいのだが、一部specファイルを修正します。
***OpenPBS specファイルの修正 [#f88ebabd]
OpenPBSの既定の場所を変更してます. &size(10){全くの好み...
#code(diff,nonumber){{
--- rpmbuild/SPECS/openpbs.spec.orig 2024-10-08 18:09:...
+++ rpmbuild/SPECS/openpbs.spec 2024-10-08 18:10:28.85080...
@@ -56,7 +56,7 @@
%endif
%if !%{defined pbs_home}
-%define pbs_home /var/spool/pbs
+%define pbs_home /var/lib/pbs
%endif
%if !%{defined pbs_dbuser}
}}
***rpmbuildの実行 [#s821d4df]
その前にOpenPBSのbiuldに必要なパッケージをdnfでインストール
&size(10){OSインストール時に「Develpment Tools」を入れて...
#code(nonumber){{
[root@openpbs ~]# dnf --enablerepo=devel install expat-de...
}}
そうしてrpmbuildを実行します
#code(nonumber){{
[root@openpbs ~]# rpmbuild -ba rpmbuild/SPECS/openpbs.spec
}}
完成品がこれ
#code(nonumber){{
[root@openpbs ~]# ls -l rpmbuild/RPMS/x86_64/
-rw-r--r--. 1 root root 1762096 Oct 9 19:16 openpbs-clie...
-rw-r--r--. 1 root root 1790716 Oct 9 19:16 openpbs-clie...
-rw-r--r--. 1 root root 584400 Oct 9 19:16 openpbs-debu...
-rw-r--r--. 1 root root 1849008 Oct 9 19:16 openpbs-debu...
-rw-r--r--. 1 root root 531156 Oct 9 19:16 openpbs-deve...
-rw-r--r--. 1 root root 2081620 Oct 9 19:16 openpbs-exec...
-rw-r--r--. 1 root root 2429128 Oct 9 19:16 openpbs-exec...
-rw-r--r--. 1 root root 2981852 Oct 9 19:16 openpbs-serv...
-rw-r--r--. 1 root root 6960124 Oct 9 19:16 openpbs-serv...
[root@openpbs ~]#
}}
品目が分かりやすくていい
***rockylinux8で v14.1.2 のpbspro を作るには [#g7cb398d]
#code(nonumber){{
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.8 (Green Obsidian)
[root@rockylinux ~]# mkdir -p ~/rpmbuild/{SOURCES,SPECS}
[root@rockylinux ~]# git clone https://github.com/openpbs...
[root@rockylinux ~]# cd openpbs/
[root@rockylinux openpbs]# git checkout -b v14.1.2 refs/t...
[root@rockylinux openpbs]# git branch
master
* v14.1.2
[root@rockylinux openpbs]#
}}
#code(nonumber){{
[root@rockylinux ~]# dnf --enablerepo=devel install expat...
libpq-devel ncurses-devel perl postgresql-contrib pyt...
python2-devel
[root@rockylinux ~]# alternatives --config python
There are 3 programs which provide 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/libexec/no-python
2 /usr/bin/python3
3 /usr/bin/python2
Enter to keep the current selection[+], or type selection...
[root@rockylinux ~]#
[root@rockylinux ~]# python -V
Python 2.7.18
[root@rockylinux ~]#
}}
#code(diff,nonumber){{
diff --git a/m4/with_libical.m4 b/m4/with_libical.m4
index dc14512b..279c53de 100644
--- a/m4/with_libical.m4
+++ b/m4/with_libical.m4
@@ -47,9 +47,9 @@ AC_DEFUN([PBS_AC_WITH_LIBICAL],
libical_dir=["/usr"]
)
AC_MSG_CHECKING([for libical])
- AS_IF([test -r "$libical_dir/include/ical.h"],
+ AS_IF([test -r "$libical_dir/include/libical/ical.h"],
AS_IF([test "$libical_dir" != "/usr"],
- [libical_inc="-I$libical_dir/include"]),
+ [libical_inc="-I$libical_dir/include/libical"]),
AC_MSG_ERROR([libical headers not found.]))
AS_IF([test "$libical_dir" = "/usr"],
# Using system installed libical
diff --git a/src/lib/Libcmds/ck_job_name.c b/src/lib/Libc...
index 2fd99ebf..49bfc1df 100644
--- a/src/lib/Libcmds/ck_job_name.c
+++ b/src/lib/Libcmds/ck_job_name.c
@@ -55,7 +55,7 @@ isalnumspch(int c)
if (isalnum(c) != 0)
return c;
- if (c == '-' || c == '_' || c == '+')
+ if (c == '-' || c == '_' || c == '+' || c == '.' ...
return c;
return 0;
diff --git a/src/lib/Libutil/pbs_aes_encrypt.c b/src/lib/...
index a81c7c58..092178fa 100644
--- a/src/lib/Libutil/pbs_aes_encrypt.c
+++ b/src/lib/Libutil/pbs_aes_encrypt.c
@@ -31,27 +31,27 @@ extern unsigned char pbs_aes_iv[];
int
pbs_encrypt_data(char *uncrypted, int *credtype, size_t ...
{
- EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();;
int plen, len2 = 0;
char *cblk;
- EVP_CIPHER_CTX_init(&ctx);
+ EVP_CIPHER_CTX_init(ctx);
- if (EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), ...
+ if (EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), N...
return -1;
- plen = len + EVP_CIPHER_CTX_block_size(&ctx) + 1;
+ plen = len + EVP_CIPHER_CTX_block_size(ctx) + 1;
cblk = malloc(plen);
if (!cblk)
return -1;
- if (EVP_EncryptUpdate(&ctx, cblk, &plen, uncrypt...
+ if (EVP_EncryptUpdate(ctx, cblk, &plen, uncrypte...
return -1;
- if (EVP_EncryptFinal_ex(&ctx, cblk + plen, &len2...
+ if (EVP_EncryptFinal_ex(ctx, cblk + plen, &len2)...
return -1;
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_free(ctx);
*crypted = cblk;
*outlen = plen + len2;
@@ -88,27 +88,27 @@ pbs_encrypt_pwd(char *str, int *credt...
int
pbs_decrypt_data(char *crypted, int credtype, size_t len...
{
- EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
char *cblk;
int plen, len2 = 0;
- EVP_CIPHER_CTX_init(&ctx);
+ EVP_CIPHER_CTX_init(ctx);
- if (EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), ...
+ if (EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), N...
return -1;
- cblk = malloc(len + EVP_CIPHER_CTX_block_size(&c...
+ cblk = malloc(len + EVP_CIPHER_CTX_block_size(ct...
if (!cblk)
return -1;
- if (EVP_DecryptUpdate(&ctx, cblk, &plen, crypted...
+ if (EVP_DecryptUpdate(ctx, cblk, &plen, crypted,...
return -1;
- if (EVP_DecryptFinal_ex(&ctx, cblk + plen, &len2...
+ if (EVP_DecryptFinal_ex(ctx, cblk + plen, &len2)...
return -1;
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_free(ctx);
*uncrypted = cblk;
*outlen = plen + len2;
diff --git a/src/lib/Libutil/pbs_ical.c b/src/lib/Libutil...
index 948ebc57..4a8abab0 100644
--- a/src/lib/Libutil/pbs_ical.c
+++ b/src/lib/Libutil/pbs_ical.c
@@ -62,7 +62,7 @@
#include "pbs_error.h"
#ifdef LIBICAL
-#include "ical.h"
+#include "libical/ical.h"
#endif
#define DATE_LIMIT (3*(60*60*24*365)) /* Limit to 3 year...
@@ -99,6 +99,7 @@ get_num_occurrences(char *rrule, time_t...
time_t now;
time_t date_limit;
int num_resv = 0;
+ int icalerror_errors_are_fatal;
/* if any of the argument is NULL, we are dealing...
* advance reservation, so return 1 occurrence */
@@ -119,7 +120,7 @@ get_num_occurrences(char *rrule, time...
rt = icalrecurrencetype_from_string(rrule);
- start = icaltime_from_timet(dtstart, 0);
+ start = icaltime_from_timet_with_zone(dtstart, 0,...
icaltimezone_convert_time(&start, icaltimezone_ge...
itr = (struct icalrecur_iterator_impl*) icalrecur...
@@ -178,6 +179,7 @@ get_occurrence(char *rrule, time_t dt...
struct icalrecur_iterator_impl *itr;
int i;
time_t next_occr = dtstart;
+ int icalerror_errors_are_fatal;
if (rrule == NULL)
return dtstart;
@@ -196,7 +198,7 @@ get_occurrence(char *rrule, time_t dt...
rt = icalrecurrencetype_from_string(rrule);
- start = icaltime_from_timet(dtstart, 0);
+ start = icaltime_from_timet_with_zone(dtstart, 0,...
icaltimezone_convert_time(&start, icaltimezone_ge...
next = start;
@@ -268,6 +270,7 @@ check_rrule(char *rrule, time_t dtsta...
long min_occr_duration = -1;
long tmp_occr_duration = 0;
long duration;
+ int icalerror_errors_are_fatal;
*err_code = 0;
icalerror_clear_errno();
@@ -336,7 +339,7 @@ check_rrule(char *rrule, time_t dtsta...
return 0;
}
- start = icaltime_from_timet(dtstart, 0);
+ start = icaltime_from_timet_with_zone(dtstart, 0,...
icaltimezone_convert_time(&start, icaltimezone_ge...
itr = (struct icalrecur_iterator_impl*) icalrecur...
diff --git a/src/resmom/mom_main.c b/src/resmom/mom_main.c
index cefd2a0a..34ed3e6b 100644
--- a/src/resmom/mom_main.c
+++ b/src/resmom/mom_main.c
@@ -10457,7 +10457,7 @@ mom_topology(void)
if (hwloc_topology_init(&topology) == -1)
ret = -1;
else if ((hwloc_topology_load(topology) == -1) ||
- (hwloc_topology_export_xmlbuffer(topology...
+ (hwloc_topology_export_xmlbuffer(topology...
hwloc_topology_destroy(topology);
ret = -1;
}
diff --git a/test/fw/bin/pbs_loganalyzer b/test/fw/bin/pb...
index bacd764f..28dbc4ae 100644
--- a/test/fw/bin/pbs_loganalyzer
+++ b/test/fw/bin/pbs_loganalyzer
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# coding: utf-8
# Copyright (C) 1994-2016 Altair Engineering, Inc.
diff --git a/test/fw/bin/pbs_stat b/test/fw/bin/pbs_stat
index 83af397c..832de5ef 100644
--- a/test/fw/bin/pbs_stat
+++ b/test/fw/bin/pbs_stat
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# coding: utf-8
# Copyright (C) 1994-2016 Altair Engineering, Inc.
}}
#code(nonumber){{
[root@rockylinux openpbs]# cd ..
[root@rockylinux ~]# tar --exclude-vcs --transform 's/ope...
[root@rockylinux ~]# cp openpbs/pbspro.spec ~/rpmbuild/SP...
[root@rockylinux ~]# vi rpmbuild/SPECS/pbspro.spec
}}
#code(diff,nonumber){{
diff -u openpbs/pbspro.spec ./rpmbuild/SPECS/pbspro.spec
--- openpbs/pbspro.spec 2024-05-29 22:53:56.148393717 +0900
+++ ./rpmbuild/SPECS/pbspro.spec 2024-05-30 01:19:...
@@ -42,7 +42,7 @@
%define pbs_version 14.1.2
%define pbs_release 0
%define pbs_prefix /opt/pbs
-%define pbs_home /var/spool/pbs
+%define pbs_home /var/lib/pbs
%define pbs_dbuser postgres
%define pbs_dist %{pbs_name}-%{pbs_version}.tar.gz
@@ -79,8 +79,7 @@
BuildRequires: ncurses-devel
BuildRequires: perl
BuildRequires: postgresql-devel
-BuildRequires: python-devel >= 2.6
-BuildRequires: python-devel < 3.0
+BuildRequires: python2-devel >= 2.6
BuildRequires: tcl-devel
BuildRequires: tk-devel
BuildRequires: swig
@@ -100,8 +99,8 @@
%endif
# Pure python extensions use the 32 bit library path
-%{!?py_site_pkg_32: %global py_site_pkg_32 %(%{__python}...
-%{!?py_site_pkg_64: %global py_site_pkg_64 %(%{__python}...
+%{!?py_site_pkg_32: %global py_site_pkg_32 %(%{__python2...
+%{!?py_site_pkg_64: %global py_site_pkg_64 %(%{__python2...
%description
PBS Professional® is a fast, powerful workload mana...
@@ -123,8 +122,7 @@
Requires: expat
Requires: libedit
Requires: postgresql-server
-Requires: python >= 2.6
-Requires: python < 3.0
+Requires: python2 >= 2.6
Requires: sendmail
Requires: tcl
Requires: tk
@@ -156,8 +154,7 @@
Conflicts: pbs-mom
Conflicts: pbs-cmds
Requires: expat
-Requires: python >= 2.6
-Requires: python < 3.0
+Requires: python2 >= 2.6
Autoreq: 1
%description %{pbs_execution}
@@ -181,8 +178,7 @@
Conflicts: pbs
Conflicts: pbs-mom
Conflicts: pbs-cmds
-Requires: python >= 2.6
-Requires: python < 3.0
+Requires: python2 >= 2.6
Autoreq: 1
%description %{pbs_client}
@@ -205,6 +201,7 @@
%build
[ -d build ] && rm -rf build
+./autogen.sh
mkdir build
cd build
../configure \
}}
#code(diff,nonumber){{
[root@rockylinux ~]# rpmbuild -ba rpmbuild/SPECS/openpbs....
}}
終了行:
***rpmbuildの下準備 [#j273d720]
っで、まずは下準備
#code(nonumber){{
[root@openpbs ~]# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
[root@openpbs ~]#
[root@openpbs ~]# mkdir -p ~/rpmbuild/{SOURCES,SPECS}
}}
***pbsproソースファイルの作成 [#d82340c1]
[[https://github.com/openpbs/openpbs>+https://github.com/...
&size(10){最新の「a84a5315fb860037bd9d0b380396e2010511237...
&size(10){tagのv23.06.06には無害なのですが「pbs_mom;TPP;p...
&size(10){2024.10時点では「20e112a2c16968eec72c4b16a9dbd3...
#code(nonumber){{
[root@openpbs ~]# git clone https://github.com/openpbs/op...
[root@openpbs ~]# cd openpbs/
[root@openpbs openpbs]# git tag | tail -n 3
v20.0.1
v22.05.11
v23.06.06
[root@openpbs openpbs]# git checkout -b v23.06.06 refs/ta...
Switched to a new branch 'v23.06.06'
[root@openpbs openpbs]# git branch
master
* v23.06.06
[root@openpbs openpbs]# less openpbs.spec
:
%if !%{defined pbs_version}
%define pbs_version 23.06.06
:
[root@openpbs openpbs]#
}}
ジョブ名に「/」があるとエラーになるので、回避策を入れます...
#code(diff,nonumber){{
--- a/src/lib/Libcmds/ck_job_name.c
+++ b/src/lib/Libcmds/ck_job_name.c
@@ -59,7 +59,7 @@ isalnumspch(int c)
if (isalnum(c) != 0)
return c;
- if (c == '-' || c == '_' || c == '+' || c == '.')
+ if (c == '-' || c == '_' || c == '+' || c == '.' ...
return c;
return 0;
}}
***rpmbuildでビルドするための準備 [#lf45984a]
#code(nonumber){{
[root@openpbs openpbs]# cd ..
[root@openpbs ~]# tar --exclude-vcs --transform 's/openpb...
}}
これで「~/rpmbuild/SOURCES」にソースtarballが用意される(...
あとはopenpbsのspecファイルを「~/rpmbuild/SPECS/」内に配...
幸い openpbs の git にはopenpbs.specファイルが用意されて...
#code(nonumber){{
[root@openpbs ~]# cp openpbs/openpbs.spec ~/rpmbuild/SPECS/
}}
そのままでもいいのだが、一部specファイルを修正します。
***OpenPBS specファイルの修正 [#f88ebabd]
OpenPBSの既定の場所を変更してます. &size(10){全くの好み...
#code(diff,nonumber){{
--- rpmbuild/SPECS/openpbs.spec.orig 2024-10-08 18:09:...
+++ rpmbuild/SPECS/openpbs.spec 2024-10-08 18:10:28.85080...
@@ -56,7 +56,7 @@
%endif
%if !%{defined pbs_home}
-%define pbs_home /var/spool/pbs
+%define pbs_home /var/lib/pbs
%endif
%if !%{defined pbs_dbuser}
}}
***rpmbuildの実行 [#s821d4df]
その前にOpenPBSのbiuldに必要なパッケージをdnfでインストール
&size(10){OSインストール時に「Develpment Tools」を入れて...
#code(nonumber){{
[root@openpbs ~]# dnf --enablerepo=devel install expat-de...
}}
そうしてrpmbuildを実行します
#code(nonumber){{
[root@openpbs ~]# rpmbuild -ba rpmbuild/SPECS/openpbs.spec
}}
完成品がこれ
#code(nonumber){{
[root@openpbs ~]# ls -l rpmbuild/RPMS/x86_64/
-rw-r--r--. 1 root root 1762096 Oct 9 19:16 openpbs-clie...
-rw-r--r--. 1 root root 1790716 Oct 9 19:16 openpbs-clie...
-rw-r--r--. 1 root root 584400 Oct 9 19:16 openpbs-debu...
-rw-r--r--. 1 root root 1849008 Oct 9 19:16 openpbs-debu...
-rw-r--r--. 1 root root 531156 Oct 9 19:16 openpbs-deve...
-rw-r--r--. 1 root root 2081620 Oct 9 19:16 openpbs-exec...
-rw-r--r--. 1 root root 2429128 Oct 9 19:16 openpbs-exec...
-rw-r--r--. 1 root root 2981852 Oct 9 19:16 openpbs-serv...
-rw-r--r--. 1 root root 6960124 Oct 9 19:16 openpbs-serv...
[root@openpbs ~]#
}}
品目が分かりやすくていい
***rockylinux8で v14.1.2 のpbspro を作るには [#g7cb398d]
#code(nonumber){{
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.8 (Green Obsidian)
[root@rockylinux ~]# mkdir -p ~/rpmbuild/{SOURCES,SPECS}
[root@rockylinux ~]# git clone https://github.com/openpbs...
[root@rockylinux ~]# cd openpbs/
[root@rockylinux openpbs]# git checkout -b v14.1.2 refs/t...
[root@rockylinux openpbs]# git branch
master
* v14.1.2
[root@rockylinux openpbs]#
}}
#code(nonumber){{
[root@rockylinux ~]# dnf --enablerepo=devel install expat...
libpq-devel ncurses-devel perl postgresql-contrib pyt...
python2-devel
[root@rockylinux ~]# alternatives --config python
There are 3 programs which provide 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/libexec/no-python
2 /usr/bin/python3
3 /usr/bin/python2
Enter to keep the current selection[+], or type selection...
[root@rockylinux ~]#
[root@rockylinux ~]# python -V
Python 2.7.18
[root@rockylinux ~]#
}}
#code(diff,nonumber){{
diff --git a/m4/with_libical.m4 b/m4/with_libical.m4
index dc14512b..279c53de 100644
--- a/m4/with_libical.m4
+++ b/m4/with_libical.m4
@@ -47,9 +47,9 @@ AC_DEFUN([PBS_AC_WITH_LIBICAL],
libical_dir=["/usr"]
)
AC_MSG_CHECKING([for libical])
- AS_IF([test -r "$libical_dir/include/ical.h"],
+ AS_IF([test -r "$libical_dir/include/libical/ical.h"],
AS_IF([test "$libical_dir" != "/usr"],
- [libical_inc="-I$libical_dir/include"]),
+ [libical_inc="-I$libical_dir/include/libical"]),
AC_MSG_ERROR([libical headers not found.]))
AS_IF([test "$libical_dir" = "/usr"],
# Using system installed libical
diff --git a/src/lib/Libcmds/ck_job_name.c b/src/lib/Libc...
index 2fd99ebf..49bfc1df 100644
--- a/src/lib/Libcmds/ck_job_name.c
+++ b/src/lib/Libcmds/ck_job_name.c
@@ -55,7 +55,7 @@ isalnumspch(int c)
if (isalnum(c) != 0)
return c;
- if (c == '-' || c == '_' || c == '+')
+ if (c == '-' || c == '_' || c == '+' || c == '.' ...
return c;
return 0;
diff --git a/src/lib/Libutil/pbs_aes_encrypt.c b/src/lib/...
index a81c7c58..092178fa 100644
--- a/src/lib/Libutil/pbs_aes_encrypt.c
+++ b/src/lib/Libutil/pbs_aes_encrypt.c
@@ -31,27 +31,27 @@ extern unsigned char pbs_aes_iv[];
int
pbs_encrypt_data(char *uncrypted, int *credtype, size_t ...
{
- EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();;
int plen, len2 = 0;
char *cblk;
- EVP_CIPHER_CTX_init(&ctx);
+ EVP_CIPHER_CTX_init(ctx);
- if (EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), ...
+ if (EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), N...
return -1;
- plen = len + EVP_CIPHER_CTX_block_size(&ctx) + 1;
+ plen = len + EVP_CIPHER_CTX_block_size(ctx) + 1;
cblk = malloc(plen);
if (!cblk)
return -1;
- if (EVP_EncryptUpdate(&ctx, cblk, &plen, uncrypt...
+ if (EVP_EncryptUpdate(ctx, cblk, &plen, uncrypte...
return -1;
- if (EVP_EncryptFinal_ex(&ctx, cblk + plen, &len2...
+ if (EVP_EncryptFinal_ex(ctx, cblk + plen, &len2)...
return -1;
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_free(ctx);
*crypted = cblk;
*outlen = plen + len2;
@@ -88,27 +88,27 @@ pbs_encrypt_pwd(char *str, int *credt...
int
pbs_decrypt_data(char *crypted, int credtype, size_t len...
{
- EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
char *cblk;
int plen, len2 = 0;
- EVP_CIPHER_CTX_init(&ctx);
+ EVP_CIPHER_CTX_init(ctx);
- if (EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), ...
+ if (EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), N...
return -1;
- cblk = malloc(len + EVP_CIPHER_CTX_block_size(&c...
+ cblk = malloc(len + EVP_CIPHER_CTX_block_size(ct...
if (!cblk)
return -1;
- if (EVP_DecryptUpdate(&ctx, cblk, &plen, crypted...
+ if (EVP_DecryptUpdate(ctx, cblk, &plen, crypted,...
return -1;
- if (EVP_DecryptFinal_ex(&ctx, cblk + plen, &len2...
+ if (EVP_DecryptFinal_ex(ctx, cblk + plen, &len2)...
return -1;
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_free(ctx);
*uncrypted = cblk;
*outlen = plen + len2;
diff --git a/src/lib/Libutil/pbs_ical.c b/src/lib/Libutil...
index 948ebc57..4a8abab0 100644
--- a/src/lib/Libutil/pbs_ical.c
+++ b/src/lib/Libutil/pbs_ical.c
@@ -62,7 +62,7 @@
#include "pbs_error.h"
#ifdef LIBICAL
-#include "ical.h"
+#include "libical/ical.h"
#endif
#define DATE_LIMIT (3*(60*60*24*365)) /* Limit to 3 year...
@@ -99,6 +99,7 @@ get_num_occurrences(char *rrule, time_t...
time_t now;
time_t date_limit;
int num_resv = 0;
+ int icalerror_errors_are_fatal;
/* if any of the argument is NULL, we are dealing...
* advance reservation, so return 1 occurrence */
@@ -119,7 +120,7 @@ get_num_occurrences(char *rrule, time...
rt = icalrecurrencetype_from_string(rrule);
- start = icaltime_from_timet(dtstart, 0);
+ start = icaltime_from_timet_with_zone(dtstart, 0,...
icaltimezone_convert_time(&start, icaltimezone_ge...
itr = (struct icalrecur_iterator_impl*) icalrecur...
@@ -178,6 +179,7 @@ get_occurrence(char *rrule, time_t dt...
struct icalrecur_iterator_impl *itr;
int i;
time_t next_occr = dtstart;
+ int icalerror_errors_are_fatal;
if (rrule == NULL)
return dtstart;
@@ -196,7 +198,7 @@ get_occurrence(char *rrule, time_t dt...
rt = icalrecurrencetype_from_string(rrule);
- start = icaltime_from_timet(dtstart, 0);
+ start = icaltime_from_timet_with_zone(dtstart, 0,...
icaltimezone_convert_time(&start, icaltimezone_ge...
next = start;
@@ -268,6 +270,7 @@ check_rrule(char *rrule, time_t dtsta...
long min_occr_duration = -1;
long tmp_occr_duration = 0;
long duration;
+ int icalerror_errors_are_fatal;
*err_code = 0;
icalerror_clear_errno();
@@ -336,7 +339,7 @@ check_rrule(char *rrule, time_t dtsta...
return 0;
}
- start = icaltime_from_timet(dtstart, 0);
+ start = icaltime_from_timet_with_zone(dtstart, 0,...
icaltimezone_convert_time(&start, icaltimezone_ge...
itr = (struct icalrecur_iterator_impl*) icalrecur...
diff --git a/src/resmom/mom_main.c b/src/resmom/mom_main.c
index cefd2a0a..34ed3e6b 100644
--- a/src/resmom/mom_main.c
+++ b/src/resmom/mom_main.c
@@ -10457,7 +10457,7 @@ mom_topology(void)
if (hwloc_topology_init(&topology) == -1)
ret = -1;
else if ((hwloc_topology_load(topology) == -1) ||
- (hwloc_topology_export_xmlbuffer(topology...
+ (hwloc_topology_export_xmlbuffer(topology...
hwloc_topology_destroy(topology);
ret = -1;
}
diff --git a/test/fw/bin/pbs_loganalyzer b/test/fw/bin/pb...
index bacd764f..28dbc4ae 100644
--- a/test/fw/bin/pbs_loganalyzer
+++ b/test/fw/bin/pbs_loganalyzer
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# coding: utf-8
# Copyright (C) 1994-2016 Altair Engineering, Inc.
diff --git a/test/fw/bin/pbs_stat b/test/fw/bin/pbs_stat
index 83af397c..832de5ef 100644
--- a/test/fw/bin/pbs_stat
+++ b/test/fw/bin/pbs_stat
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# coding: utf-8
# Copyright (C) 1994-2016 Altair Engineering, Inc.
}}
#code(nonumber){{
[root@rockylinux openpbs]# cd ..
[root@rockylinux ~]# tar --exclude-vcs --transform 's/ope...
[root@rockylinux ~]# cp openpbs/pbspro.spec ~/rpmbuild/SP...
[root@rockylinux ~]# vi rpmbuild/SPECS/pbspro.spec
}}
#code(diff,nonumber){{
diff -u openpbs/pbspro.spec ./rpmbuild/SPECS/pbspro.spec
--- openpbs/pbspro.spec 2024-05-29 22:53:56.148393717 +0900
+++ ./rpmbuild/SPECS/pbspro.spec 2024-05-30 01:19:...
@@ -42,7 +42,7 @@
%define pbs_version 14.1.2
%define pbs_release 0
%define pbs_prefix /opt/pbs
-%define pbs_home /var/spool/pbs
+%define pbs_home /var/lib/pbs
%define pbs_dbuser postgres
%define pbs_dist %{pbs_name}-%{pbs_version}.tar.gz
@@ -79,8 +79,7 @@
BuildRequires: ncurses-devel
BuildRequires: perl
BuildRequires: postgresql-devel
-BuildRequires: python-devel >= 2.6
-BuildRequires: python-devel < 3.0
+BuildRequires: python2-devel >= 2.6
BuildRequires: tcl-devel
BuildRequires: tk-devel
BuildRequires: swig
@@ -100,8 +99,8 @@
%endif
# Pure python extensions use the 32 bit library path
-%{!?py_site_pkg_32: %global py_site_pkg_32 %(%{__python}...
-%{!?py_site_pkg_64: %global py_site_pkg_64 %(%{__python}...
+%{!?py_site_pkg_32: %global py_site_pkg_32 %(%{__python2...
+%{!?py_site_pkg_64: %global py_site_pkg_64 %(%{__python2...
%description
PBS Professional® is a fast, powerful workload mana...
@@ -123,8 +122,7 @@
Requires: expat
Requires: libedit
Requires: postgresql-server
-Requires: python >= 2.6
-Requires: python < 3.0
+Requires: python2 >= 2.6
Requires: sendmail
Requires: tcl
Requires: tk
@@ -156,8 +154,7 @@
Conflicts: pbs-mom
Conflicts: pbs-cmds
Requires: expat
-Requires: python >= 2.6
-Requires: python < 3.0
+Requires: python2 >= 2.6
Autoreq: 1
%description %{pbs_execution}
@@ -181,8 +178,7 @@
Conflicts: pbs
Conflicts: pbs-mom
Conflicts: pbs-cmds
-Requires: python >= 2.6
-Requires: python < 3.0
+Requires: python2 >= 2.6
Autoreq: 1
%description %{pbs_client}
@@ -205,6 +201,7 @@
%build
[ -d build ] && rm -rf build
+./autogen.sh
mkdir build
cd build
../configure \
}}
#code(diff,nonumber){{
[root@rockylinux ~]# rpmbuild -ba rpmbuild/SPECS/openpbs....
}}
ページ名:
1