[FS#1151] Poor choice of sed delimiter in $(SED_SCRIPT)

LEDE Bugs lede-bugs at lists.infradead.org
Sun Nov 5 11:25:11 PST 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Philip Prindeville (pprindeville) 

Attached to Project - LEDE Project
Summary - Poor choice of sed delimiter in $(SED_SCRIPT)
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - I was doing a build of master and saw base-packages fail because of:


/home/philipp/bertram/lede3/staging_dir/host/bin/sed -i -e 's,%U,http://downloads.openwrt.org/snapshots/trunk/%S/packages,g' -e 's,%V,SNAPSHOT,g' -e 's,%v,\LSNAPSHOT,g' -e 's,%C,r5207-5a70589,g' -e 's,%c,\Lr5207-5a70589,g' -e 's,%N,Reboot,g' -e 's,%n,\LReboot,g' -e 's,%D,LEDE,g' -e 's,%d,\LLEDE,g' -e 's,%R,r5207-5a70589,g' -e 's,%T,x86,g' -e 's,%S,x86/geode,g' -e 's,%A,i386_pentium,g' -e 's,%t,no-all busybox,g' -e 's,%M,Redfish Solutions, LLC,g' -e 's,%m,http://www.redfish-solutions.com/,g' -e 's,%b,http://bugs.lede-project.org/,g' -e 's,%s,http://forum.lede-project.org/,g' -e 's,%P,Generic,g' -e 's,%h,v0,g' /home/philipp/bertram/lede3/build_dir/target-i386_pentium_musl/linux-x86_geode/base-files/.pkgdir/base-files/etc/banner /home/philipp/bertram/lede3/build_dir/target-i386_pentium_musl/linux-x86_geode/base-files/.pkgdir/base-files/etc/openwrt_version /home/philipp/bertram/lede3/build_dir/target-i386_pentium_musl/linux-x86_geode/base-files/.pkgdir/base-files/usr/lib/os-release
/home/philipp/bertram/lede3/staging_dir/host/bin/sed: -e expression #15, char 25: unknown option to `s'
Makefile:194: recipe for target '/home/philipp/bertram/lede3/build_dir/target-i386_pentium_musl/linux-x86_geode/base-files/.pkgdir/base-files.installed' failed
make[3]: *** [/home/philipp/bertram/lede3/build_dir/target-i386_pentium_musl/linux-x86_geode/base-files/.pkgdir/base-files.installed] Error 1


and after a quick look, realized this was a combination of:


VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
        -e 's,%V,$(VERSION_NUMBER),g' \
        -e 's,%v,\L$(subst $(space),_,$(VERSION_NUMBER)),g' \
        -e 's,%C,$(VERSION_CODE),g' \
        -e 's,%c,\L$(subst $(space),_,$(VERSION_CODE)),g' \
        -e 's,%N,$(VERSION_NICK),g' \
        -e 's,%n,\L$(subst $(space),_,$(VERSION_NICK)),g' \
        -e 's,%D,$(VERSION_DIST),g' \
        -e 's,%d,\L$(subst $(space),_,$(VERSION_DIST)),g' \
        -e 's,%R,$(REVISION),g' \
        -e 's,%T,$(BOARD),g' \
        -e 's,%S,$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic),g' \
        -e 's,%A,$(ARCH_PACKAGES),g' \
        -e 's,%t,$(VERSION_TAINTS),g' \
        -e 's,%M,$(VERSION_MANUFACTURER),g' \
        -e 's,%m,$(VERSION_MANUFACTURER_URL),g' \
        -e 's,%b,$(VERSION_BUG_URL),g' \
        -e 's,%s,$(VERSION_SUPPORT_URL),g' \
        -e 's,%P,$(VERSION_PRODUCT),g' \
        -e 's,%h,$(VERSION_HWREV),g'


and:


CONFIG_VERSION_MANUFACTURER="Redfish Solutions, LLC"


Comma is not an unusual character for find in company sames:


  * Bull Informatique, S.A.
  * Cisco Systems, Inc.
  * Redfish Solutions, LLC

etc.  Can we change either **all** of the sed delimiters to something less common like % (percent) or at least change them for VERSION_MANUFACTURER?

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=1151



More information about the lede-bugs mailing list