Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Create RPM spec #152

Merged
merged 4 commits into from
Jul 31, 2018
Merged

Create RPM spec #152

merged 4 commits into from
Jul 31, 2018

Conversation

Totktonada
Copy link
Member

@Totktonada Totktonada commented May 21, 2018

Closes #97.

make test

%install
mkdir -p %{br_module_dir}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we delete previous installation before installing the new one?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess preparing of sandboxed build / install directories (it is not ones where a package will be installed finally, but they has the same directory structure) is rpmbuild task.

Requires: tarantool >= 1.9.0.0
#Requires: tarantool-avro-schema >= 2.0.71, tarantool-avro-schema < 3.0.0.0
#Requires: lulpeg

Copy link
Contributor

@SudoBobo SudoBobo Jun 13, 2018

Choose a reason for hiding this comment

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

Don't we need shard, http, lrexlib in Requires? We need them not only for tests

Copy link
Member Author

Choose a reason for hiding this comment

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

They are optional. Are there recommended packages or like so? If so, we can add they to recommended. Otherwise, I think, we shouldn’t.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can use Suggests: These dependencies will not be installed during package installation, instead they would be shown to user as an option.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great!

@SudoBobo SudoBobo force-pushed the gh-97-add-rpm-spec branch 5 times, most recently from 363b9ef to 1ed2dba Compare July 11, 2018 13:30
# Dependencies for a user
Requires: tarantool >= 1.9.0.0
Requires: tarantool-avro-schema >= 2.0.71
BuildRequires: tarantool-shard >= 2.1.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Should not be mandatory dependecy as well as should not be listed as BuildRequires twice.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, my mistake.

test.sh Outdated
cd ..
cd graphql
git submodule update --recursive --init
# todo fix it with RPM packages
Copy link
Member Author

Choose a reason for hiding this comment

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

Can we switch testing to centos-7?

Copy link
Contributor

@SudoBobo SudoBobo Jul 19, 2018

Choose a reason for hiding this comment

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

Travis support only ubuntu and os x. We may run tests in centos-7 in docker.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can deduplicate some code if switch to centos-7, but it is not so. Nevermind.

@@ -0,0 +1,57 @@
Name: tarantool-graphql
Version: 0.0.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Version: 0.0.0 # placeholder

Would that works correctly?

Copy link
Contributor

@SudoBobo SudoBobo Jul 19, 2018

Choose a reason for hiding this comment

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

Fixed that to 0.0.1 and added a comment that tells that packpack sets VERSION during build.

sudo yum -y install tarantool tarantool-devel \
msgpuck-devel \
pcre2 pcre2-devel
cd / && sudo tarantoolctl rocks install lulpeg
Copy link
Member Author

Choose a reason for hiding this comment

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

Now we can use RPM.

@SudoBobo SudoBobo force-pushed the gh-97-add-rpm-spec branch 4 times, most recently from b4042b6 to 9c9ff8c Compare July 23, 2018 13:01
@@ -3,6 +3,7 @@
---
--- It provides basic logic for such space-like data storages and abstracted
--- away from details from where tuples are arrived into the application.
package.cpath = package.cpath .. ";/usr/share/tarantool/pcre2/?.so"
Copy link
Member Author

Choose a reason for hiding this comment

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

Hey, what is this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed this debugging stuff.

@@ -1,3 +1,4 @@
package.path = package.path .. ";/usr/share/tarantool/lulpeg/?.lua"
Copy link
Member Author

Choose a reason for hiding this comment

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

And this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed.

cd Python-2.7.6
sudo ./configure --prefix=/usr/local 2>&1 >/dev/null
sudo make 2>&1 >/dev/null
sudo make install 2>&1 >/dev/null
Copy link
Member Author

Choose a reason for hiding this comment

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

Proposed to fix Makefile:

 test: lint
-       virtualenv -p python2.7 ./.env-2.7
-       . ./.env-2.7/bin/activate && \
+       virtualenv -p python2 ./.env-2
+       . ./.env-2/bin/activate && \

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed this way.


#curl -s https://packagecloud.io/install/repositories/tarantool/1_7/script.deb.sh | sudo bash
#sudo apt-get update > /dev/null
#sudo apt-get -q -y install tarantool tarantool-dev
Copy link
Member Author

Choose a reason for hiding this comment

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

What is this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed.


sudo apt-get -qq update
curl http://download.tarantool.org/tarantool/1.9/gpgkey |
sudo apt-key add -release=`lsb_release -c -s`
Copy link
Member Author

Choose a reason for hiding this comment

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

sudo apt-key add - # this is part of the previous command (after pipeline); use backslash and indent
release=lsb_release -c -s # this is another command

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, fixed.

