On Thu, Dec 22, 2022 at 5:52 PM Jun Aruga (he / him) <jaruga@xxxxxxxxxx> wrote: > > Is there a way to set a /etc/hosts setting below or an equivalent one > in a RPM spec file? The rubygem-mysq2 RPM package's unit test needs > the setting to run SSL tests in the %check process of the > rubygem-mysql2.spec file. > > ``` > $ cat /etc/hosts > ... > 127.0.0.1 mysql2gem.example.com > ``` > > As a reference, here are the upstream mysql2 project's settings. > https://github.com/brianmario/mysql2/blob/7f6f33a6e0bd652d5e7087edb6e5d00df248d35b/.github/workflows/build.yml#L66 > https://github.com/brianmario/mysql2/blob/7f6f33a6e0bd652d5e7087edb6e5d00df248d35b/.github/workflows/container.yml#L30 > > Related PR on Fedora: > https://src.fedoraproject.org/rpms/rubygem-mysql2/pull-request/14 It looks like the upstream tests only use this weird setup because they use containers? For running the test suite in the Fedora package, it should be much easier to patch the test sources to not connect to the mysql2gem.example.com domain (which requires the /etc/hosts entry, which you can't do in mock) but to "localhost" or "127.0.0.1" (which should always work). Fabio _______________________________________________ packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue