{"id":1579,"date":"2006-02-24T23:22:00","date_gmt":"2006-02-24T23:22:00","guid":{"rendered":"http:\/\/gleamynode.net\/articles\/1579\/signing-files-recursively-using-gnupg"},"modified":"2022-12-28T01:47:45","modified_gmt":"2022-12-27T16:47:45","slug":"signing-files-recursively-using-gnupg","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/","title":{"rendered":"Signing Files Recursively Using GnuPG"},"content":{"rendered":"

GnuPG<\/a> is a great privacy tool; it makes sure that the software distribution you deployed is identical with what you deployed originally. In the Apache Software Foundation<\/a>, committers have to sign all their distributions before they are mirrored to other servers such as Ibiblio.org<\/a> for security reasons. However, signing each file one by one takes too much time. There has to be an easier way, and I created a shell script which signs all files recursively in one shot.<\/p>\n

GnuPG<\/a>\ub294 \ud6cc\ub96d\ud55c \ud504\ub77c\uc774\ubc84\uc2dc \ud234\uc785\ub2c8\ub2e4. \uc774\uac83\uc744 \uc0ac\uc6a9\ud558\uba74 \uc5c5\ub85c\ub4dc\ud55c \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ubc30\ud3ec\ubcf8\uc774 \uc815\ub9d0 \uc5ec\ub7ec\ubd84\uc774 \ubc30\ud3ec\ud55c \uac83\uacfc \uc77c\uce58\ud558\ub294\uc9c0 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ud30c\uce58 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc7ac\ub2e8<\/a>\uc5d0\uc11c\ub294 \ubcf4\uc548\uc0c1\uc758 \uc774\uc720\ub85c \uac1c\ubc1c\uc790\uac00 \ubaa8\ub4e0 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ubc30\ud3ec\ubcf8\uc5d0 \uc11c\uba85\ud558\uae30 \uc804\uae4c\uc9c0\ub294 Ibiblio.org<\/a>\uc640 \uac19\uc740 \ub2e4\ub978 \uc11c\ubc84\ub85c \ubbf8\ub7ec\ub9c1\uc774 \ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uadf8\ub7ec\ub098, \uac01\uac01\uc758 \ud30c\uc77c\uc744 \ud558\ub098 \ud558\ub098 \uc11c\uba85\ud558\ub294 \uac83\uc740 \uc2dc\uac04\uc774 \ub108\ubb34 \uc624\ub798 \uac78\ub9bd\ub2c8\ub2e4. \uc880 \ub354 \uc26c\uc6b4 \ubc29\ubc95\uc774 \uc788\uc5b4\uc57c \ud560 \uac83 \uac19\uc544\uc11c \ud55c \ubc29\uc5d0 \uc11c\ube0c\ub514\ub809\ud1a0\ub9ac\uc5d0 \uc788\ub294 \ubaa8\ub4e0 \ud30c\uc77c\uc744 \uc11c\uba85\ud558\ub294 \uc258 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc791\uc131\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n

#!\/bin\/sh<\/p>\n

DEFAULT_KEY=”john.doe@gmail.com”<\/p>\n

echo -n “PGP Key Password: “
\nstty -echo
\nread PASSWORD
\nstty echo
\necho “”<\/p>\n

for FILE in $(find . -not ‘(‘ -name “*.md5\u2033 -or -name “*.sha1\u2033 -or -name “*.asc” ‘)’ -and -type f) ; do
\n    if [ -f “$FILE.asc” ]; then
\n        echo “Skipping: $FILE”
\n        continue
\n    fi<\/p>\n

    echo -n “Signing: $FILE … “<\/p>\n

    md5sum “$FILE” | cut “-d ” -f1 > “$FILE.md5\u2033
\n    sha1sum “$FILE” | cut “-d ” -f1 > “$FILE.sha1\u2033<\/p>\n

    echo “$PASSWORD” | gpg –default-key “$DEFAULT_KEY” –detach-sign –armor –no-tty –yes –passphrase-fd 0 “$FILE” && echo done.
\ndone\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"

GnuPG is a great privacy tool; it makes sure that the software distribution you deployed is identical with what you deployed originally. In the Apache Software Foundation, committers have to sign all their distributions before they are mirrored to other servers such as Ibiblio.org for security reasons. However, signing each file one by one takes… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"Signing Files Recursively Using GnuPG — T's message of the day<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Signing Files Recursively Using GnuPG — T's message of the day\" \/>\n<meta property=\"og:description\" content=\"GnuPG is a great privacy tool; it makes sure that the software distribution you deployed is identical with what you deployed originally. In the Apache Software Foundation, committers have to sign all their distributions before they are mirrored to other servers such as Ibiblio.org for security reasons. However, signing each file one by one takes... Continue reading →\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\" \/>\n<meta property=\"og:site_name\" content=\"T's message of the day\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/trustin\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/trustin\" \/>\n<meta property=\"article:published_time\" content=\"2006-02-24T23:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-27T16:47:45+00:00\" \/>\n<meta name=\"author\" content=\"Trustin Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/trustin\" \/>\n<meta name=\"twitter:site\" content=\"@trustin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Trustin Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\"},\"author\":{\"name\":\"Trustin Lee\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\"},\"headline\":\"Signing Files Recursively Using GnuPG\",\"datePublished\":\"2006-02-24T23:22:00+00:00\",\"dateModified\":\"2022-12-27T16:47:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\"},\"wordCount\":192,\"publisher\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\",\"url\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\",\"name\":\"Signing Files Recursively Using GnuPG — T's message of the day\",\"isPartOf\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#website\"},\"datePublished\":\"2006-02-24T23:22:00+00:00\",\"dateModified\":\"2022-12-27T16:47:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vault.motd.kr\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Signing Files Recursively Using GnuPG\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#website\",\"url\":\"https:\/\/vault.motd.kr\/wordpress\/\",\"name\":\"T's message of the day\",\"description\":\"the best is yet to come\",\"publisher\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vault.motd.kr\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\",\"name\":\"Trustin Lee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png\",\"contentUrl\":\"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png\",\"width\":966,\"height\":966,\"caption\":\"Trustin Lee\"},\"logo\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/t.motd.kr\/\",\"https:\/\/www.facebook.com\/trustin\",\"https:\/\/www.instagram.com\/trustinlee\/\",\"https:\/\/www.linkedin.com\/in\/trustin\",\"https:\/\/twitter.com\/https:\/\/www.twitter.com\/trustin\",\"https:\/\/www.youtube.com\/@trustinlee\"]}]}<\/script>","yoast_head_json":{"title":"Signing Files Recursively Using GnuPG — T's message of the day","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/","og_locale":"en_US","og_type":"article","og_title":"Signing Files Recursively Using GnuPG — T's message of the day","og_description":"GnuPG is a great privacy tool; it makes sure that the software distribution you deployed is identical with what you deployed originally. In the Apache Software Foundation, committers have to sign all their distributions before they are mirrored to other servers such as Ibiblio.org for security reasons. However, signing each file one by one takes... Continue reading →","og_url":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/","og_site_name":"T's message of the day","article_publisher":"https:\/\/www.facebook.com\/trustin","article_author":"https:\/\/www.facebook.com\/trustin","article_published_time":"2006-02-24T23:22:00+00:00","article_modified_time":"2022-12-27T16:47:45+00:00","author":"Trustin Lee","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/trustin","twitter_site":"@trustin","twitter_misc":{"Written by":"Trustin Lee","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/#article","isPartOf":{"@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/"},"author":{"name":"Trustin Lee","@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d"},"headline":"Signing Files Recursively Using GnuPG","datePublished":"2006-02-24T23:22:00+00:00","dateModified":"2022-12-27T16:47:45+00:00","mainEntityOfPage":{"@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/"},"wordCount":192,"publisher":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/","url":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/","name":"Signing Files Recursively Using GnuPG — T's message of the day","isPartOf":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#website"},"datePublished":"2006-02-24T23:22:00+00:00","dateModified":"2022-12-27T16:47:45+00:00","breadcrumb":{"@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1579\/signing-files-recursively-using-gnupg\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vault.motd.kr\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Signing Files Recursively Using GnuPG"}]},{"@type":"WebSite","@id":"https:\/\/vault.motd.kr\/wordpress\/#website","url":"https:\/\/vault.motd.kr\/wordpress\/","name":"T's message of the day","description":"the best is yet to come","publisher":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vault.motd.kr\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d","name":"Trustin Lee","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png","contentUrl":"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png","width":966,"height":966,"caption":"Trustin Lee"},"logo":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/t.motd.kr\/","https:\/\/www.facebook.com\/trustin","https:\/\/www.instagram.com\/trustinlee\/","https:\/\/www.linkedin.com\/in\/trustin","https:\/\/twitter.com\/https:\/\/www.twitter.com\/trustin","https:\/\/www.youtube.com\/@trustinlee"]}]}},"_links":{"self":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1579"}],"collection":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/comments?post=1579"}],"version-history":[{"count":1,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1579\/revisions"}],"predecessor-version":[{"id":5859,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1579\/revisions\/5859"}],"wp:attachment":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/media?parent=1579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/categories?post=1579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/tags?post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}