diff --git a/.scl-utils.metadata b/.scl-utils.metadata new file mode 100644 index 0000000..c50652f --- /dev/null +++ b/.scl-utils.metadata @@ -0,0 +1 @@ +3c00c18611f2854c734962fc516490c22f57f2e7 SOURCES/scl-utils-20130529.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/macros.scl-filesystem b/SOURCES/macros.scl-filesystem new file mode 100644 index 0000000..78b3ce5 --- /dev/null +++ b/SOURCES/macros.scl-filesystem @@ -0,0 +1,324 @@ +%scl_files %{expand: +%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 specific stuff +mkdir -p %{buildroot}%{_root_sysconfdir}/{rpm,scl/prefixes} +echo -n '%' > %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config +cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF +scl %scl +EOF +cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF +%_scl_prefix +EOF +# filesystem +set +x +cat >> %{buildroot}/lang-exceptions << EOF +af_ZA +am_ET +ast_ES +az_IR +bg_BG +bn_IN +ca@valencia +ca_ES +ca_ES@valencian +cs_CZ +de_AT +de_CH +de_DE +default +el_GR +en_AU +en_CA +en_GB +en_US +en_NZ +es_AR +es_CL +es_CO +es_CR +es_DO +es_EC +es_ES +es_GT +es_HN +es_MX +es_NI +es_PA +es_PE +es_PR +es_SV +es_UY +es_VE +et_EE +eu_ES +fa_IR +fi_FI +fr_BE +fr_CA +fr_CH +fr_FR +gl_ES +he_IL +hr_HR +hu_HU +it_CH +it_IT +ja_JP +ko_KR +ks@devanagari +lv_LV +ms_MY +my_MM +nb_NO +nds_DE +nl_BE +nl_NL +pl_PL +pt_BR +pt_PT +ru_RU +sl_SI +sq_AL +sr_RS +sv_SE +uk_UA +ur_PK +zh_CN +zh_CN.GB2312 +zh_HK +zh_TW +zh_TW.Big5 +en@boldquot +en@quot +nds@NFE +sr@ije +sr@ijekavian +sr@ijekavianlatin +sr@latin +sr@Latn +uz@cyrillic +uz@Latn +be@latin +en@shaw +brx +brx_IN +EOF +cat >> %{buildroot}/iso_639.sed << EOF +1,/\\)!{ + x + s/^$// + # we are on the first iso-code--nothing to process here + t + # process and write to output + s/\\s\\+/ /g + s/!! + # use '%' as a separator of parsed and unparsed input + s/\\(.*\\)iso_639_2T_code="\\([^"]\\+\\)"\\(.*\\)/\\2 % \\1 \\3/ + s/\\([^%]\\+\\)%\\(.*\\)iso_639_2B_code="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3 % \\2 \\4/ + # clear subst. memory for the next t + t clear + :clear + s/\\([^%]\\+\\)%\\(.*\\)iso_639_1_code="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3 % \\2 \\4/ + t name + # no 639-1 code--write xx + s/%/\\tXX %/ + :name + s/\\([^%]\\+\\)%\\(.*\\)name="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3/ + s/ \\t/\\t/g + p + b + :noout +} +H +EOF +cat >> %{buildroot}/iso_3166.sed << EOF +1,/\\)!{ + x + s/^$// + # we are on the first iso-code--nothing to process here + t + # process and write to output + s/\\s\\+/ /g + s/!! + # use '%' as a separator of parsed and unparsed input + s/\\(.*\\)alpha_2_code="\\([^"]\\+\\)"\\(.*\\)/\\2 % \\1 \\3/ + s/\\([^%]\\+\\)%\\(.*\\)alpha_3_code="\\([^"]\\+\\)"\\(.*\\)/\\1% \\2 \\4/ + # clear subst. memory for the next t + t clear + :clear + s/\\([^%]\\+\\)%\\(.*\\)numeric_code="\\([^"]\\+\\)"\\(.*\\)/\\1% \\2 \\4/ + t name + # no 3166 code--write xx + s/%/\\tXX %/ + :name + s/\\([^%]\\+\\)%\\(.*\\)name="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3/ + s/ \\t/\\t/g + p + b + :noout +} +H +EOF +mkdir -p %{buildroot}%{_scl_root} +rm -f $RPM_BUILD_DIR/%{buildsubdir}/filesystem +cd %{buildroot}%{_scl_root} +mkdir -p boot dev \\ + etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} \\ + home media mnt opt proc root run/lock srv sys tmp \\ + usr/{bin,etc,games,include,%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,%{_lib},sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11},src,src/kernels,src/debug} \\ + var/{adm,empty,gopher,lib/{games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd,uucp},tmp,db,cache,opt,games,yp} +ln -snf ../var/tmp usr/tmp +ln -snf spool/mail var/mail +ln -snf usr/bin bin +ln -snf usr/sbin sbin +ln -snf usr/lib lib +ln -snf usr/%{_lib} %{_lib} +sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml >%{buildroot}/iso_639.tab +sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml >%{buildroot}/iso_3166.tab +grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do + [[ "$d" =~ "^Reserved" ]] && continue + [[ "$d" =~ "^No linguistic" ]] && continue + locale=$c + if [ "$locale" = "XX" ]; then + locale=$b + fi + echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem + echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem +done +cat %{buildroot}/lang-exceptions | grep -v "^#" | grep -v "^$" | while read loc ; do + locale=$loc + locality= + special= + [[ "$locale" =~ "@" ]] && locale=${locale%%%%@*} + [[ "$locale" =~ "_" ]] && locality=${locale##*_} + [[ "$locality" =~ "." ]] && locality=${locality%%%%.*} + [[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc + # If the locality is not official, skip it + if [ -n "$locality" ]; then + grep -q "^$locality" %{buildroot}/iso_3166.tab || continue + fi + # If the locale is not official and not special, skip it + if [ -z "$special" ]; then + egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \\ + %{buildroot}/iso_639.tab || continue + fi + echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem + echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem +done +rm -f %{buildroot}/iso_639.tab +rm -f %{buildroot}/iso_639.sed +rm -f %{buildroot}/iso_3166.tab +rm -f %{buildroot}/iso_3166.sed +rm -f %{buildroot}/lang-exceptions +cat $RPM_BUILD_DIR/%{buildsubdir}/filesystem | grep "locale" | while read a b ; do + mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES +done +cat $RPM_BUILD_DIR/%{buildsubdir}/filesystem | 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} +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 + echo "%{_scl_root}/usr/share/man/$i" >> $RPM_BUILD_DIR/%{buildsubdir}/filesystem +done +set -x +} diff --git a/SPECS/scl-utils.spec b/SPECS/scl-utils.spec new file mode 100644 index 0000000..14abfcf --- /dev/null +++ b/SPECS/scl-utils.spec @@ -0,0 +1,215 @@ +Summary: Utilities for alternative packaging +Name: scl-utils +Version: 20130529 +Release: 1%{?dist} +License: GPLv2+ +Group: Applications/File +URL: https://fedorahosted.org/released/scl-utils/ +Source0: https://fedorahosted.org/released/scl-utils/%{name}-%{version}.tar.gz +Source1: macros.scl-filesystem +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Run-time utility for alternative packaging. + +%package build +Summary: RPM build macros for alternative packaging +Group: Applications/File +Requires: iso-codes +Requires: redhat-rpm-config + +%description build +Essential RPM build macros for alternative packaging. + +%prep +%setup -q + +%build +make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" + +%install +rm -rf %buildroot +mkdir -p %buildroot%{_sysconfdir}/rpm +mkdir -p %buildroot%{_sysconfdir}/scl/prefixes +pushd %buildroot%{_sysconfdir}/scl +ln -s prefixes conf +popd +mkdir -p %buildroot/opt/rh +install -d -m 755 %buildroot%{_mandir}/man1 +make install DESTDIR=%buildroot +cat %SOURCE1 >> %buildroot%{_sysconfdir}/rpm/macros.scl + +# remove brp-python-hardlink invocation as it is not present in RHEL5 +%if 0%{?rhel} == 5 + sed -i -e '/^.*brp-python-hardlink.*/d' %buildroot%{_sysconfdir}/rpm/macros.scl +%endif + +%clean +rm -rf %buildroot + +%files +%defattr(-,root,root,-) +%dir /opt/rh +%dir %{_sysconfdir}/scl/conf +%dir %{_sysconfdir}/scl/prefixes +%{_bindir}/scl +%{_bindir}/scl_enabled +%{_mandir}/man1/* +%{_sysconfdir}/bash_completion.d/scl.bash + +%{!?_rpmconfigdir:%global _rpmconfigdir /usr/lib/rpm} +%files build +%defattr(-,root,root,-) +%{_bindir}/sclbuild +%{_sysconfdir}/rpm/macros.scl +%{_rpmconfigdir}/scldeps.sh +%{_rpmconfigdir}/fileattrs/scl.attr +%{_rpmconfigdir}/brp-scl-compress +%{_rpmconfigdir}/brp-scl-python-bytecompile + +%changelog +* Wed May 29 2013 Jan Zeleny - 20130529-1 +- changed the upstream tarball location +- update to 20130529 + +* Fri Feb 01 2013 Jindrich Novy 20121110-2 +- add build compatibility fixes + +* Wed Dec 19 2012 Jindrich Novy 20121110-1 +- introduce sclbuild utility +- fix exporting of env. variables when mutiple collections are + enabled at the same time +- better bash completion +- fix changelog + +* Thu Sep 27 2012 Jindrich Novy 20120927-1 +- update to 20120927 +- better BUILDROOT processing +- bash completition for scl command +- debuginfo package now has SCL-specific provide +- non-SCL builds are without warning in build log +- improved help + +* Thu Aug 09 2012 Jindrich Novy 20120809-1 +- update to 20120809 +- processes the SCL buildroot correctly now + +* Thu Aug 02 2012 Jindrich Novy 20120802-1 +- update to 20120802 + +* Tue Jul 31 2012 Jindrich Novy 20120731-1 +- add functionality that allows to list all packages in a collection +- add dependency generators + +* Sat Jul 21 2012 Fedora Release Engineering - 20120613-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jun 13 2012 Jindrich Novy 20120613-1 +- Requires: iso-codes for basic filesystem in build subpackage +- add scl_require_package() macro to depend on a particular package + from the collection +- fix filesystem file list +- tighten runtime package dependency via scl_require() +- fix _localstatedir to point to the correct path according to redhat-rpm-config +- thanks to Bohuslav Kabrda for feature proposals/QA/fixes + +* Thu May 03 2012 Jindrich Novy 20120503-1 +- avoid doublefree corruption when reading commands from stdin + +* Sun Apr 22 2012 Jindrich Novy 20120423-1 +- keep filesystem macros out of the main sources as + it is distro-dependent + +* Fri Apr 13 2012 Jindrich Novy 20120413-1 +- filesystem ownership by meta package +- add man page +- fix memory leak when parsing commands from stdin +- use more descriptive error message if /etc/prefixes is missing + +* Wed Feb 29 2012 Jindrich Novy 20120229-1 +- do not prepend scl_* prefix to package names +- unify package naming to -package-version +- add scl --list functionality to list available SCLs + +* Thu Feb 09 2012 Jindrich Novy 20120209-1 +- fix minor bugs (#788194) + - clear temp files + - handle commands from stdin properly + - run command even if ran as "scl enable SCL command" from already + enabled SCL + +* Wed Jan 25 2012 Jindrich Novy 20120125-1 +- remove dsc macros +- trigger scl-utils-build BR inclusion while using scl macros + +* Wed Jan 11 2012 Jindrich Novy 20120111-1 +- add "dsc" alias to "scl" utility + +* Wed Dec 14 2011 Jindrich Novy 20111214-1 +- initial review fixes (#767556) + +* Fri Dec 9 2011 Jindrich Novy 20111209-1 +- allow to use dsc_* macros and dsc* package naming + +* Wed Nov 16 2011 Jindrich Novy 20111116-1 +- package is now named scl-utils + +* Mon Oct 17 2011 Jindrich Novy 20111017-1 +- initial packaging for upstream + +* Wed Sep 21 2011 Jindrich Novy 0.1-14 +- define %%_defaultdocdir to properly relocate docs into + a stack +- document a way how to pass command to stack via stdin + +* Wed Jun 22 2011 Jindrich Novy 0.1-13 +- fix Stack meta config configuration + +* Fri Jun 17 2011 Jindrich Novy 0.1-12 +- use own Stack path configuration mechanism + +* Fri Jun 17 2011 Jindrich Novy 0.1-11 +- avoid redefinition of %%_root* macros by multiple + occurence of %%stack_package +- make the Stack root path configurable + +* Tue Jun 14 2011 Jindrich Novy 0.1-10 +- stack utility allows to read command from stdin + +* Mon Jun 13 2011 Jindrich Novy 0.1-9 +- introduce stack enablement tracking +- introduce "stack_enabled" helper utility to let a stack + application figure out which stacks are actually enabled +- disallow running stacks recursively + +* Mon Jun 13 2011 Jindrich Novy 0.1-8 +- stack utility returns executed commands' exit value + +* Fri Jun 10 2011 Jindrich Novy 0.1-7 +- fix possible segfault in the stack utility + +* Fri Jun 10 2011 Jindrich Novy 0.1-6 +- %%stack_name: initial part of stack prefix and name of + meta package providing scriptlets +- %%stack_prefix: stack namespacing part to be prepended to + original non-stack package name, can be used for Provides + namespacing as well +- %%stack_runtime: run-time package name providing scriptlets +- %%stack_require: macro to define dependency to other stacks + +* Thu Jun 09 2011 Jindrich Novy 0.1-5 +- split the package into two - runtime and build part +- decrease verbosity when enabling a stack + +* Wed Jun 08 2011 Jindrich Novy 0.1-4 +- prepend stack package with stack_* to prevent namespace + conflicts with core packages + +* Thu Jun 02 2011 Jindrich Novy 0.1-3 +- introduce metapackage concept + +* Wed Jun 01 2011 Jindrich Novy 0.1-2 +- modify macros so that they don't change preamble tags + +* Sun May 08 2011 Jindrich Novy 0.1-1 +- initial packaging