forgejo: 1.21.11-1 -> 7.0.0

+17 -33
+3 -3
nixos/tests/forgejo.nix
··· 141 assert "BEGIN PGP PUBLIC KEY BLOCK" in server.succeed("curl http://localhost:3000/api/v1/signing-key.gpg") 142 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, ( 145 "/api/forgejo/v1/version should not return 'development' " 146 - + f"but should contain a gitea compatibility version string. Got '{api_version}' instead." 147 ) 148 149 server.succeed( ··· 152 ) 153 server.succeed( 154 "su -l forgejo -c 'GITEA_WORK_DIR=/var/lib/forgejo gitea admin user create " 155 - + "--username test --password totallysafe --email test@localhost'" 156 ) 157 158 api_token = server.succeed(
··· 141 assert "BEGIN PGP PUBLIC KEY BLOCK" in server.succeed("curl http://localhost:3000/api/v1/signing-key.gpg") 142 143 api_version = json.loads(server.succeed("curl http://localhost:3000/api/forgejo/v1/version")).get("version") 144 + assert "development" != api_version and "${pkgs.forgejo.version}+gitea-" in api_version, ( 145 "/api/forgejo/v1/version should not return 'development' " 146 + + f"but should contain a forgejo+gitea compatibility version string. Got '{api_version}' instead." 147 ) 148 149 server.succeed( ··· 152 ) 153 server.succeed( 154 "su -l forgejo -c 'GITEA_WORK_DIR=/var/lib/forgejo gitea admin user create " 155 + + "--username test --password totallysafe --email test@localhost --must-change-password=false'" 156 ) 157 158 api_token = server.succeed(
+5 -5
pkgs/by-name/fo/forgejo/package-json-npm-build-frontend.patch
··· 1 diff --git a/package.json b/package.json 2 - index 57dcfc2f7..c9f23dbf7 100644 3 --- a/package.json 4 +++ b/package.json 5 - @@ -79,5 +79,8 @@ 6 - "defaults", 7 - "not ie > 0", 8 - "not ie_mob > 0" 9 - ] 10 + ], 11 + "scripts": {
··· 1 diff --git a/package.json b/package.json 2 + index b50c52cf43..d6aafb8775 100644 3 --- a/package.json 4 +++ b/package.json 5 + @@ -98,5 +98,8 @@ 6 + }, 7 + "browserslist": [ 8 + "defaults" 9 - ] 10 + ], 11 + "scripts": {
+5 -21
pkgs/by-name/fo/forgejo/package.nix
··· 24 pname = "forgejo-frontend"; 25 inherit (forgejo) src version; 26 27 - npmDepsHash = "sha256-uMPy4cqMDNZTpF+pk7YibXEJO1zxVfwlCeFzGgJBiU0="; 28 29 patches = [ 30 ./package-json-npm-build-frontend.patch ··· 39 in 40 buildGoModule rec { 41 pname = "forgejo"; 42 - version = "1.21.11-1"; 43 44 src = fetchFromGitea { 45 domain = "codeberg.org"; 46 owner = "forgejo"; 47 repo = "forgejo"; 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 - ''; 66 }; 67 68 - vendorHash = "sha256-OuWNF+muWM6xqwkFxLIUsn/huqXj2VKg8BN9+JHVw58="; 69 70 subPackages = [ "." ]; 71 ··· 93 ]; 94 95 preConfigure = '' 96 - export ldflags+=" -X code.gitea.io/gitea/routers/api/forgejo/v1.ForgejoVersion=$(cat FULL_VERSION) -X main.ForgejoVersion=$(cat FULL_VERSION)" 97 ''; 98 99 preBuild = ''
··· 24 pname = "forgejo-frontend"; 25 inherit (forgejo) src version; 26 27 + npmDepsHash = "sha256-BffoEbIzTU61bw3ECEm5eDHcav4S27MB5jQKsMprkcw="; 28 29 patches = [ 30 ./package-json-npm-build-frontend.patch ··· 39 in 40 buildGoModule rec { 41 pname = "forgejo"; 42 + version = "7.0.0"; 43 44 src = fetchFromGitea { 45 domain = "codeberg.org"; 46 owner = "forgejo"; 47 repo = "forgejo"; 48 rev = "v${version}"; 49 + hash = "sha256-oIx1aPrHgOWx13ocA3t7N5UdTgr+64tgC0XcEnhA/eE="; 50 }; 51 52 + vendorHash = "sha256-UcjaMi/4XYLdaJhi2j3UWqHqkpTbZBo6EwNXxdRIKLw="; 53 54 subPackages = [ "." ]; 55 ··· 77 ]; 78 79 preConfigure = '' 80 + export ldflags+=" -X main.ForgejoVersion=$(GITEA_VERSION=${version} make show-version-api)" 81 ''; 82 83 preBuild = ''
+4 -4
pkgs/by-name/fo/forgejo/static-root-path.patch
··· 1 diff --git a/modules/setting/server.go b/modules/setting/server.go 2 - index 183906268..fa02e8915 100644 3 --- a/modules/setting/server.go 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() 8 if len(StaticRootPath) == 0 { 9 - StaticRootPath = AppWorkPath 10 + StaticRootPath = "@data@"
··· 1 diff --git a/modules/setting/server.go b/modules/setting/server.go 2 + index c20dd1949d..c9bcdce99a 100644 3 --- a/modules/setting/server.go 4 +++ b/modules/setting/server.go 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 if len(StaticRootPath) == 0 { 9 - StaticRootPath = AppWorkPath 10 + StaticRootPath = "@data@"