Bug 1464540

Summary: rhn-satellite-exporter creates incomplete directory names
Product: Red Hat Satellite 5 Reporter: Ricardo Santamaria <risantam>
Component: OtherAssignee: Jan Dobes <jdobes>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 570CC: rdrazny, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-backend-2.5.3-152-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-19 11:57:19 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:
Bug Depends On:    
Bug Blocks: 1450111    

Comment 1 Jan Dobes 2017-06-26 09:40:22 UTC
I can reproduce this on spacewalk master, directories have incorrect names only inside ISO, in working directory they seem correct.

Comment 2 Jan Dobes 2017-08-21 11:03:32 UTC
fixed in spacewalk.git(master):

4e0b275421a2e674c297f94a3b59d30505f8b9da

Comment 5 Radovan Drazny 2017-09-12 13:35:56 UTC
Reproduced on spacewalk-backend-2.5.3-151.el6sat using the reproducer from the initial report. The bug is triggered only if doing an export to the current directory using "-d ." option. Both following exports are done on spacewalk-backend-2.5.3-151.el6sat.

$ rhn-satellite-exporter  --channel=rhel-x86_64-server-6 --start-date=20161101 --end-date=20161201 -d preupdate --make-isos=dvd
<...>
$ mount -o loop preupdate/satellite-isos/rhn-export-20161101000000-20161201000000.0-01.iso /mnt/iso/
$ ls -R /mnt/iso 
/mnt/iso:
arches  blacklists  channel_families  channels  DISK_1_OF_1  product_names

/mnt/iso/arches:
arches-extra.xml.gz  arches.xml.gz

/mnt/iso/blacklists:
blacklists.xml.gz

/mnt/iso/channel_families:
channel_families.xml.gz

/mnt/iso/channels:
rhel-x86_64-server-6

/mnt/iso/channels/rhel-x86_64-server-6:
channel.xml.gz  comps.xml.gz

/mnt/iso/product_names:
product_names.xml.gz

$ cd preupdate
$ umount /mnt/iso
$ rm -rf *
$ rhn-satellite-exporter  --channel=rhel-x86_64-server-6 --start-date=20161101 --end-date=20161201 -d . --make-isos=dvd
<...>
$ mount -o loop satellite-isos/rhn-export-20161101000000-20161201000000.0-01.iso /mnt/iso/
$ ls -R /mnt/iso/
/mnt/iso/:
acklists  annel_families  annels  ches  DISK_1_OF_1  oduct_names

/mnt/iso/acklists:
blacklists.xml.gz

/mnt/iso/annel_families:
channel_families.xml.gz

/mnt/iso/annels:
rhel-x86_64-server-6

/mnt/iso/annels/rhel-x86_64-server-6:
channel.xml.gz  comps.xml.gz

/mnt/iso/ches:
arches-extra.xml.gz  arches.xml.gz

/mnt/iso/oduct_names:
product_names.xml.gz

Directory names on the final iso for the export created with "-d preupdate" are ok. 
Directory names on the final iso for the export created with "-d ." are truncated.
Tested "-d /root/satexporter/preupdate/" (absolute path) as well - directory names are ok there.

Updated to spacewalk-backend-2.5.3-152.el6sat and ran all the exports again. This time directory names for every type of export (current dir, relative dir, absolute path) were correct and not truncated. 

VERIFIED

Comment 7 errata-xmlrpc 2017-10-19 11:57:19 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:2915