From fec2d2214c550a5c70146cc389377f17093ed6012a4d5579d6bb945c6ac7b892 Mon Sep 17 00:00:00 2001 From: Peter Trommler Date: Fri, 11 Oct 2013 19:15:01 +0000 Subject: [PATCH] Accepting request 203011 from home:ptrommler Fix for bnc#845572. OBS-URL: https://build.opensuse.org/request/show/203011 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=19 --- add-group.patch | 19 +++++++++++++++++++ files-defattr.patch | 19 +++++++++++++++++++ ghc-rpm-macros.changes | 12 ++++++++++++ ghc-rpm-macros.spec | 10 ++++++++-- suse-disable-debug-packages.patch | 4 ++-- 5 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 add-group.patch create mode 100644 files-defattr.patch diff --git a/add-group.patch b/add-group.patch new file mode 100644 index 0000000..4c65a7e --- /dev/null +++ b/add-group.patch @@ -0,0 +1,19 @@ +diff -Nrup a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra +--- a/ghc-rpm-macros.ghc-extra 2013-04-24 09:08:41.000000000 +0200 ++++ b/ghc-rpm-macros.ghc-extra 2013-10-08 13:42:47.232096618 +0200 +@@ -21,6 +21,7 @@ + %define basepkg ghc-%{pkgname}\ + %package -n %{basepkg}\ + Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ ++Group: System/Libraries\ + %{?1:Version: %{pkgver}}\ + %{-l:License: %{-l*}}\ + %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} +@@ -72,6 +73,7 @@ Summary: %{?common_summary}%{!?co + %define basepkg ghc-%{pkgname}\ + %package -n %{basepkg}-devel\ + Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ ++Group: Development/Languages/Other\ + %{?1:Version: %{pkgver}}\ + %{-l:License: %{-l*}}\ + %{?ghc_devel_requires}\ diff --git a/files-defattr.patch b/files-defattr.patch new file mode 100644 index 0000000..a85d247 --- /dev/null +++ b/files-defattr.patch @@ -0,0 +1,19 @@ +diff -Nrup a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra +--- a/ghc-rpm-macros.ghc-extra 2013-10-08 15:35:46.955154547 +0200 ++++ b/ghc-rpm-macros.ghc-extra 2013-10-08 15:33:12.000000000 +0200 +@@ -2,6 +2,7 @@ + + %ghc_shared_files\ + %files -n %{basepkg} -f %{basepkg}.files\ ++%defattr(-,root,root,-)\ + %{?base_doc_files:%doc %base_doc_files}\ + %{nil} + +@@ -54,6 +55,7 @@ Group: System/Libraries\ + + %ghc_devel_files\ + %files -n %{basepkg}-devel -f %{basepkg}-devel.files\ ++%defattr(-,root,root,-)\ + %{?devel_doc_files:%doc %devel_doc_files}\ + %{nil} + diff --git a/ghc-rpm-macros.changes b/ghc-rpm-macros.changes index 0522687..f55889e 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Oct 11 19:00:13 UTC 2013 - peter.trommler@ohm-hochschule.de + +- add add-group.patch as patch 2 +* add Group tag to subpackages (required for SLE) +* put libraries into System/Libraries (packaged guidelines) +* fix bnc#845572 +- add files-defattr.patch as patch 3 +* set file permissions according to specfile guidelines +- thanks to Scott Bahling for preparing those patches +- enable colorized documentation + ------------------------------------------------------------------- Thu Sep 26 06:59:33 UTC 2013 - peter.trommler@ohm-hochschule.de diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1837981..929b3cc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -20,7 +20,7 @@ %global macros_dir %{_sysconfdir}/rpm -%global without_hscolour 1 +#%%global without_hscolour 1 Name: ghc-rpm-macros Version: 0.99 @@ -37,9 +37,13 @@ Source4: macros.ghc-suse Patch: buildService.patch # PATCH-FIX-OPENSUSE suse-disable-debug-packages.patch peter.trommler@ohm-hochschule.de -- openSUSE way to disable debug packages Patch1: suse-disable-debug-packages.patch +# PATCH-FIX-OPENSUSE add-group.patch sbahling@suse.com -- Make sure a Group: tag is generated in subpackages; peter.trommler@ohm-hocschule.de: also puts libraries in System/Libraries, see package group guidelines +Patch2: add-group.patch +# PATCH-FIX-OPENSUSE files-defattr.patch sbahling@suse.com -- Make sure defattr macro used in files sections; peter.trommler@ohm-hochschule.de: see also specfile guidelines, files section, permissions +Patch3: files-defattr.patch # PATCH-FIX-SLE sle-sp1-rpmdeps.patch peter.trommler@ohm-hochschule.de -- SLE's RPM is too old in 11 SP1 and SP2 Patch100: sle-sp1-rpmdeps.patch -#Requires: redhat-rpm-config + Requires: rpm %if %{undefined without_hscolour} Requires: hscolour @@ -64,6 +68,8 @@ Set of macros to build ghc packages that contain multiple subpackages. %setup -q -n %{name}-%{git_hash} %patch -p1 -b .obs %patch1 -p1 -b .debug +%patch2 -p1 +%patch3 -p1 %if 0%{?sles_version} %patch -P 100 -p1 %endif diff --git a/suse-disable-debug-packages.patch b/suse-disable-debug-packages.patch index a094edd..eedbd18 100644 --- a/suse-disable-debug-packages.patch +++ b/suse-disable-debug-packages.patch @@ -12,9 +12,9 @@ Index: ghc-rpm-macros-237337a6c6b3299bc6a437446c7f17136fc67ffa/ghc-rpm-macros.gh +%global __debug_install_post %{nil}\ +%global suse_insert_debug_package %{nil}\ +echo "/usr/lib/debug" > debugfiles.list\ -+mkdir -p $RPM_BUILD_ROOT/usr/lib/debug\ ++mkdir -p %{buildroot}/usr/lib/debug\ +echo "/usr/src/debug" > debugsources.list\ -+mkdir -p $RPM_BUILD_ROOT/usr/src/debug ++mkdir -p %{buildroot}/usr/src/debug + # ghc_bin_build %ghc_bin_build\