From d41305fd6e4fc6db0ad7d5b9883800b467beded5 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Tue, 4 Aug 2020 14:22:04 +0200 Subject: [PATCH 1/3] Initial import. --- .gitignore | 2 + Dockerfile | 16 +++++++ Makefile | 14 ++++++ ruby.yaml | 113 ++++++++++++++++++++++++++++++++++++++++++++++ tests/Makefile | 6 +++ tests/config.yaml | 15 ++++++ 6 files changed, 166 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 ruby.yaml create mode 100644 tests/Makefile create mode 100644 tests/config.yaml diff --git a/.gitignore b/.gitignore index e69de29..6a222e9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +*.py[oc] +tests/generated.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..75809f3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# A workflow with docker is still uncertain. +# Keep watching below file and other module's situation. +# https://github.com/container-images/container-image-template/blob/master/Dockerfile.template +FROM registry.fedoraproject.org/f26-modular/boltron + +WORKDIR /build +COPY . . + +ENV LC_CTYPE C.UTF-8 + +RUN dnf -y update +RUN dnf -y --nodocs install \ + ruby \ + && dnf -y clean all + +CMD /bin/bash diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cd54e7a --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +DOCKER_IMAGE=ruby + +default: test + +build-docker: + docker build -t $(DOCKER_IMAGE) . + +test-nspawn: + MODULE=nspawn $(MAKE) -C tests test + +test-docker: build-docker + MODULE=docker URL=docker=$(DOCKER_IMAGE) $(MAKE) -C tests test + +test: test-nspawn test-docker diff --git a/ruby.yaml b/ruby.yaml new file mode 100644 index 0000000..c4e27fb --- /dev/null +++ b/ruby.yaml @@ -0,0 +1,113 @@ +document: modulemd +version: 2 +data: + # From ruby.spec Summary + summary: An interpreter of object-oriented scripting language + # From ruby.spec description + description: >- + Ruby is the interpreted scripting language for quick and easy + object-oriented programming. It has many features to process text + files and to do system management tasks (as in Perl). It is simple, + straight-forward, and extensible. + license: + module: + - MIT + references: + community: http://ruby-lang.org/ + documentation: https://www.ruby-lang.org/en/documentation/ + tracker: https://bugs.ruby-lang.org/ + dependencies: + - buildrequires: + # platform: [] is recommended. + platform: [-el8] + requires: + platform: [-el8] + components: + # SRPMs + rpms: + ruby: + # From ruby.spec Summary + rationale: An interpreter of object-oriented scripting language + multilib: [x86_64] + buildorder: 101 + ref: master + rubygem-abrt: + # From rubygem-abrt.spec Summary + rationale: >- + ABRT support for Ruby + buildorder: 102 + ref: master + rubygem-mysql2: + # From rubygem-mysql2.spec Summary + rationale: >- + A simple, fast Mysql library for Ruby, binding to libmysql + buildorder: 102 + ref: master + rubygem-pg: + # From rubygem-pg.spec Summary + rationale: >- + A Ruby interface to the PostgreSQL RDBMS + buildorder: 102 + ref: master + rubygem-bson: + # From rubygem-bson.spec Summary + rationale: >- + Ruby Implementation of the BSON specification + buildorder: 102 + ref: master + rubygem-mongo: + # From rubygem-mongo.spec Summary + rationale: >- + Ruby driver for MongoDB + buildorder: 103 + ref: master + buildopts: + rpms: + macros: | + # To disable tests in several packages. + %_without_tests 1 + # To avoid the error by rpms/ruby `checksec --file` on f30. + %_without_hardening_test 1 + api: + # RPMs + # From *.spec %package + rpms: + # From ruby.spec + - ruby + - ruby-devel + - ruby-libs + - ruby-default-gems + - rubygems + - rubygems-devel + - rubygem-bigdecimal + - rubygem-bundler + # It's used in Ruby 2.6 on f31. + - rubygem-did_you_mean + - rubygem-io-console + - rubygem-irb + - rubygem-json + - rubygem-minitest + - rubygem-net-telnet + - rubygem-openssl + - rubygem-power_assert + - rubygem-psych + - rubygem-rake + - rubygem-rdoc + - rubygem-test-unit + - rubygem-xmlrpc + # From rubygem-abrt.spec + - rubygem-abrt + # From rubygem-mysql2.spec + - rubygem-mysql2 + # From rubygem-pg.spec + - rubygem-pg + # From rubygem-bson.spec + - rubygem-bson + # From rubygem-mongo.spec + - rubygem-mongo + # Add profiles/default as a temporary workflow, + # because of a issue for omitted profiles element. + profiles: + default: + rpms: + - ruby diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..6683583 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,6 @@ +# Installation +# https://meta-test-family.readthedocs.io/en/latest/installation.html#installing-mtf +test: + mtf-env-set + mtf-generator + mtf -l *.py diff --git a/tests/config.yaml b/tests/config.yaml new file mode 100644 index 0000000..491e3bf --- /dev/null +++ b/tests/config.yaml @@ -0,0 +1,15 @@ +document: modularity-testing +version: 1 +name: ruby +modulemd-url: https://src.fedoraproject.org/cgit/modules/ruby.git/plain/ruby.yaml +packages: + rpms: + - ruby +module: + rpm: + url: http://ftp.fi.muni.cz/pub/linux/fedora/linux/releases/26/Everything/x86_64/os/ + docker: + url: docker.io/centos/ruby-23-centos7 +test: + version: + - 'ruby -v' From debaae10e4edf0141042a286107a3ad4aad25432 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Wed, 12 Aug 2020 14:49:39 +0200 Subject: [PATCH 2/3] Update macros. * Remove %_without_hardening_test as f30 was removed from the buildroot. * Add %test_timeout_scale to improve unstable tests by timeout in ruby. --- ruby.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.yaml b/ruby.yaml index c4e27fb..09ab1ef 100644 --- a/ruby.yaml +++ b/ruby.yaml @@ -66,8 +66,8 @@ data: macros: | # To disable tests in several packages. %_without_tests 1 - # To avoid the error by rpms/ruby `checksec --file` on f30. - %_without_hardening_test 1 + # To avoid the test faiures by timeout in ruby. + %test_timeout_scale 6 api: # RPMs # From *.spec %package From 1728cd248982c637a3295171315e374c0d70a57e Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Wed, 5 May 2021 15:18:14 +0200 Subject: [PATCH 3/3] Use correct refs for Ruby 2.7. Update refs of rubygems from master to rawhide. Resolves: rhbz#1965976 --- ruby.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby.yaml b/ruby.yaml index 09ab1ef..7731746 100644 --- a/ruby.yaml +++ b/ruby.yaml @@ -30,37 +30,37 @@ data: rationale: An interpreter of object-oriented scripting language multilib: [x86_64] buildorder: 101 - ref: master + ref: stream-ruby-2.7 rubygem-abrt: # From rubygem-abrt.spec Summary rationale: >- ABRT support for Ruby buildorder: 102 - ref: master + ref: rawhide rubygem-mysql2: # From rubygem-mysql2.spec Summary rationale: >- A simple, fast Mysql library for Ruby, binding to libmysql buildorder: 102 - ref: master + ref: rawhide rubygem-pg: # From rubygem-pg.spec Summary rationale: >- A Ruby interface to the PostgreSQL RDBMS buildorder: 102 - ref: master + ref: rawhide rubygem-bson: # From rubygem-bson.spec Summary rationale: >- Ruby Implementation of the BSON specification buildorder: 102 - ref: master + ref: rawhide rubygem-mongo: # From rubygem-mongo.spec Summary rationale: >- Ruby driver for MongoDB buildorder: 103 - ref: master + ref: rawhide buildopts: rpms: macros: |