diff --git a/Fix-glib-hash_table-is-not-NULL-assert.patch b/Fix-glib-hash_table-is-not-NULL-assert.patch new file mode 100644 index 0000000000000000000000000000000000000000..6314d7973021c4c433e598ff14c8aac64a71bdb6 --- /dev/null +++ b/Fix-glib-hash_table-is-not-NULL-assert.patch @@ -0,0 +1,35 @@ +From c642d0efb5606101b8ea0d30b95cb1b47af05e1d Mon Sep 17 00:00:00 2001 +From: bizhiyuan +Date: Tue, 17 Oct 2023 17:31:21 +0800 +Subject: [PATCH] Fix glib hash_table is not NULL assert + +--- + src/attr.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/attr.c b/src/attr.c +index 09c15bc..5f057ae 100644 +--- a/src/attr.c ++++ b/src/attr.c +@@ -357,6 +357,8 @@ static cmd_result_t attr_get(struct ticket_config *tk, int fd, struct boothc_att + * lookup attr + * send value + */ ++ if (!tk->attr) ++ return RLT_NO_SUCH_ATTR; + + a = (struct geo_attr *)g_hash_table_lookup(tk->attr, msg->attr.name); + if (!a) +@@ -392,6 +394,9 @@ static cmd_result_t attr_list(struct ticket_config *tk, int fd, struct boothc_at + return RLT_SYNC_FAIL; + } + g_hash_table_foreach(tk->attr, append_attr, data); ++ if (tk->attr) { ++ g_hash_table_foreach(tk->attr, append_attr, data); ++ } + + init_header(&hdr.header, ATTR_LIST, 0, 0, RLT_SUCCESS, 0, + sizeof(hdr) + data->len); +-- +2.27.0 + diff --git a/booth.spec b/booth.spec index dc2ea070fd5e1380f3d9258088da488106ba67f6..eecabf1032b0a8816da5ac5a78cf2151f81e23f3 100644 --- a/booth.spec +++ b/booth.spec @@ -10,7 +10,7 @@ %global git_describe_str v1.0-283-g9d4029aa14323a7f3b496215d25e40bd14f33632 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 8 +%global release 9 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -38,6 +38,8 @@ License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz +Patch0: Fix-glib-hash_table-is-not-NULL-assert.patch + # direct build process dependencies BuildRequires: autoconf BuildRequires: automake @@ -264,6 +266,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Oct 17 2023 bizhiyuan - 1.0-9 +- Fix glib hash table is not NULL assert + * Fri Mar 17 2023 jiangxinyu - 1.0-8 - Modify folder permissions