RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1987097 - [RFE] Backport the G_SOURCE_FUNC macro from glib 2.58
Summary: [RFE] Backport the G_SOURCE_FUNC macro from glib 2.58
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glib2
Version: 8.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: Michael Catanzaro
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-28 21:11 UTC by Andrew Mike
Modified: 2021-08-24 13:46 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-17 14:12:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME glib merge_requests 82 0 None None None 2021-07-28 22:27:21 UTC
Red Hat Knowledge Base (Solution) 6266391 0 None None None 2021-08-17 15:08:01 UTC

Description Andrew Mike 2021-07-28 21:11:58 UTC
1. Proposed title of this feature request  
Backport the G_SOURCE_FUNC macro from glib 2.58
  
3. What is the nature and description of the request?  
Customer would like the G_SOURCE_FUNC macro from glib 2.58 backported or glib2 rebased.  

4. Why does the customer need this? (List the business requirements here)
Customer's software takes advantage of this macro.
  
5. How would the customer like to achieve this? (List the functional requirements here)  
The G_SOURCE_FUNC macro, as defined in glib 2.58, should be present in the glib2 library.
  
6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  
We can test presence with something like #ifdef G_SOURCE_FUNC, and then the macro's output would need to be validated. Stealing unit tests from glib 2.58, if available, may be workable here.
  
7. Is there already an existing RFE upstream or in Red Hat Bugzilla?  
None existing.
  
8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  
Ideal timeframe for customer would be RHEL 8.5.
  
9. Is the sales team involved in this request and do they have any additional input?
Sales is not involved.
  
10. List any affected packages or components.  
glib2 

11. Would the customer be able to assist in testing this functionality if implemented?

Yes.

Comment 3 Michael Catanzaro 2021-07-28 22:27:25 UTC
So this request is pretty easy to fulfill, although like any engineering request it requires developer and QA time, and there's not enough of that remaining for 8.5, so it would need to be for 8.6 if we were to accept it. That said, it's an odd request because this macro does basically nothing. It's only used to suppress -Wcast-function-type warnings. So the usual solutions would be to just not use it. E.g.:

-    item->update_properties_timeout = g_timeout_add (10, G_SOURCE_FUNC (update_all_properties), item);
+    item->update_properties_timeout = g_timeout_add (10, update_all_properties, item);

The worst that could happen is a -Wcast-function-type warning. If you want to avoid that warning, you could simply build with -Wno-cast-function-type. Or you could do the cast manually:

-    item->update_properties_timeout = g_timeout_add (10, G_SOURCE_FUNC (update_all_properties), item);
+    item->update_properties_timeout = g_timeout_add (10, ((GSourceFunc) (void (*)(void))update_all_properties, item);

Although I haven't tested it, I suspect a much simpler cast would work just fine:

-    item->update_properties_timeout = g_timeout_add (10, G_SOURCE_FUNC (update_all_properties), item);
+    item->update_properties_timeout = g_timeout_add (10, ((GSourceFunc)(gpointer)update_all_properties, item);

Or you could define it in your code:

#ifndef G_SOURCE_FUNC
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
#endif

All of these workarounds are extremely easy, so I'm hesitant to ack this one.

Comment 4 Michael Catanzaro 2021-08-17 14:12:38 UTC
I'm going to nak this one for RHEL 8. The new API will be available in RHEL 9 though.

Comment 5 RHEL Program Management 2021-08-17 14:12:47 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.