Bug 1172929 - fillup removes commented addfile variables from basefile
Summary: fillup removes commented addfile variables from basefile
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jaime Caamaño Ruiz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-15 13:04 UTC by Jaime Caamaño Ruiz
Modified: 2023-07-31 10:02 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 Jaime Caamaño Ruiz 2020-06-15 13:04:37 UTC
This might be me misunderstanding on my part on how fillup is supposed to work.

Observation

>vagrant@localhost:~/fillup/test1> fillup -V
>This is fillup, version 1.42

>vagrant@localhost:~/fillup/test1> cat basefile
>KEY1=VALUE1

>vagrant@localhost:~/fillup/test1> cat addfile 
>#KEY1=VALUE1

>vagrant@localhost:~/fillup/test1> fillup -v basefile addfile resfile && cat resfile
>Evaluating base file:  KEY1  ->  Ignored  -  AssignmentBlock
>Evaluating additional file:  KEY1  ->  Ignored  -  CommentedVariableBlock

>Now the output file is displayed
>vagrant@localhost:~/fillup/test1>


I expected here for KEY1 to be present in the result output. Removing the commented variable from addfile works as expected:

>vagrant@localhost:~/fillup/test1> cat addfile2
>vagrant@localhost:~/fillup/test1> 

>vagrant@localhost:~/fillup/test1> fillup -v basefile addfile2 resfile && cat resfile
>Evaluating additional file:    ->  Ignored  -  TrailingCommentBlock
>Evaluating base file:  KEY1  ->  Output  -  AssignmentBlock

>Now the output file is displayed
>Evaluating base file:  KEY1  ->  Output  -  AssignmentBlock
>KEY1=VALUE1
Comment 1 Jaime Caamaño Ruiz 2020-06-15 13:12:52 UTC
Double hash also works as expected

>vagrant@localhost:~/fillup/test1> cat addfile
>## KEY1=VALUE1
>vagrant@localhost:~/fillup/test1> fillup -v basefile addfile resfile && cat resfile
>Evaluating additional file:    ->  Ignored  -  TrailingCommentBlock
>Evaluating base file:  KEY1  ->  Output  -  AssignmentBlock
>
>Now the output file is displayed
>Evaluating base file:  KEY1  ->  Output  -  AssignmentBlock
>KEY1=VALUE1

But a single hash should be enough, right?
Comment 4 jun wang 2020-07-21 11:37:39 UTC
I am testing the update SUSE:Maintenance:15678:222021, and follow the reproducer, I get the output BEFORE and AFTER the update:

"""
# fillup -V
This is fillup, version 1.42

# cat basefile
KEY1=VALUE1

# cat addfile
#KEY1=VALUE1

# fillup -v basefile addfile resfile && cat resfile
Evaluating base file:  KEY1  ->  Ignored  -  AssignmentBlock
Evaluating additional file:  KEY1  ->  Ignored  -  CommentedVariableBlock

Now the output file is displayed
"""

it seems that this bug is NOT fixed.
does the reproducer from comment#0 need more condition?
Comment 5 jun wang 2020-07-21 11:44:26 UTC
please ignore the comment#4, it's my mistake.
Comment 6 Swamp Workflow Management 2020-07-21 19:14:47 UTC
SUSE-RU-2020:1986-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1172861,1172929
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Server Applications 15-SP2 (src):    dpdk-19.11.1-3.2.1, dpdk-thunderx-19.11.1-3.2.1, openvswitch-2.13.0-9.3.5, python-Automat-0.6.0-3.2.1, python-PyHamcrest-1.9.0-3.2.2, python-Twisted-19.10.0-3.2.6, python-attrs-19.3.0-3.2.1, python-constantly-15.1.0-3.2.1, python-h2-3.2.0-3.2.2, python-hpack-3.0.0-3.2.1, python-hyperframe-5.2.0-3.2.1, python-hyperlink-17.2.1-3.2.1, python-incremental-17.5.0-3.2.1, python-pyserial-3.4-3.2.1, python-service_identity-18.1.0-3.2.1, python-sortedcontainers-2.1.0-3.2.4, python-zope.interface-4.4.2-3.2.1
SUSE Linux Enterprise Module for Public Cloud 15-SP2 (src):    python-pyserial-3.4-3.2.1
SUSE Linux Enterprise Module for Public Cloud 15-SP1 (src):    python-pyserial-3.4-3.2.1
SUSE Linux Enterprise Module for Public Cloud 15 (src):    python-pyserial-3.4-3.2.1
SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP2 (src):    dpdk-19.11.1-3.2.1, openvswitch-2.13.0-9.3.5, python-pyserial-3.4-3.2.1, python-sortedcontainers-2.1.0-3.2.4
SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP1 (src):    python-pyserial-3.4-3.2.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Swamp Workflow Management 2020-07-26 16:31:46 UTC
openSUSE-RU-2020:1066-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1172861,1172929
CVE References: 
Sources used:
openSUSE Leap 15.2 (src):    openvswitch-2.13.0-lp152.3.3.1