Bug 211952 - make buildworld fails with read-only /usr/src
Summary: make buildworld fails with read-only /usr/src
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-RC1
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-17 18:45 UTC by bugs.freebsd.org-qym4
Modified: 2016-08-24 02:29 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.freebsd.org-qym4 2016-08-17 18:45:06 UTC
Hi,

--- ARMSCII-7.src ---
sed 's/ARMSCII-x/ARMSCII-7/' /usr/src/share/i18n/esdb/AST/ARMSCII.src > /usr/src/share/i18n/esdb/AST/ARMSCII-7.src
[...irrelevant bits from parallel build...]
cannot create /usr/src/share/i18n/esdb/AST/ARMSCII-7.src: Read-only file system
*** [ARMSCII-7.src] Error code 2


Best regards
Comment 1 Jilles Tjoelker freebsd_committer freebsd_triage 2016-08-19 22:32:35 UTC
It looks like this was caused by SVN r296702. Since that revision, it attempts to build some source files from other source files (for example share/i18n/esdb/AST/ARMSCII-7.src from share/i18n/esdb/AST/ARMSCII-7.src). It is probably better to move these commands to a script that is run manually if needed, somewhat like sys/kern/makesyscalls.sh.

As a workaround, you can run one build with a read/write source tree and revert the changes, if any. After that, the timestamps will be such that it will not attempt to rebuild the files again.
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2016-08-19 22:34:53 UTC
Ah, share/i18n/esdb/AST/ARMSCII-7.src is modified but never has changed content.  Really these should probably not be checked in if they match what is generated exactly.

I'll look at this soon.
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2016-08-22 17:09:53 UTC
Hmm, I wasn't able to reproduce this. I set my checkout read-only:

~/git/freebsd # touch uh
touch: uh: Read-only file system

Did a make cleanworld and then a buildworld, and it passed.

Still looking at it though.
Comment 4 Bryan Drewery freebsd_committer freebsd_triage 2016-08-22 17:13:57 UTC
Well it does happen if I touch ARMSCII.src.  "svn switch" does touch all files so I can see why this would happen.
Comment 5 Bryan Drewery freebsd_committer freebsd_triage 2016-08-22 20:21:16 UTC
I have a fix that I will commit soon. Just running it through some various
tests and batching it up with some bsd.subdir.mk fixes for these
csmapper directories.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-08-22 22:51:50 UTC
A commit references this bug:

Author: bdrewery
Date: Mon Aug 22 22:50:58 UTC 2016
New revision: 304643
URL: https://svnweb.freebsd.org/changeset/base/304643

Log:
  Fix building on read-only source trees.

  This partially reverts r296702 and reworks the original check to only
  look in .CURDIR.  This avoids ever trying to rebuild a .src file that is
  already in the source tree as an override.

  PR:		211952
  MFC after:	3 days
  Sponsored by:	EMC / Isilon Storage Division

Changes:
  head/share/i18n/esdb/Makefile.part
Comment 7 Bryan Drewery freebsd_committer freebsd_triage 2016-08-22 22:59:30 UTC
Will MFC to releng/11.0 in a few days.
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-08-24 01:34:39 UTC
A commit references this bug:

Author: bdrewery
Date: Wed Aug 24 01:34:23 UTC 2016
New revision: 304714
URL: https://svnweb.freebsd.org/changeset/base/304714

Log:
  MFC r304643:

    Fix building on read-only source trees.

  PR:	211952

Changes:
_U  stable/11/
  stable/11/share/i18n/esdb/Makefile.part
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-08-24 02:29:43 UTC
A commit references this bug:

Author: bdrewery
Date: Wed Aug 24 02:29:26 UTC 2016
New revision: 304718
URL: https://svnweb.freebsd.org/changeset/base/304718

Log:
  MFS r304714:

    MFC r304643:

      Fix building on read-only source trees.

  PR:		211952
  Approved by:	re (gjb)

Changes:
_U  releng/11.0/
  releng/11.0/share/i18n/esdb/Makefile.part