スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

cronで実行するプログラムに引数としてdateコマンドで日付を渡す

cronで実行するものに日付を引数で与えたいときには

program_path `date '+\%Y\%m\%d'`

みたいに「%」を「\」でescapeする。

これでめでたくYYYYMMDDを渡せるわけだけど、RHEL ES3だと渡ってくる値が

\YYYY\MM\DD

になってしまう…。

じゃあ「\」無しでいけるかと言えばそれは無理っぽい。どうしたもんか。

結局program側で渡ってきた「\」を除去する処理を入れた。
スポンサーサイト

JavaをバージョンアップしたときのEclipseの設定変更あれこれ

OSはWindows7 Pro SP1 64bit。

EclipseはINDIGO(3.7.2)。

JDKを6 update 43から7 update 17にアップデートしたときのメモ。

JDK 7はOracleからダウンロードして普通にインストール。

Eclipseを開いて

Window→Preferences→Java→Compiler→Compiler compliance levelで1.7を選択。

すると下の方に

When selecting 1.7 compliance, make sure to have a compatible JRE installed and activated (currently 1.6). Configure...

とか出るので「Configure...」のところをクリック(あるいはJava→Installed JREsをクリック)。

そこでAdd...ボタンをクリック→Standard VMを選択してNextボタンをクリック。

Directory...ボタンをクリックしてC:\Program Files\Java\jre7を選択してOKボタンをクリック→Finishボタンをクリック。

Installed JREsの一覧に追加されたjre7にチェックを入れてOKボタンをクリック。

The compiler settings have changed. A full rebuild is required for changes to take effect. Do the full build now?
とか出てくるからYesボタンをクリック。

----------- 以下プロジェクトごとに繰り返し -----------
Package Explorerからプロジェクトを右クリック→Properties→Java Compiler→Use compliance from execution environment 'JavaSE-1.6 on the 'Java Build Path'についてるチェックを外す。

すると下の方に

When selecting 1.7 compliance, make sure to have a compatible JRE installed and activated (current 1.6). Configure the 'Installed JREs' and 'Execution Environments'or change the JRE on the 'Java Build Path'.

とか出るので'Java Build Path'のところをクリック。

そこでAdd Library...ボタンをクリック→JRE System Libraryを選択してNextボタンをクリック→Workspace default JRE (jre7)を選択してFinishボタンをクリック。

JRE System Libraary [jre6]を選択してRemoveボタンをクリック→OKボタンをクリック。

The compiler settings have changed. A rebuild of the project is required for changes to take effect. Build the project now?
とか出てくるからYesボタンをクリック。

Package Explorerからプロジェクトを右クリック→Properties→Project Facets→Javaを1.7に変更してOKボタンをクリック。
----------- ここまで -----------

Window→Preferences→Server→Runtime Environments→Apache Tomcat v7.0を選択してEdit...ボタンをクリック→JRE:でjre7を選択してFinishボタンをクリック→OKボタンをクリック。

Window→Preferences→Java→Installed JREs→jre6を選択してRemoveボタンをクリック→OKボタンをクリック

上記プロジェクトごとの変更のところでProperties→Project Facets→Javaの変更をやらないとプロジェクト名の赤バツ印が消えないプロジェクトがあった。

Windows→Show View→Problems

で見ると

Java compiler level does not match the version of the installed Java project facet.

となっていて気付いた次第。

Java 7とEclipseをMountain Lionにインストール(Java 6なしで)

Mountain LionにJava SE 7u9をインストールした後Eclipseをインストールして起動したところ、こんなダイアログが出て先に進まない。
Java7_Eclipse
Java 6に見せかけたシンボリックリンクを張るとうまくいった。
こんな感じ

$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

RHEL5系用にBIND9.9をrpmbuild

SRPMとして
http://centos.alt.ru/repository/centos/5/SRPMS/bind-9.9.1-4.P3.el5.src.rpm
を元にした。

# rpm -ivh bind-9.9.1-4.P3.el5.src.rpm
# cd /usr/src/redhat/SOURCE
# cp SRC/bind-9.9.2.tar.gz .
# tar zxf bind-9.9.2.tar.gz
# cd bind-9.9.2
# cp configure.in configure.in.orig
# vi configure.in
#AC_C_FLEXIBLE_ARRAY_MEMBER ← コメントアウト

# diff -up configure.in configure.in.orig
--- configure.in.orig   2012-09-27 09:35:19.000000000 +0900
+++ configure.in 2012-10-10 17:34:15.000000000 +0900
@@ -372,7 +372,7 @@ AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
-AC_C_FLEXIBLE_ARRAY_MEMBER
+#AC_C_FLEXIBLE_ARRAY_MEMBER

#
# Older versions of HP/UX don't define seteuid() and setegid()

# vi ../bind-9.9.0-RHEL.patch
上記をコピペして修正したものを貼り付け(元々あった記述は全削除)。
--- bind-9.9.2/configure.in.orig   2012-09-27 09:35:19.000000000 +0900 ← 「bind-9.9.2/」を付け足し
+++ bind-9.9.2/configure.in 2012-10-10 17:34:15.000000000 +0900 ← 「bind-9.9.2/」を付け足し
@@ -372,7 +372,7 @@ AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
-AC_C_FLEXIBLE_ARRAY_MEMBER
+#AC_C_FLEXIBLE_ARRAY_MEMBER

#
# Older versions of HP/UX don't define seteuid() and setegid()

# rm -rf bind-9.9.2
# cd ../SPEC
# vi bind9_9.spec

差分だけピックアップすると、
%define PATCHVER P3 ← コメントアウト

%define VERSION %{version} ← 有効化
#%define VERSION %{version}-%{PATCHVER} ← コメントアウト

%{?!SDB: %define SDB 0} ← 0に変更
%{?!GSSTSIG: %define GSSTSIG 0} ← 0に変更
%{?!PKCS11: %define PKCS11 0} ← 0に変更

Version: 9.9.2 ← 変更
Release: %{?dist} ← 変更

コメントアウト

## Common patches
#Patch5: bind-nonexec.patch
#Patch10: bind-9.5-PIE.patch
#Patch16: bind-9.3.2-redhat_doc.patch
#Patch71: bind-9.5-overflow.patch
#Patch72: bind-9.5-dlz-64bit.patch
#Patch87: bind-9.5-parallel-build.patch
#Patch99: bind-96-libtool2.patch
#Patch101:bind-96-old-api.patch
#Patch102:bind-95-rh452060.patch
#Patch106:bind93-rh490837.patch
#Patch107:bind97-dist-pkcs11.patch
#Patch109:bind97-rh478718.patch
#Patch110:bind97-rh507429.patch
#Patch111:bind97-compat-default-keysdir.patch

## SDB patches
#Patch11: bind-9.3.2b2-sdbsrc.patch
#Patch12: bind-9.5-sdb.patch
#Patch62: bind-9.5-sdb-sqlite-bld.patch
#
## needs inpection
#Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
#Patch104: bind-96-dyndb.patch
#
## IDN paches
#Patch73: bind-9.5-libidn.patch
#Patch83: bind-9.5-libidn2.patch
#Patch85: bind-9.5-libidn3.patch
#Patch94: bind95-rh461409.patch

コメントアウト

## Common patches
#%patch5 -p1 -b .nonexec
#%patch10 -p1 -b .PIE
#%patch16 -p1 -b .redhat_doc
#%patch104 -p1 -b .dyndb
#%patch111 -p1 -b .compat-default-keysdir
#%if %{SDB}
#%patch101 -p1 -b .old-api
#mkdir bin/named-sdb
#cp -r bin/named/* bin/named-sdb
#%patch11 -p1 -b .sdbsrc
## SDB ldap
#cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named-sdb
## SDB postgreSQL
#cp -fp contrib/sdb/pgsql/pgsqldb.[ch] bin/named-sdb
## SDB sqlite
#cp -fp contrib/sdb/sqlite/sqlitedb.[ch] bin/named-sdb
## SDB Berkeley DB - needs to be ported to DB4!
##cp -fp contrib/sdb/bdb/bdb.[ch] bin/named_sdb
## SDB dir
#cp -fp contrib/sdb/dir/dirdb.[ch] bin/named-sdb
## SDB tools
#mkdir -p bin/sdb_tools
#cp -fp %{SOURCE30} bin/sdb_tools/ldap2zone.c
#cp -fp %{SOURCE7} bin/sdb_tools/Makefile.in
##cp -fp contrib/sdb/bdb/zone2bdb.c bin/sdb_tools
#cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/sdb_tools
#cp -fp contrib/sdb/pgsql/zonetodb.c bin/sdb_tools
#cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools
#%patch12 -p1 -b .sdb
#%endif
#%if %{SDB}
#%patch17 -p1 -b .fix_sdb_ldap
#%endif
#%if %{SDB}
#%patch62 -p1 -b .sdb-sqlite-bld
#%endif
##%patch71 -p1 -b .overflow
#%ifnarch alpha ia64
#%patch72 -p1 -b .64bit
#%endif
#%patch73 -p1 -b .libidn
#%patch83 -p1 -b .libidn2
#%patch85 -p1 -b .libidn3
#%patch87 -p1 -b .parallel
#%patch94 -p1 -b .rh461409

