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 1776399 - modifyrepo no longer works with modules.yaml as a symbolic link
Summary: modifyrepo no longer works with modules.yaml as a symbolic link
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: createrepo_c
Version: 8.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-25 15:43 UTC by Paul Dwyer
Modified: 2023-09-07 21:06 UTC (History)
3 users (show)

Fixed In Version: createrepo_c-0.15.1-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:39:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1620 0 None None None 2020-04-28 15:39:41 UTC

Description Paul Dwyer 2019-11-25 15:43:46 UTC
Description of problem:
modifyrepo no longer works with modules.yaml as a symbolic link

Version-Release number of selected component (if applicable):
createrepo_c-0.11.0-3.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. Create symlink for modules.yaml that points to modules.yaml file in different directory
2. run "modifyrepo ./updateinfo.xml ./repodata"


Actual results:
# modifyrepo ./modules.yaml ./repodata
Cannot open ./modules.yaml: No such file or directory

Expected results:
modifyrepo to open modules.yaml file and not to try and detect compression type on the symlink

Additional info:
This used to work on createrepo_c-0.11.0-1
Looks like this changed with patch to fix bz 1639287

Running the modifyrepo command with verbose option

10:16:17: Version: 0.11.0 (Features: DeltaRPM LegacyWeakdeps )
10:16:17: Preparing task for: ./modules.yaml
10:16:17: Task: [path: ./modules.yaml, type: (null), remove: 0, compress: 1, compress_type: 1 ((null)), unique_md_filenames: 1, checksum_type: 0 (Unknown checksum), new_name: (null)]
10:16:17: cr_modifyrepo: Use derived type "modules" (modules)
10:16:17: cr_detect_compression: Detected mime type: inode/symlink; charset=binary (./modules.yaml)
10:16:17: cr_modifyrepo: Copy & compress operation ./modules.yaml -> ./temprepo/modules.yaml.gz
10:16:17: cr_detect_compression: Detected mime type: inode/symlink; charset=binary (./modules.yaml)
10:16:17: cr_sopen: Cannot detect compression type
10:16:17: cr_compress_file_with_stat: Cannot open source file ./modules.yaml (No such file or directory)
10:16:17: cr_modifyrepo: Copy & compress operation failed
Cannot open ./modules.yaml: No such file or directory

Fails to detect compression type, checking through the code patch for bz 1639287 changes fopen for a cr_open function where compression detection takes place.

Change in misc.c to a cr_open function instead of fopen on the file (which would work correctly with a symlink)

0002-modifyrepo_c-Prevent-doubling-of-compression-testgzgz-RhBug1639287.patch

diff --git a/src/misc.c b/src/misc.c
index 9937480..c5ccd12 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -437,7 +437,7 @@ cr_compress_file_with_stat(const char *src,
...
-    orig = fopen(src, "rb");
+    orig = cr_open(src, CR_CW_MODE_READ, CR_CW_AUTO_DETECT_COMPRESSION, &tmp_err);

Comment 9 errata-xmlrpc 2020-04-28 15:39:34 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-2020:1620


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