Skip to content

Commit 07641a9

Browse files
committed
forgejo,forgejo-lts: remove PAM support
https://forgejo.org/docs/latest/user/authentication/#pam-pluggable-authentication-module PAM support has to be enabled at compile time and upstream considers it opt-in. Official upstream binaries have it disabled. We enabled it by default because we simply inherited most of it from Gitea when the split in nixpkgs happened. Reasons why it had been enabled in nixpkgs for Gitea are unknown. See 9406f24. There is reason to believe not a single Forgejo instance running on NixOS uses this feature because it literally segfaults due to our sandboxing.
1 parent d8c8d5c commit 07641a9

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

nixos/doc/manual/release-notes/rl-2411.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@
180180
`services.forgejo.secrets` is a small wrapper over systemd's `LoadCredential=`. It has the same structure (sections/keys) as
181181
`services.forgejo.settings` but takes file paths that will be read before service startup instead of some plaintext value.
182182

183+
- `forgejo` and `forgejo-lts` no longer support the opt-in feature [PAM (Pluggable Authentication Module)](https://forgejo.org/docs/latest/user/authentication/#pam-pluggable-authentication-module).
184+
183185
- `services.ddclient.use` has been deprecated: `ddclient` now supports separate IPv4 and IPv6 configuration. Use `services.ddclient.usev4` and `services.ddclient.usev6` instead.
184186

185187
- `teleport` has been upgraded from major version 15 to major version 16.

pkgs/by-name/fo/forgejo/generic.nix

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
, nix-update-script
1818
, nixosTests
1919
, openssh
20-
, pam
21-
, pamSupport ? true
2220
, sqliteSupport ? true
2321
, xorg
2422
, runCommand
@@ -68,8 +66,6 @@ buildGoModule rec {
6866
makeWrapper
6967
];
7068

71-
buildInputs = lib.optional pamSupport pam;
72-
7369
nativeCheckInputs = [
7470
git
7571
openssh
@@ -83,8 +79,7 @@ buildGoModule rec {
8379
substituteInPlace modules/setting/server.go --subst-var data
8480
'';
8581

86-
tags = lib.optional pamSupport "pam"
87-
++ lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ];
82+
tags = lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ];
8883

8984
ldflags = [
9085
"-s"
@@ -115,7 +110,6 @@ buildGoModule rec {
115110
skippedTests = [
116111
"Test_SSHParsePublicKey/dsa-1024/SSHKeygen" # dsa-1024 is deprecated in openssh and requires opting-in at compile time
117112
"Test_calcFingerprint/dsa-1024/SSHKeygen" # dsa-1024 is deprecated in openssh and requires opting-in at compile time
118-
"TestPamAuth" # we don't have PAM set up in the build sandbox
119113
"TestPassword" # requires network: api.pwnedpasswords.com
120114
"TestCaptcha" # requires network: hcaptcha.com
121115
"TestDNSUpdate" # requires network: release.forgejo.org

0 commit comments

Comments
 (0)