Compare commits

...

27 Commits
f38 ... rawhide

Author SHA1 Message Date
Sandro Mani
8eee6ba281 Rebuild (GDAL) 2024-11-09 09:09:24 +01:00
Sandro Mani
045911476a Rebuild (gdal) 2024-11-08 16:05:24 +01:00
Remi Collet
9e82c49d6d rebuild for https://fedoraproject.org/wiki/Changes/php84 2024-10-14 09:24:30 +02:00
55f4cddf67
update to 8.2.2 2024-09-03 13:42:34 -04:00
1613dd9b92
update to 8.2.1
* include upstream patch[1] addressing zero-size malloc and buffer
  overflow

[1] f202bd52b3
2024-08-20 16:21:45 -04:00
Fedora Release Engineering
3950f5cf31 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 16:43:48 +00:00
Jitka Plesnikova
7f2e3fb6af Perl 5.40 rebuild 2024-06-12 13:01:49 +02:00
Python Maint
f0b7bd4fa9 Rebuilt for Python 3.13 2024-06-07 08:52:52 +02:00
Sandro Mani
3d2c55ca66 Rebuild (gdal) 2024-05-13 16:30:00 +02:00
Remi Collet
98b69f6e77 disable PHP extension on 32-bit 2024-04-09 16:13:01 +02:00
Fedora Release Engineering
255b68ff33 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 05:46:06 +00:00
Pavel Raiskup
ca9971db3a Don't build-require files outside of permitted directories
Packaging guidelines only allow dependencies on files in /usr/bin,
/usr/sbin and /etc.

Guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies
Relates: https://fedoraproject.org/wiki/Changes/BuildWithDNF5
Relates: https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5
2024-01-22 14:03:36 +00:00
Fedora Release Engineering
476ed97e70 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 06:53:52 +00:00
Mamoru TASAKA
961e2b5c98 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 2024-01-03 23:36:28 +09:00
Florian Weimer
c94e30a42b Fix C compatibility issue
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2024-01-03 12:54:23 +01:00
Mamoru TASAKA
e4691be9fd Backport upstream patch for compilation with libxml2 2.12.0 2023-11-29 16:05:58 +09:00
Sandro Mani
810e4196bc Rebuild (gdal) 2023-11-15 14:50:42 +01:00
Sandro Mani
be1e372384 Fix implicit declarations of strlcat 2023-10-03 22:54:00 +02:00
Sandro Mani
56cc2fad95 Add missing include 2023-10-03 10:16:12 +02:00
Sandro Mani
d3e3cfb45d Fix incorrect license 2023-10-03 10:15:53 +02:00
Remi Collet
478cdb3389 rebuild for https://fedoraproject.org/wiki/Changes/php83 2023-10-03 08:29:34 +02:00
Fedora Release Engineering
2a6928b895 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 13:44:42 +00:00
Jitka Plesnikova
cce5d74f65 Perl 5.38 rebuild 2023-07-11 15:38:03 +02:00
Python Maint
3c430220da Rebuilt for Python 3.12 2023-06-13 20:44:08 +02:00
Sandro Mani
4b785944ae Rebuild (gdal) 2023-05-11 09:54:09 +02:00
Sandro Mani
4cc13a5dc5 Fix files 2023-04-24 18:20:04 +02:00
Sandro Mani
b2f0d64090 Update to 8.0.1 2023-04-24 17:41:34 +02:00
7 changed files with 311 additions and 35 deletions

3
.gitignore vendored
View File

@ -20,3 +20,6 @@
/MapServer-7.6.3.tar.gz
/MapServer-7.6.4.tar.gz
/MapServer-8.0.0.tar.gz
/MapServer-8.0.1.tar.gz
/MapServer-8.2.1.tar.gz
/MapServer-8.2.2.tar.gz

View File