コメントアウト

#%patch99 -p1 -b .libtool2
#
#%patch102 -p1 -b .rh452060
#%patch106 -p0 -b .rh490837
#%patch107 -p1 -b .dist-pkcs11
#%patch109 -p1 -b .rh478718
#%patch110 -p1 -b .rh507429

コメントアウト

## Sparc and s390 arches need to use -fPIE
#%ifarch sparcv9 sparc64 s390 s390x
#for i in bin/named{,-sdb}/{,unix}/Makefile.in; do
# sed -i 's|fpie|fPIE|g' $i
#done
#%endif
#
#:;

最終的にはこんな感じ
#
# Red Hat BIND package .spec file
#

#%define PATCHVER P3
#%define PREVER rc2
#%define VERSION %{version}%{PREVER}
%define VERSION %{version}
#%define VERSION %{version}-%{PATCHVER}

%{?!SDB: %define SDB 0}
%{?!test: %define test 0}
%{?!bind_uid: %define bind_uid 25}
%{?!bind_gid: %define bind_gid 25}
%{?!GSSTSIG: %define GSSTSIG 0}
%{?!PKCS11: %define PKCS11 0}
%define bind_dir /var/named
%define chroot_prefix %{bind_dir}/chroot
#
Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
Name: bind
License: ISC
Version: 9.9.2
Release: %{?dist}
Epoch: 36
Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Group: System Environment/Daemons
#
Source: ftp://ftp.isc.org/isc/bind9/%{VERSION}/bind-%{VERSION}.tar.gz
Source1: named.sysconfig
Source2: named.init
Source3: named.logrotate
Source4: named.NetworkManager
Source5: rfc1912.txt
Source7: bind-9.3.1rc1-sdb_tools-Makefile.in
Source8: dnszone.schema
Source12: README.sdb_pgsql
Source21: Copyright.caching-nameserver
Source25: named.conf.sample
Source28: config-6.tar.bz2
Source30: ldap2zone.c
Source31: ldap2zone.1
Source32: named-sdb.8
Source33: zonetodb.1
Source34: zone2sqlite.1

## Common patches
#Patch5: bind-nonexec.patch
#Patch10: bind-9.5-PIE.patch
#Patch16: bind-9.3.2-redhat_doc.patch
#Patch71: bind-9.5-overflow.patch
#Patch72: bind-9.5-dlz-64bit.patch
#Patch87: bind-9.5-parallel-build.patch
#Patch99: bind-96-libtool2.patch
#Patch101:bind-96-old-api.patch
#Patch102:bind-95-rh452060.patch
#Patch106:bind93-rh490837.patch
#Patch107:bind97-dist-pkcs11.patch
#Patch109:bind97-rh478718.patch
#Patch110:bind97-rh507429.patch
#Patch111:bind97-compat-default-keysdir.patch

## SDB patches
#Patch11: bind-9.3.2b2-sdbsrc.patch
#Patch12: bind-9.5-sdb.patch
#Patch62: bind-9.5-sdb-sqlite-bld.patch
#
## needs inpection
#Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
#Patch104: bind-96-dyndb.patch
#
## IDN paches
#Patch73: bind-9.5-libidn.patch
#Patch83: bind-9.5-libidn2.patch
#Patch85: bind-9.5-libidn3.patch
#Patch94: bind95-rh461409.patch

# RHEL 5 compat
Patch999: bind-9.9.0-RHEL.patch
#
Requires: mktemp
Requires(post): grep, chkconfig
Requires(pre): shadow-utils
Requires(preun):chkconfig
Obsoletes: bind-config < 30:9.3.2-34.fc6
Provides: bind-config = 30:9.3.2-34.fc6
Obsoletes: caching-nameserver < 31:9.4.1-7.fc8
Provides: caching-nameserver = 31:9.4.1-7.fc8
Obsoletes: dnssec-conf < 1.22-6
Provides: dnssec-conf = 1.22-5
BuildRequires: openssl-devel, libtool, autoconf, pkgconfig, libcap-devel
BuildRequires: libidn-devel, libxml2-devel
%if %{SDB}
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mysql-devel
%endif
%if %{test}
BuildRequires: net-tools
%endif
%if %{GSSTSIG}
BuildRequires: krb5-devel
%endif

%description
BIND (Berkeley Internet Name Domain) is an implementation of the DNS
(Domain Name System) protocols. BIND includes a DNS server (named),
which resolves host names to IP addresses; a resolver library
(routines for applications to use when interfacing with DNS); and
tools for verifying that the DNS server is operating properly.

%if %{PKCS11}
%package pkcs11
Summary: Bind PKCS#11 tools for using DNSSEC
Group: System Environment/Daemons
Requires: engine_pkcs11 opensc
#BuildRequires: opensc-devel

%description pkcs11
This is a set of PKCS#11 utilities that when used together create rsa
keys in a PKCS11 keystore, such as provided by opencryptoki. The keys
will have a label of "zone,zsk|ksk,xxx" and an id of the keytag in hex.
%endif

%if %{SDB}
%package sdb
Summary: BIND server with database backends and DLZ support
Group: System Environment/Daemons
Requires: bind

%description sdb
BIND (Berkeley Internet Name Domain) is an implementation of the DNS
(Domain Name System) protocols. BIND includes a DNS server (named-sdb)
which has compiled-in SDB (Simplified Database Backend) which includes
support for using alternative Zone Databases stored in an LDAP server
(ldapdb), a postgreSQL database (pgsqldb), an sqlite database (sqlitedb),
or in the filesystem (dirdb), in addition to the standard in-memory RBT
(Red Black Tree) zone database. It also includes support for DLZ
(Dynamic Loadable Zones)
%endif

%package libs
Summary: Libraries used by the BIND DNS packages
Group: Applications/System
Obsoletes:bind-libbind-devel < 31:9.3.3-4.fc7
Provides: bind-libbind-devel = 31:9.3.3-4.fc7

%description libs
Contains libraries used by both the bind server package as well as the utils
packages.

%package utils
Summary: Utilities for querying DNS name servers
Group: Applications/System

%description utils
Bind-utils contains a collection of utilities for querying DNS (Domain
Name System) name servers to find out information about Internet
hosts. These tools will provide you with the IP addresses for given
host names, as well as other information about registered domains and
network addresses.

You should install bind-utils if you need to get information from DNS name
servers.

%package devel
Summary: Header files and libraries needed for BIND DNS development
Group: Development/Libraries
Obsoletes:bind-libbind-devel < 31:9.3.3-4.fc7
Provides: bind-libbind-devel = 31:9.3.3-4.fc7

%description devel
The bind-devel package contains all the header files and libraries
required for development with ISC BIND 9 and BIND 8


%package chroot
Summary: A chroot runtime environment for the ISC BIND DNS server, named(8)
Group: System Environment/Daemons
Prefix: %{chroot_prefix}
Requires(post): grep
Requires(preun):grep
Requires: bind = %{epoch}:%{version}-%{release}

%description chroot
This package contains a tree of files which can be used as a
chroot(2) jail for the named(8) program from the BIND package.
Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>

%prep
%setup -q -n %{name}-%{VERSION}

## Common patches
#%patch5 -p1 -b .nonexec
#%patch10 -p1 -b .PIE
#%patch16 -p1 -b .redhat_doc
#%patch104 -p1 -b .dyndb
#%patch111 -p1 -b .compat-default-keysdir
#%if %{SDB}
#%patch101 -p1 -b .old-api
#mkdir bin/named-sdb
#cp -r bin/named/* bin/named-sdb
#%patch11 -p1 -b .sdbsrc
## SDB ldap
#cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named-sdb
## SDB postgreSQL
#cp -fp contrib/sdb/pgsql/pgsqldb.[ch] bin/named-sdb
## SDB sqlite
#cp -fp contrib/sdb/sqlite/sqlitedb.[ch] bin/named-sdb
## SDB Berkeley DB - needs to be ported to DB4!
##cp -fp contrib/sdb/bdb/bdb.[ch] bin/named_sdb
## SDB dir
#cp -fp contrib/sdb/dir/dirdb.[ch] bin/named-sdb
## SDB tools
#mkdir -p bin/sdb_tools
#cp -fp %{SOURCE30} bin/sdb_tools/ldap2zone.c
#cp -fp %{SOURCE7} bin/sdb_tools/Makefile.in
##cp -fp contrib/sdb/bdb/zone2bdb.c bin/sdb_tools
#cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/sdb_tools
#cp -fp contrib/sdb/pgsql/zonetodb.c bin/sdb_tools
#cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools
#%patch12 -p1 -b .sdb
#%endif
#%if %{SDB}
#%patch17 -p1 -b .fix_sdb_ldap
#%endif
#%if %{SDB}
#%patch62 -p1 -b .sdb-sqlite-bld
#%endif
##%patch71 -p1 -b .overflow
#%ifnarch alpha ia64
#%patch72 -p1 -b .64bit
#%endif
#%patch73 -p1 -b .libidn
#%patch83 -p1 -b .libidn2
#%patch85 -p1 -b .libidn3
#%patch87 -p1 -b .parallel
#%patch94 -p1 -b .rh461409
#
## XXX due new libtool. Not sure about proper upstream approach yet.
mkdir m4
#%patch99 -p1 -b .libtool2
#
#%patch102 -p1 -b .rh452060
#%patch106 -p0 -b .rh490837
#%patch107 -p1 -b .dist-pkcs11
#%patch109 -p1 -b .rh478718
#%patch110 -p1 -b .rh507429
# RHEL 5 compat
%patch999 -p1 -b .compat

