{"id":3243,"date":"2026-05-17T13:00:12","date_gmt":"2026-05-17T04:00:12","guid":{"rendered":"https:\/\/www.next-hop.net\/blog\/hiraga\/?p=3243"},"modified":"2026-05-19T15:40:22","modified_gmt":"2026-05-19T06:40:22","slug":"linux-emulator-package-management-with-dnf","status":"publish","type":"post","link":"https:\/\/www.next-hop.net\/blog\/hiraga\/freebsd\/linux-emulator-package-management-with-dnf\/","title":{"rendered":"Linux Emulator\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u3092dnf\u3067\u884c\u3046"},"content":{"rendered":"<p>\u524d\u56de\u306e<a href=\"https:\/\/www.next-hop.net\/blog\/hiraga\/freebsd\/linux-emulator\/\">Linux Emulator\u3092\u52d5\u304b\u3059<\/a>\u306b\u7d9a\u304d\u3001\u3082\u3046\u5c11\u3057\u8e0f\u307f\u8fbc\u3093\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3082\u305d\u3082\u3001Linux Emulator\u74b0\u5883\u3092\u672c\u683c\u7684\u306b\u4f7f\u3046\u5834\u5408\u3001FreeBSD\u306e\u516c\u5f0f\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3060\u3051\u3067\u306f\u8db3\u308a\u307e\u305b\u3093\u3002\u5fc5\u8981\u306a\u30bd\u30d5\u30c8\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306a\u3069\u8ffd\u52a0\u306e\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<br \/>\n\u305d\u3053\u3067\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7ba1\u7406\u3092RHEL\u7cfb\u6a19\u6e96\u306ednf\u3067\u884c\u3046\u3088\u3046\u306b\u3057\u3001\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306fRockyLinux\u516c\u5f0f\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067\u3001\u3088\u308a\u591a\u304f\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u624b\u8efd\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u3001Linux Emulator\u74b0\u5883\u3092\u672c\u683c\u7684\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0<\/h2>\n<ul>\n<li>FreeBSD 15 amd64<\/li>\n<li>RockRockyLinux 9.7(RHEL 9.7\u4e92\u63db)<\/li>\n<li>\u30d9\u30fc\u30b9\u30d1\u30c3\u30b1\u30fc\u30b8\u3060\u3051FreeBSD\u516c\u5f0f\u306elinux_base-rl9\u3092\u4f7f\u3044\u3001\u307b\u304b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3059\u3079\u3066dnf\u3067\u7ba1\u7406\u3059\u308b<\/li>\n<\/ul>\n<h2>\u8a2d\u5b9a\u65b9\u91dd<\/h2>\n<p>\u307e\u305adnf\u3092\u52d5\u304b\u3059\u305f\u3081\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092rpm\u304b\u3089\u5c55\u958b\u3057\u307e\u3059\u3002<br \/>\n\u305d\u306e\u3042\u3068\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30d9\u30f3\u30c8\u30ea\u30fc\u306e\u6574\u5408\u6027\u3092\u3068\u308b\u305f\u3081\u306b\u3001dnf\u3067\u540c\u3058\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4e0a\u66f8\u304d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\ndnf\u304c\u52d5\u304f\u3088\u3046\u306b\u306a\u3063\u305f\u3089\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c4\u30fc\u30eb\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3084\u958b\u767a\u30c4\u30fc\u30eb\u306a\u3069\u3092dnf\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304d\u307e\u3059\u3002<\/p>\n<h2>Playbook<\/h2>\n<h4>roles\/freebsd\/tasks\/linux_emulation_rockylinux.yaml<\/h4>\n<h3>\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>rpm\u5f62\u5f0f\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306brpm2cpio\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u304c\u8a18\u8ff0\u3055\u308c\u305fxml\u30d5\u30a1\u30a4\u30eb\u3092\u30d1\u30fc\u30b9\u3059\u308b\u305f\u3081\u306bxmlstarlet\u3092\u307e\u305a\u6700\u521d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Ensure rpm2cpio installed\r\n  community.general.pkgng:\r\n    name: rpm2cpio\r\n    state: present\r\n\r\n- name: Ensure xmlstarlet installed\r\n  community.general.pkgng:\r\n    name: xmlstarlet\r\n    state: present\r\n<\/pre>\n<h3>\u5404\u7a2e\u5b9a\u7fa9<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5bfe\u8c61\u306eRockyLinux\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3001\u30b5\u30a4\u30c8\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Set RockyLinux version and architecture\r\n  set_fact:\r\n    rockylinux_ver: &quot;9.7&quot;\r\n    rockylinux_arch: &quot;x86_64&quot;\r\n\r\n- name: Set RockyLinux package site\r\n  set_fact:\r\n    rockylinux_devel_site: &quot;https:\/\/dl.rockylinux.org\/pub\/rocky\/{{ rockylinux_ver }}\/devel\/{{ rockylinux_arch }}\/os&quot;\r\n<\/pre>\n<h3>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u60c5\u5831\u53d6\u5f97<\/h3>\n<p>\u307e\u305a\u5168\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001\u305d\u308c\u3092\u30d1\u30fc\u30b9\u3057\u3066sqlite3\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u51fa\u3057\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u306eJSON\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001dnf\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5b9a\u7fa9\u3057\u3001\u305d\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u306b\u30de\u30c3\u30c1\u3059\u308brpm\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u5c55\u958b\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u6642\u3001\u51aa\u7b49\u6027\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\/compat\/linux\/var\/db\/rpm2cpio_stamps\u3092\u4f5c\u6210\u3057\u3001\u4e00\u5ea6\u5c55\u958b\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u9664\u5916\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Get repomd.xml\r\n  get_url:\r\n    url: &quot;{{ rockylinux_devel_site }}\/repodata\/repomd.xml&quot;\r\n    dest: \/compat\/linux\/repomd.xml\r\n\r\n- name: Extract primary sqlite path\r\n  shell: |\r\n    xml sel \\\r\n      -N r=&quot;http:\/\/linux.duke.edu\/metadata\/repo&quot; \\\r\n      -t \\\r\n      -m &#039;\/\/r:data&#x5B;@type=&quot;primary_db&quot;]\/r:location&#039; \\\r\n      -v &#039;@href&#039; \\\r\n      -n \\\r\n      \/compat\/linux\/repomd.xml\r\n  register: primary_db\r\n  changed_when: false\r\n\r\n- name: Download primary sqlite\r\n  get_url:\r\n    url: &quot;{{ rockylinux_devel_site }}\/{{ primary_db.stdout }}&quot;\r\n    dest: \/compat\/linux\/primary.sqlite.bz2\r\n\r\n- name: Generate package JSON\r\n  shell: |\r\n    sqlite3 \/compat\/linux\/primary.sqlite &lt;&lt;&#039;EOF&#039;\r\n    .mode json\r\n\r\n    select\r\n      substr(location_href,\r\n             instr(location_href, &#039;Packages\/&#039;) + 9,\r\n             1) as category,\r\n\r\n      pkgKey,\r\n\r\n      name as basename,\r\n      version,\r\n      release,\r\n      arch,\r\n\r\n      location_href as path,\r\n\r\n      replace(\r\n        location_href,\r\n        &#039;Packages\/&#039; ||\r\n        substr(location_href,\r\n               instr(location_href, &#039;Packages\/&#039;) + 9,\r\n               1) ||\r\n        &#039;\/&#039;,\r\n        &#039;&#039;\r\n      ) as rpm,\r\n\r\n      &#039;{{ rockylinux_devel_site }}\/&#039; || location_href as url\r\n\r\n    from packages;\r\n    EOF\r\n  register: package_json\r\n  changed_when: false\r\n\r\n- debug:\r\n    var: package_json\r\n  when:\r\n    - verbose | default(false)\r\n\r\n- name: Build package list\r\n  set_fact:\r\n    rockylinux_packages: &quot;{{ package_json.stdout | from_json }}&quot;\r\n\r\n- debug:\r\n    var: rockylinux_packages\r\n  when:\r\n    - verbose | default(false)\r\n\r\n- name: Set RockyLinux yum\/dnf packages\r\n  set_fact:\r\n    dnf_packages:\r\n      - audit_libs_rpm\r\n      - ca-certificates_rpm\r\n      - crypto_policies_rpm\r\n      - cyrus_sasl_lib_rpm\r\n      - dnf_rpm\r\n      - dnf_data_rpm\r\n      - dnf_plugins_core_rpm\r\n      - elfutils_libelf_rpm\r\n      - elfutils_libs_rpm\r\n      - expat_rpm\r\n      - file_libs_rpm\r\n      - filesystem_rpm\r\n      - gnupg2_rpm\r\n      - gpgme_rpm\r\n      - ima_evm_utils_rpm\r\n      - json_c_rpm\r\n      - libassuan_rpm\r\n      - libcap_ng_rpm\r\n      - libcomps_rpm\r\n      - libcurl_rpm\r\n      - libdnf_rpm\r\n      - libevent_rpm\r\n      - libgomp_rpm\r\n      - libgpg_error_rpm\r\n      - libmodulemd_rpm\r\n      - libnghttp2_rpm\r\n      - librepo_rpm\r\n      - libselinux_rpm\r\n      - libsolv_rpm\r\n      - libssh_rpm\r\n      - libtasn1_rpm\r\n      - libxml2_rpm\r\n      - libyaml_rpm\r\n      - lua_libs_rpm\r\n      - openldap_rpm\r\n      - p11_kit_rpm\r\n      - p11_kit_trust_rpm\r\n      - python3_rpm\r\n      - python3_dnf_rpm\r\n      - python3_gpg_rpm\r\n      - python3_libs_rpm\r\n      - python3_libdnf_rpm\r\n      - python3_hawkey_rpm\r\n      - python3_libcomps_rpm\r\n      - python3_rpm_rpm\r\n      - rocky_repos_rpm\r\n      - rocky_gpg_keys_rpm\r\n      - setup_rpm\r\n      - shadow_utils_rpm\r\n      - rpm_rpm\r\n      - rpm_libs_rpm\r\n      - rpm_build_libs_rpm\r\n      - rpm_sign_rpm\r\n      - rpm_sign_libs_rpm\r\n      - tpm2_tss_rpm\r\n      - yum_rpm\r\n      - yum_utils_rpm\r\n\r\n- name: Clean and initialize package list\r\n  set_fact:\r\n    cleaned_dnf_packages: |\r\n      {{ dnf_packages\r\n       | map(&#039;regex_replace&#039;, &#039;_rpm$&#039;, &#039;&#039;)\r\n       | map(&#039;regex_replace&#039;, &#039;_&#039;, &#039;-&#039;)\r\n       | list }}\r\n    filtered_rockylinux_packages: &#x5B;]\r\n\r\n- name: Filter RockyLinux package list\r\n  set_fact:\r\n    filtered_rockylinux_packages: &gt;-\r\n      {{\r\n        filtered_rockylinux_packages +\r\n        &#x5B;\r\n          (\r\n            rockylinux_packages\r\n            | selectattr(&#039;basename&#039;, &#039;equalto&#039;, item)\r\n            | rejectattr(&#039;rpm&#039;, &#039;search&#039;, &#039;i686&#039;)\r\n            | list\r\n          )\r\n          | selectattr(&#039;release&#039;, &#039;equalto&#039;, (\r\n              rockylinux_packages\r\n              | selectattr(&#039;basename&#039;, &#039;equalto&#039;, item)\r\n              | rejectattr(&#039;rpm&#039;, &#039;search&#039;, &#039;i686&#039;)\r\n              | map(attribute=&#039;release&#039;)\r\n              | list\r\n              | community.general.version_sort\r\n              | last\r\n          ))\r\n          | first\r\n        ]\r\n      }}\r\n  when: &gt;-\r\n    rockylinux_packages\r\n    | selectattr(&#039;basename&#039;, &#039;equalto&#039;, item)\r\n    | rejectattr(&#039;rpm&#039;, &#039;search&#039;, &#039;i686&#039;)\r\n    | list\r\n    | length &gt; 0\r\n  loop: &quot;{{ cleaned_dnf_packages }}&quot;\r\n\r\n- name: Ensure \/compat\/linux\/rpm exists\r\n  file:\r\n    path: \/compat\/linux\/rpm\r\n    state: directory\r\n\r\n- name: Get rpm\r\n  get_url:\r\n    url: &quot;{{ item.url }}&quot;\r\n    dest: &quot;\/compat\/linux\/rpm\/{{ item.rpm }}&quot;\r\n    force: false\r\n  loop: &quot;{{ filtered_rockylinux_packages }}&quot;\r\n  loop_control:\r\n    label: &quot;{{ item.rpm }}&quot;\r\n\r\n- name: Ensure \/compat\/linux\/var\/db\/rpm2cpio_stamps directory exists\r\n  file:\r\n    path: \/compat\/linux\/var\/db\/rpm2cpio_stamps\r\n    state: directory\r\n\r\n- name: Deploy packages\r\n  shell: |\r\n    rpm2cpio &lt; \/compat\/linux\/rpm\/{{ item.rpm }} | cpio -id\r\n    touch \/compat\/linux\/var\/db\/rpm2cpio_stamps\/{{ item.rpm }}\r\n  args:\r\n    chdir: \/compat\/linux\r\n    creates: &quot;\/compat\/linux\/var\/db\/rpm2cpio_stamps\/{{ item.rpm }}&quot;\r\n  loop: &quot;{{ filtered_rockylinux_packages }}&quot;\r\n  loop_control:\r\n    label: &quot;{{ item.rpm }}&quot;\r\n  notify:\r\n    - run_linux_ldconfig\r\n<\/pre>\n<h3>dnf\u306e\u8a2d\u5b9a<\/h3>\n<p>FreeBSD\u306eLinux Emulation\u306fdnf\u306b\u3088\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u306e\u305f\u3081\u306b\u5fc5\u8981\u306aLinux\u306e\u3044\u304f\u3064\u304b\u306e\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u3066\u304a\u3089\u305a\u3001\u305d\u306e\u307e\u307e\u3060\u3068dnf\u306e\u5b9f\u884c\u6642\u306b\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u305d\u308c\u3089\u3092\u7121\u52b9\u5316\u3059\u308b\u3053\u3068\u3067\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Ensure \/etc\/rpm directory exists\r\n  file:\r\n    path: \/compat\/linux\/etc\/rpm\r\n    state: directory\r\n\r\n- name: Deploy \/etc\/rpm\/macros.freebsd\r\n  copy:\r\n    dest: \/compat\/linux\/etc\/rpm\/macros.freebsd\r\n    mode: &quot;0644&quot;\r\n    content: |\r\n      %_file_caps_path %{nil}\r\n      %__file_context_path %{nil}\r\n      %_selinux_policy_targeted 0\r\n\r\n- name: Ensure \/etc\/dnf\/vars directory exists\r\n  file:\r\n    path: \/compat\/linux\/etc\/dnf\/vars\r\n    state: directory\r\n\r\n- name: Deploy \/etc\/dnf\/vars\/releasever\r\n  copy:\r\n    dest: \/compat\/linux\/etc\/dnf\/vars\/releasever\r\n    mode: &quot;0644&quot;\r\n    content: &quot;{{ rockylinux_ver.split(&#039;.&#039;)&#x5B;0] }}&quot;\r\n\r\n- name: Disable history_record\r\n  lineinfile:\r\n    path: \/compat\/linux\/etc\/dnf\/dnf.conf\r\n    regexp: &#039;^history_record=&#039;\r\n    line: &quot;history_record=False&quot;\r\n    create: yes\r\n\r\n- name: Enable nocaps for FreeBSD Linux Emuldation\r\n  lineinfile:\r\n    path: \/compat\/linux\/etc\/dnf\/dnf.conf\r\n    regexp: &#039;^tsflags=&#039;\r\n    line: &quot;tsflags=nocaps&quot;\r\n<\/pre>\n<h3>\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30d9\u30f3\u30c8\u30ea\u30fc\u306e\u6574\u5408\u6027\u5408\u308f\u305b<\/h3>\n<p>\u5c55\u958b\u3057\u305frpm\u30d1\u30c3\u30b1\u30fc\u30b8\u3092dnf\u3067\u3082\u3046\u4e00\u5ea6\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u304a\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3068\u304d\u3001CA\u8a3c\u660e\u66f8\u306e\u30c8\u30e9\u30b9\u30c8\u30c1\u30a7\u30fc\u30f3\u306e\u518d\u69cb\u6210\u3001GPG\u9375\u306e\u6574\u5408\u6027\u5408\u308f\u305b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u518d\u751f\u6210\u3092\u540c\u6642\u306b\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Deploy dnf_install.sh\r\n  copy:\r\n    dest: \/compat\/linux\/dnf_install.sh\r\n    mode: &quot;0755&quot;\r\n    content: |\r\n      #!\/bin\/bash\r\n      \/usr\/bin\/update-ca-trust\r\n      rm -f \/var\/lib\/dnf\/history.sqlite*\r\n      export SQLITE_DEFAULT_JOURNAL_MODE=TRUNCATE\r\n      dnf install -y --setopt=history_record=true rocky-gpg-keys --nogpgcheck\r\n      dnf install -y \\\r\n      {% for pkg in filtered_rockylinux_packages -%}\r\n      {{ pkg.basename }}{% if not loop.last %} \\\r\n      {% endif %}\r\n      {%- endfor %}\r\n\r\n- name: dnf install\r\n  command: chroot \/compat\/linux \/bin\/bash \/dnf_install.sh\r\n  register: result\r\n  changed_when: false\r\n\r\n- debug:\r\n    var: result.stdout_lines\r\n<\/pre>\n<h3>dnf\u306e\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n<p>\u3053\u3053\u307e\u3067\u6765\u308b\u3068dnf\u304c\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# chroot \/compat\/linux dnf list\r\nRocky Linux 9 - BaseOS                                                                  6.8 kB\/s | 4.3 kB     00:00\r\nRocky Linux 9 - BaseOS                                                                   14 MB\/s |  23 MB     00:01\r\nRocky Linux 9 - AppStream                                                               8.7 kB\/s | 4.8 kB     00:00\r\nRocky Linux 9 - AppStream                                                                19 MB\/s |  20 MB     00:01\r\nRocky Linux 9 - Extras                                                                  6.5 kB\/s | 3.1 kB     00:00\r\nRocky Linux 9 - Extras                                                                   30 kB\/s |  17 kB     00:00\r\nInstalled Packages\r\naardvark-dns.x86_64                                            2:1.16.0-1.el9                                 @System\r\nacl.x86_64                                                     2.3.1-4.el9                                    @baseos\r\nalternatives.x86_64                                            1.24-2.el9                                     @baseos\r\n...\r\n<\/pre>\n<p>\u5f8c\u306fdnf\u3067\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<h3>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Set RockyLinux network packages\r\n  set_fact:\r\n    network_packages:\r\n      - iproute\r\n      - iputils\r\n      - net-tools\r\n      - nmap\r\n\r\n- name: Install network packages\r\n  command: &gt;\r\n    chroot \/compat\/linux \/usr\/bin\/dnf install -y {{ network_packages | join(&#039; &#039;) }}\r\n  register: result\r\n  changed_when: false\r\n\r\n- debug:\r\n    var: result.stdout_lines\r\n<\/pre>\n<h3>\u958b\u767a\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Set RockyLinux development tool packages\r\n  set_fact:\r\n    devtool_packages:\r\n      - cpio\r\n      - hostname\r\n      - make\r\n      - openssl\r\n      - passwd\r\n      - procps-ng\r\n      - pkgconf\r\n      - pkgconf-pkg-config\r\n      - sudo\r\n      - tar\r\n      - tzdata\r\n      - vi\r\n      - wget\r\n      - xz\r\n\r\n- name: Install development tool packages\r\n  command: &gt;\r\n    chroot \/compat\/linux \/usr\/bin\/dnf install -y {{ devtool_packages | join(&#039; &#039;) }}\r\n  register: result\r\n  changed_when: false\r\n\r\n- debug:\r\n    var: result.stdout_lines\r\n<\/pre>\n<h3>\u958b\u767a\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n- name: Set RockyLinux development library packages\r\n  set_fact:\r\n    dev_library_packages:\r\n      - bzip2-devel\r\n      - libffi-devel\r\n      - libuuid-devel\r\n      - libxcrypt-devel\r\n      - ncurses-devel\r\n      - nss-devel\r\n      - openssl-devel\r\n      - readline-devel\r\n      - sqlite-devel\r\n      - tk-devel\r\n      - xz-devel\r\n      - zlib-devel\r\n\r\n- name: Install development tool packages\r\n  command: &gt;\r\n    chroot \/compat\/linux \/usr\/bin\/dnf install -y {{ dev_library_packages | join(&#039; &#039;) }}\r\n  register: result\r\n  changed_when: false\r\n\r\n- debug:\r\n    var: result.stdout_lines\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306eLinux Emulator\u3092\u52d5\u304b\u3059\u306b\u7d9a\u304d\u3001\u3082\u3046\u5c11\u3057\u8e0f\u307f\u8fbc\u3093\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u305d\u3082\u305d\u3082\u3001Linux Emulator\u74b0\u5883\u3092\u672c\u683c\u7684\u306b\u4f7f\u3046\u5834\u5408\u3001FreeBSD\u306e\u516c\u5f0f\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3060\u3051\u3067\u306f\u8db3\u308a\u307e\u305b\u3093\u3002\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.next-hop.net\/blog\/hiraga\/freebsd\/linux-emulator-package-management-with-dnf\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3243","post","type-post","status-publish","format-standard","hentry","category-freebsd"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/posts\/3243"}],"collection":[{"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/comments?post=3243"}],"version-history":[{"count":26,"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/posts\/3243\/revisions"}],"predecessor-version":[{"id":3319,"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/posts\/3243\/revisions\/3319"}],"wp:attachment":[{"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/media?parent=3243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/categories?post=3243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.next-hop.net\/blog\/hiraga\/wp-json\/wp\/v2\/tags?post=3243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}