Openembedded Core Discussions
 help / color / mirror / Atom feed
* Gnupg recipe fixes
@ 2013-03-25  0:55 Paul Barker
  2013-03-25  0:55 ` [PATCH 1/2] gnupg: Replace manual link with update-alternatives Paul Barker
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Barker @ 2013-03-25  0:55 UTC (permalink / raw)
  To: openembedded-core

I'm setting up a signed apt repository of .deb packages built using OpenEmbedded
and I've ran into an issue with apt-get on the target board not being able to
find 'gpgv' to verify the signatures. This is installed as 'gpgv2' in the gnupg
recipe. Therefore I've used update-alternatives to create the appropriate link.

Whilst I was doing this, I felt it would be a good idea to replace the manual
creation of the 'gpg'->'gpg2' link in a do_install_append() function with proper
usage of update-alternatives.

This is my first attempt at using git send-email and submitting patches to
OpenEmbedded so if I've done anything wrong please point me in the right
direction.

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk



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

* [PATCH 1/2] gnupg: Replace manual link with update-alternatives
  2013-03-25  0:55 Gnupg recipe fixes Paul Barker
@ 2013-03-25  0:55 ` Paul Barker
  2013-03-25  0:55 ` [PATCH 2/2] gnupg: Added update-alternatives entry for gpgv Paul Barker
  2013-03-25 12:57 ` Gnupg recipe fixes Paul Barker
  2 siblings, 0 replies; 7+ messages in thread
From: Paul Barker @ 2013-03-25  0:55 UTC (permalink / raw)
  To: openembedded-core

Removed manual creation of '/usr/bin/gpg' link to 'gpg2' and replaced with
proper usage of update-alternatives.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 meta/recipes-support/gnupg/gnupg_2.0.19.bb |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-support/gnupg/gnupg_2.0.19.bb b/meta/recipes-support/gnupg/gnupg_2.0.19.bb
index 8cd793b..2322a9e 100644
--- a/meta/recipes-support/gnupg/gnupg_2.0.19.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.0.19.bb
@@ -9,7 +9,7 @@ PTH = "pth"
 PTH_libc-uclibc = "npth"
 PR = "r5"
 
-inherit autotools gettext
+inherit autotools gettext update-alternatives
 
 SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://GnuPG2-CVE-2012-6085.patch"
@@ -25,6 +25,7 @@ EXTRA_OECONF = "--disable-ldap \
                 --with-readline=${STAGING_LIBDIR}/.. \
                "
 
-do_install_append() {
-	ln -sf gpg2 ${D}${bindir}/gpg
-}
+ALTERNATIVE_gnupg = "gpg"
+ALTERNATIVE_TARGET[gpg] = "${bindir}/gpg2"
+ALTERNATIVE_LINK_NAME[gpg] = "${bindir}/gpg"
+ALTERNATIVE_PRIORITY[gpg] = "100"
-- 
1.7.10.4




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

