« ESXi : créer un vib manuellement sous linux » : différence entre les versions

De Linux Server Wiki
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 21 : Ligne 21 :


<pre>
<pre>
ar -r smartctl-6.6-4433.x86_64.vib smartctl descriptor.xml sig.pkcs7
ar -r smartctl-6.6-4433.x86_64.vib descriptor.xml sig.pkcs7 smartctl
</pre>
</pre>

Version du 12 août 2017 à 11:02

tar -xf smartmontools-6.6-0-20170808-r4433.linux-x86_64-static.tar.gz
mkdir -p opt/smartmontools
mv usr/local/sbin/smartctl opt/smartmontools/
rm -rf usr/
tar -cf smartctl opt/
TAR_SHA1=$(sha1sum smartctl | cut -d" " -f1)
gzip smartctl
mv smartctl.gz smartctl
GZIP_SHA256=$(sha256sum smartctl | cut -d" " -f1)
GZIP_SIZE=$(du --bytes smartctl | cut -f1)
touch sig.pkcs7
echo "<vib version="5.0"><type>bootbank</type><name>smartctl</name><version>6.6-4433</version><vendor>smartmontools</vendor><summary>smartctl: SMART Tool</summary><description>Tool to display S.M.A.R.T data</description><release-date>2017-08-11T10:00:59.000000+00:00</release-date><urls/><relationships><depends></depends><conflicts/><replaces/><provides/><compatibleWith/></relationships><software-tags></software-tags><system-requires><maintenance-mode>false</maintenance-mode></system-requires><file-list><file>opt/smartmontools/smartctl</file></file-list><acceptance-level>community</acceptance-level><live-install-allowed>true</live-install-allowed><live-remove-allowed>true</live-remove-allowed><cimom-restart>false</cimom-restart><stateless-ready>true</stateless-ready><overlay>false</overlay><payloads><payload name="smartctl" type="tgz" size="666"><checksum checksum-type="sha-256">256000256</checksum><checksum checksum-type="sha-1" verify-process="gunzip">10001</checksum></payload></payloads>" > descriptor.xml
sed -i s/666/$GZIP_SIZE/g descriptor.xml
sed -i sed s/256000256/$GZIP_SHA256/g descriptor.xml
sed -i s/10001/$TAR_SHA1/g descriptor.xml
ar -r smartctl-6.6-4433.x86_64.vib descriptor.xml sig.pkcs7 smartctl