mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht
Date: Thu, 1 Sep 2016 11:58:38 +0200	[thread overview]
Message-ID: <20160901095838.6ivdxukr6uv2gypd@pengutronix.de> (raw)
In-Reply-To: <6b808b5c-e3f6-6d63-9378-6495a15f3c1b@rohieb.name>

On Sun, Aug 28, 2016 at 08:36:19PM +0200, Roland Hieber wrote:
> On 28.08.2016 09:36, Robert Schwebel wrote:
> > You can use install_copy and avoid the last argument, this is the right
> > mechanism to create a directory with ownership and permissions.
> 
> Ah right thanks, it even says so in the manual :)
> 
> But thinking this through: /etc/ibrdtn/bpsec is meant to hold the
> private key and cert for the Bundle Security Protocol, which are meant
> to be generated by ibrdtn-genkey.sh, which uses openssl and hexdump to
> generate it.  So technically, IBRDTN_WITH_TLS has to select OPENSSL_BIN
> and BUSYBOX_HEXDUMP. However, if the target rootfs is read-only, running
> ibrdtn-genkey.sh on the target is futile, and in this case, those
> dependencies are unneccessary.  The key material would rather need to be
> generated at build time and/or put into projectroot/etc/ibrdtn/bpsec by
> the user.  So I'm rather thinking about adding a menuconfig option
> "install ibrdtn-genkey.sh", and let the users decide whether they want
> to generate keys on the target or deploy them via projectroot/.  I tried
> hacking the key generation into the targetinstall stage, but didn't get
> it to work, and that really seems more like a job for the configure script.

Should all devices have the same key or should each Device have its own
key? I'm don't know enough about this to make that decision.

If each device should have its own key, then take a look at what OpenSSH
does to generate its server keys:
- projectroot/etc/rc.once.d/openssh
- rules/openssh.postinst
- and the 'select RC_ONCE...' in openssh.in

rc-once is a mechanism where we remount read-write during the first boot to
do stuff that needs a writeable rootfs.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2016-09-01  9:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 14:53 Roland Hieber
2016-08-18  6:53 ` Michael Olbrich
2016-08-23  4:41   ` Roland Hieber
2016-08-25 11:02     ` Michael Olbrich
2016-08-25 15:11       ` Robert Schwebel
2016-08-28  5:27   ` Roland Hieber
2016-08-28  7:36     ` Robert Schwebel
2016-08-28 18:36       ` Roland Hieber
2016-09-01  9:58         ` Michael Olbrich [this message]
2016-09-01 15:09         ` Alexander Dahl
2016-08-29  7:42     ` Juergen Borleis
2016-08-18 10:15 ` Michael Olbrich
2016-08-28  5:32 ` [ptxdist] [PATCH v2] " Roland Hieber
2016-09-07 13:48   ` Michael Olbrich
2016-09-08  1:07     ` Roland Hieber
2016-09-08  6:35       ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160901095838.6ivdxukr6uv2gypd@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox