[Buildroot] [PATCH 7/7] ifupdown: new package
Gustavo Zacarias
gustavo at zacarias.com.ar
Thu Nov 6 18:10:21 UTC 2014
On 11/06/2014 03:00 PM, Danomi Manchego wrote:
>> +define IFUPDOWN_INSTALL_TARGET_CMDS
>> + $(INSTALL) -m 0755 $(@D)/ifup $(TARGET_DIR)/sbin/ifup
>
> No -D?
/sbin is part of the basic (FHS) skeleton dirs, there's no need.
It's not the common practice, but it's skipped in some packages for
those dirs.
>> + $(INSTALL) -m 0755 -D $(@D)/settle-dad.sh \
>> + $(TARGET_DIR)/lib/ifupdown/settle-dad.sh
>> + ln -sf ifup $(TARGET_DIR)/sbin/ifdown
>> + ln -sf ifup $(TARGET_DIR)/sbin/ifquery
>> +endef
>
> If you patched Makefile's "ln: commands to have -f, then this would be
> equivalent to:
>
> define IFUPDOWN_INSTALL_TARGET_CMDS
> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) BASEDIR=$(TARGET_DIR) install
> endef
>
> Which might be more immune to changes in created files?
I try to avoid patching unless it's really necessary.
Having generic install cmds is nice, but patches i think are lower
priority than custom INSTALL cmds unless it's something big like a dozen
files and directories of course.
Besides a patch can need reworking for a new version if things changed
in the Makefile.
> Just as an FYI .... I made an ifupdown.mk myself about six months ago,
> but ended up not needing it. Compared to what you have here, I had
> done some extra stuff for compatibility with BusyBox ifupdown:
>
> - In CFLAGS in BUILD_CMDS, I added: -D'RUN_DIR="\"/var/run/\""'
> - In inet.defn, I replaced all the "/run" with "/var/run"
> - In main.c, I added "-f" option - ifupdown currently only accepts "--force"
> - in execute.c, I dropped the "--verbose" from run-parts
>
> But perhaps BusyBox compatibility is not a goal here ...
Sorry, FHS again... /run is the recommended running info directory, we
shouldn't try to avoid it. In fact we should strive to move everything
out of /var/run IMHO.
Regards.
More information about the buildroot
mailing list