Re: [new / help wanted] fence-agents-epel package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm sure having all the fence agents in one package is nice for you, but if someone has both Fedora and RHEL based machines, they would appreciate the packages having the same naming conventions.
This is looking pretty good.
I'll do some poking about for the man pages.  How badly do you want the man pages?

Troy


On Tue, Aug 23, 2022 at 6:40 AM Alex Talaran <atalaran@xxxxxxxxx> wrote:
attached a new spec using 4.10 which should match el9 (desired distro
version) as you noted.
srpm and rpm still seem to build fine without man pages, still not sure
how to generate them.

On 2022-08-08 17:22, Troy Dawson wrote:
> Hi Alex,
> I've been looking into this some.
>
> What distribution do you want this for?
> I haven't seen anywhere in your emails saying if this is for RHEL 8 or
> RHEL 9?
> The spec file you have attached is for fence-agents-4.11, which is only
> in Fedora, so that doesn't let me know either.
>
> The major problem is that the fence-agents-pve version has to match the
> fence-agents that is in your version of RHEL.
> So for RHEL8 (or compatible) it needs to be version 4.2.1.  For RHEL 9
> it needs to be 4.10.0
>
> We need to start with the correct version of fence-agents and work from
> there.
>
> Troy
>
> On Wed, Jul 27, 2022 at 10:03 AM Alex Talaran <atalaran@xxxxxxxxx
> <mailto:atalaran@xxxxxxxxx>> wrote:
>
>     i was able to get this built and installable if anyone wants to help
>     test or maintain it.
>     an issue exists with the man pages not being built still but im not
>     sure
>     how the makefile target works for these so they are excluded for now.
>
>     maybe some other small tweaks are still needed too since its just a
>     (first for me) stripped down and modified upstream spec file.
>
>     On 2022-07-20 08:47, Andrew C Aitchison wrote:
>      > On Wed, 20 Jul 2022, Alex Talaran wrote:
>      >
>      >> i ended up with the same error with that change.
>      >
>      > I am sorry my suggestion did not help.
>      > I don't have a Red Hat compatible machine newer that RHEL6
>      > (I moved to Ubuntu for work-related reasons)
>      > so I am unable to test things myself.
>      >
>      >> is it possible its getting confused because the dirname in the
>     tarball
>      >> is different than the package name and looking in the wrong spot?
>      >
>      > The -n fence-agents-%{version} in
>      >      %prep
>      >      %setup -q -n fence-agents-%{version}
>      > is supposed to resolve that, but that setup line might need tweaking
>      > to match the contents of the tarball.
>      >
>      > It is old and may be somewhat dated, but my bible for rewriting
>     .spec
>      > files was the book
>      >     Maximum RPM - Taking the Red Hat Package Manager to the Limit
>      > a version of which is available at
>      > http://ftp.rpm.org/max-rpm/index.html
>     <http://ftp.rpm.org/max-rpm/index.html>
>      >
>      >> On 2022-07-19 23:32, Andrew C Aitchison wrote:
>      >>> On Tue, 19 Jul 2022, Alex Talaran wrote:
>      >>>
>      >>>> per a previous thread i took a shot at cleaning up the
>     fence-agents
>      >>>> rpm to only include the missing agents and make a new package.
>     i am
>      >>>> having some issues with the source url and getting it to
>     build. the
>      >>>> srpm is ok, but when i try to rebuild it into a proper rpm i
>     get the
>      >>>> following (output truncated):
>      >>>>
>      >>>> ---
>      >>>> + py39_byte_compile /usr/bin/python3
>      >>>>
>     /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence
>      >>>> + python_binary='env PYTHONHASHSEED=0 /usr/bin/python3'
>      >>>> +
>      >>>>
>     bytecode_compilation_path=/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence
>      >>>> + env PYTHONHASHSEED=0 /usr/bin/python3 -s -B -m compileall -o
>     0 -o
>      >>>> 1 -s
>     /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64
>      >>>> -p /
>      >>>>
>     /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence
>      >>>> Listing
>      >>>>
>     '/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence'...
>      >>>> Can't list
>      >>>>
>     '/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence'
>      >>>> + chmod 0755
>      >>>>
>     /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_pve.py /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_raritan.py /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_rcd_serial.py /builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_virsh.py
>      >>>> chmod: cannot access
>      >>>>
>     '/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_pve.py': No such file or directory
>      >>>> chmod: cannot access
>      >>>>
>     '/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_raritan.py': No such file or directory
>      >>>> chmod: cannot access
>      >>>>
>     '/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_rcd_serial.py': No such file or directory
>      >>>> chmod: cannot access
>      >>>>
>     '/builddir/build/BUILDROOT/fence-agents-epel-4.11.0-1.el9.x86_64/usr/share/fence/fence_virsh.py': No such file or directory
>      >>>> error: Bad exit status from /var/tmp/rpm-tmp.S10L6D (%install)
>      >>>> ---
>      >>>>
>      >>>> i even tried to comment out the bytecompile lines but got the
>     same
>      >>>> error.
>      >>>>
>      >>>> is it possible to get some help sorting this out? i have attached
>      >>>> the WIP spec file.
>      >>>> thank you.
>      >>>
>      >>> I would try replacing
>      >>>      mkdir -p %{buildroot}/%{_datadir}/
>      >>> with
>      >>>      mkdir -p %{buildroot}/%{_datadir}/fence
>      >>>
>      >>
>      > _______________________________________________
>     epel-devel mailing list -- epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
>     <mailto:epel-devel@xxxxxxxxxxxxxxxxxxxxxxx>
>     To unsubscribe send an email to
>     epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
>     <mailto:epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx>
>     Fedora Code of Conduct:
>     https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>     <https://docs.fedoraproject.org/en-US/project/code-of-conduct/>
>     List Guidelines:
>     https://fedoraproject.org/wiki/Mailing_list_guidelines
>     <https://fedoraproject.org/wiki/Mailing_list_guidelines>
>     List Archives:
>     https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx <https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx>
>     Do not reply to spam on the list, report it:
>     https://pagure.io/fedora-infrastructure
>     <https://pagure.io/fedora-infrastructure>
>
>
> _______________________________________________
> epel-devel mailing list -- epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
%global debug_package %{nil}

