Minor changes and bugfixes
- scl_prefix now accepts a parameter to improve inter-collection dependencies (#1028953) - modified the behavior of debuginfo generation process - changed command description in scl man pages - moved macros.scl to %{_rpmconfigdir}/macros.d directory - added conditional dependencies for main metapackage - scl_vendor macro gets automatically written into the macros.{scl}-config file
This commit is contained in:
parent
1ae2c3fe58
commit
285ca493bd
100
0003-Modified-the-behavior-of-debuginfo-generation-proces.patch
Normal file
100
0003-Modified-the-behavior-of-debuginfo-generation-proces.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
From 1a276e247244fdbba739a09ac93765914499dd25 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Albert Uchytil <auchytil@redhat.com>
|
||||||
|
Date: Wed, 2 Apr 2014 17:00:04 +0200
|
||||||
|
Subject: [PATCH] Modified the behavior of debuginfo generation process
|
||||||
|
|
||||||
|
* Removed debug package definition from macros.scl
|
||||||
|
* Added %scl_debug macro, that adds correct dependencies to debug packages.
|
||||||
|
* Added conditional definition of __debug_package macro
|
||||||
|
This change was required, to enable correct behavior for the case, when
|
||||||
|
the %debug_package is set to %{nil}. Moved %scl_debug macro call in front
|
||||||
|
of __os_install_post definition, to achieve desired macro expansion
|
||||||
|
* Removed automatic creation of debuginfo metapackage.
|
||||||
|
---
|
||||||
|
macros.scl | 51 ++++++++++++++++++++++++++++++++++-----------------
|
||||||
|
1 file changed, 34 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/macros.scl b/macros.scl
|
||||||
|
index 8663198094404f7ef852aeeb84f47c4ed679a724..598b806ab16ca3bdbff8dbf3a6c6ba1ebd2aafd6 100644
|
||||||
|
--- a/macros.scl
|
||||||
|
+++ b/macros.scl
|
||||||
|
@@ -3,6 +3,39 @@
|
||||||
|
# Copyright (C) 2012 Red Hat, Inc.
|
||||||
|
# Written by Jindrich Novy <jnovy@redhat.com>.
|
||||||
|
|
||||||
|
+%scl_debug() %{expand:
|
||||||
|
+%define old_debug %{lua:print(rpm.expand("%{debug_package}"):len())}
|
||||||
|
+%global debug_package %{expand:
|
||||||
|
+%if "%{?old_debug}" == "0"
|
||||||
|
+ %{expand: %{nil}}
|
||||||
|
+%else
|
||||||
|
+%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
|
||||||
|
+ %{expand: %{nil}}
|
||||||
|
+%else
|
||||||
|
+%ifnarch noarch
|
||||||
|
+%package debuginfo
|
||||||
|
+Summary: Debug information for package %{name}
|
||||||
|
+Group: Development/Debug
|
||||||
|
+AutoReqProv: 0
|
||||||
|
+Requires: %scl_runtime
|
||||||
|
+Provides: scl-package(%scl)
|
||||||
|
+%{lua:
|
||||||
|
+ debuginfo=tonumber(rpm.expand("%{old_debug}"))
|
||||||
|
+ if debuginfo > 0 then
|
||||||
|
+ rpm.define("__debug_package 1")
|
||||||
|
+ end
|
||||||
|
+}
|
||||||
|
+%description debuginfo
|
||||||
|
+This package provides debug information for package %{name}.
|
||||||
|
+Debug information is useful when developing applications that use this
|
||||||
|
+package or when debugging this package.
|
||||||
|
+%files debuginfo -f debugfiles.list
|
||||||
|
+%defattr(-,root,root)
|
||||||
|
+%endif
|
||||||
|
+%endif
|
||||||
|
+%endif
|
||||||
|
+%{nil}}}
|
||||||
|
+
|
||||||
|
%scl_package() %{expand:%{!?_root_prefix:
|
||||||
|
%global pkg_name %1
|
||||||
|
%global scl_name %{scl}
|
||||||
|
@@ -43,6 +75,7 @@
|
||||||
|
%global _docdir %{_datadir}/doc
|
||||||
|
%global _defaultdocdir %{_docdir}
|
||||||
|
%global scl_pkg_name %{scl}-%{pkg_name}
|
||||||
|
+%scl_debug
|
||||||
|
%global __os_install_post %{expand:
|
||||||
|
/usr/lib/rpm/brp-scl-compress %{_scl_root}
|
||||||
|
%{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}
|
||||||
|
@@ -53,23 +86,6 @@
|
||||||
|
/usr/lib/rpm/redhat/brp-python-hardlink
|
||||||
|
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars}
|
||||||
|
%{nil}}
|
||||||
|
-%global debug_package %{expand:
|
||||||
|
-%ifnarch noarch
|
||||||
|
-%global __debug_package 1
|
||||||
|
-%package debuginfo
|
||||||
|
-Summary: Debug information for package %{name}
|
||||||
|
-Group: Development/Debug
|
||||||
|
-AutoReqProv: 0
|
||||||
|
-Requires: %scl_runtime
|
||||||
|
-Provides: scl-package(%scl)
|
||||||
|
-%description debuginfo
|
||||||
|
-This package provides debug information for package %{name}.
|
||||||
|
-Debug information is useful when developing applications that use this
|
||||||
|
-package or when debugging this package.
|
||||||
|
-%files debuginfo -f debugfiles.list
|
||||||
|
-%defattr(-,root,root)
|
||||||
|
-%endif
|
||||||
|
-%{nil}}
|
||||||
|
Requires: %scl_runtime
|
||||||
|
}
|
||||||
|
BuildRequires: scl-utils-build
|
||||||
|
@@ -79,3 +95,4 @@ Provides: scl-package(%scl)
|
||||||
|
|
||||||
|
%scl_require() %{_scl_prefix}/%1/enable, %1
|
||||||
|
%scl_require_package() %1-%2
|
||||||
|
+
|
||||||
|
--
|
||||||
|
1.9.0
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From e92630c3e6ef2253b44429680910912671589680 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Albert Uchytil <auchytil@redhat.com>
|
||||||
|
Date: Fri, 11 Apr 2014 13:24:30 +0200
|
||||||
|
Subject: [PATCH] Changed scl_prefix macro, that now accepts a parameter. Users
|
||||||
|
can now easily override default scl_prefix in some cases. (#1057634)
|
||||||
|
|
||||||
|
---
|
||||||
|
macros.scl | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/macros.scl b/macros.scl
|
||||||
|
index 45ae422705517017eaa7a20d57a15f82495350ea..f4685137301ca3a979b71ac1a934134b666837a5 100644
|
||||||
|
--- a/macros.scl
|
||||||
|
+++ b/macros.scl
|
||||||
|
@@ -35,10 +35,11 @@ package or when debugging this package.
|
||||||
|
%endif
|
||||||
|
%{nil}}}
|
||||||
|
|
||||||
|
+%scl_prefix() %{?scl:%(if [ "%1" = "%%1" ]; then echo "%{scl}-"; else echo "%1-"; fi)}%{!?scl:%{nil}}
|
||||||
|
+
|
||||||
|
%scl_package() %{expand:%{!?_root_prefix:
|
||||||
|
%global pkg_name %1
|
||||||
|
%global scl_name %{scl}
|
||||||
|
-%global scl_prefix %{scl}-
|
||||||
|
%global scl_runtime %{scl}-runtime
|
||||||
|
%{!?scl_basedir: %global scl_basedir /opt}
|
||||||
|
%{!?scl_vendor: %global scl_vendor rh}
|
||||||
|
--
|
||||||
|
1.9.0
|
||||||
|
|
30
0005-Changed-command-description-in-scl-man-pages.patch
Normal file
30
0005-Changed-command-description-in-scl-man-pages.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From ff24defdb7ff7e0460785202933ac024f273c82f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Albert Uchytil <auchytil@redhat.com>
|
||||||
|
Date: Tue, 8 Apr 2014 14:22:29 +0200
|
||||||
|
Subject: [PATCH] Changed <command> description in scl man pages
|
||||||
|
|
||||||
|
---
|
||||||
|
scl.1 | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scl.1 b/scl.1
|
||||||
|
index cbefc44a7d539370065912021a62a39844a51f80..51f32e4db0f18ca6a97231ad641f78ae88806e13 100644
|
||||||
|
--- a/scl.1
|
||||||
|
+++ b/scl.1
|
||||||
|
@@ -25,9 +25,10 @@ to update search paths, etc.
|
||||||
|
One can enable more Software Collections if needed and therefore one can use multiple
|
||||||
|
collections which are enabled by the left-right order as present on \fBscl\fP command-line.
|
||||||
|
.PP
|
||||||
|
-\fI<command>\fR is an arbitrary command or set of commands to execute within the Software
|
||||||
|
-Collection environment enabled. Control is returned back to the caller with the original
|
||||||
|
-environment as soon as the command finishes. If \fI<command>\fR is '-' (dash) then it is
|
||||||
|
+\fI<command>\fR marks specified Software Collections as enabled. Executes the script,
|
||||||
|
+which is expected to set proper environment. Executes the \fI<command>\fR.
|
||||||
|
+Control is returned back to the caller with the original environment as soon
|
||||||
|
+as the command finishes. If \fI<command>\fR is '-' (dash) then it is
|
||||||
|
read from the standard input.
|
||||||
|
.PP
|
||||||
|
Note: if you use \fI<command>\fR consisting of multiple arguments, you either need to
|
||||||
|
--
|
||||||
|
1.9.0
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From f6d35d3406cf57024d3fe44d308d7e11527e3551 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Albert Uchytil <auchytil@redhat.com>
|
||||||
|
Date: Wed, 2 Apr 2014 17:01:41 +0200
|
||||||
|
Subject: [PATCH] Added conditional dependencies for main metapackage
|
||||||
|
|
||||||
|
---
|
||||||
|
macros.scl | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/macros.scl b/macros.scl
|
||||||
|
index ac83ae302ce971c4564c107bd0a1c769db6465e2..cd19c593002eb1c823a12b24df43196374086120 100644
|
||||||
|
--- a/macros.scl
|
||||||
|
+++ b/macros.scl
|
||||||
|
@@ -53,10 +53,12 @@
|
||||||
|
/usr/lib/rpm/redhat/brp-python-hardlink
|
||||||
|
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars}
|
||||||
|
%{nil}}
|
||||||
|
-Requires: %scl_runtime
|
||||||
|
}
|
||||||
|
BuildRequires: scl-utils-build
|
||||||
|
+%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
|
||||||
|
Provides: scl-package(%scl)
|
||||||
|
+Requires: %scl_runtime
|
||||||
|
+%endif
|
||||||
|
%{?scl_package_override:%scl_package_override}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.5.3
|
||||||
|
|
@ -103,6 +103,10 @@ echo -n '%' > %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
|
|||||||
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
|
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
|
||||||
scl %scl
|
scl %scl
|
||||||
EOF
|
EOF
|
||||||
|
echo -n '%' >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
|
||||||
|
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
|
||||||
|
scl_vendor %{scl_vendor}
|
||||||
|
EOF
|
||||||
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
|
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
|
||||||
%_scl_prefix
|
%_scl_prefix
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Utilities for alternative packaging
|
Summary: Utilities for alternative packaging
|
||||||
Name: scl-utils
|
Name: scl-utils
|
||||||
Version: 20140127
|
Version: 20140127
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
URL: https://fedorahosted.org/SoftwareCollections/
|
URL: https://fedorahosted.org/SoftwareCollections/
|
||||||
@ -9,6 +9,10 @@ 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
|
Patch0: 0001-Added-Provides-scl-package-scl-for-metapackage-and-b.patch
|
||||||
Patch1: 0002-Added-scl-runtime-requirement-for-all-subpackages.patch
|
Patch1: 0002-Added-scl-runtime-requirement-for-all-subpackages.patch
|
||||||
|
Patch2: 0003-Modified-the-behavior-of-debuginfo-generation-proces.patch
|
||||||
|
Patch3: 0004-Changed-scl_prefix-macro-that-now-accepts-a-parameter.patch
|
||||||
|
Patch4: 0005-Changed-command-description-in-scl-man-pages.patch
|
||||||
|
Patch5: 0006-Added-conditional-dependencies-for-main-metapackage.patch
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -27,6 +31,10 @@ Essential RPM build macros for alternative packaging.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .provides-scl-package
|
%patch0 -p1 -b .provides-scl-package
|
||||||
%patch1 -p1 -b .requires-scl-package
|
%patch1 -p1 -b .requires-scl-package
|
||||||
|
%patch2 -p1 -b .scl-prefix-old
|
||||||
|
%patch3 -p1 -b .debuginfo-old
|
||||||
|
%patch4 -p1 -b .man-pages-old
|
||||||
|
%patch5 -p1 -b .conditional-deps
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
|
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
|
||||||
@ -74,6 +82,15 @@ rm -rf %buildroot
|
|||||||
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 11 2014 Albert Uchytil <auchytil@redhat.com> - 20140127-4
|
||||||
|
- reverted "-f filelist" modification
|
||||||
|
- added %scl_vendor macro to macros.%{scl}-config file (#1084095)
|
||||||
|
- %scl_prefix now accepts a parameter to improve
|
||||||
|
inter-collection dependencies (#1028953)
|
||||||
|
- modified the behavior of debuginfo generation process
|
||||||
|
- changed command description in scl man pages
|
||||||
|
- added conditional dependencies for main metapackage
|
||||||
|
|
||||||
* Tue Mar 18 2014 Albert Uchytil <auchytil@redhat.com> - 20140127-3
|
* Tue Mar 18 2014 Albert Uchytil <auchytil@redhat.com> - 20140127-3
|
||||||
- added scl-runtime requirement for all subpackages
|
- added scl-runtime requirement for all subpackages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user