Description of problem: If a symbol is defined on the command line, and used in input to xrdb, a space is inserted after the value. Version-Release number of selected component (if applicable): xorg-x11-server-utils-7.4-19.fc14.x86_64 How reproducible: Every time Steps to Reproduce: 1.echo 'someXResource: HOME/file' | xrdb -merge -DHOME=/my/home/dir 2.xrdb -q | grep someXResource Actual results: someXResource: /my/home/dir /file Expected results: someXResource: /my/home/dir/file
Trivially reproducable on F14.
Not xrdb's fault. xrdb invokes mcpp for macro expansion: 20685 execve("/usr/bin/mcpp", ["/usr/bin/mcpp", "-P", "-DHOST=atropine", "-DSERVERHOST=atropine", "-DSRVR_atropine", "-DDISPLAY_NUM=0", "-DCLIENTHOST=atropine", "-DCLNT_atropine", "-DVERSION=11", "-DREVISION=0", "-DVENDOR=Fedora Project", "-DVNDR_Fedora_Project", "-DRELEASE=11101000", "-DNUM_SCREENS=1", "-DEXT_SGI_GLX", "-DEXT_GLX", "-DEXT_DAMAGE", "-DEXT_Composite", "-DEXT_XINERAMA", "-DEXT_RANDR", "-DEXT_RENDER", "-DEXT_XFIXES", "-DEXT_XC_MISC", "-DEXT_XKEYBOARD", "-DEXT_SYNC", "-DEXT_BIG_REQUESTS", "-DEXT_XTEST", "-DEXT_XInputExtension", "-DEXT_MIT_SHM", "-DEXT_SHAPE", "-DEXT_Generic_Event_Extension", "-DEXT_DRI2", "-DEXT_RECORD", "-DEXT_DOUBLE_BUFFER", "-DEXT_X_Resource", "-DEXT_XVideo_MotionCompensation", "-DEXT_XVideo", "-DEXT_DPMS", "-DEXT_XFree86_DGA", "-DEXT_XFree86_VidModeExtension", "-DEXT_MIT_SCREEN_SAVER", "-DSCREEN_NUM=0", "-DWIDTH=2560", "-DHEIGHT=1600", "-DX_RESOLUTION=3781", "-DY_RESOLUTION=3783", "-DPLANES=24", "-DBITS_PER_RGB=8", "-DCLASS=TrueColor", "-DCLASS_TrueColor=33", "-DCOLOR", "-DCLASS_TrueColor_24=33", "-DCLASS_DirectColor_24=34", "-DCLASS_TrueColor_32=88", "-DHOME=/my/home/dir"], [...]) = 0 And we just read its output: 20685 write(1, "someXResource: /my/home/dir /fi"..., 35) = 35 20684 <... read resumed> "someXResource: /my/home/dir /fi"..., 4096) = 35 So this is mcpp, not xrdb.
A tiny bit of investigation indicates that adding the parameter "-@kr" to the mcpp call gets rid of the extra space. I don't fully understand what's going on, but for now that would at least be a work-around ...
Looking at the code, inserting the space actually seems to be intentional in "std" (default) mode: "An expanded macro is surrounded by spaces to prevent unintended token merging." So if you don't want spaces after expanded tokens, you need to use either -@kr or -@old as an argument to mcpp
That's reasonable enough, although the easy way of implementing it further deepens xrdb's assumption that the preprocessor you're using is a (particular) C preprocessor. Reassigning back to xrdb.
This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Still present in F18, xorg-x11-server-utils-7.5-14.fc18.x86_64.
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still present in F20, xorg-x11-server-utils-7.7-2.fc20.x86_64.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still present in F22, xorg-x11-server-utils-7.7-15.fc22.x86_64 (and mcpp-2.7.2-13.fc22.x86_64).
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Still present in F24 xorg-x11-server-utils-7.7-19.fc24.x86_64 mcpp-2.7.2-16.fc24.x86_64
I have posted a bug report for this with XOrg... https://bugs.freedesktop.org/show_bug.cgi?id=98300 This show the problem with having a space on the end of the define! Even though the define did not use quotes to include a space! As a quick solution users can actually use specify the cpp program to use xrdb -cpp /bin/cpp ....
Feedback from XOrg... xrdb as provided by X.Org looks for a program named "cpp". If distros have provided mcpp as cpp, or passed --with-cpp=mcpp as Fedora does: http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-server-utils.git/tree/xorg-x11-server-utils.spec#n109 we can't stop them from introducing bugs in their packages like this. And it looks like this bug has been around for some time. Solutions... Please ensure that either cpp is used (which does not add a space to the end of defines) or add a -@kr or -@old option to mcpp.
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still present in F25 Do not close!
Also present in F26. xorg-x11-server-utils-7.7-21.fc26.x86_64 mcpp-2.7.2-17.fc26.x86_64
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Also present in F28. xorg-x11-server-utils-7.7-24.fc28.x86_64 mcpp-2.7.2-20.fc28.x86_64
Oh come on... either get "xrdb" to use "cpp" as it is supposed to, or have it include a "-@old" option to the "mcpp" call. Either solution would fix the problem! This problem should NEVER have existed in the first place!
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
It is still a problem, and for something with a trivial fix, it looks like it will never be resolved. Basically as so few applications these days rely of X resources. They take the root of either providing user themes, or not allowing the users any control of the application widgets. Still I find it useful in re-purposing some simple X window applications (older ones) for other purposes. For example changing the appearance of XMessage for use in X window scripts to provide small input menus and multiple buttons in forms that other scripting X window programs can not provide (EG: zenity, Xdialog, yad) It is a shame that NOT ONE of these 'helper' programs have dual password input (EG: password and confirm the password). -- Sorry its a pet peev! Anthony
As Anthony mentions, the problem remains in F30. xorg-x11-server-utils-7.7-28.fc30.x86_64 mcpp-2.7.2-23.fc30.x86_64
This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
The problem remains in FC32, and has been a bug since FC14 The problem is a extra option is needed to ensure xrdb does NOT use "mcpp" which is the source of the bug. If xrdb want's to use "mccp" it needs to use an extra option. It's cause is even well known and documented above, and trivial to fix. Even uninstalling "mccp" will fix it! Yet I doubt it will ever be fixed. Arrgghhh....
Basically the "xrdb" package should NOT have be built with the option... --with-cpp=mcpp Which is the cause of the issue!
Test of what xrdb uses... xrdb --help |& grep cpp -cpp filename preprocessor to use [/usr/bin/mcpp] -nocpp do not use a preprocessor As you can see it is mcpp and not cpp.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still a problem.... Trival fix... that NEVER gets applied!
Do you see this in F34 Anthony? I just upgraded xrdb, which is in its own package now. xrdb-1.1.1-2.fc34.x86_64 to be precise. It no longer require the mcpp package, and it does seem to run plain cpp instead. It seems to me this bug is finally fixed in F34. Do you have a test case that still fails?
Apologies for not including the fedora version in my last comment. It was for F33. I will have a F34 shortly and will test it soon.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Not fixed still active in F33