From 8b0968b2054d3bb8d90b5ac056727f7c2ebeaed3 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 11 Dec 2018 18:10:48 +0300 Subject: (* HUGE *) Use nixpkgs overlays --- modules/pkgs/mediawiki/T122487.patch | 16 ------ modules/pkgs/mediawiki/default.nix | 60 ---------------------- .../pkgs/mediawiki/file-backend-default-mode.patch | 52 ------------------- 3 files changed, 128 deletions(-) delete mode 100644 modules/pkgs/mediawiki/T122487.patch delete mode 100644 modules/pkgs/mediawiki/default.nix delete mode 100644 modules/pkgs/mediawiki/file-backend-default-mode.patch (limited to 'modules/pkgs/mediawiki') diff --git a/modules/pkgs/mediawiki/T122487.patch b/modules/pkgs/mediawiki/T122487.patch deleted file mode 100644 index 7b868a8..0000000 --- a/modules/pkgs/mediawiki/T122487.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: fix warning on upload page -Bug: https://phabricator.wikimedia.org/T122487 -Index: mediawiki-1.23.13/includes/User.php -=================================================================== ---- mediawiki-1.23.13.orig/includes/User.php -+++ mediawiki-1.23.13/includes/User.php -@@ -3806,6 +3806,9 @@ class User { - * @return boolean: Whether the token matches - */ - public function matchEditToken( $val, $salt = '', $request = null ) { -+ if ($val === null) { -+ return false; -+ } - $sessionToken = $this->getEditToken( $salt, $request ); - $equals = hash_equals( $sessionToken, $val ); - if ( !$equals ) { diff --git a/modules/pkgs/mediawiki/default.nix b/modules/pkgs/mediawiki/default.nix deleted file mode 100644 index e5a5910..0000000 --- a/modules/pkgs/mediawiki/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ lib, pkgs }: - -let - inherit (builtins) elemAt; - inherit (lib) splitString concatMapStrings; - - bundled = [ - "Cite" "ConfirmEdit" "Gadgets" "ImageMap" "InputBox" "Interwiki" - "LocalisationUpdate" "Nuke" "ParserFunctions" "PdfHandler" "Poem" - "Renameuser" "SpamBlacklist" "SyntaxHighlight_GeSHi" "TitleBlacklist" - "WikiEditor" - ]; - -in pkgs.stdenv.mkDerivation rec { - version = "1.23.17"; - name = "mediawiki-${version}"; - - src = let - v = splitString "." version; - minor = "${elemAt v 0}.${elemAt v 1}"; - in pkgs.fetchurl { - url = "https://releases.wikimedia.org/mediawiki/${minor}/${name}.tar.gz"; - sha256 = "1fxymqirjj2sfbrgcgxig9k6ik5ndw9qq9qn91xm9cnpjksc079x"; - }; - - patches = [ - ./T122487.patch - ./file-backend-default-mode.patch - ]; - - outputs = [ "out" ] ++ bundled; - - installPhase = '' - cp -a . $out - - rm -rf $out/tests - rm -rf $out/mw-config - rm -rf $out/maintenance/dev - rm -rf $out/maintenance/hiphop - - sed -i \ - -e 's|/bin/bash|${pkgs.bash}/bin/bash|g' \ - -e 's|/usr/bin/timeout|${pkgs.coreutils}/bin/timeout|g' \ - $out/includes/limit.sh \ - $out/includes/GlobalFunctions.php - - cat <<'EOF' > $out/LocalSettings.php - - EOF - - ${concatMapStrings (e: '' - mv $out/extensions/${e} ''${${e}} - '') bundled} - ''; -} diff --git a/modules/pkgs/mediawiki/file-backend-default-mode.patch b/modules/pkgs/mediawiki/file-backend-default-mode.patch deleted file mode 100644 index 2bd303c..0000000 --- a/modules/pkgs/mediawiki/file-backend-default-mode.patch +++ /dev/null @@ -1,52 +0,0 @@ -Index: mediawiki-1.23.13/includes/DefaultSettings.php -=================================================================== ---- mediawiki-1.23.13.orig/includes/DefaultSettings.php -+++ mediawiki-1.23.13/includes/DefaultSettings.php -@@ -429,7 +429,7 @@ $wgImgAuthUrlPathMap = array(); - * leave the paths in unchanged, or 'simple' to replace paths with - * placeholders. Default for LocalRepo is 'simple'. - * - fileMode This allows wikis to set the file mode when uploading/moving files. Default -- * is 0644. -+ * is 0640. - * - directory The local filesystem directory where public files are stored. Not used for - * some remote repos. - * - thumbDir The base thumbnail directory. Defaults to "/thumb". -Index: mediawiki-1.23.13/includes/filerepo/FSRepo.php -=================================================================== ---- mediawiki-1.23.13.orig/includes/filerepo/FSRepo.php -+++ mediawiki-1.23.13/includes/filerepo/FSRepo.php -@@ -50,7 +50,7 @@ class FSRepo extends FileRepo { - : "{$directory}/transcoded"; - $fileMode = isset( $info['fileMode'] ) - ? $info['fileMode'] -- : 0644; -+ : 0640; - - $repoName = $info['name']; - // Get the FS backend configuration -Index: mediawiki-1.23.13/includes/filebackend/FSFileBackend.php -=================================================================== ---- mediawiki-1.23.13.orig/includes/filebackend/FSFileBackend.php -+++ mediawiki-1.23.13/includes/filebackend/FSFileBackend.php -@@ -82,7 +82,7 @@ class FSFileBackend extends FileBackendS - } - } - -- $this->fileMode = isset( $config['fileMode'] ) ? $config['fileMode'] : 0644; -+ $this->fileMode = isset( $config['fileMode'] ) ? $config['fileMode'] : 0640; - if ( isset( $config['fileOwner'] ) && function_exists( 'posix_getuid' ) ) { - $this->fileOwner = $config['fileOwner']; - $info = posix_getpwuid( posix_getuid() ); -Index: mediawiki-1.23.13/includes/filebackend/FileBackendGroup.php -=================================================================== ---- mediawiki-1.23.13.orig/includes/filebackend/FileBackendGroup.php -+++ mediawiki-1.23.13/includes/filebackend/FileBackendGroup.php -@@ -88,7 +88,7 @@ class FileBackendGroup { - : "{$directory}/transcoded"; - $fileMode = isset( $info['fileMode'] ) - ? $info['fileMode'] -- : 0644; -+ : 0640; - // Get the FS backend configuration - $autoBackends[] = array( - 'name' => $backendName, -- cgit v1.2.3