Skip to contentSkip to conversation

Allow xserver-xf86-config to ship no xorg.conf

PATCH In review Ross Burton 3 participants 7 messages Feb 15, 2013 – Feb 17, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover Allow xserver-xf86-config to ship no xorg.conf

Hi,

Same as V1, apart from changing package_deb to have the same check on conffiles as package_ipk.

Ross

The following changes since commit 5a4ea383c3fc792cea87b834655eb013120fbb15:

poky.conf: Add Ubuntu 12.04.2 to sanity tested distros (2013-02-14 23:18:00 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ross/xorg

for you to fetch changes up to 2ea6a8883fe2adfccd845bd94b10c5bf0b03bfe0:

xserver-xf86-config: empty generic xorg.conf (2013-02-15 13:04:30 +0000)

----------------------------------------------------------------
Ross Burton (4):
package_ipk: check CONFFILES exist before adding them to metadata
package_deb: 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_deb.bbclass                   |    3 ++-
 meta/classes/package_ipk.bbclass                   |    3 ++-
 .../xorg-xserver/xserver-xf86-config/xorg.conf     |   26 --------------------
 .../xorg-xserver/xserver-xf86-config_0.1.bb        |   10 +++++---
 4 files changed, 10 insertions(+), 32 deletions(-)

Ross Burton (4):
package_ipk: check CONFFILES exist before adding them to metadata
package_deb: 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_deb.bbclass                   |    3 ++-
 meta/classes/package_ipk.bbclass                   |    3 ++-
 .../xorg-xserver/xserver-xf86-config/xorg.conf     |   26 --------------------
 .../xorg-xserver/xserver-xf86-config_0.1.bb        |   10 +++++---
 4 files changed, 10 insertions(+), 32 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/4 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
index d735051..e5e76ef 100644
@@ -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
#2 lore raw

PATCH v2 2/4 package_deb: check CONFFILES exist before adding them to metadata

In reply to Ross Burton

dpkg-deb 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_deb.bbclass |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package_deb.bbclass +2 -1
index 5740948..b44eb2d 100644
@@ -411,7 +411,8 @@ python do_package_deb () {
                 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
#3 lore raw

PATCH v2 3/4 xserver-xf86-config: don't ship empty xorg.conf

In reply to Ross Burton

Many 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
index 3c29f8b..90d6f56 100644
@@ -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
#4 lore raw

PATCH v2 4/4 xserver-xf86-config: empty generic xorg.conf

In reply to Ross Burton

The 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
index 9c3d490..e69de29 100644
@@ -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
#5 lore raw
In reply to Ross Burton
Quoted 5 lines · Ross Burton

Hi,

Same as V1, apart from changing package_deb to have the same check on conffiles as package_ipk.

Unless I got the wrong set, this still seems to have trouble with the hardware BSPs for routerstation and MPC machines.

Maybe you need to build those.

Thanks
Sau!

Quoted 39 lines

Ross

The following changes since commit 5a4ea383c3fc792cea87b834655eb013120fbb15:

   poky.conf: Add Ubuntu 12.04.2 to sanity tested distros (2013-02-14 23:18:00 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ross/xorg

for you to fetch changes up to 2ea6a8883fe2adfccd845bd94b10c5bf0b03bfe0:

   xserver-xf86-config: empty generic xorg.conf (2013-02-15 13:04:30 +0000)

----------------------------------------------------------------
Ross Burton (4):
package_ipk: check CONFFILES exist before adding them to metadata
package_deb: 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_deb.bbclass                   |    3 ++-
  meta/classes/package_ipk.bbclass                   |    3 ++-
  .../xorg-xserver/xserver-xf86-config/xorg.conf     |   26 --------------------
  .../xorg-xserver/xserver-xf86-config_0.1.bb        |   10 +++++---
  4 files changed, 10 insertions(+), 32 deletions(-)

Ross Burton (4):
package_ipk: check CONFFILES exist before adding them to metadata
package_deb: 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_deb.bbclass                   |    3 ++-
  meta/classes/package_ipk.bbclass                   |    3 ++-
  .../xorg-xserver/xserver-xf86-config/xorg.conf     |   26 --------------------
  .../xorg-xserver/xserver-xf86-config_0.1.bb        |   10 +++++---
  4 files changed, 10 insertions(+), 32 deletions(-)
#6 lore raw
Quoted 11 lines · Saul Wold
Quoted 5 lines · Ross Burton

Hi,

Same as V1, apart from changing package_deb to have the same check on conffiles as package_ipk.

Unless I got the wrong set, this still seems to have trouble with the hardware BSPs for routerstation and MPC machines.

Maybe you need to build those.

I can't see the package_deb change in the branch which would explain the failures.

Cheers,

Richard