WordPress 4.9.2 Security and Maintenance Release

drop non-free jshint.js file #1528765

(cherry picked from commit c1566a4be4)
This commit is contained in:
Remi Collet 2018-01-17 10:07:14 +01:00
commit c7e9da3500
5 changed files with 68 additions and 49 deletions

47
.gitignore vendored
View file

@ -1,46 +1,3 @@
*spec~
clog
/wordpress-3.7.tar.gz
/wordpress-3.7.1.tar.gz
/wordpress-3.8.tar.gz
/wordpress-3.8.1.tar.gz
/wordpress-3.8.2.tar.gz
/wordpress-3.8.3.tar.gz
/wordpress-3.9.tar.gz
/wordpress-3.9.1.tar.gz
/wordpress-3.9.2.tar.gz
/wordpress-4.0.tar.gz
/wordpress-4.0.1.tar.gz
/wordpress-4.1.tar.gz
/wordpress-4.1.1.tar.gz
/wordpress-4.1.2.tar.gz
/wordpress-4.2.tar.gz
/wordpress-4.2.1.tar.gz
/wordpress-4.2.2.tar.gz
/wordpress-4.2.3.tar.gz
/wordpress-4.2.4.tar.gz
/wordpress-4.3.tar.gz
/wordpress-4.3.1.tar.gz
/wordpress-4.4.tar.gz
/wordpress-4.4.1.tar.gz
/wordpress-4.4.2.tar.gz
/wordpress-4.5-RC1.tar.gz
/wordpress-4.5.tar.gz
/wordpress-4.5.1.tar.gz
/wordpress-4.5.2.tar.gz
/wordpress-4.5.3.tar.gz
/wordpress-debian_patches_hello.patch
/wordpress-4.6.tar.gz
/wordpress-4.6.1.tar.gz
/wordpress-4.7.tar.gz
/wordpress-4.7.1.tar.gz
/wordpress-4.7.2.tar.gz
/wordpress-4.7.3.tar.gz
/wordpress-4.7.4.tar.gz
/wordpress-4.7.5.tar.gz
/wordpress-4.8.tar.gz
/wordpress-4.8.1.tar.gz
/wordpress-4.8.2.tar.gz
/wordpress-4.8.3.tar.gz
/wordpress-4.9.tar.gz
/wordpress-4.9.1.tar.gz
/wordpress-*.tar.gz
/wordpress-4.9.2-strip.tar.xz

View file

@ -1 +1 @@
SHA512 (wordpress-4.9.1.tar.gz) = 1835d8fd0df9931487489d2e67285e7c73ec1783df39621cfbfe52aa8a0b3cba05fd3b842c7fd67ab2b76009f33337dae650f22dd6a3c4aa71eae100541b8a58
SHA512 (wordpress-4.9.2-strip.tar.xz) = a61f292f1721a7fbf78d510b75831a2e842c67600b2625b8ef6bf1b282efecabb8615175a67b71af9636a778515c3c48b521096a3e962fef11e71b1a1d4d6a7b

33
strip.sh Executable file
View file

@ -0,0 +1,33 @@
#!/bin/sh
if [ -z "$1" ]; then
echo usage $0 version
exit 1
fi
srce=wordpress-$1.tar.gz
dest=wordpress-$1-strip.tar.xz
if [ ! -f $srce ]; then
echo Download...
wget http://wordpress.org/$srce || exit 1
fi
if [ ! -f $dest ]; then
echo Cleanup...
[ -d wordpress ] && rm -r wordpress
echo Unpack...
tar xf $srce
echo Strip non free file
rm wordpress/wp-includes/js/codemirror/jshint.js
echo Pack...
tar cJf $dest wordpress
echo Cleanup...
rm -r wordpress
echo Done.
fi

View file

@ -0,0 +1,19 @@
Description: Remove references to jshint
The file jshint.js uses a non-free license. It is removed as part of the upstream
tarball rebuild but this patch removes the things that reference it. Luckily the
script handler does a NOP for a non-existent script
Author: Craig Small <csmall@debian.org>
Origin: Debian
Bug: https://core.trac.wordpress.org/ticket/42850
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2017-12-09
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -467,7 +467,6 @@
$scripts->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.js', array(), '5.29.1-alpha-ee20357' );
$scripts->add( 'csslint', '/wp-includes/js/codemirror/csslint.js', array(), '1.0.5' );
- $scripts->add( 'jshint', '/wp-includes/js/codemirror/jshint.js', array(), '2.9.5' );
$scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' );
$scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' );
$scripts->add( 'htmlhint-kses', '/wp-includes/js/codemirror/htmlhint-kses.js', array( 'htmlhint' ) );

View file

@ -19,18 +19,20 @@
Summary: Blog tool and publishing platform
URL: http://www.wordpress.org
Name: wordpress
Version: 4.9.1
Version: 4.9.2
Group: Applications/Publishing
Release: 1%{?dist}
License: GPLv2
Source0: http://wordpress.org/%{name}-%{version}%{?prever:-%{prever}}.tar.gz
Source0: %{name}-%{version}%{?prever:-%{prever}}-strip.tar.xz
Source1: wordpress-httpd-conf
Source2: README.fedora.wordpress
Source3: README.fedora.wordpress-mu
Source4: wordpress-nginx-conf
# To minify JS assets
Source5: wordpress-minify.php
# To generate the tarball without non-free files
Source6: strip.sh
# Patch out copyrighted text of Hello, Dolly
# (and replace it with Free Software Song)
@ -57,6 +59,9 @@ Patch5: wordpress-4.0-config.patch
Patch6: wordpress-4.9-noupdate.patch
# Use system libraries
Patch7: wordpress-4.4-systemlibs.patch
# Debian patch for jshint
Patch8: wordpress-4.9-remove-jshint-refs.patch
BuildArch: noarch
BuildRequires: php-cli
@ -133,8 +138,9 @@ rm wp-content/plugins/akismet/.htaccess
%patch3 -p1
# Adjust mediaelement not to use its SWF
%patch4 -p1
rm wp-includes/js/mediaelement/media*swf
#rm wp-includes/js/mediaelement/media*swf
%patch7 -p1
%patch8 -p1
# We patch .js files, so minify them
php %{SOURCE5} \
@ -270,6 +276,10 @@ find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.orig
%changelog
* Wed Jan 17 2018 Remi Collet <remi@remirepo.net> - 4.9.2-1
- WordPress 4.9.2 Security and Maintenance Release
- drop non-free jshint.js file #1528765
* Thu Nov 30 2017 Remi Collet <remi@remirepo.net> - 4.9.1-1
- WordPress 4.9.1 Security and Maintenance Release