From 11cd20ada57c2e9da733cabe055c6ad4fd7b863b Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 14 Nov 2014 01:29:29 -0800 Subject: [PATCH 1/3] add build timestamp to the xcat-dep --- build-ubunturepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f2f03bc71822d39a12d485abbcc80478222e7cf5 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Fri, 14 Nov 2014 03:56:16 -0500 Subject: [PATCH 2/3] defect 4394 buildkit preuninstall did not work --- xCAT-buildkit/bin/buildkit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/; } } From 0d6d911fa54f9e391a87cbea11a8f12a3606974c Mon Sep 17 00:00:00 2001 From: baiyuan Date: Fri, 14 Nov 2014 03:55:58 -0500 Subject: [PATCH 3/3] defect 4394 buildkit preuninstall did not work --- xCAT-buildkit/share/xcat/kits/kitcomponent.spec.template | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 <<>>