Toshaan Bharvani
2 years ago
commit
a58e376c57
5 changed files with 411 additions and 0 deletions
@ -0,0 +1,129 @@
@@ -0,0 +1,129 @@
|
||||
diff --git a/openpgm/pgm/include/impl/messages.h b/openpgm/pgm/include/impl/messages.h |
||||
index 812393f..1655e9c 100644 |
||||
--- a/openpgm/pgm/include/impl/messages.h |
||||
+++ b/openpgm/pgm/include/impl/messages.h |
||||
@@ -185,14 +185,14 @@ static inline void pgm_fatal (const char* format, ...) { |
||||
#define pgm_warn_if_reached() \ |
||||
do { \ |
||||
pgm_warn ("file %s: line %d (%s): code should not be reached", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__); \ |
||||
+ __FILE__, __LINE__, __func__); \ |
||||
} while (0) |
||||
#define pgm_warn_if_fail(expr) \ |
||||
do { \ |
||||
if (PGM_LIKELY (expr)); \ |
||||
else \ |
||||
pgm_warn ("file %s: line %d (%s): runtime check failed: (%s)", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ |
||||
+ __FILE__, __LINE__, __func__, #expr); \ |
||||
} while (0) |
||||
|
||||
|
||||
@@ -210,14 +210,14 @@ static inline void pgm_fatal (const char* format, ...) { |
||||
if (PGM_LIKELY(expr)); \ |
||||
else { \ |
||||
pgm_fatal ("file %s: line %d (%s): assertion failed: (%s)", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ |
||||
+ __FILE__, __LINE__, __func__, #expr); \ |
||||
abort (); \ |
||||
} \ |
||||
} while (0) |
||||
# define pgm_assert_not_reached() \ |
||||
do { \ |
||||
pgm_fatal ("file %s: line %d (%s): should not be reached", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__); \ |
||||
+ __FILE__, __LINE__, __func__); \ |
||||
abort (); \ |
||||
} while (0) |
||||
# define pgm_assert_cmpint(n1, cmp, n2) \ |
||||
@@ -226,7 +226,7 @@ static inline void pgm_fatal (const char* format, ...) { |
||||
if (PGM_LIKELY(_n1 cmp _n2)); \ |
||||
else { \ |
||||
pgm_fatal ("file %s: line %d (%s): assertion failed (%s): (%" PRIi64 " %s %" PRIi64 ")", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #n1 " " #cmp " " #n2, _n1, #cmp, _n2); \ |
||||
+ __FILE__, __LINE__, __func__, #n1 " " #cmp " " #n2, _n1, #cmp, _n2); \ |
||||
abort (); \ |
||||
} \ |
||||
} while (0) |
||||
@@ -236,7 +236,7 @@ static inline void pgm_fatal (const char* format, ...) { |
||||
if (PGM_LIKELY(_n1 cmp _n2)); \ |
||||
else { \ |
||||
pgm_fatal ("file %s: line %d (%s): assertion failed (%s): (%" PRIu64 " %s %" PRIu64 ")", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #n1 " " #cmp " " #n2, _n1, #cmp, _n2); \ |
||||
+ __FILE__, __LINE__, __func__, #n1 " " #cmp " " #n2, _n1, #cmp, _n2); \ |
||||
abort (); \ |
||||
} \ |
||||
} while (0) |
||||
@@ -295,7 +295,7 @@ static inline void pgm_fatal (const char* format, ...) { |
||||
if (PGM_LIKELY(expr)); \ |
||||
else { \ |
||||
pgm_warn ("file %s: line %d (%s): assertion `%s' failed", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ |
||||
+ __FILE__, __LINE__, __func__, #expr); \ |
||||
return; \ |
||||
} \ |
||||
} while (0) |
||||
@@ -304,20 +304,20 @@ static inline void pgm_fatal (const char* format, ...) { |
||||
if (PGM_LIKELY(expr)); \ |
||||
else { \ |
||||
pgm_warn ("file %s: line %d (%s): assertion `%s' failed", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ |
||||
+ __FILE__, __LINE__, __func__, #expr); \ |
||||
return (val); \ |
||||
} \ |
||||
} while (0) |
||||
# define pgm_return_if_reached() \ |
||||
do { \ |
||||
pgm_warn ("file %s: line %d (%s): should not be reached", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__); \ |
||||
+ __FILE__, __LINE__, __func__); \ |
||||
return; \ |
||||
} while (0) |
||||
# define pgm_return_val_if_reached(val) \ |
||||
do { \ |
||||
pgm_warn ("file %s: line %d (%s): should not be reached", \ |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__); \ |
||||
+ __FILE__, __LINE__, __func__); \ |
||||
return (val); \ |
||||
} while (0) |
||||
|
||||
diff --git a/openpgm/pgm/mem.c b/openpgm/pgm/mem.c |
||||
index 5697baf..d3d5295 100644 |
||||
--- a/openpgm/pgm/mem.c |
||||
+++ b/openpgm/pgm/mem.c |
||||
@@ -163,7 +163,7 @@ pgm_malloc ( |
||||
|
||||
#ifdef __GNUC__ |
||||
pgm_fatal ("file %s: line %d (%s): failed to allocate %" PRIzu " bytes", |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, |
||||
+ __FILE__, __LINE__, __func__, |
||||
n_bytes); |
||||
#else |
||||
pgm_fatal ("file %s: line %d: failed to allocate %" PRIzu " bytes", |
||||
@@ -186,7 +186,7 @@ pgm_malloc_n ( |
||||
if (SIZE_OVERFLOWS (n_blocks, block_bytes)) { |
||||
#ifdef __GNUC__ |
||||
pgm_fatal ("file %s: line %d (%s): overflow allocating %" PRIzu "*%" PRIzu " bytes", |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, |
||||
+ __FILE__, __LINE__, __func__, |
||||
n_blocks, block_bytes); |
||||
#else |
||||
pgm_fatal ("file %s: line %d: overflow allocating %" PRIzu "*%" PRIzu " bytes", |
||||
@@ -210,7 +210,7 @@ pgm_malloc0 ( |
||||
|
||||
#ifdef __GNUC__ |
||||
pgm_fatal ("file %s: line %d (%s): failed to allocate %" PRIzu " bytes", |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, |
||||
+ __FILE__, __LINE__, __func__, |
||||
n_bytes); |
||||
#else |
||||
pgm_fatal ("file %s: line %d: failed to allocate %" PRIzu " bytes", |
||||
@@ -236,7 +236,7 @@ pgm_malloc0_n ( |
||||
|
||||
#ifdef __GNUC__ |
||||
pgm_fatal ("file %s: line %d (%s): failed to allocate %" PRIzu "*%" PRIzu " bytes", |
||||
- __FILE__, __LINE__, __PRETTY_FUNCTION__, |
||||
+ __FILE__, __LINE__, __func__, |
||||
n_blocks, block_bytes); |
||||
#else |
||||
pgm_fatal ("file %s: line %d: failed to allocate %" PRIzu "*%" PRIzu " bytes", |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
diff --git a/openpgm/pgm/openpgm-5.2.pc.in b/openpgm/pgm/openpgm-5.2.pc.in |
||||
index 1e56d944..9e30a6da 100644 |
||||
--- a/openpgm/pgm/openpgm-5.2.pc.in |
||||
+++ b/openpgm/pgm/openpgm-5.2.pc.in |
||||
@@ -9,4 +9,4 @@ Version: @PACKAGE_VERSION@ |
||||
# packagers may wish to move @LIBS@ to Libs.private for platforms with |
||||
# versions of pkg-config that support static linking. |
||||
Libs: -L${libdir} -lpgm @LIBS@ |
||||
-Cflags: -I${includedir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@ -I${libdir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@/include |
||||
+Cflags: -I${includedir} |
||||
|
@ -0,0 +1,59 @@
@@ -0,0 +1,59 @@
|
||||
diff --git a/openpgm/pgm/version_generator.py b/openpgm/pgm/version_generator.py |
||||
index e489aef..581eabe 100755 |
||||
--- a/openpgm/pgm/version_generator.py |
||||
+++ b/openpgm/pgm/version_generator.py |
||||
@@ -1,19 +1,25 @@ |
||||
-#!/usr/bin/python |
||||
+#!/usr/bin/python3 |
||||
|
||||
import os |
||||
import platform |
||||
import time |
||||
|
||||
-build_date = time.strftime ("%Y-%m-%d") |
||||
-build_time = time.strftime ("%H:%M:%S") |
||||
-build_rev = filter (str.isdigit, "$Revision$") |
||||
+timestamp = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) |
||||
+build_date = time.strftime ("%Y-%m-%d", timestamp) |
||||
+build_time = time.strftime ("%H:%M:%S", timestamp) |
||||
+build_rev = ''.join (list (filter (str.isdigit, "$Revision$"))) |
||||
+build_system = platform.system() |
||||
+build_machine = platform.machine() |
||||
+if 'SOURCE_DATE_EPOCH' in os.environ: |
||||
+ build_system = 'BuildSystem' |
||||
+ build_machine = 'BuildMachine' |
||||
|
||||
-print """ |
||||
+print (""" |
||||
/* vim:ts=8:sts=8:sw=4:noai:noexpandtab |
||||
* |
||||
* OpenPGM version. |
||||
* |
||||
- * Copyright (c) 2006-2011 Miru Limited. |
||||
+ * Copyright (c) 2006-2014 Miru Limited. |
||||
* |
||||
* This library is free software; you can redistribute it and/or |
||||
* modify it under the terms of the GNU Lesser General Public |
||||
@@ -41,15 +47,16 @@ |
||||
|
||||
const unsigned pgm_major_version = 5; |
||||
const unsigned pgm_minor_version = 2; |
||||
const unsigned pgm_micro_version = 122; |
||||
-const char* pgm_build_date = "%s"; |
||||
-const char* pgm_build_time = "%s"; |
||||
-const char* pgm_build_system = "%s"; |
||||
-const char* pgm_build_machine = "%s"; |
||||
-const char* pgm_build_revision = "%s"; |
||||
+const char* pgm_build_date = "{0}"; |
||||
+const char* pgm_build_time = "{1}"; |
||||
+const char* pgm_build_system = "{2}"; |
||||
+const char* pgm_build_machine = "{3}"; |
||||
+const char* pgm_build_revision = "{4}"; |
||||
|
||||
|
||||
/* eof */ |
||||
-"""%(build_date, build_time, platform.system(), platform.machine(), build_rev) |
||||
+""".format (build_date, build_time, build_system, build_machine, build_rev)) |
||||
|
||||
# end of file |
||||
+ |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
--- openpgm-release-5-2-122/openpgm/pgm/engine.c.org 2019-11-10 14:56:31.815959556 +0100 |
||||
+++ openpgm-release-5-2-122/openpgm/pgm/engine.c 2019-11-10 14:57:33.990743464 +0100 |
||||
@@ -262,8 +262,9 @@ |
||||
{ |
||||
#ifndef _WIN32 |
||||
if (0 == getuid()) { |
||||
- setuid((gid_t)65534); |
||||
- setgid((uid_t)65534); |
||||
+ setgroups(0, NULL); |
||||
+ setgid((gid_t)65534); |
||||
+ setuid((uid_t)65534); |
||||
} |
||||
#endif |
||||
} |
@ -0,0 +1,198 @@
@@ -0,0 +1,198 @@
|
||||
Name: openpgm |
||||
Version: 5.2.122 |
||||
%global name_alias pgm |
||||
%global version_main 5.2 |
||||
%global version_dash_main 5-2 |
||||
%global version_dash %{version_dash_main}-122 |
||||
Release: 28%{?dist} |
||||
Summary: An implementation of the PGM reliable multicast protocol |
||||
|
||||
# The license is LGPLv2.1 |
||||
License: LGPLv2 |
||||
# New URL is https://github.com/steve-o/openpgm |
||||
# The files are now on https://code.google.com/archive/p/openpgm/downloads |
||||
URL: https://github.com/steve-o/%{name} |
||||
Source0: https://github.com/steve-o/%{name}/archive/release-%{version_dash}.tar.gz#/%{name}-%{version}.tar.gz |
||||
|
||||
# All the following patches have been submitted upstream |
||||
# as a merge request: https://github.com/steve-o/openpgm/pull/64 |
||||
Patch2: openpgm-02-c-func.patch |
||||
Patch3: openpgm-03-pkgconfig.patch |
||||
Patch4: openpgm-04-py-version-gen.patch |
||||
Patch5: openpgm-05-fix-setgid.patch |
||||
|
||||
BuildRequires: make |
||||
BuildRequires: libtool automake autoconf |
||||
BuildRequires: gcc |
||||
BuildRequires: python3 |
||||
BuildRequires: dos2unix |
||||
BuildRequires: perl-interpreter |
||||
|
||||
|
||||
%description |
||||
OpenPGM is an open source implementation of the Pragmatic General |
||||
Multicast (PGM) specification in RFC 3208. |
||||
|
||||
|
||||
%package devel |
||||
Summary: Development files for openpgm |
||||
Requires: %{name}%{?_isa} = %{version}-%{release} |
||||
|
||||
%description devel |
||||
This package contains OpenPGM related development libraries and header files. |
||||
|
||||
|
||||
%prep |
||||
%setup -q -n %{name}-release-%{version_dash}/%{name}/%{name_alias} |
||||
%patch2 -p3 |
||||
%patch3 -p3 |
||||
%patch4 -p3 |
||||
%patch5 -p3 |
||||
dos2unix examples/getopt.c examples/getopt.h |
||||
|
||||
%build |
||||
libtoolize --force --copy |
||||
aclocal |
||||
autoheader |
||||
automake --copy --add-missing |
||||
autoconf |
||||
%configure |
||||
|
||||
# This package has a configure test which uses ASMs, but does not link the |
||||
# resultant .o files. As such the ASM test is always successful, even on |
||||
# architectures were the ASM is not valid when compiling with LTO. |
||||
# |
||||
# -ffat-lto-objects is sufficient to address this issue. It is the default |
||||
# for F33, but is expected to only be enabled for packages that need it in |
||||
# F34, so we use it here explicitly |
||||
%define _lto_cflags -flto=auto -ffat-lto-objects |
||||
|
||||
%make_build |
||||
|
||||
%install |
||||
%make_install |
||||
|
||||
# Remove the static libraries and the temporary libtool artifacts |
||||
rm -f %{buildroot}%{_libdir}/lib%{name_alias}.{a,la} |
||||
|
||||
# Move the header files into /usr/include |
||||
mv -f %{buildroot}%{_includedir}/%{name_alias}-%{version_main}/%{name_alias} %{buildroot}%{_includedir}/ |
||||
|
||||
%files |
||||
%doc COPYING LICENSE |
||||
%{_libdir}/*.so.* |
||||
|
||||
|
||||
%files devel |
||||
%doc examples/ |
||||
%{_includedir}/* |
||||
%{_libdir}/*.so |
||||
%{_libdir}/pkgconfig/openpgm-5.2.pc |
||||
|
||||
|
||||
%changelog |
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-28 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild |
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-27 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild |
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-26 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
||||
|
||||
* Fri Aug 21 2020 Jeff Law <law@redhat.com> - 5.2.122-25 |
||||
- Re-enable LTO |
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-24 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
||||
|
||||
* Tue Jul 14 2020 Jeff Law <law@redhat.com> - 5.2.122-23 |
||||
- Disable LTO |
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-22 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
||||
|
||||
* Sun Nov 10 2019 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 5.2.122-21 |
||||
- The header files are now installed directly in /usr/include |
||||
|
||||
* Wed Oct 30 2019 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 5.2.122-20 |
||||
- Suppressed the dependency on SCons (as autotools are used instead) |
||||
- Fixed the generated version minor number (from 127 to 122) |
||||
- Fixed the target include directory |
||||
|
||||
* Wed Oct 30 2019 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 5.2.122-19 |
||||
- Merged with the EPEL 8 version, i.e., with modernized way of packaging |
||||
|
||||
* Sat Oct 26 2019 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 5.2.122-18 |
||||
- Updated the source URL and Python to Python 3 |
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-17 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-16 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
||||
|
||||
* Wed Jan 23 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 5.2.122-15 |
||||
- Remove non-existent directory from pkgconfig file |
||||
|
||||
* Wed Sep 19 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 5.2.122-14 |
||||
- Use python2 explicitly (#1605329). |
||||
- Remove unnecessary calls to ldconfig. |
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-13 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
||||
|
||||
* Mon Mar 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 5.2.122-12 |
||||
- Update Python 2 dependency declarations to new packaging standards |
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) |
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-11 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-10 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild |
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-9 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
||||
|
||||
* Sat Feb 18 2017 Jose Pedro Oliveira <jose.p.oliveira.oss at gmail.com> - 5.2.122-8 |
||||
- Add perl to the build requirements list (required by galois_generator.pl) |
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-7 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.122-6 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
||||
|
||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.122-5 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild |
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.122-4 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.122-3 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.122-2 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
||||
|
||||
* Wed May 15 2013 Jose Pedro Oliveira <jpo at di.uminho.pt> - 5.2.122-1 |
||||
- Update to 5.2.122 |
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.118-4 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
||||
|
||||
* Fri Dec 21 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 5.1.118-3 |
||||
- Build requires python (no longer available by default in F18+ buildroots) |
||||
|
||||
* Fri Dec 21 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 5.1.118-2 |
||||
- Renamed the tarball (replaced '%7E' by '~') |
||||
- Removed the defattr lines |
||||
|
||||
* Wed Dec 19 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 5.1.118-1 |
||||
- Change license from LGPLv2.1 to LGPLv2 (867182#c13) |
||||
|
||||
* Tue Dec 18 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 5.1.118-0 |
||||
- First Fedora specfile |
||||
|
||||
# vim:set ai ts=4 sw=4 sts=4 et: |
Loading…
Reference in new issue