# append two lines to a list of source repositories
sudo rm -f /etc/apt/sources.list.d/*tarantool*.list
echo "deb http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
sudo tee /etc/apt/sources.list.d/tarantool_1_9.list
Copy link
Member Author

Choose a reason for hiding this comment

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

backslash + indent

Copy link
Contributor

Choose a reason for hiding this comment

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

Also fixed.

echo "deb http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
sudo tee /etc/apt/sources.list.d/tarantool_1_9.list
echo "deb-src http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
sudo tee -a /etc/apt/sources.list.d/tarantool_1_9.list
Copy link
Member Author

Choose a reason for hiding this comment

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

backslash + indent

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed.

echo "deb-src http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
sudo tee -a /etc/apt/sources.list.d/tarantool_1_9.list

sudo apt-get update > /dev/null
Copy link
Member Author

Choose a reason for hiding this comment

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

Why we are hide this output?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just copy-pasted it from one of the tarantool scripts. But it seems to be more consistent without hiding.


# append two lines to a list of source repositories
sudo rm -f /etc/apt/sources.list.d/*tarantool*.list
echo "deb http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested to use ${release} insteaad of trusty.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, fixed.

dependencies, added deploy to travis.
sudo apt-get -q -y install tarantool tarantool-dev

cd ..
git clone https://github.com/rtsisyk/msgpuck
Copy link
Member Author

Choose a reason for hiding this comment

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

For avro-schema?

Copy link
Contributor

Choose a reason for hiding this comment

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

For shard. There are msgpuck packages in our 1_7 packagecloud repo, but not in 1_9.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed, added deploy of msgpuck to 1_9, 1_10, 2_0 repos.

# maybe we can use tarantool headers?
sudo apt-get install lua5.1
sudo apt-get install liblua5.1-0-dev
wget "http://luarocks.github.io/luarocks/releases/luarocks-2.4.4.tar.gz"
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

No reason. Fixed to package usage.

@SudoBobo SudoBobo force-pushed the gh-97-add-rpm-spec branch from d8c4709 to 3c1d583 Compare July 27, 2018 13:48
#Suggests: tarantool-lrexlib-pcre2
#Suggests: tarantool-shard
#Suggests: tarantool-http
#Suggests: tarantool-avro-schema
Copy link
Member Author

Choose a reason for hiding this comment

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

  1. Avro-schema is is requires.
  2. Please, comment why Suggests are commented.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to remove it totally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why? I’d like this feature. When a package manager has no flags like portage does it is way to inform user about possible feature s/he can miss.

We can have it commented and uncomment when all actual distros will have necessary package manager versions.

Copy link
Contributor

@SudoBobo SudoBobo Jul 29, 2018

Choose a reason for hiding this comment

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

We can have it commented and uncomment when all actual distros will have necessary package manager versions.

Well, I'm ok with it. Left it commented, removed avro-schema.

Copy link
Member Author

Choose a reason for hiding this comment

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

So… point 2 in the first message of the thread:

  1. Please, comment why Suggests are commented.

Put certain tools names and versions to allow easily catch it up in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

Added comment and version for shard.


# Dependencies for a user
Requires: tarantool >= 1.9.0.0
Requires: tarantool-avro-schema >= 2.0.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Why not explicit 2.0.71?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed.

.travis.yml Outdated
- sudo luarocks install ldoc
env:
global:
- PRODUCT=tarantool-graphql
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems to be redundant, is it so?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, if not set, PRODUCT is determined by packpack from the name of the .spec file. So yes, it redundant.

.travis.yml Outdated
sudo apt-key add -release=`lsb_release -c -s`
cache:
directories:
- $HOME/.cache
Copy link
Member Author

Choose a reason for hiding this comment

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

You don’t place anything into .cache explicitly or implicitly, so why? Or docker stores something here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don’t strongly against, but prefer to understand what and why we have.

Copy link
Contributor

@SudoBobo SudoBobo Jul 29, 2018

Choose a reason for hiding this comment

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

Packpack uses it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for clarification.

@SudoBobo SudoBobo changed the title WIP: Create RPM spec Create RPM spec Jul 29, 2018
@SudoBobo SudoBobo force-pushed the gh-97-add-rpm-spec branch from fb10803 to c341273 Compare July 29, 2018 23:01
tarantoolctl rocks install http
tarantoolctl rocks install shard "${SHARD_VERSION}"
tarantoolctl rocks install avro-schema "${AVRO_SCHEMA}"
# lua (with dev headers) is necessary for luacheck
Copy link
Member Author

Choose a reason for hiding this comment

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

Now, when you are install luarocks from the package manager, there are no need to manually install lua5.1 and liblua5.1-0-dev? The comment seems to be slightly unaccurate: luacheck is pure lua and doesn’t require lua headers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, there is no need for them. Removed.

@SudoBobo SudoBobo force-pushed the gh-97-add-rpm-spec branch from c341273 to 365e3c9 Compare July 30, 2018 14:05
@SudoBobo SudoBobo force-pushed the gh-97-add-rpm-spec branch from 365e3c9 to 10a54e8 Compare July 30, 2018 14:09
@Totktonada Totktonada force-pushed the gh-97-add-rpm-spec branch from 0d2aa42 to 0110584 Compare July 31, 2018 22:54
@Totktonada Totktonada merged commit 79f01fc into master Jul 31, 2018
@Totktonada Totktonada deleted the gh-97-add-rpm-spec branch July 31, 2018 23:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants