From a9acaf2902b81dfe0798e6b8bb08d942bd83b60b Mon Sep 17 00:00:00 2001 From: UmaShankar Avagadda Date: Fri, 10 Jun 2022 11:45:36 +0530 Subject: [PATCH] Merge pull request #98 from Zimbra/ZCS-11514 ZCS-11514 : Getting log4j dependency errors while upgrading from Zimbra 9 Patch24.1 to Patch25 --- build.xml | 1 + pkg-builder.pl | 5 ++++- scripts/postinst.sh | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 scripts/postinst.sh diff --git a/build.xml b/build.xml index 791cef6..99290c9 100644 --- a/build.xml +++ b/build.xml @@ -10,6 +10,7 @@ + diff --git a/pkg-builder.pl b/pkg-builder.pl index 06cb4e1..5042f87 100755 --- a/pkg-builder.pl +++ b/pkg-builder.pl @@ -235,6 +235,7 @@ ($) cpy_file("build/dist/resolver-20050927.jar", "$stage_base_dir/opt/zimbra/lib/jars/resolver-20050927.jar"); cpy_file("build/dist/javax.annotation-api-1.2.jar", "$stage_base_dir/opt/zimbra/lib/jars/javax.annotation-api-1.2.jar"); cpy_file("build/dist/apache-jsp-9.4.46.v20220331.jar", "$stage_base_dir/opt/zimbra/lib/jars/apache-jsp-9.4.46.v20220331.jar"); + cpy_file("build/dist/zmlocalconfig", "$stage_base_dir/opt/zimbra/lib/patches/localconfig/zmlocalconfig"); return ["."]; } @@ -365,7 +366,9 @@ ($) } } } - + if ( $pkg_name =~ "zimbra-common-core-libs" ){ + push( @cmd, "--pkg-post-install-script=scripts/postinst.sh" ); + } push( @cmd, @{ [ map { "--pkg-replaces=$_"; } @{ $pkg_info->{replaces} } ] } ) if ( $pkg_info->{replaces} ); push( @cmd, @{ [ map { "--pkg-depends=$_"; } @{ $pkg_info->{other_deps} } ] } ) if ( $pkg_info->{other_deps} ); push( @cmd, @{ [ map { "--pkg-depends=$_ (>= $PKG_GRAPH{$_}->{version})"; } @{ $pkg_info->{soft_deps} } ] } ) if ( $pkg_info->{soft_deps} ); diff --git a/scripts/postinst.sh b/scripts/postinst.sh new file mode 100644 index 0000000..652effb --- /dev/null +++ b/scripts/postinst.sh @@ -0,0 +1,4 @@ +if [ -f /opt/zimbra/bin/zmlocalconfig ]; then + cp -af /opt/zimbra/lib/patches/localconfig/zmlocalconfig /opt/zimbra/bin/zmlocalconfig + chmod 755 /opt/zimbra/bin/zmlocalconfig +fi