## Sparc and s390 arches need to use -fPIE
#%ifarch sparcv9 sparc64 s390 s390x
#for i in bin/named{,-sdb}/{,unix}/Makefile.in; do
# sed -i 's|fpie|fPIE|g' $i
#done
#%endif
#
#:;

%build
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
export CPPFLAGS="$CPPFLAGS -DDIG_SIGCHASE"
export STD_CDEFINES="$CPPFLAGS"

sed -i -e \
's/RELEASEVER=\(.*\)/RELEASEVER=\1-RedHat-%{version}-%{release}/' \
version

libtoolize -c -f; aclocal -I m4 --force; autoconf -f

%configure \
--with-libtool \
--localstatedir=/var \
--enable-threads \
--enable-ipv6 \
--with-pic \
--disable-static \
--disable-openssl-version-check \
%if %{PKCS11}
--with-pkcs11=yes \
%endif
%if %{SDB}
--with-dlz-ldap=yes \
--with-dlz-postgres=yes \
--with-dlz-mysql=yes \
--with-dlz-filesystem=yes \
%endif
%if %{GSSTSIG}
--with-gssapi=yes \
--disable-isc-spnego \
%endif
;
make %{?_smp_mflags}

%if %{test}
%check
if [ "`whoami`" = 'root' ]; then
set -e
chmod -R a+rwX .
pushd bin/tests
pushd system
./ifconfig.sh up
popd
make test
e=$?
pushd system
./ifconfig.sh down
popd
popd
if [ "$e" -ne 0 ]; then
echo "ERROR: this build of BIND failed 'make test'. Aborting."
exit $e;
fi;
else
echo 'only root can run the tests (they require an ifconfig).'
%endif

%install
rm -rf ${RPM_BUILD_ROOT}

# We don't want these
rm -f doc/rfc/fetch

cp --preserve=timestamps %{SOURCE5} doc/rfc
#gzip -9 doc/rfc/*

# Build directory hierarchy
mkdir -p ${RPM_BUILD_ROOT}/etc/{rc.d/init.d,logrotate.d,NetworkManager/dispatcher.d}
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bind
mkdir -p ${RPM_BUILD_ROOT}/var/named/{slaves,data,dynamic}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/{man1,man5,man8}
mkdir -p ${RPM_BUILD_ROOT}/var/run/named
mkdir -p ${RPM_BUILD_ROOT}/var/log

#chroot
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/{dev,etc,var}
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/var/{log,named,run/named,tmp}
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/etc/{pki/dnssec-keys,named}
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/%{_libdir}/bind
# these are required to prevent them being erased during upgrade of previous
# versions that included them (bug #130121):
touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/null
touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/random
touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/zero
touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/etc/localtime

touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/etc/named.conf
#end chroot

make DESTDIR=${RPM_BUILD_ROOT} install

# Remove unwanted files
rm -f ${RPM_BUILD_ROOT}/etc/bind.keys

install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}/etc/rc.d/init.d/named
install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}/etc/logrotate.d/named
install -m 755 %SOURCE4 ${RPM_BUILD_ROOT}/etc/NetworkManager/dispatcher.d/13-named
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/named
%if %{SDB}
mkdir -p ${RPM_BUILD_ROOT}/etc/openldap/schema
install -m 644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/openldap/schema/dnszone.schema
install -m 644 %{SOURCE12} contrib/sdb/pgsql/
%endif

# Files required to run test-suite outside of build tree:
cp -fp config.h ${RPM_BUILD_ROOT}/%{_includedir}/bind9
cp -fp lib/dns/include/dns/forward.h ${RPM_BUILD_ROOT}/%{_includedir}/dns
cp -fp lib/isc/unix/include/isc/keyboard.h ${RPM_BUILD_ROOT}/%{_includedir}/isc

# Remove libtool .la files:
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
# /usr/lib/rpm/brp-compress
#

# SDB manpages
%if %{SDB}
install -m 644 %{SOURCE31} ${RPM_BUILD_ROOT}%{_mandir}/man1/ldap2zone.1
install -m 644 %{SOURCE32} ${RPM_BUILD_ROOT}%{_mandir}/man8/named-sdb.8
install -m 644 %{SOURCE33} ${RPM_BUILD_ROOT}%{_mandir}/man1/zonetodb.1
install -m 644 %{SOURCE34} ${RPM_BUILD_ROOT}%{_mandir}/man1/zone2sqlite.1
%endif

# Ghost config files:
touch ${RPM_BUILD_ROOT}%{_localstatedir}/log/named.log

# configuration files:
tar -C ${RPM_BUILD_ROOT} -xjf %{SOURCE28}
touch ${RPM_BUILD_ROOT}/etc/rndc.key
touch ${RPM_BUILD_ROOT}/etc/rndc.conf
mkdir ${RPM_BUILD_ROOT}/etc/named
install -m 644 bind.keys ${RPM_BUILD_ROOT}/etc/named.iscdlv.key

install -m 644 %{SOURCE5} ./rfc1912.txt
install -m 644 %{SOURCE21} ./Copyright

# sample bind configuration files for %%doc:
mkdir -p sample/etc sample/var/named/{data,slaves}
install -m 644 %{SOURCE25} sample/etc/named.conf
# Copy default configuration to %%doc to make it usable from system-config-bind
install -m 644 ${RPM_BUILD_ROOT}/etc/named.conf named.conf.default
install -m 644 ${RPM_BUILD_ROOT}/etc/named.rfc1912.zones sample/etc/named.rfc1912.zones
install -m 644 ${RPM_BUILD_ROOT}/var/named/{named.ca,named.localhost,named.loopback,named.empty} sample/var/named
for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.internal.zone.db my.external.zone.db; do
echo '@ in soa localhost. root 1 3H 15M 1W 1D
ns localhost.' > sample/var/named/$f;
done
:;

%pre
if [ "$1" -eq 1 ]; then
/usr/sbin/groupadd -g %{bind_gid} -f -r named >/dev/null 2>&1 || :;
/usr/sbin/useradd -u %{bind_uid} -r -M -g named -s /sbin/nologin -d /var/named -c Named named >/dev/null 2>&1 || :;
fi;
:;

%post
/sbin/ldconfig
/sbin/chkconfig --add named
if [ "$1" -eq 1 ]; then
if [ ! -e /etc/rndc.key ]; then
/usr/sbin/rndc-confgen -a > /dev/null 2>&1
fi
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ;
# rndc.key has to have correct perms and ownership, CVE-2007-6283
[ -e /etc/rndc.key ] && chown root:named /etc/rndc.key
[ -e /etc/rndc.key ] && chmod 0640 /etc/rndc.key
fi
:;

%preun
if [ "$1" -eq 0 ]; then
/sbin/service named stop >/dev/null 2>&1 || :;
/sbin/chkconfig --del named || :;
fi;
:;

%postun
/sbin/ldconfig
if [ "$1" -ge 1 ]; then
/sbin/service named try-restart >/dev/null 2>&1 || :;
fi;
:;

%if %{SDB}
%post sdb
/sbin/service named try-restart > /dev/null 2>&1 || :;

%postun sdb
/sbin/service named try-restart > /dev/null 2>&1 || :;
%endif

%triggerpostun -n bind -- bind <= 32:9.5.0-20.b1
if [ "$1" -gt 0 ]; then
[ -e /etc/rndc.key ] && chown root:named /etc/rndc.key
[ -e /etc/rndc.key ] && chmod 0640 /etc/rndc.key
fi
:;

%post libs -p /sbin/ldconfig

%postun libs
/sbin/ldconfig

