Skip to contentSkip to conversation

DHCP and reduction of amount of packages installer by xinit

PATCH Applied Otavio Salvador 3 participants 9 messages Nov 10, 2011 – Nov 12, 2011

lore
Share & tools
lore
#0 lore raw

cover DHCP and reduction of amount of packages installer by xinit

The following changes since commit 379c77d1516fe8fdbd1cd7063f709b5266872b03:

populate_*.bbclass: Correct INSTALL variable name after recent multilib changes (2011-11-10 18:05:06 +0000)

are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD

Otavio Salvador (3):
dhcp: generate initial leases files for server
util-linux: split mcookie onto a package
xinit: rdepends on util-linux-mcookie to avoid brining whole
util-linux

 meta/recipes-connectivity/dhcp/dhcp.inc           |    9 ++++++++-
 meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb      |    2 +-
 meta/recipes-core/util-linux/util-linux.inc       |    3 ++-
 meta/recipes-core/util-linux/util-linux_2.19.1.bb |    2 +-
 meta/recipes-graphics/xorg-app/xinit_1.3.0.bb     |    4 ++--
 5 files changed, 14 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/3 dhcp: generate initial leases files for server

---
 meta/recipes-connectivity/dhcp/dhcp.inc      |    9 ++++++++-
 meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)
meta/recipes-connectivity/dhcp/dhcp.inc +8 -1
index 1cc529d..f9d80e7 100644
@@ -51,13 +51,15 @@ do_install_append () {
 		mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
 	fi
 	install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+
+	install -d ${D}${localstatedir}/lib/dhcp/
 }
 
 PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
 
 FILES_${PN} = ""
 
-FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server"
+FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/"
 RRECOMMENDS_dhcp-server = "dhcp-server-config"
 
 FILES_dhcp-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
