Bug 1232224
Summary: | Fails to "get", "print" the file and complete the file name using TAB when the file name has the special characters include "][|=()!,\ ". | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Dominic Cleal <dcleal> |
Component: | augeas | Assignee: | Pino Toscano <ptoscano> |
Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | --- | CC: | leiwang, linl, lmiksik, ptoscano, rjones, virt-bugs, wshi, xchen, yoguo |
Target Milestone: | pre-dev-freeze | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | augeas-1.12.0-5.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1232167 | Environment: | |
Last Closed: | 2020-04-28 16:49:27 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: | 1186316, 1232167 | ||
Bug Blocks: |
Description
Dominic Cleal
2015-06-16 10:20:49 UTC
I should have fixed at least the cases (3), and (5): https://github.com/hercules-team/augeas/pull/631 Let's see whether the fixes are actually good enough. This bug is not critical, as it affects the tab-completion in augtool only for paths with certain special characters (which are not common). Hence, moving it to RHEL 8. Fixed upstream with commits 94e327a5ca76f579a2f19d393b9836b427c470df a144fb0dc4dfd8d5b3b733df861deb089a1d5a2c which are in augeas > 1.12.0. Failed to verify this bug with package: augeas-1.12.0-5.el8.x86_64 Steps: 1. # touch /etc/sysconfig/network-scripts/ifcfg-weird\ [!]\|\=\,\ \(used\ to\ fail\)\ # ls /etc/sysconfig/network-scripts/ifcfg-weird* '/etc/sysconfig/network-scripts/ifcfg-weird [!]|=, (used to fail) ' 2. # augtool augtool> print /files/etc/sysconfig/network-scripts/ ... /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /TYPE = "\"Ethernet\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /PROXY_METHOD = "\"none\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /BROWSER_ONLY = "\"no\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /BOOTPROTO = "\"dhcp\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /DEFROUTE = "\"yes\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /IPV4_FAILURE_FATAL = "\"no\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /IPV6INIT = "\"yes\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /IPV6_AUTOCONF = "\"yes\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /IPV6_DEFROUTE = "\"yes\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /IPV6_FAILURE_FATAL = "\"no\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /IPV6_ADDR_GEN_MODE = "\"stable-privacy\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /NAME = "\"eno1\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /UUID = "\"7d07c305-94ea-462d-9722-6f1348d64e10\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /DEVICE = "\"eno5\"" /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /ONBOOT = "\"yes\"" 3. Tap "tab" and get the nodes correctly augtool> get /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ / BOOTPROTO DEFROUTE IPV4_FAILURE_FATAL IPV6_AUTOCONF IPV6_FAILURE_FATAL NAME PROXY_METHOD UUID BROWSER_ONLY DEVICE IPV6_ADDR_GEN_MODE IPV6_DEFROUTE IPV6INIT ONBOOT TYPE 4. #touch /etc/sysconfig/network-scripts/ifcfg-weird\ [!]\ \(used\ to\ fail\)\ # ll /etc/sysconfig/network-scripts/ifcfg-weird* -rw-r--r--. 1 root root 0 Feb 11 04:43 '/etc/sysconfig/network-scripts/ifcfg-weird [!] (used to fail) ' -rw-r--r--. 1 root root 308 Feb 11 04:11 '/etc/sysconfig/network-scripts/ifcfg-weird [!]|=, (used to fail) ' # augtool augtool> ls /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\ --- tap "tab" and complete the file name correctly ifcfg-weird\ \[\!\]\ \(used\ to\ fail\)\ ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ / 5.Failed to run the 'print','get' commands augtool> print /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ / --- no output augtool> get /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)\ /DEVICE /files/etc/sysconfig/network-scripts/ifcfg-weird \[\!\]\|\=\, \(used to fail\) /DEVICE (o) --- The return value is wrong. The step 5 is not fixed. I noticed that the problem seems to be when the last character of a filename is a space. So if you change the test from: /etc/sysconfig/network-scripts/ifcfg-weird\ [!]\|\=\,\ \(used\ to\ fail\)\ to: /etc/sysconfig/network-scripts/ifcfg-weird\ [!]\|\=\,\ \(used\ to\ fail\) then for me it works, as it is similar to the test cases I used when fixing this upstream. Considering that: - spaces in filenames, especially in configuration files, are rare - spaces at the end of filenames are even more rare - spaces in other places of filenames are supported I'd validate this without this the space at the end, eventually opening a bug if we care enough. (I personally would ignore this case until anybody shows a legit use case for it.) What do you think? (In reply to Pino Toscano from comment #9) > I noticed that the problem seems to be when the last character of a filename > is a space. > So if you change the test from: > /etc/sysconfig/network-scripts/ifcfg-weird\ [!]\|\=\,\ \(used\ to\ fail\)\ > to: > /etc/sysconfig/network-scripts/ifcfg-weird\ [!]\|\=\,\ \(used\ to\ fail\) > then for me it works, as it is similar to the test cases I used when fixing > this upstream. > Yes, it works. # augtool augtool> print /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\) /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\) /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)/DEVICE = "\"eth0\"" augtool> get /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\|\=\,\ \(used\ to\ fail\)/DEVICE /files/etc/sysconfig/network-scripts/ifcfg-weird \[\!\]\|\=\, \(used to fail\)/DEVICE = "eth0 > Considering that: > - spaces in filenames, especially in configuration files, are rare > - spaces at the end of filenames are even more rare > - spaces in other places of filenames are supported > I'd validate this without this the space at the end, eventually opening a > bug if we care enough. > (I personally would ignore this case until anybody shows a legit use case > for it.) > > What do you think? I agree. I also think it‘s absolutely rare and unnecessary to add spaces at the end of filenames. And sometimes it's difficult to distinguish from the other same name files which don't have spaces in the end. (In reply to YongkuiGuo from comment #10) > I agree. I also think it‘s absolutely rare and unnecessary to add spaces at > the end of filenames. And sometimes it's difficult to distinguish from the > other same name files which don't have spaces in the end. In that case, what about declaring it as verified? Also, I noticed that the test case without the whitespace at the end is tested by the test-xpath which is part of the test suite: see the tests/xpath.tests file with the data for that test. (In reply to Pino Toscano from comment #11) > Also, I noticed that the test case without the whitespace at the end is > tested by the test-xpath which is part of the test suite: see the > tests/xpath.tests file with the data for that test. Oh, i see that. Thanks. 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:1824 |