{"id":12603,"date":"2026-10-21T12:47:18","date_gmt":"2026-10-21T17:47:18","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=12603"},"modified":"2026-10-21T15:49:45","modified_gmt":"2026-10-21T20:49:45","slug":"installing-packages-from-koji","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=12603","title":{"rendered":"Installing Packages from Koji"},"content":{"rendered":"<p>Quick script to install the version of <a href=\"https:\/\/openai.com\/index\/coordinated-disclosure-of-critical-vulnerabilities\/\" target=\"_blank\" rel=\"noopener\">PHP that&#8217;s been patched for the two critical vulns<\/a> today<\/p>\n<pre>dnf install koji\r\n\r\nmkdir -p \/root\/php-8.5.12-koji\r\ncd \/root\/php-8.5.12-koji\r\n\r\nkoji download-build --arch=x86_64 --arch=noarch php-8.5.12-1.fc44\r\n\r\n# Select only RPMs whose package name and architecture are already installed.\r\nrpms=()\r\nfor file in .\/*.rpm; do\r\npackage=$(rpm -qp --qf '%{NAME}.%{ARCH}' \"$file\") || exit 1\r\nif rpm -q \"$package\" &gt;\/dev\/null 2&gt;&amp;1; then\r\nrpms+=(\"$file\")\r\nfi\r\ndone\r\n\r\nif ((${#rpms[@]} == 0)); then\r\necho \"No downloaded RPMs match installed packages.\"\r\nexit 1\r\nfi\r\n\r\nprintf 'Selected: %s\\n' \"${rpms[@]}\"\r\n\r\ndnf install \"${rpms[@]}\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Quick script to install the version of PHP that&#8217;s been patched for the two critical vulns today dnf install koji mkdir -p \/root\/php-8.5.12-koji cd \/root\/php-8.5.12-koji koji download-build &#8211;arch=x86_64 &#8211;arch=noarch php-8.5.12-1.fc44 # Select only RPMs whose package name and architecture are already installed. rpms=() for file in .\/*.rpm; do package=$(rpm -qp &#8211;qf &#8216;%{NAME}.%{ARCH}&#8217; &#8220;$file&#8221;) || exit &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[47,2224,35],"class_list":["post-12603","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-fedora","tag-patching","tag-php"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/12603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12603"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/12603\/revisions"}],"predecessor-version":[{"id":12604,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/12603\/revisions\/12604"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}