{"id":1210,"date":"2015-09-25T10:00:24","date_gmt":"2015-09-25T08:00:24","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=1210"},"modified":"2015-09-25T10:00:24","modified_gmt":"2015-09-25T08:00:24","slug":"modificare-le-dipendenze-di-un-pacchetto-deb","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=1210","title":{"rendered":"Modificare le dipendenze di un pacchetto .deb"},"content":{"rendered":"<p>Mi sono recentemente trovato a dover installare il pacchetto msktutil per poter inserire uno squid3 in un dominio AD con samba 4.<br \/>\nil problema \u00e8 stato che questo pacchetto ha come dipendenza libkrb53 che in wheezy non esiste pi\u00f9 e si chiama libkrb5-3, dopo aver googlato in lungo e in largo ho trovato questo url <a href=\"http:\/\/superuser.com\/questions\/280370\/how-to-easily-edit-control-file-in-deb-package\">http:\/\/superuser.com\/questions\/280370\/how-to-easily-edit-control-file-in-deb-package<\/a> che mi ha risolto il problema riporto di seguito integralmente lo script che sottolineo <span style=\"text-decoration: underline;\">NON<\/span> \u00e8 farina del mio sacco.<\/p>\n<pre><code>DEBFILE=\"$1\"\r\nTMPDIR=`mktemp -d \/tmp\/deb.XXXXXXXXXX` || exit 1\r\nOUTPUT=`basename \"$DEBFILE\" .deb`.modfied.deb\r\n\r\nif [[ -e \"$OUTPUT\" ]]; then\r\n  echo \"$OUTPUT exists.\"\r\n  rm -r \"$TMPDIR\"\r\n  exit 1\r\nfi\r\n\r\ndpkg-deb -x \"$DEBFILE\" \"$TMPDIR\"\r\ndpkg-deb --control \"$DEBFILE\" \"$TMPDIR\"\/DEBIAN\r\n\r\nif [[ ! -e \"$TMPDIR\"\/DEBIAN\/control ]]; then\r\n  echo DEBIAN\/control not found.\r\n\r\n  rm -r \"$TMPDIR\"\r\n  exit 1\r\nfi\r\n\r\nCONTROL=\"$TMPDIR\"\/DEBIAN\/control\r\n\r\nMOD=`stat -c \"%y\" \"$CONTROL\"`\r\nvim \"$CONTROL\"\r\n\r\nif [[ \"$MOD\" == `stat -c \"%y\" \"$CONTROL\"` ]]; then\r\n  echo Not modfied.\r\nelse\r\n  echo Building new deb...\r\n  dpkg -b \"$TMPDIR\" \"$OUTPUT\"\r\nfi\r\n\r\nrm -r \"$TMPDIR\"\r\n\r\nl'unica differenza con l'originale \u00e8 che ho usato vim al posto di vi per mia comodit\u00e0.\r\n<\/code><\/pre>\n<div id=\"link64_adl_tabid\" style=\"display: none;\" data-url=\"http:\/\/clark.tipistrani.it\/wp-admin\/post.php?post=1210&amp;action=edit\">22<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Mi sono recentemente trovato a dover installare il pacchetto msktutil per poter inserire uno squid3 in un dominio AD con samba 4. il problema \u00e8 stato che questo pacchetto ha come dipendenza libkrb53 che in wheezy non esiste pi\u00f9 e si chiama libkrb5-3, dopo aver googlato in lungo e in largo ho trovato questo url [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[81,82,83,25],"class_list":["post-1210","post","type-post","status-publish","format-standard","hentry","category-work","tag-deb","tag-dipendenze","tag-modifica","tag-script-2"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1210"}],"version-history":[{"count":3,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1210\/revisions"}],"predecessor-version":[{"id":1247,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1210\/revisions\/1247"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1210"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}