Skip to contentSkip to conversation

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

PATCH Superseded Ross Burton 2 participants 6 messages Feb 14, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
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
#4 lore raw

PATCH 2/3 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
#5 lore raw

PATCH 3/3 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
#2 lore raw

Re: [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata

In reply to Ross Burton
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.

---
 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 · 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]
#3 lore raw

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