@@ -68,3 +70,8 @@ FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${
 RDEPENDS_dhcp-client = "bash"
 
 FILES_dhcp-omshell = "${bindir}/omshell"
+
+pkg_postinst_dhcp-server() {
+    touch $D/${localstatedir}/lib/dhcp/dhcpd.leases
+    touch $D/${localstatedir}/lib/dhcp/dhcpd6.leases
+}
meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb +1 -1
index 8ed7d76..2471d61 100644
@@ -1,6 +1,6 @@
 require dhcp.inc
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI += "file://fixincludes.patch \
             file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
Signature · 1 line
1.7.2.5
#2 lore raw

Re: [PATCH 1/3] dhcp: generate initial leases files for server

Am Donnerstag, den 10.11.2011, 21:37 +0000 schrieb Otavio Salvador:

What is the error message you are getting?

Quoted 5 lines
---
 meta/recipes-connectivity/dhcp/dhcp.inc      |    9 ++++++++-
 meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

[…]

Thanks,

Paul

#3 lore raw

Re: [PATCH 1/3] dhcp: generate initial leases files for server

Quoted 11 lines · Paul Menzel

Am Donnerstag, den 10.11.2011, 21:37 +0000 schrieb Otavio Salvador:

What is the error message you are getting?

Quoted 5 lines

---
 meta/recipes-connectivity/dhcp/dhcp.inc      |    9 ++++++++- meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb |    2 +-

 2 files changed, 9 insertions(+), 2 deletions(-)

[…]

if not using the init script it fails as the leases are created by it. I am using it using systemd and this fails without the leases thus this allows it to work out of box.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#4 lore raw

PATCH 2/3 util-linux: split mcookie onto a package

In reply to Otavio Salvador
---
 meta/recipes-core/util-linux/util-linux.inc       |    3 ++-
 meta/recipes-core/util-linux/util-linux_2.19.1.bb |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +2 -1
index 4db577c..dcf0ed9 100644
@@ -30,7 +30,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-mount util-linux-readprofile util-linux-libblkid \
              util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
-	     util-linux-chkdupexe util-linux-mkfs"
+	     util-linux-chkdupexe util-linux-mkfs util-linux-mcookie"
 
 EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \
  --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \
@@ -45,6 +45,7 @@ FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
 FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${PN} ${sbindir}/swapoff.${PN}"
 FILES_util-linux-losetup = "${base_sbindir}/losetup.${PN}"
 FILES_util-linux-mount = "${base_bindir}/mount.${PN}"
+FILES_util-linux-mcookie = "${bindir}/mcookie"
 FILES_util-linux-umount = "${base_bindir}/umount.${PN}"
 FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${PN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
meta/recipes-core/util-linux/util-linux_2.19.1.bb +1 -1
index fb5637e..e2fb727 100644
@@ -1,5 +1,5 @@
 MAJOR_VERSION = "2.19"
-PR = "r9"
+PR = "r10"
 require util-linux.inc
 
 # note that `lscpu' is under GPLv3+
Signature · 1 line
1.7.2.5
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] util-linux: split mcookie onto a package

Am Donnerstag, den 10.11.2011, 21:37 +0000 schrieb Otavio Salvador:

Sau!, if you take this patch, please correct *i*nto in the commit summary and add

mcookie is needed by startx and according to the manual page also by xauth [1].

[1] http://linux.die.net/man/1/mcookie

as the commit message.

Quoted 1 line

[…]

Thanks,

Paul

#6 lore raw

PATCH 3/3 xinit: rdepends on util-linux-mcookie to avoid brining whole util-linux

In reply to Otavio Salvador
---
 meta/recipes-graphics/xorg-app/xinit_1.3.0.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/xorg-app/xinit_1.3.0.bb +2 -2
index 6953ccc..08dfe12 100644
@@ -10,12 +10,12 @@ then terminate."
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=0d4b5eef75f1584ccbdc5e4a34314407"
 
-PR = "r1"
+PR = "r2"
 PE = "1"
 
 EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
 
-RDEPENDS_${PN} += "util-linux"
+RDEPENDS_${PN} += "util-linux-mcookie"
 
 FILES_${PN} += "${libdir}X11/xinit"
 
Signature · 1 line
1.7.2.5
Reviewed-by on v1 3/3
#7 lore raw

Re: [PATCH 3/3] xinit: rdepends on util-linux-mcookie to avoid brining whole util-linux

Am Donnerstag, den 10.11.2011, 21:37 +0000 schrieb Otavio Salvador:

s/brining/bringing in/

Commit message body:

With

commit 1053a6a8e15851ef139d8aa4683849fc2fc277e1
Author: Paul Menzel <[email protected]>
Date: Tue Nov 8 13:00:32 2011 +0100

xinit: Fix startx looking for mcookie in sysroot

util-linux was added as a run time dependency because it includes /usr/bin/mcookie needed for startx. This dragged in 10 packages to images using startx. Packaging mcookie separately in the previous patch and only run time depending on util-linux-mcookie solves this problem.

Quoted 1 line
Quoted 3 lines
---
 meta/recipes-graphics/xorg-app/xinit_1.3.0.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

[…]

Thanks,

Paul

Applied
#8 lore raw
In reply to Otavio Salvador
Quoted 10 lines · Otavio Salvador

The following changes since commit 379c77d1516fe8fdbd1cd7063f709b5266872b03:

populate_*.bbclass: Correct INSTALL variable name after recent multilib changes (2011-11-10 18:05:06 +0000)

are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD

Otavio Salvador (3):
dhcp: generate initial leases files for server

Need a better comment, I will update based on your email.

Quoted 4 lines

util-linux: split mcookie onto a package
xinit: rdepends on util-linux-mcookie to avoid brining whole
util-linux

Merged into OE-Core

Thanks
Sau!

Quoted 7 lines
  meta/recipes-connectivity/dhcp/dhcp.inc           |    9 ++++++++-
  meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb      |    2 +-
  meta/recipes-core/util-linux/util-linux.inc       |    3 ++-
  meta/recipes-core/util-linux/util-linux_2.19.1.bb |    2 +-
  meta/recipes-graphics/xorg-app/xinit_1.3.0.bb     |    4 ++--
  5 files changed, 14 insertions(+), 6 deletions(-)