Bug 258052

Summary: textproc/rubygem-nokogiri: Fails to patch: patch-ext_nokogiri_extconf.rb
Product: Ports & Packages Reporter: Bedreddin Sahbaz <bedreddinsahbaz>
Component: Individual Port(s)Assignee: Matthias Fechner <mfechner>
Status: Closed FIXED    
Severity: Affects Many People CC: ruby
Priority: --- Keywords: regression
Version: LatestFlags: bugzilla: maintainer-feedback? (ruby)
Hardware: i386   
OS: Any   
Attachments:
Description Flags
extconf.rb.rej none

Description Bedreddin Sahbaz 2021-08-26 06:28:11 UTC
Created attachment 227440 [details]
extconf.rb.rej

I can't install rubygem-nokogiri port. Error message;

# uname -a
FreeBSD baki.sgkkolitakip.web.tr 11.4-RELEASE-p9 FreeBSD 11.4-RELEASE-p9 #0: Tue Apr  6 08:51:50 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386


===>  Patching for rubygem-nokogiri-1.11.7
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/ruby27 - found
===>  Applying FreeBSD patches for rubygem-nokogiri-1.11.7 from /usr/ports/textproc/rubygem-nokogiri/files
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to ext/nokogiri/extconf.rb.rej
===>  FAILED Applying FreeBSD patch-ext_nokogiri_extconf.rb
===> FAILED to apply cleanly FreeBSD patch(es) patch-ext_nokogiri_extconf.rb
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/rubygem-nokogiri
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-26 06:40:21 UTC
^Triage: Assign to committer of last update [1]

[1] https://cgit.freebsd.org/ports/commit/?id=65cb21cae8786afbbecf821eff0f8ab49a186289
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2021-08-31 10:45:32 UTC
I cannot reproduce this, builds fine here:
https://pkg.fechner.net/data/130amd64-gitlab/2021-08-31_12h42m20s/logs/rubygem-nokogiri-1.11.7.log

Maybe do a `make clean` before you build.
Comment 3 Bedreddin Sahbaz 2021-09-01 08:48:39 UTC
root@baki:/usr/ports/textproc/rubygem-nokogiri # make clean
===>  Cleaning for rubygem-nokogiri-1.11.7
root@baki:/usr/ports/textproc/rubygem-nokogiri # make install
===>  License MIT accepted by the user
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by rubygem-nokogiri-1.11.7 for building
===>  Extracting for rubygem-nokogiri-1.11.7
=> SHA256 Checksum OK for rubygem/nokogiri-1.11.7.gem.
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/ruby27 - found
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/gem27 - found
Unpacked gem: '/usr/ports/textproc/rubygem-nokogiri/work/nokogiri-1.11.7'
===>  Patching for rubygem-nokogiri-1.11.7
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/ruby27 - found
===>  Applying FreeBSD patches for rubygem-nokogiri-1.11.7 from /usr/ports/textproc/rubygem-nokogiri/files
1 out of 1 hunks failed--saving rejects to nokogiri.gemspec.rej
===>  FAILED Applying FreeBSD patch-gemspec
===> Cleanly applied FreeBSD patch(es)  patch-ext_nokogiri_extconf.rb
===> FAILED to apply cleanly FreeBSD patch(es)  patch-gemspec
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/rubygem-nokogiri

Still doensn't work for me :(
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2021-09-01 08:58:50 UTC
Can you try a:
make distclean
make
Comment 5 Matthias Fechner freebsd_committer freebsd_triage 2021-09-01 09:04:01 UTC
Have you anything set in /etc/make.conf?
Comment 6 Bedreddin Sahbaz 2021-09-01 09:11:30 UTC
# cat /etc/make.conf 
-DEFAULT_VERSIONS= python2=2.7
+DEFAULT_VERSIONS= python3=3.6

No, i didn't change anything..
Comment 7 Bedreddin Sahbaz 2021-09-01 09:14:32 UTC
root@baki:/usr/ports/textproc/rubygem-nokogiri # make distclean
===>  Cleaning for rubygem-nokogiri-1.11.7
===>  Deleting distfiles for rubygem-nokogiri-1.11.7
root@baki:/usr/ports/textproc/rubygem-nokogiri # make
===>  License MIT accepted by the user
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/sbin/pkg - found
=> nokogiri-1.11.7.gem doesn't seem to exist in /usr/ports/distfiles/rubygem.
=> Attempting to fetch https://rubygems.org/downloads/nokogiri-1.11.7.gem
nokogiri-1.11.7.gem                                   9134 kB  102 kBps 01m29s
===> Fetching all distfiles required by rubygem-nokogiri-1.11.7 for building
===>  Extracting for rubygem-nokogiri-1.11.7
=> SHA256 Checksum OK for rubygem/nokogiri-1.11.7.gem.
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/ruby27 - found
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/gem27 - found
Unpacked gem: '/usr/ports/textproc/rubygem-nokogiri/work/nokogiri-1.11.7'
===>  Patching for rubygem-nokogiri-1.11.7
===>   rubygem-nokogiri-1.11.7 depends on file: /usr/local/bin/ruby27 - found
===>  Applying FreeBSD patches for rubygem-nokogiri-1.11.7 from /usr/ports/textproc/rubygem-nokogiri/files
1 out of 1 hunks failed--saving rejects to nokogiri.gemspec.rej
===>  FAILED Applying FreeBSD patch-gemspec
===> Cleanly applied FreeBSD patch(es)  patch-ext_nokogiri_extconf.rb
===> FAILED to apply cleanly FreeBSD patch(es)  patch-gemspec
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/rubygem-nokogiri
Comment 8 Matthias Fechner freebsd_committer freebsd_triage 2021-09-01 10:03:55 UTC
Your make.conf is broken, try it with:
DEFAULT_VERSIONS=python2=2.7 python3=3.6
Comment 9 Bedreddin Sahbaz 2021-09-01 16:37:46 UTC
Sorry, still not working.
Comment 10 Bedreddin Sahbaz 2021-09-07 08:04:21 UTC
Could this error be related to my FreeBSD version?

# uname -a
FreeBSD baki.sgkkolitakip.web.tr 11.4-RELEASE-p9 FreeBSD 11.4-RELEASE-p9 #0: Tue Apr  6 08:51:50 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
Comment 11 Matthias Fechner freebsd_committer freebsd_triage 2021-09-07 13:02:03 UTC
(In reply to Bedreddin Sahbaz from comment #10)
It builds also fine with this version (11.4-p13):
https://pkg.fechner.net/build.html?mastername=114amd64-default&build=2021-09-07_14h46m05s

I think you have broken there something one your system or you need to update to 11.4-p13:
building for: FreeBSD 114amd64-default 11.4-RELEASE-p13 FreeBSD 11.4-RELEASE-p13 amd64
Comment 12 Bedreddin Sahbaz 2021-09-07 18:23:12 UTC
root@fuzuli:/home/bedo # uname -a
FreeBSD fuzuli.sgkkolitakip.web.tr 11.4-RELEASE-p9 FreeBSD 11.4-RELEASE-p9 #0: Tue Apr  6 08:51:50 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

root@fuzuli:/home/bedo # freebsd-version
11.4-RELEASE-p13

Why?
Comment 13 Bedreddin Sahbaz 2021-09-19 05:33:33 UTC
I upgraded the system to FreeBSD 12.2. And problem solved. Topic can be closed. Thank you.