public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Allow xserver-xf86-config to ship no xorg.conf
@ 2013-02-14 17:52 Ross Burton
  2013-02-14 17:52 ` [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ross Burton @ 2013-02-14 17:52 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
1.7.10.4




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata
  2013-02-14 17:52 [PATCH 0/3] Allow xserver-xf86-config to ship no xorg.conf Ross Burton
@ 2013-02-14 17:52 ` Ross Burton
  2013-02-14 18:31   ` Martin Jansa
  2013-02-14 17:52 ` [PATCH 2/3] xserver-xf86-config: don't ship empty xorg.conf Ross Burton
  2013-02-14 17:52 ` [PATCH 3/3] xserver-xf86-config: empty generic xorg.conf Ross Burton
  2 siblings, 1 reply; 6+ messages in thread
From: Ross Burton @ 2013-02-14 17:52 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/package_ipk.bbclass |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index d735051..e5e76ef 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -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)
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] xserver-xf86-config: don't ship empty xorg.conf
  2013-02-14 17:52 [PATCH 0/3] Allow xserver-xf86-config to ship no xorg.conf Ross Burton
  2013-02-14 17:52 ` [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata Ross Burton
@ 2013-02-14 17:52 ` Ross Burton
  2013-02-14 17:52 ` [PATCH 3/3] xserver-xf86-config: empty generic xorg.conf Ross Burton
  2 siblings, 0 replies; 6+ messages in thread
From: Ross Burton @ 2013-02-14 17:52 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index 3c29f8b..90d6f56 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -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
 }
-
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] xserver-xf86-config: empty generic xorg.conf
  2013-02-14 17:52 [PATCH 0/3] Allow xserver-xf86-config to ship no xorg.conf Ross Burton
  2013-02-14 17:52 ` [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata Ross Burton
  2013-02-14 17:52 ` [PATCH 2/3] xserver-xf86-config: don't ship empty xorg.conf Ross Burton
@ 2013-02-14 17:52 ` Ross Burton
  2 siblings, 0 replies; 6+ messages in thread
From: Ross Burton @ 2013-02-14 17:52 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../xorg-xserver/xserver-xf86-config/xorg.conf     |   26 --------------------
 1 file changed, 26 deletions(-)

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf
index 9c3d490..e69de29 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf
@@ -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
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata
  2013-02-14 17:52 ` [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata Ross Burton
@ 2013-02-14 18:31   ` Martin Jansa
  2013-02-14 19:14     ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2013-02-14 18:31 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

On Thu, Feb 14, 2013 at 05:52:50PM +0000, Ross Burton wrote:
> 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.

> This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.

 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/package_ipk.bbclass |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
> index d735051..e5e76ef 100644
> --- a/meta/classes/package_ipk.bbclass
> +++ b/meta/classes/package_ipk.bbclass
> @@ -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)
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata
  2013-02-14 18:31   ` Martin Jansa
@ 2013-02-14 19:14     ` Burton, Ross
  0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2013-02-14 19:14 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On 14 February 2013 18:31, Martin Jansa <martin.jansa@gmail.com> wrote:
> 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-14 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 17:52 [PATCH 0/3] Allow xserver-xf86-config to ship no xorg.conf Ross Burton
2013-02-14 17:52 ` [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata Ross Burton
2013-02-14 18:31   ` Martin Jansa
2013-02-14 19:14     ` Burton, Ross
2013-02-14 17:52 ` [PATCH 2/3] xserver-xf86-config: don't ship empty xorg.conf Ross Burton
2013-02-14 17:52 ` [PATCH 3/3] xserver-xf86-config: empty generic xorg.conf Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox