Bug #9969
svccfg: honour PKG_INSTALL_ROOT when building hash filename
Start date:
2018-11-08
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
When seeding an SMF database, the paths to the imported manifests end up stored in two places within the repository database:
- The
manifestfiles
property of the imported service; - A per-service tree within the
smf/manifest
service.
For example:
bloody% cp /lib/svc/seed/global.db /tmp bloody% export SVCCFG_REPOSITORY=/tmp/global.db bloody% export SVCCFG_CHECKHASH=1 bloody% svccfg import /kayak_image/r151029/lib/svc/manifest/network/ntp.xml bloody% svccfg -s ntp listprop manifestfiles manifestfiles framework manifestfiles/kayak_image_r151029_lib_svc_manifest_network_ntp_xml astring /kayak_image/r151029/lib/svc/manifest/network/ntp.xml bloody% svccfg -s manifest listprop | grep ntp kayak_image_r151029_lib_svc_manifest_network_ntp_xml framework kayak_image_r151029_lib_svc_manifest_network_ntp_xml/manifestfile astring /kayak_image/r151029/lib/svc/manifest/network/ntp.xml kayak_image_r151029_lib_svc_manifest_network_ntp_xml/md5sum opaque afcd99c29f0dedcf40278f1bf0253f6286787107e11c23bcac675faffed78f41
It's possible to set the PKG_INSTALL_ROOT
environment variable in order to modify these embedded paths, which fixes the keys and the path stored in the service itself, but not the path in smf/manifest
:
bloody% export PKG_INSTALL_ROOT=/kayak_image/r151029 bloody% svccfg import /kayak_image/r151029/lib/svc/manifest/network/ntp.xml bloody% svccfg -s ntp listprop manifestfiles manifestfiles framework manifestfiles/lib_svc_manifest_network_ntp_xml astring /lib/svc/manifest/network/ntp.xml bloody% svccfg -s manifest listprop | grep ntp lib_svc_manifest_network_ntp_xml framework lib_svc_manifest_network_ntp_xml/manifestfile astring /kayak_image/r151029/lib/svc/manifest/network/ntp.xml lib_svc_manifest_network_ntp_xml/md5sum opaque afcd99c29f0dedcf40278f1bf0253f6286787107e11c23bcac675faffed78f41
The lib_svc_manifest_network_ntp_xml/manifestfile
value should also be translated.
Updated by Andy Fiddaman over 2 years ago
- Status changed from In Progress to Pending RTI
- % Done changed from 80 to 100
Updated by Electric Monk over 2 years ago
- Status changed from Pending RTI to Closed
git commit b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90
commit b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90 Author: Andy Fiddaman <omnios@citrus-it.co.uk> Date: 2018-11-13T01:53:46.000Z 9969 svccfg: honour PKG_INSTALL_ROOT when building hash filename Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>