# Automatically update configuration from "dnssec-conf-based" to "BIND-based"
%triggerpostun -n bind -- dnssec-conf
if [ -r '/etc/named.conf' ]; then
cp -fp /etc/named.conf /etc/named.conf.rpmsave
if grep -Eq '/etc/(named.dnssec.keys|pki/dnssec-keys)' /etc/named.conf; then
if grep -q 'dlv.isc.org.conf' /etc/named.conf; then
# DLV is configured, reconfigure it to new configuration
sed -i -e 's/.*dnssec-lookaside.*dlv\.isc\.org\..*/dnssec-lookaside auto;\
bindkeys-file "\/etc\/named.iscdlv.key";\
managed-keys-directory "\/var\/named\/dynamic";/' /etc/named.conf
fi
sed -i -e '/.*named\.dnssec\.keys.*/d' -e '/.*pki\/dnssec-keys.*/d' \
/etc/named.conf
/sbin/service named try-restart > /dev/null 2>&1 || :;
fi
fi

# Ditto for chroot
if [ -r '/var/named/chroot/etc/named.conf' ]; then
cp -fp /var/named/chroot/etc/named.conf /var/named/chroot/etc/named.conf.rpmsave
if grep -Eq '/etc/(named.dnssec.keys|pki/dnssec-keys)' /var/named/chroot/etc/named.conf; then
if grep -q 'dlv.isc.org.conf' /var/named/chroot/etc/named.conf; then
# DLV is configured, reconfigure it to new configuration
sed -i -e 's/.*dnssec-lookaside.*dlv\.isc\.org\..*/dnssec-lookaside auto;\
bindkeys-file "\/etc\/named.iscdlv.key";\
managed-keys-directory "\/var\/named\/dynamic";/' /var/named/chroot/etc/named.conf
fi
sed -i -e '/.*named\.dnssec\.keys.*/d' -e '/.*pki\/dnssec-keys.*/d' \
/var/named/chroot/etc/named.conf
/sbin/service named try-restart > /dev/null 2>&1 || :;
fi
fi

%post chroot
if [ "$1" -gt 0 ]; then
[ -e %{chroot_prefix}/dev/random ] || \
/bin/mknod %{chroot_prefix}/dev/random c 1 8
[ -e %{chroot_prefix}/dev/zero ] || \
/bin/mknod %{chroot_prefix}/dev/zero c 1 5
[ -e %{chroot_prefix}/dev/zero ] || \
/bin/mknod %{chroot_prefix}/dev/null c 1 3
rm -f %{chroot_prefix}/etc/localtime
cp /etc/localtime %{chroot_prefix}/etc/localtime
if ! grep -q '^ROOTDIR=' /etc/sysconfig/named; then
echo 'ROOTDIR=/var/named/chroot' >> /etc/sysconfig/named
/sbin/service named try-restart > /dev/null 2>&1 || :;
fi
fi;
:;

%posttrans chroot
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
[ -x /sbin/restorecon ] && /sbin/restorecon %{chroot_prefix}/dev/* > /dev/null 2>&1;
fi;
:;

%preun chroot
if [ "$1" -eq 0 ]; then
rm -f %{chroot_prefix}/dev/{random,zero,null}
rm -f %{chroot_prefix}/etc/localtime
if grep -q '^ROOTDIR=' /etc/sysconfig/named; then
# NOTE: Do NOT call `service named try-restart` because chroot
# files will remain mounted.
START=no
[ -e /var/lock/subsys/named ] && START=yes
/sbin/service named stop > /dev/null 2>&1 || :;
sed -i -e '/^ROOTDIR=.*/d' /etc/sysconfig/named
if [ "x$START" = xyes ]; then
/sbin/service named start > /dev/null 2>&1 || :;
fi
fi
fi
:;

%clean
rm -rf ${RPM_BUILD_ROOT}
:;

%files
%defattr(-,root,root,-)
%{_libdir}/bind
%config(noreplace) %{_sysconfdir}/sysconfig/named
%config(noreplace) %attr(-,root,named) %{_sysconfdir}/named.iscdlv.key
%{_sysconfdir}/rc.d/init.d/named
%{_sysconfdir}/NetworkManager/dispatcher.d/13-named
%{_sbindir}/arpaname
%{_sbindir}/ddns-confgen
%{_sbindir}/genrandom
%{_sbindir}/named-journalprint
%{_sbindir}/nsec3hash
%{_sbindir}/dnssec*
%{_sbindir}/named-check*
%{_sbindir}/lwresd
%{_sbindir}/named
%{_sbindir}/rndc*
%{_sbindir}/named-compilezone
%{_sbindir}/isc-hmac-fixup
%{_mandir}/man1/arpaname.1*
%{_mandir}/man5/named.conf.5*
%{_mandir}/man5/rndc.conf.5*
%{_mandir}/man8/rndc.8*
%{_mandir}/man8/named.8*
%{_mandir}/man8/lwresd.8*
%{_mandir}/man8/dnssec*.8*
%{_mandir}/man8/named-checkconf.8*
%{_mandir}/man8/named-checkzone.8*
%{_mandir}/man8/named-compilezone.8*
%{_mandir}/man8/rndc-confgen.8*
%{_mandir}/man8/ddns-confgen.8*
%{_mandir}/man8/genrandom.8*
%{_mandir}/man8/named-journalprint.8*
%{_mandir}/man8/nsec3hash.8*
%{_mandir}/man8/isc-hmac-fixup.8*
%doc CHANGES COPYRIGHT README named.conf.default
%doc doc/arm doc/misc doc/rfc
%doc sample/
%doc Copyright
%doc rfc1912.txt

# Hide configuration
%defattr(0640,root,named,0750)
%dir %{_sysconfdir}/named
%dir %{_localstatedir}/named
%config(noreplace) %verify(not link) %{_sysconfdir}/named.conf
%config(noreplace) %verify(not link) %{_sysconfdir}/named.rfc1912.zones
%config %verify(not link) %{_localstatedir}/named/named.ca
%config %verify(not link) %{_localstatedir}/named/named.localhost
%config %verify(not link) %{_localstatedir}/named/named.loopback
%config %verify(not link) %{_localstatedir}/named/named.empty
%defattr(0660,named,named,0770)
%dir %{_localstatedir}/named/slaves
%dir %{_localstatedir}/named/data
%dir %{_localstatedir}/named/dynamic
%ghost %{_localstatedir}/log/named.log
%defattr(0640,root,named,0750)
%ghost %config(noreplace) %{_sysconfdir}/rndc.key
# ^- rndc.key now created on first install only if it does not exist
# %verify(not size,not md5) %config(noreplace) %attr(0640,root,named) /etc/rndc.conf
# ^- Let the named internal default rndc.conf be used -
# rndc.conf not required unless it differs from default.
%ghost %config(noreplace) %{_sysconfdir}/rndc.conf
# ^- The default rndc.conf which uses rndc.key is in named's default internal config -
# so rndc.conf is not necessary.
%config(noreplace) %{_sysconfdir}/logrotate.d/named
%defattr(-,named,named,-)
%dir %{_localstatedir}/run/named

%if %{SDB}
%files sdb
%defattr(-,root,root,-)
%{_mandir}/man1/ldap2zone.1*
%{_mandir}/man1/zonetodb.1*
%{_mandir}/man1/zone2sqlite.1*
%{_mandir}/man8/named-sdb.8*
%{_mandir}/man1/zone2ldap.1*
%doc contrib/sdb/ldap/README.ldap contrib/sdb/ldap/INSTALL.ldap contrib/sdb/pgsql/README.sdb_pgsql
%dir %{_sysconfdir}/openldap/schema
%config(noreplace) %{_sysconfdir}/openldap/schema/dnszone.schema
%{_sbindir}/named-sdb
%{_sbindir}/zone2ldap
%{_sbindir}/ldap2zone
%{_sbindir}/zonetodb
%{_sbindir}/zone2sqlite
%endif