* [PATCH 2/2] gnupg: Added update-alternatives entry for gpgv
  2013-03-25  0:55 Gnupg recipe fixes Paul Barker
  2013-03-25  0:55 ` [PATCH 1/2] gnupg: Replace manual link with update-alternatives Paul Barker
@ 2013-03-25  0:55 ` Paul Barker
  2013-03-25 12:57 ` Gnupg recipe fixes Paul Barker
  2 siblings, 0 replies; 7+ messages in thread
From: Paul Barker @ 2013-03-25  0:55 UTC (permalink / raw)
  To: openembedded-core

Added update-alternatives entry linking '/usr/bin/gpgv' to 'gpgv2'. This is
required to allow apt-get to verify a signed repository.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 meta/recipes-support/gnupg/gnupg_2.0.19.bb |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/gnupg/gnupg_2.0.19.bb b/meta/recipes-support/gnupg/gnupg_2.0.19.bb
index 2322a9e..63f08cb 100644
--- a/meta/recipes-support/gnupg/gnupg_2.0.19.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.0.19.bb
@@ -25,7 +25,10 @@ EXTRA_OECONF = "--disable-ldap \
                 --with-readline=${STAGING_LIBDIR}/.. \
                "
 
-ALTERNATIVE_gnupg = "gpg"
+ALTERNATIVE_gnupg = "gpg gpgv"
 ALTERNATIVE_TARGET[gpg] = "${bindir}/gpg2"
 ALTERNATIVE_LINK_NAME[gpg] = "${bindir}/gpg"
 ALTERNATIVE_PRIORITY[gpg] = "100"
+ALTERNATIVE_TARGET[gpgv] = "${bindir}/gpgv2"
+ALTERNATIVE_LINK_NAME[gpgv] = "${bindir}/gpgv"
+ALTERNATIVE_PRIORITY[gpgv] = "100"
-- 
1.7.10.4




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

* Re: Gnupg recipe fixes
  2013-03-25  0:55 Gnupg recipe fixes Paul Barker
  2013-03-25  0:55 ` [PATCH 1/2] gnupg: Replace manual link with update-alternatives Paul Barker
  2013-03-25  0:55 ` [PATCH 2/2] gnupg: Added update-alternatives entry for gpgv Paul Barker
@ 2013-03-25 12:57 ` Paul Barker
  2013-03-25 13:25   ` Richard Purdie
  2 siblings, 1 reply; 7+ messages in thread
From: Paul Barker @ 2013-03-25 12:57 UTC (permalink / raw)
  To: openembedded-core

On Mon, 25 Mar 2013 00:55:05 +0000
Paul Barker <paul@paulbarker.me.uk> wrote:

> I'm setting up a signed apt repository of .deb packages built using
> OpenEmbedded and I've ran into an issue with apt-get on the target
> board not being able to find 'gpgv' to verify the signatures. This is
> installed as 'gpgv2' in the gnupg recipe. Therefore I've used
> update-alternatives to create the appropriate link.
> 

I've re-thought this already. Is update-alternatives the right thing to
use here? Maybe not as there isn't anything else that provides gpgv and
gnupg_1.* and gnupg_2.* probably can't co-exist on the same install. I
could just add a line to do_install_append() to create the gpgv link
manually, similar to how the link for gpg is already created. Please
let me know which is the better solution here.

I also noticed that gnupg_1.4.7.bb splits gpgv into a separate package
but gnupg_2.0.19 doesn't. I could write a patch to modify one of these
to match the other if desired?

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk



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

* Re: Gnupg recipe fixes
  2013-03-25 12:57 ` Gnupg recipe fixes Paul Barker
@ 2013-03-25 13:25   ` Richard Purdie
  2013-03-25 13:32     ` Paul Barker
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-03-25 13:25 UTC (permalink / raw)
  To: Paul Barker; +Cc: openembedded-core

On Mon, 2013-03-25 at 12:57 +0000, Paul Barker wrote:
> On Mon, 25 Mar 2013 00:55:05 +0000
> Paul Barker <paul@paulbarker.me.uk> wrote:
> 
> > I'm setting up a signed apt repository of .deb packages built using
> > OpenEmbedded and I've ran into an issue with apt-get on the target
> > board not being able to find 'gpgv' to verify the signatures. This is
> > installed as 'gpgv2' in the gnupg recipe. Therefore I've used
> > update-alternatives to create the appropriate link.
> > 
> 
> I've re-thought this already. Is update-alternatives the right thing to
> use here? Maybe not as there isn't anything else that provides gpgv and
> gnupg_1.* and gnupg_2.* probably can't co-exist on the same install. I
> could just add a line to do_install_append() to create the gpgv link
> manually, similar to how the link for gpg is already created. Please
> let me know which is the better solution here.
> 
> I also noticed that gnupg_1.4.7.bb splits gpgv into a separate package
> but gnupg_2.0.19 doesn't. I could write a patch to modify one of these
> to match the other if desired?

I glanced at this earlier and wondered what the alternative provider
was. If we have no alternative, a symlink is fine.

I'm open to separate packaging of the utilities if its useful and they
can use used one without the other. If we'd generally need both, they
can exist in the same package fine.

Cheers,

Richard




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

* Re: Gnupg recipe fixes
  2013-03-25 13:25   ` Richard Purdie
@ 2013-03-25 13:32     ` Paul Barker
  2013-03-25 13:39       ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Barker @ 2013-03-25 13:32 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Mon, 25 Mar 2013 13:25:57 +0000
Richard Purdie <richard.purdie@linuxfoundation.org> wrote:

