Bug 1199014 - Empty file support in <files>
Empty file support in <files>
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: AutoYaST
Leap 15.3
x86-64 openSUSE Leap 15.3
: P2 - High : Minor (vote)
: ---
Assigned To: YaST Team
E-mail List
https://trello.com/c/69mi5jJS
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-29 09:44 UTC by Georg Pfuetzenreuter
Modified: 2022-04-29 14:14 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Pfuetzenreuter 2022-04-29 09:44:10 UTC
Hi,

an AutoYaST profile with the following block within a <files config:type="list"> section will not create the respective file on the installed system, making it not possible to create empty files during the first stage:

    <file>
      <file_contents><![CDATA[]]></file_contents>
      <file_owner>root:root</file_owner>
      <file_path>/var/adm/postfix.configured</file_path>
      <file_permissions>644</file_permissions>
    </file>

As confirmed in IRC,

22:20 <imobach> acidsys: reading the code, the reason might be that the file content is empty, hence it is not created at all
22:20 <imobach> acidsys: you might try to put some content on it (a comment, or just a blank line)

files with content are created with no issues:

    <file>
      <file_contents><![CDATA[### I am content!]]></file_contents>
      <file_owner>root:root</file_owner>
      <file_path>/var/adm/postfix.configured</file_path>
      <file_permissions>644</file_permissions>
    </file>

It's not a big issue for files which support arbitrary content or comments, but there may be cases empty files are wanted - in particular for installations which only utilize the first stage, and cannot run `touch` in a post script.

Thanks for checking!

Best,
Georg