Name: fence-agents-epel
Summary: Set of unified programs capable of host isolation ("fencing")
Version: 4.10.0
Release: 1%{?dist}
License: GPLv2+ and LGPLv2+
BuildArch: noarch
Group: System Environment/Base
URL: https://github.com/ClusterLabs/fence-agents
Source0: https://fedorahosted.org/releases/f/e/fence-agents/fence-agents-%{version}.tar.gz

%if 0%{?rhel} == 7
%ifarch s390x
%define rhel7_s390x 1
%endif
%endif

%if 0%{?rhel} == 9
%ifarch ppc64le s390x
%define rhel9_ppc64le_s390x 1
%endif
%endif

# Build dependencies
## man pages generating
BuildRequires: libxslt
## Python dependencies
%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version}
BuildRequires: python3-devel python3-httplib2 python3-pexpect python3-pycurl python3-requests
%endif

Requires: fence-agents-common = %{version}-%{release}
%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version}
Requires: python3-pycurl
%else
Requires: python-pycurl
%endif

%description
A collection of executables to handle isolation ("fencing") of possibly
misbehaving hosts by the means of remote power management, blocking
network, storage, or similar. They operate through a unified interface
(calling conventions) devised for the original Red Hat clustering solution.

# turn off the brp-python-bytecompile script
# (for F28+ or equivalent, the latter is the preferred form)
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompilespace:.*$!!g')
#undefine __brp_python_bytecompile

%prep
%setup -q -n fence-agents-%{version}
%autopatch -p1

%build
%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version}
	export PYTHON="%{__python3}"
%endif

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_sbindir}
install -m 0755 %{_builddir}/fence-agents-%{version}/agents/pve/fence_pve.py %{buildroot}%{_sbindir}/fence_pve
install -m 0755 %{_builddir}/fence-agents-%{version}/agents/raritan/fence_raritan.py  %{buildroot}%{_sbindir}/fence_raritan
install -m 0755 %{_builddir}/fence-agents-%{version}/agents/rcd_serial/fence_rcd_serial.py  %{buildroot}%{_sbindir}/fence_rcd_serial
install -m 0755 %{_builddir}/fence-agents-%{version}/agents/virsh/fence_virsh.py  %{buildroot}%{_sbindir}/fence_virsh
sed -i "s|@PYTHON@ -tt|%{__python3}|" %{buildroot}%{_sbindir}/fence*
# bytecompile Python source code in a non-standard location
%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7
%py_byte_compile %{__python3} %{buildroot}%{_sbindir}/fence*
%endif

## tree fix up
# fix libfence permissions
chmod 0755 %{buildroot}%{_sbindir}/fence_{pve,raritan,rcd_serial,virsh}
# remove docs
rm -rf %{buildroot}/usr/share/doc/fence-agents
# remove .a files
rm -f %{buildroot}/%{_libdir}/fence-agents/*.*a

%post
ccs_update_schema > /dev/null 2>&1 ||:
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
if [ $1 -eq 1 ] ; then
    # Initial installation
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

%package -n fence-agents-pve
License: GPLv2+ and LGPLv2+
Summary: Fence agent for PVE
Requires: python3-pycurl
Requires: fence-agents-common = %{version}
BuildArch: noarch
%description -n fence-agents-pve
Fence agent for PVE.
%files -n fence-agents-pve
%{_sbindir}/fence_pve
#%{_mandir}/man8/fence_pve.8*

%package -n fence-agents-raritan
License: GPLv2+ and LGPLv2+
Summary: Fence agent for Raritan Dominion PX
Requires: fence-agents-common = %{version}
BuildArch: noarch
%description -n fence-agents-raritan
Fence agent for Raritan Dominion PX.
%files -n fence-agents-raritan
%{_sbindir}/fence_raritan
#%{_mandir}/man8/fence_raritan.8*

%package -n fence-agents-rcd-serial
License: GPLv2+ and LGPLv2+
Summary: Fence agent for RCD serial
Requires: fence-agents-common = %{version}
BuildArch: noarch
%description -n fence-agents-rcd-serial
Fence agent for RCD serial.
%files -n fence-agents-rcd-serial
%{_sbindir}/fence_rcd_serial
#%{_mandir}/man8/fence_rcd_serial.8*

%package -n fence-agents-virsh
License: GPLv2+ and LGPLv2+
Summary: Fence agent for virtual machines based on libvirt
Requires: openssh-clients /usr/bin/virsh
Requires: fence-agents-common = %{version}
BuildArch: noarch
%description -n fence-agents-virsh
Fence agent for virtual machines that are accessed via SSH.
%files -n fence-agents-virsh
%{_sbindir}/fence_virsh
#%{_mandir}/man8/fence_virsh.8*

%changelog
* Wed Aug 24 2022 Example <user@xxxxxxxxxxx> - 4.10.0-1
- Initial build
_______________________________________________
epel-devel mailing list -- epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Index of Archives]     [Fedora Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Announce]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux