Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoconf Dependency Fix #1764

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions components/dev-tools/autoconf/SPECS/autoconf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ Source0: https://ftp.gnu.org/gnu/autoconf/autoconf-%{version}.tar.gz
BuildRequires: m4 make
Requires: m4

BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Compare)
BuildRequires: perl(File::Copy)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Text::ParseWords)
%if 0%{?suse_version} || 0%{?sle_version}
Requires: perl-base
%else
Requires: perl-interpreter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The perl-base or perl-interpreter explicit dependency seems unnecessary. perl(File::Compare) pulls in those packages on each platform already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked through the dependency chain and it doesn't appear that RHEL's perl-file-compare will install the perl binary. I also looked at the Fedora autoconf specfile and they explicitly add perl-interpreter. The SUSE one isn't needed, but I wanted to keep things parallel.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I do dnf -y install "perl(File::Compare)" perl-interpreter is pulled in on 9.1.

Copy link
Contributor Author

@jcsiadal jcsiadal Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"you SHOULD NOT assume any other packages are present as RPM dependencies and anything brought into the buildroot by the build system can change over time."

That's from Red Hat's packaging guidelines. They do say that one can usually drop Requires: if we're running autorequires, but I thought we're only doing manual deps. The other question to ask: if it's not needed, why does Fedora include it in their autoconf spec?

%endif
Requires: perl(File::Compare)

%define install_path %{OHPC_UTILS}/autotools

Expand All @@ -48,37 +55,42 @@ may be configuring software with an Autoconf-generated script;
Autoconf is only required for the generation of the scripts, not
their use.


%prep
%setup -q -n autoconf-%{version}


%build
%ifarch ppc64le
cp /usr/lib/rpm/config.guess build-aux
%endif

./configure --prefix=%{install_path} || { cat config.log && exit 1; }
./configure --prefix=%{install_path} \
--libdir=%{install_path}/lib \
|| { cat config.log && exit 1; }


%install
make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install

# remove share/info/dir to avoid conflict with other package installs
rm -f $RPM_BUILD_ROOT/%{install_path}/share/info/dir

%{__mkdir_p} ${RPM_BUILD_ROOT}/%{_docdir}
mkdir -p ${RPM_BUILD_ROOT}/%{_docdir}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised you would ask. Red Hat's RPM guide (at least one of them) says not to use (LSB) shell command macros. They were put in to make RPM portable across OSs (like Windows or BSD) and that never happened. They're just extra work with no benefit. SUSE says to never use them.
When I touch an RPM spec, I try and clean it up to current RPM standards, i.e. both RH and SUSE mandate %license now.



%files
%dir %{OHPC_HOME}
%{OHPC_UTILS}
%{OHPC_UTILS}/autotools
%doc THANKS
%doc NEWS
%doc ChangeLog.2
%doc ChangeLog
%doc COPYING
%license COPYING
%doc ChangeLog.3
%doc README
%doc AUTHORS
%doc COPYINGv3
%license COPYINGv3
%doc ChangeLog.0
%doc ChangeLog.1
%doc TODO
%doc COPYING.EXCEPTION
%license COPYING.EXCEPTION