commit 0d0bc51f40ef406b27a6a1b090e1aabbc397174083b4f81cfa2013508a6dd4f3 Author: Ana Guerrero Date: Mon Jan 6 11:07:52 2025 +0000 - Disable test_sql_time to prevent Gammu from being removed. This allows the package to remain available a bit longer. OBS-URL: https://build.opensuse.org/package/show/hardware/gammu?expand=0&rev=61 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Docs-Adjust-attributes-order-to-avoid-bugs-in-breath.patch b/0001-Docs-Adjust-attributes-order-to-avoid-bugs-in-breath.patch new file mode 100644 index 0000000..a86f235 --- /dev/null +++ b/0001-Docs-Adjust-attributes-order-to-avoid-bugs-in-breath.patch @@ -0,0 +1,437 @@ +From 3ad188744cd404705a4ab43c998f4e5f8fef7d7c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= +Date: Tue, 30 Mar 2021 13:03:35 +0200 +Subject: [PATCH] Docs: Adjust attributes order to avoid bugs in breathe/sphinx + +Using "unsigned const char" crashes it, but "const unsigned char" works. +--- + include/gammu-unicode.h | 8 ++++---- + libgammu/device/devfunc.c | 2 +- + libgammu/device/devfunc.h | 2 +- + libgammu/gsmstate.c | 16 ++++++++-------- + libgammu/gsmstate.h | 14 +++++++------- + libgammu/misc/coding/coding.c | 2 +- + libgammu/misc/coding/coding.h | 2 +- + libgammu/misc/coding/md5.c | 4 ++-- + libgammu/phone/alcatel/alcatel.c | 4 ++-- + libgammu/phone/nokia/wd2/n3650.c | 4 ++-- + libgammu/protocol/alcatel/alcabus.c | 2 +- + libgammu/protocol/at/at.c | 2 +- + libgammu/protocol/nokia/fbus2.c | 4 ++-- + libgammu/protocol/nokia/mbus2.c | 2 +- + libgammu/protocol/nokia/phonet.c | 2 +- + libgammu/protocol/obex/obex.c | 2 +- + libgammu/protocol/s60/s60.c | 2 +- + libgammu/protocol/symbian/gnapbus.c | 2 +- + tests/atgen/test_helper.c | 6 +++--- + 19 files changed, 41 insertions(+), 41 deletions(-) + +diff --git a/include/gammu-unicode.h b/include/gammu-unicode.h +index cfd7913aa..56b86665a 100644 +--- a/include/gammu-unicode.h ++++ b/include/gammu-unicode.h +@@ -116,22 +116,22 @@ void EncodeHexUnicode(char *dest, const unsigned char *src, size_t len); + * + * \ingroup Unicode + */ +-gboolean mywstrncmp(unsigned const char *a, unsigned const char *b, int num); ++gboolean mywstrncmp(const unsigned char *a, const unsigned char *b, int num); + + /** + * Locates unicode substring. + * + * \ingroup Unicode + */ +-unsigned char *mywstrstr(unsigned const char *haystack, +- unsigned const char *needle); ++unsigned char *mywstrstr(const unsigned char *haystack, ++ const unsigned char *needle); + + /** + * Compares two unicode strings case insensitive. + * + * \ingroup Unicode + */ +-gboolean mywstrncasecmp(unsigned const char *a, unsigned const char *b, int num); ++gboolean mywstrncasecmp(const unsigned char *a, const unsigned char *b, int num); + + /** + * Encode text to UTF-8. +diff --git a/libgammu/device/devfunc.c b/libgammu/device/devfunc.c +index 631afb5c2..d1d4b0800 100644 +--- a/libgammu/device/devfunc.c ++++ b/libgammu/device/devfunc.c +@@ -165,7 +165,7 @@ int socket_read(GSM_StateMachine *s UNUSED, void *buf, size_t nbytes, socket_typ + return result; + } + +-int socket_write(GSM_StateMachine *s, unsigned const char *buf, size_t nbytes, socket_type hPhone) ++int socket_write(GSM_StateMachine *s, const unsigned char *buf, size_t nbytes, socket_type hPhone) + { + int ret; + size_t actual = 0; +diff --git a/libgammu/device/devfunc.h b/libgammu/device/devfunc.h +index 941e83241..3f6d9da5e 100644 +--- a/libgammu/device/devfunc.h ++++ b/libgammu/device/devfunc.h +@@ -16,7 +16,7 @@ int bluetooth_checkservicename(GSM_StateMachine *s, const char *name); + + int socket_read(GSM_StateMachine *s, void *buf, size_t nbytes, socket_type hPhone); + +-int socket_write(GSM_StateMachine *s, unsigned const char *buf, size_t nbytes, socket_type hPhone); ++int socket_write(GSM_StateMachine *s, const unsigned char *buf, size_t nbytes, socket_type hPhone); + + GSM_Error socket_close(GSM_StateMachine *s, socket_type hPhone); + +diff --git a/libgammu/gsmstate.c b/libgammu/gsmstate.c +index 0260cc37f..4833a73ab 100644 +--- a/libgammu/gsmstate.c ++++ b/libgammu/gsmstate.c +@@ -992,7 +992,7 @@ GSM_Error GSM_AbortOperation(GSM_StateMachine * s) + return ERR_NONE; + } + +-GSM_Error GSM_WaitForOnce(GSM_StateMachine *s, unsigned const char *buffer, ++GSM_Error GSM_WaitForOnce(GSM_StateMachine *s, const unsigned char *buffer, + size_t length, int type, int timeout) + { + GSM_Phone_Data *Phone = &s->Phone.Data; +@@ -1035,7 +1035,7 @@ GSM_Error GSM_WaitForOnce(GSM_StateMachine *s, unsigned const char *buffer, + return ERR_TIMEOUT; + } + +-GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned const char *buffer, ++GSM_Error GSM_WaitFor (GSM_StateMachine *s, const unsigned char *buffer, + size_t length, int type, int timeout, + GSM_Phone_RequestID request) + { +@@ -1719,7 +1719,7 @@ fail: + return error; + } + +-void GSM_DumpMessageText_Custom(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type, const char *text) ++void GSM_DumpMessageText_Custom(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type, const char *text) + { + GSM_Debug_Info *curdi; + +@@ -1736,17 +1736,17 @@ void GSM_DumpMessageText_Custom(GSM_StateMachine *s, unsigned const char *messag + } + } + +-void GSM_DumpMessageText(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type) ++void GSM_DumpMessageText(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type) + { + GSM_DumpMessageText_Custom(s, message, messagesize, type, "SENDING frame"); + } + +-void GSM_DumpMessageTextRecv(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type) ++void GSM_DumpMessageTextRecv(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type) + { + GSM_DumpMessageText_Custom(s, message, messagesize, type, "RECEIVED frame"); + } + +-void GSM_DumpMessageBinary_Custom(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type, int direction) ++void GSM_DumpMessageBinary_Custom(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type, int direction) + { + size_t i=0; + GSM_Debug_Info *curdi; +@@ -1764,12 +1764,12 @@ void GSM_DumpMessageBinary_Custom(GSM_StateMachine *s, unsigned const char *mess + } + } + } +-void GSM_DumpMessageBinary(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type) ++void GSM_DumpMessageBinary(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type) + { + GSM_DumpMessageBinary_Custom(s, message, messagesize, type, 0x01); + } + +-void GSM_DumpMessageBinaryRecv(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type) ++void GSM_DumpMessageBinaryRecv(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type) + { + GSM_DumpMessageBinary_Custom(s, message, messagesize, type, 0x02); + } +diff --git a/libgammu/gsmstate.h b/libgammu/gsmstate.h +index a19071a79..4cfe0a150 100644 +--- a/libgammu/gsmstate.h ++++ b/libgammu/gsmstate.h +@@ -408,7 +408,7 @@ typedef struct { + /** + * Writes message to device. + */ +- GSM_Error (*WriteMessage) (GSM_StateMachine *s, unsigned const char *buffer, ++ GSM_Error (*WriteMessage) (GSM_StateMachine *s, const unsigned char *buffer, + size_t length, int type); + /** + * This one is called when character is received from device. +@@ -1511,7 +1511,7 @@ struct _GSM_StateMachine { + */ + GSM_Error GSM_RegisterAllPhoneModules (GSM_StateMachine *s); + +-GSM_Error GSM_WaitForOnce (GSM_StateMachine *s, unsigned const char *buffer, ++GSM_Error GSM_WaitForOnce (GSM_StateMachine *s, const unsigned char *buffer, + size_t length, int type, int timeout); + + /** +@@ -1526,7 +1526,7 @@ GSM_Error GSM_WaitForOnce (GSM_StateMachine *s, unsigned const char *buffer, + * + * \return Error code, ERR_NONE on sucecss. + */ +-GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned const char *buffer, ++GSM_Error GSM_WaitFor (GSM_StateMachine *s, const unsigned char *buffer, + size_t length, int type, int timeout, + GSM_Phone_RequestID request) WARNUNUSED; + +@@ -1548,10 +1548,10 @@ GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned const char *buffer, + + GSM_Error GSM_DispatchMessage (GSM_StateMachine *s); + +-void GSM_DumpMessageText (GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type); +-void GSM_DumpMessageTextRecv (GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type); +-void GSM_DumpMessageBinary (GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type); +-void GSM_DumpMessageBinaryRecv(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type); ++void GSM_DumpMessageText (GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type); ++void GSM_DumpMessageTextRecv (GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type); ++void GSM_DumpMessageBinary (GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type); ++void GSM_DumpMessageBinaryRecv(GSM_StateMachine *s, const unsigned char *message, size_t messagesize, int type); + + + void GSM_OSErrorInfo(GSM_StateMachine *s, const char *description); +diff --git a/libgammu/misc/coding/coding.c b/libgammu/misc/coding/coding.c +index 7785ccdac..233012333 100644 +--- a/libgammu/misc/coding/coding.c ++++ b/libgammu/misc/coding/coding.c +@@ -1506,7 +1506,7 @@ gboolean mywstrncmp(unsigned const char *a, unsigned const char *b, int num) + } + + /* FreeBSD boxes 4.7-STABLE does't have it, although it's ANSI standard */ +-gboolean myiswspace(unsigned const char *src) ++gboolean myiswspace(const unsigned char *src) + { + #ifndef HAVE_ISWSPACE + int o; +diff --git a/libgammu/misc/coding/coding.h b/libgammu/misc/coding/coding.h +index 7b57a1266..0a1649b64 100644 +--- a/libgammu/misc/coding/coding.h ++++ b/libgammu/misc/coding/coding.h +@@ -30,7 +30,7 @@ typedef unsigned long gammu_int_t; + #endif + + /* ---------------------------- Unicode ------------------------------------ */ +-gboolean myiswspace (unsigned const char *src); ++gboolean myiswspace (const unsigned char *src); + + + void ReverseUnicodeString (unsigned char *String); +diff --git a/libgammu/misc/coding/md5.c b/libgammu/misc/coding/md5.c +index d7c9a7869..8877a4119 100644 +--- a/libgammu/misc/coding/md5.c ++++ b/libgammu/misc/coding/md5.c +@@ -30,7 +30,7 @@ struct MD5Context { + }; + + void MD5Init(struct MD5Context *); +-void MD5Update(struct MD5Context *, unsigned const char *, unsigned); ++void MD5Update(struct MD5Context *, const unsigned char *, unsigned); + void MD5Final(unsigned char digest[16], struct MD5Context *); + void MD5Transform(uint32 buf[4], uint32 const in[16]); + +@@ -83,7 +83,7 @@ void MD5Init(struct MD5Context *ctx) + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +-void MD5Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len) ++void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned len) + { + uint32 t; + +diff --git a/libgammu/phone/alcatel/alcatel.c b/libgammu/phone/alcatel/alcatel.c +index d926f6951..2bc8aae02 100644 +--- a/libgammu/phone/alcatel/alcatel.c ++++ b/libgammu/phone/alcatel/alcatel.c +@@ -839,7 +839,7 @@ static GSM_Error ALCATEL_GetFields(GSM_StateMachine *s, int id) { + return ERR_NONE; + } + +-static void ALCATEL_DecodeString(GSM_StateMachine *s, unsigned const char *buffer, unsigned char *target, int maxlen) ++static void ALCATEL_DecodeString(GSM_StateMachine *s, const unsigned char *buffer, unsigned char *target, int maxlen) + { + GSM_Phone_ALCATELData *Priv = &s->Phone.Data.Priv.ALCATEL; + int len; +@@ -864,7 +864,7 @@ static void ALCATEL_DecodeString(GSM_StateMachine *s, unsigned const char *buffe + } + } + +-static GSM_Error ALCATEL_EncodeString(GSM_StateMachine *s, unsigned const char *buffer, unsigned char *target, GSM_Alcatel_FieldType type) ++static GSM_Error ALCATEL_EncodeString(GSM_StateMachine *s, const unsigned char *buffer, unsigned char *target, GSM_Alcatel_FieldType type) + { + GSM_Phone_ALCATELData *Priv = &s->Phone.Data.Priv.ALCATEL; + size_t len; +diff --git a/libgammu/phone/nokia/wd2/n3650.c b/libgammu/phone/nokia/wd2/n3650.c +index 6427db97a..a2515f63c 100644 +--- a/libgammu/phone/nokia/wd2/n3650.c ++++ b/libgammu/phone/nokia/wd2/n3650.c +@@ -48,7 +48,7 @@ static GSM_Error N3650_GetFilePart(GSM_StateMachine *s, GSM_File *File, int *Han + unsigned int len=10,i; + GSM_Error error; + unsigned char *req; +- unsigned const char StartReq[11] = { ++ const unsigned char StartReq[11] = { + N7110_FRAME_HEADER, 0x0D, 0x10, 0x01, 0x07, + 0x24, /* len1 */ + 0x12, /* len2 */ +@@ -158,7 +158,7 @@ static GSM_Error N3650_GetFolderInfo(GSM_StateMachine *s, GSM_File *File) + { + int len=10; + unsigned char *req; +- unsigned const char template[11] = { ++ const unsigned char template[11] = { + N7110_FRAME_HEADER, 0x0B, 0x00, 0x01, 0x07, + 0x18, /* folder name length + 6 */ + 0x12, /* folder name length */ +diff --git a/libgammu/protocol/alcatel/alcabus.c b/libgammu/protocol/alcatel/alcabus.c +index ea741e8dd..23003050c 100644 +--- a/libgammu/protocol/alcatel/alcabus.c ++++ b/libgammu/protocol/alcatel/alcabus.c +@@ -15,7 +15,7 @@ + #include "../../gsmcomon.h" + #include "alcabus.h" + +-static GSM_Error ALCABUS_WriteMessage (GSM_StateMachine *s, unsigned const char *data, size_t len, int type) ++static GSM_Error ALCABUS_WriteMessage (GSM_StateMachine *s, const unsigned char *data, size_t len, int type) + { + GSM_Protocol_ALCABUSData *d = &s->Protocol.Data.ALCABUS; + unsigned char buffer[1024]; +diff --git a/libgammu/protocol/at/at.c b/libgammu/protocol/at/at.c +index 74507168e..eaaadcd85 100644 +--- a/libgammu/protocol/at/at.c ++++ b/libgammu/protocol/at/at.c +@@ -11,7 +11,7 @@ + #include "../../gsmcomon.h" + #include "at.h" + +-static GSM_Error AT_WriteMessage (GSM_StateMachine *s, unsigned const char *buffer, ++static GSM_Error AT_WriteMessage (GSM_StateMachine *s, const unsigned char *buffer, + size_t length, int type) + { + size_t sent=0, i=0; +diff --git a/libgammu/protocol/nokia/fbus2.c b/libgammu/protocol/nokia/fbus2.c +index 1add22d9c..fe3e2d36a 100644 +--- a/libgammu/protocol/nokia/fbus2.c ++++ b/libgammu/protocol/nokia/fbus2.c +@@ -28,7 +28,7 @@ + static GSM_Error FBUS2_Initialise(GSM_StateMachine *s); + + static GSM_Error FBUS2_WriteFrame(GSM_StateMachine *s, +- unsigned const char *MsgBuffer, ++ const unsigned char *MsgBuffer, + int MsgLength, + unsigned char MsgType) + { +@@ -76,7 +76,7 @@ static GSM_Error FBUS2_WriteFrame(GSM_StateMachine *s, + } + + static GSM_Error FBUS2_WriteMessage (GSM_StateMachine *s, +- unsigned const char *MsgBuffer, ++ const unsigned char *MsgBuffer, + size_t MsgLength, + int MsgType) + { +diff --git a/libgammu/protocol/nokia/mbus2.c b/libgammu/protocol/nokia/mbus2.c +index d732b4968..ab6d254a6 100644 +--- a/libgammu/protocol/nokia/mbus2.c ++++ b/libgammu/protocol/nokia/mbus2.c +@@ -13,7 +13,7 @@ + #include "mbus2.h" + + static GSM_Error MBUS2_WriteMessage (GSM_StateMachine *s, +- unsigned const char *MsgBuffer, ++ const unsigned char *MsgBuffer, + size_t MsgLength, + int MsgType) + { +diff --git a/libgammu/protocol/nokia/phonet.c b/libgammu/protocol/nokia/phonet.c +index e483616a4..09bad3b8b 100644 +--- a/libgammu/protocol/nokia/phonet.c ++++ b/libgammu/protocol/nokia/phonet.c +@@ -25,7 +25,7 @@ + #include "phonet.h" + + static GSM_Error PHONET_WriteMessage (GSM_StateMachine *s, +- unsigned const char *MsgBuffer, ++ const unsigned char *MsgBuffer, + size_t MsgLength, + int MsgType) + { +diff --git a/libgammu/protocol/obex/obex.c b/libgammu/protocol/obex/obex.c +index 0d558e171..57f0d7364 100644 +--- a/libgammu/protocol/obex/obex.c ++++ b/libgammu/protocol/obex/obex.c +@@ -13,7 +13,7 @@ + #include "../../misc/coding/coding.h" + #include "obex.h" + +-static GSM_Error OBEX_WriteMessage (GSM_StateMachine *s, unsigned const char *MsgBuffer, ++static GSM_Error OBEX_WriteMessage (GSM_StateMachine *s, const unsigned char *MsgBuffer, + size_t MsgLength, int type) + { + unsigned char *buffer=NULL; +diff --git a/libgammu/protocol/s60/s60.c b/libgammu/protocol/s60/s60.c +index 5df3c6d97..ef3d08b86 100644 +--- a/libgammu/protocol/s60/s60.c ++++ b/libgammu/protocol/s60/s60.c +@@ -28,7 +28,7 @@ + #include "s60.h" + #include "s60-ids.h" + +-static GSM_Error S60_WriteMessage (GSM_StateMachine *s, unsigned const char *MsgBuffer, ++static GSM_Error S60_WriteMessage (GSM_StateMachine *s, const unsigned char *MsgBuffer, + size_t MsgLength, int MsgType) + { + unsigned char *buffer=NULL; +diff --git a/libgammu/protocol/symbian/gnapbus.c b/libgammu/protocol/symbian/gnapbus.c +index 6c945c170..26538fe8d 100644 +--- a/libgammu/protocol/symbian/gnapbus.c ++++ b/libgammu/protocol/symbian/gnapbus.c +@@ -11,7 +11,7 @@ + #include "../../gsmcomon.h" + #include "gnapbus.h" + +-static GSM_Error GNAPBUS_WriteMessage (GSM_StateMachine *s, unsigned const char *MsgBuffer, ++static GSM_Error GNAPBUS_WriteMessage (GSM_StateMachine *s, const unsigned char *MsgBuffer, + size_t MsgLength, int MsgType) + { + unsigned char *buffer=NULL; +diff --git a/tests/atgen/test_helper.c b/tests/atgen/test_helper.c +index 027c4b33d..6c201561f 100644 +--- a/tests/atgen/test_helper.c ++++ b/tests/atgen/test_helper.c +@@ -8,7 +8,7 @@ + #include "test_helper.h" + + ssize_t _ResponseReadDevice(GSM_StateMachine *s, void *buf, size_t nbytes); +-GSM_Error _ResponseWriteMessage(GSM_StateMachine *s, unsigned const char *buffer, size_t length, int type); ++GSM_Error _ResponseWriteMessage(GSM_StateMachine *s, const unsigned char *buffer, size_t length, int type); + + #define _BUFFER_SIZE 512 + +@@ -56,7 +56,7 @@ const unsigned char* last_command(void) + return _echo_buffer.echo; + } + +-void set_echo(unsigned const char *buf, const size_t len) ++void set_echo(const unsigned char *buf, const size_t len) + { + if(buf && len > 0) { + memccpy(_echo_buffer.echo, buf, sizeof(*buf), len); +@@ -96,7 +96,7 @@ ssize_t _ResponseReadDevice(GSM_StateMachine *s UNUSED, void *buf, size_t nbytes + return read_len; + } + +-GSM_Error _ResponseWriteMessage(GSM_StateMachine *s UNUSED, unsigned const char *buffer, size_t length, int type UNUSED) ++GSM_Error _ResponseWriteMessage(GSM_StateMachine *s UNUSED, const unsigned char *buffer, size_t length, int type UNUSED) + { + if(length) { + GSM_DumpMessageText(s, buffer, length, type); +-- +2.30.2 + diff --git a/0001-Enable-fPIE-pie.patch b/0001-Enable-fPIE-pie.patch new file mode 100644 index 0000000..d4a6c42 --- /dev/null +++ b/0001-Enable-fPIE-pie.patch @@ -0,0 +1,27 @@ +From 9eceadea72d667c89d578cb4bd3cb89fc0663e0c Mon Sep 17 00:00:00 2001 +From: Martin Hauke +Date: Wed, 30 Jan 2019 21:37:26 +0100 +Subject: [PATCH] Enable -fPIE / -pie + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d63a8c3..c670a6a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -507,8 +507,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_MINGW OR + add_definitions(-D_FORTIFY_SOURCE=2) + + # Text address randomisation, disabled for now, seems to cause problems +- # MACRO_TUNE_COMPILER("-fPIE") +- # MACRO_TUNE_LINKER("-pie") ++ MACRO_TUNE_COMPILER("-fPIE") ++ MACRO_TUNE_LINKER("-pie") + # These do not work on Windows right now + if (NOT WIN32) + # Stack protector +-- +2.16.4 + diff --git a/0001-Fix-buffer-overflow-in-Backup.Creator.patch b/0001-Fix-buffer-overflow-in-Backup.Creator.patch new file mode 100644 index 0000000..d56e55d --- /dev/null +++ b/0001-Fix-buffer-overflow-in-Backup.Creator.patch @@ -0,0 +1,36 @@ +From ec7e2902c19a886578062979e2749372bfea0380 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Mon, 20 Jun 2022 10:24:13 +0200 +Subject: [PATCH] Fix buffer overflow in Backup.Creator + +I noticed that while testing the upcoming GCC 12 with -D_FORTIFY_SOURCE=3: +here I have + +$1 = 0x7ffff7f0f940 "Linux, kernel 5.16.14-1-default (#1 SMP PREEMPT Fri Mar 11 12:33:34 UTC 2022 (80acc65))" +(gdb) p (int)strlen(GetOS()) +$3 = 87 +so GetOS() returns 87 chars while: + +include/gammu-backup.h: char Creator[80]; + +Fixes: #701 +--- + include/gammu-backup.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/gammu-backup.h b/include/gammu-backup.h +index e7fbc6e74..d5574ea7a 100644 +--- a/include/gammu-backup.h ++++ b/include/gammu-backup.h +@@ -218,7 +218,7 @@ typedef struct { + /** + * Name of program which created backup + */ +- char Creator[80]; ++ char Creator[512]; + /** + * Timestamp of backup + */ +-- +2.36.1 + diff --git a/0001-Update-Python-scripts-to-Python-3.patch b/0001-Update-Python-scripts-to-Python-3.patch new file mode 100644 index 0000000..014b207 --- /dev/null +++ b/0001-Update-Python-scripts-to-Python-3.patch @@ -0,0 +1,610 @@ +From f57176b3fa30fe224e8792fc58b4c18d5d5fe86a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= +Date: Tue, 30 Mar 2021 13:27:44 +0200 +Subject: [PATCH] Update Python scripts to Python 3 + +--- + admin/generate-gsmnet | 14 +-- + contrib/s60/default.py | 168 +++++++++++++++++----------------- + contrib/usbsnoop/decode.py | 4 +- + contrib/usbsnoop/decodexml.py | 6 +- + 4 files changed, 96 insertions(+), 96 deletions(-) + +diff --git a/admin/generate-gsmnet b/admin/generate-gsmnet +index 2f47d87cd..ad892e895 100755 +--- a/admin/generate-gsmnet ++++ b/admin/generate-gsmnet +@@ -17,7 +17,7 @@ + # Copyright (c) 2015 - 2018 Michal Cihar + # + """Generates gsmnet databse from wikipedia""" +-import urllib ++import urllib.request, urllib.parse, urllib.error + import re + from unidecode import unidecode + +@@ -42,10 +42,10 @@ def parse_line(line): + + def print_out(result): + for code, name in sorted(result): +- print '\t{{"{0}", "{1}"}},'.format( ++ print('\t{{"{0}", "{1}"}},'.format( + code, + unidecode(name.decode('utf-8')).replace('&', '&') +- ) ++ )) + + + def print_countries(data): +@@ -102,12 +102,12 @@ def print_networks(data): + + + def main(): +- handle = urllib.urlopen(URL) ++ handle = urllib.request.urlopen(URL) + data = handle.read() + print_countries(data) +- print +- print '-' * 80 +- print ++ print() ++ print('-' * 80) ++ print() + print_networks(data) + + +diff --git a/contrib/s60/default.py b/contrib/s60/default.py +index c020e027b..ccb335cdf 100644 +--- a/contrib/s60/default.py ++++ b/contrib/s60/default.py +@@ -35,7 +35,7 @@ else: + import socket + import socket as pysocket + +-import cPickle ++import pickle + + + VERSION = '0.6.0' +@@ -98,13 +98,13 @@ class Mobile(object): + def loadConfig(self): + try: + f = file(self.getConfigFilename(), 'rb') +- conf = cPickle.load(f) ++ conf = pickle.load(f) + f.close() + if 'port' in conf: + self.port = conf['port'] + if 'useCanvas' in conf: + self.useCanvas = conf['useCanvas'] +- except IOError, r: ++ except IOError as r: + pass + + def saveConfig(self): +@@ -114,13 +114,13 @@ class Mobile(object): + 'port': self.port, + 'useCanvas': self.useCanvas, + } +- cPickle.dump(conf, f) ++ pickle.dump(conf, f) + f.close() +- except IOError, r: ++ except IOError as r: + pass + + def initUi(self): +- app.title = u"Gammu S60 Remote" ++ app.title = "Gammu S60 Remote" + + if self.useCanvas: + self.canvas = Canvas(redraw_callback=self.statusUpdate) +@@ -130,10 +130,10 @@ class Mobile(object): + app.exit_key_handler = self.exitHandler + app.screen = 'normal' + app.menu = [ +- (u'About', self.aboutHandler), +- (u'Change port', self.portHandler), +- (u'Toggle Bluetooth', self.toggleHandler), +- (u'Exit', self.exitHandler), ++ ('About', self.aboutHandler), ++ ('Change port', self.portHandler), ++ ('Toggle Bluetooth', self.toggleHandler), ++ ('Exit', self.exitHandler), + ] + + def statusUpdate(self, rect=None): +@@ -142,14 +142,14 @@ class Mobile(object): + + self.canvas.clear((255,255,255)) + if self.service: +- self.canvas.text((1,14),u"Service started at port %s" % self.port,0xff0000) ++ self.canvas.text((1,14),"Service started at port %s" % self.port,0xff0000) + else: +- self.canvas.text((1,14),u"Service stopped",0xff0000) ++ self.canvas.text((1,14),"Service stopped",0xff0000) + + if self.connected: +- self.canvas.text((1,34), u"Connected to: " + self.client[1], 0x0000ff) ++ self.canvas.text((1,34), "Connected to: " + self.client[1], 0x0000ff) + else: +- self.canvas.text((1,34), u"No active connection", 0x0000ff) ++ self.canvas.text((1,34), "No active connection", 0x0000ff) + + def startService(self): + self.service = True +@@ -160,8 +160,8 @@ class Mobile(object): + self.sock.listen(1) + + socket.set_security(self.sock, socket.AUTH | socket.AUTHOR) +- socket.bt_advertise_service(u"pys60_remote", self.sock, True, socket.RFCOMM) +- note(u'Listenning on port %d' % self.port) ++ socket.bt_advertise_service("pys60_remote", self.sock, True, socket.RFCOMM) ++ note('Listenning on port %d' % self.port) + + self.listen() + +@@ -170,7 +170,7 @@ class Mobile(object): + self.service = False + self.statusUpdate() + +- socket.bt_advertise_service(u"pys60_remote", self.sock, False, socket.RFCOMM) ++ socket.bt_advertise_service("pys60_remote", self.sock, False, socket.RFCOMM) + self.sock.close() + self.sock = None + +@@ -209,7 +209,7 @@ class Mobile(object): + self.connected = True + self.statusUpdate() + address = str(self.client[1]) +- note(u'Connected client %s' % address) ++ note('Connected client %s' % address) + + self.fos = self.client[0].makefile("w") + self.fis = self.client[0].makefile("r") +@@ -223,16 +223,16 @@ class Mobile(object): + pass + + self.disconnect() +- note(u'Disconnected client %s' % address) ++ note('Disconnected client %s' % address) + + def send(self, header, *message): + new_message = "" + + if len(message) == 1: +- new_message = unicode(message[0]) ++ new_message = str(message[0]) + else: + for part in message: +- new_message += unicode(part) + str(NUM_SEPERATOR) ++ new_message += str(part) + str(NUM_SEPERATOR) + + length = 1000 + if len(new_message) > length: +@@ -247,7 +247,7 @@ class Mobile(object): + sentParts += 1 + return + +- self.fos.write(unicode(str(header) + str(NUM_END_HEADER) + new_message + str(NUM_END_TEXT)).encode("utf8") ) ++ self.fos.write(str(str(header) + str(NUM_END_HEADER) + new_message + str(NUM_END_TEXT)).encode("utf8") ) + self.fos.flush() + + def wait(self): +@@ -256,7 +256,7 @@ class Mobile(object): + parts = data.split(NUM_END_HEADER) + + header = int(parts[0]) +- message = unicode(parts[1], "utf8") ++ message = str(parts[1], "utf8") + message_parts = message.split(NUM_SEPERATOR) + + if (header != NUM_PARTIAL_MESSAGE and self.__partialMessage): +@@ -315,21 +315,21 @@ class Mobile(object): + + elif (header == NUM_CONTACTS_DELETE): + id = int(message) +- if id in self.contactDb.keys(): ++ if id in list(self.contactDb.keys()): + del self.contactDb[id] + + elif (header == NUM_CONTACTS_CHANGE_ADDFIELD): + id = int(message_parts[0]) +- type = unicode(message_parts[1]) +- location = unicode(message_parts[2]) +- value = unicode(message_parts[3]) ++ type = str(message_parts[1]) ++ location = str(message_parts[2]) ++ value = str(message_parts[3]) + self.modifyContact("add", id, type, location, value) + + elif (header == NUM_CONTACTS_CHANGE_REMOVEFIELD): + id = int(message_parts[0]) +- type = unicode(message_parts[1]) +- location = unicode(message_parts[2]) +- value = unicode(message_parts[3]) ++ type = str(message_parts[1]) ++ location = str(message_parts[2]) ++ value = str(message_parts[3]) + self.modifyContact("remove", id, type, location, value) + + elif (header == NUM_CALENDAR_REQUEST_COUNT): +@@ -366,8 +366,8 @@ class Mobile(object): + elif (header == NUM_CALENDAR_ENTRY_ADD): + type = str(message_parts[0]) + +- content = unicode(message_parts[1]) +- location = unicode(message_parts[2]) ++ content = str(message_parts[1]) ++ location = str(message_parts[2]) + #start = float(message_parts[3]) if message_parts[3] else 0 + if message_parts[3]: + start = float(message_parts[3]) +@@ -429,10 +429,10 @@ class Mobile(object): + self.sendMessagesCount() + + elif (header == NUM_MESSAGE_SEND_REQUEST): +- name = unicode(message_parts[0]) +- phone = unicode(message_parts[1]) ++ name = str(message_parts[0]) ++ phone = str(message_parts[1]) + enc = str(message_parts[2]) +- msg = unicode(message_parts[3]).decode('string_escape') ++ msg = str(message_parts[3]).decode('string_escape') + self.sendMessage(name, phone, enc, msg) + + elif (header == NUM_SET_READ): +@@ -459,7 +459,7 @@ class Mobile(object): + self.send(NUM_SYSINFO_REPLY_LINE, "free_ram", sysinfo.free_ram()) + self.send(NUM_SYSINFO_REPLY_LINE, "pys60_version", e32.pys60_version) + +- if sysinfo.active_profile() == u"offline": ++ if sysinfo.active_profile() == "offline": + # Return an error code if the phone is in offline mode + self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", -1) + self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", -1) +@@ -467,7 +467,7 @@ class Mobile(object): + self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", sysinfo.signal_dbm()) + self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", sysinfo.signal_bars()) + +- for drive, free in sysinfo.free_drivespace().iteritems(): ++ for drive, free in sysinfo.free_drivespace().items(): + self.send(NUM_SYSINFO_REPLY_LINE, "free_drivespace", str(drive) + str(free)) + + if full: +@@ -484,7 +484,7 @@ class Mobile(object): + fn = self.getScreenshotFilename() + shot = graphics.screenshot() + shot.save(fn) +- note(u'Saved screenshot as %s' % fn) ++ note('Saved screenshot as %s' % fn) + f = file(fn, 'rb') + self.send(NUM_SCREENSHOT_REPLY, f.read().encode('base64')) + f.close() +@@ -498,7 +498,7 @@ class Mobile(object): + self.send(NUM_LOCATION_REPLY, '%03d' % mcc, '%02d' % mnc, '%X' % lac, '%X' % cellid) + + def contactDict(self): +- keys = self.contactDb.keys() ++ keys = list(self.contactDb.keys()) + + contactDict = dict() + for key in keys: +@@ -514,8 +514,8 @@ class Mobile(object): + for field in contact: + _type = field.type + value = field.value +- value = unicode(value) +- value = value.replace(u'\u2029', u'\n') # PARAGRAPH SEPARATOR (\u2029) replaced by LINE FEED (\u000a) ++ value = str(value) ++ value = value.replace('\u2029', '\n') # PARAGRAPH SEPARATOR (\u2029) replaced by LINE FEED (\u000a) + location = field.location + + if _type == "unknown": +@@ -538,10 +538,10 @@ class Mobile(object): + + def sendContactHash(self): + contacts = self.contactDict() +- keys = contacts.keys() ++ keys = list(contacts.keys()) + keys.sort() + +- hash = unicode() ++ hash = str() + + for key in keys: + hash += str(key) +@@ -559,11 +559,11 @@ class Mobile(object): + self.send(NUM_CONTACTS_REPLY_HASH_SINGLE_START) + + contacts = self.contactDict() +- keys = contacts.keys() ++ keys = list(contacts.keys()) + keys.sort() + + for key in keys: +- hash = unicode() ++ hash = str() + for _type, location, value in contacts[key]: + hash += _type + INFO_SEP + location + INFO_SEP + value + hash += FIELD_SEP +@@ -575,7 +575,7 @@ class Mobile(object): + self.send(NUM_CONTACTS_REPLY_HASH_SINGLE_END) + + def sendAllContacts(self): +- keys = self.contactDb.keys() ++ keys = list(self.contactDb.keys()) + + for key in keys: + contact = self.contactDb[key] +@@ -598,8 +598,8 @@ class Mobile(object): + for field in contact: + _type = field.type + value = field.value +- value = unicode(value) +- value = value.replace(u'\u2029', u'\n') # PARAGRAPH SEPARATOR (\u2029) replaced by LINE FEED (\u000a) ++ value = str(value) ++ value = value.replace('\u2029', '\n') # PARAGRAPH SEPARATOR (\u2029) replaced by LINE FEED (\u000a) + location = field.location + + if _type == "unknown": +@@ -623,13 +623,13 @@ class Mobile(object): + except: + return + +- if type == u"thumbnail_image": ++ if type == "thumbnail_image": + if modification == "remove": + self.setContactThumbnail(contact) + else: + self.setContactThumbnail(contact, value) + return +- elif type == u"date": ++ elif type == "date": + if modification == "remove": + self.setContactBirthday(contact) + else: +@@ -655,7 +655,7 @@ class Mobile(object): + def getDetailFromVcard(self, contact, detail, delimiter='\r\n'): + # This is an ugly hack, needed for some fields that cannot be handled using the contact object + try: +- value = unicode(contact.as_vcard(), 'utf8') ++ value = str(contact.as_vcard(), 'utf8') + value = value.split(detail + ":")[1].split(delimiter)[0] + return value + except: +@@ -665,7 +665,7 @@ class Mobile(object): + # This is an ugly hack, needed for some fields that cannot be handled using the contact object + card = contact.as_vcard() + +- new = u"" ++ new = "" + for line in card.split("\r\n"): + if line.startswith("BEGIN:") or line.startswith("VERSION:") or line.startswith("REV:") or line.startswith("UID:"): + new += line + "\r\n" +@@ -728,18 +728,18 @@ class Mobile(object): + line = entryType + sep + entry.content + sep + entry.location + sep + if entry.start_time: + # None if the start datetime of the entry is not set +- line += str(long(entry.start_time)) # entry.start_time is of type float ++ line += str(int(entry.start_time)) # entry.start_time is of type float + line += sep + + if entry.end_time: +- line += str(long(entry.end_time)) ++ line += str(int(entry.end_time)) + line += sep + +- line += str(long(entry.last_modified)) + sep ++ line += str(int(entry.last_modified)) + sep + line += entry.replication + sep # open, private or restricted + + if entry.alarm: +- line += str(long(entry.alarm)) # The alarm datetime value (float) for the entry ++ line += str(int(entry.alarm)) # The alarm datetime value (float) for the entry + line += sep + + line += str(entry.priority) + sep +@@ -768,11 +768,11 @@ class Mobile(object): + # example: on second Tuesday and last Monday of the month + # days is: [{'week': 1, 'day': 1}, {'week': 4, 'day': 0}] + # results in: 'week:1,day:1;week:4,day:0' +- line += ";".join([",".join([key + ":" + str(value) for key, value in entry.items()]) for entry in days]) ++ line += ";".join([",".join([key + ":" + str(value) for key, value in list(entry.items())]) for entry in days]) + elif isinstance(days, dict): + # for example: {'week': 1, 'day': 1, 'month': 1} + # results in: 'week:1,day:1,month:1' +- line += ",".join([key + ":" + str(value) for key, value in days.iteritems()]) ++ line += ",".join([key + ":" + str(value) for key, value in days.items()]) + line += sep + + if repeated and "exceptions" in repeat: +@@ -780,13 +780,13 @@ class Mobile(object): + line += sep + + if repeated and "start" in repeat: +- line += str(long(repeat["start"])) ++ line += str(int(repeat["start"])) + line += sep + + if repeated and "end" in repeat: +- end = long(repeat["end"]) ++ end = int(repeat["end"]) + end -= time.timezone +- if end == 4102441200L: ++ if end == 4102441200: + # 4102441200L = 2100-01-01T00:00:00 + # There is a bug in PyS60, which causes that None as end date throws as error + # As workarond, we use 2100-01-01 as end date for eternal repeats +@@ -805,7 +805,7 @@ class Mobile(object): + line += str(int(bool(entry.crossed_out))) + sep + + if entry.cross_out_time: +- line += str(long(entry.cross_out_time)) ++ line += str(int(entry.cross_out_time)) + line += sep + + # TODO lists no more supported! +@@ -840,10 +840,10 @@ class Mobile(object): + def sendCalendarHash(self): + calendarDict = self.calendarDict() + +- keys = calendarDict.keys() ++ keys = list(calendarDict.keys()) + keys.sort() + +- hash = unicode() ++ hash = str() + for key in keys: + hash += str(key) + hash += FIELD_SEP +@@ -901,7 +901,7 @@ class Mobile(object): + + entry.commit() + +- self.send(NUM_CALENDAR_ENTRY_CHANGE_REPLY_TIME, id, str(long(entry.last_modified))) ++ self.send(NUM_CALENDAR_ENTRY_CHANGE_REPLY_TIME, id, str(int(entry.last_modified))) + + def addCalendarEntry(self, type, content, location, start, end, replication, alarm, priority, repeat_type, + repeat_days, repeat_exceptions, repeat_start, repeat_end, repeat_interval): +@@ -922,7 +922,7 @@ class Mobile(object): + + entry.commit() + +- self.send(NUM_CALENDAR_ENTRY_ADD_REPLY, entry.id, str(long(entry.last_modified))) ++ self.send(NUM_CALENDAR_ENTRY_ADD_REPLY, entry.id, str(int(entry.last_modified))) + + def modifyCalendarEntryFields(self, entry, content, location, start, end, replication, alarm, priority, repeat_type, + repeat_days, repeat_exceptions, repeat_start, repeat_end, repeat_interval): +@@ -1012,7 +1012,7 @@ class Mobile(object): + return + address = self.inbox.address(sms) + content = self.inbox.content(sms) +- content = content.replace(u'\u2029', u'\n') # PARAGRAPH SEPARATOR (\u2029) replaced by LINE FEED (\u000a) ++ content = content.replace('\u2029', '\n') # PARAGRAPH SEPARATOR (\u2029) replaced by LINE FEED (\u000a) + + if self.inbox.unread(sms): + unread = '1' +@@ -1072,7 +1072,7 @@ class Mobile(object): + def sendMessage(self, name, phone, encoding, msg): + try: + messaging.sms_send(phone, msg, encoding, self.sentMessage, name) +- except RuntimeError, detail: ++ except RuntimeError as detail: + if str(detail) == "Already sending": + # Workaround for the "Already sending" bug: + # http://discussion.forum.nokia.com/forum/showthread.php?t=141083 +@@ -1162,7 +1162,7 @@ class Mobile(object): + app.set_exit() + + def portHandler(self): +- ret = query(u'Enter bluetooth port to use', 'number', self.port) ++ ret = query('Enter bluetooth port to use', 'number', self.port) + if ret is not None: + self.port = ret + self.quit() +@@ -1170,42 +1170,42 @@ class Mobile(object): + self.startService() + + def aboutHandler(self): +- query(u'Gammu S60 Remote\nVersion %s\nhttps://wammu.eu/' % (VERSION) , 'query') ++ query('Gammu S60 Remote\nVersion %s\nhttps://wammu.eu/' % (VERSION) , 'query') + + def toggleHandler(self): +- e32.start_exe(u'BtToggleApp.exe','') ++ e32.start_exe('BtToggleApp.exe','') + + # Debug of SIS applications + try: + mobile = Mobile() +-except Exception, e: ++except Exception as e: + # Oops, something wrong. Report problems to user + # and ask him/her to send them to you. + import traceback + +- new_line = u"\u2029" ++ new_line = "\u2029" + + # Collecting call stack info + info = sys.exc_info() + + # Show the last 4 lines of the call stack +- call_stack = u"" ++ call_stack = "" + for filename, lineno, function, text in traceback.extract_tb(info[2]): +- call_stack += filename + u": " + str(lineno) + u" - " + function + new_line +- call_stack += u" " + repr(text) + new_line +- call_stack += u"%s: %s" % info[:2] ++ call_stack += filename + ": " + str(lineno) + " - " + function + new_line ++ call_stack += " " + repr(text) + new_line ++ call_stack += "%s: %s" % info[:2] + + # Creating a friendly user message with exception details +- err_msg = u"This programs was unexpectedly closed due to the following error: " +- err_msg += unicode(repr(e)) + new_line +- err_msg += u"Please, copy and paste the text presented here and " +- err_msg += u"send it to gammu-users@lists.sourceforge.net. " +- err_msg += u"Thanks in advance and sorry for this inconvenience." + new_line*2 +- err_msg += u"Call stack:" + new_line + call_stack ++ err_msg = "This programs was unexpectedly closed due to the following error: " ++ err_msg += str(repr(e)) + new_line ++ err_msg += "Please, copy and paste the text presented here and " ++ err_msg += "send it to gammu-users@lists.sourceforge.net. " ++ err_msg += "Thanks in advance and sorry for this inconvenience." + new_line*2 ++ err_msg += "Call stack:" + new_line + call_stack + + # Small PyS60 application + lock = e32.Ao_lock() + app.body = Text(err_msg) + app.body.set_pos(0) +- app.menu = [(u"Exit", lambda: lock.signal())] ++ app.menu = [("Exit", lambda: lock.signal())] + lock.wait() +diff --git a/contrib/usbsnoop/decode.py b/contrib/usbsnoop/decode.py +index c6d680a56..1185957f4 100755 +--- a/contrib/usbsnoop/decode.py ++++ b/contrib/usbsnoop/decode.py +@@ -10,7 +10,7 @@ This is probably only useful for AT commands. + import sys + + if len(sys.argv) < 2: +- print 'Usage: decode.py LOGFILE' ++ print('Usage: decode.py LOGFILE') + sys.exit(1) + + f = open(sys.argv[1]) +@@ -21,7 +21,7 @@ for line in f: + pos, data = line.split(':') + if pos == '00000000': + if output != '': +- print output.decode('hex') ++ print(output.decode('hex')) + output = '' + data = ''.join(data.strip().split(' ')) + output += data +diff --git a/contrib/usbsnoop/decodexml.py b/contrib/usbsnoop/decodexml.py +index 27459b796..e58c0ef2e 100755 +--- a/contrib/usbsnoop/decodexml.py ++++ b/contrib/usbsnoop/decodexml.py +@@ -10,7 +10,7 @@ This is probably only useful for AT commands. + import sys + + if len(sys.argv) < 2: +- print 'Usage: decode.py LOGFILE' ++ print('Usage: decode.py LOGFILE') + sys.exit(1) + + f = open(sys.argv[1]) +@@ -18,6 +18,6 @@ output = "" + for line in f: + if line[:14] == '': + line = line[14:-17] +- print line +- print line.decode('hex') ++ print(line) ++ print((line.decode('hex'))) + +-- +2.30.2 + diff --git a/0002-disable-test_sql_time.patch b/0002-disable-test_sql_time.patch new file mode 100644 index 0000000..305e978 --- /dev/null +++ b/0002-disable-test_sql_time.patch @@ -0,0 +1,15 @@ +--- gammu-1.42.0/tests/atgen/CMakeLists.txt.orig 2024-12-26 11:30:28.718346469 +0100 ++++ gammu-1.42.0/tests/atgen/CMakeLists.txt 2024-12-26 11:30:43.721800544 +0100 +@@ -45,9 +45,9 @@ + atgen_test(get-sms-location) + atgen_test(get-sms) + +-if (HAVE_MYSQL_MYSQL_H OR LIBDBI_FOUND OR HAVE_POSTGRESQL_LIBPQ_FE_H OR ODBC_FOUND) +-smsd_test(test_sql_time) +-endif (HAVE_MYSQL_MYSQL_H OR LIBDBI_FOUND OR HAVE_POSTGRESQL_LIBPQ_FE_H OR ODBC_FOUND) ++#if (HAVE_MYSQL_MYSQL_H OR LIBDBI_FOUND OR HAVE_POSTGRESQL_LIBPQ_FE_H OR ODBC_FOUND) ++#smsd_test(test_sql_time) ++#endif (HAVE_MYSQL_MYSQL_H OR LIBDBI_FOUND OR HAVE_POSTGRESQL_LIBPQ_FE_H OR ODBC_FOUND) + + smsd_test(smsd-incoming-cds) + smsd_test(smsd-cancel-call) diff --git a/gammu-1.42.0.tar.xz b/gammu-1.42.0.tar.xz new file mode 100644 index 0000000..26a91ae --- /dev/null +++ b/gammu-1.42.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8f152314d7e4d3d643610d742845e0a016ce97c234ad4b1151574e1b09651ee +size 1747520 diff --git a/gammu-remove-gplv3-files.patch b/gammu-remove-gplv3-files.patch new file mode 100644 index 0000000..df3d0c3 --- /dev/null +++ b/gammu-remove-gplv3-files.patch @@ -0,0 +1,11 @@ +diff -Pdpru gammu-1.38.3.orig/contrib/CMakeLists.txt gammu-1.38.3/contrib/CMakeLists.txt +--- gammu-1.38.3.orig/contrib/CMakeLists.txt 2017-05-23 13:34:20.000000000 +0200 ++++ gammu-1.38.3/contrib/CMakeLists.txt 2017-06-17 14:33:00.480774329 +0200 +@@ -126,7 +126,6 @@ endif (INSTALL_UDEV_RULES) + + # Build some examples + # We do not install them intentionally, just check whether they still compile +-add_subdirectory(smscgi) + add_subdirectory(convert) + add_subdirectory(sqlreply) + add_subdirectory(coveragehelper) diff --git a/gammu.changes b/gammu.changes new file mode 100644 index 0000000..e707317 --- /dev/null +++ b/gammu.changes @@ -0,0 +1,1119 @@ +------------------------------------------------------------------- +Thu Dec 26 10:11:37 UTC 2024 - Ana Guerrero + +- Disable test_sql_time to prevent Gammu from being removed. This + allows the package to remain available a bit longer. + +------------------------------------------------------------------- +Mon May 23 19:38:16 UTC 2022 - Martin Liška + +- Add fix-buffer-overflow-in-backup.patch in order to address + 0001-Fix-buffer-overflow-in-Backup.Creator.patch +- Use autosetup. + +------------------------------------------------------------------- +Fri Oct 15 07:32:06 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_gammu-smsd.service.patch + +------------------------------------------------------------------- +Tue Apr 6 09:39:34 UTC 2021 - Martin Hauke + +- Add patches to fix build failures in Tumbleweed: + * 0001-Update-Python-scripts-to-Python-3.patch + * 0001-Docs-Adjust-attributes-order-to-avoid-bugs-in-breath.patch + +------------------------------------------------------------------- +Sun Oct 4 09:47:33 UTC 2020 - Martin Hauke + +- Update to version 1.42.0 + * Localization updates. + * Improved CNMI command compatibility for AT module. + * Improved getting of network and manufacturer information in + AT module. + * Improved compatibility with D-Link modems that need to power on. + * Dropped Python 3 compatibility from utility scripts. + * Fixed bug in deleting SMS messages. + +------------------------------------------------------------------- +Tue Apr 21 02:24:42 UTC 2020 - Steve Kowalik + +- Switch BuildRequires to Python 3 Sphinx due to Python 2 removal. + +------------------------------------------------------------------- +Sat Oct 5 21:10:33 UTC 2019 - Martin Hauke + +- Update to version 1.41.0 + * Documentation improvements. + * Updated MySQL script to be compatible with current server + versions. + * Fixed SMSD operation on phones with more SMS folders. + * Fixed off by one in Python example script. + * Fixed PostgreSQL compilation on openSUSE. + * Several compatibility fixes with recent compilers. + * Improved USSD support. + * Localization updates. + +- Drop patch (fixed by upstream): + * 0001-Add-postgresql-include-location-provided-by-openSUSE.patch + +------------------------------------------------------------------- +Sun Jun 16 20:08:51 UTC 2019 - Martin Liška + +- Add 0001-Add-postgresql-include-location-provided-by-openSUSE.patch in + order to fix missing postgresql include path. + +------------------------------------------------------------------- +Mon Feb 11 13:02:47 UTC 2019 - Jan Engelhardt + +- Update RPM groups. + +------------------------------------------------------------------- +Wed Jan 30 20:47:37 UTC 2019 - mardnh@gmx.de + +- Update to version 1.40.0 + * Added SMSD configuration option RetryTimeout. + * Removed non configurable sleep after failed message send. + * SMSD now tries to store whole decoded text for concatenated + messages in the first entry in database. + * Improved compatibility with Sierra SL8084TR. + * Added support for delivery reports stored in SR memory. + * Configure CNMI parameters for AT driver. + +- Create dedicated subpackage for bash-completion + +- Specfile cleanup + * Removed all stuff that is not necessary for building on modern + SUSE systems + * Use cmake macros + * Use pkg-config style dependencies + * Use https for URLs + * Run spec-cleaner +- Add patch: + * 0001-Enable-fPIE-pie.patch + +------------------------------------------------------------------- +Sun Jan 7 10:33:11 UTC 2018 - ecsos@opensuse.org + +- Update to 1.39.0 + * Fixed answering call in AT module. + * Improved support for Huawei E392 and E3131. + * Fixed compatibility of binaries with Windows XP and 2003. + * Improved support for ZTE MF667. + * Updated list of GSM networks and countries. +- Update to 1.38.5 + * Added SMS_1_REFERENCE to SMSD run on receive environment + * Improved logging of run scripts in SMSD + * Improved support for Huawei E1780 and E1552. + * Allow 0 for setuid/setgid in SMSD. + * Added RunOnIncomingCall to SMSD. + * Fixed SQL error when retry of multipart message + * Added status code column + * Fixed some SQL queries for Access and Oracle databases. + * Add option to prefer GSM charset for USSD. + * Sanitize international numbers stored in the database to always start with +. + * Improved support for Telit devices. + * Added USSD support to SMSD. + * Fixed call hangup in SMSD with some modems. + * Fixed decoding USSD response with some modems. + +------------------------------------------------------------------- +Thu Oct 26 12:05:38 UTC 2017 - dimstar@opensuse.org + +- Explicitly package systemd service on suse_version >= 1330: + depending on the dep chain, systemd is already detected (and + causes build failures for unpackaged files). + +------------------------------------------------------------------- +Mon Sep 25 06:21:12 UTC 2017 - ecsos@opensuse.org + +- update to 1.38.4 + * Improved support for Huawei E3531 and E1756. + +------------------------------------------------------------------- +Sun Jul 30 10:40:44 UTC 2017 - meissner@suse.com + +- forcefully enable PIE as automatism does not trigger. + +------------------------------------------------------------------- +Sat Jun 17 12:27:53 UTC 2017 - ecsos@opensuse.org + +- Update to 1.38.3 + * Improved support for ZTE MF626. + * Fixed USSD handling with longer codes. + * Increased default value for StatusFrequency. + * Improved SMSD response on signals. + * Improved SMSD throughput on big queue. + * Improved SMSD compatibility with Microsoft SQL Server. +- Update to 1.38.2 + * Improved support for Huawei K3765, E150 and E372. + * Fixed decoding of unicode surrogates at message boundary. + * Environment variable PHONE_ID for external program. + * SMS compatibility with devices following old version of GSM 03.38. + * Unicode is now preferred when handling USSD. + * Improved decoding of MMS indication SMS. +- Update to 1.38.1 + * Fixed sending SMS to numbers starting with 000. + * Fixed parsing of vcalendar files with VALUE=DATE-TIME. + * Fixed compatibility with D-Link dwm-157. + * Updated list of GSM countries and networks. +- rebase patch gramps-remove-gplv3-files.patch because of build + error. + +------------------------------------------------------------------- +Fri Dec 16 18:00:41 UTC 2016 - ecsos@opensuse.org + +- Update to 1.38.0 + * MySQL script for SMSD is compatible with strict mode. + * Fixed USSD responses for some AT modems. + * Fixed parsing network status for some modems (eg. Quectel UC15). + * Fixed handling of emojis and other Unicode chars from supplementary plan. + * Fixed compilation with C90 compiler. + +------------------------------------------------------------------- +Fri Nov 25 21:58:46 UTC 2016 - ecsos@opensuse.org + +- Update to 1.37.91 + * Changed version of the shared library. + * Improved support for ZTE MF100. + * Ignore unsolicited +CLCC: reply. + * Correctly report when some SMSD SQL backend is not compiled in. + * Fix build of MySQL backend on Linux. +- Update to 1.37.90 + * Improved support Huawei K3770. + * API changes in some parameter types. + * Fixed various Windows compilation issues. + * Fixed several resource leaks. + * Create outbox SMS atomically in FILES backend. + * Removed getlocation command as we no longer fit into their usage policy. + * Fixed call diverts on TP-LINK MA260. + * Initial support for Oracle database. + * Removed unused daemons, pbk and pbk_groups tables from the SMSD schema. + * SMSD outbox entries now can have priority set in the database. + * Added SIM IMSI to the SMSD status table. + * Added CheckNetwork directive. + * SMSD attempts to power on radio if disabled. + * Fixed processing of AT unsolicited responses in some cases. + * Fixed parsing USSD responses from some devices. + +------------------------------------------------------------------- +Sat May 28 10:12:45 UTC 2016 - ecsos@opensuse.org + +- Update to 1.37.3 + * Improved support for Huawei E398. + * Improved support for Huawei/Vodafone K4505. + * Fixed possible crash if SMSD used in library. + * Improved support for Huawei E180. +- Update to 1.37.2 + * Fixed compilation of SMSD. +- Update to 1.37.1 + * Properly report errors in HEX encoded strings from SMSD SQL backends. + * Configurable SMSD table names. + * Improved support for Huawei E303. + * Improved support for Vodafone K4511. + * Improved support for Telit M2M modules. + +------------------------------------------------------------------- +Thu Feb 18 00:28:11 UTC 2016 - stian@viskjer.net + +- Update to 1.37.0: + * Improved compatibility with ZTE MF190. + * Improved compatibility with Huawei E1750. + * Improved compatibility with Huawei E1752. + * Increased detail of reported errors from SMSD. + +------------------------------------------------------------------- +Fri Aug 28 08:04:21 UTC 2015 - mcihar@suse.cz + +- Update to 1.36.5: + * Properly use timezones with SQLite in SMSD. + * Improve support for Huawei E1752. + * Fixed compilation on distros with old Glib. + * Use advisory locking to prevent two Gammu instances share one device. + * Include child process stdout and stderr in SMSD logs to ease debugging. + * Fix string quoting with ODBC driver. + * Added RunOnSent option to SMSD. + * Store message reference in outbox in files SMSD. + * Improved C API documentation in manual. + * Updated list of GSM country codes and networks. + * Fixed bash completition install path (Ville Skyttä). + * Better logging of delivery report failures in SMSD. + * Improved support for Huawei E3372. + * Fixed compilation using MSVC. + * Fix siemenssatnetmon (Daniel Glöckner). + * Documentation improvements. + * Fixed smsd startup with non existing folders. + * Fixed possible stack overflows on Windows. + * Compatibility with libdbi from git. + * Fix siemenssatnetmon (Daniel Glöckner). + * Fixed reconnecting to SQL server. + * Don't split a surrogate pair between message segments (David Brown). +- Remove patches merged upstream: + - Compatibility-with-libdbi-from-git.patch + - gammu-smsd.lsb.patch +- Enable testsuite +- Clarify dependency on newer CMake + +------------------------------------------------------------------- +Wed Apr 15 08:06:34 UTC 2015 - mcihar@suse.cz + +- Fix compatibility with libdbi snapshot from Git we are using + (Compatibility-with-libdbi-from-git.patch) + +------------------------------------------------------------------- +Tue Apr 14 08:58:20 UTC 2015 - mcihar@suse.cz + +- Update to 1.36.0: + * The python-gammu module is now shipped separately. + * Removed usage of __TIME__ and __DATE__ macros in codebase. + * Fixed encoding of special chars to iCalendar format. + * Fixed decoding of priority from vTODO. + * Avoid infinite loops with ignored messages. + * Improved stability of checking phone SMS memory. + * Fixed parsing of some backup files. +- Adjusted Source URL +- Python module is now shipped separately +- No more need for fake build date + +------------------------------------------------------------------- +Mon Mar 2 15:01:40 UTC 2015 - mcihar@suse.cz + +- Update to 1.35.0: + * Fixed encoding of UTF-8 for higher code points. + * Improved provided udev rules. + * Fixed possible lock while getting network status in SMSD. + * Various localization updates. + +------------------------------------------------------------------- +Tue Dec 30 09:56:31 UTC 2014 - ecsos@opensuse.org + +- Update to 1.34.0: + * Add phone power ON/OFF function. + * Removed deprecated Python modules gammu.Data and gammu.Worker. + * Store network name and code in SMSD tables. + * Fixed build with recent clang compiler. + * Fixed several possible issues found by Coverity scan. + * Fixed possible crash on SMSD startup. + * Fixed decoding unicode SMS messages. + * Added identification for several Nokia phones. + * Fixed compilation issues on various platforms. + * SMSD now honors loglevel for all logging targets. + * SMSD can automatically hangup incoming calls. + * Correctly detect Network errors. + +------------------------------------------------------------------- +Sun Jul 7 20:03:45 UTC 2013 - asterios.dramis@gmail.com + +- Updated to 1.33.0: + * Various translation improvements. + * Improved support for Huawei E173, thanks to Gautier Minster. + * Fixed buffer overflow in MMS decoder. + * Fixed several memory leaks. + * Improved compatibility with Qualcomm devices (bug #1654). + * Various documentation improvements. + * Updated version of sms-gammu2android, thanks to Shadow Walker. + * Fixed compilation on Mac OS X, thanks to Soren Jorvang. + * Fixed SMSD with CheckSecurity = 0 (bug #1672). +- Require libGammu and libgsmsd in gammu-devel package instead of gammu. + +------------------------------------------------------------------- +Fri Aug 10 09:27:19 UTC 2012 - idonmez@suse.com + +- Remove GPL-3.0 licensed files ( bnc#775397 ) + +------------------------------------------------------------------- +Tue Jul 31 12:25:03 UTC 2012 - asterios.dramis@gmail.com + +- Updated to 1.32.0: + * Fixed auto installation of EventLog registry. + * Improved support for Arduino GPRS shield (bug #1592). + * Fixed communication with Cross PD1101wi (bug #1617). + * Ignore another unknown block in Nokia phonebook (bug #1614). + * Do not encode number when setting up diverts. + From 1.31.90: + * Improved compatibility with ES75 (bug #1586). + * Changed API for call diverts. + * Added support for call diverts in Python API. + * AT backend supports manipulating with call diverts. + * Added support for suspending/resuming SMSD using SIGUSR1/2. + * Changed protocol for S60 applet. + * S60 applet now handles SMS with new lines. + * Improved support for Windows Event Log. +- Added xz as build requirement for openSUSE <= 12.1 (needed to unpack the + package sources). +- Don't install the init script "gammu-smsd" (doesn't work correctly out of the + box). Instead install it in the documentation. +- Build the package manual (html) for openSUSE > 11.4 (fails for <= 11.4 due to + python-sphinx). Added gnu-free-fonts, graphviz, graphviz-gd and python-Sphinx + build requirements for this. Added it in a separate subpackage (gammu-doc) to + fix rpmlint warning "package-with-huge-docs". + +------------------------------------------------------------------- +Fri Dec 23 18:45:46 UTC 2011 - asterios.dramis@gmail.com + +- Updated to 1.31.0: + * Fixed compilation with latest libusb. + * Improved error handling in SQL backend of SMSD. + * SMSD documentation improvements. + * Indonesian translation updates. + From 1.30.92: + * Improved vCard parser to better handle location for various fields, thanks + to Vladimir Serbinenko for initial patch. + * Fixed reading calls from some Nokia phones (bug #1553). + * Improved text mode SMS parsing in AT driver, thanks to Vladimir Serbinenko. + * Use glib's MD5 implementation if available. + From 1.30.91: + * Improved documentation for configuring Gammu. + * Fixed parsing birthday from vCard in some cases. + * Added option not to use configured logging in SMSD inject and monitor (bug + #1539). + * Added SMSD configuration LogFacility (bug #1539). + * Fixed reading of data from OBEX phones (LP#891803). + * Fixed double reply detection (bug #1544). + * Increase maximal number of caller groups (bug #1541). + * Cancel all calls on maketerminated call if we don't get call ID. + * Fixed SMSC handling in some cases in SMSD (bug #1547). + From 1.30.90: + * Various documentation improvements. + * Detect Alcatel style reply on CPIN response (bug #1502). + * Fix build on some Win32 systems (bug #1496). + * Make jadmaker handle names with spaces (Raphaël Droz). + * Display 8-bit messages in hex (Nicolas Pitre). + * Do not use AT+CUSD=2 on some phones (bug #1508). + * Fixed gammu-monitor with Windows service (bug #1515). + * Cleanup of contrib directory. + * Better support for Samsung AT phones (bug #1513). + * Fixed handling of MMS notification SMSes (bug #1530). + * Fixed CPIN reply handling (bug #1532). + * SMSD checks for PIN status just after connect (bug #1532). + * Fixed various MSVC compilation issues. + +------------------------------------------------------------------- +Sat Jul 23 19:06:35 UTC 2011 - asterios.dramis@gmail.com + +- Updated to 1.30.0: + * Improved SMSD logging of configuration settings. + * Fix possible crash in fbus2 driver. + * Fix possible crash of ODBC driver on Windows (bug #1482). + * Fixed usage of dbi plugins from Python module. + From 1.29.93: + * Properly initialize atobex driver with Sony-Ericsson phones. + * Updated list of country and network codes. + * Escape fields in SQL queries (bug#1415). + * Escape fields in PostgreSQL SQL script (bug#1415). + * Default to GSM encoding for text messages in SQL backend for SMSD. + * Add option to override which SQL dialect to use in SMSD (bug #1427). + * Improved m-obex protocol support, thanks to Vladimir Serbinenko. + * Various fixes for Samsung B2100, thanks to Vladimir Serbinenko. + * Fix check for AT+CPROT support (bug #1438). + * Fix memory leak in s60 protocol driver (bug #1441). + * Reverted change to SignalStrength because of SQL escaping we have now + (bug #1380). + * Improved vCard parser to handle vCards from Gmail. + * Fixed LDIF parser to cope with multiple LDIF in single file. + From 1.29.92: + * Documentation improvements and fixes. + * Saner error handling in Windows serial driver. + * Cleanup in SMSD internals. + * Added ODBC driver to SMSD. + From 1.29.91: + * Added screenshot function for Sony-Ericssonn phones (Márton Németh). + * Fixed parsing of some Nokia SMSes (bug #1402). + * Properly report error on deleting non deletable entries (bug #1396). + * Slower switch from m-obex to AT (bug #1382). + * Faster initialization for AT phones without enabled echo. + From 1.29.90: + * Fix detection of MySQL libraries (bug #1370). + * Changed default connection settings to at and ttyACM0 (bug #1078). + * Add new API call to abort existing operation (bug #1155). + * Change database structure to avoid using reserved word Signal (bug #1380). + * Possibility to limit time of day for SMS in SMSD (bug #1203). + * Enforce limits on SMS payload length. + * Made GSM_SMSCounter public (bug #1356). + * Support for S60 phones using Series60 applet (bug #423). + * Do not fail on 0x7b field in Nokia 3600s phonebook (bug #1385). + * Disabled two stage probing for most protocols. + * Fixed saving of SMS backups (bug #1392). + * Screenshot functionality for DCT4 phones (bug #1390). +- Spec file updates: + * Remove some not needed conditionals for openSUSE BuildRequires:. + * Added unixODBC-devel in BuildRequires:. + * Better fix for rpmlint warning "file-contains-date-and-time". + * Fixed rpmlint warning "doc-file-dependency". + * Compile package with RPM_OPT_FLAGS. + * Fixed locales removal if suse version is not set. + * Minor other updates. +- Modified gammu-smsd.lsb.patch to fix also the "init-script-runlevel-4" + rpmlint warning. + +------------------------------------------------------------------- +Fri Mar 18 20:03:02 UTC 2011 - asterios.dramis@gmail.com + +- Spec file updates: + * Use UTC time/date for "Remove build time references" fix. + * Don't clean buildroot in %install section. + * Change permissions of gammu-smsd in %install section. + * Add rc-symlink for gammu-smsd. + * Fix for empty %postun check on non-SUSE distros. + * Minor other updates. + +------------------------------------------------------------------- +Fri Mar 11 20:13:17 UTC 2011 - asterios.dramis@gmail.com + +- Updated to 1.29.0: + * Lots of changes (see ChangeLog). +- Spec file updates: + * Changes based on rpmdevtools templates and spec-cleaner run. + * Lots of updates based on spec file from the package. Most important are: + + Added gammu-smsd package. + + Added libGammu7 package. + + Added libgsmsd7 package. + * Updates in Url: and Group:. + * Updates in Buildrequires:, Requires:, %build and %install sections. + * Removed support for openSUSE < 1110. + * Fixed rpmlint warning "file-contains-date-and-time". +- Added a patch to fix an rpmlint warning "unknown-lsb-keyword" for the init + script "gammu-smsd". + +------------------------------------------------------------------- +Mon Apr 12 06:24:03 UTC 2010 - prusnak@suse.cz + +- add python-pybluez to requires of python subpackage + +------------------------------------------------------------------- +Wed Aug 19 17:56:04 CEST 2009 - prusnak@suse.cz + +- disable testsuite for now (bug in memory allocation) + +------------------------------------------------------------------- +Fri Jul 10 16:47:37 CEST 2009 - prusnak@suse.cz + +- updated to 1.25.0 + * Retry on timeout of usb transfer (bug #940). + * Disable AT OBEX for Motorola PEBL U6 (bug #939). + * Disable AT OBEX for Samsung J700 (bug #948). + * Empty memory entry has length 0 (bug #947). + * Handle some more fields from Nokia phonebook (bug #946), thanks to Will Sowerbutts. + * Fix distutils build (bug #916). + * Detect when phone does not support ATE1 (bug #918). + * Do not use OBEX on Motorola L7 (bug #912). + * Reinclude full SMS text in comments in backup (bug #905). + * Disable AT OBEX for Samsung J750 and J700 (bug #856). + * Avoid shadowing C++ bool definition (bug #920). + * Do not disable CLIP for all SE phones. + * Add ID for Nokia 1209. + * Catch busy error from Nokia phones (bug #932, thanks to Walter Doekes). + * Fix code problems caught by GCC 4.5. + * Compile static libraries with -fPIC (they might be later linked + into shared ones) (bug #909). + * Handle own number error code in 6510 driver (bug #910). + * Add ID for Nokia 5220 (bug #910). + * Handle SMSC error code in 6510 driver (bug #910). + * Disable gcc warnings about non literal format strings (bug #901). + * Add more fuzzy logic to detect bad encoding from phone (bug #874). + * Add ID for Nokia 7500 and Nokia 7210s. + * Improve searching for Bluetooth stack on OS X. + * Fix ctype compile time warnings on NetBSD (bug #908). + * Nokia 3110c has SMS on filesystem (bug #904). + * Add ID for Nokia 5130 (bug #911). + * Faster reading of Nokia filesystem. + * New PDU decoder which properly parses PDU data. + * AT driver uses new PDU decoder. + * 6510 driver uses new PDU decoder and understands most formats of + filesystem Nokia SMS messages (bug #911). + * Fix checking for MPBR (bug #873). + * Fix reading of calls with wrong timestamp (bug #872). + * Increase timeout for IrDA phonet (bug #867). + * Better detect some weird phone states (bug #866). + * Fix handling of caller group in Python bindings (bug #870). + * Correctly detect empty entries from Motorola. + * Better error reporting from at-charset test. + * smsd-inject now shows ID of injected message. + * Fix decoding of date in Nokia phonebooks (bug #876). + * Fix detection of SMS message memories in AT (bug #875). + * Improve documentation for savefile (bug #893). + * Add stricter check for DBI version (bug #894). + +------------------------------------------------------------------- +Tue May 5 12:20:17 CEST 2009 - prusnak@suse.cz + +- updated to 1.24.0 + * Better detect Bluetooth ports on Samsung (bug #862). + * Ignore security errors on AT init (needed for Huawei). + * LUID reading requires IrMC profile. + * Locations for GlobeTrotter 3G+ start at 0 (bug #847). + * More verbose logging of delivery reports (bug #824). + * Increase default DeliveryReportDelay (bug #824). + * Fixed handling of SMS locations (bug #853). + * PostgreSQL backend now supports IDs for RunOnReceive. + * RunOnReceive is started through shell not directly. + * Fixed reading of empty phonebook entries from Samsung (bug #809). + * Reread messages if CMGL shows them corrupted (bug #691). + * Added support for vNote files. + * Properly detect Nokia 6220 Classic (bug #840). + * Fix writing of phonebook on Motorola V8 (bug #827). + * Detect daemon on FreeBSD. + * Ignore charset errors on AT init as some phones might need PIN. + * Optionally use MT for phone phonebook for AT phones. + * Added support for quick dial numbers on AT phones. + * Fixed decoding of Samsung memory entries. + * Properly handle corrupted messages from Nokia phones (bug #811). + * Fix parsing of calls from Alcatel C701 (bug #831). + * Fixed handling of error states with -len and -autolen parameters. + * Fixed possible crash in DBI engine. + * PostgreSQL engine properly uses sequences instead of reinventing. + * MySQL engine properly uses auto increments instead of reinventing. + * Fix escaping of field name in PostgreSQL engine. + * Better SMSD files logging. + * Added testing of SMSD files engine. + * Increase timeout for AT settings SIM card SMS storage. + * Fixed date formatting in PostgreSQL SMSD service. + * Add option to install without documentation. + * Add -textutf8 option for TEXT sms. + * Fix crash when some lines in config are too long. + * Make smsdrc example better looking by removing obsolete docs. + * Make dku2 connection types work on Linux (alias to fbususb). + * Better calculation of signal percent. + * Fixed getting of memory status for some Nokias (bug #836). + +------------------------------------------------------------------- +Wed Mar 18 15:49:34 CET 2009 - prusnak@suse.cz + +- updated to 1.23.1 + * Documentation clarification. + * Translations update. + * Actually install gammu-smsd-monitor. + * Fix recording received messages count for MySQL. + * Fix SMS location handling for Huawei E160 (bug #825). + * Do not probe for MPBR support all the time. +- new spec taken from home:Nijel (upstream) project + +------------------------------------------------------------------- +Mon Sep 15 17:10:36 CEST 2008 - dmueller@suse.de + +- adjust buildrequires + +------------------------------------------------------------------- +Tue Sep 9 18:27:51 CEST 2008 - prusnak@suse.cz + +- updated to 1.20.0 + * Do not crash on EMS messages with no text (bug #612). + * Fixed reading of OBEX files (bug #614). + * Fixed decoding of Nokia messages (bug #527). + +------------------------------------------------------------------- +Tue Mar 11 14:40:17 CET 2008 - prusnak@suse.cz + +- updated to 1.19.0 + * Add option to disable compiled in protection + * Fixed detection of PostgreSQL + * Improve debug messages when connecting to phone + * Fixed handling of some charsets in AT engine + * Identify more Nokia phones + * Fixed regression with DKU2 cables on Windows + * Better compatibility with iCalendar files + * Do not link with irprops.lib on Windows + * Various MSVC compilation fixes + * Improved AT model parsing and added tests + * Fixed possible crash in reading SMS from AT phones + * Proper fall back to automatic model when user enters wrong one + * Added identification of several phones + * Fixed reading of messages from AT phones without ME memory + * Improve charset detection on Motorola phones + +------------------------------------------------------------------- +Thu Jan 31 14:44:50 CET 2008 - prusnak@suse.cz + +- updated to 1.18.0 + * Fixed decoding of an empty SMS. + * Fixed some mistakes in API documentation. + * Fixed compilation under MS Visual C++ Express. + * Various small fixes if AT driver. + * Add simple shell script to generate JAD file from JAR. + * Added support for adding memory entries to 6510. + * Phone features now can be defined in configuration, so there is no + need to modify common/gsmphones.c for testing different settings. + * Config file loading behaves more consistent in lookup. In some + cases it can now find different configuration file. + * Fixed crash when there are too many messages (bug #466). + * Fixed crash when printing messages on Windows (bug #476). + * Do not ask phone for IMEI so often (bug #480). + * No need to set LD_LIBRARY_PATH for tests. + * Properly wait for SMSD child processes (bug #486). + +------------------------------------------------------------------- +Tue Jan 8 18:07:06 CET 2008 - prusnak@suse.cz + +- updated to 1.17.0 + * Fixed reading of messages from AT phones using CMGL + +------------------------------------------------------------------- +Tue Dec 18 12:06:48 CET 2007 - prusnak@suse.cz + +- updated to 1.16.0 + * Added identification of some Sony-Ericsson and Sharp phones. + * Increased maximal number of entries per contact. + * Fixed various compile time warnings. + * Improved MinGW crosscompilation. + * Localizations update. + * Fixed detection of first free memory location if memory is empty + (bug #434). + * Fixed mysql.h include path (bug #441). + * Fixed decoding of one char SMS (bug #442). + * Detect Nokia 3109c (thanks to David Meier). + * Automatically find MinGW compiler and allow overrides (bug #438). + * Fixed parsing of some memory entries (bug #450). + * Fixed decoding of some corner case SMS (bug #447). + * Phones capable of switching to OBEX mode from AT have it now + automatically enabled. Please report problems with this. + +------------------------------------------------------------------- +Tue Nov 20 15:22:08 CET 2007 - prusnak@suse.cz + +- updated to 1.15.0 + * Better parse vCard version 3 (bug #434). + * Configurable MySQL socket path. + * More extensive SMS PDU parser tests. + * Experimental support for OBEX in Siemens. + * Support for listing messages using CMGL (bug #408). + * Parse T630 reply on CPBR (bug #420). + * Fix buffer overflows in PDU decoder. + * Properly catch invalid PDU data received from phone. + * Handle more OBEX error codes. + * Handle vCards from Yahoo and Evolution (bug #424). + +------------------------------------------------------------------- +Thu Nov 8 10:55:59 CET 2007 - prusnak@suse.cz + +- update to 1.14.0 + * Fallback to empty model if user specifies wrong. + * Fixed wrong PDU encoding (bug #412). + * Provide API for cleaning SMS backup structure. + * Added testing of SMS PDU encoding. + * Fixes OBEX crash (Debian bug #446923). + * Correctly check various return values (bug #409). + * Fixed several bugs in vCard decoder. + * Removed UCS decoding heuristics, it can not work in all cases. + * Provide at least some basic information from dumb AT phones. + * SMSD now logs also error descriptions. + * SMSD can be configured not to check for security status. + * Correctly handle hard deletes on IrMC (bug #414). + * GSM_ReadConfig now returns GSM_Error instead of just bool. + * Many functions now use size_t for passing size values. + * Backups API now rather accepts format than guessing by filename. + * Increased soname due to API/ABI changes. + * Fixed crash in wrong config handling (Debian bug #446781). + * Initial support for Motorola SMS implementation (bug #408). + * Automatically fall back to AT commands when OBEX does not work. + * Initial support for IrMC index access. + * RunOnReceive is now also supported on Windows. + * Handle correctly case when memory is full (OBEX) (bug #404). + * Fixed handling of errors when saving SMS (bug #396). + * Fixed number type detection. + * Added support for Nokia 6070, thanks to Lúcio Corrêa. + * Added flag -nopower to connection to handle cables with different + handling of DTR/RTS signals. + * Fixed reading of empty calendar/todo/contacts/notes over OBEX + (thanks to Gianni Ceccarelli). + * Fixed overwriting of Java applications in Nokia phones (thanks to + Martin Thierer, bug 382). + * Fixed compilation with older PostgreSQL libraries. + * Handle correcly internal phone errors in OBEX module. + * Fixed crash on invalid config file (Debian bug #444046). + * Better report errors when using default configuration. + * Fix several buffer overflows in 6510 (thanks to Tobias Sunderdiek + for debugging this). + * Fixed crash on decoding messages with special numbering plans with + long numbers (bug 281). + * Command nokiaaddfile can now either keep or delete user data on + uploading new application (thanks to Martin Thierer, bug 385). + * Fixed parsing of date/time reply from some broken AT phones. + * Added support for Option GlobeTrotter. + * Handle correctly when phone automatically saves message to + different memory than we ask. + * Fixed buffer overflows, thanks to Gentoo folks for noticing. + * Detect when phone is waiting for phone code. + * Added experimental support for Bluetooth on FreeBSD. + * SMSD can execute programs on message receiving (thanks to zaf). + * Allow to define Bluetooth channel in configuration. + +------------------------------------------------------------------- +Tue Sep 25 12:20:16 CEST 2007 - prusnak@suse.cz + +- update to 1.13.0 + * Fixed several crashes of 6510 driver. + * Sony-Ericsson module renamed to AT + OBEX as it better describes + what it does. + * Initial support for Sharp GX Series phones. + * Added deliveryreportdelay parameter to SMSD to allow later + received delivery reports to be correctly detected. + * Fixed calculation of OBEX file names, could lead to crash on OBEX + upload (Debian bug #435875). + * Fixed time stamp receiving in SMSD. + * Huge gammu/gammu.c split to smaller files. + * Lot of fixes to allow compilation using MSVC + CMake. + * Support for push to talk ids (thanks to Pavel Kostromitinov). + * Fixed PPM parsing (thanks to Pavel Kostromitinov). + * Added simple bash completion script. + * Added some compile time testing. + * Improved vCard parsing. + * Fix wint_t and wchar_t detection. + * Introduced more generic parsing of AT replies, please report any + regressions with it! + * Improved support for Samsung phones. + * Support for reading network name from AT phones. + * Add deletememory command line. + * Experimental support for notes over OBEX. + * Man page is now partially autogenerated from online help. + * Elson compatibility, thanks to Bernd Feige. + * Fix UCS detection, thanks to Bernd Feige. + * Initial support for Motorola phones (bug #15 and #310). + * Avoid work on uninitialized buffer when checking firmware. + * Use HTTP/1.1 requests for getting firmware and version info. + * Improve charset handling for AT phones. + * Fix crash on broken CPMS response. + * Fix reading of memory not starting from 1 (thanks to drgerafe). + * Fix pressing of keys on phones who do not support IRA charset. + +------------------------------------------------------------------- +Mon Sep 3 17:26:20 CEST 2007 - schwab@suse.de + +- Work around broken cmake. + +------------------------------------------------------------------- +Tue Jun 19 10:26:58 CEST 2007 - prusnak@suse.cz + +- update to 1.12.0 + * Support for some new Nokia fields + * Made SMSD mode case insensitive + * Fix iCalendar export typo + * Better compatibility with Sharp phones + * Added --features to show compiled in features + * Added support for work address + * Properly report uploaded file size when using OBEX + * Fix HEX charset encoding + * Improve vCard address handling + * Support for iso charsets in AT phone when iconv is available + * Fix restoring of phonebook over OBEX + * addnew accepts -yes parameter + * There is no error on most fields when storing to vCard + * Fix detecting length of input + * Added dku5fbus-nodtr and fbus-nodtr variants, which do not care + about DTR/RTS signals + * Do not delete phonebook entries when there are none + +------------------------------------------------------------------- +Tue May 15 11:06:23 CEST 2007 - prusnak@suse.cz + +- update to 1.11.0 + * Correctly encode text in iCalendar + * Correctly encode recurrance in iCalendar + * Read last modified field from vCalendar + * Support for last modified field from vCard + * Properly handle vCard style continuation + * Improved gnapplet and support for it + * Add flag to SMS folders whether it is outbox + * Support for last modified field in vCalendar + * Use gettext for translation + * --clearall also attempts to delete calls + * Support for call notifications on AT phones + * Support for batch mode - you can script gammu + * Gammu commands are now accepted also without leading -- + * Detect more Nokia phones (5300, 6300, 8800) + * New connection ark3116fbus for use with ark3116 module + * Native OBEX connections (blueobex and irdaobex) should work also with unknown models + * RF searching now better detects OBEX channels + * Simplified searching of channels using Bluez stack + * Make USSD work with AT phones + * Fix setting date on Siemens MC75 + * Avoid corrupting vCard when some fields are empty + * Properly handle OBEX error codes + * Updated shell script gammu-config to generate configuration + * Install gammu-config script to ease generating configuration + * Use unsigned char to avoid trimming at 60 chars + * Detect Motorola specific error while reading SMSes + * Fix OBEX listing to behave according to specs + * Fix crash on invalid SMS reply from phone + * Fix USB serial devices with Linux kernel 2.6.21 + * Tell user that he should enter text for SMS + * Cleaned up transatable strings + * Improve networks listing + * Allow networks to be listed by country code + * Fix decoding of new style address records in Nokia phones + * Reorganised documentation a bit + * Use correct format strings for IrDA debug messages + * Identify Alcatel One Touch 55x + * Improve detection of OBEX support + * Work with AT phones which can not write SMS to ME + * Increse limits for SMS backups (this requires dynamic allocation) + * Detect Motorola Bluetooth port + * Fixup AT driver to work with Samsung SGH X160 + * Adjust vCalendar entries from SE phones on DST + * Fix updating of delivery report date in SMSD + * Fix crash when no config exists + * MakeTerminatedCall can be now called more times in batch mode + * Fixed crash on LMB export/import + * Correct version in iCalendar export/import + * Fixed devel files installation using CMake + * Fixed decoding of call date + * Fixed decoding of date from backup + * Backup saves and restores numbers as same type + * Use standard libc functions for string comparsion if available + * Allow compilation with MySQL and without PGSQL + * Fixed format strings for size_t + * Fixed encoding of name for Nokia phones + * Fixed connecting to PostgreSQL with empty password + * Fixed infinite loop in --monitor + * Fixed behaviour on Bluetooth disconnect + * Fixed handling of files with special chars on OBEX + * OBEX driver correctly detects models + * Fix format strnings for 64-bit architectures + * Cleanup documentation structure + * Moved locales out of documentation + * Fixes locales and documentaion install in CMake + * Fixed retrieving messages with some phones who index them from zero like CG79 + * Ignore error when there is too much members in group in phone + * Handle another error while reading 6510 phonebook + * Fix international number handling in vCard + +------------------------------------------------------------------- +Tue Feb 27 11:18:54 CET 2007 - prusnak@suse.cz + +- update to 1.10.0 + * added vCard and vCalendar support + * added basic Motorola support + * added support for location of alarm + * added support for sending file to phone + * improved battery reporting + * various bugfixes +- dropped obsoleted patches: + * gammu-uninitialized.diff (included in update) + +------------------------------------------------------------------- +Tue Nov 28 12:57:36 CET 2006 - prusnak@suse.cz + +- update to 1.09.00 + +------------------------------------------------------------------- +Tue Oct 17 01:56:26 CEST 2006 - ro@suse.de + +- update to 1.08.00 + * many bugfixes + +------------------------------------------------------------------- +Thu Jul 27 15:37:38 CEST 2006 - mjancar@suse.cz + +- update to 1.07.00 + * lots of fixes and enhancements + * reports work OK now (they were wrong after updating all 00000000000000 + to 0000-00-00 00:00:00 in DB) + * you can use " in outgoing sms too + * fix for multipart sms + * added new CreatorID entry in DB for outbox/sentsms + Series 40 3.0 (N6111 now) + * added: filesystem support, getting call lengths from call logs, + getting sent SMS log ("Message recipients" from "Log" in phone menu, + new memory SL in Gammu) + * checked: calendar, notes, todo (generally OK) + * SMS memory (decoding SMS files from filesystem) not supported yet + + * see also /usr/share/doc/packages/gammu/changelog for details + +------------------------------------------------------------------- +Wed Jan 25 21:36:05 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Jan 23 17:34:10 CET 2006 - mjancar@suse.cz + +- really fix use of uninitialized variable (#144165) + +------------------------------------------------------------------- +Fri Jan 20 17:08:06 CET 2006 - mjancar@suse.cz + +- fix use of uninitialized variable (#144165) + +------------------------------------------------------------------- +Thu Jan 12 19:28:04 CET 2006 - mjancar@suse.cz + +- update to 1.04.0 + +------------------------------------------------------------------- +Thu Jul 28 18:43:02 CEST 2005 - anicka@suse.cz + +- update to 1.02.0 + +------------------------------------------------------------------- +Wed May 25 13:52:31 CEST 2005 - mcihar@suse.cz + +- update to 1.01.11 + +------------------------------------------------------------------- +Wed Apr 13 19:04:56 CEST 2005 - mcihar@suse.cz + +- update to 1.01.0, patch merged upstream + +------------------------------------------------------------------- +Mon Apr 4 16:47:39 CEST 2005 - mcihar@suse.cz + +- fix compilation with GCC 4 +- fix documenation installation + +------------------------------------------------------------------- +Fri Apr 1 15:40:32 CEST 2005 - mcihar@suse.cz + +- update to 1.00.23 + +------------------------------------------------------------------- +Mon Feb 14 17:53:20 CET 2005 - mcihar@suse.cz + +- update 1.00.04 +- 64-bit fixes merged upstream + +------------------------------------------------------------------- +Wed Feb 9 14:40:15 CET 2005 - mcihar@suse.cz + +- update to 1.00.0 +- fix crashes on 64-bit platforms + +------------------------------------------------------------------- +Mon Jan 24 11:47:34 CET 2005 - mcihar@suse.cz + +- update to 0.99.22 + +------------------------------------------------------------------- +Fri Sep 03 17:34:18 CEST 2004 - mcihar@suse.cz + +- update to 0.97.7 + +------------------------------------------------------------------- +Wed May 19 15:36:17 CEST 2004 - mcihar@suse.cz + +- update to 0.95.0 + +------------------------------------------------------------------- +Fri Mar 05 11:03:07 CET 2004 - mcihar@suse.cz + +- update to 0.94.0 + +------------------------------------------------------------------- +Fri Feb 20 09:14:21 CET 2004 - mcihar@suse.cz + +- update to 0.93.0 + +------------------------------------------------------------------- +Fri Jan 23 12:49:59 CET 2004 - mcihar@suse.cz + +- update to 0.92.9 +- fixed file conflict + +------------------------------------------------------------------- +Mon Jan 05 11:47:43 CET 2004 - mcihar@suse.cz + +- update to 0.92.0 +- run ldconfig + +------------------------------------------------------------------- +Tue Dec 16 14:12:00 CET 2003 - mcihar@suse.cz + +- update to 0.90.0 + +------------------------------------------------------------------- +Mon Nov 03 12:21:23 CET 2003 - mcihar@suse.cz + +- updated to 0.88 +- installing script for queuing smses + +------------------------------------------------------------------- +Fri Oct 24 16:09:58 CEST 2003 - mcihar@suse.cz + +- pkgconfig files are in %_libdir + +------------------------------------------------------------------- +Tue Oct 21 19:25:17 CEST 2003 - mcihar@suse.cz + +- updated to 0.87 +- no root for build +- branched devel package + +------------------------------------------------------------------- +Wed Aug 06 12:31:44 CEST 2003 - mcihar@suse.cz + +- updated to 0.81 + +------------------------------------------------------------------- +Mon Jun 23 16:38:02 CEST 2003 - mcihar@suse.cz + +- updated to 0.78 + +------------------------------------------------------------------- +Wed May 28 16:16:07 CEST 2003 - mcihar@suse.cz + +- updated to 0.76: + Adding files to DCT4 phones has been implemented. This feature + includes uploading files to Gallery, uploading Java application + and Java games and other. Setting the color operator and color + startup logos in DCT4 has been added. More options in Alcatel + source have been added. Some other compatibility fixes have been + made. Full support for MMS settings in DCT4 has been added, full + support for MMS indicator SMS has been added, and many small + corrections have been made. + +------------------------------------------------------------------- +Tue May 13 12:08:44 CEST 2003 - mcihar@suse.cz + +- fixed file list + +------------------------------------------------------------------- +Mon May 12 12:09:11 CEST 2003 - mcihar@suse.cz + +- updated to 0.74: + * getting files from filesystem in DCT4 phones (--getfiles) + * added 3650, 7250 ID + * FULL support for Bluetooth + * can make backup and restore using new Unicode format of backup files. + No more duplicated (once in ASCII and once in coded Unicode) strings in + backup files with this format and no problems with national chars. + +------------------------------------------------------------------- +Tue Apr 29 13:35:52 CEST 2003 - mcihar@suse.cz + +- updated to 0.73 (all my patches accepted): + * more support for EMS +- included configuration script +- included wxBasic GUI (however we don't distribute wxBasic) + +------------------------------------------------------------------- +Thu Apr 24 12:55:03 CEST 2003 - mcihar@suse.cz + +- fix Makefile to not include whole source in docs +- better fix for bluetooth +- fix configure to accept CFLAGS + +------------------------------------------------------------------- +Wed Apr 23 13:31:01 CEST 2003 - mcihar@suse.cz + +- updated to 0.72 + * better information for AT phones + * improved localisation support + * better statistics about phonebook for AT + * improved FM stations support + * polyphonic ringtones support + * added Alcatel BF5 (One Touch 715) support + * support for internal filesystem in Nokia phones + * supported work with bitmaps on Siemens + ... and many more :) +- built with bluetooth support + +------------------------------------------------------------------- +Mon Feb 10 12:40:08 CET 2003 - mcihar@suse.cz + +- added -fPIC to CFLAGS + +------------------------------------------------------------------- +Fri Feb 07 18:26:16 CET 2003 - mcihar@suse.cz + +- initial version + diff --git a/gammu.spec b/gammu.spec new file mode 100644 index 0000000..945d287 --- /dev/null +++ b/gammu.spec @@ -0,0 +1,309 @@ +# +# spec file for package gammu +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define so_ver 8 +%define gammu_docdir %{_docdir}/%{name} +Name: gammu +Version: 1.42.0 +Release: 0 +Summary: Mobile phone management utility +License: GPL-2.0-only +Group: Productivity/Telephony/Utilities +URL: https://wammu.eu/gammu/ +Source0: https://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.xz +# PATCH-FIX-OPENSUSE gammu-remove-gplv3-files.patch idoenmez@suse.de -- Remove GPLv3 files bnc#775397 +Patch1: gammu-remove-gplv3-files.patch +Patch2: 0001-Enable-fPIE-pie.patch +Patch3: 0001-Update-Python-scripts-to-Python-3.patch +Patch4: 0001-Docs-Adjust-attributes-order-to-avoid-bugs-in-breath.patch +Patch5: harden_gammu-smsd.service.patch +Patch6: 0001-Fix-buffer-overflow-in-Backup.Creator.patch +Patch7: 0002-disable-test_sql_time.patch +BuildRequires: cmake >= 2.8 +BuildRequires: doxygen +BuildRequires: gettext +BuildRequires: gnu-free-fonts +BuildRequires: graphviz +BuildRequires: graphviz-gd +BuildRequires: mysql-devel +BuildRequires: pkgconfig +BuildRequires: postgresql-devel +BuildRequires: python3-Sphinx +BuildRequires: python3-breathe +BuildRequires: pkgconfig(bluez) >= 2.0 +BuildRequires: pkgconfig(glib-2.0) >= 2.16 +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gudev-1.0) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(odbc) +BuildRequires: pkgconfig(systemd) +Recommends: bluez +Requires: dialog +Recommends: gammu-doc + +%description +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains Gammu binary as well as some examples. + +%package devel +Summary: Development files for Gammu +Group: Development/Libraries/C and C++ +Requires: libGammu%{so_ver} = %{version} +Requires: libgsmsd%{so_ver} = %{version} +Requires: pkgconfig + +%description devel +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contain files needed for development. + +%package doc +Summary: Documentation of Gammu +Group: Documentation/HTML +BuildArch: noarch + +%package bash-completion +Summary: Bash completion for gammu +Group: System/Shells +BuildRequires: bash-completion +Requires: bash-completion +Requires: gammu +Supplements: packageand(%{name}:bash-completion) + +%description bash-completion +This package contains the bash completion command for gammu. + +%description doc +This package contains the manual for gammu. + +%package smsd +Summary: SMS message daemon +Group: Hardware/Mobile + +%description smsd +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains the Gammu SMS Daemon and tool to inject messages +into the queue. + +%package -n libGammu%{so_ver} +Summary: Mobile phone management library +Group: System/Libraries + +%description -n libGammu%{so_ver} +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains the Gammu shared library. + +%package -n libgsmsd%{so_ver} +Summary: SMS daemon helper library +Group: System/Libraries + +%description -n libgsmsd%{so_ver} +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains the Gammu SMS daemon shared library. + +%prep +%autosetup -p1 + +# GPL-3.0 licensed files, bnc#775397 +rm -rf contrib/sms-gammu2android +rm -rf contrib/smscgi +rm -rf helper/win32-* + +%build +%cmake \ + -DBUILD_SHARED_LIBS=ON \ + -DINSTALL_DOC_DIR=%{gammu_docdir} \ + -DBASH_COMPLETION_COMPLETIONSDIR=%{_datadir}/bash-completion/completions/ \ + -DINSTALL_LSB_INIT=OFF \ + -DINSTALL_UDEV_RULES=OFF +%make_jobs +make %{?_smp_mflags} manual-html + +%check +# cannot use %%ctest since running the tests in parallel is broken +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}/%{_libdir} +cd build +ctest -V + +%install +%cmake_install + +# Install config file +install -D -pm 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc + +# Install additional doc files +install -pm 0644 README.rst %{buildroot}%{gammu_docdir}/ +cp -a contrib/udev/ %{buildroot}%{gammu_docdir}/ + +# Install the html manual +rm -rf %{buildroot}%{gammu_docdir}/manual/ +rm -rf build/docs/manual/html/{.doctrees/,.buildinfo,_sources/} +cp -a build/docs/manual/html/ %{buildroot}%{gammu_docdir}/manual + +install -d "%{buildroot}/%{_sbindir}" +ln -s service "%{buildroot}/%{_sbindir}/rcgammu-smsd" + +%find_lang %{name} +%find_lang libgammu + +%post -n libGammu%{so_ver} -p /sbin/ldconfig +%postun -n libGammu%{so_ver} -p /sbin/ldconfig +%post -n libgsmsd%{so_ver} -p /sbin/ldconfig +%postun -n libgsmsd%{so_ver} -p /sbin/ldconfig + +%if 0%{?suse_version} >= 1330 +%pre smsd +%service_add_pre gammu-smsd.service + +%preun smsd +%service_del_preun gammu-smsd.service + +%post smsd +%service_add_post gammu-smsd.service + +%postun smsd +%service_del_postun gammu-smsd.service +%endif + +%files -f %{name}.lang +%{_bindir}/gammu +%{_bindir}/gammu-config +%{_bindir}/gammu-detect +%{_bindir}/jadmaker +%doc %{gammu_docdir} +%exclude %{gammu_docdir}/manual/ +%{_datadir}/gammu/ +%{_mandir}/man1/gammu-config.1%{?ext_man} +%{_mandir}/man1/gammu-detect.1%{?ext_man} +%{_mandir}/man1/gammu.1%{?ext_man} +%{_mandir}/man1/jadmaker.1%{?ext_man} +%{_mandir}/man5/gammu-backup.5%{?ext_man} +%{_mandir}/man5/gammu-smsbackup.5%{?ext_man} +%{_mandir}/man5/gammurc.5%{?ext_man} + +%files bash-completion +%{_datadir}/bash-completion/completions/gammu + +%files devel +%{_includedir}/gammu/ +%{_libdir}/libGammu.so +%{_libdir}/libgsmsd.so +%{_libdir}/pkgconfig/gammu-smsd.pc +%{_libdir}/pkgconfig/gammu.pc + +%files doc +%doc %{gammu_docdir}/manual/ + +%files smsd +%config %{_sysconfdir}/gammu-smsdrc +%{_bindir}/gammu-smsd +%{_bindir}/gammu-smsd-inject +%{_bindir}/gammu-smsd-monitor +%{_sbindir}/rcgammu-smsd +%{_unitdir}/gammu-smsd.service +%{_mandir}/man1/gammu-smsd-inject.1%{?ext_man} +%{_mandir}/man1/gammu-smsd-monitor.1%{?ext_man} +%{_mandir}/man1/gammu-smsd.1%{?ext_man} +%{_mandir}/man5/gammu-smsdrc.5%{?ext_man} +%{_mandir}/man7/gammu-smsd-dbi.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-files.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-mysql.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-null.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-odbc.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-pgsql.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-run.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-sql.7%{?ext_man} +%{_mandir}/man7/gammu-smsd-tables.7%{?ext_man} + +%files -n libGammu%{so_ver} -f libgammu.lang +%{_libdir}/libGammu.so.%{so_ver}* + +%files -n libgsmsd%{so_ver} +%{_libdir}/libgsmsd.so.%{so_ver}* + +%changelog diff --git a/harden_gammu-smsd.service.patch b/harden_gammu-smsd.service.patch new file mode 100644 index 0000000..86ee1a9 --- /dev/null +++ b/harden_gammu-smsd.service.patch @@ -0,0 +1,21 @@ +Index: gammu-1.42.0/contrib/init/gammu-smsd.service +=================================================================== +--- gammu-1.42.0.orig/contrib/init/gammu-smsd.service ++++ gammu-1.42.0/contrib/init/gammu-smsd.service +@@ -4,6 +4,16 @@ Documentation=man:gammu-smsd(1) + After=mysql.service postgresql.service network-online.target + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHostname=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + EnvironmentFile=-/etc/sysconfig/gammu-smsd + # Run daemon as root user + ExecStart=${CMAKE_INSTALL_FULL_BINDIR}/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon