Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2225532

Summary: 389-ds-base FTBFS with rust-1.71.0
Product: Red Hat Enterprise Linux 9 Reporter: Tuomo Soini <tis>
Component: 389-ds-baseAssignee: Simon Pichugin <spichugi>
Status: CLOSED ERRATA QA Contact: LDAP QA Team <idm-ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bsmejkal, bstinson, idm-ds-dev-bugs, jwboyer, mreynolds, spichugi, vashirov
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-2.3.6-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:25:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Work-around for rust-1.71.0 compiler issue
none
Remove unused mut which rust-1.71.0 does not tolerate none

Description Tuomo Soini 2023-07-25 13:36:50 UTC
Description of problem:

rust was updated to 1.71.0 on centos stream 9 causing FTBFS issues with 389-ds-base-2.3.4-3.el9

Issue #1:

error: using `.borrow()` on a double reference, which returns `&concread::cowcell::CowCellReadTxn<CacheStats>` instead of borrowing the inner type
  --> librslapd/src/cache.rs:60:28
   |
60 |     let stats = stat_rguard.borrow();
   |                            ^^^^^^^^^
   |
note: the lint level is defined here
  --> librslapd/src/lib.rs:1:9
   |
1  | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(suspicious_double_ref_op)]` implied by `#[deny(warnings)]`
error: could not compile `librslapd` (lib) due to previous error

This is also reported as bug#2225471

Issue #2:

error: variable does not need to be mutable
   --> slapi_r_plugin/src/value.rs:185:13
    |
185 |         let mut v = unsafe { slapi_value_new() };
    |             ----^
    |             |
    |             help: remove this `mut`
    |
note: the lint level is defined here
   --> slapi_r_plugin/src/lib.rs:1:9
    |
1   | #![deny(warnings)]
    |         ^^^^^^^^
    = note: `#[deny(unused_mut)]` implied by `#[deny(warnings)]`
error: could not compile `slapi_r_plugin` (lib) due to previous error

mut is obviously wrong here

Attaching work-around for issue #1 and fix for #2.

Comment 1 Tuomo Soini 2023-07-25 13:39:06 UTC
Created attachment 1977476 [details]
Work-around for rust-1.71.0 compiler issue

Comment 2 Tuomo Soini 2023-07-25 13:40:05 UTC
Created attachment 1977489 [details]
Remove unused mut which rust-1.71.0 does not tolerate

Comment 3 Viktor Ashirov 2023-07-25 13:50:13 UTC
Thank you for reporting this issue. I opened an upstream ticket for this: https://github.com/389ds/389-ds-base/issues/5861
Would you be okay to submit a PR upstream with your fixes?

Thanks!

Comment 4 Tuomo Soini 2023-07-25 14:45:37 UTC
Looks like these were both fixed upstream.

Comment 5 Viktor Ashirov 2023-08-14 15:42:12 UTC
Build 389-ds-base-2.3.6-2.el9 was successful with rust-1.71. Marking as Verified:Tested.

Comment 9 bsmejkal 2023-08-17 08:29:30 UTC
As per comment #c5 marking as VERIFIED.

Comment 11 errata-xmlrpc 2023-11-07 08:25:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (389-ds-base bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6350