From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 8811] New: rp-pppoe - generated scripts commands use HOST pathnames, not necessarily TARGET
Date: Mon, 21 Mar 2016 22:43:29 +0000 [thread overview]
Message-ID: <bug-8811-163@https.bugs.busybox.net/> (raw)
https://bugs.busybox.net/show_bug.cgi?id=8811
Bug ID: 8811
Summary: rp-pppoe - generated scripts commands use HOST
pathnames, not necessarily TARGET
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: lonnie at abelbeck.com
CC: buildroot at uclibc.org
Target Milestone: ---
Hi,
When building with CentOS 7 as the host, for files scripts/*.in, the @ID@ gets
mapped to /bin/id instead of /usr/bin/id since rp-pppoe uses the host paths,
not necessarily for the target.
Here is our fix...
In package/rp-pppoe/rp-pppoe.mk:
--
+define RP_PPPOE_SET_TARGET_COMMAND_PATHS
+ find $(@D)/scripts/ -name "*.in" | xargs sed -i \
+ -e 's:@ID@:/usr/bin/id:g' \
+ -e 's:@SETSID@:/usr/bin/setsid:g' \
+ -e 's:@ECHO@:/bin/echo:g' \
+ -e 's:@PPPD@:/usr/sbin/pppd:g'
+endef
+RP_PPPOE_POST_PATCH_HOOKS += RP_PPPOE_SET_TARGET_COMMAND_PATHS
--
You may ask why not eliminate the fully defined paths, but for @SETSID@ it is
tested with -x in the script so it needs a full pathname. The rest may not
need a full pathname.
I think this fix is the lesser of the evils, and is easily tweaked if needed.
Lonnie
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2016-03-21 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 22:43 bugzilla at busybox.net [this message]
2016-10-24 21:43 ` [Buildroot] [Bug 8811] rp-pppoe - generated scripts commands use HOST pathnames, not necessarily TARGET bugzilla at busybox.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-8811-163@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox