Changeset 1c6da08


Ignore:
Timestamp:
03/18/2024 09:59:28 AM (2 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
lazarus, trunk
Children:
9e3d8219
Parents:
7ff7885c
Message:

pciutils: Use hwdata package for pci.ids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/pciutils.xml

    r7ff7885c r1c6da08  
    6767      </listitem>
    6868    </itemizedlist>
    69 <!-- Needed to update the pci-ids. systemd has a unit and timer for this,
    70     but for anyone who updates this file on either platform, it's needed
    71     to download the pci.ids file. -->
    7269
    7370    <bridgehead renderas="sect3">pciutils Dependencies</bridgehead>
     
    7572    <bridgehead renderas="sect4">Recommended</bridgehead>
    7673    <para role="recommended">
    77        <xref linkend="curl"/>,
    78        <xref linkend="wget"/>, or
    79        <xref linkend="lynx"/>
    80        (for the update-pciids script to function correctly).
     74       <xref role="runtime" linkend="hwdata"/> (runtime)
    8175    </para>
    8276
     
    8579  <sect2 role="installation">
    8680    <title>Installation of PCI Utils</title>
     81
     82    <para>
     83      Prevent the installation of the <filename>pci.ids</filename> file
     84      to avoid a conflict with the <xref linkend='hwdata'/> package:
     85    </para>
     86
     87    <screen><userinput>sed -r '/INSTALL.*(PCI_IDS|update-pciids)/d' \
     88    -i Makefile</userinput></screen>
    8789
    8890    <para>
     
    110112chmod -v 755 /usr/lib/libpci.so</userinput></screen>
    111113
     114    <para>
     115      Now install the <xref linkend='hwdata'/> package for the
     116      <filename>pci.ids</filename> file.
     117    </para>
     118
    112119  </sect2>
    113120
     
    124131      the <filename>pci.ids</filename> file.
    125132    </para>
    126 
    127   </sect2>
    128 
    129   <sect2 role="configuration">
    130     <title>Configuring PCI Utils</title>
    131 
    132     <para>
    133       The <filename>pci.ids</filename> data file is constantly being
    134       updated. To get a current version of this file, run
    135       <command>update-pciids</command> as the <systemitem
    136       class="username">root</systemitem> user. This program requires the
    137       <xref linkend="which"/> script or program to find <xref linkend="curl"/>,
    138       <xref linkend="lynx"/>, or <xref linkend="wget"/> which are used to
    139       download the most current file, and then replace the existing file in
    140       <filename class="directory">/usr/share/hwdata</filename>.
    141     </para>
    142 
    143     <para>
    144       You should update the <filename>/usr/share/hwdata/pci.ids</filename> file
    145       periodically. <phrase revision="sysv">If you've installed
    146       <xref linkend="fcron"/> and completed the section on periodic jobs,
    147       execute</phrase><phrase revision="systemd">Execute</phrase> the following
    148       commands, as the  <systemitem class="username">root</systemitem> user,
    149       to create a <phrase revision="sysv">weekly cron job:</phrase>
    150       <phrase revision="systemd">systemd timer to update it weekly on Sundays
    151       at 2:30 A.M. (local time):</phrase>
    152     </para>
    153 
    154 <screen role="nodump" revision="sysv"><userinput>cat &gt; /etc/cron.weekly/update-pciids.sh &lt;&lt; "EOF" &amp;&amp;
    155 <literal>#!/bin/bash
    156 /usr/sbin/update-pciids</literal>
    157 EOF
    158 chmod 754 /etc/cron.weekly/update-pciids.sh</userinput></screen>
    159 
    160 <screen role="root" revision="systemd"><userinput>cat &gt; /usr/lib/systemd/system/update-pciids.service &lt;&lt; "EOF" &amp;&amp;
    161 <literal>[Unit]
    162 Description=Update pci.ids file
    163 Documentation=man:update-pciids(8)
    164 DefaultDependencies=no
    165 After=local-fs.target network-online.target
    166 Before=shutdown.target
    167 
    168 [Service]
    169 Type=oneshot
    170 RemainAfterExit=yes
    171 ExecStart=/usr/sbin/update-pciids</literal>
    172 EOF
    173 cat &gt; /usr/lib/systemd/system/update-pciids.timer &lt;&lt; "EOF" &amp;&amp;
    174 <literal>[Unit]
    175 Description=Update pci.ids file weekly
    176 
    177 [Timer]
    178 OnCalendar=Sun 02:30:00
    179 Persistent=true
    180 
    181 [Install]
    182 WantedBy=timers.target</literal>
    183 EOF
    184 systemctl enable update-pciids.timer</userinput></screen>
    185 
    186133
    187134  </sect2>
     
    197144      <seglistitem>
    198145        <seg>
    199           lspci, setpci, and update-pciids
     146          lspci and setpci
    200147        </seg>
    201148        <seg>
     
    238185      </varlistentry>
    239186
    240       <varlistentry id="update-pciids">
    241         <term><command>update-pciids</command></term>
    242         <listitem>
    243           <para>
    244              fetches the current version of the PCI ID list. <!-- Requires
    245             <xref linkend="curl"/>, <xref linkend="lynx"/> or
    246             <xref linkend="wget"/>.
    247             -->
    248           </para>
    249           <indexterm zone="pciutils update-pciids">
    250             <primary sortas="b-update-pciids">update-pciids</primary>
    251           </indexterm>
    252         </listitem>
    253       </varlistentry>
    254 
    255187      <varlistentry id="libpci">
    256188      <term><filename class="libraryfile">libpci.so</filename></term>
Note: See TracChangeset for help on using the changeset viewer.