forgejo: 1.21.11-1 -> 7.0.0

+17 -33
+3 -3
nixos/tests/forgejo.nix
··· 141 141 assert "BEGIN PGP PUBLIC KEY BLOCK" in server.succeed("curl http://localhost:3000/api/v1/signing-key.gpg") 142 142 143 143 api_version = json.loads(server.succeed("curl http://localhost:3000/api/forgejo/v1/version")).get("version") 144 - assert "development" != api_version and "-gitea-" in api_version, ( 144 + assert "development" != api_version and "${pkgs.forgejo.version}+gitea-" in api_version, ( 145 145 "/api/forgejo/v1/version should not return 'development' " 146 - + f"but should contain a gitea compatibility version string. Got '{api_version}' instead." 146 + + f"but should contain a forgejo+gitea compatibility version string. Got '{api_version}' instead." 147 147 ) 148 148 149 149 server.succeed( ··· 152 152 ) 153 153 server.succeed( 154 154 "su -l forgejo -c 'GITEA_WORK_DIR=/var/lib/forgejo gitea admin user create " 155 - + "--username test --password totallysafe --email test@localhost'" 155 + + "--username test --password totallysafe --email test@localhost --must-change-password=false'" 156 156 ) 157 157 158 158 api_token = server.succeed(
+5 -5
pkgs/by-name/fo/forgejo/package-json-npm-build-frontend.patch
··· 1 1 diff --git a/package.json b/package.json 2 - index 57dcfc2f7..c9f23dbf7 100644 2 + index b50c52cf43..d6aafb8775 100644 3 3 --- a/package.json 4 4 +++ b/package.json 5 - @@ -79,5 +79,8 @@ 6 - "defaults", 7 - "not ie > 0", 8 - "not ie_mob > 0" 5 + @@ -98,5 +98,8 @@ 6 + }, 7 + "browserslist": [ 8 + "defaults" 9 9 - ] 10 10 + ], 11 11 + "scripts": {
+5 -21
pkgs/by-name/fo/forgejo/package.nix
··· 24 24 pname = "forgejo-frontend"; 25 25 inherit (forgejo) src version; 26 26 27 - npmDepsHash = "sha256-uMPy4cqMDNZTpF+pk7YibXEJO1zxVfwlCeFzGgJBiU0="; 27 + npmDepsHash = "sha256-BffoEbIzTU61bw3ECEm5eDHcav4S27MB5jQKsMprkcw="; 28 28 29 29 patches = [ 30 30 ./package-json-npm-build-frontend.patch ··· 39 39 in 40 40 buildGoModule rec { 41 41 pname = "forgejo"; 42 - version = "1.21.11-1"; 42 + version = "7.0.0"; 43 43 44 44 src = fetchFromGitea { 45 45 domain = "codeberg.org"; 46 46 owner = "forgejo"; 47 47 repo = "forgejo"; 48 48 rev = "v${version}"; 49 - hash = "sha256-7oYsoZpZcNIUw3iXSi1Q5So2yYgKnT5U7GHQ4NVqVdc="; 50 - # Forgejo has multiple different version strings that need to be provided 51 - # via ldflags. main.ForgejoVersion for example is a combination of a 52 - # hardcoded gitea compatibility version string (in the Makefile) and 53 - # git describe and is easiest to get by invoking the Makefile. 54 - # So we do that, store it the src FOD to then extend the ldflags array 55 - # in preConfigure. 56 - # The `echo -e >> Makefile` is temporary and already part of the next 57 - # major release. Furthermore, the ldflags will change next major release 58 - # and need to be updated accordingly. 59 - leaveDotGit = true; 60 - postFetch = '' 61 - cd "$out" 62 - echo -e 'show-version-full:\n\t@echo ''${FORGEJO_VERSION}' >> Makefile 63 - make show-version-full > FULL_VERSION 64 - find "$out" -name .git -print0 | xargs -0 rm -rf 65 - ''; 49 + hash = "sha256-oIx1aPrHgOWx13ocA3t7N5UdTgr+64tgC0XcEnhA/eE="; 66 50 }; 67 51 68 - vendorHash = "sha256-OuWNF+muWM6xqwkFxLIUsn/huqXj2VKg8BN9+JHVw58="; 52 + vendorHash = "sha256-UcjaMi/4XYLdaJhi2j3UWqHqkpTbZBo6EwNXxdRIKLw="; 69 53 70 54 subPackages = [ "." ]; 71 55 ··· 93 77 ]; 94 78 95 79 preConfigure = '' 96 - export ldflags+=" -X code.gitea.io/gitea/routers/api/forgejo/v1.ForgejoVersion=$(cat FULL_VERSION) -X main.ForgejoVersion=$(cat FULL_VERSION)" 80 + export ldflags+=" -X main.ForgejoVersion=$(GITEA_VERSION=${version} make show-version-api)" 97 81 ''; 98 82 99 83 preBuild = ''
+4 -4
pkgs/by-name/fo/forgejo/static-root-path.patch
··· 1 1 diff --git a/modules/setting/server.go b/modules/setting/server.go 2 - index 183906268..fa02e8915 100644 2 + index c20dd1949d..c9bcdce99a 100644 3 3 --- a/modules/setting/server.go 4 4 +++ b/modules/setting/server.go 5 - @@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) { 6 - OfflineMode = sec.Key("OFFLINE_MODE").MustBool() 7 - Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool() 5 + @@ -317,7 +317,7 @@ func loadServerFrom(rootCfg ConfigProvider) { 6 + RedirectorUseProxyProtocol = sec.Key("REDIRECTOR_USE_PROXY_PROTOCOL").MustBool(UseProxyProtocol) 7 + OfflineMode = sec.Key("OFFLINE_MODE").MustBool(true) 8 8 if len(StaticRootPath) == 0 { 9 9 - StaticRootPath = AppWorkPath 10 10 + StaticRootPath = "@data@"