> On Mon, 2013-03-25 at 12:57 +0000, Paul Barker wrote:
> > On Mon, 25 Mar 2013 00:55:05 +0000
> > Paul Barker <paul@paulbarker.me.uk> wrote:
> > 
> > > I'm setting up a signed apt repository of .deb packages built
> > > using OpenEmbedded and I've ran into an issue with apt-get on the
> > > target board not being able to find 'gpgv' to verify the
> > > signatures. This is installed as 'gpgv2' in the gnupg recipe.
> > > Therefore I've used update-alternatives to create the appropriate
> > > link.
> > > 
> > 
> > I've re-thought this already. Is update-alternatives the right
> > thing to use here? Maybe not as there isn't anything else that
> > provides gpgv and gnupg_1.* and gnupg_2.* probably can't co-exist
> > on the same install. I could just add a line to do_install_append()
> > to create the gpgv link manually, similar to how the link for gpg
> > is already created. Please let me know which is the better solution
> > here.
> > 
> > I also noticed that gnupg_1.4.7.bb splits gpgv into a separate
> > package but gnupg_2.0.19 doesn't. I could write a patch to modify
> > one of these to match the other if desired?
> 
> I glanced at this earlier and wondered what the alternative provider
> was. If we have no alternative, a symlink is fine.
> 
> I'm open to separate packaging of the utilities if its useful and they
> can use used one without the other. If we'd generally need both, they
> can exist in the same package fine.
> 
> Cheers,
> 
> Richard
> 

I'll put a new patch together to add the symlink. Does this warrant
incrementing PR?

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk



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

* Re: Gnupg recipe fixes
  2013-03-25 13:32     ` Paul Barker
@ 2013-03-25 13:39       ` Richard Purdie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2013-03-25 13:39 UTC (permalink / raw)
  To: Paul Barker; +Cc: openembedded-core

On Mon, 2013-03-25 at 13:32 +0000, Paul Barker wrote:
> On Mon, 25 Mar 2013 13:25:57 +0000
> Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> 
> > On Mon, 2013-03-25 at 12:57 +0000, Paul Barker wrote:
> > > On Mon, 25 Mar 2013 00:55:05 +0000
> > > Paul Barker <paul@paulbarker.me.uk> wrote:
> > > 
> > > > I'm setting up a signed apt repository of .deb packages built
> > > > using OpenEmbedded and I've ran into an issue with apt-get on the
> > > > target board not being able to find 'gpgv' to verify the
> > > > signatures. This is installed as 'gpgv2' in the gnupg recipe.
> > > > Therefore I've used update-alternatives to create the appropriate
> > > > link.
> > > > 
> > > 
> > > I've re-thought this already. Is update-alternatives the right
> > > thing to use here? Maybe not as there isn't anything else that
> > > provides gpgv and gnupg_1.* and gnupg_2.* probably can't co-exist
> > > on the same install. I could just add a line to do_install_append()
> > > to create the gpgv link manually, similar to how the link for gpg
> > > is already created. Please let me know which is the better solution
> > > here.
> > > 
> > > I also noticed that gnupg_1.4.7.bb splits gpgv into a separate
> > > package but gnupg_2.0.19 doesn't. I could write a patch to modify
> > > one of these to match the other if desired?
> > 
> > I glanced at this earlier and wondered what the alternative provider
> > was. If we have no alternative, a symlink is fine.
> > 
> > I'm open to separate packaging of the utilities if its useful and they
> > can use used one without the other. If we'd generally need both, they
> > can exist in the same package fine.
> > 
> > Cheers,
> > 
> > Richard
> > 
> 
> I'll put a new patch together to add the symlink. Does this warrant
> incrementing PR?

In the old scheme of things this was needed but is no longer required
since we have the PR server and checksums for the tasks which change
when details like this change.

Cheers,

Richard




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

end of thread, other threads:[~2013-03-25 14:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25  0:55 Gnupg recipe fixes Paul Barker
2013-03-25  0:55 ` [PATCH 1/2] gnupg: Replace manual link with update-alternatives Paul Barker
2013-03-25  0:55 ` [PATCH 2/2] gnupg: Added update-alternatives entry for gpgv Paul Barker
2013-03-25 12:57 ` Gnupg recipe fixes Paul Barker
2013-03-25 13:25   ` Richard Purdie
2013-03-25 13:32     ` Paul Barker
2013-03-25 13:39       ` Richard Purdie

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