<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 12/28/21 18:52, Jim Klimov wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJYg8vKeiMufgfnLjLD1py_s0NwDX5yTnzzvTwkz5OcQE2eOdw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">I've made a centos7 container on the farm today
        and updated the docs to reflect the nuances. The libusb*
        branches seem to be building ok there (with some warnings for
        system headers).
        <div dir="auto"><br>
        </div>
        <div dir="auto">Do I get it right that there is no libi2c-devel
          (smbus.h and userland i2c-dev.h) in the distro?</div>
        <div dir="auto"><br>
        </div>
      </div>
    </blockquote>
    That is correct, there is no equivalent for libi2c-devel ( which, in
    the RedHat land would be named i2c-<something>-devel ) .
    smbus.h is provided by the kernel-devel package and i2c-dev.h by the
    kernel-headers package. However the build fails even when including
    both packages in the buildroot; at the first glance, it seems that
    i2c_smbus_access does not exist in the version of headers provided
    by the distro:<br>
    <blockquote>[wolfy@wolfy nut-fightwarn-libusb-1.0-0.1]$ grep
      i2c_smbus_access
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/* -r<br>
      [wolfy@wolfy nut-fightwarn-libusb-1.0-0.1]$ <br>
    </blockquote>
    <p>The output of configure is:</p>
    <blockquote>checking linux/i2c-dev.h usability... yes<br>
      checking linux/i2c-dev.h presence... yes<br>
      checking for linux/i2c-dev.h... yes<br>
      checking i2c/smbus.h usability... no<br>
      checking i2c/smbus.h presence... no<br>
      checking for i2c/smbus.h... no<br>
      checking whether i2c_smbus_access is declared... no<br>
      configure: error: i2c was required but can not be fulfilled for
      this build<br>
      error: Bad exit status from /var/tmp/rpm-tmp.TjebuB (%build)<br>
          Bad exit status from /var/tmp/rpm-tmp.TjebuB (%build)<br>
    </blockquote>
    <p>The i2c files that exist:<br>
    </p>
    <blockquote>[wolfy@wolfy tmp]$ ls
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c* -l<br>
      -rw-r--r--. 3 root root  2298 Nov 30  2020
/usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-algo-bit.h<br>
      -rw-r--r--. 3 root root  2560 Nov 30  2020
/usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-algo-pca.h<br>
      -rw-r--r--. 3 root root  1926 Nov 30  2020
/usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-algo-pcf.h<br>
      -rw-r--r--. 3 root root  1051 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-dev.h<br>
      -rw-r--r--. 3 root root  1344 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-gpio.h<br>
      -rw-r--r--. 3 root root 25336 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c.h<br>
      -rw-r--r--. 3 root root  1383 Nov 30  2020
/usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-mux-gpio.h<br>
      -rw-r--r--. 3 root root  1683 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-mux.h<br>
      -rw-r--r--. 3 root root  1475 Nov 30  2020
/usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-mux-pinctrl.h<br>
      -rw-r--r--. 3 root root   708 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-ocores.h<br>
      -rw-r--r--. 3 root root  1202 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-omap.h<br>
      -rw-r--r--. 3 root root   402 Nov 30  2020
/usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-pca-platform.h<br>
      -rw-r--r--. 3 root root   943 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-pnx.h<br>
      -rw-r--r--. 3 root root   399 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-pxa.h<br>
      -rw-r--r--. 3 root root  1820 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-smbus.h<br>
      -rw-r--r--. 3 root root  1444 Nov 30  2020
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c-xiic.h<br>
    </blockquote>
    <p>There are 30 header files below
      /usr/src/kernels/3.10.0-1160.49.1.el7.x86_64/include/linux/i2c but
      I doubt that listing them here is useful so I skipped that.<br>
    </p>
    <p>wolfy<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAJYg8vKeiMufgfnLjLD1py_s0NwDX5yTnzzvTwkz5OcQE2eOdw@mail.gmail.com">
      <div dir="auto">
        <div dir="auto">Jim</div>
        <div dir="auto"><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sun, Dec 26, 2021, 23:20
          Manuel Wolfshant <<a href="mailto:wolfy@nobugconsulting.ro"
            moz-do-not-send="true" class="moz-txt-link-freetext">wolfy@nobugconsulting.ro</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>
            <div>On 12/27/21 00:06, Manuel Wolfshant wrote:<br>
            </div>
            <blockquote type="cite">
              <div>Hello</div>
              <div><br>
              </div>
              <div>I've packaged <a
href="https://github.com/networkupstools/nut/tree/fightwarn-libusb-1.0+0.1"
                  target="_blank" rel="noreferrer"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/networkupstools/nut/tree/fightwarn-libusb-1.0+0.1</a>
                for EL7 and uploaded the resulting rpms to <a
                  href="https://wolfy.fedorapeople.org/nut-2.7.5-0.nut_fightwarn/"
                  target="_blank" rel="noreferrer"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://wolfy.fedorapeople.org/nut-2.7.5-0.nut_fightwarn/</a></div>
              <div>These packages are built against stock libusb i.e.
                compatible with libusb-0.1. Minimal testing shows them
                as functional but as always, YMMV.</div>
              <div>
                <div>I had to disable support for i2c, it triggered some
                  build errors and I am in no mood to debug them.</div>
                <div><br>
                </div>
              </div>
              <div>As a sidenote, upsc reports 2.7.4.1 not 2.7.5 so
                probably I should rename the packages as well:</div>
              <div>[wolfy@wolfy epel-7-x86_64]$ which upsc<br>
                /usr/bin/upsc<br>
                [wolfy@wolfy epel-7-x86_64]$ rpm -qf /usr/bin/upsc<br>
                nut-client-2.7.5-0.nut_fightwarn_libusb.wolfy.x86_64<br>
                [wolfy@wolfy epel-7-x86_64]$ upsc -V<br>
                Network UPS Tools upscmd 2.7.4.1<br>
                <br>
              </div>
              <div><br>
              </div>
              I'll try to build another set of packages against libusbx
              aka EL7's libusb-1.0
              <div><br>
              </div>
            </blockquote>
            <br>
            The packages built against libusb-1.0 are available at <a
              href="https://wolfy.fedorapeople.org/nut-2.7.5-0.nut_fightwarn_libusbx/"
              target="_blank" rel="noreferrer" moz-do-not-send="true"
              class="moz-txt-link-freetext">https://wolfy.fedorapeople.org/nut-2.7.5-0.nut_fightwarn_libusbx/</a><br>
            <br>
            For now I've left in place ( at <a
              href="https://wolfy.fedorapeople.org/nut" target="_blank"
              rel="noreferrer" moz-do-not-send="true"
              class="moz-txt-link-freetext">https://wolfy.fedorapeople.org/nut</a>
            ) the old versions of nut I built 4-5 years ago but, if
            memory serves, those were built for  EL6 which has an year
            since it is no longer supported. Therefore I recommend
            against using them and I will probably remove them after New
            Year's day.<br>
            <br>
            <br>
            <br>
            <br>
            <br>
            wolfy<br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <blockquote type="cite">
              <div> </div>
              <div>Manuel<br>
              </div>
              <div><br>
              </div>
              <div>On 12/26/21 12:07, Strahil Nikolov via Nut-upsuser
                wrote:<br>
              </div>
              <blockquote type="cite"> Hey Jim,
                <div
                  id="m_-365000120685859180yMail_cursorElementTracker_1640513207317"><br>
                </div>
                <div
                  id="m_-365000120685859180yMail_cursorElementTracker_1640513207522"><br>
                </div>
                <div
                  id="m_-365000120685859180yMail_cursorElementTracker_1640513207668">do
                  we have precompiled binaries or rpm ?</div>
                <div
                  id="m_-365000120685859180yMail_cursorElementTracker_1640513226971"><br>
                </div>
                <div
                  id="m_-365000120685859180yMail_cursorElementTracker_1640513227178">Best
                  Regards,</div>
                <div
                  id="m_-365000120685859180yMail_cursorElementTracker_1640513230658">Strahil
                  Nikolov<br>
                  <br>
                  <blockquote style="margin:0 0 20px 0">
                    <div
                      style="font-family:Roboto,sans-serif;color:#6d00f6">
                      <div>On Sun, Dec 26, 2021 at 11:51, Jim Klimov via
                        Nut-upsdev</div>
                      <div><a
                          href="mailto:nut-upsdev@alioth-lists.debian.net"
                          target="_blank" rel="noreferrer"
                          moz-do-not-send="true"><nut-upsdev@alioth-lists.debian.net></a>
                        wrote:</div>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
              <blockquote type="cite">
                <div>
                  <blockquote type="cite">
                    <div>  This work has originally delayed merging of
                      libusb-1.0 support (from issue <a
                        href="https://github.com/networkupstools/nut/issues/300"
                        target="_blank" rel="noreferrer"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://github.com/networkupstools/nut/issues/300</a>
                      and several candidate branches to pick from), in
                      particular because with the original codebase
                      sporting thousands of build warnings, it was hard
                      to notice any new "offences" introduced by this
                      large set of changes. I was afraid that merging it
                      would even have to wait until after the next NUT
                      release, but in the end found that some remaining
                      warnings in the original USB-related NUT codebase
                      made those branches' changes the better solution.</div>
                    <div><br>
                    </div>
                    <div>  Now, before we find the hard way if the cure
                      is worse than the disease, I would like to ask
                      people with USB-connected UPSes (and also those
                      using the MGE SHUT protocol) to build and test <a
href="https://github.com/networkupstools/nut/tree/fightwarn-libusb-1.0+0.1"
                        target="_blank" rel="noreferrer"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://github.com/networkupstools/nut/tree/fightwarn-libusb-1.0+0.1</a>
                      branch with their setups - hopefully hitting as
                      many OSes and CPU types as feasible, as well as
                      trying both libusb-0.1, libusb-1.0 (and not sure
                      about libusb-0.1-compat).</div>
                  </blockquote>
                  <br>
                </div>
                <br>
              </blockquote>
              <br>
              <br>
              <fieldset></fieldset>
              <br>
              _______________________________________________
              Nut-upsuser mailing list
              <a href="mailto:Nut-upsuser@alioth-lists.debian.net"
                target="_blank" rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">Nut-upsuser@alioth-lists.debian.net</a>
              <a
href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser"
                target="_blank" rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a>
              <br>
            </blockquote>
            <br>
            <br>
            <br>
          </div>
          _______________________________________________<br>
          Nut-upsuser mailing list<br>
          <a href="mailto:Nut-upsuser@alioth-lists.debian.net"
            target="_blank" rel="noreferrer" moz-do-not-send="true"
            class="moz-txt-link-freetext">Nut-upsuser@alioth-lists.debian.net</a><br>
          <a
href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>