Bug 56533 - Adjust Univention Directory Listener to run with Python 3.9 / 3.11
Summary: Adjust Univention Directory Listener to run with Python 3.9 / 3.11
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.1
Assignee: Florian Best
QA Contact: Iván.Delgado
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 13:42 CEST by Florian Best
Modified: 2025-02-05 15:08 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2023-09-05 13:42:50 CEST
The Univention Directory Listener should be adjuste to run with Python 3.9 in UCS 5.1 and Python 3.11 in UCS 5.2.
Comment 1 Florian Best univentionstaff 2023-09-05 13:46:21 CEST
Additional to prevent a FTBFS-error is the following patch:


    UDL: don't compare with address
    
    cache_entry.c: In function '_cache_entry_add_new_attribute':
    cache_entry.c:522:13: error: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL [-Werror=address]
      522 |         if (!&attr->name) {
          |             ^
    In file included from cache_entry.c:46:
    cache_entry.h:53:15: note: 'name' declared here
       53 |         char *name;
          |               ^~~~
    cc1: all warnings being treated as errors

diff --git management/univention-directory-listener/src/cache_entry.c management/univention-directory-listener/src/cache_entry.c
index 8842f14e0f..fa4ce9983c 100644
--- management/univention-directory-listener/src/cache_entry.c
+++ management/univention-directory-listener/src/cache_entry.c
@@ -519,7 +519,7 @@ static CacheEntryAttribute *_cache_entry_add_new_attribute(CacheEntry *entry, LD
        entry->attributes = tmp;
 
        BER2STR(&ava->la_attr, &attr->name);
-       if (!&attr->name) {
+       if (!attr->name) {
                univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "%s:%d BER2STR() failed", __FILE__, __LINE__);
                goto error;
        }
Comment 3 Iván.Delgado univentionstaff 2023-10-09 13:35:54 CEST
OK: Code review

OK UCS5.1: lsof -l python3.7 -> 0 process
OK UCS5.1: lsof -l python2.7 -> 0 process
OK UCS5.1: lsof -l python3.9 -> contain univention-directory-listener

OK UCS5.2: lsof -l python3.9 -> 0 process
OK UCS5.2: lsof -l python3.11 -> contain univention-directory-listener
Comment 4 Florian Best univentionstaff 2024-03-08 10:42:38 CET
univention-directory-listener (16.0.1)
7911aa96b764 | churn(UDL): remove override_dh_strip
50b0d277c3b4 | fix(UDL): Migrate univention-directory-listener to Python 3.11

univention-directory-listener (15.0.4)
1d279318b4ae | fix(UDL): fix listener segfault for modules using new listener API
249db5fb32a1 | fix(UDL): fix comparsion with pointer value intead of memory address
b0c2e2cf4aab | fix(UDL): Migrate univention-directory-listener to Python 3.9