Bug 48683

Summary: append -o ldif-wrap=no in univention-ldapsearch
Product: UCS Reporter: Michael Grandjean <grandjean>
Component: LDAPAssignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Arvid Requate <requate>
Severity: normal    
Priority: P5 CC: best, gohmann, grandjean, requate
Version: UCS 4.4   
Target Milestone: UCS 4.4-0-errata   
Hardware: Other   
OS: Linux   
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):
Max CVSS v3 score:
Bug Depends on: 41677    
Bug Blocks:    

Description Michael Grandjean univentionstaff 2019-02-14 16:05:15 CET
Imho this would be really handy. Would replace a lot of bash aliases on test and customer systems.

+++ This bug was initially created as a clone of Bug #41677 +++

It would be very nice if univention-ldapsearch would also append the arguments "-LLLo ldif-wrap=no" to ldapsearch.
Comment 1 Florian Best univentionstaff 2019-03-13 14:19:20 CET
*** Bug 41677 has been marked as a duplicate of this bug. ***
Comment 2 Florian Best univentionstaff 2019-03-13 14:19:54 CET
Arvid suggested to also add: -E pr=1000/noprompt
Comment 3 Florian Best univentionstaff 2019-03-13 15:05:38 CET
(In reply to Florian Best from comment #2)
> Arvid suggested to also add: -E pr=1000/noprompt
This would be an API change, we cannot do this I think.

Just adjusting univetion-ldapsearch by appending the options would work and wouldn't break existing aliases.
univention-ldapsearch -LLLo ldif-wrap=no -LLLo ldif-wrap=no
Comment 4 Florian Best univentionstaff 2019-03-14 11:48:29 CET
Patch has been applied.
"-E pr=1000/noprompt"  has been left out because giving it twice yields errors.

I think there is no need for our python script "| ldapsearch-wrapper" anymore, which could increase performance.

univention-config-registry (14.0.0-2)
97d97d90ffed | Bug #48683: Add -LLLo ldif-wrap=no to univention-ldapsearch

univention-config-registry.yaml
97d97d90ffed | Bug #48683: Add -LLLo ldif-wrap=no to univention-ldapsearch
Comment 5 Arvid Requate univentionstaff 2019-03-14 15:45:27 CET
Verified:
* Code
* Function
* Backwards-Compatibility:
  I can still do
  univention-ldapsearch -o ldif-wrap=80

I don't know if we really want -LLL, though. I cannot disable that once it's passed by default. So I cannot see any longer:

==========================================
# search result
search: 3
result: 0 Success

# numResponses: 380
# numEntries: 379
==========================================
Comment 6 Florian Best univentionstaff 2019-03-14 16:12:55 CET
Okay, if you want to see the number of entries, I will revert the -LLL and just keep the -o ldif-wrap=no.

Therefore we cannot remove "| ldapsearch-wrapper".

univention-config-registry (14.0.0-3)
c5dca007f8b7 | Bug #48683: univention-ldapsearch makes -o ldif-wrap=no by default now
Comment 7 Arvid Requate univentionstaff 2019-03-14 16:38:19 CET
Ok.

> Therefore we cannot remove "| ldapsearch-wrapper".

As discussed, ldapsearch-wrapper doesn't do anything with comments, so we may get rid of it if we want to. But I would keep it, because it's useful for univention-s4search.
Comment 8 Arvid Requate univentionstaff 2019-03-20 12:29:27 CET
<http://errata.software-univention.de/ucs/4.4/6.html>