Commit Graph

146 Commits

Author SHA1 Message Date
Michael Stapelberg e09e239138 WithFallbackToHostSpecific: work when called on nil UpdateStruct 2023-01-15 16:41:05 +01:00
Michael Stapelberg c51f6b8f94 httpclient: remove now-unused GetHTTPClientForInstance 2023-01-15 16:38:56 +01:00
Michael Stapelberg 79b761a8d0 httpclient: add For() function working with a *config.Struct 2023-01-15 16:37:09 +01:00
Michael Stapelberg ce9754d612 tlsflag: remove httpclient wrapper
This makes it possible to import package tlsflag from httpclient in a follow-up
commit.
2023-01-15 16:27:14 +01:00
Michael Stapelberg 063b533a8f instanceflag: initialize even when not registered on pflags
This fixes using instanceflag from breakglass (which is not on pflags).
2023-01-15 13:35:31 +01:00
Michael Stapelberg d172888a87 instanceflag: make overrideable 2023-01-15 13:35:25 +01:00
Michael Stapelberg cd72f827ba updateflag: refactor to reduce duplication 2023-01-15 13:35:14 +01:00
Michael Stapelberg f5c7fc51ab clarify comment regarding InternalCompatibilityFlags purpose 2023-01-14 08:52:06 +01:00
Michael Stapelberg 8ce5e37830 remove CertPEM and KeyPEM fallback from WithFallbackToHostSpecific
This resulted in TLS being on despite "UseTLS": "off".
2023-01-07 18:17:58 +01:00
Michael Stapelberg 67ef7c05d4 config: fix copy & paste error: cert.pem → key.pem 2023-01-07 17:50:20 +01:00
Michael Stapelberg f7440a1551 implement support for instance configuration
related to https://github.com/gokrazy/gokrazy/issues/147
2023-01-07 15:39:36 +01:00
Michael Stapelberg 6c14a9bfe6 add instanceflag package
related to https://github.com/gokrazy/gokrazy/issues/147
2023-01-07 15:39:30 +01:00
andig 2f79bee2fc Upgrade go-cmp, obliterate xerrors (#15) 2022-10-06 08:58:15 +02:00
Michael Stapelberg 7b8403f423 add getters/setters for updateflag and tlsflag 2022-10-02 23:10:28 +02:00
Michael Stapelberg d964fb95b0 document result of zstd experiment: not worth the trouble here 2022-09-18 22:19:49 +02:00
Mark Dietzer a2f6689ea8 Add method to get HTTP client for a specified instance (#14) 2022-09-13 22:15:30 +02:00
Mark Dietzer eb0e72acc1 Use Hostname() for finding cert.pem in httpclient, Host might include ports (#13) 2022-09-07 08:26:47 +02:00
Michael Stapelberg 5675ab8eae go.mod: update to language version go 1.18, tidy 2022-08-07 10:40:07 +02:00
Michael Stapelberg ead56cf00a GitHub Actions: bump to Go 1.19 2022-08-07 10:12:19 +02:00
Michael Stapelberg 3a50f98bee treat -tls="" as enabled if certs exist, add -tls=off
This allows using breakglass without explicitly setting -tls=self-signed.

fixes https://github.com/gokrazy/gokrazy/issues/131
2022-07-09 19:25:10 +02:00
Damiano Donati c79d6023db Indicate macOS/Darwin path for gokrazyConfigDir() (#12) 2022-05-27 21:27:32 +02:00
Michael Stapelberg 1821f343e4 allow specifying the name of the -update flag
related to https://github.com/gokrazy/breakglass/issues/13
2022-04-30 21:25:44 +02:00
Michael Stapelberg b97ccfa731 refactor gokr-packer’s -tls flag into internal
related to https://github.com/gokrazy/breakglass/issues/13
2022-04-30 21:20:58 +02:00
Michael Stapelberg 12864f6aa2 go mod tidy 2022-04-30 21:20:40 +02:00
Michael Stapelberg 707cfb1f7d remove unnecessary use of pointers 2022-04-30 21:20:34 +02:00
Michael Stapelberg 5d31fd3805 GitHub Actions: bump to Go 1.18 2022-03-20 16:02:38 +01:00
Anup Chenthamarakshan 9ed2981076 deviceconfig: config for QEMU MBR testing (#11) 2022-01-29 16:07:11 +01:00
Anup Chenthamarakshan 36e28c6612 deviceconfig: add Slug to DeviceConfig (#10)
Slug is a short name to refer to a device. Add convenience func to get
device config given a slug.
2022-01-13 09:07:12 +01:00
Anup Chenthamarakshan 698f19a074 deviceconfig: Odroid HC2 device config (#9) 2022-01-11 20:19:49 +01:00
Michael Stapelberg 81842290f3 go.mod: set go version to 1.17 2021-11-21 16:43:48 +01:00
Michael Stapelberg df151cdf75 update go.mod 2021-11-21 16:43:26 +01:00
Michael Stapelberg 4587bc3af7 gofmt 2021-11-21 16:42:19 +01:00
Michael Stapelberg 2e7d058148 GitHub Actions: switch to Go 1.17 2021-11-21 16:41:29 +01:00
Michael Stapelberg c5a0bcc07c add progress package to internal 2021-11-21 16:40:27 +01:00
Michael Stapelberg f699bca2f3 add humanize package to internal 2021-11-21 16:40:22 +01:00
Michael Stapelberg 92d32e572d refactor -update flag into internal package (for upcoming reuse) 2021-11-21 15:57:32 +01:00
Michael Stapelberg 1b3b5687a0 (fat.Reader).Extents: implement support for subdirectories 2021-06-21 18:25:16 +02:00
Michael Stapelberg 8f28a81e30 rootdev: remove left-over debug log message 2021-06-20 22:40:40 +02:00
Michael Stapelberg 3382b18a32 rootdev: implement support for GPT partitions
related to https://github.com/gokrazy/gokrazy/issues/87
2021-06-20 22:22:48 +02:00
Michael Stapelberg 4716d3fefe fat: fix: calculate offset instead of keeping track
Keeping track of the offset depends on the order in which entries are written,
i.e. breaks as soon as you have multiple nested directories.
Calculating the offset is shorter and more robust.

related to https://github.com/gokrazy/internal/issues/6
2021-06-20 14:43:41 +02:00
Michael Stapelberg 1f95c50d27 fat: skip long file name (LFN) entries for . and .. 2021-06-19 20:29:54 +02:00
Michael Stapelberg f2bd9b32d8 fat: fix writing directories and subdirectories
When writing directory entries, we now allocate the FAT entries
before writing, so that we can synthesize the . and .. entries
which need FirstCluster and parent.FirstCluster to be set.

This code currently assumes each directory consumes only 1 cluster
(space for 64 directory entries, I think).
2021-06-19 20:29:54 +02:00
Michael Stapelberg 3567162db3 fat: pad the file system for now-stricter dosfsck 2021-06-19 20:29:54 +02:00
Michael Stapelberg 4a4698a463 fat: fix empty file handling (do not consume FAT entries) 2021-06-19 20:29:54 +02:00
Michael Stapelberg 613eeb147f fat: set fw.pending = nil to avoid accidental double Close() 2021-06-19 20:29:54 +02:00
Michael Stapelberg de61a87169 fat: use attrDirectory instead of 0x10 throughout 2021-06-19 20:29:54 +02:00
Michael Stapelberg cf2fc1492b fat: write volume id root directory entry
This is required to make fsck.vfat happy.
2021-06-19 20:29:54 +02:00
Michael Stapelberg 6c741aa40a rootdev: correctly construct NVMe paths 2021-06-04 09:19:09 +02:00
Michael Stapelberg 549f1e76c5 remove updater in favor of new github.com/gokrazy/updater package 2021-01-06 22:21:30 +01:00
Michael Stapelberg e2046189e5 switch from travis to GitHub actions 2020-12-30 14:55:41 +01:00