Skip to content

Conversation

@patapenka-alexey
Copy link
Contributor

@patapenka-alexey patapenka-alexey commented Dec 16, 2025

After this commit, pack deb and pack rpm commands add files with application and tarantool versions to the package if the --cartridge-compat flag is set.

Closes #TNTP-5579

@patapenka-alexey patapenka-alexey added full-ci Enables full ci tests and removed full-ci Enables full ci tests labels Dec 16, 2025
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch 3 times, most recently from 6c0c0e0 to 26c998f Compare December 16, 2025 10:29
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch 2 times, most recently from 5d1c3ee to 34d65c2 Compare December 16, 2025 10:50
@oleg-jukovec oleg-jukovec requested review from bigbes and removed request for bigbes and oleg-jukovec December 16, 2025 11:03
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch 2 times, most recently from 31718cb to fe10f0b Compare December 17, 2025 07:18
Copy link
Contributor

@elhimov elhimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! Please, consider my comments.

@patapenka-alexey patapenka-alexey removed the request for review from bigbes December 18, 2025 05:43
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch from fe10f0b to c52ed3a Compare December 18, 2025 06:02
@patapenka-alexey
Copy link
Contributor Author

How to check:

mage build
./tt create single_instance --name new_app
./tt pack deb --app-list new_app --cartridge-compat --version 0.0.123
sudo dpkg -i ./new_app-0.0.123-1_x86_64.deb
dpkg -L new_app
sudo dpkg -r new_app
./tt pack rpm --app-list new_app --cartridge-compat --version 0.0.123
rpm -qlp ./new_app-0.0.123-1.x86_64.rpm

@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch 2 times, most recently from 71d7ec7 to 608295b Compare December 18, 2025 09:12
@elhimov elhimov added the full-ci Enables full ci tests label Dec 18, 2025
{assert.FileExists, "single_app/VERSION.lua"},
// Could not create VERSION file, because:
// cli/pack/testdata/single_app/bin/tarantool: empty
// {assert.FileExists, "single_app/VERSION"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it valid comment?
As far as I understand the whole point of this patch that it should exist.

Copy link
Contributor Author

@patapenka-alexey patapenka-alexey Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap. File cli/pack/testdata/single_app/bin/tarantool is an empty file, so generateVersionFile() triggers an error:

2025/12/18 13:54:50  warn Failed to generate VERSION file: failed to get tarantool version: fork/exec testdata/single_app/bin/tarantool: permission denied

So, we can't check that VERSION was created.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we need to implement the lack of functionality in our tarantool binary mock.
Initially we needed that tarantool "executable" file just exists, so we created empty file. In this case we need that it returns version when it is launched with --version argument. So we need to turn it into simple executable script that will return version (if asked to) as real tarantool does.

Copy link
Contributor

@elhimov elhimov Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked with this one and it works:

#!/bin/sh
if [ "$1" = "--version" ]; then
cat <<"EOF"
Tarantool Enterprise 3.2.0-0-g19607a903
Target: Linux-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/__w/sdk/sdk/build.sdk/tarantool-ee-3.2/static-build/tarantool-prefix -DENABLE_BACKTRACE=TRUE
Compiler: GNU-9.3.1
C_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/__w/sdk/sdk/tarantool-ee-3.2=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2 -flto -fno-fat-lto-objects
CXX_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/__w/sdk/sdk/tarantool-ee-3.2=. -std=c++11 -Wall -Wextra -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2 -flto -fno-fat-lto-objects
EOF
fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

After this commit, `pack deb` and `pack rpm` commands add files
with application and tarantool versions to the package
if the `--cartridge-compat` flag is set.

Closes #TNTP-5579
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch from 608295b to f72ea1a Compare December 19, 2025 08:02
Copy link
Contributor

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are red.

Copy link
Contributor

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are red.

@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch 6 times, most recently from db3f384 to 00315cf Compare December 22, 2025 06:29
Temporarily turn off failed test, due to Tarantool bug.

Closes #TNTP-5859
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch 3 times, most recently from d9244ac to f6327ea Compare December 22, 2025 11:39
Cleanup after each test with docker.

Closes #TNTP-5579
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-5579-version-lua branch from f6327ea to da096f8 Compare December 22, 2025 11:44
for path in systemd_paths:
re.search(path, output)

docker_prune()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables full ci tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants