Found '/usr/src/redhat/BUILD/NetWatch-root' in installed files; aborting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I now,  all of a sudden :-)  I seem to be getting this error message when I build my package.

I don't recall changing my spec file since the last time it worked properly,
only adding some files 'inside' my package.

I'm using a simple scenario, probably not the best/correct approach, but it basically is:

a) develop the app in its target (installed) directory,
b) when rpm-build'ing, copy the necessary files into the 'build' directory and continue.

So I don't know what I'm doing wrong, the error message isn't helping me to understand
what is going wrong, and I don't think I changed anything since the last time it worked.  :-)
Can someone shed some light please.

TIA
Fulko

PS.  I'm building on a Fedora 8 box using RPM version 4.4.2.2

---------------------------

When I run the build I get:

# rpmbuild -bb netwatch.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.38727
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.38727
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.38727
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /usr/src/redhat/BUILD/NetWatch-root
+ mkdir -p /usr/src/redhat/BUILD/NetWatch-root
+ find /var/www/html/nia/ -maxdepth 1 -type f -exec cp --parents '{}' /usr/src/redhat/BUILD/NetWatch-root ';'
+ cp -r --parents /var/www/html/nia/docs /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/help /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/icons /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/mibs /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/mibs_other /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/scripts /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/support /usr/src/redhat/BUILD/NetWatch-root
+ cp -r --parents /var/www/html/nia/test /usr/src/redhat/BUILD/NetWatch-root
+ mkdir -p /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl
+ cp /var/www/html/nia/scripts/DevNull.pm /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl
+ find /root/perl_modules -name IniFile.pm -exec cp '{}' /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl ';'
+ find /root/perl_modules -name Blob.pm -exec cp '{}' /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl ';'
+ mkdir -p /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/tmp
+ rm /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/SimulatorHosts.pm /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/SimulatorHosts.pm.20090521 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/SimulatorHosts.pm.20090528 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_control.pl /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090408 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090423 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090506 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090521 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090528 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090529 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.simple_test /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness_hello.pl /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_test
+ /usr/lib/rpm/check-buildroot
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ rm -rf /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ mkdir -p /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ find /var/www/html/nia/ -maxdepth 1 -type f -exec cp --parents '{}' /usr/src/redhat/BUILD/NetWatch-root ';'
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/docs /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/help /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/icons /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/mibs /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/mibs_other /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/scripts /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/support /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp -r --parents /var/www/html/nia/test /usr/src/redhat/BUILD/NetWatch-root
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ mkdir -p /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ cp /var/www/html/nia/scripts/DevNull.pm /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ find /root/perl_modules -name IniFile.pm -exec cp '{}' /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl ';'
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ find /root/perl_modules -name Blob.pm -exec cp '{}' /usr/src/redhat/BUILD/NetWatch-root/usr/lib/perl5/site_perl ';'
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ mkdir -p /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/tmp
/usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/support/typescript:+ rm /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/SimulatorHosts.pm /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/SimulatorHosts.pm.20090521 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/SimulatorHosts.pm.20090528 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_control.pl /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090408 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090423 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090506 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090521 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090528 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.20090529 /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness.pl.simple_test /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_harness_hello.pl /usr/src/redhat/BUILD/NetWatch-root/var/www/html/nia/scripts/snmp_simulator_test
Found '/usr/src/redhat/BUILD/NetWatch-root' in installed files; aborting
error: Bad exit status from /var/tmp/rpm-tmp.38727 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.38727 (%install)
make: *** [/usr/src/redhat/RPMS/noarch/NetWatch-2.0-5.noarch.rpm] Error 1




--------------------------
and my spec file is as follows:


Summary:        NetWatch - Network Management System
Name:           NetWatch
Version:        1.0
Release:        5
#Source:        %{name}-%{version}.tar.gz
License:        Commercial
Group:          Applications/Internet

BuildRoot:              %{_builddir}/%{name}-root
BuildArch:              noarch
Provides:               perl(IniFile), perl(Blob), perl(DevNull), perl(PidFile), perl(SimpleFamily), perl(SimulatorHosts), perl(SimulatorOidCachepm)
Requires:               chkconfig, coreutils, initscripts, bash, grep
Requires:               mysql-server, vsftpd
Requires(post): httpd
#AutoReqProv:   no

%description
The 'NetWatch' network management system.

%prep
#tar cvf ${Source} /var/www/html/nia

%build
# compiling the package

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
find /var/www/html/nia/ -maxdepth 1 -type f -exec cp --parents {} $RPM_BUILD_ROOT \;    # from the top level... copy only the files
cp -r --parents /var/www/html/nia/docs                          $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/help                          $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/icons                         $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/mibs                          $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/mibs_other            $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/scripts                       $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/support                       $RPM_BUILD_ROOT
cp -r --parents /var/www/html/nia/test                          $RPM_BUILD_ROOT
        #
        # Now copy the Netwatch specific perl modules to a usable target directory
        #
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl
cp /var/www/html/nia/scripts/DevNull.pm                                 $RPM_BUILD_ROOT/usr/lib/perl5/site_perl
find /root/perl_modules -name "IniFile.pm"      -exec cp {}     $RPM_BUILD_ROOT/usr/lib/perl5/site_perl \;
find /root/perl_modules -name "Blob.pm"         -exec cp {}     $RPM_BUILD_ROOT/usr/lib/perl5/site_perl \;
        #
        #       Make NetWatch's temporary directory
        #
