From 79d29ff61eec696e6915215aca22d5e64f3dc305 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Fri, 20 Jan 2023 11:57:44 +0300 Subject: [PATCH 1/7] Add rustc to dependencies for 3.2.0 --- SOURCES/defs/3.2-dev | 3 +++ SOURCES/defs/3.2.0 | 3 +++ SOURCES/defs/3.2.0-jemalloc | 2 +- SOURCES/defs/3.2.0-railsexpress | 3 +++ SOURCES/mass-builder | 4 ++-- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/SOURCES/defs/3.2-dev b/SOURCES/defs/3.2-dev index 9b5e8466..3efa44be 100644 --- a/SOURCES/defs/3.2-dev +++ b/SOURCES/defs/3.2-dev @@ -3,8 +3,11 @@ deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates git deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel libyaml-devel +deps(rpm): rustc + deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates git deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev +deps(deb): rustc deps(bin): ruby diff --git a/SOURCES/defs/3.2.0 b/SOURCES/defs/3.2.0 index 06ca9c8a..c6aabbe2 100644 --- a/SOURCES/defs/3.2.0 +++ b/SOURCES/defs/3.2.0 @@ -6,8 +6,11 @@ eol(security): 2026-03-31 deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel libyaml-devel +deps(rpm): rustc + deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev +deps(deb): rustc CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/defs/3.2.0-jemalloc b/SOURCES/defs/3.2.0-jemalloc index fc5c1f50..bec8622b 100644 --- a/SOURCES/defs/3.2.0-jemalloc +++ b/SOURCES/defs/3.2.0-jemalloc @@ -5,7 +5,7 @@ eol(normal): 2025-03-31 eol(security): 2026-03-31 deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates libyaml-devel -deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel jemalloc-devel +deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel jemalloc-devel rustc CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/defs/3.2.0-railsexpress b/SOURCES/defs/3.2.0-railsexpress index 80ce5899..bbb84648 100644 --- a/SOURCES/defs/3.2.0-railsexpress +++ b/SOURCES/defs/3.2.0-railsexpress @@ -6,8 +6,11 @@ eol(security): 2026-03-31 deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel libyaml-devel +deps(rpm): rustc + deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev +deps(deb): rustc CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/mass-builder b/SOURCES/mass-builder index ef420283..52f48352 100755 --- a/SOURCES/mass-builder +++ b/SOURCES/mass-builder @@ -131,13 +131,13 @@ prepare() { yum -y install --enablerepo=kaos-testing autoconf bison gcc gcc-c++ \ openssl-devel glibc-devel libffi-devel \ ncurses-devel readline-devel tk-devel \ - zlib-devel libyaml-devel git patch + zlib-devel libyaml-devel rustc git patch else yum -y install rbenv rbbuild jre11 jemalloc-devel nano yum -y install autoconf bison gcc gcc-c++ \ openssl-devel glibc-devel libffi-devel \ ncurses-devel readline-devel tk-devel \ - zlib-devel libyaml-devel git patch + zlib-devel libyaml-devel rustc git patch fi # Use devtoolset for build on EL7 From 7ccdddc10a55a8f0f7445512ac8a6fb40d77efb0 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 23 Jan 2023 11:18:39 +0300 Subject: [PATCH 2/7] Update rbbuild-defs spec --- rbbuild-defs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbbuild-defs.spec b/rbbuild-defs.spec index 0c148222..c336c4bb 100644 --- a/rbbuild-defs.spec +++ b/rbbuild-defs.spec @@ -2,7 +2,7 @@ Summary: Def files for rbbuild utility Name: rbbuild-defs -Version: 2.0.0 +Version: 2.0.1 Release: 0%{?dist} License: Apache License, Version 2.0 Vendor: ESSENTIAL KAOS @@ -50,6 +50,9 @@ rm -rf %{buildroot} ################################################################################ %changelog +* Mon Jan 23 2023 Anton Novojilov - 2.0.1-0 +- Added rustc to dependencies for 3.2.0 + * Fri Dec 30 2022 Anton Novojilov - 2.0.0-0 - Added 2.7.6-railsexpress - Added 2.7.7 From 6b8a457ed07ea39facf4898e3f0427123912a2b0 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 23 Jan 2023 13:19:55 +0300 Subject: [PATCH 3/7] Add rust to dependencies for 3.2.0 --- SOURCES/defs/3.2.0 | 2 +- SOURCES/defs/3.2.0-jemalloc | 2 +- SOURCES/defs/3.2.0-railsexpress | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SOURCES/defs/3.2.0 b/SOURCES/defs/3.2.0 index c6aabbe2..dad31c99 100644 --- a/SOURCES/defs/3.2.0 +++ b/SOURCES/defs/3.2.0 @@ -10,7 +10,7 @@ deps(rpm): rustc deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev -deps(deb): rustc +deps(deb): rust CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/defs/3.2.0-jemalloc b/SOURCES/defs/3.2.0-jemalloc index bec8622b..e52a71c5 100644 --- a/SOURCES/defs/3.2.0-jemalloc +++ b/SOURCES/defs/3.2.0-jemalloc @@ -5,7 +5,7 @@ eol(normal): 2025-03-31 eol(security): 2026-03-31 deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates libyaml-devel -deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel jemalloc-devel rustc +deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel jemalloc-devel rust CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/defs/3.2.0-railsexpress b/SOURCES/defs/3.2.0-railsexpress index bbb84648..0e84cdcc 100644 --- a/SOURCES/defs/3.2.0-railsexpress +++ b/SOURCES/defs/3.2.0-railsexpress @@ -6,7 +6,7 @@ eol(security): 2026-03-31 deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel libyaml-devel -deps(rpm): rustc +deps(rpm): rust deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev From 4bb8348ded32cdda78be3fca91ff6be8fb37c299 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 23 Jan 2023 13:51:49 +0300 Subject: [PATCH 4/7] Add rust to dependencies for 3.2.0 --- SOURCES/defs/3.2.0 | 2 +- SOURCES/defs/3.2.0-railsexpress | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SOURCES/defs/3.2.0 b/SOURCES/defs/3.2.0 index dad31c99..2a8a2bf7 100644 --- a/SOURCES/defs/3.2.0 +++ b/SOURCES/defs/3.2.0 @@ -6,7 +6,7 @@ eol(security): 2026-03-31 deps(rpm): make gcc gcc-c++ zlib-devel readline-devel tk-devel ca-certificates deps(rpm): autoconf glibc-devel ncurses-devel bison libffi-devel libyaml-devel -deps(rpm): rustc +deps(rpm): rust deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev diff --git a/SOURCES/defs/3.2.0-railsexpress b/SOURCES/defs/3.2.0-railsexpress index 0e84cdcc..6256cdc8 100644 --- a/SOURCES/defs/3.2.0-railsexpress +++ b/SOURCES/defs/3.2.0-railsexpress @@ -10,7 +10,7 @@ deps(rpm): rust deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev -deps(deb): rustc +deps(deb): rust CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 From 1434ce62d8f174b3f5a10191f8da1e5efa4ee221 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 23 Jan 2023 14:11:11 +0300 Subject: [PATCH 5/7] Gathering and printing information about rust version --- SOURCES/defs/3.2.0 | 2 +- SOURCES/defs/3.2.0-railsexpress | 2 +- SOURCES/libexec/build.shx | 1 + SOURCES/libexec/facts.shx | 18 +++++++++++++++++- SOURCES/rbbuild | 2 +- rbbuild.spec | 5 ++++- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/SOURCES/defs/3.2.0 b/SOURCES/defs/3.2.0 index 2a8a2bf7..97a367f3 100644 --- a/SOURCES/defs/3.2.0 +++ b/SOURCES/defs/3.2.0 @@ -10,7 +10,7 @@ deps(rpm): rust deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev -deps(deb): rust +deps(deb): rustc CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/defs/3.2.0-railsexpress b/SOURCES/defs/3.2.0-railsexpress index 6256cdc8..0e84cdcc 100644 --- a/SOURCES/defs/3.2.0-railsexpress +++ b/SOURCES/defs/3.2.0-railsexpress @@ -10,7 +10,7 @@ deps(rpm): rust deps(deb): build-essential zlib1g-dev libreadline6-dev tk-dev ca-certificates deps(deb): autoconf libc6-dev libncurses5-dev bison libffi-dev libyaml-dev -deps(deb): rust +deps(deb): rustc CONFOPTS(openssl-1.1.1s): {os_name}-{os_arch} --openssldir={prefix}/openssl/ssl zlib-dynamic no-ssl3 shared -fPIC MAKEOPTS(openssl-1.1.1s): -j 1 diff --git a/SOURCES/libexec/build.shx b/SOURCES/libexec/build.shx index f3a34a8b..b870ecb2 100644 --- a/SOURCES/libexec/build.shx +++ b/SOURCES/libexec/build.shx @@ -221,6 +221,7 @@ build.printEnvInfo() { show " ${CL_BOLD}Prefix: ${CL_NORM} $prefix ${CL_DARK}(prefix)${CL_NORM}" show " ${CL_BOLD}GCC: ${CL_NORM} ${gcc_version:-${CL_GREY}—${CL_NORM}} ${CL_DARK}(gcc_version)${CL_NORM}" show " ${CL_BOLD}Clang: ${CL_NORM} ${clang_version:-${CL_GREY}—${CL_NORM}} ${CL_DARK}(clang_version)${CL_NORM}" + show " ${CL_BOLD}Rust: ${CL_NORM} ${rust_version:-${CL_GREY}—${CL_NORM}} ${CL_DARK}(rust_version)${CL_NORM}" show " ${CL_BOLD}Java: ${CL_NORM} ${java_version:-${CL_GREY}—${CL_NORM}} ${CL_DARK}(java_version)${CL_NORM}" show " ${CL_BOLD}Ruby: ${CL_NORM} ${ruby_version:-${CL_GREY}—${CL_NORM}} ${CL_DARK}(ruby_version)${CL_NORM}" show " ${CL_BOLD}OSName: ${CL_NORM} ${os_name} ${CL_DARK}(os_name)${CL_NORM}" diff --git a/SOURCES/libexec/facts.shx b/SOURCES/libexec/facts.shx index b9f1605b..f56d1a8d 100644 --- a/SOURCES/libexec/facts.shx +++ b/SOURCES/libexec/facts.shx @@ -56,12 +56,17 @@ os_dist="" # Current OS kernel version (String) os_kern="" +################################################################################ + # GCC version (String) gcc_version="" # Clang version (String) clang_version="" +# Rust version (String) +rust_version="" + # Java version (String) java_version="" @@ -119,6 +124,7 @@ facts.collect() { gcc_version=$(facts.getGCCVersion) clang_version=$(facts.getClangVersion) + rust_version=$(facts.getRustVersion) java_version=$(facts.getJavaVersion) ruby_version=$(facts.getRubyVersion) } @@ -169,7 +175,7 @@ facts.getGCCVersion() { fi } -# Find clang version +# Find Clang version # # Code: No # Echo: Version (String) @@ -179,6 +185,16 @@ facts.getClangVersion() { fi } +# Find Rust version +# +# Code: No +# Echo: Version (String) +facts.getRustVersion() { + if system.hasApp "rustc" ; then + rustc --version | cut -f2 -d' ' + fi +} + # Find Java version # # Code: No diff --git a/SOURCES/rbbuild b/SOURCES/rbbuild index a911c3dd..cabe0aac 100755 --- a/SOURCES/rbbuild +++ b/SOURCES/rbbuild @@ -13,7 +13,7 @@ fi APP="RBBuild" # App version (String) -VER="2.0.0" +VER="2.1.0" ################################################################################ diff --git a/rbbuild.spec b/rbbuild.spec index 9c79a2fd..963ca1e5 100644 --- a/rbbuild.spec +++ b/rbbuild.spec @@ -2,7 +2,7 @@ Summary: Utility for compiling and installing different ruby versions Name: rbbuild -Version: 2.0.0 +Version: 2.1.0 Release: 0%{?dist} License: Apache License, Version 2.0 Vendor: ESSENTIAL KAOS @@ -57,6 +57,9 @@ rm -rf %{buildroot} ################################################################################ %changelog +* Mon Jan 23 2023 Anton Novojilov - 2.1.0-0 +- Gathering and printing information about rust version + * Fri Dec 30 2022 Anton Novojilov - 2.0.0-0 - Brand new version rewritten from scratch - Using zstandart compression by default From 01dc8f0dcc6009b0e11be9611303e9ce3855c7d9 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 23 Jan 2023 14:26:47 +0300 Subject: [PATCH 6/7] Improve mass-builder script --- SOURCES/mass-builder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/mass-builder b/SOURCES/mass-builder index 52f48352..9f831c74 100755 --- a/SOURCES/mass-builder +++ b/SOURCES/mass-builder @@ -198,7 +198,7 @@ build() { has_errors=true fi - if ! command -v ruby &> /dev/null ; then + if ! ruby --version &> /dev/null ; then if [[ -z "$is_ruby_set" ]] ; then setGlobalRubyVersion "$version" fi From 283b662df445f8548df3b550a8237b9746900e21 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 23 Jan 2023 14:46:14 +0300 Subject: [PATCH 7/7] Improve mass-builder script --- SOURCES/mass-builder | 4 ---- 1 file changed, 4 deletions(-) diff --git a/SOURCES/mass-builder b/SOURCES/mass-builder index 9f831c74..ccb46620 100755 --- a/SOURCES/mass-builder +++ b/SOURCES/mass-builder @@ -401,10 +401,6 @@ getGraceFileSize() { # Code: Yes # Echo: No setGlobalRubyVersion() { - if [[ $(rbenv global 2>/dev/null) != "system" ]] ; then - return 0 - fi - if ! rbenv global "$1" &> /dev/null ; then return 1 fi