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 1409527 - sd_journal_has_{runtime,persistent}_files APIs are not usable by applications
Summary: sd_journal_has_{runtime,persistent}_files APIs are not usable by applications
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michal Sekletar
QA Contact: Branislav Blaškovič
URL:
Whiteboard:
Depends On:
Blocks: 1088021 74systemd
TreeView+ depends on / blocked
 
Reported: 2017-01-02 12:17 UTC by Michal Sekletar
Modified: 2021-03-11 14:53 UTC (History)
3 users (show)

Fixed In Version: systemd-219-31.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:12:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2297 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2017-08-01 12:40:16 UTC

Description Michal Sekletar 2017-01-02 12:17:47 UTC
Description of problem:
In commit https://github.com/lnykryn/systemd-rhel/commit/5ec508cc5c13d831c93ce98d84b1d9cedb0117a7 we have added two new APIs. These APIs are now used internally from journalctl. Despite being marked as _public_, we do not export them because they've never been added to respective .sym file. There are applications that would like to make use of them, e.g. rsyslog's imjournal module.

Version-Release number of selected component (if applicable):
systemd-219-30.el7_3.6

How reproducible:
always

Steps to Reproduce:
1. yum install -y systemd-devel
2. cat > /tmp/sd-journal-has-persistent-files.c << EOF
#include <stdio.h>
#include <systemd/sd-journal.h>

int main() {
        int r;
        sd_journal *j;
        
        sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
        
        r = sd_journal_has_persistent_files(j);
        
        sd_journal_close(j);
        
        return r;
}
EOF
3. gcc /tmp/sd-journal-has-persistent-files.c -lsystemd
4. ./a.out
5. echo $?

Actual results:
Compilation (step 3) returns following error,
/tmp/cco975MF.o: In function `main':
sd-journal-has-persistent.c:(.text+0x21): undefined reference to `sd_journal_has_persistent_files'
collect2: error: ld returned 1 exit status

Expected results:
Compilation and execution are successful

Additional info:
We need to backport https://github.com/systemd/systemd/commit/9a07f779bbeacc3358d405f6cf583506aaf655ae or came up with similar patch due to different versioning between upstream and RHEL7.

Comment 1 Michal Sekletar 2017-01-05 08:35:59 UTC
https://github.com/lnykryn/systemd-rhel/pull/75

Comment 2 Lukáš Nykrýn 2017-01-12 09:54:59 UTC
fix merged to upstream staging branch ->
https://github.com/lnykryn/systemd-rhel/commit/0bf93125d4833bcdb7d187543581e4a6c14de159
-> post

Comment 5 errata-xmlrpc 2017-08-01 09:12:22 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, 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-2017:2297


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