Bug 640366 - xrdb puts space after defined symbols
Summary: xrdb puts space after defined symbols
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-server-utils
Version: 32
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-05 16:33 UTC by Göran Uddeborg
Modified: 2021-05-26 01:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 18:43:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Göran Uddeborg 2010-10-05 16:33:21 UTC
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

Comment 1 Matěj Cepl 2010-10-06 16:12:26 UTC
Trivially reproducable on F14.

Comment 2 Adam Jackson 2012-05-29 21:20:17 UTC
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.

Comment 3 Mary Ellen Foster 2012-06-01 12:00:19 UTC
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 ...

Comment 4 Mary Ellen Foster 2012-06-01 12:07:56 UTC
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

Comment 5 Adam Jackson 2012-06-04 16:16:49 UTC
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.

Comment 6 Fedora End Of Life 2013-01-16 22:17:35 UTC
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

Comment 7 Göran Uddeborg 2013-01-17 19:53:52 UTC
Still present in F18, xorg-x11-server-utils-7.5-14.fc18.x86_64.

Comment 8 Fedora End Of Life 2013-12-21 08:26:25 UTC
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.

Comment 9 Göran Uddeborg 2013-12-22 17:18:44 UTC
Still present in F20, xorg-x11-server-utils-7.7-2.fc20.x86_64.

Comment 10 Fedora End Of Life 2015-05-29 08:37:37 UTC
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.

Comment 11 Göran Uddeborg 2015-05-30 16:09:14 UTC
Still present in F22, xorg-x11-server-utils-7.7-15.fc22.x86_64 (and mcpp-2.7.2-13.fc22.x86_64).

Comment 12 Fedora End Of Life 2016-07-19 20:50:40 UTC
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.

Comment 13 Göran Uddeborg 2016-07-21 07:56:44 UTC
Still present in F24

xorg-x11-server-utils-7.7-19.fc24.x86_64
mcpp-2.7.2-16.fc24.x86_64

Comment 14 antofthy 2016-10-18 01:03:47 UTC
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  ....

Comment 15 antofthy 2016-10-18 06:14:12 UTC
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.

Comment 16 Fedora End Of Life 2017-07-25 18:28:28 UTC
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.

Comment 17 antofthy 2017-07-25 23:56:40 UTC
Still present in F25   Do not close!

Comment 18 Göran Uddeborg 2017-07-26 14:06:24 UTC
Also present in F26.

xorg-x11-server-utils-7.7-21.fc26.x86_64
mcpp-2.7.2-17.fc26.x86_64

Comment 19 Fedora End Of Life 2018-05-03 08:51:19 UTC
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.

Comment 20 Göran Uddeborg 2018-05-22 19:24:03 UTC
Also present in F28.

xorg-x11-server-utils-7.7-24.fc28.x86_64
mcpp-2.7.2-20.fc28.x86_64

Comment 21 antofthy 2018-05-23 04:32:51 UTC
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!

Comment 22 Ben Cotton 2019-05-02 21:43:07 UTC
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.

Comment 23 antofthy 2019-05-07 23:17:23 UTC
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

Comment 24 Göran Uddeborg 2019-05-09 20:02:54 UTC
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

Comment 25 Ben Cotton 2020-04-30 22:02:59 UTC
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.

Comment 26 antofthy 2020-05-01 00:35:04 UTC
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....

Comment 27 antofthy 2020-05-01 00:55:39 UTC
Basically the "xrdb" package should NOT have be built with the option...  --with-cpp=mcpp
Which is the cause of the issue!

Comment 28 antofthy 2020-05-01 01:02:31 UTC
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.

Comment 29 Fedora Program Management 2021-04-29 17:21:18 UTC
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.

Comment 30 antofthy 2021-04-29 23:58:33 UTC
Still a problem.... Trival fix... that NEVER gets applied!

Comment 31 Göran Uddeborg 2021-05-04 11:18:38 UTC
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?

Comment 32 antofthy 2021-05-05 01:02:55 UTC
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.

Comment 33 Ben Cotton 2021-05-25 18:43:08 UTC
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.

Comment 34 antofthy 2021-05-26 01:38:15 UTC
Not fixed still active in F33


Note You need to log in before you can comment on or make changes to this bug.