[yourls] Update to 1.7
Martin Krizek
mkrizek at fedoraproject.org
Thu Feb 13 13:13:14 UTC 2014
commit 277530c2e5f1502acc956ec63830c0ff0e915d59
Author: Martin Krizek <mkrizek at redhat.com>
Date: Thu Feb 13 14:13:52 2014 +0100
Update to 1.7
- Add upstream patch solving: Incorrect error message after installation
.gitignore | 1 +
...-for-new-version-when-updating-or-install.patch | 28 ++++++++++++++++++++
sources | 2 +-
yourls.change-config-path.patch | 8 +++---
yourls.spec | 12 +++++++-
5 files changed, 44 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a3ba228..4f04b33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/yourls-1.5.zip
/yourls-1.5.1.zip
/YOURLS-1.6.tar.gz
+/YOURLS-1.7.tar.gz
diff --git a/0001-Don-t-check-for-new-version-when-updating-or-install.patch b/0001-Don-t-check-for-new-version-when-updating-or-install.patch
new file mode 100644
index 0000000..fe36519
--- /dev/null
+++ b/0001-Don-t-check-for-new-version-when-updating-or-install.patch
@@ -0,0 +1,28 @@
+From 84ee498d45e8bc94d85f2f79a4d48f11194c9352 Mon Sep 17 00:00:00 2001
+From: ozh <ozh at ozh.org>
+Date: Sat, 1 Feb 2014 17:49:15 +0100
+Subject: [PATCH] Don't check for new version when updating or installing.
+
+Fixes #1617.
+---
+ includes/load-yourls.php | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/includes/load-yourls.php b/includes/load-yourls.php
+index e808835..c2704a6 100644
+--- a/includes/load-yourls.php
++++ b/includes/load-yourls.php
+@@ -179,7 +179,9 @@
+ yourls_do_action( 'plugins_loaded' );
+
+ // Is there a new version of YOURLS ?
+-yourls_new_core_version_notice();
++if( yourls_is_installed() && !yourls_is_upgrading() ) {
++ yourls_new_core_version_notice();
++}
+
+ if( yourls_is_admin() )
+ yourls_do_action( 'admin_init' );
+--
+1.8.3.1
+
diff --git a/sources b/sources
index ba40c50..9a57b24 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fc4444fd1203b8e00db6f332db183682 YOURLS-1.6.tar.gz
+171ea94dc65d1d4f8c7e857a8b650ae1 YOURLS-1.7.tar.gz
diff --git a/yourls.change-config-path.patch b/yourls.change-config-path.patch
index 6724787..b6229fa 100644
--- a/yourls.change-config-path.patch
+++ b/yourls.change-config-path.patch
@@ -6,13 +6,13 @@
// Include settings
-if( file_exists( dirname( dirname( __FILE__ ) ) . '/user/config.php' ) ) {
- // config.php in /user/
-- require_once( dirname( dirname( __FILE__ ) ) . '/user/config.php' );
+- define( 'YOURLS_CONFIGFILE', str_replace( '\\', '/', dirname( dirname( __FILE__ ) ) ) . '/user/config.php' );
-} elseif ( file_exists( dirname( __FILE__ ) . '/config.php' ) ) {
- // config.php in /includes/
-- require_once( dirname( __FILE__ ) . '/config.php' );
+- define( 'YOURLS_CONFIGFILE', str_replace( '\\', '/', dirname( __FILE__ ) ) . '/config.php' );
+if( file_exists('/etc/yourls/config.php') ) {
+ // config.php in /etc/yourls/
-+ require_once( '/etc/yourls/config.php' );
++ define( 'YOURLS_CONFIGFILE', '/etc/yourls/config.php' );
} else {
// config.php not found :(
- die( '<p class="error">Cannot find <tt>config.php</tt>.</p><p>Please read the <tt>readme.html</tt> to learn how to install YOURLS</p>' );
+ die( '<p class="error">Cannot find <tt>config.php</tt>.</p><p>Please read the <tt><a href="../readme.html#Install">readme.html</a></tt> to learn how to install YOURLS</p>' );
diff --git a/yourls.spec b/yourls.spec
index 03657e6..059df15 100644
--- a/yourls.spec
+++ b/yourls.spec
@@ -1,5 +1,5 @@
Name: yourls
-Version: 1.6
+Version: 1.7
Release: 1%{?dist}
Summary: Your Own URL Shortener
Group: Applications/Internet
@@ -16,6 +16,9 @@ Source0: YOURLS-%{version}.tar.gz
Source1: yourls-httpd.conf
Patch0: yourls.change-config-path.patch
Patch1: yourls.add-fedora-readme.patch
+# upstream patch for: Incorrect error message after installation
+Patch2: 0001-Don-t-check-for-new-version-when-updating-or-install.patch
+
Requires: php >= 4.3.0, mysql >= 4.1.0, httpd, php-mysql
BuildArch: noarch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXX)
@@ -31,6 +34,7 @@ you can pick custom keyword URLs, it comes with its own API.
%setup -q -n YOURLS-%{version}
%patch0
%patch1
+%patch2 -p1
%build
@@ -67,7 +71,11 @@ rm -rf ${RPM_BUILD_ROOT}
%changelog
-* Thu Aug 15 2013 Martin Krizek <mkrizek at redhat.com - 1.6-1
+* Thu Feb 13 2014 Martin Krizek <mkrizek at redhat.com> - 1.7-1
+- Update to 1.7
+- Add upstream patch solving: Incorrect error message after installation
+
+* Thu Aug 15 2013 Martin Krizek <mkrizek at redhat.com> - 1.6-1
- Update to 1.6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-4
More information about the scm-commits
mailing list