RPM 빌드 오류: /var/tmp/rpm-tmp.8ntGMt(%install)에 대한 종료 상태가 잘못되었습니다.

RPM 빌드 오류: /var/tmp/rpm-tmp.8ntGMt(%install)에 대한 종료 상태가 잘못되었습니다.

오류가 발생하는데 디버깅 방법을 모르겠습니다. 이것에 대한 생각이 있나요?

다음은shorewall.spec 파일의 내용이다.

%global mainver 5.0.4
%global baseurl http://www.shorewall.net/pub/shorewall/5.0/shorewall-%{mainver}/

# A very helpful document for packaging Shorewall is "Anatomy of Shorewall 4.0"
# which is found at http://www.shorewall.net/Anatomy.html

Name:           shorewall
Version:        %{mainver}
Release:        1%{?dist}
Summary:        An iptables front end for firewall configuration
Group:          Applications/System
License:        GPLv2+
URL:            http://www.shorewall.net/
Provides:       shorewall(firewall) = %{version}-%{release}

Source0:        %{baseurl}/%{name}-%{version}.tar.bz2
Source1:        %{baseurl}/%{name}-lite-%{version}.tar.bz2
Source2:        %{baseurl}/%{name}6-%{version}.tar.bz2
Source3:        %{baseurl}/%{name}6-lite-%{version}.tar.bz2
Source4:        %{baseurl}/%{name}-init-%{version}.tar.bz2
Source5:        %{baseurl}/%{name}-core-%{version}.tar.bz2

BuildRequires:  perl
BuildRequires:  perl(Digest::SHA)

BuildArch:      noarch

Requires:         shorewall-core = %{version}-%{release}
Requires:         iptables iproute
Requires(post):   /sbin/chkconfig
Requires(post):   sed

%description
The Shoreline Firewall, more commonly known as "Shorewall", is a
Netfilter (iptables) based firewall that can be used on a dedicated
firewall system, a multi-function gateway/ router/server or on a
standalone GNU/Linux system.

%package -n shorewall6
Summary:        Files for the IPV6 Shorewall Firewall
Group:          Applications/System
Provides:       shorewall(firewall) = %{version}-%{release}

Requires:         shorewall-core = %{version}-%{release}
Requires:         iptables-ipv6 iproute
Requires(post):   /sbin/chkconfig

%description -n shorewall6
This package contains the files required for IPV6 functionality of the
Shoreline Firewall (shorewall).

%package lite
Group:          Applications/System
Summary:        Shorewall firewall for compiled rulesets
Provides:       shorewall(firewall) = %{version}-%{release}

Requires:         shorewall-core = %{version}-%{release}
Requires:         iptables-ipv6 iproute
Requires(post):   /sbin/chkconfig

%description lite
Shorewall Lite is a companion product to Shorewall that allows network
administrators to centralize the configuration of Shorewall-based
firewalls. Shorewall Lite runs a firewall script generated by a
machine with a Shorewall rule compiler. A machine running Shorewall
Lite does not need to have a Shorewall rule compiler installed.

%package -n shorewall6-lite
Group:          Applications/System
Summary:        Shorewall firewall for compiled IPV6 rulesets
Provides:       shorewall(firewall) = %{version}-%{release}

Requires:         shorewall-core = %{version}-%{release}
Requires:         iptables-ipv6 iproute
Requires(post):   /sbin/chkconfig

%description -n shorewall6-lite
Shorewall6 Lite is a companion product to Shorewall6 (the IPV6
firewall) that allows network administrators to centralize the
configuration of Shorewall-based firewalls. Shorewall Lite runs a
firewall script generated by a machine with a Shorewall rule
compiler. A machine running Shorewall Lite does not need to have a
Shorewall rule compiler installed.

%package core
Group:          Applications/System
Summary:        Core libraries for Shorewall

%description core
This package contains the core libraries for Shorewall.

%package init
Group:          Applications/System
Summary:        Initialization functionality and NetworkManager integration for Shorewall

Requires:         shorewall(firewall) = %{version}-%{release}
Requires:         NetworkManager
Requires:         shorewall = %{version}-%{release}
Requires:         iptables-ipv6 iproute logrotate
Requires(post):   /sbin/chkconfig

%description init 
This package adds additional initialization functionality to Shorewall in two
ways. It allows the firewall to be closed prior to bringing up network
devices. This insures that unwanted connections are not allowed between the
time that the network comes up and when the firewall is started. It also
integrates with NetworkManager and distribution ifup/ifdown systems to allow
for 'event-driven' startup and shutdown.

%prep
%setup -q -c -n %{name}-%{version} -T -a0 -a1 -a2 -a3 -a4 -a5
# Remove hash-bang from files which are not directly executed as shell
# scripts. This silences some rpmlint errors.
find . -name "lib.*" -exec sed -i -e 'm:\#\!/bin/sh:d' {} \;

%build

%install
# removes any line that has /SYSTEMD on it from shorewallrc.redhat 
# then runs ./install.sh script
for target in shorewall shorewall-core shorewall-lite shorewall6 shorewall6-lite shorewall-init; do
    pushd ${target}-%{version}
    sed -i -e '/SYSTEMD/d' shorewallrc.redhat
    ./configure vendor=redhat
    DESTDIR=$RPM_BUILD_ROOT ./install.sh
    popd
done

