From 829c3fbedaad7d3d64b0b56a6c3948ac10e81bb3 Mon Sep 17 00:00:00 2001
From: Konstantin Pavlov <thresh@nginx.com>
Date: Wed, 4 Sep 2024 01:22:39 +0000
Subject: [PATCH] modules: pkg-oss moved to GitHub.

---
 modules/Dockerfile        | 6 +++---
 modules/Dockerfile.alpine | 2 +-
 modules/README.md         | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/Dockerfile b/modules/Dockerfile
index e9dea75..61573c1 100644
--- a/modules/Dockerfile
+++ b/modules/Dockerfile
@@ -14,11 +14,11 @@ COPY ./ /modules/
 
 RUN apt-get update \
     && apt-get install -y --no-install-suggests --no-install-recommends \
-                patch make wget mercurial devscripts debhelper dpkg-dev \
+                patch make wget git devscripts debhelper dpkg-dev \
                 quilt lsb-release build-essential libxml2-utils xsltproc \
                 equivs git g++ libparse-recdescent-perl \
     && XSLSCRIPT_SHA512="f7194c5198daeab9b3b0c3aebf006922c7df1d345d454bd8474489ff2eb6b4bf8e2ffe442489a45d1aab80da6ecebe0097759a1e12cc26b5f0613d05b7c09ffa *stdin" \
-    && wget -O /tmp/xslscript.pl https://hg.nginx.org/xslscript/raw-file/01dc9ba12e1b/xslscript.pl \
+    && wget -O /tmp/xslscript.pl https://raw.githubusercontent.com/nginx/xslscript/9204424259c343ca08a18a78915f40f28025e093/xslscript.pl \
     && if [ "$(cat /tmp/xslscript.pl | openssl sha512 -r)" = "$XSLSCRIPT_SHA512" ]; then \
         echo "XSLScript checksum verification succeeded!"; \
         chmod +x /tmp/xslscript.pl; \
@@ -27,7 +27,7 @@ RUN apt-get update \
         echo "XSLScript checksum verification failed!"; \
         exit 1; \
     fi \
-    && hg clone -r ${NGINX_VERSION}-${PKG_RELEASE%%~*} https://hg.nginx.org/pkg-oss/ \
+    && git clone -b ${NGINX_VERSION}-${PKG_RELEASE%%~*} https://github.com/nginx/pkg-oss/ \
     && cd pkg-oss \
     && mkdir /tmp/packages \
     && for module in $ENABLED_MODULES; do \
diff --git a/modules/Dockerfile.alpine b/modules/Dockerfile.alpine
index f6d39c0..9b305ff 100644
--- a/modules/Dockerfile.alpine
+++ b/modules/Dockerfile.alpine
@@ -19,7 +19,7 @@ RUN apk update \
     # allow abuild as a root user \
     && printf "#!/bin/sh\\nSETFATTR=true /usr/bin/abuild -F \"\$@\"\\n" > /usr/local/bin/abuild \
     && chmod +x /usr/local/bin/abuild \
-    && hg clone -r ${NGINX_VERSION}-${PKG_RELEASE} https://hg.nginx.org/pkg-oss/ \
+    && git clone -b ${NGINX_VERSION}-${PKG_RELEASE} https://github.com/nginx/pkg-oss/ \
     && cd pkg-oss \
     && mkdir /tmp/packages \
     && for module in $ENABLED_MODULES; do \
diff --git a/modules/README.md b/modules/README.md
index e1ff4ba..624b97c 100644
--- a/modules/README.md
+++ b/modules/README.md
@@ -3,7 +3,7 @@
 It's possible to extend a mainline image with third-party modules either from
 your own instuctions following a simple filesystem layout/syntax using
 `build_module.sh` helper script, or falling back to package sources from
-[pkg-oss](https://hg.nginx.org/pkg-oss).
+[pkg-oss](https://github.com/nginx/pkg-oss).
 
 ## Requirements
 
@@ -101,7 +101,7 @@ reproduce with a vanilla image first.
 ### docker-compose with pre-packaged modules
 
 If desired modules are already packaged in
-[pkg-oss](https://hg.nginx.org/pkg-oss/) - e.g. `debian/Makefile.module-*`
+[pkg-oss](https://github.com/nginx/pkg-oss/) - e.g. `debian/Makefile.module-*`
 exists for a given module, you can use this example.
 
 1. Create a directory for your project:
-- 
GitLab