Accepting request 626730 from home:Andreas_Schwab:Factory

- Don't require libopts-devel from autogen
- Rename libopts-devel to autoopts
- Move all autoopts related files to autoopts
- Don't run autoreconf
- Don't remove -Werror
- sprintf-overflow.patch: Fix sprintf overflow
- autogen-guile-2.2.patch: properly add support for guile 2.2
- autogen-constant-timeout.patch: remove, pass AG_TIMEOUT to configure
  instead

OBS-URL: https://build.opensuse.org/request/show/626730
OBS-URL: https://build.opensuse.org/package/show/Base:System/autogen?expand=0&rev=61
This commit is contained in:
Andreas Schwab 2018-07-31 14:15:58 +00:00 committed by Git OBS Bridge
parent 372e9bdc88
commit a73b500c4d
5 changed files with 144 additions and 86 deletions

View File

@ -1,31 +0,0 @@
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date: 2018-03-09
avoid using benchmarks from the build system
that sometimes return 7 or 9
Index: autogen-5.18.14/configure
===================================================================
--- autogen-5.18.14.orig/configure
+++ autogen-5.18.14/configure
@@ -18336,6 +18336,7 @@ then
AG_TIMEOUT=${time_delta}
fi
+AG_TIMEOUT=12
cat >>confdefs.h <<_ACEOF
Index: autogen-5.18.14/configure.ac
===================================================================
--- autogen-5.18.14.orig/configure.ac
+++ autogen-5.18.14/configure.ac
@@ -191,6 +191,7 @@ then
AG_TIMEOUT=${time_delta}
fi
+AG_TIMEOUT=12
]
AC_DEFINE_UNQUOTED(AG_DEFAULT_TIMEOUT, ${AG_TIMEOUT},
[define to suitable timeout limit for shell command])

View File

@ -1,38 +1,57 @@
Index: autogen-5.18.14/agen5/guile-iface.def
===================================================================
--- autogen-5.18.14.orig/agen5/guile-iface.def
+++ autogen-5.18.14/agen5/guile-iface.def
@@ -35,31 +35,31 @@ invalid = '200000-200003',
iface = {
i-name = is_proc;
i-args = '_p';
- i-impl = { i-end = '201'; i-code = 'scm_is_true( scm_procedure_p(_p))'; };
+ i-impl = { i-end = '202'; i-code = 'scm_is_true( scm_procedure_p(_p))'; };
};
iface = {
i-name = list_p;
i-args = '_l';
- i-impl = { i-end = '201'; i-code = 'scm_is_true( scm_list_p(_l))'; };
+ i-impl = { i-end = '202'; i-code = 'scm_is_true( scm_list_p(_l))'; };
};
iface = {
i-name = pair_p;
i-args = '_p';
- i-impl = { i-end = '201'; i-code = 'scm_is_true( scm_pair_p(_p))'; };
+ i-impl = { i-end = '202'; i-code = 'scm_is_true( scm_pair_p(_p))'; };
};
iface = {
i-name = to_long;
i-args = '_v';
- i-impl = { i-end = '201'; i-code = 'scm_to_long(_v)'; };
+ i-impl = { i-end = '202'; i-code = 'scm_to_long(_v)'; };
};
iface = {
i-name = to_ulong;
i-args = '_v';
- i-impl = { i-end = '201'; i-code = '((unsigned long)scm_to_ulong(_v))'; };
+ i-impl = { i-end = '202'; i-code = '((unsigned long)scm_to_ulong(_v))'; };
};
/* end of guile-iface.def */
Index: autogen-5.18.14/agen5/guile-iface.h
===================================================================
--- autogen-5.18.14.orig/agen5/guile-iface.h
+++ autogen-5.18.14/agen5/guile-iface.h
@@ -9,16 +9,13 @@
@@ -9,7 +9,7 @@
# error AutoGen does not work with this version of Guile
choke me.
-#elif GUILE_VERSION < 201000
+#else
+#elif GUILE_VERSION < 202000
# define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p))
# define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l))
# define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p))
# define AG_SCM_TO_LONG(_v) scm_to_long(_v)
# define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v))
-#else
-# error unknown GUILE_VERSION
- choke me.
#endif
#endif /* MUTATING_GUILE_IFACE_H_GUARD */
Index: autogen-5.18.14/configure
===================================================================
--- autogen-5.18.14.orig/configure
+++ autogen-5.18.14/configure
@@ -14734,7 +14734,7 @@ $as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
- _guile_versions_to_search="2.0 1.8"
+ _guile_versions_to_search="2.2 2.0 1.8"
if test -n "$GUILE_EFFECTIVE_VERSION"; then
_guile_tmp=""
for v in $_guile_versions_to_search; do
Index: autogen-5.18.14/config/guile.m4
===================================================================
--- autogen-5.18.14.orig/config/guile.m4
@ -46,3 +65,16 @@ Index: autogen-5.18.14/config/guile.m4
if test -n "$GUILE_EFFECTIVE_VERSION"; then
_guile_tmp=""
for v in $_guile_versions_to_search; do
Index: autogen-5.18.14/configure
===================================================================
--- autogen-5.18.14.orig/configure
+++ autogen-5.18.14/configure
@@ -14734,7 +14734,7 @@ $as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
- _guile_versions_to_search="2.0 1.8"
+ _guile_versions_to_search="2.2 2.0 1.8"
if test -n "$GUILE_EFFECTIVE_VERSION"; then
_guile_tmp=""
for v in $_guile_versions_to_search; do

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jul 31 08:50:01 UTC 2018 - schwab@suse.de
- Don't require libopts-devel from autogen
- Rename libopts-devel to autoopts
- Move all autoopts related files to autoopts
- Don't run autoreconf
- Don't remove -Werror
- sprintf-overflow.patch: Fix sprintf overflow
- autogen-guile-2.2.patch: properly add support for guile 2.2
- autogen-constant-timeout.patch: remove, pass AG_TIMEOUT to configure
instead
-------------------------------------------------------------------
Fri Jul 20 08:28:31 UTC 2018 - mpluskal@suse.com

