mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
Merge pull request #306341 from adamcstephens/forgejo/7
forgejo: 1.21.11-1 -> 7.0.0
This commit is contained in:
commit
f667250b4d
|
@ -141,9 +141,9 @@ let
|
|||
assert "BEGIN PGP PUBLIC KEY BLOCK" in server.succeed("curl http://localhost:3000/api/v1/signing-key.gpg")
|
||||
|
||||
api_version = json.loads(server.succeed("curl http://localhost:3000/api/forgejo/v1/version")).get("version")
|
||||
assert "development" != api_version and "-gitea-" in api_version, (
|
||||
assert "development" != api_version and "${pkgs.forgejo.version}+gitea-" in api_version, (
|
||||
"/api/forgejo/v1/version should not return 'development' "
|
||||
+ f"but should contain a gitea compatibility version string. Got '{api_version}' instead."
|
||||
+ f"but should contain a forgejo+gitea compatibility version string. Got '{api_version}' instead."
|
||||
)
|
||||
|
||||
server.succeed(
|
||||
|
@ -152,7 +152,7 @@ let
|
|||
)
|
||||
server.succeed(
|
||||
"su -l forgejo -c 'GITEA_WORK_DIR=/var/lib/forgejo gitea admin user create "
|
||||
+ "--username test --password totallysafe --email test@localhost'"
|
||||
+ "--username test --password totallysafe --email test@localhost --must-change-password=false'"
|
||||
)
|
||||
|
||||
api_token = server.succeed(
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
diff --git a/package.json b/package.json
|
||||
index 57dcfc2f7..c9f23dbf7 100644
|
||||
index b50c52cf43..d6aafb8775 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -79,5 +79,8 @@
|
||||
"defaults",
|
||||
"not ie > 0",
|
||||
"not ie_mob > 0"
|
||||
@@ -98,5 +98,8 @@
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
- ]
|
||||
+ ],
|
||||
+ "scripts": {
|
|
@ -24,7 +24,7 @@ let
|
|||
pname = "forgejo-frontend";
|
||||
inherit (forgejo) src version;
|
||||
|
||||
npmDepsHash = "sha256-uMPy4cqMDNZTpF+pk7YibXEJO1zxVfwlCeFzGgJBiU0=";
|
||||
npmDepsHash = "sha256-BffoEbIzTU61bw3ECEm5eDHcav4S27MB5jQKsMprkcw=";
|
||||
|
||||
patches = [
|
||||
./package-json-npm-build-frontend.patch
|
||||
|
@ -39,33 +39,17 @@ let
|
|||
in
|
||||
buildGoModule rec {
|
||||
pname = "forgejo";
|
||||
version = "1.21.11-1";
|
||||
version = "7.0.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "forgejo";
|
||||
repo = "forgejo";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-7oYsoZpZcNIUw3iXSi1Q5So2yYgKnT5U7GHQ4NVqVdc=";
|
||||
# Forgejo has multiple different version strings that need to be provided
|
||||
# via ldflags. main.ForgejoVersion for example is a combination of a
|
||||
# hardcoded gitea compatibility version string (in the Makefile) and
|
||||
# git describe and is easiest to get by invoking the Makefile.
|
||||
# So we do that, store it the src FOD to then extend the ldflags array
|
||||
# in preConfigure.
|
||||
# The `echo -e >> Makefile` is temporary and already part of the next
|
||||
# major release. Furthermore, the ldflags will change next major release
|
||||
# and need to be updated accordingly.
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
cd "$out"
|
||||
echo -e 'show-version-full:\n\t@echo ''${FORGEJO_VERSION}' >> Makefile
|
||||
make show-version-full > FULL_VERSION
|
||||
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||
'';
|
||||
hash = "sha256-oIx1aPrHgOWx13ocA3t7N5UdTgr+64tgC0XcEnhA/eE=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-OuWNF+muWM6xqwkFxLIUsn/huqXj2VKg8BN9+JHVw58=";
|
||||
vendorHash = "sha256-UcjaMi/4XYLdaJhi2j3UWqHqkpTbZBo6EwNXxdRIKLw=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
|
@ -93,7 +77,7 @@ buildGoModule rec {
|
|||
];
|
||||
|
||||
preConfigure = ''
|
||||
export ldflags+=" -X code.gitea.io/gitea/routers/api/forgejo/v1.ForgejoVersion=$(cat FULL_VERSION) -X main.ForgejoVersion=$(cat FULL_VERSION)"
|
||||
export ldflags+=" -X main.ForgejoVersion=$(GITEA_VERSION=${version} make show-version-api)"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
|
@ -1,10 +1,10 @@
|
|||
diff --git a/modules/setting/server.go b/modules/setting/server.go
|
||||
index 183906268..fa02e8915 100644
|
||||
index c20dd1949d..c9bcdce99a 100644
|
||||
--- a/modules/setting/server.go
|
||||
+++ b/modules/setting/server.go
|
||||
@@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
|
||||
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||
Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
|
||||
@@ -317,7 +317,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
|
||||
RedirectorUseProxyProtocol = sec.Key("REDIRECTOR_USE_PROXY_PROTOCOL").MustBool(UseProxyProtocol)
|
||||
OfflineMode = sec.Key("OFFLINE_MODE").MustBool(true)
|
||||
if len(StaticRootPath) == 0 {
|
||||
- StaticRootPath = AppWorkPath
|
||||
+ StaticRootPath = "@data@"
|
|
@ -8448,8 +8448,6 @@ with pkgs;
|
|||
|
||||
gitea-actions-runner = callPackage ../development/tools/continuous-integration/gitea-actions-runner { };
|
||||
|
||||
forgejo = callPackage ../applications/version-management/forgejo { };
|
||||
|
||||
gokart = callPackage ../development/tools/gokart { };
|
||||
|
||||
gl2ps = callPackage ../development/libraries/gl2ps { };
|
||||
|
|
Loading…
Reference in a new issue