diff --git a/build-ubunturepo b/build-ubunturepo index a1f62383e..fea44509b 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -444,7 +444,7 @@ __EOF__ chmod -R g+w xcat-dep #create the tar ball - dep_tar_name=xcat-dep-ubuntu.tar.bz + dep_tar_name=xcat-dep-ubuntu-snap`date +%Y%m%d`.tar.bz tar -hjcf $dep_tar_name xcat-dep chgrp root $dep_tar_name chmod g+w $dep_tar_name diff --git a/xCAT-buildkit/bin/buildkit b/xCAT-buildkit/bin/buildkit index 08d3e51e5..094c5e4b2 100755 --- a/xCAT-buildkit/bin/buildkit +++ b/xCAT-buildkit/bin/buildkit @@ -2001,7 +2001,7 @@ sub build_kitcomp $::VALID_PRER_COMPONENT = 0; if ( !$::PREREQUISITE ) { - if ( $comp->{ospkgdeps} || $comp->{preinstall} || $comp->{preupgrade} || $comp->{preuninstall} ) { + if ( $comp->{ospkgdeps} || $comp->{preinstall} || $comp->{preupgrade} ) { if ( &gen_kitcomp_spec($comp,\%repo, 'PREREQUISITE') ) { return 1; } # run the rpmbuild command @@ -2376,7 +2376,7 @@ sub gen_kitcomp_spec s/<<>>/$postscript/; s/<<>>//; s/<<>>/$postupscript/; - s/<<>>//; + s/<<>>/$preunscript/; s/<<>>/$postunscript/; } } diff --git a/xCAT-buildkit/share/xcat/kits/kitcomponent.spec.template b/xCAT-buildkit/share/xcat/kits/kitcomponent.spec.template index 93dfb56df..6032399db 100644 --- a/xCAT-buildkit/share/xcat/kits/kitcomponent.spec.template +++ b/xCAT-buildkit/share/xcat/kits/kitcomponent.spec.template @@ -26,9 +26,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root %clean rm -rf $RPM_BUILD_ROOT -%files -%defattr(-,root,root) -<<>> %changelog @@ -48,6 +45,11 @@ rm -rf $RPM_BUILD_ROOT %preun <<>> +%files +%defattr(-,root,root) +<<>> + + %postun <<>>