Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cmd/debos/debos.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ func doRun(r actions.Recipe, context *debos.Context) bool {
return true
}

func is32BitArch(arch string) bool {
switch arch {
case "armhf", "armel", "i386", "mips", "mipsel", "powerpc", "sh4":
return true
}
return false
}

func warnLocalhost(variable string, value string) {
message := `WARNING: Environment variable %[1]s contains a reference to
localhost. This may not work when running from fakemachine.
Expand Down Expand Up @@ -335,6 +343,11 @@ func main() {
log.Printf("WARNING: Scratch size of %dMB is less than recommended minimum 512MB\n", scratchsizeMB)
}
m.SetScratch(size, "")
if is32BitArch(r.Architecture) {
// dir_index stores d_off as a hash which can exceed INT32_MAX,
// causing readdir() to return EOVERFLOW on 32-bit guests.
m.SetScratchMkfsArgs([]string{"-O", "^dir_index"})

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to create another method in fakemachine, e.g. m.SetScratchFilesystem32BitCompatible(true|false) (false by default).

so debos becomes e.g.:

if is32BitArch(r.Architecture) {
	m.SetScratchFilesystem32BitCompatible(true)
}

}
}

m.SetShowBoot(options.ShowBoot)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/go-debos/debos

go 1.24
go 1.24.0

require (
al.essio.dev/pkg/shellescape v1.6.0
github.com/docker/go-units v0.5.0
github.com/freddierice/go-losetup/v2 v2.0.1
github.com/go-debos/fakemachine v0.0.12
github.com/go-debos/fakemachine v0.0.13-0.20260421232847-3fd484f7a37c
github.com/go-task/slim-sprig/v3 v3.0.0
github.com/goccy/go-yaml v1.19.2
github.com/google/uuid v1.6.0
Expand All @@ -18,10 +18,10 @@ require (
require (
github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/compress v1.18.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/surma/gocpio v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/sys v0.41.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/freddierice/go-losetup/v2 v2.0.1 h1:wPDx/Elu9nDV8y/CvIbEDz5Xi5Zo80y4h7MKbi3XaAI=
github.com/freddierice/go-losetup/v2 v2.0.1/go.mod h1:TEyBrvlOelsPEhfWD5rutNXDmUszBXuFnwT1kIQF4J8=
github.com/go-debos/fakemachine v0.0.12 h1:NbOFyWnc8xamXDgat/WrXym9LQn4P4gJ1/sWzp8GLxY=
github.com/go-debos/fakemachine v0.0.12/go.mod h1:vv6ZYmaY8qofwdZF3BZJW6xvb2fxUuKX59bQdGu6sRI=
github.com/go-debos/fakemachine v0.0.13-0.20260421232847-3fd484f7a37c h1:pX36QTX2OdaxpRNzERVQKCA4fCS0ZOWLgvT8lmPVNnk=
github.com/go-debos/fakemachine v0.0.13-0.20260421232847-3fd484f7a37c/go.mod h1:g2jKP3T5yoB/gU7Vv5Y+zn/QzUGaBVClFEa1J4txOnA=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM=
Expand All @@ -20,8 +20,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4=
github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sjoerdsimons/ostree-go v0.0.0-20201014091107-8fae757256f8 h1:fLxnJNJ++tkunS7BATed+mFqhA8KZYG7kT+WYEarYU4=
Expand All @@ -32,8 +32,8 @@ github.com/surma/gocpio v1.1.0 h1:RUWT+VqJ8GSodSv7Oh5xjIxy7r24CV1YvothHFfPxcQ=
github.com/surma/gocpio v1.1.0/go.mod h1:zaLNaN+EDnfSnNdWPJJf9OZxWF817w5dt8JNzF9LCVI=
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down