※リポジトリは、https://github.com/linux-ha-japan/pm_crmgen-1.0 へ移行しました。
Pacemaker 1.0 設定編集ツール
Heartbeat-2.1.4 用 hb-cibgen(*) の Pacemaker対応版。
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10290
Revision | 5f54b701f9a97bf9d25244bfb6374cadefd1bc81 (tree) |
---|---|
Time | 2011-12-14 14:33:11 |
Author | Kazunori INOUE <inouekazu@inte...> |
Commiter | Kazunori INOUE |
Update versions
@@ -0,0 +1,9 @@ | ||
1 | + * RHEL5の環境でRPMをビルドする場合は、以下のマクロファイルを作成してください。 | |
2 | + | |
3 | +[root@x3650a ~]# cat /etc/rpm/macros.dist | |
4 | +# dist macros. | |
5 | + | |
6 | +%rhel 5 | |
7 | +%dist .el5 | |
8 | +%el5 1 | |
9 | +[root@x3650a ~]# |
@@ -2,12 +2,11 @@ | ||
2 | 2 | # Process this file with autoconf to produce a configure script. |
3 | 3 | |
4 | 4 | AC_PREREQ(2.59) |
5 | -AC_INIT(pm_crmgen, 1.1) | |
6 | -AM_INIT_AUTOMAKE(pm_crmgen, 1.1) | |
5 | +AC_INIT(pm_crmgen, 1.2) | |
6 | +AM_INIT_AUTOMAKE(pm_crmgen, 1.2) | |
7 | 7 | |
8 | 8 | # Checks for programs. |
9 | 9 | AC_PROG_LN_S |
10 | - | |
11 | 10 | AC_PREFIX_DEFAULT(/usr) |
12 | 11 | |
13 | 12 | dnl =============================================== |
@@ -21,30 +20,10 @@ | ||
21 | 20 | fi |
22 | 21 | AC_MSG_RESULT(using $PYTHON); |
23 | 22 | |
24 | -prefix_orig="$prefix" | |
25 | 23 | prefix=`eval echo "$prefix"` |
26 | 24 | case $prefix in |
27 | 25 | NONE) prefix=/usr;; |
28 | 26 | esac |
29 | -var(){ | |
30 | - case $1 in | |
31 | - *'${'*) res=`eval echo "$1"`;; | |
32 | - *) res="$1";; | |
33 | - esac | |
34 | - case "$res" in | |
35 | - ""|NONE) echo "$2";; | |
36 | - *) echo "$res";; | |
37 | - esac | |
38 | -} | |
39 | - | |
40 | -grep "release 6" /etc/redhat-release -q | |
41 | -if test $? = 0; then | |
42 | - rhelver=6 | |
43 | -else | |
44 | - rhelver=5 | |
45 | -fi | |
46 | -RHEL_VER="$rhelver" | |
47 | -AC_SUBST(RHEL_VER) | |
48 | 27 | |
49 | 28 | AC_CONFIG_FILES(Makefile \ |
50 | 29 | pm_crmgen.spec |
@@ -169,7 +169,7 @@ | ||
169 | 169 | ''' |
170 | 170 | def optionParser(self): |
171 | 171 | usage = '%prog [options] CSV_FILE' |
172 | - version = '1.1' | |
172 | + version = '1.2' | |
173 | 173 | description = " character encoding of supported CSV_FILE are 'UTF-8' and 'Shift_JIS'" |
174 | 174 | prog = 'pm_crmgen' |
175 | 175 | p = OptionParser(usage=usage,version=version,description=description,prog=prog) |
@@ -1756,18 +1756,18 @@ | ||
1756 | 1756 | ・要素の前後の全半角空白/タブ/改行を削除 |
1757 | 1757 | ・文字列中の改行を半角空白に置換 |
1758 | 1758 | [引数] |
1759 | - list : 変換対象のリスト | |
1759 | + tl : 変換対象のリスト | |
1760 | 1760 | encoding : `encoding' -> Unicode に変換 |
1761 | 1761 | [戻り値] |
1762 | 1762 | True : OK |
1763 | 1763 | False : NG |
1764 | 1764 | ''' |
1765 | -def unicode_listitem(list,encoding): | |
1766 | - for i,data in [(i,x) for (i,x) in enumerate(list) if x]: | |
1765 | +def unicode_listitem(tl,encoding): | |
1766 | + for i,data in [(i,x) for (i,x) in enumerate(tl) if x]: | |
1767 | 1767 | while data.count('\n\n'): |
1768 | 1768 | data = data.replace('\n\n','\n') |
1769 | 1769 | try: |
1770 | - list[i] = del_blank(unicode(data.replace('\n',' '),encoding)) | |
1770 | + tl[i] = del_blank(unicode(data.replace('\n',' '),encoding)) | |
1771 | 1771 | except: |
1772 | 1772 | log.error(u'データのUnicodeへの変換に失敗しました。') |
1773 | 1773 | return False |
@@ -3,8 +3,8 @@ | ||
3 | 3 | ######################################## |
4 | 4 | %define __check_files %{nil} |
5 | 5 | %define name pm_crmgen |
6 | -%define version 1.1 | |
7 | -%define release 1.el@RHEL_VER@ | |
6 | +%define version 1.2 | |
7 | +%define release 1 | |
8 | 8 | %define prefix /usr |
9 | 9 | %define ORGARCH %{name}-%{version} |
10 | 10 | # |
@@ -13,7 +13,7 @@ | ||
13 | 13 | Summary: Pacemaker crm-file generator |
14 | 14 | Name: %{name} |
15 | 15 | Version: %{version} |
16 | -Release: %{release} | |
16 | +Release: %{release}%{?dist} | |
17 | 17 | Group: Applications |
18 | 18 | Source: %{ORGARCH}.tar.gz |
19 | 19 | License: GPL |