message: identity: add app-specific node ID
  This adds an hardcoded application ID (de35106b6ec24688b63afddaa156679b)
  and uses it to get an app-specific node ID.
diff: -use failure::{Fallible, ResultExt};
  +use failure::{format_err, Fallible, ResultExt};
  +use libsystemd::id128;
  use serde::Serialize;
  -use uuid::Uuid;
  /// Default group for reboot management.
  static DEFAULT_GROUP: &str = "default";
  +/// Application ID (`de35106b6ec24688b63afddaa156679b`)
  +static APP_ID: &[u8] = &[
  + 0xde, 0x35, 0x10, 0x6b, 0x6e, 0xc2, 0x46, 0x88, 0xb6, 0x3a, 0xfd, 0xda, 0xa1, 0x56, 0x67, 0x9b,
  +];
  +
  /// Agent identity.
  #[derive(Debug, Serialize)]
  pub(crate) struct Identity {
  @@ -15,7 +20,7 @@ pub(crate) struct Identity {
  /// Update groupd.
  pub(crate) group: String,
  /// Unique node identifier.
  - pub(crate) node_uuid: Uuid,
  + pub(crate) node_uuid: id128::Id128,
  /// OS platform.
  pub(crate) platform: String,
  /// Stream label.
  @@ -51,7 +56,11 @@ impl Identity {
  let basearch = read_basearch()?;
  let stream = read_stream()?;
  let platform = read_platform_id()?;
  - let node_uuid = compute_node_uuid()?;
  + let node_uuid = {
  + let app_id = id128::Id128::try_from_slice(APP_ID)
  + .map_err(|e| format_err!("failed to parse application ID: {}", e))?;
  + compute_node_uuid(&app_id)?
  + };
  let current_version = read_os_version().context("failed to get current OS version")?;
  let id = Self {
  @@ -91,8 +100,8 @@ fn read_os_version() -> Fallible<String> {
  Ok(ver)
  }
  -fn compute_node_uuid() -> Fallible<Uuid> {
  - // TODO(lucab): hash machine-id.
  - let node_uuid = Uuid::from_u128(0);
  - Ok(node_uuid)
  +fn compute_node_uuid(app_id: &id128::Id128) -> Fallible<id128::Id128> {
  + let id = id128::get_machine_app_specific(app_id)
  + .map_err(|e| format_err!("failed to get node ID: {}", e))?;
  + Ok(id)
  }
  