Various updates on the build side
- %scl_files body moved to %scl_install - the "filesystem" file renamed back to "filelist" - add automatic Provide: scl-package(%scl) to all scl-related packages (#105290)
This commit is contained in:
parent
ef10a0f6f1
commit
14d31a6d79
@ -0,0 +1,34 @@
|
|||||||
|
From c260cd124d5990395897637ed8bd5edb2fbe7ac6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Albert Uchytil <auchytil@dhcp-24-234.brq.redhat.com>
|
||||||
|
Date: Mon, 3 Mar 2014 08:41:14 +0100
|
||||||
|
Subject: [PATCH] Added Provides: scl-package(%scl) for metapackage and build
|
||||||
|
subpackage
|
||||||
|
|
||||||
|
---
|
||||||
|
macros.scl | 1 +
|
||||||
|
scl.attr | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/macros.scl b/macros.scl
|
||||||
|
index 9e4b0540ed75617346334816abca53f8991dece4..50f4df2e6ac09ae1de7cde5e49f7c4c82db6ef70 100644
|
||||||
|
--- a/macros.scl
|
||||||
|
+++ b/macros.scl
|
||||||
|
@@ -73,6 +73,7 @@ package or when debugging this package.
|
||||||
|
Requires: %scl_runtime
|
||||||
|
}
|
||||||
|
BuildRequires: scl-utils-build
|
||||||
|
+Provides: scl-package(%scl)
|
||||||
|
%{?scl_package_override:%scl_package_override}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/scl.attr b/scl.attr
|
||||||
|
index 3e546568261b996e065be3bfaed648d785466c36..5f7d91f452b8ba1e29e98892d0e0145fae89e55e 100644
|
||||||
|
--- a/scl.attr
|
||||||
|
+++ b/scl.attr
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
%__scl_provides %{_rpmconfigdir}/scldeps.sh --provides %{scl}
|
||||||
|
-%__scl_path %{?scl:^%{_scl_prefix}/.*$}
|
||||||
|
+%__scl_path %{?scl:^%{_scl_prefix}/.*$ || %{_root_sysconfdir}/rpm/macros.%{scl}-config$}
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -1,100 +1,4 @@
|
|||||||
%scl_files %{expand:
|
%scl_files %{nil}
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%dir %_scl_prefix
|
|
||||||
%dir %attr(555,root,root) %{_scl_root}
|
|
||||||
%dir %attr(555,root,root) %{_scl_scripts}
|
|
||||||
%{_scl_scripts}/enable
|
|
||||||
%{_root_sysconfdir}/scl/prefixes/%scl
|
|
||||||
%{_scl_root}/bin
|
|
||||||
%attr(555,root,root) %{_scl_root}/boot
|
|
||||||
%{_scl_root}/dev
|
|
||||||
%dir %{_scl_root}/etc
|
|
||||||
%{_scl_root}/etc/X11
|
|
||||||
%{_scl_root}/etc/xdg
|
|
||||||
%{_scl_root}/etc/opt
|
|
||||||
%{_scl_root}/etc/pm
|
|
||||||
%{_scl_root}/etc/xinetd.d
|
|
||||||
%{_scl_root}/etc/skel
|
|
||||||
%{_scl_root}/etc/sysconfig
|
|
||||||
%{_scl_root}/etc/pki
|
|
||||||
%{_scl_root}/home
|
|
||||||
%{_scl_root}/lib
|
|
||||||
%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
|
|
||||||
%{_scl_root}/%{_lib}
|
|
||||||
%endif
|
|
||||||
%{_scl_root}/media
|
|
||||||
%dir %{_scl_root}/mnt
|
|
||||||
%dir %{_scl_root}/opt
|
|
||||||
%attr(555,root,root) %{_scl_root}/proc
|
|
||||||
%attr(550,root,root) %{_scl_root}/root
|
|
||||||
%{_scl_root}/run
|
|
||||||
%{_scl_root}/sbin
|
|
||||||
%{_scl_root}/srv
|
|
||||||
%{_scl_root}/sys
|
|
||||||
%attr(1777,root,root) %{_scl_root}/tmp
|
|
||||||
%dir %{_scl_root}/usr
|
|
||||||
%attr(555,root,root) %{_scl_root}/usr/bin
|
|
||||||
%{_scl_root}/usr/etc
|
|
||||||
%{_scl_root}/usr/games
|
|
||||||
%{_scl_root}/usr/include
|
|
||||||
%attr(555,root,root) %{_scl_root}/usr/lib
|
|
||||||
%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
|
|
||||||
%attr(555,root,root) %{_scl_root}/usr/%{_lib}
|
|
||||||
%endif
|
|
||||||
%{_scl_root}/usr/libexec
|
|
||||||
%{_scl_root}/usr/local
|
|
||||||
%attr(555,root,root) %{_scl_root}/usr/sbin
|
|
||||||
%dir %{_scl_root}/usr/share
|
|
||||||
%{_scl_root}/usr/share/aclocal
|
|
||||||
%{_scl_root}/usr/share/applications
|
|
||||||
%{_scl_root}/usr/share/augeas
|
|
||||||
%{_scl_root}/usr/share/backgrounds
|
|
||||||
%{_scl_root}/usr/share/desktop-directories
|
|
||||||
%{_scl_root}/usr/share/dict
|
|
||||||
%{_scl_root}/usr/share/doc
|
|
||||||
%attr(555,root,root) %dir %{_scl_root}/usr/share/empty
|
|
||||||
%{_scl_root}/usr/share/games
|
|
||||||
%{_scl_root}/usr/share/ghostscript
|
|
||||||
%{_scl_root}/usr/share/gnome
|
|
||||||
%{_scl_root}/usr/share/icons
|
|
||||||
%{_scl_root}/usr/share/idl
|
|
||||||
%{_scl_root}/usr/share/info
|
|
||||||
%dir %{_scl_root}/usr/share/locale
|
|
||||||
%dir %{_scl_root}/usr/share/man
|
|
||||||
%{_scl_root}/usr/share/mime-info
|
|
||||||
%{_scl_root}/usr/share/misc
|
|
||||||
%{_scl_root}/usr/share/omf
|
|
||||||
%{_scl_root}/usr/share/pixmaps
|
|
||||||
%{_scl_root}/usr/share/sounds
|
|
||||||
%{_scl_root}/usr/share/themes
|
|
||||||
%{_scl_root}/usr/share/xsessions
|
|
||||||
%{_scl_root}/usr/share/X11
|
|
||||||
%{_scl_root}/usr/src
|
|
||||||
%{_scl_root}/usr/tmp
|
|
||||||
%dir %{_scl_root}/var
|
|
||||||
%{_scl_root}/var/adm
|
|
||||||
%{_scl_root}/var/cache
|
|
||||||
%{_scl_root}/var/db
|
|
||||||
%{_scl_root}/var/empty
|
|
||||||
%{_scl_root}/var/games
|
|
||||||
%{_scl_root}/var/gopher
|
|
||||||
%{_scl_root}/var/lib
|
|
||||||
%{_scl_root}/var/local
|
|
||||||
%ghost %dir %attr(755,root,root) %{_scl_root}/var/lock
|
|
||||||
%ghost %{_scl_root}/var/lock/subsys
|
|
||||||
%{_scl_root}/var/log
|
|
||||||
%{_scl_root}/var/mail
|
|
||||||
%{_scl_root}/var/nis
|
|
||||||
%{_scl_root}/var/opt
|
|
||||||
%{_scl_root}/var/preserve
|
|
||||||
%ghost %attr(755,root,root) %{_scl_root}/var/run
|
|
||||||
%dir %{_scl_root}/var/spool
|
|
||||||
%attr(755,root,root) %{_scl_root}/var/spool/lpd
|
|
||||||
%attr(775,root,mail) %{_scl_root}/var/spool/mail
|
|
||||||
%attr(755,uucp,uucp) %{_scl_root}/var/spool/uucp
|
|
||||||
%attr(1777,root,root) %{_scl_root}/var/tmp
|
|
||||||
%{_scl_root}/var/yp
|
|
||||||
}
|
|
||||||
|
|
||||||
%scl_install %{expand:
|
%scl_install %{expand:
|
||||||
# scl specific stuff
|
# scl specific stuff
|
||||||
@ -106,7 +10,7 @@ EOF
|
|||||||
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
|
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
|
||||||
%_scl_prefix
|
%_scl_prefix
|
||||||
EOF
|
EOF
|
||||||
# filesystem
|
# filelist
|
||||||
set +x
|
set +x
|
||||||
cat >> %{buildroot}/lang-exceptions << EOF
|
cat >> %{buildroot}/lang-exceptions << EOF
|
||||||
af_ZA
|
af_ZA
|
||||||
@ -263,7 +167,7 @@ cat >> %{buildroot}/iso_3166.sed << EOF
|
|||||||
H
|
H
|
||||||
EOF
|
EOF
|
||||||
mkdir -p %{buildroot}%{_scl_root}
|
mkdir -p %{buildroot}%{_scl_root}
|
||||||
rm -f $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
rm -f $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
||||||
pushd %{buildroot}%{_scl_root}
|
pushd %{buildroot}%{_scl_root}
|
||||||
mkdir -p boot dev \\
|
mkdir -p boot dev \\
|
||||||
etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} \\
|
etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} \\
|
||||||
@ -290,8 +194,8 @@ grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do
|
|||||||
if [ "$locale" = "XX" ]; then
|
if [ "$locale" = "XX" ]; then
|
||||||
locale=$b
|
locale=$b
|
||||||
fi
|
fi
|
||||||
echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
||||||
echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
||||||
done
|
done
|
||||||
cat %{buildroot}/lang-exceptions | grep -v "^#" | grep -v "^$" | while read loc ; do
|
cat %{buildroot}/lang-exceptions | grep -v "^#" | grep -v "^$" | while read loc ; do
|
||||||
locale=$loc
|
locale=$loc
|
||||||
@ -310,23 +214,120 @@ cat %{buildroot}/lang-exceptions | grep -v "^#" | grep -v "^$" | while read loc
|
|||||||
egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \\
|
egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \\
|
||||||
%{buildroot}/iso_639.tab || continue
|
%{buildroot}/iso_639.tab || continue
|
||||||
fi
|
fi
|
||||||
echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
||||||
echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
||||||
done
|
done
|
||||||
rm -f %{buildroot}/iso_639.tab
|
rm -f %{buildroot}/iso_639.tab
|
||||||
rm -f %{buildroot}/iso_639.sed
|
rm -f %{buildroot}/iso_639.sed
|
||||||
rm -f %{buildroot}/iso_3166.tab
|
rm -f %{buildroot}/iso_3166.tab
|
||||||
rm -f %{buildroot}/iso_3166.sed
|
rm -f %{buildroot}/iso_3166.sed
|
||||||
rm -f %{buildroot}/lang-exceptions
|
rm -f %{buildroot}/lang-exceptions
|
||||||
cat $RPM_BUILD_DIR/%{buildsubdir}/filesystem | grep "locale" | while read a b ; do
|
cat $RPM_BUILD_DIR/%{buildsubdir}/filelist | grep "locale" | while read a b ; do
|
||||||
mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
|
mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
|
||||||
done
|
done
|
||||||
cat $RPM_BUILD_DIR/%{buildsubdir}/filesystem | grep "/share/man" | while read a b c d; do
|
cat $RPM_BUILD_DIR/%{buildsubdir}/filelist | grep "/share/man" | while read a b c d; do
|
||||||
mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}
|
mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}
|
||||||
done
|
done
|
||||||
for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do
|
for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do
|
||||||
echo "%{_scl_root}/usr/share/man/$i" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
echo "%{_scl_root}/usr/share/man/$i" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
||||||
done
|
done
|
||||||
|
cat >> $RPM_BUILD_DIR/%{buildsubdir}/filelist << EOF
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%dir %_scl_prefix
|
||||||
|
%dir %attr(555,root,root) %{_scl_root}
|
||||||
|
%dir %attr(555,root,root) %{_scl_scripts}
|
||||||
|
%{_scl_scripts}/enable
|
||||||
|
%{_root_sysconfdir}/scl/prefixes/%scl
|
||||||
|
%{_scl_root}/bin
|
||||||
|
%attr(555,root,root) %{_scl_root}/boot
|
||||||
|
%{_scl_root}/dev
|
||||||
|
%dir %{_scl_root}/etc
|
||||||
|
%{_scl_root}/etc/X11
|
||||||
|
%{_scl_root}/etc/xdg
|
||||||
|
%{_scl_root}/etc/opt
|
||||||
|
%{_scl_root}/etc/pm
|
||||||
|
%{_scl_root}/etc/xinetd.d
|
||||||
|
%{_scl_root}/etc/skel
|
||||||
|
%{_scl_root}/etc/sysconfig
|
||||||
|
%{_scl_root}/etc/pki
|
||||||
|
%{_scl_root}/home
|
||||||
|
%{_scl_root}/lib
|
||||||
|
%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
|
||||||
|
%{_scl_root}/%{_lib}
|
||||||
|
%endif
|
||||||
|
%{_scl_root}/media
|
||||||
|
%dir %{_scl_root}/mnt
|
||||||
|
%dir %{_scl_root}/opt
|
||||||
|
%attr(555,root,root) %{_scl_root}/proc
|
||||||
|
%attr(550,root,root) %{_scl_root}/root
|
||||||
|
%{_scl_root}/run
|
||||||
|
%{_scl_root}/sbin
|
||||||
|
%{_scl_root}/srv
|
||||||
|
%{_scl_root}/sys
|
||||||
|
%attr(1777,root,root) %{_scl_root}/tmp
|
||||||
|
%dir %{_scl_root}/usr
|
||||||
|
%attr(555,root,root) %{_scl_root}/usr/bin
|
||||||
|
%{_scl_root}/usr/etc
|
||||||
|
%{_scl_root}/usr/games
|
||||||
|
%{_scl_root}/usr/include
|
||||||
|
%attr(555,root,root) %{_scl_root}/usr/lib
|
||||||
|
%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
|
||||||
|
%attr(555,root,root) %{_scl_root}/usr/%{_lib}
|
||||||
|
%endif
|
||||||
|
%{_scl_root}/usr/libexec
|
||||||
|
%{_scl_root}/usr/local
|
||||||
|
%attr(555,root,root) %{_scl_root}/usr/sbin
|
||||||
|
%dir %{_scl_root}/usr/share
|
||||||
|
%{_scl_root}/usr/share/aclocal
|
||||||
|
%{_scl_root}/usr/share/applications
|
||||||
|
%{_scl_root}/usr/share/augeas
|
||||||
|
%{_scl_root}/usr/share/backgrounds
|
||||||
|
%{_scl_root}/usr/share/desktop-directories
|
||||||
|
%{_scl_root}/usr/share/dict
|
||||||
|
%{_scl_root}/usr/share/doc
|
||||||
|
%attr(555,root,root) %dir %{_scl_root}/usr/share/empty
|
||||||
|
%{_scl_root}/usr/share/games
|
||||||
|
%{_scl_root}/usr/share/ghostscript
|
||||||
|
%{_scl_root}/usr/share/gnome
|
||||||
|
%{_scl_root}/usr/share/icons
|
||||||
|
%{_scl_root}/usr/share/idl
|
||||||
|
%{_scl_root}/usr/share/info
|
||||||
|
%dir %{_scl_root}/usr/share/locale
|
||||||
|
%dir %{_scl_root}/usr/share/man
|
||||||
|
%{_scl_root}/usr/share/mime-info
|
||||||
|
%{_scl_root}/usr/share/misc
|
||||||
|
%{_scl_root}/usr/share/omf
|
||||||
|
%{_scl_root}/usr/share/pixmaps
|
||||||
|
%{_scl_root}/usr/share/sounds
|
||||||
|
%{_scl_root}/usr/share/themes
|
||||||
|
%{_scl_root}/usr/share/xsessions
|
||||||
|
%{_scl_root}/usr/share/X11
|
||||||
|
%{_scl_root}/usr/src
|
||||||
|
%{_scl_root}/usr/tmp
|
||||||
|
%dir %{_scl_root}/var
|
||||||
|
%{_scl_root}/var/adm
|
||||||
|
%{_scl_root}/var/cache
|
||||||
|
%{_scl_root}/var/db
|
||||||
|
%{_scl_root}/var/empty
|
||||||
|
%{_scl_root}/var/games
|
||||||
|
%{_scl_root}/var/gopher
|
||||||
|
%{_scl_root}/var/lib
|
||||||
|
%{_scl_root}/var/local
|
||||||
|
%ghost %dir %attr(755,root,root) %{_scl_root}/var/lock
|
||||||
|
%ghost %{_scl_root}/var/lock/subsys
|
||||||
|
%{_scl_root}/var/log
|
||||||
|
%{_scl_root}/var/mail
|
||||||
|
%{_scl_root}/var/nis
|
||||||
|
%{_scl_root}/var/opt
|
||||||
|
%{_scl_root}/var/preserve
|
||||||
|
%ghost %attr(755,root,root) %{_scl_root}/var/run
|
||||||
|
%dir %{_scl_root}/var/spool
|
||||||
|
%attr(755,root,root) %{_scl_root}/var/spool/lpd
|
||||||
|
%attr(775,root,mail) %{_scl_root}/var/spool/mail
|
||||||
|
%attr(755,uucp,uucp) %{_scl_root}/var/spool/uucp
|
||||||
|
%attr(1777,root,root) %{_scl_root}/var/tmp
|
||||||
|
%{_scl_root}/var/yp
|
||||||
|
EOF
|
||||||
set -x
|
set -x
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
Summary: Utilities for alternative packaging
|
Summary: Utilities for alternative packaging
|
||||||
Name: scl-utils
|
Name: scl-utils
|
||||||
Version: 20140127
|
Version: 20140127
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
URL: https://fedorahosted.org/SoftwareCollections/
|
URL: https://fedorahosted.org/SoftwareCollections/
|
||||||
Source0: https://fedorahosted.org/released/scl-utils/%{name}-%{version}.tar.gz
|
Source0: https://fedorahosted.org/released/scl-utils/%{name}-%{version}.tar.gz
|
||||||
Source1: macros.scl-filesystem
|
Source1: macros.scl-filesystem
|
||||||
|
Patch0: 0001-Added-Provides-scl-package-scl-for-metapackage-and-b.patch
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -23,6 +24,7 @@ Essential RPM build macros for alternative packaging.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .provides-scl-package
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
|
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
|
||||||
@ -70,6 +72,11 @@ rm -rf %buildroot
|
|||||||
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 12 2014 Albert Uchytil <auchytil@redhat.com> - 20140127-2
|
||||||
|
- %scl_files body moved to %scl_install
|
||||||
|
- the "filesystem" file renamed back to "filelist"
|
||||||
|
- add automatic Provide: scl-package(%scl) to all scl-related packages (#105290)
|
||||||
|
|
||||||
* Mon Jan 27 2014 Jan Zeleny <jzeleny@redhat.com> - 20140127-1
|
* Mon Jan 27 2014 Jan Zeleny <jzeleny@redhat.com> - 20140127-1
|
||||||
- don't exclude provides from SCLs (#1056183)
|
- don't exclude provides from SCLs (#1056183)
|
||||||
- don't generate scl-package(%scl) in macros.scl, it's already
|
- don't generate scl-package(%scl) in macros.scl, it's already
|
||||||
|
Loading…
Reference in New Issue
Block a user