commit:     ab92e93f7e3bf5cdbb2aafbe64f05c0df285c3f5
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  2 06:39:51 2024 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 06:39:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab92e93f

dev-ruby/pg: avoid calling sudo during tests

Closes: https://bugs.gentoo.org/933234
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/pg/pg-1.5.6.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dev-ruby/pg/pg-1.5.6.ebuild b/dev-ruby/pg/pg-1.5.6.ebuild
index 2f148b514659..0233cb967774 100644
--- a/dev-ruby/pg/pg-1.5.6.ebuild
+++ b/dev-ruby/pg/pg-1.5.6.ebuild
@@ -41,6 +41,11 @@ all_ruby_prepare() {
                -e 's/__dir__/"."/' \
                -i ${RUBY_FAKEGEM_GEMSPEC} || die
 
+       # Don't allow sudo calls that try to tinker with /etc/hosts (bug 
#933234)
+       sed -e '/sudo/ s:^:#:' -i spec/helpers.rb || die
+       sed -e '/refreshs DNS address while conn.reset/ s/it/xit/' \
+               -i spec/pg/connection_spec.rb || die
+
        # Avoid tests that assume IPv4
        sed -i -e '/expect.*hostaddr/ s:^:#:' spec/pg/connection_spec.rb || die
 

Reply via email to