From f9ec733ab4b1adc4fb9617f5f1ef77ab8738dad9c12ab88ca76085088fb87f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= Date: Tue, 17 Nov 2015 13:29:26 +0000 Subject: [PATCH 1/2] - Ensure to link with --as-needed flag by removing SUSE_ASNEEDED=0. - Always use the default optimization even on pre-9.2 systems. - Remove redundant configure options while adding with-relro. - Relocate the lockdir to the /var/lib/samba/lock directory. - Cleanup and enhance the pidl sub package. OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/samba?expand=0&rev=510 --- patches.tar.bz2 | 4 ++-- samba.changes | 21 ++++++++++++++++++ samba.spec | 51 +++++++++++++++----------------------------- vendor-files.tar.bz2 | 4 ++-- 4 files changed, 42 insertions(+), 38 deletions(-) diff --git a/patches.tar.bz2 b/patches.tar.bz2 index 7d9ba6e..8b31c12 100644 --- a/patches.tar.bz2 +++ b/patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d97aa9c36053d63cc61222d37c34f02a2b54c1234348515b0191a65786e7c10 -size 29335 +oid sha256:0a8ca8635a788d7408600ec1fdcefddb78a22e47e30e76d1526561585594b7a7 +size 29343 diff --git a/samba.changes b/samba.changes index c42092e..ee7a11f 100644 --- a/samba.changes +++ b/samba.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Sat Nov 14 18:31:04 UTC 2015 - lmuelle@suse.com + +- Ensure to link with --as-needed flag by removing SUSE_ASNEEDED=0. +- Always use the default optimization even on pre-9.2 systems. + +------------------------------------------------------------------- +Sat Nov 14 18:10:01 UTC 2015 - lmuelle@suse.com + +- Remove redundant configure options while adding with-relro. + +------------------------------------------------------------------- +Sat Nov 14 17:44:24 UTC 2015 - lmuelle@suse.com + +- Relocate the lockdir to the /var/lib/samba/lock directory. + +------------------------------------------------------------------- +Sat Nov 14 16:59:09 UTC 2015 - lmuelle@suse.com + +- Cleanup and enhance the pidl sub package. + ------------------------------------------------------------------- Thu Oct 22 22:09:19 UTC 2015 - lmuelle@suse.com diff --git a/samba.spec b/samba.spec index 72a5555..a30d6ba 100644 --- a/samba.spec +++ b/samba.spec @@ -144,7 +144,7 @@ BuildRequires: systemd-devel %else %define build_make_smp_mflags %{?jobs:-j%jobs} %endif -%define SOURCE_TIMESTAMP 3508 +%define SOURCE_TIMESTAMP 3523 %define BRANCH %{version} %global with_mitkrb5 1 %global with_dc 0 @@ -355,6 +355,7 @@ Group: Development/Tools %if 0%{?suse_version} > 0 Requires: perl-base %endif +Requires: perl-Parse-Yapp Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description pidl @@ -1134,16 +1135,7 @@ mv VERSION VERSION.orig sed -e "s/^SAMBA_VERSION_VENDOR_SUFFIX=$/SAMBA_VERSION_VENDOR_SUFFIX=${vendor_tag}%{VENDOR}${product_suffix}/" VERSION.orig >VERSION %build -%if 0%{?suse_version} && 0%{?suse_version} < 911 - OPTIMIZATION="-O" -%else - # use the default optimization - unset OPTIMIZATION -%endif -%if 0%{?suse_version} > 1110 - export SUSE_ASNEEDED=0 -%endif -export CFLAGS="%{optflags} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS" +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS" %if 0%{?suse_version} && 0%{?suse_version} < 1141 %{?suse_update_config:%{suse_update_config -f}} %endif @@ -1153,35 +1145,24 @@ bundled_libraries_extra="libarchive" CONFIGURE_OPTIONS="\ --prefix=%{_prefix} \ --localstatedir=%{_localstatedir} \ - --sysconfdir=%{CONFIGDIR} \ - --with-configdir=%{CONFIGDIR} \ + --sysconfdir=%{_sysconfdir} \ --libdir=%{_libdir} \ --with-cachedir=%{LOCKDIR} \ - --with-lockdir=%{LOCKDIR} \ + --with-lockdir=%{LOCKDIR}/lock \ --with-logfilebase=%{LOGDIR} \ - --mandir=%{_mandir} \ --with-modulesdir=%{_libdir}/samba \ --disable-rpath \ --disable-rpath-install \ - --enable-cups \ --enable-debug \ --enable-fhs \ - --with-acl-support \ - --with-automount \ - --with-ads \ - --with-dnsupdate \ --with-pam \ --with-pammodulesdir=%{_lib}/security \ - --with-pam_smbpass \ --with-piddir=%{PIDDIR} \ - --with-quotas \ - --with-syslog \ + --with-relro \ %if 0%{?suse_version} > 1220 --enable-avahi \ --with-systemd \ %endif - --with-utmp \ - --with-winbind \ --with-shared-modules=%{auth_modules},%{vfs_modules},%{pdb_modules},%{idmap_modules} \ %if %with_mitkrb5 --with-system-mitkrb5 \ @@ -1224,7 +1205,7 @@ install -d -m 0755 -p \ %{buildroot}/%{_datadir}/omc/svcinfo.d \ %{buildroot}/%{_datadir}/samba/{LDAP,templates} \ %{buildroot}/%{_localstatedir}/adm \ - %{buildroot}/%{LOCKDIR}/{drivers/{WIN40,W32X86,W32MIPS,W32ALPHA,W32PPC,IA64,x64},netlogon,msg.lock,printing,private/msg.sock,profiles,winbindd_privileged} \ + %{buildroot}/%{LOCKDIR}/{drivers/{WIN40,W32X86,W32MIPS,W32ALPHA,W32PPC,IA64,x64},netlogon,lock/msg.lock,printing,private/msg.sock,profiles,winbindd_privileged} \ %{buildroot}/%{LOGDIR} \ %{buildroot}/%{PIDDIR} \ %{buildroot}/%{_var}/adm/fillup-templates \ @@ -1245,9 +1226,6 @@ rm \ %{buildroot}/%{_libdir}/samba/ldb/ldbsamba_extensions.so \ %endif -# Clean out files left behind by the PIDL install. -rm -r %{buildroot}/%{perl_vendorlib}/Parse/Yapp - # utility scripts scripts="creategroup mksmbpasswd.sh" install -d -m 0755 examples/scripts @@ -1673,7 +1651,8 @@ fi %{_libdir}/samba/config %{_libdir}/samba/rpc %attr(0775,root,ntadmin) %{LOCKDIR}/drivers -%dir %{LOCKDIR}/msg.lock +%dir %{LOCKDIR}/lock +%dir %{LOCKDIR}/lock/msg.lock %{LOCKDIR}/netlogon %attr(0770,root,users) %dir %{LOCKDIR}/profiles %{_bindir}/smbstatus @@ -2025,10 +2004,14 @@ fi %files pidl %defattr(-,root,root) %dir %{perl_vendorlib}/Parse -%{perl_vendorlib}/Parse/Pidl* -%{_mandir}/man1/pidl* -%{_mandir}/man3/Parse::Pidl* -%attr(755,root,root) %{_bindir}/pidl +%dir %{perl_vendorlib}/Parse/Pidl +%dir %{perl_vendorlib}/Parse/Yapp +%{perl_vendorlib}/Parse/Pidl.pm* +%{perl_vendorlib}/Parse/Pidl/* +%{perl_vendorlib}/Parse/Yapp/* +%{_mandir}/man1/pidl.1.* +%{_mandir}/man3/Parse::Pidl::*.3pm.* +%{_bindir}/pidl %files python %defattr(-,root,root) diff --git a/vendor-files.tar.bz2 b/vendor-files.tar.bz2 index 7874e40..918f819 100644 --- a/vendor-files.tar.bz2 +++ b/vendor-files.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78e59799213107efa3c0bda729edc3d978e20ae1b8177a8754573a67adcc31a0 -size 52982 +oid sha256:3219007fcf5801f63f6c8627edd44b862b12776ad795a6b60e74df41d517635a +size 52993 From 4830ba27c941b3ffb2aea6e9768758c839172523e2b9f80ae5f096cff65de215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= Date: Fri, 20 Nov 2015 10:48:38 +0000 Subject: [PATCH 2/2] Avoid conflict with perl-Parse-Yapp Both install %{perl_vendorlib}/Parse/Yapp/Driver.pm so we exclude the directory and the one particular file to catch potential more installs later too This is a follow up to Cleanup and enhance the pidl sub package. OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/samba?expand=0&rev=511 --- patches.tar.bz2 | 4 ++-- samba.spec | 7 ++++--- vendor-files.tar.bz2 | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/patches.tar.bz2 b/patches.tar.bz2 index 8b31c12..c7eb226 100644 --- a/patches.tar.bz2 +++ b/patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a8ca8635a788d7408600ec1fdcefddb78a22e47e30e76d1526561585594b7a7 -size 29343 +oid sha256:60c016eaf0856d6a5a6c3f52b4e6814e8baf79d91a023db4d66e3c01909ac581 +size 29381 diff --git a/samba.spec b/samba.spec index a30d6ba..6b6106b 100644 --- a/samba.spec +++ b/samba.spec @@ -144,7 +144,7 @@ BuildRequires: systemd-devel %else %define build_make_smp_mflags %{?jobs:-j%jobs} %endif -%define SOURCE_TIMESTAMP 3523 +%define SOURCE_TIMESTAMP 3531 %define BRANCH %{version} %global with_mitkrb5 1 %global with_dc 0 @@ -2005,13 +2005,14 @@ fi %defattr(-,root,root) %dir %{perl_vendorlib}/Parse %dir %{perl_vendorlib}/Parse/Pidl -%dir %{perl_vendorlib}/Parse/Yapp %{perl_vendorlib}/Parse/Pidl.pm* %{perl_vendorlib}/Parse/Pidl/* -%{perl_vendorlib}/Parse/Yapp/* %{_mandir}/man1/pidl.1.* %{_mandir}/man3/Parse::Pidl::*.3pm.* %{_bindir}/pidl +# both are part of perl-Parse-Yapp +%exclude %dir %{perl_vendorlib}/Parse/Yapp +%exclude %{perl_vendorlib}/Parse/Yapp/Driver.pm %files python %defattr(-,root,root) diff --git a/vendor-files.tar.bz2 b/vendor-files.tar.bz2 index 918f819..4781c65 100644 --- a/vendor-files.tar.bz2 +++ b/vendor-files.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3219007fcf5801f63f6c8627edd44b862b12776ad795a6b60e74df41d517635a -size 52993 +oid sha256:afd8855af366d573c48cd86a19c7f963d9716033412db6515bec24d2f8c89ea9 +size 52904