# Fix up file permissions
chmod 644 $RPM_BUILD_ROOT%{_datadir}/shorewall-lite/{helpers,modules}
chmod 644 $RPM_BUILD_ROOT%{_datadir}/shorewall6-lite/{helpers,modules}
chmod 755 $RPM_BUILD_ROOT/sbin/shorewall-lite
chmod 755 $RPM_BUILD_ROOT/sbin/shorewall6-lite
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/shorewall-lite/shorewall-lite.conf
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/shorewall6-lite/shorewall6-lite.conf
chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/01-shorewall

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ $1 = 1 ]; then
   /sbin/chkconfig --add shorewall
fi

%preun
if [ $1 = 0 ]; then
   /sbin/service shorewall stop >/dev/null 2>&1
   /sbin/chkconfig --del shorewall
   rm -f /var/lib/shorewall/*
fi

%post -n shorewall6
if [ $1 = 1 ]; then
   /sbin/chkconfig --add shorewall6
fi

%preun -n shorewall6
if [ $1 = 0 ]; then
   /sbin/service shorewall6 stop >/dev/null 2>&1
   /sbin/chkconfig --del shorewall6
   rm -f /var/lib/shorewall6/*
fi

%post -n shorewall-lite
if [ $1 = 1 ]; then
   /sbin/chkconfig --add shorewall-lite
fi

%preun -n shorewall-lite
if [ $1 = 0 ]; then
   /sbin/service shorewall stop >/dev/null 2>&1
   /sbin/chkconfig --del shorewall-lite
   rm -f /var/lib/shorewall-lite/*
fi

%post -n shorewall6-lite
if [ $1 = 1 ]; then
   /sbin/chkconfig --add shorewall6-lite
fi

%preun -n shorewall6-lite
if [ $1 = 0 ]; then
   /sbin/service shorewall6-lite stop >/dev/null 2>&1
   /sbin/chkconfig --del shorewall6-lite
   rm -f /var/lib/shorewall6-lite/*
fi

%post -n shorewall-init
if [ $1 = 1 ]; then
   /sbin/chkconfig --add shorewall-init
fi

%preun -n shorewall-init
if [ $1 = 0 ]; then
   /sbin/service shorewall-init stop >/dev/null 2>&1
   /sbin/chkconfig --del shorewall-init
fi


%files
%doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples}
/sbin/shorewall
%dir %{_sysconfdir}/shorewall
%config(noreplace) %{_sysconfdir}/shorewall/*
%config(noreplace) %{_sysconfdir}/logrotate.d/shorewall
%config(noreplace) %{_sysconfdir}/sysconfig/shorewall
%{_datadir}/shorewall/action.*
%{_datadir}/shorewall/actions.std
%{_datadir}/shorewall/configfiles/
%{_datadir}/shorewall/configpath
%{_datadir}/shorewall/helpers
%{_datadir}/shorewall/lib.cli-std
%{_datadir}/shorewall/lib.core
%{_datadir}/shorewall/macro.*
%{_datadir}/shorewall/modules*
%{_datadir}/shorewall/prog.*
%{_datadir}/shorewall/version
%{_libexecdir}/shorewall/compiler.pl
%{_libexecdir}/shorewall/getparams
%{perl_vendorlib}/Shorewall
%{_mandir}/man5/shorewall*
%exclude %{_mandir}/man5/shorewall6*
%exclude %{_mandir}/man5/shorewall-lite*
%{_mandir}/man8/shorewall*
%exclude %{_mandir}/man8/shorewall6*
%exclude %{_mandir}/man8/shorewall-lite*
%exclude %{_mandir}/man8/shorewall-init*
%{_initrddir}/shorewall
%dir %{_localstatedir}/lib/shorewall

%doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples}
/sbin/shorewall-init
%dir %{_datadir}/shorewall/
%{_datadir}/shorewall/coreversion
%{_datadir}/shorewall/functions
%{_datadir}/shorewall/lib.base
%{_datadir}/shorewall/lib.cli
%{_datadir}/shorewall/lib.common
%{_datadir}/shorewall/shorewallrc
%dir %{_libexecdir}/shorewall
%{_libexecdir}/shorewall/wait4ifup

%files init
%doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples}
%{_sysconfdir}/NetworkManager/dispatcher.d/01-shorewall
%config(noreplace) %{_sysconfdir}/sysconfig/shorewall-init
%{_sysconfdir}/logrotate.d/shorewall-init
%{_mandir}/man8/shorewall-init.8.*
%{_datadir}/shorewall-init
%{_libexecdir}/shorewall-init
%{_initrddir}/shorewall-init

다음은 rpmbuild -bishorewall.spec 명령의 일부 출력입니다.

Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.wXhGIf
+ umask 022
+ cd /home/username/rpmbuild/BUILD
+ '[' /home/username/rpmbuild/BUILDROOT/shorewall-5.0.4-1.el6.x86_64 '!=' / ']'
+ rm -rf /home/username/rpmbuild/BUILDROOT/shorewall-5.0.4-1.el6.x86_64
++ dirname /home/username/rpmbuild/BUILDROOT/shorewall-5.0.4-1.el6.x86_64
+ mkdir -p /home/username/rpmbuild/BUILDROOT
+ mkdir /home/username/rpmbuild/BUILDROOT/shorewall-5.0.4-1.el6.x86_64
+ cd shorewall-5.0.4
+ LANG=C
+ export LANG
+ unset DISPLAY
/var/tmp/rpm-tmp.wXhGIf: line 68: syntax error: unexpected end of file
error: Bad exit status from /var/tmp/rpm-tmp.wXhGIf (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.wXhGIf (%install)

관련 정보