Skip to contentSkip to conversation

question about my pevious dhcpcd patch

Buildroot John Stile 3 participants 3 messages Mar 13, 2013 – Mar 14, 2013

lore
Share & tools
lore

John Stile

author
#0 lore raw

I have an update to my patch to add dhcpd.

First issue: I discovered I also need to copy a script directory, but don't see a good method to copy more than each file one at a time.

Is there a good way to copy all files in dhcpcd-hooks except the Makefile, into $(TARGET_DIR)/libexec/dhcpcd-hooks?

Right now I'm doing it one at a time like this:

	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/01-test \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/01-test
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/02-dump \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/02-dump
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/20-resolv.conf \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/20-resolv.conf
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/29-lookup-hostname \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/29-lookup-hostname

...etc...

Second issue: how do I submit an updated patch? The first one was submitted a few days ago. Do i just do a fresh clone, and then try to add my stuff and submit via send-email, and pretend the first patch was never sent?

#1 lore raw
Quoted 9 lines · John Stile

I have an update to my patch to add dhcpd.

First issue: I discovered I also need to copy a script directory, but don't see a good method to copy more than each file one at a time.

Is there a good way to copy all files in dhcpcd-hooks except the Makefile, into $(TARGET_DIR)/libexec/dhcpcd-hooks?

Right now I'm doing it one at a time like this:

Quoted 12 lines
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/01-test \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/01-test
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/02-dump \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/02-dump
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/20-resolv.conf \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/20-resolv.conf
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/29-lookup-hostname \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/29-lookup-hostname

Just do

	mkdir -p $(TARGET_DIR)/libexec/dhcpcd-hooks
	cp $(@D)/dhcpcd-hooks/* $(TARGET_DIR)/libexec/dhcpcd-hooks

If permissions of the original files are wrong, just add a chmod.

By the way, we don't have a /libexec at the moment, but we do have a
/usr/libexec. So I would put it there.

Quoted 6 lines
   ...etc...

Second issue: how do I submit an updated patch? The first one was submitted a few days ago. Do i just do a fresh clone, and then try to add my stuff and submit via send-email, and pretend the first patch was never sent?

Assuming your patch is in git, you can make more changes, and then
update your patch with "git commit --amend". Then you can just use git send-email like before.

If you have made other changes in the mean time, you can commit your
changes and squash them with the patch with 'git rebase -i origin/master'

Also make sure you update your git repository with 'git pull --rebase'

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw
In reply to John Stile

Dear John Stile,

Quoted 19 lines · John Stile

First issue: I discovered I also need to copy a script directory, but don't see a good method to copy more than each file one at a time.

Is there a good way to copy all files in dhcpcd-hooks except the Makefile, into $(TARGET_DIR)/libexec/dhcpcd-hooks?

Right now I'm doing it one at a time like this:

	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/01-test \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/01-test
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/02-dump \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/02-dump
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/20-resolv.conf \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/20-resolv.conf
	$(INSTALL) -D -m 0755 \
		$(@D)/dhcpcd-hooks/29-lookup-hostname \
		$(TARGET_DIR)/libexec/dhcpcd-hooks/29-lookup-hostname
Quoted 1 line

...etc...

You should probably use $(MAKE) -C $(@D) install in order to use the integrated installation procedure of dhcpcd Makefile.

Quoted 4 lines

Second issue: how do I submit an updated patch? The first one was submitted a few days ago. Do i just do a fresh clone, and then try to add my stuff and submit via send-email, and pretend the first patch was never sent?

Since your patch has not yet been merged, you should resent an updated version.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com