mkdir -p $RPM_BUILD_ROOT/var/www/html/nia/tmp
        #
        #       remove un-finished stuff
        #
rm ${RPM_BUILD_ROOT}/var/www/html/nia/scripts/SimulatorHosts.pm* ${RPM_BUILD_ROOT}/var/www/html/nia/scripts/snmp_simulator*

%post
#chown apache:apache /var/www/html/nia
#chown root:root        /var/www/html/nia/scripts/adjust_vsftpd_helper.pl       /var/www/html/nia/scripts/create
#chmod 04555            /var/www/html/nia/scripts/adjust_vsftpd_helper.pl       /var/www/html/nia/scripts/create
cp /var/www/html/nia/support/netwatch /etc/rc.d/init.d/
/sbin/chkconfig --add netwatch;
/sbin/chkconfig httpd on
/sbin/chkconfig mysqld on
/sbin/chkconfig netwatch on

        # test to see if we can connect to the default mysql server (with the user's tool and an empty command)...
        # if it fails to connect, then its not running and we need to start it (mysqld)
        # (but we don't want to use the 'restart' because that could incur a glitch to whomever may be using it at the time)

mysql -e '' 2>/dev/null; [ $? -ne 0 ] && service mysqld start

if test -f /etc/httpd/conf/httpd.conf; then
        if ! grep "^[[:space:]]*Include[[:space:]]*/var/www/html/nia/support/httpd-netwatch.conf" /etc/httpd/conf/httpd.conf > /dev/null; then
                echo "Include /var/www/html/nia/support/httpd-netwatch.conf" >> /etc/httpd/conf/httpd.conf
                /etc/rc.d/init.d/httpd restart
        fi
fi

if test -f /etc/sudoers; then
        if ! egrep "^%apache[[:space:]]+ALL=\(ALL\)[[:space:]]+NOPASSWD:[[:space:]]+/var/www/html/nia/scripts/adjust_vsftpd_helper.pl[[:space:]]*,[[:space:]]*/var/www/html/nia/scripts/create[[:space:]]*,[[:space:]]*/etc/init.d/netwatch" /etc/sudoers > /dev/null; then
                echo "%apache ALL=(ALL) NOPASSWD: /var/www/html/nia/scripts/adjust_vsftpd_helper.pl, /var/www/html/nia/scripts/create, /etc/init.d/netwatch" >> /etc/sudoers
        fi
        if egrep "^[[:space:]]*#*[[:space:]]*Defaults[[:space:]]+requiretty" /etc/sudoers > /dev/null; then
        TEMPFILE=`mktemp /etc/sudoers.tmp.XXXXXX`
                egrep -v "Defaults[[:space:]]+requiretty" /etc/sudoers > $TEMPFILE
                echo "#Defaults requiretty" >> $TEMPFILE
                mv $TEMPFILE /etc/sudoers
        fi
        chmod 440 /etc/sudoers
fi
setsebool -P httpd_can_network_connect=1

%preun
if [ $1 = 0 ]; then
        /sbin/service netwatch stop > /dev/null 2>&1
        /sbin/chkconfig --del netwatch
        rm /etc/rc.d/init.d/netwatch
        rm /var/www/html/nia/tmp/NetWatch_access_rights >/dev/null 2>&1

        if test -f /etc/httpd/conf/httpd.conf; then
                if egrep "^[[:space:]]*Include[[:space:]]*/var/www/html/nia/support/httpd-netwatch.conf" /etc/httpd/conf/httpd.conf > /dev/null; then
                        TEMPFILE=`mktemp /etc/httpd/conf/httpd.conf.tmp.XXXXXX`
                        egrep -v "^[[:space:]]*Include[[:space:]]*/var/www/html/nia/support/httpd-netwatch.conf" /etc/httpd/conf/httpd.conf > $TEMPFILE
                        mv $TEMPFILE /etc/httpd/conf/httpd.conf
                        chmod 664 /etc/httpd/conf/httpd.conf
                        /etc/rc.d/init.d/httpd restart
                fi
        fi
        if test -f /etc/sudoers; then
                if egrep "^%apache[[:space:]]+ALL=\(ALL\)[[:space:]]+NOPASSWD:[[:space:]]+/var/www/html/nia/scripts/adjust_vsftpd_helper.pl[[:space:]]*,[[:space:]]*/var/www/html/nia/scripts/create[[:space:]]*,[[:space:]]*/etc/init.d/netwatch" /etc/sudoers > /dev/null; then
                        TEMPFILE=`mktemp /etc/sudoers.tmp.XXXXXX`
                        egrep -v "^%apache[[:space:]]+ALL=\(ALL\)[[:space:]]+NOPASSWD:[[:space:]]+/var/www/html/nia/scripts/adjust_vsftpd_helper.pl, /var/www/html/nia/scripts/create, /etc/init.d/netwatch" /etc/sudoers > $TEMPFILE
                        mv $TEMPFILE /etc/sudoers
                        chmod 440 /etc/sudoers
                fi
        fi
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux