Skip to content

Commit

Permalink
fixes for debuginfo generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Dec 28, 2023
1 parent adbe63d commit cab839c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ config.in~
config.guess~
config.sub~
configure.ac~
.repo-build
.repo-build.tmp
5 changes: 2 additions & 3 deletions indimail-access/indimail-access.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
%global _hardened_build 1
%endif

%global xxxxxxxx 1
#global nodebug 1
%if %{defined nodebug}
%global debug_package %{nil}
%endif
Expand All @@ -44,11 +44,9 @@
# in the prep section have a problem in enabling debuginfo.
# This isn't documented clearly anywhere. A workaround is
# to define buildsubdir
%if 1
%if %{undefined nodebug}
%global buildsubdir %{name}-%{version}
%endif
%endif

%if 0%{?fedora_version} > 30 || 0%{?centos_version} > 700 || 0%{?rhel_version} > 700 || 0%{?centos_ver} > 7 || 0%{?almalinux_version} > 700 || 0%{?rocky_version} > 700 || 0%{?fedora} > 30 || 0%{?rhel} > 7 || %{defined mgaversion} || %{defined amzn} || %{defined openEuler} || ( 0%{?sle_version} >= 150400 && 0%{?is_opensuse} )
%global pythondir %{python3_sitelib}
Expand Down Expand Up @@ -331,6 +329,7 @@ done
%if %{undefined nodebug}
/bin/chmod -R 0755 %{buildroot}%{_prefix}/bin %{buildroot}%{_prefix}/sbin \
%{buildroot}%{libexecdir}
ln -sf %{_builddir}/%{name}-%{version}/debugsourcefiles.list %{_builddir}/debugsourcefiles.list
%endif

%files
Expand Down
16 changes: 11 additions & 5 deletions indimail-auth/indimail-auth.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
%global _hardened_build 1
%endif

#global nodebug 1
%if %{defined nodebug}
%global debug_package %{nil}
%endif
Expand All @@ -37,11 +38,9 @@
# in the prep section have a problem in enabling debuginfo.
# This isn't documented clearly anywhere. A workaround is
# to define buildsubdir
%if 1
%if %{undefined nodebug}
%global buildsubdir %{name}-%{version}
%endif
%endif

%if %build_on_obs == 1
%global packager Manvendra Bhangui <@email@>
Expand Down Expand Up @@ -241,9 +240,9 @@ touch %{buildroot}%{logdir}/pwdlookup/current
# Compress the man pages
find %{buildroot}%{mandir} -type f -exec gzip -q {} \;
%if %{undefined nodebug}
chmod -R 755 %{buildroot}%{_prefix}/sbin
chmod -R 755 %{buildroot}%{_libdir}
chmod -R 755 %{buildroot}/%{pam_moduledir}
chmod -R 755 %{buildroot}%{_prefix}/sbin %{buildroot}%{_libdir} \
%{buildroot}/%{pam_moduledir}
ln -sf %{_builddir}/%{name}-%{version}/debugsourcefiles.list %{_builddir}/debugsourcefiles.list
%endif

%files
Expand Down Expand Up @@ -295,6 +294,13 @@ chmod -R 755 %{buildroot}/%{pam_moduledir}
%attr(755,root,root) %{_libdir}/libnss_nssd.so.2.0.0
%{_libdir}/libnss_nssd.so.2

%clean
%if %{undefined nodebug}
%{__rm} -f %{_builddir}/debugfiles.list %{_builddir}/debuglinks.list \
%{_builddir}/debugsourcefiles.list %{_builddir}/debugsources.list \
%{_builddir}/elfbins.list
%endif

### SCRIPTLET ###############################################################################
%pretrans
if [ -d /run ] ; then
Expand Down
18 changes: 8 additions & 10 deletions indimail-utils/indimail-utils.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
%global _hardened_build 1
%endif

#global nodebug 1
%if %{defined nodebug}
%global debug_package %{nil}
%endif
Expand Down Expand Up @@ -99,7 +100,7 @@ For more details visit %{url}

%prep
%{__mkdir_p} %{_builddir}/%{name}-%{version}
cd %{name}-%{version}
cd %{_builddir}/%{name}-%{version}
for i in altermime-%{altermime_version} ripmime-%{ripmime_version} \
fortune-%{fortune_version} mpack-%{mpack_version} flash-%{flash_version}
do
Expand All @@ -121,6 +122,7 @@ do
done

%build
cd %{_builddir}/%{name}-%{version}
(
echo "---------------- INFORMATION ------------------------"
echo target %_target
Expand Down Expand Up @@ -159,7 +161,7 @@ do
done

%install
%{__mkdir_p} %{buildroot}%{_prefix}
cd %{_builddir}/%{name}-%{version}
for i in altermime-%{altermime_version} ripmime-%{ripmime_version} \
fortune-%{fortune_version} mpack-%{mpack_version} flash-%{flash_version}
do
Expand Down Expand Up @@ -200,14 +202,10 @@ if [ -x /usr/bin/chrpath ] ; then
fi
# Compress the man pages
find %{buildroot}%{mandir} -type f -exec gzip -q {} \;

if [ -x /bin/touch ] ; then
TOUCH=/bin/touch
elif [ -x /usr/bin/touch ] ; then
TOUCH=/usr/bin/touch
else
TOUCH=/bin/touch
fi
%if %{undefined nodebug}
/bin/chmod -R 0755 %{buildroot}%{_prefix}/bin %{buildroot}%{_prefix}/sbin
ln -sf %{_builddir}/%{name}-%{version}/debugsourcefiles.list %{_builddir}/debugsourcefiles.list
%endif

%files
%defattr(-, root, root,-)
Expand Down

0 comments on commit cab839c

Please sign in to comment.