Discussion:
[oi-dev] Whitespace in Makefiles in oi-userland keep causing Problems
Till Wegmüller
2018-09-27 19:03:14 UTC
Permalink
Hello Fellow developers.

I have a confusing Problem with our buildsystem.
Since today it keeps behaving Inconsistently when I have a Whitespace in
a Value of a variable.

A Makefile like so:

<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable, distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration and Configuration'
<snip>

Something like COMPONENT_CLASSIFICATION would break pkgmogrify with:
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
line 18: Malformed action at position: 90: whitespace in key:
set name=info.classification
value=org.opensolaris.category.2008:System/Administration and Configuration

I could manage to supress this by using escape characters like " or '.
But not in all cases. And with the Classification the Whitespaces are
required as that Category has Whitespaces in their name. Thus it won't
publish.

I remember that Whitespaces where no problem not long ago. How will we
handle this? Packages like puppet and many others have also Whitespaces
in the Makefiles.

Greetings
Till
Alexander Pyhalov via oi-dev
2018-09-28 08:03:16 UTC
Permalink
Does
COMPONENT_CLASSIFICATION= System/Administration and Configuration
work?

С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ


________________________________________
От: Till Wegmüller <***@gmail.com>
Отправлено: 27 сентября 2018 г. 22:03:14
Кому: OpenIndiana Developer mailing list
Тема: [oi-dev] Whitespace in Makefiles in oi-userland keep causing Problems

Hello Fellow developers.

I have a confusing Problem with our buildsystem.
Since today it keeps behaving Inconsistently when I have a Whitespace in
a Value of a variable.

A Makefile like so:

<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable, distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration and Configuration'
<snip>

Something like COMPONENT_CLASSIFICATION would break pkgmogrify with:
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
line 18: Malformed action at position: 90: whitespace in key:
set name=info.classification
value=org.opensolaris.category.2008:System/Administration and Configuration

I could manage to supress this by using escape characters like " or '.
But not in all cases. And with the Classification the Whitespaces are
required as that Category has Whitespaces in their name. Thus it won't
publish.

I remember that Whitespaces where no problem not long ago. How will we
handle this? Packages like puppet and many others have also Whitespaces
in the Makefiles.

Greetings
Till

_______________________________________________
oi-dev mailing list
oi-***@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev
Till Wegmüller
2018-09-28 09:05:21 UTC
Permalink
No Unfortunately not...
And yes it seems to be a complete mess with whitespaces

And it is pkgmogrify which complains. not Make itself
Post by Alexander Pyhalov via oi-dev
Does
COMPONENT_CLASSIFICATION= System/Administration and Configuration
work?
С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ
________________________________________
Отправлено: 27 сентября 2018 г. 22:03:14
Кому: OpenIndiana Developer mailing list
Тема: [oi-dev] Whitespace in Makefiles in oi-userland keep causing Problems
Hello Fellow developers.
I have a confusing Problem with our buildsystem.
Since today it keeps behaving Inconsistently when I have a Whitespace in
a Value of a variable.
<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable, distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration and Configuration'
<snip>
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
set name=info.classification
value=org.opensolaris.category.2008:System/Administration and Configuration
I could manage to supress this by using escape characters like " or '.
But not in all cases. And with the Classification the Whitespaces are
required as that Category has Whitespaces in their name. Thus it won't
publish.
I remember that Whitespaces where no problem not long ago. How will we
handle this? Packages like puppet and many others have also Whitespaces
in the Makefiles.
Greetings
Till
_______________________________________________
oi-dev mailing list
https://openindiana.org/mailman/listinfo/oi-dev
_______________________________________________
oi-dev mailing list
https://openindiana.org/mailman/listinfo/oi-dev
Joerg Schilling
2018-09-28 10:23:46 UTC
Permalink
Post by Till Wegmüller
<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable, distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration and Configuration'
<snip>
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
set name=info.classification
value=org.opensolaris.category.2008:System/Administration and Configuration
It would help if you could investigate and report on what happenes that causes
your problem and whether you are unhappy with "make" or with the called
program...

BTW: do you use "gmake" or make?
gmake is known to have a buggy white space handling.

