From 07d25f45de59719ccc07c44f0848a90b33c68c2d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: May 25 2012 02:55:12 +0000 Subject: Update to 3.6.2-rc2 Add patch to update gnulib to handle gets removal --- diff --git a/.gitignore b/.gitignore index 13f1282..2efc7a0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ octave-3.2.4.tar.bz2 /octave-3.6.0.tar.bz2 /octave-3.6.1.tar.bz2 /octave-3.6.2-rc0.tar.bz2 +/octave-3.6.2-rc2.tar.bz2 diff --git a/octave-gets.patch b/octave-gets.patch new file mode 100644 index 0000000..c7b8914 --- /dev/null +++ b/octave-gets.patch @@ -0,0 +1,86 @@ +diff -up octave-3.6.2-rc2/libgnu/stdio.in.h.gets octave-3.6.2-rc2/libgnu/stdio.in.h +--- octave-3.6.2-rc2/libgnu/stdio.in.h.gets 2012-05-24 12:46:13.000000000 -0600 ++++ octave-3.6.2-rc2/libgnu/stdio.in.h 2012-05-24 16:29:54.813734894 -0600 +@@ -1,12 +1,10 @@ +-/* -*- buffer-read-only: t -*- vi: set ro: */ +-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ + /* A GNU-like . + + Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3, or (at your option) ++ the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, +@@ -15,8 +13,7 @@ + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software Foundation, +- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ++ along with this program; if not, see . */ + + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +@@ -55,7 +52,8 @@ + #include + + /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 +- and eglibc 2.11.2. */ ++ and eglibc 2.11.2. ++ May also define off_t to a 64-bit type on native Windows. */ + #include + + /* The __attribute__ feature is available in gcc versions 2.5 and later. +@@ -701,22 +699,11 @@ _GL_WARN_ON_USE (getline, "getline is un + # endif + #endif + +-#if @GNULIB_GETS@ +-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +-# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +-# undef gets +-# define gets rpl_gets +-# endif +-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (gets, char *, (char *s)); +-# else +-_GL_CXXALIAS_SYS (gets, char *, (char *s)); +-# undef gets +-# endif +-_GL_CXXALIASWARN (gets); + /* It is very rare that the developer ever has full control of stdin, +- so any use of gets warrants an unconditional warning. Assume it is +- always declared, since it is required by C89. */ ++ so any use of gets warrants an unconditional warning; besides, C11 ++ removed it. */ ++#undef gets ++#if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + +@@ -781,7 +768,7 @@ _GL_CXXALIASWARN (pclose); + #elif defined GNULIB_POSIXCHECK + # undef pclose + # if HAVE_RAW_DECL_PCLOSE +-_GL_WARN_ON_USE (pclose, "popen is unportable - " ++_GL_WARN_ON_USE (pclose, "pclose is unportable - " + "use gnulib module pclose for more portability"); + # endif + #endif +@@ -1056,9 +1043,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is + # endif + #endif + +-/* Some people would argue that sprintf should be handled like gets +- (for example, OpenBSD issues a link warning for both functions), +- since both can cause security holes due to buffer overruns. ++/* Some people would argue that all sprintf uses should be warned about ++ (for example, OpenBSD issues a link warning for it), ++ since it can cause security holes due to buffer overruns. + However, we believe that sprintf can be used safely, and is more + efficient than snprintf in those safe cases; and as proof of our + belief, we use sprintf in several gnulib modules. So this header diff --git a/octave.spec b/octave.spec index 4c7406b..9e67319 100644 --- a/octave.spec +++ b/octave.spec @@ -2,14 +2,14 @@ %global octave_api api-v48+ # For rc versions, change release manually -%global rcver 0 +%global rcver 2 %if 0%{?rcver:1} %global rctag -rc%{?rcver} %endif Name: octave Version: 3.6.2 -Release: 0.3.rc%{rcver}%{?dist} +Release: 0.4.rc%{rcver}%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -24,6 +24,8 @@ Source1: macros.octave # https://savannah.gnu.org/bugs/index.php?32839 # Fix building packages from directories Patch2: octave-3.4.0-pkgbuilddir.patch +# Update gnulib to handle gets deprecation +Patch3: octave-gets.patch URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -84,6 +86,7 @@ This package contains documentation for Octave. %prep %setup -q -n %{name}-%{version}%{?rctag} %patch2 -p1 -b .pkgbuilddir +%patch3 -p1 -b .gets # Check permissions find -name *.cc -exec chmod 644 {} \; @@ -256,6 +259,10 @@ fi %changelog +* Thu May 24 2012 Orion Poplawski - 6:3.6.2-0.4.rc2 +- Update to 3.6.2-rc2 +- Add patch to update gnulib to handle gets removal + * Tue May 15 2012 Orion Poplawski - 6:3.6.2-0.3.rc0 - Rebuild with hdf5 1.8.9 diff --git a/sources b/sources index d1f534c..1857f6e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a8b92ece1fdc92f2e7e17e1c8d23364 octave-3.6.2-rc0.tar.bz2 +cc02bf98ca5b1d7fd755a83151d057fc octave-3.6.2-rc2.tar.bz2