{"id":6493,"date":"2020-12-11T19:45:56","date_gmt":"2020-12-11T17:45:56","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=6493"},"modified":"2020-12-11T19:45:56","modified_gmt":"2020-12-11T17:45:56","slug":"checksum-mismatch-in-deb-package-for-desktop-files","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2020\/12\/11\/checksum-mismatch-in-deb-package-for-desktop-files\/","title":{"rendered":"Checksum mismatch in deb package for .desktop files"},"content":{"rendered":"<ul>\n<li>VSCode Version: 1.53.0<\/li>\n<li>OS Version: Ubuntu Linux 20.04<\/li>\n<\/ul>\n<p>Steps to Reproduce:<\/p>\n<ol>\n<li>install .deb package<\/li>\n<li>run\u00a0<code>debsums -s<\/code><\/li>\n<\/ol>\n<p>Does this issue occur when all extensions are disabled?: Yes<\/p>\n<p>I&#8217;d like to resurrect\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode\/issues\/37762\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/microsoft\/vscode\/issues\/37762\/hovercard\">#37762<\/a>: the checksums for .desktop files included in the .deb archive fail to pass post-install.<\/p>\n<pre><code>$ debsums -s code\r\ndebsums: changed file \/usr\/share\/applications\/code.desktop (from code package)\r\ndebsums: changed file \/usr\/share\/applications\/code-url-handler.desktop (from code package)\r\n<\/code><\/pre>\n<p>This happens because the postinst script calls\u00a0<code>desktop-file-install<\/code>\u00a0for the .desktop files, which adds an\u00a0<code>X-Desktop-File-Install-Version<\/code>\u00a0entry to them, and hence the checksums change.<\/p>\n<p>I don&#8217;t know why the\u00a0<code>desktop-file-install<\/code>\u00a0call is there, as including the .desktop files in the deb archive is sufficient to have them installed (in their proper place under \/usr\/share\/applications\/), with the checksum intact.<\/p>\n<p>I built the package with just those\u00a0<code>desktop-file-install<\/code>\u00a0calls removed (see below), after which the checksums pass post-install (with no other changes that I can see).<\/p>\n<pre><code>diff --git a\/resources\/linux\/debian\/postinst.template b\/resources\/linux\/debian\/postinst.template\r\nindex c72fe5f9f5..dcc147de93 100755\r\n--- a\/resources\/linux\/debian\/postinst.template\r\n+++ b\/resources\/linux\/debian\/postinst.template\r\n@@ -12,12 +12,6 @@ ln -s \/usr\/share\/@@NAME@@\/bin\/@@NAME@@ \/usr\/bin\/@@NAME@@\r\n # developers would prefer a terminal editor as the default.\r\n update-alternatives --install \/usr\/bin\/editor editor \/usr\/bin\/@@NAME@@ 0\r\n \r\n-# Install the desktop entry\r\n-if hash desktop-file-install 2&gt;\/dev\/null; then\r\n-       desktop-file-install \/usr\/share\/applications\/@@NAME@@.desktop\r\n-       desktop-file-install \/usr\/share\/applications\/@@NAME@@-url-handler.desktop\r\n-fi\r\n-\r\n # Update mimetype database to pickup workspace mimetype\r\n if hash update-mime-database 2&gt;\/dev\/null; then\r\n        update-mime-database \/usr\/share\/mime<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>VSCode Version: 1.53.0 OS Version: Ubuntu Linux 20.04 Steps to Reproduce: install .deb package run\u00a0debsums -s Does this issue occur when all extensions are disabled?: Yes I&#8217;d like to resurrect\u00a0#37762: the checksums for .desktop files included in the .deb archive fail to pass post-install. $ debsums -s code debsums: changed file \/usr\/share\/applications\/code.desktop (from code package) [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8860],"tags":[362,2679,22860],"class_list":["post-6493","post","type-post","status-publish","format-standard","hentry","category-vianhallintajarjestelmat","tag-debian","tag-ubuntu","tag-vscode","sijainti-github"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/6493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=6493"}],"version-history":[{"count":1,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/6493\/revisions"}],"predecessor-version":[{"id":6494,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/6493\/revisions\/6494"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=6493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=6493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=6493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}