View File

@ -32,17 +32,13 @@ Patch1: autogen-build_ldpath.patch
Patch2: autogen-catch-race-error.patch
# PATCH-FIX-UPSTREAM -- guile 2.2 support
Patch3: autogen-guile-2.2.patch
# PATCH-FIX-OPENSUSE
Patch5: autogen-constant-timeout.patch
# PATCH-FIX-UPSTREAM
Patch4: sprintf-overflow.patch
BuildRequires: fdupes
BuildRequires: libtool
BuildRequires: makeinfo
BuildRequires: pkgconfig >= 0.9.0
BuildRequires: pkgconfig(guile-2.0)
BuildRequires: pkgconfig(libxml-2.0)
# Since shared library and devel package were split, we need to require
# libopts-devel untill all depending packages have fixed buildrequires
Requires: pkgconfig(autoopts)
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
@ -58,41 +54,47 @@ Summary: Shared library libopts
Group: System/Libraries
%description -n %{libname}
AutoGen is a tool designed for generating program files that contain
repetitive text with varied substitutions. Its goal is to simplify the
maintenance of programs that contain large amounts of repetitious text.
This is especially valuable if there are several blocks of such text that
must be kept synchronized in parallel tables.
AutoOpts is a tool that virtually eliminates the hassle of processing
options and keeping man pages, info docs and usage text up to date. This
package allows you to specify several program attributes, thousands of
option types and many option attributes. From this, it then produces all
the code necessary to parse and handle the command line and configuration
file options, and the documentation that should go with your program as
well.
This package contains shared library libopts
%package -n libopts-devel
Summary: Development files for libopts
%package -n autoopts
Summary: Automated Option Processing
Group: Development/Languages/C and C++
Requires: %{libname} = %{version}-%{release}
Requires: autogen
Obsoletes: %{libname}-devel < %{version}-%{release}
Provides: autogen:/usr/bin/autoopts-config
Provides: libopts-devel
%description -n libopts-devel
AutoGen is a tool designed for generating program files that contain
repetitive text with varied substitutions. Its goal is to simplify the
maintenance of programs that contain large amounts of repetitious text.
This is especially valuable if there are several blocks of such text that
must be kept synchronized in parallel tables.
This package contains devel files for libopts
%description -n autoopts
AutoOpts is a tool that virtually eliminates the hassle of processing
options and keeping man pages, info docs and usage text up to date. This
package allows you to specify several program attributes, thousands of
option types and many option attributes. From this, it then produces all
the code necessary to parse and handle the command line and configuration
file options, and the documentation that should go with your program as
well.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1
%patch4 -p1
touch aclocal.m4 configure Makefile.in config-h.in
%build
# Don't build with -Werror
sed -i "s|-Werror||g" configure.ac
autoreconf -fiv
%configure \
CFLAGS="%optflags -Wno-error=implicit-fallthrough" \
AG_TIMEOUT=20 \
--disable-static \
--with-pic
make %{?_smp_mflags}
@ -103,7 +105,15 @@ find %{buildroot} -type f -name "*.la" -delete -print
%fdupes -s %{buildroot}%{_datadir}
%check
make %{?_smp_mflags} check
make %{?_smp_mflags} check || {
for f in */test/test-suite.log; do
if test -f "$f"; then
echo "======== $f ========"
cat "$f"
fi
done
exit 1
}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/autogen.info%{ext_info}
@ -115,25 +125,33 @@ make %{?_smp_mflags} check
%postun -n %{libname} -p /sbin/ldconfig
%files
%doc NEWS ChangeLog
%doc NEWS
%license COPYING
%{_bindir}/autogen
%{_bindir}/autoopts-config
%{_bindir}/columns
%{_bindir}/getdefs
%{_bindir}/xml2ag
%{_libdir}/autogen
%{_mandir}/man1/*%{ext_man}
%exclude %{_mandir}/man1/autoopts-config.1%{ext_man}
%{_infodir}/*%{ext_info}
%{_datadir}/autogen
%dir %{_datadir}/autogen
%{_datadir}/autogen/fsm-trans.tlib
%{_datadir}/autogen/fsm-macro.tlib
%files -n %{libname}
%{_libdir}/libopts.so.*
%files -n libopts-devel
%files -n autoopts
%{_bindir}/autoopts-config
%{_libdir}/libopts.so
%{_includedir}/*
%{_mandir}/man1/autoopts-config.1%{ext_man}
%{_mandir}/man3/*%{ext_man}
%{_libdir}/autogen
%{_datadir}/aclocal/*
%{_datadir}/autogen
%exclude %{_datadir}/autogen/fsm-trans.tlib
%exclude %{_datadir}/autogen/fsm-macro.tlib
%{_libdir}/pkgconfig/*.pc
%changelog

26
sprintf-overflow.patch Normal file
View File

@ -0,0 +1,26 @@
Index: autogen-5.18.14/autoopts/usage.c
===================================================================
--- autogen-5.18.14.orig/autoopts/usage.c
+++ autogen-5.18.14/autoopts/usage.c
@@ -765,7 +765,7 @@ prt_vendor_opts(tOptions * opts, char co
OPTST_NO_USAGE_MASK | OPTST_DOCUMENT;
static char const vfmtfmt[] = "%%-%us %%s\n";
- char vfmt[sizeof(vfmtfmt)];
+ char vfmt[sizeof(vfmtfmt) + 9];
/*
* Only handle client specified options. The "vendor option" follows
Index: autogen-5.18.14/getdefs/getdefs.c
===================================================================
--- autogen-5.18.14.orig/getdefs/getdefs.c
+++ autogen-5.18.14/getdefs/getdefs.c
@@ -421,7 +421,7 @@ buildPreamble(char ** ppzDef, char ** pp
char * pzDef = *ppzDef;
char * pzOut = *ppzOut;
- char def_bf[ MAXNAMELEN ];
+ char def_bf[ 2 * MAXNAMELEN + 4 ];
char name_bf[ MAXNAMELEN ];
char * def_str = def_bf;
char * pzIfText = NULL;