Page MenuHomeFreeBSD

GCE: Fix sed command
Needs ReviewPublic

Authored by cperciva on Thu, Jun 4, 12:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 12, 8:57 PM
Unknown Object (File)
Wed, Jun 10, 8:03 AM
Unknown Object (File)
Wed, Jun 10, 5:32 AM
Unknown Object (File)
Tue, Jun 9, 6:04 PM
Unknown Object (File)
Mon, Jun 8, 9:51 AM
Unknown Object (File)
Mon, Jun 8, 6:32 AM
Unknown Object (File)
Sun, Jun 7, 12:58 AM

Details

Summary

The command sed -i -e 's/foo/bar/' file treats '-e' as being the
suffix for '-i', creating a backup file named 'file-e'.

Fixes: 709c1049fe0c ("GCE: Fix growfs path")
MFC After: 1 day

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73649
Build 70532: arc lint + arc unit

Event Timeline

Hm, this'll break if building on Linux... don't know if GCE is one of the ones for which that's now supported, probably not, but a bit sad to have this

Hm, this'll break if building on Linux... don't know if GCE is one of the ones for which that's now supported, probably not, but a bit sad to have this

Oh, I didn't know our VM image building code supported cross-building. That would explain why the original patch (which was submitted from Google) was wrong though.

It's also brittle with pkgbase, FWIW.

release/tools/gce.conf
42

untested

Hm, this'll break if building on Linux... don't know if GCE is one of the ones for which that's now supported, probably not, but a bit sad to have this

Oh, I didn't know our VM image building code supported cross-building. That would explain why the original patch (which was submitted from Google) was wrong though.

In theory it mostly does thanks to -DNO_ROOT and -DWITHOUT_QEMU, though there might be other missing pieces. I know Brooks has an old branch for CheriBSD somewhere that does it, but there may be things that have yet to be cleaned up and merged (upstream and downstream, we're not building VM images).

Actually, this is a completely harmless bug since the GCE images are built with NO_ROOT so the accidental /etc/rc.d/growfs-e file doesn't get distributed anyway.

This does need to get fixed properly though -- right now GCE images will stop running growfs the moment there's an update to the FreeBSD-rc package (including upgrading to a new release).