I'm trying to build from the source rpm 5.26-1 a rpm for Trustix 2.0

My made changes to the spec because Trustix stores its init script in /etc/init.d

 

So the changes I made were:

1.  configure --with-initscriptdir=/etc/init.d

2.   I changed the commands the binary RPM executes from /etc/rc.d/init.d --> /etc/init.d

 

I keep getting the following error.

======================

Processing files: smartmontools-5.26-1

error: File not found: /var/tmp/smartmontools-5.26-root/etc/init.d/smartd

Executing(%doc): /sbin/bash -e /var/tmp/rpm-tmp.50501

+ umask 022

 

You someone explain what I'm doing wrong? I have included the relevant part of the spec file. Thanks

 

spec file

=====

# The following sections are executed by the SRPM file

%prep

%setup -q

%build

%configure --with-initscriptdir=/etc/init.d

make

%install

rm -rf $RPM_BUILD_ROOT

rm -rf %{_buildroot}

%makeinstall

rm -f examplescripts/Makefile*

%files

%defattr(-,root,root)

%attr(755,root,root) %{_sbindir}/smartd

%attr(755,root,root) %{_sbindir}/smartctl

%attr(755,root,root) %{_sysconfdir}/init.d/smartd

%attr(644,root,root) %{_mandir}/man8/smartctl.8*

%attr(644,root,root) %{_mandir}/man8/smartd.8*

%attr(644,root,root) %{_mandir}/man5/smartd.conf.5*

%doc AUTHORS CHANGELOG COPYING INSTALL NEWS README TODO WARNINGS smartd.conf examplescripts

%config(noreplace) %{_sysconfdir}/smartd.conf

%clean

rm -rf $RPM_BUILD_ROOT

rm -rf %{_buildroot}

rm -rf %{_builddir}/%{name}-%{version}

# The following are executed only by the binary RPM at install/uninstall

# since this installs the gzipped documentation files, remove

# non-gzipped ones of the same name.

# run before installation. Passed "1" the first time package installed, else a larger number

%pre

if [ -f /usr/share/man/man8/smartctl.8 ] ; then

echo "You MUST delete (by hand) the outdated file /usr/share/man/man8/smartctl.8 to read the new manual page for smartctl."

fi

if [ -f /usr/share/man/man8/smartd.8 ] ; then

echo "You MUST delete (by hand) the outdated file /usr/share/man/man8/smartd.8 to read the new manual page for smartd."

fi

if [ -f /usr/share/man/man5/smartd.conf.5 ] ; then

echo "You MUST delete (by hand) the outdated file /usr/share/man/man5/smartd.conf.5 to read the new manual page for smartd.conf"

fi

if [ ! -f /etc/smartd.conf ]; then

echo "Note that you can use a configuration file /etc/smartd.conf to control the"

echo "startup behavior of the smartd daemon. See man 8 smartd for details."

fi

# run after installation. Passed "1" the first time package installed, else a larger number

%post

# if smartd is already running, restart it with the new daemon

if [ -f /var/lock/subsys/smartd ]; then

/etc/init.d/smartd restart 1>&2

echo "Restarted smartd services"

else

# else tell the user how to start it

echo "Run \"/etc/init.d/smartd start\" to start smartd service now."

fi

# Now see if we should tell user to set service to start on boot

/sbin/chkconfig --list smartd > /dev/null 2> /dev/null

printmessage=$?

if [ $printmessage -ne 0 ] ; then

echo "Run \"/sbin/chkconfig --add smartd\", to start smartd service on system boot"

else

echo "smartd will continue to start up on system boot"

fi

 

# run before uninstallation. Passed zero when the last version uninstalled, else larger

%preun

# if uninstalling the final copy, stop and remove any links

if [ "$1" = "0" ]; then

if [ -f /var/lock/subsys/smartd ]; then

/etc/init.d/smartd stop 1>&2

echo "Stopping smartd services"

fi

# see if any links remain, and kill them if they do

/sbin/chkconfig --list smartd > /dev/null 2> /dev/null

notlinked=$?

if [ $notlinked -eq 0 ]; then

/sbin/chkconfig --del smartd

echo "Removing chkconfig links to smartd boot-time startup scripts"

fi

fi

# run after uninstallation. Passed zero when the last version uninstalled, else larger

# %postun

%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)