Jörg
--
EMail:***@schily.net (home) Jörg Schilling D-13353 Berlin
***@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
Till Wegmüller
2018-09-28 11:46:13 UTC
Permalink
I managed to get it Working by hardcoding every Value with a Whitespace
inside it in the Package manifest.

Looks like the problem seems to be the way gmake passes Variables to
pkgmogrify. It usualy does so by specifying -D $VARIABLE on the command
line. That seems not to be working consistently.

So lesson from that seems to be that we need to hardcode values with
whitespace into the manifest.

Thanks for the pointers.

Greetings
Till
Post by Joerg Schilling
Post by Till Wegmüller
<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable, distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration and Configuration'
<snip>
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
set name=info.classification
value=org.opensolaris.category.2008:System/Administration and Configuration
It would help if you could investigate and report on what happenes that causes
your problem and whether you are unhappy with "make" or with the called
program...
BTW: do you use "gmake" or make?
gmake is known to have a buggy white space handling.
Jörg
Aurélien Larcher
2018-09-28 11:56:08 UTC
Permalink
Post by Till Wegmüller
I managed to get it Working by hardcoding every Value with a Whitespace
inside it in the Package manifest.
Looks like the problem seems to be the way gmake passes Variables to
pkgmogrify. It usualy does so by specifying -D $VARIABLE on the command
line. That seems not to be working consistently.
So lesson from that seems to be that we need to hardcode values with
whitespace into the manifest.
Thanks for the pointers.
I am not sure this is the case, there are other instances of values with
whitespaces.
The way values are quoted should be influencial depending on how the recipe
passes them to pkgmogrify.
There is a similar problem with non-escaping dots in PKG_MACROS.
Post by Till Wegmüller
Greetings
Till
Post by Joerg Schilling
Post by Till Wegmüller
<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable, distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration and Configuration'
<snip>
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
Post by Joerg Schilling
Post by Till Wegmüller
set name=info.classification
value=org.opensolaris.category.2008:System/Administration and
Configuration
Post by Joerg Schilling
It would help if you could investigate and report on what happenes that
causes
Post by Joerg Schilling
your problem and whether you are unhappy with "make" or with the called
program...
BTW: do you use "gmake" or make?
gmake is known to have a buggy white space handling.
Jörg
_______________________________________________
oi-dev mailing list
https://openindiana.org/mailman/listinfo/oi-dev
--
---
Praise the Caffeine embeddings
Joerg Schilling
2018-10-01 10:40:37 UTC
Permalink
Post by Till Wegmüller
I managed to get it Working by hardcoding every Value with a Whitespace
inside it in the Package manifest.
Looks like the problem seems to be the way gmake passes Variables to
pkgmogrify. It usualy does so by specifying -D $VARIABLE on the command
line. That seems not to be working consistently.
Well, it is obvious that you need double quotes to make this work correctly, in
other words: you did not hit onne of the problems that are caused by whitespace
handling in gmake.

Jörg
--
EMail:***@schily.net (home) Jörg Schilling D-13353 Berlin
***@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
Aurélien Larcher
2018-10-22 12:22:27 UTC
Permalink
On Mon, Oct 1, 2018 at 12:41 PM Joerg Schilling <
Post by Joerg Schilling
Post by Till Wegmüller
I managed to get it Working by hardcoding every Value with a Whitespace
inside it in the Package manifest.
Looks like the problem seems to be the way gmake passes Variables to
pkgmogrify. It usualy does so by specifying -D $VARIABLE on the command
line. That seems not to be working consistently.
Well, it is obvious that you need double quotes to make this work correctly, in
other words: you did not hit onne of the problems that are caused by whitespace
handling in gmake.
FYI tracked down to an issue in pkg for the generation of intermediate
manifests.
Post by Joerg Schilling
Jörg
--
Berlin
http://schily.blogspot.com/
URL: http://cdrecord.org/private/
http://sf.net/projects/schilytools/files/'
_______________________________________________
oi-dev mailing list
https://openindiana.org/mailman/listinfo/oi-dev
--
---
Praise the Caffeine embeddings
Loading...