Activity log for bug #968531

Date Who What changed Old value New value Message
2012-03-29 19:31:28 Jason Stephenson bug added bug
2012-04-13 13:27:30 Jason Stephenson summary Build system makes use of sed -i option Build system assumes GNU/Linux
2012-04-13 13:27:57 Jason Stephenson evergreen: status New Incomplete
2012-04-13 13:28:02 Jason Stephenson evergreen: status Incomplete New
2012-04-13 13:32:38 Jason Stephenson description The Evergreen Makefiles use the -i option to sed when modifying some files at installation time. This option is problematic because it causes incompatibilities between different versions of sed. For instance, GNU sed will take the -i option unadorned, i.e. without a file name argument. In order to invoke sed on BSD-derived systems without a file name argument requires that an empty quoted string serve as a place holder: -i ''. GNU sed will accept an empty quoted string argument. However, there is a difference in how the argument must be entered. On BSD sed the -i and empty quoted string arguments must have a space between them. Not having the space causes an error. With GNU sed, the -i and empty quoted string arguments must not have any spaces between them. That is, they must touch like so: -i''. Having spaces between the arguments leads to unexpected behavior or an error. The above situation hampers the portability of the Evergreen build system to BSD-derived operating systems. This in turn hampers the portability or testing of Evergreen on such systems, and so limits its use to GNU/Linux. In order to improve this portability and test coverage, I suggest that all references to sed -i be replaced with simple sed commands using redirection to an output file, which works the same with all versions of sed. For an example, one could look at how Cronscript.pm is now created in Open-ILS/src/perlmods/lib/Makefile.am. Even though Evergreen uses GNU autotools, the Makefile.am and other files make assumptions based on GNU/Linux, thus hampering the portability of Evergreen. The Evergreen Makefiles use the -i option to sed when modifying some files at installation time. This option is problematic because it causes incompatibilities between different versions of sed. For instance, GNU sed will take the -i option unadorned, i.e. without a file name argument. In order to invoke sed on BSD-derived systems without a backup file extension argument requires that an empty quoted string serve as a place holder: -i ''. GNU sed will accept an empty quoted string argument. However, there is a difference in how the argument must be entered. On BSD sed the -i and empty quoted string arguments must have a space between them. Not having the space causes an error. With GNU sed, the -i and empty quoted string arguments must not have any spaces between them. That is, they must touch like so: -i''. Having spaces between the arguments leads to unexpected behavior or an error. Additionally, shebang lines are hardcoded in all of our perl and bash scripts. These can and should be inserted at configure/install time using the autotools. Fixing the above will greatly improve the portability of the Evergreen build system and should help with adding more automated testing support.
2012-04-13 13:32:44 Jason Stephenson evergreen: status New In Progress
2012-04-13 13:32:48 Jason Stephenson evergreen: assignee Jason Stephenson (jstephenson)
2012-09-28 19:18:40 Jason Stephenson evergreen: assignee Jason Stephenson (jstephenson)
2012-09-28 19:19:13 Jason Stephenson evergreen: status In Progress Triaged
2012-10-19 13:25:03 Jason Stephenson bug task added opensrf
2013-03-05 14:29:49 Jason Stephenson description Even though Evergreen uses GNU autotools, the Makefile.am and other files make assumptions based on GNU/Linux, thus hampering the portability of Evergreen. The Evergreen Makefiles use the -i option to sed when modifying some files at installation time. This option is problematic because it causes incompatibilities between different versions of sed. For instance, GNU sed will take the -i option unadorned, i.e. without a file name argument. In order to invoke sed on BSD-derived systems without a backup file extension argument requires that an empty quoted string serve as a place holder: -i ''. GNU sed will accept an empty quoted string argument. However, there is a difference in how the argument must be entered. On BSD sed the -i and empty quoted string arguments must have a space between them. Not having the space causes an error. With GNU sed, the -i and empty quoted string arguments must not have any spaces between them. That is, they must touch like so: -i''. Having spaces between the arguments leads to unexpected behavior or an error. Additionally, shebang lines are hardcoded in all of our perl and bash scripts. These can and should be inserted at configure/install time using the autotools. Fixing the above will greatly improve the portability of the Evergreen build system and should help with adding more automated testing support. Even though Evergreen uses GNU autotools, the Makefile.am and other files make assumptions based on GNU/Linux, thus hampering the portability of Evergreen. The Evergreen Makefiles use the -i option to sed when modifying some files at installation time. This option is problematic because it causes incompatibilities between different versions of sed. For instance, GNU sed will take the -i option unadorned, i.e. without a file name argument. In order to invoke sed on BSD-derived systems without a backup file extension argument requires that an empty quoted string serve as a place holder: -i ''. GNU sed will accept an empty quoted string argument. However, there is a difference in how the argument must be entered. On BSD sed the -i and empty quoted string arguments must have a space between them. Not having the space causes an error. With GNU sed, the -i and empty quoted string arguments must not have any spaces between them. That is, they must touch like so: -i''. Having spaces between the arguments leads to unexpected behavior or an error. Additionally, shebang lines are hardcoded in all of our perl and bash scripts. These can and should be inserted at configure/install time using the autotools. Maybe these should be converted to "#!/usr/bin/env (bash|perl)" as is commonly done with python? Bash is often installed under /usr/local/ on the BSDs. Fixing the above will greatly improve the portability of the Evergreen build system and should help with adding more automated testing support.
2022-09-17 23:54:54 Jason Stephenson summary Build system assumes GNU/Linux Autoconf: We're Doing It Wrong