diff --git a/Attempt-to-fix-POS36-C.patch b/Attempt-to-fix-POS36-C.patch deleted file mode 100644 index 50eb0ea..0000000 --- a/Attempt-to-fix-POS36-C.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e1796e8c66d2033431f3a3181f4a9a9f014e7867 Mon Sep 17 00:00:00 2001 -From: Denis Arnaud -Date: Sun, 10 Nov 2019 14:53:19 +0100 -Subject: [PATCH] Attempt to fix POS36-C issue - ---- - openpgm/pgm/engine.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/openpgm/pgm/engine.c b/openpgm/pgm/engine.c -index 0e5d42f2..6e138e57 100644 ---- a/openpgm/pgm/engine.c -+++ b/openpgm/pgm/engine.c -@@ -271,8 +271,8 @@ pgm_drop_superuser (void) - { - #ifndef _WIN32 - if (0 == getuid()) { -- setuid((gid_t)65534); -- setgid((uid_t)65534); -+ setgid((gid_t)65534); -+ setuid((uid_t)65534); - } - #endif - } diff --git a/First-batch-of-modernization.patch b/First-batch-of-modernization.patch deleted file mode 100644 index 17f78b4..0000000 --- a/First-batch-of-modernization.patch +++ /dev/null @@ -1,236 +0,0 @@ -From f6acc38db7c0cb598ca8a52e7d245676841a3a41 Mon Sep 17 00:00:00 2001 -From: Denis Arnaud -Date: Sun, 27 Oct 2019 21:08:03 +0100 -Subject: [PATCH] First batch of modernization - ---- - openpgm/pgm/SConscript.autoconf | 2 +- - openpgm/pgm/SConstruct | 6 +++--- - openpgm/pgm/include/impl/messages.h | 20 ++++++++++---------- - openpgm/pgm/mem.c | 8 ++++---- - openpgm/pgm/version_generator.py | 2 +- - 5 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/openpgm/pgm/SConscript.autoconf b/openpgm/pgm/SConscript.autoconf -index d3d833d1..883c1b30 100644 ---- a/openpgm/pgm/SConscript.autoconf -+++ b/openpgm/pgm/SConscript.autoconf -@@ -113,7 +113,7 @@ def CheckMember (context, member, header): - int - main () - { -- offsetof (""" + string.replace (member, '.', ', ') + """); -+ offsetof (""" + member.replace('.', ', ') + """); - return 0; - } - """ -diff --git a/openpgm/pgm/SConstruct b/openpgm/pgm/SConstruct -index adff0b7b..a1263e67 100644 ---- a/openpgm/pgm/SConstruct -+++ b/openpgm/pgm/SConstruct -@@ -202,15 +202,15 @@ if env['WITH_SNMP'] == 'true': - conf = Configure(env, custom_tests = tests); - - if env['WITH_SNMP'] == 'true' and not conf.CheckSNMP(): -- print 'Net-SNMP libraries not compatible.'; -+ print ('Net-SNMP libraries not compatible.'); - Exit(1); - - if env['WITH_CHECK'] == 'true' and conf.CheckCheck(): -- print 'Enabling Check unit tests.'; -+ print ('Enabling Check unit tests.'); - conf.env['CHECK'] = 'true'; - env['CHECK_FLAGS'] = env.ParseFlags('!pkg-config --cflags --libs check'); - else: -- print 'Disabling Check unit tests.'; -+ print ('Disabling Check unit tests.'); - conf.env['CHECK'] = 'false'; - - env = conf.Finish(); -diff --git a/openpgm/pgm/include/impl/messages.h b/openpgm/pgm/include/impl/messages.h -index 812393fd..1655e9c9 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 5697baf9..d3d52951 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", -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,15 @@ - - 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 diff --git a/The-debugging-flag-for-GCC.patch b/The-debugging-flag-for-GCC.patch deleted file mode 100644 index aebe8aa..0000000 --- a/The-debugging-flag-for-GCC.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 91d92903f1cafb0fc6dfc434c907df5d2a776bf2 Mon Sep 17 00:00:00 2001 -From: Denis Arnaud -Date: Tue, 29 Oct 2019 16:58:25 +0100 -Subject: [PATCH] [SCons] The debugging flag for GCC is -ggdb, no longer -gdb - ---- - openpgm/pgm/SConscript.autoconf | 1 + - openpgm/pgm/SConstruct | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/openpgm/pgm/SConscript.autoconf b/openpgm/pgm/SConscript.autoconf -index 883c1b30..abcfd949 100644 ---- a/openpgm/pgm/SConscript.autoconf -+++ b/openpgm/pgm/SConscript.autoconf -@@ -288,6 +288,7 @@ def AutoConf (env): - settings['HAVE_CLOCK_GETTIME'] = conf.CheckFunc ('clock_gettime'); - settings['HAVE_FTIME'] = conf.CheckFunc ('ftime'); - settings['HAVE_GETTIMEOFDAY'] = conf.CheckFunc ('gettimeofday'); -+ settings['HAVE_TIMESPEC_GET'] = conf.CheckFunc ('timespec_get'); - # Custom checks - settings['HAVE_PTHREAD_SPINLOCK'] = conf.CheckPthreadSpinlock(); - settings['HAVE_GETPROTOBYNAME_R'] = conf.CheckFunc ('getprotobyname_r'); -diff --git a/openpgm/pgm/SConstruct b/openpgm/pgm/SConstruct -index a1263e67..d408945c 100644 ---- a/openpgm/pgm/SConstruct -+++ b/openpgm/pgm/SConstruct -@@ -112,7 +112,7 @@ release = env.Clone(BUILD = 'release') - release.Append(CCFLAGS = '-O2') - - debug = env.Clone(BUILD = 'debug') --debug.Append(CCFLAGS = ['-DPGM_DEBUG','-ggdb'], LINKFLAGS = '-gdb') -+debug.Append(CCFLAGS = ['-DPGM_DEBUG','-ggdb'], LINKFLAGS = '-ggdb') - - profile = env.Clone(BUILD = 'profile') - profile.Append(CCFLAGS = ['-O2','-pg'], LINKFLAGS = '-pg') -@@ -232,7 +232,7 @@ env.Append(BUILDERS = {'StaticSharedLibrary': pic_lib}); - #----------------------------------------------------------------------------- - - ref_node = 'ref/' + env['BUILD'] + '-' + platform.system() + '-' + platform.machine() + '/'; --BuildDir(ref_node, '.', duplicate=0) -+VariantDir(ref_node, '.', duplicate=0) - - env.Append(CPPPATH = [ - # $(top_builddir)/include diff --git a/openpgm-5.2.122.tar.gz b/openpgm-5.2.122.tar.gz deleted file mode 100644 index 85ed12a..0000000 Binary files a/openpgm-5.2.122.tar.gz and /dev/null differ diff --git a/openpgm-release-5-3-128.tar.gz b/openpgm-release-5-3-128.tar.gz new file mode 100644 index 0000000..35c9337 Binary files /dev/null and b/openpgm-release-5-3-128.tar.gz differ diff --git a/openpgm.spec b/openpgm.spec index 66198a8..c7fae33 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -1,17 +1,14 @@ %global name_alias pgm -%global version_main 5.2 -%global version_dash_main 5-2 -%global version_dash %{version_dash_main}-122 +%global version_main 5.3 +%global version_dash_main 5-3 +%global version_dash %{version_dash_main}-128 Name: openpgm -Version: 5.2.122 -Release: 16 +Version: 5.3.128 +Release: 1 License: LGPLv2 Summary: PGM reliable multicast protocol implementation URL: https://github.com/steve-o/openpgm -Source0: https://github.com/steve-o/openpgm/archive/release-%{version_dash}.tar.gz#/%{name}-%{version}.tar.gz -Patch0000: First-batch-of-modernization.patch -Patch0001: The-debugging-flag-for-GCC.patch -Patch0002: Attempt-to-fix-POS36-C.patch +Source0: https://github.com/steve-o/openpgm/archive/release-%{version_dash}.tar.gz#/openpgm-release-%{version_dash}.tar.gz BuildRequires: python3 perl-interpreter dos2unix BuildRequires: gcc libtool automake autoconf @@ -27,7 +24,7 @@ Requires: %{name} = %{version}-%{release} Development libraries for OpenPGM. %prep -%autosetup -n %{name}-release-%{version_dash}/%{name}/%{name_alias} -p3 +%autosetup -n %{name}-release-%{version_dash}/%{name}/%{name_alias} dos2unix examples/getopt.c examples/getopt.h libtoolize --force --copy aclocal @@ -36,6 +33,7 @@ automake --copy --add-missing autoconf %build +mv openpgm-5.2.pc.in openpgm-5.3.pc.in %configure %make_build @@ -52,9 +50,12 @@ mv -f %{buildroot}%{_includedir}/%{name_alias}-%{version_main}/%{name_alias} %{b %doc examples/ %{_includedir}/* %{_libdir}/*.so -%{_libdir}/pkgconfig/openpgm-5.2.pc +%{_libdir}/pkgconfig/openpgm-5.3.pc %changelog +* Mon Sep 18 2023 wulei - 5.3.128-1 +- Update to 5.3.128 + * Wed Nov 11 2020 huanghaitao - 5.2.122-16 - Change source diff --git a/openpgm.yaml b/openpgm.yaml new file mode 100644 index 0000000..3f00d49 --- /dev/null +++ b/openpgm.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: steve-o/openpgm +tag_prefix: "release-" +separator: "-"