%files libs
%defattr(-,root,root,-)
%{_libdir}/*so.*

%files utils
%defattr(-,root,root,-)
%{_bindir}/dig
%{_bindir}/host
%{_bindir}/nslookup
%{_bindir}/nsupdate
%{_mandir}/man1/host.1*
%{_mandir}/man1/nsupdate.1*
%{_mandir}/man1/dig.1*
%{_mandir}/man1/nslookup.1*

%files devel
%defattr(-,root,root,-)
%{_libdir}/*so
%{_includedir}/bind9
%{_includedir}/dns
%{_includedir}/dst
%{_includedir}/isc
%{_includedir}/isccc
%{_includedir}/isccfg
%{_includedir}/lwres
%{_mandir}/man1/isc-config.sh.1*
%{_mandir}/man3/lwres*
%{_bindir}/isc-config.sh

%files chroot
%defattr(-,root,root,-)
%ghost %{chroot_prefix}/dev/null
%ghost %{chroot_prefix}/dev/random
%ghost %{chroot_prefix}/dev/zero
%ghost %{chroot_prefix}/etc/localtime
%defattr(0640,root,named,0750)
%dir %{chroot_prefix}
%dir %{chroot_prefix}/dev
%dir %{chroot_prefix}/etc
%dir %{chroot_prefix}/etc/named
%dir %{chroot_prefix}/etc/pki/dnssec-keys
%dir %{chroot_prefix}/var
%dir %{chroot_prefix}/var/run
%dir %{chroot_prefix}/var/named
%dir %{chroot_prefix}/%{_libdir}/bind
%ghost %config(noreplace) %{chroot_prefix}/etc/named.conf
%defattr(0660,named,named,0770)
%dir %{chroot_prefix}/var/run/named
%dir %{chroot_prefix}/var/tmp
%dir %{chroot_prefix}/var/log

%if %{PKCS11}
%files pkcs11
%defattr(-,root,root,-)
%{_sbindir}/pkcs11-destroy
%{_sbindir}/pkcs11-keygen
%{_sbindir}/pkcs11-list
%{_mandir}/man8/pkcs11*
%endif

%changelog
以下略

このままrpmbuildすると{?%dist}が空だと言われた。

# rpmbuild --showrc | more
で適用されるmacroのファイルが見られる
macrofiles            : /usr/lib/rpm/macros:/usr/lib/rpm/ia32e-linux/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/ia32e-linux/macros:~/.rpmmacros

そこで、
/etc/rpm/macros.dist
を作成

# vi /etc/rpm/macros.dist
%dist el5

最後に

# rpmbuild -bb bind9_9.spec

DBIx::ClassでORM

perlのORM。DBはOracle。

とりあえず
DBIx::Class
DBIx::Class::Schema::Loader
をインストールする。

以下インストールの経過をそのまま貼り付け

# yum install perl-DBIx-Class
Loaded plugins: refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBIx-Class.noarch 0:0.08123-2.el6 will be installed
--> Processing Dependency: perl(Module::Find) >= 0.06 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(SQL::Abstract) >= 1.61 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Context::Preserve) >= 0.01 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Scope::Guard) >= 0.03 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(MRO::Compat) >= 0.09 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Data::Dumper::Concise) >= 1.000 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Class::Inspector) >= 1.24 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Class::C3::Componentised) >= 1.0005 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Path::Class) >= 0.18 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Data::Page) >= 2.00 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(SQL::Abstract::Limit) >= 0.13 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Class::Accessor::Grouped) >= 0.09003 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Sub::Name) >= 0.04 for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Module::Find) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Class::Trigger) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Moose::Role) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Context::Preserve) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Data::Page) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(DBIx::ContextualFetch) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Data::Dumper::Concise) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Hash::Merge) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(MooseX::Types) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(JSON::Any) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Path::Class) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Sub::Name) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(MRO::Compat) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(namespace::autoclean) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(MooseX::Types::Moose) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Clone) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Class::C3) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(SQL::Translator::Schema::Constants) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(MooseX::Types::Path::Class) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Class::Inspector) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(MooseX::Types::JSON) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(SQL::Translator::Utils) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(namespace::clean) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Moose) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Try::Tiny) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Processing Dependency: perl(Scope::Guard) for package: perl-DBIx-Class-0.08123-2.el6.noarch
--> Running transaction check
---> Package perl-Class-Accessor-Grouped.noarch 0:0.09005-1.el6 will be installed
---> Package perl-Class-C3.noarch 0:0.22-4.el6 will be installed
---> Package perl-Class-C3-Componentised.noarch 0:1.0006-1.el6.rf will be installed
--> Processing Dependency: perl(Test::Exception) for package: perl-Class-C3-Componentised-1.0006-1.el6.rf.noarch
---> Package perl-Class-Inspector.noarch 0:1.24-4.el6 will be installed
---> Package perl-Class-Trigger.noarch 0:0.13-2.1.el6 will be installed
--> Processing Dependency: perl(IO::Scalar) for package: perl-Class-Trigger-0.13-2.1.el6.noarch
---> Package perl-Clone.x86_64 0:0.31-3.1.el6 will be installed
---> Package perl-Context-Preserve.noarch 0:0.01-1.el6.rf will be installed
---> Package perl-DBIx-ContextualFetch.noarch 0:1.03-7.el6 will be installed
---> Package perl-Data-Dumper-Concise.noarch 0:1.200-2.el6 will be installed
---> Package perl-Data-Page.noarch 0:2.02-1.el6.rf will be installed
--> Processing Dependency: perl(Class::Accessor::Chained::Fast) for package: perl-Data-Page-2.02-1.el6.rf.noarch
---> Package perl-Hash-Merge.noarch 0:0.12-1.el6.rf will be installed
---> Package perl-JSON-Any.x86_64 0:1.22-1.el6.rf will be installed
--> Processing Dependency: perl-JSON-Any-alternative = 1.22 for package: perl-JSON-Any-1.22-1.el6.rf.x86_64
---> Package perl-MRO-Compat.noarch 0:0.11-2.el6.rf will be installed
---> Package perl-Module-Find.noarch 0:0.08-3.el6 will be installed
---> Package perl-Moose.x86_64 0:1.15-1.el6 will be installed
--> Processing Dependency: perl(Class::MOP) >= 1.09 for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Sub::Exporter) >= 0.980 for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Package::DeprecationManager) >= 0.04 for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Class::MOP) >= 0.60 for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Class::MOP::MiniTrait) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Params::Util) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Sub::Exporter) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Devel::GlobalDestruction) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Task::Weaken) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Package::DeprecationManager) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Data::OptList) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(Class::MOP) for package: perl-Moose-1.15-1.el6.x86_64
--> Processing Dependency: perl(metaclass) for package: perl-Moose-1.15-1.el6.x86_64
---> Package perl-MooseX-Types.noarch 0:0.22-1.el6 will be installed
--> Processing Dependency: perl(Sub::Install) >= 0.924 for package: perl-MooseX-Types-0.22-1.el6.noarch
---> Package perl-MooseX-Types-JSON.noarch 0:0.02-3.el6 will be installed
--> Processing Dependency: perl(JSON::XS) >= 2.00 for package: perl-MooseX-Types-JSON-0.02-3.el6.noarch
--> Processing Dependency: perl(JSON::XS) for package: perl-MooseX-Types-JSON-0.02-3.el6.noarch
---> Package perl-MooseX-Types-Path-Class.noarch 0:0.05-8.el6 will be installed
---> Package perl-Path-Class.noarch 0:0.18-1.el6.rf will be installed
---> Package perl-SQL-Abstract.noarch 0:1.67-1.el6 will be installed
---> Package perl-SQL-Abstract-Limit.noarch 0:0.141-3.el6 will be installed
---> Package perl-SQL-Translator.noarch 0:0.11007-1.el6.rf will be installed
--> Processing Dependency: perl(Digest::SHA1) >= 2 for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
--> Processing Dependency: perl(XML::Writer) >= 0.5 for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
--> Processing Dependency: perl(Class::Data::Inheritable) >= 0.02 for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
--> Processing Dependency: perl(File::ShareDir) >= 1 for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
--> Processing Dependency: perl(Class::Accessor::Fast) for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
--> Processing Dependency: perl(Class::Base) for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
--> Processing Dependency: perl(Class::MakeMethods) for package: perl-SQL-Translator-0.11007-1.el6.rf.noarch
---> Package perl-Scope-Guard.noarch 0:0.12-1.el6 will be installed
---> Package perl-Sub-Name.x86_64 0:0.05-1.el6.rf will be installed
---> Package perl-Try-Tiny.noarch 0:0.09-1.el6.rf will be installed
---> Package perl-namespace-autoclean.noarch 0:0.11-1.el6 will be installed
--> Processing Dependency: perl(B::Hooks::EndOfScope) >= 0.07 for package: perl-namespace-autoclean-0.11-1.el6.noarch
--> Processing Dependency: perl(B::Hooks::EndOfScope) for package: perl-namespace-autoclean-0.11-1.el6.noarch
---> Package perl-namespace-clean.noarch 0:0.20-1.el6 will be installed
--> Processing Dependency: perl(Sub::Identify) >= 0.04 for package: perl-namespace-clean-0.20-1.el6.noarch
--> Processing Dependency: perl(Package::Stash) >= 0.22 for package: perl-namespace-clean-0.20-1.el6.noarch
--> Running transaction check
---> Package perl-B-Hooks-EndOfScope.noarch 0:0.08-4.el6 will be installed
--> Processing Dependency: perl(Variable::Magic) for package: perl-B-Hooks-EndOfScope-0.08-4.el6.noarch
---> Package perl-Class-Accessor.noarch 0:0.31-6.1.el6 will be installed
---> Package perl-Class-Accessor-Chained.noarch 0:0.01-9.el6 will be installed
---> Package perl-Class-Base.noarch 0:0.03-7.el6 will be installed
---> Package perl-Class-Data-Inheritable.noarch 0:0.08-3.1.el6 will be installed
---> Package perl-Class-MOP.x86_64 0:1.12-1.el6 will be installed
---> Package perl-Class-MakeMethods.noarch 0:1.01-5.el6 will be installed
---> Package perl-Data-OptList.noarch 0:0.104-4.el6 will be installed
---> Package perl-Devel-GlobalDestruction.x86_64 0:0.02-7.el6 will be installed
---> Package perl-Digest-SHA1.x86_64 0:2.12-2.el6 will be installed
---> Package perl-File-ShareDir.noarch 0:1.01-1.el6.rf will be installed
---> Package perl-IO-stringy.noarch 0:2.110-10.1.el6 will be installed
---> Package perl-JSON-DWIW.x86_64 0:0.39-1.el6.rf will be installed
---> Package perl-JSON-XS.x86_64 1:2.27-2.el6 will be installed
--> Processing Dependency: perl(common::sense) for package: 1:perl-JSON-XS-2.27-2.el6.x86_64
---> Package perl-Package-DeprecationManager.noarch 0:0.11-1.el6 will be installed
---> Package perl-Package-Stash.noarch 0:0.32-1.el6 will be installed
--> Processing Dependency: perl(Package::Stash::XS) >= 0.24 for package: perl-Package-Stash-0.32-1.el6.noarch
---> Package perl-Params-Util.x86_64 0:1.00-3.el6 will be installed
---> Package perl-Sub-Exporter.noarch 0:0.982-4.el6 will be installed
---> Package perl-Sub-Identify.x86_64 0:0.04-6.el6 will be installed
---> Package perl-Sub-Install.noarch 0:0.925-6.el6 will be installed
---> Package perl-Task-Weaken.noarch 0:1.02-7.el6 will be installed
---> Package perl-Test-Exception.noarch 0:0.27-4.1.el6 will be installed
--> Processing Dependency: perl(Sub::Uplevel) for package: perl-Test-Exception-0.27-4.1.el6.noarch
---> Package perl-XML-Writer.noarch 0:0.606-6.el6 will be installed
--> Running transaction check
---> Package perl-Package-Stash-XS.x86_64 0:0.25-1.el6 will be installed
---> Package perl-Sub-Uplevel.noarch 0:0.2002-4.el6 will be installed
---> Package perl-Variable-Magic.x86_64 0:0.46-1.el6.rf will be installed
---> Package perl-common-sense.x86_64 0:3.0-1.el6.rf will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
perl-DBIx-Class noarch 0.08123-2.el6 epel 687 k
Installing for dependencies:
perl-B-Hooks-EndOfScope noarch 0.08-4.el6 epel 9.8 k
perl-Class-Accessor noarch 0.31-6.1.el6 epel 26 k
perl-Class-Accessor-Chained noarch 0.01-9.el6 epel 20 k
perl-Class-Accessor-Grouped noarch 0.09005-1.el6 epel 14 k
perl-Class-Base noarch 0.03-7.el6 epel 24 k
perl-Class-C3 noarch 0.22-4.el6 epel 27 k
perl-Class-C3-Componentised noarch 1.0006-1.el6.rf rpmforge 9.3 k
perl-Class-Data-Inheritable noarch 0.08-3.1.el6 epel 10 k
perl-Class-Inspector noarch 1.24-4.el6 sl 29 k
perl-Class-MOP x86_64 1.12-1.el6 epel 170 k
perl-Class-MakeMethods noarch 1.01-5.el6 epel 351 k
perl-Class-Trigger noarch 0.13-2.1.el6 epel 15 k
perl-Clone x86_64 0.31-3.1.el6 sl 14 k
perl-Context-Preserve noarch 0.01-1.el6.rf rpmforge 9.1 k
perl-DBIx-ContextualFetch noarch 1.03-7.el6 epel 11 k
perl-Data-Dumper-Concise noarch 1.200-2.el6 epel 16 k
perl-Data-OptList noarch 0.104-4.el6 sl 11 k
perl-Data-Page noarch 2.02-1.el6.rf rpmforge 12 k
perl-Devel-GlobalDestruction x86_64 0.02-7.el6 epel 12 k
perl-Digest-SHA1 x86_64 2.12-2.el6 sl 48 k
perl-File-ShareDir noarch 1.01-1.el6.rf rpmforge 20 k
perl-Hash-Merge noarch 0.12-1.el6.rf rpmforge 16 k
perl-IO-stringy noarch 2.110-10.1.el6 sl 67 k
perl-JSON-Any x86_64 1.22-1.el6.rf rpmforge 15 k
perl-JSON-DWIW x86_64 0.39-1.el6.rf rpmforge 157 k
perl-JSON-XS x86_64 1:2.27-2.el6 epel 93 k
perl-MRO-Compat noarch 0.11-2.el6.rf rpmforge 14 k
perl-Module-Find noarch 0.08-3.el6 epel 12 k
perl-Moose x86_64 1.15-1.el6 epel 659 k
perl-MooseX-Types noarch 0.22-1.el6 epel 58 k
perl-MooseX-Types-JSON noarch 0.02-3.el6 epel 8.3 k
perl-MooseX-Types-Path-Class noarch 0.05-8.el6 epel 11 k
perl-Package-DeprecationManager noarch 0.11-1.el6 epel 17 k
perl-Package-Stash noarch 0.32-1.el6 epel 32 k
perl-Package-Stash-XS x86_64 0.25-1.el6 epel 30 k
perl-Params-Util x86_64 1.00-3.el6 sl 35 k
perl-Path-Class noarch 0.18-1.el6.rf rpmforge 33 k
perl-SQL-Abstract noarch 1.67-1.el6 epel 56 k
perl-SQL-Abstract-Limit noarch 0.141-3.el6 epel 22 k
perl-SQL-Translator noarch 0.11007-1.el6.rf rpmforge 454 k
perl-Scope-Guard noarch 0.12-1.el6 epel 10 k
perl-Sub-Exporter noarch 0.982-4.el6 sl 65 k
perl-Sub-Identify x86_64 0.04-6.el6 epel 14 k
perl-Sub-Install noarch 0.925-6.el6 sl 19 k
perl-Sub-Name x86_64 0.05-1.el6.rf rpmforge 31 k
perl-Sub-Uplevel noarch 0.2002-4.el6 sl 20 k
perl-Task-Weaken noarch 1.02-7.el6 sl 16 k
perl-Test-Exception noarch 0.27-4.1.el6 sl 19 k
perl-Try-Tiny noarch 0.09-1.el6.rf rpmforge 18 k
perl-Variable-Magic x86_64 0.46-1.el6.rf rpmforge 78 k
perl-XML-Writer noarch 0.606-6.el6 epel 26 k
perl-common-sense x86_64 3.0-1.el6.rf rpmforge 22 k
perl-namespace-autoclean noarch 0.11-1.el6 epel 18 k
perl-namespace-clean noarch 0.20-1.el6 epel 16 k

Transaction Summary
=======================================================================================================================================
Install 55 Package(s)

Total download size: 3.6 M
Installed size: 9.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/55): perl-B-Hooks-EndOfScope-0.08-4.el6.noarch.rpm | 9.8 kB 00:00
(2/55): perl-Class-Accessor-0.31-6.1.el6.noarch.rpm | 26 kB 00:00
(3/55): perl-Class-Accessor-Chained-0.01-9.el6.noarch.rpm | 20 kB 00:00
(4/55): perl-Class-Accessor-Grouped-0.09005-1.el6.noarch.rpm | 14 kB 00:00
(5/55): perl-Class-Base-0.03-7.el6.noarch.rpm | 24 kB 00:00
(6/55): perl-Class-C3-0.22-4.el6.noarch.rpm | 27 kB 00:00
(7/55): perl-Class-C3-Componentised-1.0006-1.el6.rf.noarch.rpm | 9.3 kB 00:00
(8/55): perl-Class-Data-Inheritable-0.08-3.1.el6.noarch.rpm | 10 kB 00:00
(9/55): perl-Class-Inspector-1.24-4.el6.noarch.rpm | 29 kB 00:00
(10/55): perl-Class-MOP-1.12-1.el6.x86_64.rpm | 170 kB 00:00
(11/55): perl-Class-MakeMethods-1.01-5.el6.noarch.rpm | 351 kB 00:00
(12/55): perl-Class-Trigger-0.13-2.1.el6.noarch.rpm | 15 kB 00:00
(13/55): perl-Clone-0.31-3.1.el6.x86_64.rpm | 14 kB 00:00
(14/55): perl-Context-Preserve-0.01-1.el6.rf.noarch.rpm | 9.1 kB 00:00
(15/55): perl-DBIx-Class-0.08123-2.el6.noarch.rpm | 687 kB 00:00
(16/55): perl-DBIx-ContextualFetch-1.03-7.el6.noarch.rpm | 11 kB 00:00
(17/55): perl-Data-Dumper-Concise-1.200-2.el6.noarch.rpm | 16 kB 00:00
(18/55): perl-Data-OptList-0.104-4.el6.noarch.rpm | 11 kB 00:00
(19/55): perl-Data-Page-2.02-1.el6.rf.noarch.rpm | 12 kB 00:00
(20/55): perl-Devel-GlobalDestruction-0.02-7.el6.x86_64.rpm | 12 kB 00:00
(21/55): perl-Digest-SHA1-2.12-2.el6.x86_64.rpm | 48 kB 00:00
(22/55): perl-File-ShareDir-1.01-1.el6.rf.noarch.rpm | 20 kB 00:00
(23/55): perl-Hash-Merge-0.12-1.el6.rf.noarch.rpm | 16 kB 00:00
(24/55): perl-IO-stringy-2.110-10.1.el6.noarch.rpm | 67 kB 00:00
(25/55): perl-JSON-Any-1.22-1.el6.rf.x86_64.rpm | 15 kB 00:00
(26/55): perl-JSON-DWIW-0.39-1.el6.rf.x86_64.rpm | 157 kB 00:01
(27/55): perl-JSON-XS-2.27-2.el6.x86_64.rpm | 93 kB 00:00
(28/55): perl-MRO-Compat-0.11-2.el6.rf.noarch.rpm | 14 kB 00:00
(29/55): perl-Module-Find-0.08-3.el6.noarch.rpm | 12 kB 00:00
(30/55): perl-Moose-1.15-1.el6.x86_64.rpm | 659 kB 00:00
(31/55): perl-MooseX-Types-0.22-1.el6.noarch.rpm | 58 kB 00:00
(32/55): perl-MooseX-Types-JSON-0.02-3.el6.noarch.rpm | 8.3 kB 00:00
(33/55): perl-MooseX-Types-Path-Class-0.05-8.el6.noarch.rpm | 11 kB 00:00
(34/55): perl-Package-DeprecationManager-0.11-1.el6.noarch.rpm | 17 kB 00:00
(35/55): perl-Package-Stash-0.32-1.el6.noarch.rpm | 32 kB 00:00
(36/55): perl-Package-Stash-XS-0.25-1.el6.x86_64.rpm | 30 kB 00:00
(37/55): perl-Params-Util-1.00-3.el6.x86_64.rpm | 35 kB 00:00
(38/55): perl-Path-Class-0.18-1.el6.rf.noarch.rpm | 33 kB 00:00
(39/55): perl-SQL-Abstract-1.67-1.el6.noarch.rpm | 56 kB 00:00
(40/55): perl-SQL-Abstract-Limit-0.141-3.el6.noarch.rpm | 22 kB 00:00
(41/55): perl-SQL-Translator-0.11007-1.el6.rf.noarch.rpm | 454 kB 00:02
(42/55): perl-Scope-Guard-0.12-1.el6.noarch.rpm | 10 kB 00:00
(43/55): perl-Sub-Exporter-0.982-4.el6.noarch.rpm | 65 kB 00:00
(44/55): perl-Sub-Identify-0.04-6.el6.x86_64.rpm | 14 kB 00:00
(45/55): perl-Sub-Install-0.925-6.el6.noarch.rpm | 19 kB 00:00
(46/55): perl-Sub-Name-0.05-1.el6.rf.x86_64.rpm | 31 kB 00:00
(47/55): perl-Sub-Uplevel-0.2002-4.el6.noarch.rpm | 20 kB 00:00
(48/55): perl-Task-Weaken-1.02-7.el6.noarch.rpm | 16 kB 00:00
(49/55): perl-Test-Exception-0.27-4.1.el6.noarch.rpm | 19 kB 00:00
(50/55): perl-Try-Tiny-0.09-1.el6.rf.noarch.rpm | 18 kB 00:00
(51/55): perl-Variable-Magic-0.46-1.el6.rf.x86_64.rpm | 78 kB 00:00
(52/55): perl-XML-Writer-0.606-6.el6.noarch.rpm | 26 kB 00:00
(53/55): perl-common-sense-3.0-1.el6.rf.x86_64.rpm | 22 kB 00:00
(54/55): perl-namespace-autoclean-0.11-1.el6.noarch.rpm | 18 kB 00:00
(55/55): perl-namespace-clean-0.20-1.el6.noarch.rpm | 16 kB 00:00
---------------------------------------------------------------------------------------------------------------------------------------
Total 173 kB/s | 3.6 MB 00:21
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : perl-Sub-Name-0.05-1.el6.rf.x86_64 1/55
Installing : perl-Params-Util-1.00-3.el6.x86_64 2/55
Installing : perl-Class-Inspector-1.24-4.el6.noarch 3/55
Installing : perl-Sub-Install-0.925-6.el6.noarch 4/55
Installing : perl-Data-OptList-0.104-4.el6.noarch 5/55
Installing : perl-Sub-Exporter-0.982-4.el6.noarch 6/55
Installing : perl-Package-DeprecationManager-0.11-1.el6.noarch 7/55
Installing : perl-Class-C3-0.22-4.el6.noarch 8/55
Installing : perl-MRO-Compat-0.11-2.el6.rf.noarch 9/55
Installing : perl-Try-Tiny-0.09-1.el6.rf.noarch 10/55
Installing : perl-Devel-GlobalDestruction-0.02-7.el6.x86_64 11/55
Installing : perl-Task-Weaken-1.02-7.el6.noarch 12/55
Installing : perl-Class-Accessor-0.31-6.1.el6.noarch 13/55
Installing : perl-IO-stringy-2.110-10.1.el6.noarch 14/55
Installing : perl-SQL-Abstract-1.67-1.el6.noarch 15/55
Installing : perl-Path-Class-0.18-1.el6.rf.noarch 16/55
Installing : perl-SQL-Abstract-Limit-0.141-3.el6.noarch 17/55
Installing : perl-Class-Trigger-0.13-2.1.el6.noarch 18/55
Installing : perl-Class-Accessor-Chained-0.01-9.el6.noarch 19/55
Installing : perl-Class-Accessor-Grouped-0.09005-1.el6.noarch 20/55
Installing : perl-File-ShareDir-1.01-1.el6.rf.noarch 21/55
Installing : perl-Sub-Uplevel-0.2002-4.el6.noarch 22/55
Installing : perl-Test-Exception-0.27-4.1.el6.noarch 23/55
Installing : perl-Class-C3-Componentised-1.0006-1.el6.rf.noarch 24/55
Installing : perl-Data-Page-2.02-1.el6.rf.noarch 25/55
Installing : perl-Package-Stash-XS-0.25-1.el6.x86_64 26/55
Installing : perl-Package-Stash-0.32-1.el6.noarch 27/55
Installing : perl-Class-MOP-1.12-1.el6.x86_64 28/55
Installing : perl-Moose-1.15-1.el6.x86_64 29/55
Installing : perl-Class-Data-Inheritable-0.08-3.1.el6.noarch 30/55
Installing : perl-Scope-Guard-0.12-1.el6.noarch 31/55
Installing : perl-Class-Base-0.03-7.el6.noarch 32/55
Installing : perl-Variable-Magic-0.46-1.el6.rf.x86_64 33/55
Installing : perl-B-Hooks-EndOfScope-0.08-4.el6.noarch 34/55
Installing : perl-Class-MakeMethods-1.01-5.el6.noarch 35/55
Installing : perl-Context-Preserve-0.01-1.el6.rf.noarch 36/55
Installing : perl-Clone-0.31-3.1.el6.x86_64 37/55
Installing : perl-Sub-Identify-0.04-6.el6.x86_64 38/55
Installing : perl-namespace-clean-0.20-1.el6.noarch 39/55
Installing : perl-MooseX-Types-0.22-1.el6.noarch 40/55
Installing : perl-MooseX-Types-Path-Class-0.05-8.el6.noarch 41/55
Installing : perl-namespace-autoclean-0.11-1.el6.noarch 42/55
Installing : perl-JSON-DWIW-0.39-1.el6.rf.x86_64 43/55
Installing : perl-JSON-Any-1.22-1.el6.rf.x86_64 44/55
Installing : perl-Hash-Merge-0.12-1.el6.rf.noarch 45/55
Installing : perl-DBIx-ContextualFetch-1.03-7.el6.noarch 46/55
Installing : perl-XML-Writer-0.606-6.el6.noarch 47/55
Installing : perl-Data-Dumper-Concise-1.200-2.el6.noarch 48/55
Installing : perl-Digest-SHA1-2.12-2.el6.x86_64 49/55
Installing : perl-SQL-Translator-0.11007-1.el6.rf.noarch 50/55
Installing : perl-Module-Find-0.08-3.el6.noarch 51/55
Installing : perl-common-sense-3.0-1.el6.rf.x86_64 52/55
Installing : 1:perl-JSON-XS-2.27-2.el6.x86_64 53/55
Installing : perl-MooseX-Types-JSON-0.02-3.el6.noarch 54/55
Installing : perl-DBIx-Class-0.08123-2.el6.noarch 55/55

Installed:
perl-DBIx-Class.noarch 0:0.08123-2.el6

Dependency Installed:
perl-B-Hooks-EndOfScope.noarch 0:0.08-4.el6 perl-Class-Accessor.noarch 0:0.31-6.1.el6
perl-Class-Accessor-Chained.noarch 0:0.01-9.el6 perl-Class-Accessor-Grouped.noarch 0:0.09005-1.el6
perl-Class-Base.noarch 0:0.03-7.el6 perl-Class-C3.noarch 0:0.22-4.el6
perl-Class-C3-Componentised.noarch 0:1.0006-1.el6.rf perl-Class-Data-Inheritable.noarch 0:0.08-3.1.el6
perl-Class-Inspector.noarch 0:1.24-4.el6 perl-Class-MOP.x86_64 0:1.12-1.el6
perl-Class-MakeMethods.noarch 0:1.01-5.el6 perl-Class-Trigger.noarch 0:0.13-2.1.el6
perl-Clone.x86_64 0:0.31-3.1.el6 perl-Context-Preserve.noarch 0:0.01-1.el6.rf
perl-DBIx-ContextualFetch.noarch 0:1.03-7.el6 perl-Data-Dumper-Concise.noarch 0:1.200-2.el6
perl-Data-OptList.noarch 0:0.104-4.el6 perl-Data-Page.noarch 0:2.02-1.el6.rf
perl-Devel-GlobalDestruction.x86_64 0:0.02-7.el6 perl-Digest-SHA1.x86_64 0:2.12-2.el6
perl-File-ShareDir.noarch 0:1.01-1.el6.rf perl-Hash-Merge.noarch 0:0.12-1.el6.rf
perl-IO-stringy.noarch 0:2.110-10.1.el6 perl-JSON-Any.x86_64 0:1.22-1.el6.rf
perl-JSON-DWIW.x86_64 0:0.39-1.el6.rf perl-JSON-XS.x86_64 1:2.27-2.el6
perl-MRO-Compat.noarch 0:0.11-2.el6.rf perl-Module-Find.noarch 0:0.08-3.el6
perl-Moose.x86_64 0:1.15-1.el6 perl-MooseX-Types.noarch 0:0.22-1.el6
perl-MooseX-Types-JSON.noarch 0:0.02-3.el6 perl-MooseX-Types-Path-Class.noarch 0:0.05-8.el6
perl-Package-DeprecationManager.noarch 0:0.11-1.el6 perl-Package-Stash.noarch 0:0.32-1.el6
perl-Package-Stash-XS.x86_64 0:0.25-1.el6 perl-Params-Util.x86_64 0:1.00-3.el6
perl-Path-Class.noarch 0:0.18-1.el6.rf perl-SQL-Abstract.noarch 0:1.67-1.el6
perl-SQL-Abstract-Limit.noarch 0:0.141-3.el6 perl-SQL-Translator.noarch 0:0.11007-1.el6.rf
perl-Scope-Guard.noarch 0:0.12-1.el6 perl-Sub-Exporter.noarch 0:0.982-4.el6
perl-Sub-Identify.x86_64 0:0.04-6.el6 perl-Sub-Install.noarch 0:0.925-6.el6
perl-Sub-Name.x86_64 0:0.05-1.el6.rf perl-Sub-Uplevel.noarch 0:0.2002-4.el6
perl-Task-Weaken.noarch 0:1.02-7.el6 perl-Test-Exception.noarch 0:0.27-4.1.el6
perl-Try-Tiny.noarch 0:0.09-1.el6.rf perl-Variable-Magic.x86_64 0:0.46-1.el6.rf
perl-XML-Writer.noarch 0:0.606-6.el6 perl-common-sense.x86_64 0:3.0-1.el6.rf
perl-namespace-autoclean.noarch 0:0.11-1.el6 perl-namespace-clean.noarch 0:0.20-1.el6

Complete!


# yum install perl-DBIx-Class-Schema-Loader
Loaded plugins: refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBIx-Class-Schema-Loader.noarch 0:0.05003-2.el6.1 will be installed
--> Processing Dependency: perl(Lingua::EN::Inflect::Number) >= 1.1 for package: perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch
--> Processing Dependency: perl(Data::Dump) >= 1.06 for package: perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch
--> Processing Dependency: perl(File::Slurp) >= 9999.13 for package: perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch
--> Processing Dependency: perl(Class::Unload) for package: perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch
--> Processing Dependency: perl(Data::Dump) for package: perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch
--> Processing Dependency: perl(Lingua::EN::Inflect::Number) for package: perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch
--> Running transaction check
---> Package perl-Class-Unload.noarch 0:0.06-1.el6 will be installed
---> Package perl-Data-Dump.noarch 0:1.15-1.el6.rf will be installed
---> Package perl-File-Slurp.noarch 0:9999.13-7.el6 will be installed
---> Package perl-Lingua-EN-Inflect-Number.noarch 0:1.1-11.el6 will be installed
--> Processing Dependency: perl(Lingua::EN::Inflect) for package: perl-Lingua-EN-Inflect-Number-1.1-11.el6.noarch
--> Running transaction check
---> Package perl-Lingua-EN-Inflect.noarch 0:1.892-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
perl-DBIx-Class-Schema-Loader noarch 0.05003-2.el6.1 epel 109 k
Installing for dependencies:
perl-Class-Unload noarch 0.06-1.el6 epel 8.5 k
perl-Data-Dump noarch 1.15-1.el6.rf rpmforge 23 k
perl-File-Slurp noarch 9999.13-7.el6 sl 30 k
perl-Lingua-EN-Inflect noarch 1.892-1.el6 epel 52 k
perl-Lingua-EN-Inflect-Number noarch 1.1-11.el6 epel 9.8 k

Transaction Summary
=======================================================================================================================================
Install 6 Package(s)

Total download size: 233 k
Installed size: 446 k
Is this ok [y/N]: y
Downloading Packages:
(1/6): perl-Class-Unload-0.06-1.el6.noarch.rpm | 8.5 kB 00:00
(2/6): perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch.rpm | 109 kB 00:00
(3/6): perl-Data-Dump-1.15-1.el6.rf.noarch.rpm | 23 kB 00:00
(4/6): perl-File-Slurp-9999.13-7.el6.noarch.rpm | 30 kB 00:00
(5/6): perl-Lingua-EN-Inflect-1.892-1.el6.noarch.rpm | 52 kB 00:00
(6/6): perl-Lingua-EN-Inflect-Number-1.1-11.el6.noarch.rpm | 9.8 kB 00:00
---------------------------------------------------------------------------------------------------------------------------------------
Total 73 kB/s | 233 kB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : perl-File-Slurp-9999.13-7.el6.noarch 1/6
Installing : perl-Data-Dump-1.15-1.el6.rf.noarch 2/6
Installing : perl-Lingua-EN-Inflect-1.892-1.el6.noarch 3/6
Installing : perl-Lingua-EN-Inflect-Number-1.1-11.el6.noarch 4/6
Installing : perl-Class-Unload-0.06-1.el6.noarch 5/6
Installing : perl-DBIx-Class-Schema-Loader-0.05003-2.el6.1.noarch 6/6

Installed:
perl-DBIx-Class-Schema-Loader.noarch 0:0.05003-2.el6.1

Dependency Installed:
perl-Class-Unload.noarch 0:0.06-1.el6 perl-Data-Dump.noarch 0:1.15-1.el6.rf perl-File-Slurp.noarch 0:9999.13-7.el6
perl-Lingua-EN-Inflect.noarch 0:1.892-1.el6 perl-Lingua-EN-Inflect-Number.noarch 0:1.1-11.el6

Complete!


で、静的にSchemaクラスを生成

# perl -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:./ -e 'make_schema_at "HOGE::Schema", {relationships => 1}, ["dbi:Oracle:接続識別子","ユーザ","パスワード"]'

こうするとカレントディレクトリにHOGEディレクトリができて、その中にSchemaクラスが生成される。

主キーがないテーブルに関しては
DBIx::Class::Schema::Loader::make_schema_at(): hogehoge_tbl has no primary key at -e line 1
のようなメッセージが出る。

これで準備完了。

あとは、例えばhogehoge_mstsテーブルでカラムidの値が1であるレコードを抽出してカラムhoge_columnを表示する、なんてのを書く場合は、

#!/usr/bin/perl

use strict;
use lib "CURRENTDIR/HOGE";
use HOGE::Schema;

my $schema = HOGE::Schema->connect("dbi:Oracle:接続識別子", "ユーザ", "パスワード");
my $rs = $schema->resultset('HogehogeMst')->search_rs({id => '1'});
while(my $r = $rs->next){
print $r->hoge_column;
}

Template Designed by DW99

上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。