Repository: favonia/cloudflare-ddns
Pull request #803 (2024-07-17 00:12:59)

docs: prepare 1.13.0

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/803?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 93.92%. Comparing base [(`1a89807`)](https://app.codecov.io/gh/favonia/cloudflare-ddns/commit/1a89807225aec7f7fc18327b52728c18c1cf40b5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) to head [(`424edce`)](https://app.codecov.io/gh/favonia/cloudflare-ddns/commit/424edcefb213149b4f162d4a50a02fcf31b50c92?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main     #803   +/-   ##
=======================================
  Coverage   93.92%   93.92%           
=======================================
  Files          50       50           
  Lines        2157     2157           
=======================================
  Hits         2026     2026           
  Misses        120      120           
  Partials       11       11           
```

| [Flag](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/803/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/803/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | `93.92% <100.00%> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/803?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).


Patch:
diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
index f62db44..4a82818 100644
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,32 @@
+# [1.13.0](https://github.com/favonia/cloudflare-ddns/compare/v1.12.0...v1.13.0) (2024-07-16)
+
+This is a major release that no longer drops superuser privileges. Please review the instructions in [README](./README.markdown) for the new recommended setup.
+
+### BREAKING CHANGES
+
+- **The updater will no longer drop superuser privileges and `PUID` and `PGID` will be ignored.** Please use Docker’s built-in mechanism to drop privileges. The old, hacky Docker Compose template will grant the new updater unneeded privileges, which is less secure and not recommended. Please review the new template in [README](./README.markdown) that is simpler and more secure when combined with the new updater. In a nutshell, add `user:` as
+
+  ```yaml
+  user: "1000:1000"
+  # Run the updater with a specific user ID and group ID (in that order).
+  # You should change the two numbers based on your setup.
+  ```
+
+  and remove `cap_add` completely.
+
+- In case you are using the `*-nocapdrop` Docker tags, they will no longer be maintained. The updater will no longer drop superuser privileges, and thus the `nocapdrop` builds are identical to the regular ones. Just use the regular Docker tags such as `latest`.
+
+- The older versions used to add the comment “Created by cloudflare-ddns” to all newly created DNS records. Since this version, the comment has become configurable, but by default it is empty. To restore the old behavior, add the configuration `RECORD_COMMENT=Created by cloudflare-ddns` (or any comment you want to use).
+
+### Features
+
+- **api:** make record comment of new DNS records configurable using `RECORD_COMMENT` ([#783](https://github.com/favonia/cloudflare-ddns/issues/783)) ([b10c9a3](https://github.com/favonia/cloudflare-ddns/commit/b10c9a3653d01f16ebbdbce0bdee881b15329e71))
+- **api:** recheck tokens if the network is temporarily down ([#790](https://github.com/favonia/cloudflare-ddns/issues/790)) ([15d1a5a](https://github.com/favonia/cloudflare-ddns/commit/15d1a5af7f5a95ee90d8c8eb9589cc23e9ba1c4b))
+- **api:** smarter sanity checking ([#796](https://github.com/favonia/cloudflare-ddns/issues/796)) ([80dc7f4](https://github.com/favonia/cloudflare-ddns/commit/80dc7f4b7a28431aebe81630cdb2b7ace6f08d88))
+- **cron:** show dates when needed ([#795](https://github.com/favonia/cloudflare-ddns/issues/795)) ([d1850b1](https://github.com/favonia/cloudflare-ddns/commit/d1850b17e797f1d9b9a06de5f28b4fbe25b32f33))
+- **config:** recheck 1.1.1.1 and 1.0.0.1 some time later when probing fails (possibly because the network is temporarily down) ([#788](https://github.com/favonia/cloudflare-ddns/issues/788)) ([0983b06](https://github.com/favonia/cloudflare-ddns/commit/0983b06b4b308be5e0bfd16f2b101114d9008d56))
+- **updater:** bail out faster when it times out ([#784](https://github.com/favonia/cloudflare-ddns/issues/784)) ([3b42131](https://github.com/favonia/cloudflare-ddns/commit/3b42131ab5afc8ba021677ba9325b05fde7c5243))
+
 # [1.12.0](https://github.com/favonia/cloudflare-ddns/compare/v1.11.0...v1.12.0) (2024-06-28)
 
 This is a major release with two significant improvements:
diff --git a/README.markdown b/README.markdown
index 1994fbc..4a9efa9 100644
--- a/README.markdown
+++ b/README.markdown
@@ -108,7 +108,7 @@ services:
     read_only: true
     # Make the container filesystem read-only (optional but recommended)
     cap_drop: [all]
-    # Drop all capabilities (optional but recommended)
+    # Drop all Linux capabilities (optional but recommended)
     security_opt: [no-new-privileges:true]
     # Another protection to restrict superuser privileges (optional but recommended)
     environment:
diff --git a/internal/config/config_read.go b/internal/config/config_read.go
index e92ebaa..b8707cd 100644
--- a/internal/config/config_read.go
+++ b/internal/config/config_read.go
@@ -35,8 +35,8 @@ func (c *Config) ReadEnv(ppfmt pp.PP) bool {
 		return false
 	}
 
-	CheckDeprecatedLinuxID(ppfmt, "PUID", "user")
-	CheckDeprecatedLinuxID(ppfmt, "PGID", "group")
+	CheckIgnoredLinuxID(ppfmt, "PUID", "user")
+	CheckIgnoredLinuxID(ppfmt, "PGID", "group")
 
 	return true
 }
diff --git a/internal/config/env_deprecated.go b/internal/config/env_deprecated.go
index 9570450..377ba04 100644
--- a/internal/config/env_deprecated.go
+++ b/internal/config/env_deprecated.go
@@ -2,12 +2,12 @@ package config
 
 import "github.com/favonia/cloudflare-ddns/internal/pp"
 
-// CheckDeprecatedLinuxID reads an environment variable as a user or group ID.
-func CheckDeprecatedLinuxID(ppfmt pp.PP, key string, class string) {
+// CheckIgnoredLinuxID reads an environment variable as a user or group ID.
+func CheckIgnoredLinuxID(ppfmt pp.PP, key string, class string) {
 	if val := Getenv(key); val != "" {
-		ppfmt.Warningf(pp.EmojiUserError, "%s=%s is deprecated; use Docker's built-in mechanism to set %s ID",
+		ppfmt.Warningf(pp.EmojiUserError, "%s=%s is ignored; use Docker's built-in mechanism to set %s ID",
 			key, val, class)
 		ppfmt.Warningf(pp.EmojiHint,
-			"See https://github.com/favonia/cloudflare-ddns for the new recommended template")
+			"See https://github.com/favonia/cloudflare-ddns for the new Docker template")
 	}
 }


Test patch:
diff --git a/internal/config/env_deprecated_test.go b/internal/config/env_deprecated_test.go
index 2d801dd..1c123c9 100644
--- a/internal/config/env_deprecated_test.go
+++ b/internal/config/env_deprecated_test.go
@@ -11,7 +11,7 @@ import (
 )
 
 //nolint:paralleltest,funlen // environment vars are global
-func TestCheckDeprecatedLinuxID(t *testing.T) {
+func TestCheckIgnoredLinuxID(t *testing.T) {
 	key := keyPrefix + "ID"
 	for name, tc := range map[string]struct {
 		set           bool
@@ -28,8 +28,8 @@ func TestCheckDeprecatedLinuxID(t *testing.T) {
 			true, "0   ",
 			func(m *mocks.MockPP) {
 				gomock.InOrder(
-					m.EXPECT().Warningf(pp.EmojiUserError, "%s=%s is deprecated; use Docker's built-in mechanism to set %s ID", key, "0", "kitty"), //nolint:lll
-					m.EXPECT().Warningf(pp.EmojiHint, "See https://github.com/favonia/cloudflare-ddns for the new recommended template"),           //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiUserError, "%s=%s is ignored; use Docker's built-in mechanism to set %s ID", key, "0", "kitty"), //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiHint, "See https://github.com/favonia/cloudflare-ddns for the new Docker template"),             //nolint:lll
 				)
 			},
 		},
@@ -37,8 +37,8 @@ func TestCheckDeprecatedLinuxID(t *testing.T) {
 			true, "   1   ",
 			func(m *mocks.MockPP) {
 				gomock.InOrder(
-					m.EXPECT().Warningf(pp.EmojiUserError, "%s=%s is deprecated; use Docker's built-in mechanism to set %s ID", key, "1", "kitty"), //nolint:lll
-					m.EXPECT().Warningf(pp.EmojiHint, "See https://github.com/favonia/cloudflare-ddns for the new recommended template"),           //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiUserError, "%s=%s is ignored; use Docker's built-in mechanism to set %s ID", key, "1", "kitty"), //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiHint, "See https://github.com/favonia/cloudflare-ddns for the new Docker template"),             //nolint:lll
 				)
 			},
 		},
@@ -50,7 +50,7 @@ func TestCheckDeprecatedLinuxID(t *testing.T) {
 			if tc.prepareMockPP != nil {
 				tc.prepareMockPP(mockPP)
 			}
-			config.CheckDeprecatedLinuxID(mockPP, key, "kitty")
+			config.CheckIgnoredLinuxID(mockPP, key, "kitty")
 		})
 	}
 }