<HTML><BODY><div><div>Sasha, could you please remove comments about Vanilla packages structure.<br>For the rest - LGTM<br> </div><div>Regards,</div><div>Oleg</div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Вторник, 18 февраля 2020, 10:47 +03:00 от Alexander V. Tikhonov <avtikhon@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><style type="text/css"></style><div><div id="style_15820120211909324345_BODY">Changed the Vanilla paths of the packages in S3 to<br>the Tarantool documented on its web site, to give<br>the ability to Tarantool users to continue use it<br>w/o changes.<br><br>Also moved the RPM sources packages to the standalone<br>path.<br><br>Follows up #3380<br>---<br><br>Github: <a href="https://github.com/tarantool/tarantool/tree/avtikhon/gh-3380-rpm-packages-paths-full-ci" target="_blank">https://github.com/tarantool/tarantool/tree/avtikhon/gh-3380-rpm-packages-paths-full-ci</a><br>Issue: <a href="https://github.com/tarantool/tarantool/issues/3380" target="_blank">https://github.com/tarantool/tarantool/issues/3380</a><br><br> tools/update_repo.sh | 73 +++++++++++++++++++++++++++++++-------------<br> 1 file changed, 51 insertions(+), 22 deletions(-)<br><br>diff --git a/tools/update_repo.sh b/tools/update_repo.sh<br>index 65a977187..ec6146514 100755<br>--- a/tools/update_repo.sh<br>+++ b/tools/update_repo.sh<br>@@ -405,42 +405,68 @@ EOF<br> }<br> <br> # The 'pack_rpm' function especialy created for RPM packages. It works<br>-# with RPM packing OS like Centos, Fedora. It is based on globaly known<br>+# with RPM packing OS like CentOS, Fedora. It is based on globaly known<br> # tool 'createrepo' from:<br>-# <a href="https://linux.die.net/man/8/createrepo" target="_blank">https://linux.die.net/man/8/createrepo</a><br>+# <a href="https://linux.die.net/man/8/createrepo" target="_blank">https://linux.die.net/man/8/createrepo</a><br> # This tool works with single distribution of the given OS.<br>-# Result of the routine is the rpm package for YUM repository with<br>-# file structure equal to the Centos/Fedora:<br>-# <a href="http://mirror.centos.org/centos/7/os/x86_64/Packages/" target="_blank">http://mirror.centos.org/centos/7/os/x86_64/Packages/</a><br>-# <a href="http://mirrors.kernel.org/fedora/releases/30/Everything/x86_64/os/Packages/t/" target="_blank">http://mirrors.kernel.org/fedora/releases/30/Everything/x86_64/os/Packages/t/</a><br>+#<br>+# Vanilla RPM packages structure for YUM repositories looks like:<br>+# CentOS:<br>+# Binaries: <a href="http://mirror.centos.org/centos/7/os/x86_64/Packages/" target="_blank">http://mirror.centos.org/centos/7/os/x86_64/Packages/</a><br>+# Sources: <a href="http://vault.centos.org/8.1.1911/BaseOS/Source/SPackages/" target="_blank">http://vault.centos.org/8.1.1911/BaseOS/Source/SPackages/</a><br>+# Fedora:<br>+# Binaries: <a href="http://mirrors.kernel.org/fedora/releases/30/Everything/x86_64/os/Packages/t/" target="_blank">http://mirrors.kernel.org/fedora/releases/30/Everything/x86_64/os/Packages/t/</a><br>+# Sources: <a href="http://mirrors.kernel.org/fedora/releases/30/Everything/source/tree/Packages/t/" target="_blank">http://mirrors.kernel.org/fedora/releases/30/Everything/source/tree/Packages/t/</a><br>+# Decided to have back port capability at Tarantool links:<br>+# CentOS:<br>+# Tarantool: <a href="https://www.tarantool.io/en/download/os-installation/rhel-centos/" target="_blank">https://www.tarantool.io/en/download/os-installation/rhel-centos/</a><br>+# Changed Vanila -> MCS S3:<br>+# centos/7/os/x86_64/Packages -> centos/7/x86_64/Packages<br>+# 8.1.1911/BaseOS/Source/SPackages -> centos/8.1.1911/SRPMS/Packages<br>+# Fedora:<br>+# Tarantool: <a href="https://www.tarantool.io/en/download/os-installation/fedora/" target="_blank">https://www.tarantool.io/en/download/os-installation/fedora/</a><br>+# Changed Vanila -> MCS S3:<br>+# fedora/releases/30/Everything/x86_64/os/Packages -> fedora/30/x86_64/Packages<br>+# fedora/releases/30/Everything/source/tree/Packages -> fedora/30/SRPMS/Packages<br> function pack_rpm {<br>- if ! ls $repo/*.rpm >/dev/null ; then<br>- echo "ERROR: Current '$repo' path doesn't have RPM packages in path"<br>- usage<br>- exit 1<br>- fi<br>+ pack_subdir=$1<br>+ pack_patterns=$2<br>+<br>+ for pack_pattern in $pack_patterns ; do<br>+ if ! ls $repo/$pack_pattern >/dev/null ; then<br>+ if [ "$pack_pattern" == "*.noarch.rpm" ]; then<br>+ pack_patterns=$(echo "$pack_patterns" | sed "s#$pack_pattern##g")<br>+ continue<br>+ fi<br>+ echo "ERROR: Current '$repo' path doesn't have $pack_pattern packages in path"<br>+ usage<br>+ exit 1<br>+ fi<br>+ done<br> <br>     # prepare the workspace<br>     prepare_ws ${os}_${option_dist}<br> <br>     # copy the needed package binaries to the workspace<br>- cp $repo/*.rpm $ws/.<br>+ for pack_pattern in $pack_patterns ; do<br>+ cp $repo/$pack_pattern $ws/.<br>+ done<br> <br>     pushd $ws<br> <br>     # set the paths<br>- if [ "$os" == "el" ]; then<br>- repopath=$option_dist/os/x86_64<br>- rpmpath=Packages<br>- elif [ "$os" == "fedora" ]; then<br>- repopath=releases/$option_dist/Everything/x86_64/os<br>- rpmpath=Packages/$proddir<br>+ repopath=$option_dist/$pack_subdir<br>+ rpmpath=Packages<br>+ if [ "$os" == "fedora" ]; then<br>+ rpmpath=$rpmpath/$proddir<br>     fi<br>     packpath=$repopath/$rpmpath<br> <br>     # prepare local repository with packages<br>     $mk_dir $packpath<br>- mv *.rpm $packpath/.<br>+ for pack_pattern in $pack_patterns ; do<br>+ mv $pack_pattern $packpath/.<br>+ done<br>     cd $repopath<br> <br>     # copy the current metadata files from S3<br>@@ -547,8 +573,10 @@ EOF<br>     gpg --detach-sign --armor repodata/repomd.xml<br> <br>     # copy the packages to S3<br>- for file in $rpmpath/*.rpm ; do<br>- $aws_cp_public $file "$bucket_path/$repopath/$file"<br>+ for pack_pattern in $pack_patterns ; do<br>+ for file in $rpmpath/$pack_pattern ; do<br>+ $aws_cp_public $file "$bucket_path/$repopath/$file"<br>+ done<br>     done<br> <br>     # update the metadata at the S3<br>@@ -563,7 +591,8 @@ EOF<br> if [ "$os" == "ubuntu" -o "$os" == "debian" ]; then<br>     pack_deb<br> elif [ "$os" == "el" -o "$os" == "fedora" ]; then<br>- pack_rpm<br>+ pack_rpm x86_64 "*.x86_64.rpm *.noarch.rpm"<br>+ pack_rpm SRPMS "*.src.rpm"<br> else<br>     echo "USAGE: given OS '$os' is not supported, use any single from the list: $alloss"<br>     usage<br>--<br>2.17.1<br> </div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Oleg Piskunov</div></div></div><div> </div></div></BODY></HTML>