| Submitter | Steve Sakoman |
|---|---|
| Date | Jan. 7, 2012, 4:51 a.m. |
| Message ID | <1325911915-16001-4-git-send-email-steve@sakoman.com> |
| Download | mbox | patch |
| Permalink | /patch/18757/ |
| State | Accepted |
| Commit | aad04928116feea421fba84c4780b93191be6169 |
| Headers | show |
Comments
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> On Sat, Jan 7, 2012 at 02:51, Steve Sakoman <steve@sakoman.com> wrote: > Otherwise dhclient encounters errors of this type: > > dhclient: can't create > /var/lib/dhcp/dhclient-c0c60402-0bc5-4bd7-bc3b-49a27fa37d72-eth1.lease: No > such file or directory > > Signed-off-by: Steve Sakoman <steve@sakoman.com> > --- > meta/recipes-connectivity/dhcp/dhcp.inc | 4 ++-- > meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc > b/meta/recipes-connectivity/dhcp/dhcp.inc > index f9d80e7..be256ce 100644 > --- a/meta/recipes-connectivity/dhcp/dhcp.inc > +++ b/meta/recipes-connectivity/dhcp/dhcp.inc > @@ -59,14 +59,14 @@ PACKAGES += "dhcp-server dhcp-server-config > dhcp-client dhcp-relay dhcp-omshell" > > FILES_${PN} = "" > > -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server > ${localstatedir}/lib/dhcp/" > +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" > RRECOMMENDS_dhcp-server = "dhcp-server-config" > > FILES_dhcp-server-config = "${sysconfdir}/default/dhcp-server > ${sysconfdir}/dhcp/dhcpd.conf" > > FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay > ${sysconfdir}/default/dhcp-relay" > > -FILES_dhcp-client = "${base_sbindir}/dhclient > ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf" > +FILES_dhcp-client = "${base_sbindir}/dhclient > ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf > ${localstatedir}/lib/dhcp/" > RDEPENDS_dhcp-client = "bash" > > FILES_dhcp-omshell = "${bindir}/omshell" > diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bbb/meta/recipes-connectivity/dhcp/ > dhcp_4.2.0.bb > index 2471d61..a3a560b 100644 > --- a/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb > +++ b/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb > @@ -1,6 +1,6 @@ > require dhcp.inc > > -PR = "r4" > +PR = "r5" > > SRC_URI += "file://fixincludes.patch \ > file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \ > -- > 1.7.1 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >
Hi, Le Fri, 6 Jan 2012 20:51:54 -0800, Steve Sakoman <steve@sakoman.com> a écrit : > -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/" > +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" isn't this directory necessary for dhcp-server ? Eric
On Sat, Jan 7, 2012 at 5:14 AM, Eric Bénard <eric@eukrea.com> wrote: > Hi, > > Le Fri, 6 Jan 2012 20:51:54 -0800, > Steve Sakoman <steve@sakoman.com> a écrit : >> -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/" >> +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" > > isn't this directory necessary for dhcp-server ? Sorry for the delay in responding! I missed seeing your comment. Yes, both packages need this directory. But the dhcp-server package init already creates it if it doesn't exist: case "$1" in start) echo -n "Starting DHCP server: " test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ So it should be no issue moving the /var/lib/dhcp FILE spec to the dhcp-client package. Steve
On 01/11/2012 11:00 AM, Steve Sakoman wrote: > On Sat, Jan 7, 2012 at 5:14 AM, Eric Bénard<eric@eukrea.com> wrote: >> Hi, >> >> Le Fri, 6 Jan 2012 20:51:54 -0800, >> Steve Sakoman<steve@sakoman.com> a écrit : >>> -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/" >>> +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" >> >> isn't this directory necessary for dhcp-server ? > > Sorry for the delay in responding! I missed seeing your comment. > > Yes, both packages need this directory. But the dhcp-server package > init already creates it if it doesn't exist: > You can still have it in the dhcp-server Package as long as the attributes (ownership, perm, ...) are the same and it's not a symlink, so please include it with the FILES-dhcp-server. Sau! > case "$1" in > start) > echo -n "Starting DHCP server: " > test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ > > So it should be no issue moving the /var/lib/dhcp FILE spec to the > dhcp-client package. > > Steve > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >
On Thu, Jan 12, 2012 at 12:47 PM, Saul Wold <sgw@linux.intel.com> wrote: > On 01/11/2012 11:00 AM, Steve Sakoman wrote: >> >> On Sat, Jan 7, 2012 at 5:14 AM, Eric Bénard<eric@eukrea.com> wrote: >>> >>> Hi, >>> >>> Le Fri, 6 Jan 2012 20:51:54 -0800, >>> Steve Sakoman<steve@sakoman.com> a écrit : >>>> >>>> -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server >>>> ${localstatedir}/lib/dhcp/" >>>> +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" >>> >>> >>> isn't this directory necessary for dhcp-server ? >> >> >> Sorry for the delay in responding! I missed seeing your comment. >> >> Yes, both packages need this directory. But the dhcp-server package >> init already creates it if it doesn't exist: >> > You can still have it in the dhcp-server Package as long as the attributes > (ownership, perm, ...) are the same and it's not a symlink, so please > include it with the FILES-dhcp-server. In my experience you can't add an item to more than one FILES spec. I just did the experiment of including it in both client and server FILES, and the directory only shows up it the one that occurs first, server in this case. I added the directory to the client FILES in my patch because I saw that the server init creates the directory if it doesn't exist. I still believe that the original patch is the best way to handle this. Steve
On 01/12/2012 01:56 PM, Steve Sakoman wrote: > On Thu, Jan 12, 2012 at 12:47 PM, Saul Wold<sgw@linux.intel.com> wrote: >> On 01/11/2012 11:00 AM, Steve Sakoman wrote: >>> >>> On Sat, Jan 7, 2012 at 5:14 AM, Eric Bénard<eric@eukrea.com> wrote: >>>> >>>> Hi, >>>> >>>> Le Fri, 6 Jan 2012 20:51:54 -0800, >>>> Steve Sakoman<steve@sakoman.com> a écrit : >>>>> >>>>> -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server >>>>> ${localstatedir}/lib/dhcp/" >>>>> +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" >>>> >>>> >>>> isn't this directory necessary for dhcp-server ? >>> >>> >>> Sorry for the delay in responding! I missed seeing your comment. >>> >>> Yes, both packages need this directory. But the dhcp-server package >>> init already creates it if it doesn't exist: >>> >> You can still have it in the dhcp-server Package as long as the attributes >> (ownership, perm, ...) are the same and it's not a symlink, so please >> include it with the FILES-dhcp-server. > > In my experience you can't add an item to more than one FILES spec. > > I just did the experiment of including it in both client and server > FILES, and the directory only shows up it the one that occurs first, > server in this case. > > I added the directory to the client FILES in my patch because I saw > that the server init creates the directory if it doesn't exist. > > I still believe that the original patch is the best way to handle this. > Fair enough, should I consider this RFC patch now the real patch or will you resend? Sau! > Steve >
On Fri, 2012-01-06 at 20:51 -0800, Steve Sakoman wrote: > Otherwise dhclient encounters errors of this type: > > dhclient: can't create /var/lib/dhcp/dhclient-c0c60402-0bc5-4bd7-bc3b-49a27fa37d72-eth1.lease: No such file or directory > > Signed-off-by: Steve Sakoman <steve@sakoman.com> > --- > meta/recipes-connectivity/dhcp/dhcp.inc | 4 ++-- > meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) Merged to master, thanks. Richard
Patch
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc index f9d80e7..be256ce 100644 --- a/meta/recipes-connectivity/dhcp/dhcp.inc +++ b/meta/recipes-connectivity/dhcp/dhcp.inc @@ -59,14 +59,14 @@ PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" FILES_${PN} = "" -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/" +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" RRECOMMENDS_dhcp-server = "dhcp-server-config" FILES_dhcp-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf" FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay" -FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf" +FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf ${localstatedir}/lib/dhcp/" RDEPENDS_dhcp-client = "bash" FILES_dhcp-omshell = "${bindir}/omshell" diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb b/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb index 2471d61..a3a560b 100644 --- a/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb +++ b/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb @@ -1,6 +1,6 @@ require dhcp.inc -PR = "r4" +PR = "r5" SRC_URI += "file://fixincludes.patch \ file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
Otherwise dhclient encounters errors of this type: dhclient: can't create /var/lib/dhcp/dhclient-c0c60402-0bc5-4bd7-bc3b-49a27fa37d72-eth1.lease: No such file or directory Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/recipes-connectivity/dhcp/dhcp.inc | 4 ++-- meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)