Created attachment 250185 [details] lang/ruby33 build log Staging lang/ruby33 after this commit[0] to /usr/bin/install fails with the following error: ``` [...] installing manpages: /usr/local/share/man/man1 /bin/ln -fs ruby33 /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/bin/ruby /bin/ln -fs ruby33.1.gz /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/man/man1/ruby.1.gz /usr/bin/strip /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/bin/ruby33 /usr/bin/strip /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/lib/libruby33.so.33 /usr/bin/find /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/lib/ruby/3.3/amd64-freebsd15 -type f -name '*\.so' -exec /usr/bin/strip {} \; /bin/mkdir -p /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ripper /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/stringio /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/syslog install -m 0644 /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/ext/ripper/README /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ripper/ install -m 0644 /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/ext/stringio/README.md /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/stringio/ install -m 0644 /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/ext/syslog/syslog.txt /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/syslog/ install -m 0644 /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/COPYING* /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/ChangeLog /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/LEGAL /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/README* /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ install: /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ChangeLog: Inappropriate file type or format *** Error code 73 Stop. make: stopped in /usr/ports/lang/ruby33 =>> Cleaning up wrkdir ===> Cleaning for ruby-3.3.0,1 build of lang/ruby33 | ruby-3.3.0,1 ended at Tue Apr 23 10:11:47 EDT 2024 build time: 00:04:17 !!! build failure encountered !!! ``` The line of interest is: ``` install -m 0644 /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/COPYING* /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/ChangeLog /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/LEGAL /wrkdirs/usr/ports/lang/ruby33/work/ruby-3.3.0/README* /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ install: /wrkdirs/usr/ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ChangeLog: Inappropriate file type or format *** Error code 73 ``` This is due to this diff hunk[1] which changes the previous warning to a fatal error. I'm not sure exactly what is the cause, @des or @markj could you help? Full poudriere build log is attached. [0] https://cgit.freebsd.org/src/commit/?id=000a533e6d1db9878296b32d1cc212e11a2cc718 [1] https://github.com/freebsd/freebsd-src/commit/000a533e6d1db9878296b32d1cc212e11a2cc718#diff-665f6c246af038a9afd6eff198da57505ebc57a034f354ef0c750fb30ccde36eR846 [2] https://reviews.freebsd.org/D44810
I believe this represents a bug in the port. The post-install-DOCS-on target is trying to install ${WRKSRC}/ChangeLog to ${RUBY_DOCDIR}/, but ChangeLog is a directory. It would be best to fix the port. I guess it should mkdir ${STAGEDIR}${RUBY_DOCDIR}/ChangeLog, then copy the ChangeLog files separately.
(In reply to Mark Johnston from comment #1) No, ChangeLog is text file. yasu@eastasia[1111]% tar xfpvJ ruby-3.3.1.tar.xz (snip) yasu@eastasia[1112]% file ruby-3.3.1/ChangeLog ruby-3.3.1/ChangeLog: Unicode text, UTF-8 text yasu@eastasia[1113]%
(In reply to Yasuhiro Kimura from comment #2) $ cd lang/ruby33 $ make stage ... install -m 0644 /home/markj/src/freebsd-ports/lang/ruby33/work/ruby-3.3.0/COPYING* /home/markj/src/freebsd-ports/lang/ruby33/work/ruby-3.3.0/ChangeLog /home/markj/src/freebsd-ports/lang/ruby33/work/ruby-3.3.0/LEGAL /home/markj/src/freebsd-ports/lang/ruby33/work/ruby-3.3.0/README* /home/markj/src/freebsd-ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ install: /home/markj/src/freebsd-ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ChangeLog: Inappropriate file type or format *** Error code 73 $ ls /home/markj/src/freebsd-ports/lang/ruby33/work/stage/usr/local/share/doc/ruby33/ChangeLog ChangeLog-0.06_to_0.52 ChangeLog-0.50_to_0.60 ChangeLog-0.60_to_1.1 ChangeLog-1.8.0 ChangeLog-1.9.3 ChangeLog-2.0.0 ChangeLog-2.1.0 ChangeLog-2.2.0 ChangeLog-2.3.0 ChangeLog-2.4.0 ChangeLog-YARV The problem is that the destination exists and is a directory. This is doc/ChangeLog in the ruby tarball. Is the intent to install the root ChangeLog into doc/ChangeLog? If so, the port Makefile needs to be updated. install(1) is behaving correctly here.
FWIW this was already an error prior to my change, just a non-fatal one. Just search for “Inappropriate file type or format” in your build logs and you'll see.
(In reply to Mark Johnston from comment #3) Thanks for explanation. I understand what is happening and will fix lang/ruby33 ports.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8f7dac72c518bd1de867e78af351a4a7cf02d799 commit 8f7dac72c518bd1de867e78af351a4a7cf02d799 Author: Yasuhiro Kimura <yasu@FreeBSD.org> AuthorDate: 2024-04-24 18:07:09 +0000 Commit: Yasuhiro Kimura <yasu@FreeBSD.org> CommitDate: 2024-04-24 18:07:09 +0000 lang/ruby33: Fix build with latest -CURRENT post-install-DOCS-on copies all files/directories under ${WRKSRC}/doc/ into ${STAGEDIR}${RUBY_DOCDIR}/, then installs ${WRKSRC}/ChangeLog to same directory. But there is ChangeLog directory under ${WRKSRC}/doc/. As a result there is already ${STAGEDIR}${RUBY_DOCDIR}/ChangeLog directory when ${WRKSRC}/ChangeLog is tried to be installed as ${WRKSRC}/doc/ChangeLog. Previously install(1) regards it as non-fatal and build continues. But on latest -CURRENT the command regards it as fatal and results in build error. So fix it by moving ${WRKSRC}/ChangeLog to ${WRKSRC}/doc/ChangeLog/ChangeLog at extract phase. Bump PORTREVISION as plist is changed. PR: 278554 Reported by: Siva Mahadevan MFH: 2024Q2 Mk/Uses/ruby.mk | 2 +- lang/ruby33/Makefile | 4 +++- lang/ruby33/pkg-plist | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)
A commit in branch 2024Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d4e0df85317bd23b887c4c61817bd4b1ffebb274 commit d4e0df85317bd23b887c4c61817bd4b1ffebb274 Author: Yasuhiro Kimura <yasu@FreeBSD.org> AuthorDate: 2024-04-24 18:07:09 +0000 Commit: Yasuhiro Kimura <yasu@FreeBSD.org> CommitDate: 2024-04-24 18:13:07 +0000 lang/ruby33: Fix build with latest -CURRENT post-install-DOCS-on copies all files/directories under ${WRKSRC}/doc/ into ${STAGEDIR}${RUBY_DOCDIR}/, then installs ${WRKSRC}/ChangeLog to same directory. But there is ChangeLog directory under ${WRKSRC}/doc/. As a result there is already ${STAGEDIR}${RUBY_DOCDIR}/ChangeLog directory when ${WRKSRC}/ChangeLog is tried to be installed as ${WRKSRC}/doc/ChangeLog. Previously install(1) regards it as non-fatal and build continues. But on latest -CURRENT the command regards it as fatal and results in build error. So fix it by moving ${WRKSRC}/ChangeLog to ${WRKSRC}/doc/ChangeLog/ChangeLog at extract phase. Bump PORTREVISION as plist is changed. PR: 278554 Reported by: Siva Mahadevan MFH: 2024Q2 (cherry picked from commit 8f7dac72c518bd1de867e78af351a4a7cf02d799) Mk/Uses/ruby.mk | 2 +- lang/ruby33/Makefile | 4 +++- lang/ruby33/pkg-plist | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)
Fixed. Thanks for reporting.