@@ -11,7 +11,7 @@ ARG REL_BRANCH=REL1_43
1111FROM ubuntu:xenial AS fetcher
1212
1313RUN apt-get update && \
14- apt-get install --yes --no-install-recommends git=1:2.* ssh unzip=6.* jq=1.* curl=7.* ca-certificates=201* && \
14+ apt-get install --yes --no-install-recommends git=1:2.* ssh unzip=6.* jq=1.* curl=7.* ca-certificates=201* patch && \
1515 apt-get install --reinstall ca-certificates && \
1616 apt-get clean && rm -rf /var/lib/apt/lists/*
1717
@@ -20,7 +20,6 @@ ARG WMF_BRANCH
2020ARG REL_BRANCH
2121
2222# clone extensions from github, using specific branch
23-
2423COPY clone-extension.sh .
2524
2625RUN \
@@ -78,6 +77,18 @@ bash clone-extension.sh WikiEditor ${WMF_BRANCH};\
7877bash clone-extension.sh YouTube ${REL_BRANCH};\
7978echo 'finished cloning'
8079
80+ # #Patch Wikibase
81+ # cf. https://github.com/wmde/wikibase-release-pipeline/pull/753/files
82+ # WORKAROUND for https://phabricator.wikimedia.org/T372458
83+ # Take wikibase submodules from github as phabricator rate limits us
84+ COPY --chown=nobody:nogroup --chmod=755 \
85+ wikibase-submodules-from-github-instead-of-phabricator.patch \
86+ /tmp/wikibase-submodules-from-github-instead-of-phabricator.patch
87+ RUN patch -d Wikibase -Np1 </tmp/wikibase-submodules-from-github-instead-of-phabricator.patch && \
88+ rm /tmp/wikibase-submodules-from-github-instead-of-phabricator.patch && \
89+ git clone --depth=1 --recurse-submodules https://github.com/wikimedia/mediawiki-extensions-wikibase.git --single-branch -b ${WMF_BRANCH} ${EXTENSION}
90+
91+
8192# clone extensions not officially distributed by mediawiki
8293RUN git clone --depth=1 https://github.com/ProfessionalWiki/WikibaseLocalMedia.git WikibaseLocalMedia &&\
8394rm -rf WikibaseLocalMedia/.git
@@ -212,7 +223,6 @@ RUN apt-get update && \
212223 DEBIAN_FRONTEND=noninteractive \
213224 apt-get install --yes --no-install-recommends \
214225 zlib1g-dev libjpeg-dev libpng-dev libfreetype6-dev libzip-dev zip && \
215- patch && \
216226 apt-get clean && \
217227 rm -rf /var/lib/apt/lists/*
218228
@@ -226,15 +236,6 @@ RUN rm -rf /var/www/html/*
226236COPY --from=collector /var/www/html /var/www/html
227237WORKDIR /var/www/html/
228238COPY composer.local.json /var/www/html/composer.local.json
229-
230- # cf. https://github.com/wmde/wikibase-release-pipeline/pull/753/files
231- # WORKAROUND for https://phabricator.wikimedia.org/T372458
232- # Take wikibase submodules from github as phabricator rate limits us
233- COPY --chown=nobody:nogroup --chmod=755 \
234- wikibase-submodules-from-github-instead-of-phabricator.patch \
235- /tmp/wikibase-submodules-from-github-instead-of-phabricator.patch
236- RUN patch -d /var/www/html/extensions/Wikibase -Np1 </tmp/wikibase-submodules-from-github-instead-of-phabricator.patch && \
237- rm /tmp/wikibase-submodules-from-github-instead-of-phabricator.patch
238239
239240COPY --from=composer /usr/bin/composer /usr/bin/composer
240241ENV COMPOSER_ALLOW_SUPERUSER=1
0 commit comments