@ -0,0 +1,54 @@
From f202bd52b35c82508555af722a8ad0f04910c403 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 9 Jul 2024 23:34:35 +0200
Subject: [PATCH] mappostgresql.c: avoid potential invalid use of strcpy()
---
src/mappostgresql.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/mappostgresql.c b/src/mappostgresql.c
index f474650e35..deadbd8a60 100644
--- a/src/mappostgresql.c
+++ b/src/mappostgresql.c
@@ -308,14 +308,18 @@ int msPOSTGRESQLJoinNext(joinObj *join) {
for (i = 0; i < join->numitems; i++) {
length += 8 + strlen(join->items[i]) + 2;
}
+ if (length > 1024 * 1024) {
+ msSetError(MS_MEMERR, "Too many joins.\n", "msPOSTGRESQLJoinNext()");
+ return MS_FAILURE;
+ }
- columns = (char *)malloc(length);
+ columns = (char *)malloc(length + 1);
if (!columns) {
msSetError(MS_MEMERR, "Failure to malloc.\n", "msPOSTGRESQLJoinNext()");
return MS_FAILURE;
}
- strcpy(columns, "");
+ columns[0] = 0;
for (i = 0; i < join->numitems; i++) {
strcat(columns, "\"");
strcat(columns, join->items[i]);
@@ -326,14 +330,15 @@ int msPOSTGRESQLJoinNext(joinObj *join) {
}
/* Create the query string. */
- sql = (char *)malloc(26 + strlen(columns) + strlen(join->table) +
- strlen(join->to) + strlen(joininfo->from_value));
+ const size_t nSize = 26 + strlen(columns) + strlen(join->table) +
+ strlen(join->to) + strlen(joininfo->from_value);
+ sql = (char *)malloc(nSize);
if (!sql) {
msSetError(MS_MEMERR, "Failure to malloc.\n", "msPOSTGRESQLJoinNext()");
return MS_FAILURE;
}
- sprintf(sql, "SELECT %s FROM %s WHERE %s = '%s'", columns, join->table,
- join->to, joininfo->from_value);
+ snprintf(sql, nSize, "SELECT %s FROM %s WHERE %s = '%s'", columns,
+ join->table, join->to, joininfo->from_value);
if (joininfo->layer_debug) {
msDebug("msPOSTGRESQLJoinNext(): executing %s.\n", sql);
}

25
mapserver-c99.patch Normal file
View File

@ -0,0 +1,25 @@
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Jan 3 12:33:55 2024 +0100
Ruby bindings: Return 0 on exceptions, not NULL
At least Ruby 3.2 anf SWIG 4.1 expect an integer here, resulting in
an int-conversion error with current/upcoming compilers. Return 0
instead of NULL works with pointer return types, too, should there
be a supported Ruby version which uses a pointer in this context.
Submitted upstream: <https://github.com/MapServer/MapServer/pull/6998>
diff --git a/mapscript/ruby/rbmodule.i b/mapscript/ruby/rbmodule.i
index e5ce85e4883e3ef6..47eda59e32c704d8 100644
--- a/mapscript/ruby/rbmodule.i
+++ b/mapscript/ruby/rbmodule.i
@@ -129,7 +129,7 @@ static void _raise_ms_exception() {
default:
_raise_ms_exception();
msResetErrorList();
- return NULL;
+ return 0;
}
}

View File

@ -0,0 +1,11 @@
diff -rupN MapServer-rel-8-0-1/CMakeLists.txt MapServer-rel-8-0-1-new/CMakeLists.txt
--- MapServer-rel-8-0-1/CMakeLists.txt 2023-04-17 19:26:04.000000000 +0200
+++ MapServer-rel-8-0-1-new/CMakeLists.txt 2023-10-03 22:50:49.702462069 +0200
@@ -280,6 +280,7 @@ flatgeobuf/packedrtree.cpp
include_directories(flatgeobuf/include)
#add_definitions(-DHASH_DEBUG=1)
+add_definitions(-D_DEFAULT_SOURCE)
if(WIN32)
set(REGEX_SOURCES ${REGEX_DIR}/regex.c)
include_directories(${REGEX_DIR})

View File

@ -0,0 +1,83 @@
From 2c1d4f928b9657dbb4517ecbfc8cac30cc73ae9f Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Sat, 18 Nov 2023 22:13:46 +0100
Subject: [PATCH 1/2] Fix compilation errors with libxml2 2.12
---
mapows.c | 2 +-
mapwcs.cpp | 2 +-
mapwcs20.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mapows.c b/mapows.c
index c2fa55521..294a64fb4 100644
--- a/mapows.c
+++ b/mapows.c
@@ -162,7 +162,7 @@ static int msOWSPreParseRequest(cgiRequestObj *request,
#endif
if (ows_request->document == NULL
|| (root = xmlDocGetRootElement(ows_request->document)) == NULL) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
msSetError(MS_OWSERR, "XML parsing error: %s",
"msOWSPreParseRequest()", error->message);
return MS_FAILURE;
diff --git a/mapwcs.cpp b/mapwcs.cpp
index 5459f5bb1..817c8a784 100644
--- a/mapwcs.cpp
+++ b/mapwcs.cpp
@@ -383,7 +383,7 @@ static int msWCSParseRequest(cgiRequestObj *request, wcsParamsObj *params,
/* parse to DOM-Structure and get root element */
if((doc = xmlParseMemory(request->postrequest, strlen(request->postrequest)))
== NULL) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
msSetError(MS_WCSERR, "XML parsing error: %s",
"msWCSParseRequest()", error->message);
return MS_FAILURE;
diff --git a/mapwcs20.cpp b/mapwcs20.cpp
index 355a00a80..5febbb9d6 100644
--- a/mapwcs20.cpp
+++ b/mapwcs20.cpp
@@ -1459,7 +1459,7 @@ int msWCSParseRequest20(mapObj *map, cgiRequestObj *request,
/* parse to DOM-Structure and get root element */
if(doc == NULL) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
msSetError(MS_WCSERR, "XML parsing error: %s",
"msWCSParseRequest20()", error->message);
return MS_FAILURE;
}
From a1dd7a851b620be9bf72426f70d82aab21ef4661 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Sat, 18 Nov 2023 22:13:57 +0100
Subject: [PATCH 2/2] Fix compile-time deprecation warnings with libxml2 2.12
---
mapxml.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/mapxml.c b/mapxml.c
index cb96acc3b..c065619aa 100644
--- a/mapxml.c
+++ b/mapxml.c
@@ -48,9 +48,6 @@ int msTransformXmlMapfile(const char *stylesheet, const char *xmlMapfile,
exsltRegisterAll();
xsltRegisterTestModule();
- xmlSubstituteEntitiesDefault(1);
- xmlLoadExtDtdDefaultValue = 1;
-
cur = xsltParseStylesheetFile((const xmlChar *)stylesheet);
if (cur == NULL) {
msSetError(MS_MISCERR, "Failed to load xslt stylesheet", "msTransformXmlMapfile()");
@@ -58,7 +55,7 @@ int msTransformXmlMapfile(const char *stylesheet, const char *xmlMapfile,
goto done;
}
- doc = xmlParseFile(xmlMapfile);
+ doc = xmlReadFile(xmlMapfile, NULL, XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
if (doc == NULL) {
msSetError(MS_MISCERR, "Failed to load xml mapfile", "msTransformXmlMapfile()");
goto done;

View File

@ -1,12 +1,9 @@
%global ini_name 40-mapserver.ini
%global ini_name 39-mapserver.ini
%global project_owner MapServer
%global project_name MapServer
# MapServer doesn't support PHP 7 yet. See:
# https://github.com/mapserver/mapserver/issues/5252
%global php_mapscript 1
# MapServer should support Python 3 but still builds with Python 2.
# This should be investigated.
%global python_mapscript 1
%global srcname mapscript
%ifarch %{java_arches}
%bcond_without java
@ -14,18 +11,33 @@
%bcond_with java
%endif
%if 0%{?fedora} >= 41
%ifarch %{ix86}
%bcond_with php
%else
%bcond_without php
%endif
%else
%bcond_without php
%endif
Name: mapserver
Version: 8.0.0
Release: 7%{?dist}
Version: 8.2.2
Release: 4%{?dist}
Summary: Environment for building spatially-enabled internet applications
%global dashver %(echo %version | sed 's|\\.|-|g')
License: BSD
License: MIT
URL: http://www.mapserver.org
Source0: https://github.com/%{project_owner}/%{project_name}/archive/rel-%{dashver}/%{project_name}-%{version}.tar.gz
## Upstream patches
# mappostgresql.c: avoid potential invalid use of strcpy()
Patch1001: f202bd52b35c82508555af722a8ad0f04910c403.patch
Requires: httpd
Requires: dejavu-sans-fonts
@ -61,9 +73,11 @@ BuildRequires: proj-devel => 5.2.0
BuildRequires: readline-devel
BuildRequires: swig
BuildRequires: zlib-devel
#Get
#/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf
#/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf
# See %%prep below
BuildRequires: /usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf
BuildRequires: /usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf
BuildRequires: dejavu-sans-fonts
%description
@ -87,7 +101,7 @@ Requires: %{name} = %{version}
%description devel
This package contains development files for mapserver.
%if 0%{php_mapscript}
%if %{with php}
%package -n php-%{name}
Summary: PHP/Mapscript map making extensions to PHP
BuildRequires: php-devel
@ -190,7 +204,7 @@ export CXXFLAGS="%{optflags} -fno-strict-aliasing"
-DWITH_MYSQL=TRUE \
-DWITH_PERL=TRUE \
-DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \
%if 0%{php_mapscript}
%if %{with php}
-DWITH_PHPNG=TRUE \
%endif
-DWITH_POSTGIS=TRUE \
@ -224,17 +238,23 @@ export CXXFLAGS="%{optflags} -fno-strict-aliasing"
%install
%cmake_install
# cmake tries to invoke pip and download things. we'll just use setuptools.
mkdir -p %{buildroot}%{python3_sitearch}
pushd redhat-linux-build/src/mapscript/python
%py3_install
popd
mkdir -p %{buildroot}%{_datadir}/%{name}
install -p -m 644 xmlmapfile/mapfile.xsd %{buildroot}%{_datadir}/%{name}
install -p -m 644 xmlmapfile/mapfile.xsl %{buildroot}%{_datadir}/%{name}
install -p -m 644 src/xmlmapfile/mapfile.xsd %{buildroot}%{_datadir}/%{name}
install -p -m 644 src/xmlmapfile/mapfile.xsl %{buildroot}%{_datadir}/%{name}
%if %{with java}
# install java
mkdir -p %{buildroot}%{_javadir}
install -p -m 644 %{_vpath_builddir}/mapscript/java/mapscript.jar %{buildroot}%{_javadir}/
install -p -m 644 %{_vpath_builddir}/src/mapscript/java/mapscript.jar %{buildroot}%{_javadir}/
%endif
%if 0%{php_mapscript}
%if %{with php}
# install php config file
mkdir -p %{buildroot}%{php_inidir}
cat > %{buildroot}%{php_inidir}/%{ini_name} <<EOF
@ -244,11 +264,11 @@ EOF
%endif
# Install sample config file as %%doc
rm %{buildroot}%{_sysconfdir}/mapserver-sample.conf
rm %{buildroot}%{_usr}/%{_sysconfdir}/mapserver-sample.conf
%files
%doc README.rst
%doc README.md
%doc etc/mapserver-sample.conf
%{_bindir}/coshp
%{_bindir}/legend
@ -264,52 +284,132 @@ rm %{buildroot}%{_sysconfdir}/mapserver-sample.conf
%{_datadir}/%{name}/
%files libs
%doc README.rst
%doc README.md
%{_libdir}/libmapserver.so.%{version}
%{_libdir}/libmapserver.so.2
%files devel
%doc README.rst
%doc README.md
%{_libdir}/libmapserver.so
%{_includedir}/%{name}/
%if 0%{php_mapscript}
%if %{with php}
%files -n php-%{name}
%doc src/mapscript/php/README.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/php_mapscriptng.so
# this is only installed when swig < 4.0.2 https://github.com/MapServer/MapServer/blob/25ef061bec310773511eb84ef03f4a91e0f5a081/src/mapscript/phpng/CMakeLists.txt#L86
%if ! 0%{?fedora} && 0%{?rhel} < 10
%{php_extdir}/mapscript.php
%endif
%{php_extdir}/php_mapscriptng.so
%endif
# end php-mapcache
%files perl
%doc README.rst
%doc mapscript/perl/examples
%doc README.md
%doc src/mapscript/perl/examples
%dir %{perl_vendorarch}/auto/mapscript
%{perl_vendorarch}/auto/mapscript/*
%{perl_vendorarch}/mapscript.pm
%if 0%{python_mapscript}
%files -n python3-mapserver
%doc mapscript/python/README.rst
%doc mapscript/python/examples
%doc mapscript/python/tests
%doc src/mapscript/python/README.rst
%doc src/mapscript/python/examples
%doc src/mapscript/python/tests
%{python3_sitearch}/*mapscript*
%endif
%if %{with java}
%files java
%doc mapscript/java/README
%doc mapscript/java/examples
%doc mapscript/java/tests
%doc src/mapscript/java/README
%doc src/mapscript/java/examples
%doc src/mapscript/java/tests
%{_javadir}/*.jar
%{_libdir}/libjavamapscript.so
%endif
%files ruby
%doc mapscript/ruby/README
%doc mapscript/ruby/examples
%doc src/mapscript/ruby/README
%doc src/mapscript/ruby/examples
%doc mapserver-ruby/README
%doc mapserver-ruby/examples
%{ruby_sitearchdir}/mapscript.so
%changelog
* Sat Nov 09 2024 Sandro Mani <manisandro@gmail.com> - 8.2.2-4
- Rebuild (GDAL)
* Fri Nov 08 2024 Sandro Mani <manisandro@gmail.com> - 8.2.2-3
- Rebuild (gdal)
* Mon Oct 14 2024 Remi Collet <remi@fedoraproject.org> - 8.2.2-2
- rebuild for https://fedoraproject.org/wiki/Changes/php84
* Tue Sep 03 2024 Neil Hanlon <neil@shrug.pw> - 8.2.2-1
- update to 8.2.2
* Tue Aug 20 2024 Neil Hanlon <neil@shrug.pw> - 8.2.1-1
- update to 8.2.1
- bring in patch for zero-size malloc and buffer overflow
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jun 12 2024 Jitka Plesnikova <jplesnik@redhat.com> - 8.0.1-17
- Perl 5.40 rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 8.0.1-16
- Rebuilt for Python 3.13
* Mon May 13 2024 Sandro Mani <manisandro@gmail.com> - 8.0.1-15
- Rebuild (gdal)
* Tue Apr 9 2024 Remi Collet <remi@fedoraproject.org> - 8.0.1-14
- disable PHP extension on 32-bit
https://fedoraproject.org/wiki/Changes/php_no_32_bit
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 8.0.1-11
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3
* Wed Jan 03 2024 Florian Weimer <fweimer@redhat.com> - 8.0.1-10
- Fix C compatibility issue
* Wed Nov 29 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 8.0.1-9
- Backport upstream patch for compilation with libxml2 2.12.0
* Wed Nov 15 2023 Sandro Mani <manisandro@gmail.com> - 8.0.1-8
- Rebuild (gdal)
* Tue Oct 03 2023 Sandro Mani <manisandro@gmail.com> - 8.0.1-7
- Fix implicit declarations of strlcat
* Tue Oct 03 2023 Remi Collet <remi@remirepo.net> - 8.0.1-6
- rebuild for https://fedoraproject.org/wiki/Changes/php83
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 8.0.1-4
- Perl 5.38 rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 8.0.1-3
- Rebuilt for Python 3.12
* Thu May 11 2023 Sandro Mani <manisandro@gmail.com> - 8.0.1-2
- Rebuild (gdal)
* Mon Apr 24 2023 Sandro Mani <manisandro@gmail.com> - 8.0.1-1
- Update to 8.0.1
* Thu Mar 09 2023 Sandro Mani <manisandro@gmail.com> - 8.0.0-7
- Fix php extension name in 40-mapserver.ini

View File

@ -1 +1 @@
SHA512 (MapServer-8.0.0.tar.gz) = e5cc774baae9961e180917675775a33f0ff876ff614e6d2232a5f39b91c221ab454bddc58c03cf1cb4248dbff542ff7cbfda9e8107967760addc789958e2b7d2
SHA512 (MapServer-8.2.2.tar.gz) = d6509b0a650381e2629dd9defa715eafdc7b0da3c9dfd914b365b9c695c3cdbebb5b980de73247578d10e09b7acccb875a8ead2b9320e9262e3ae840ec35ee42