Allow xserver-xf86-config to ship no xorg.conf
cover Allow xserver-xf86-config to ship no xorg.conf
Hi,
This series lets a BSP not ship a xorg.conf as not all BSPs need them. This is implemented by not installing empty xorg.conf files, and making the generic xorg.conf empty (which is a good move, as it specified the intel driver).
There's a patch to package_ipkg that's required to sanity check the CONFFILES variable, as otherwise building an opkg fails when the package is empty.
Ross
The following changes since commit b15730caf0d4c40271796887505507f2501958bb:
mulitilib_header: Avoid sstate checksum issues for -native recipes (2013-02-14 12:36:08 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ross/xorg
for you to fetch changes up to d6c444561597e8546a7ae39aaa14da578456ab7d:
xserver-xf86-config: empty generic xorg.conf (2013-02-14 17:48:56 +0000)
----------------------------------------------------------------
Ross Burton (3):
package_ipk: check CONFFILES exist before adding them to metadata
xserver-xf86-config: don't ship empty xorg.conf
xserver-xf86-config: empty generic xorg.conf
meta/classes/package_ipk.bbclass | 3 ++- .../xorg-xserver/xserver-xf86-config/xorg.conf | 26 -------------------- .../xorg-xserver/xserver-xf86-config_0.1.bb | 10 +++++--- 3 files changed, 8 insertions(+), 31 deletions(-)
Ross Burton (3):
package_ipk: check CONFFILES exist before adding them to metadata
xserver-xf86-config: don't ship empty xorg.conf
xserver-xf86-config: empty generic xorg.conf
meta/classes/package_ipk.bbclass | 3 ++- .../xorg-xserver/xserver-xf86-config/xorg.conf | 26 -------------------- .../xorg-xserver/xserver-xf86-config_0.1.bb | 10 +++++--- 3 files changed, 8 insertions(+), 31 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/3 package_ipk: check CONFFILES exist before adding them to metadata
opkg-build verifies that conffiles exist, so verify that the specified files actually exist before writing them to conffiles.
This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.
--- meta/classes/package_ipk.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package_ipk.bbclass +2 -1
@@ -440,7 +440,8 @@ python do_package_ipk () { bb.utils.unlockfile(lf) raise bb.build.FuncFailed("unable to open conffiles for writing.") for f in conffiles_str.split(): - conffiles.write('%s\n' % f) + if os.path.exists(oe.path.join(root, f)): + conffiles.write('%s\n' % f) conffiles.close() os.chdir(basedir)
Signature · 1 line
1.7.10.4
Re: [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata
Quoted 2 lines · Ross Burton
opkg-build verifies that conffiles exist, so verify that the specified files actually exist before writing them to conffiles.
Shouldn't this show at least a warning about missing conffile?
opkg-build error saved me few times before adding CONFFILES with wrong pattern not matching anything in FILES.
I understand that you cannot use fatal error here for that xorg.conf use-case, but warning would be nice.
Quoted 30 lines
This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.
Signed-off-by Ross Burton <[email protected]>--- meta/classes/package_ipk.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes/package_ipk.bbclass +2
-1@@ -440,7 +440,8 @@ python do_package_ipk () { bb.utils.unlockfile(lf) raise bb.build.FuncFailed("unable to open conffiles for writing.") for f in conffiles_str.split(): - conffiles.write('%s\n' % f) + if os.path.exists(oe.path.join(root, f)): + conffiles.write('%s\n' % f) conffiles.close() os.chdir(basedir)Signature · 7 lines
1.7.10.4 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata
Quoted 4 lines · Martin Jansa
Shouldn't this show at least a warning about missing conffile?
opkg-build error saved me few times before adding CONFFILES with wrong pattern not matching anything in FILES.
I'm pretty certain rpm doesn't produce a warning, so we'd want to fix that up too.
Anyway, do we want to introduce warnings that by design will always cause errors on a set of packages?
Ross
PATCH 2/3 xserver-xf86-config: don't ship empty xorg.conf
In reply to Ross BurtonMany hardware platforms can autodetect their hardware and don't need a xorg.conf at all. Make it easy for BSPs to not ship a xorg.conf by not installing empty xorg.conf files.
--- .../recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb +6 -4
@@ -7,12 +7,14 @@ PR = "r11" SRC_URI = "file://xorg.conf" -CONFFILES_${PN} += "${sysconfdir}/X11/xorg.conf" +CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf" PACKAGE_ARCH = "${MACHINE_ARCH}" +ALLOW_EMPTY_${PN} = "1" do_install () { - install -d ${D}/${sysconfdir}/X11 - install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ + if test -s ${WORKDIR}/xorg.conf; then + install -d ${D}/${sysconfdir}/X11 + install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ + fi } -
Signature · 1 line
1.7.10.4
PATCH 3/3 xserver-xf86-config: empty generic xorg.conf
In reply to Ross BurtonThe idea of a generic xorg.conf is meaningless, especially when they specify the "intel" driver. Empty this file so that unless the BSP specifies it's own xorg.conf, no xorg.conf file is installed.
--- .../xorg-xserver/xserver-xf86-config/xorg.conf | 26 -------------------- 1 file changed, 26 deletions(-)
meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf +0 -26
@@ -1,26 +0,0 @@ - -Section "Device" - Identifier "Intel Graphics Driver" - Driver "intel" -EndSection - -Section "Monitor" - Identifier "Generic Monitor" - Option "DPMS" -EndSection - -Section "Screen" - Identifier "Default Screen" - Device "Intel Graphics Driver" - Monitor "Generic Monitor" - DefaultDepth 24 -EndSection - -Section "ServerLayout" - Identifier "Default Layout" - Screen "Default Screen" -EndSection - -Section "ServerFlags" - Option "DontZap" "0" -EndSection
Signature · 1 line
1.7.10.4