From 832502237313f2d42bbdb649bcf9b388c6d042b99ac6ea46de04c0782aee9d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 4 Jan 2016 15:11:02 +0000 Subject: [PATCH 1/4] - Version update to 4.03 release * Various small updates and fixes * Translations update * autotools based buildsystem OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=43 --- quota-4.00-makefile.patch | 20 -------------------- quota-4.01-warnquota.patch | 34 ++++++++++++++++++---------------- quota-4.02.tar.gz | 3 --- quota-4.03.tar.gz | 3 +++ quota.changes | 8 ++++++++ quota.spec | 31 ++++++++++++++++--------------- 6 files changed, 45 insertions(+), 54 deletions(-) delete mode 100644 quota-4.00-makefile.patch delete mode 100644 quota-4.02.tar.gz create mode 100644 quota-4.03.tar.gz diff --git a/quota-4.00-makefile.patch b/quota-4.00-makefile.patch deleted file mode 100644 index e12c02b..0000000 --- a/quota-4.00-makefile.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile.in.orig 2011-02-01 16:47:41.000000000 +0100 -+++ Makefile.in 2012-05-31 21:02:43.495728986 +0200 -@@ -14,12 +14,12 @@ STRIP = @STRIP@ - LN = ln -sf - ROOTDIR = - SUPER_OWNER = root --BIN_OWNER = bin --BIN_GROUP = bin -+BIN_OWNER = root -+BIN_GROUP = root - DEF_SUID_MODE = 4511 --DEF_BIN_MODE = 555 --DEF_SBIN_MODE = 555 --DEF_MAN_MODE = 444 -+DEF_BIN_MODE = 755 -+DEF_SBIN_MODE = 755 -+DEF_MAN_MODE = 644 - DEF_CONF_MODE = 644 - RPCGEN = rpcgen - diff --git a/quota-4.01-warnquota.patch b/quota-4.01-warnquota.patch index 5852207..1b0ea4f 100644 --- a/quota-4.01-warnquota.patch +++ b/quota-4.01-warnquota.patch @@ -1,3 +1,5 @@ +Index: warnquota.conf +=================================================================== --- warnquota.conf.orig +++ warnquota.conf @@ -1,21 +1,37 @@ @@ -20,11 +22,11 @@ +# +FAIL = "configure /etc/warnquota.conf before running warnquota" + -+# -+# command used for sending mails # -; ; and # type comments are allowed -# and even blank lines ++# command used for sending mails ++# +MAIL_CMD ▷⋅= "/usr/lib/sendmail -t" -# values can be quoted: @@ -50,12 +52,15 @@ # Text in the beginning of the mail (if not specified, default text is used) # This way text can be split to more lines # Line breaks are done by '|' character -@@ -45,27 +61,31 @@ GROUP_SIGNATURE = See you!| Your admin +@@ -45,33 +61,27 @@ GROUP_SIGNATURE = See you!| Your admin # #Here you can set a charset for emails sent by warnquota (e.g. UTF-8) #CHARSET = -# If you are using LDAP mail lookups. --# host, port, tls, binddn, and bindpw are straight forward. ++ ++############################################################## ++# Configuration for LDAP (if you are using LDAP mail lookups) + # host, port, tls, binddn, and bindpw are straight forward. -# LDAP_BASEDN is your search base dn -# LDAP_SEARCH_ATTRIBUTE is the attr for the value you are looking for -# LDAP_MAIL_ATTRIBUTE is the attribute you want used for the mail address @@ -69,38 +74,35 @@ -# Otherwise you should specify LDAP_HOST and LDAP_PORT -# LDAP_HOST = ldap -# LDAP_PORT = 389 +-# LDAP_TLS = false (false|never|allow|try|demand) use StarTLS +-# false - don't use starTLS +-# never - don't ask for a certificate +-# allow - request certificate, proceed even if not verified +-# try - request certificate, terminate if bad, proceed if not sent +-# demand - request certificate, proceed only if verified -# LDAP_BINDDN = uid=ReadOnlyUser,o=YourOrg -# LDAP_BINDPW = YourReadOnlyUserPassword -# LDAP_BASEDN = YourSearchBase -# LDAP_SEARCH_ATTRIBUTE = uid -# LDAP_MAIL_ATTRIBUTE = mailLocalAddress -# LDAP_DEFAULT_MAIL_DOMAIN = YourDefaultMailDomain.com -+ +############################################################## -+# Configuration for LDAP (if you are using LDAP mail lookups) -+ # host, port, tls, binddn, and bindpw are straight forward. -+############################################################## -+ - # --# end of example warnquota.conf file +# Your search base dn +# +# LDAP_BASEDN + - # +# The attr for the value you are looking for +# +# LDAP_SEARCH_ATTRIBUTE -+# + -+# +# The attribute you want used for the mail address +# +# LDAP_MAIL_ATTRIBUTE + -+# +# The default domain if the attribute isn't found +# +# LDAP_DEFAULT_MAIL_DOMAIN + -+# end of warnquota.conf file + # + # end of example warnquota.conf file + # diff --git a/quota-4.02.tar.gz b/quota-4.02.tar.gz deleted file mode 100644 index 7b50900..0000000 --- a/quota-4.02.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f4c2f48abf94bbdc396df33d276f2e9d19af58c232cb85eef9c174a747c33795 -size 489289 diff --git a/quota-4.03.tar.gz b/quota-4.03.tar.gz new file mode 100644 index 0000000..4ef2854 --- /dev/null +++ b/quota-4.03.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4d3c0312d213d88011a68efd17a8adfadce95b5d54196dea7b9346dadde1151 +size 570022 diff --git a/quota.changes b/quota.changes index c16f4cf..5c7b9db 100644 --- a/quota.changes +++ b/quota.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jan 4 15:07:35 UTC 2016 - tchvatal@suse.com + +- Version update to 4.03 release + * Various small updates and fixes + * Translations update + * autotools based buildsystem + ------------------------------------------------------------------- Fri Nov 28 10:19:05 UTC 2014 - tchvatal@suse.com diff --git a/quota.spec b/quota.spec index 75237b5..c8d85fe 100644 --- a/quota.spec +++ b/quota.spec @@ -1,7 +1,7 @@ # # spec file for package quota # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,19 +17,19 @@ Name: quota -Version: 4.02 +Version: 4.03 Release: 0 Summary: Disk Quota System License: GPL-2.0 and BSD-3-Clause Group: System/Filesystems Url: http://sourceforge.net/projects/linuxquota/ -Source0: http://downloads.sourceforge.net/project/linuxquota/quota-tools/%{version}/%{name}-%{version}.tar.gz +#Source0: http://downloads.sourceforge.net/project/linuxquota/quota-tools/%{version}/%{name}-%{version}.tar.gz +# Tarball repacked, missing subfolder, will be fixed in next release +Source0: %{name}-%{version}.tar.gz Source1: sysconfig.nfs-quota Source2: quotad.service Source3: quotad_env.sh -Patch1: %{name}-4.00-makefile.patch Patch2: %{name}-4.01-warnquota.patch -BuildRequires: automake BuildRequires: dbus-1-devel BuildRequires: e2fsprogs-devel BuildRequires: pkg-config @@ -54,27 +54,27 @@ Requires: quota = %{version} Requires: rpcbind Requires: sysconfig Requires(post): %fillup_prereq -Provides: quota:%{_initddir}/quotad %{?systemd_requires} %description nfs The quotad init script, which provides quota support on NFS mounts. %prep -%setup -q -n quota-tools -%patch1 +%setup -q %patch2 %build -autoreconf -fiv +export CFLAGS="%{optflags} -fPIE" +export LDFLAGS="-pie" %configure \ - --sysconfdir=%{_sysconfdir} \ - --enable-netlink \ - --enable-strip-binaries=no + --docdir=%{_docdir}/%{name} \ + --disable-silent-rules \ + --disable-ldapmail \ + --enable-rpcsetquota make %{?_smp_mflags} %install -make install ROOTDIR=%{buildroot} +%make_install #installing ldap-scripts install -m 755 ldap-scripts/*pl %{buildroot}%{_sbindir}/ @@ -110,8 +110,9 @@ cp %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.nfs-q %config %{_sysconfdir}/quotagrpadmins %config %{_sysconfdir}/quotatab %config %{_sysconfdir}/warnquota.conf -%doc README.* doc -%doc %{_mandir}/man?/* +%dir %{_docdir}/%{name} +%{_docdir}/%{name}/* +%{_mandir}/man?/* %{_bindir}/quota %{_bindir}/quotasync %{_sbindir}/applySystemQuotas.pl From 54513659dfc3b289d472c0f0332163f30404e4471a795d934ee0a6d2b111b4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 4 Jan 2016 15:11:31 +0000 Subject: [PATCH 2/4] - Refresh patch: * quota-4.01-warnquota.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=44 --- quota.changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quota.changes b/quota.changes index 5c7b9db..95c5a47 100644 --- a/quota.changes +++ b/quota.changes @@ -5,6 +5,8 @@ Mon Jan 4 15:07:35 UTC 2016 - tchvatal@suse.com * Various small updates and fixes * Translations update * autotools based buildsystem +- Refresh patch: + * quota-4.01-warnquota.patch ------------------------------------------------------------------- Fri Nov 28 10:19:05 UTC 2014 - tchvatal@suse.com From 8558e535acacab91ca242baa4a78239d7a98d380f79b6ec14d273413fd53e2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 5 Jan 2016 10:23:52 +0000 Subject: [PATCH 3/4] - Add patch to set variables upstream rather than in spec: * 0001-Set-fPIC-and-pie-as-default-params-when-building.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=45 --- ...-pie-as-default-params-when-building.patch | 36 +++++++++++++++++++ quota.changes | 6 ++++ quota.spec | 8 +++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 0001-Set-fPIC-and-pie-as-default-params-when-building.patch diff --git a/0001-Set-fPIC-and-pie-as-default-params-when-building.patch b/0001-Set-fPIC-and-pie-as-default-params-when-building.patch new file mode 100644 index 0000000..8cb4d74 --- /dev/null +++ b/0001-Set-fPIC-and-pie-as-default-params-when-building.patch @@ -0,0 +1,36 @@ +From add4f4954adc27ad7b2a698a1d3ac0fcd981602a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Tue, 5 Jan 2016 11:20:52 +0100 +Subject: [PATCH] Set -fPIC and -pie as default params when building + +--- + Makefile.am | 1 + + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 7c7a866..77f8400 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,5 @@ + ACLOCAL_AMFLAGS = -I m4 ++AM_LDFLAGS = -pie + + BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c + +diff --git a/configure.ac b/configure.ac +index cb33781..489c281 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [ + # ================ + # Check for cflags + # ================ +-CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" ++CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC" + AC_ARG_ENABLE([werror], + [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])], + [enable_werror="$enableval"], +-- +2.6.4 + diff --git a/quota.changes b/quota.changes index 95c5a47..7c4114c 100644 --- a/quota.changes +++ b/quota.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 5 10:23:28 UTC 2016 - tchvatal@suse.com + +- Add patch to set variables upstream rather than in spec: + * 0001-Set-fPIC-and-pie-as-default-params-when-building.patch + ------------------------------------------------------------------- Mon Jan 4 15:07:35 UTC 2016 - tchvatal@suse.com diff --git a/quota.spec b/quota.spec index c8d85fe..bbcac6a 100644 --- a/quota.spec +++ b/quota.spec @@ -29,7 +29,11 @@ Source0: %{name}-%{version}.tar.gz Source1: sysconfig.nfs-quota Source2: quotad.service Source3: quotad_env.sh +# PATCH-FIX-UPSTREAM Add pic and pie hardening to build +Patch1: 0001-Set-fPIC-and-pie-as-default-params-when-building.patch Patch2: %{name}-4.01-warnquota.patch +# needed for Patch1 +BuildRequires: automake BuildRequires: dbus-1-devel BuildRequires: e2fsprogs-devel BuildRequires: pkg-config @@ -61,11 +65,11 @@ The quotad init script, which provides quota support on NFS mounts. %prep %setup -q +%patch1 -p1 %patch2 %build -export CFLAGS="%{optflags} -fPIE" -export LDFLAGS="-pie" +autoreconf -fvi %configure \ --docdir=%{_docdir}/%{name} \ --disable-silent-rules \ From 7d6fcd2d697f8ac48d4081cb47a20f0af85cf359a594ddb3310d5d20f4357b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 5 Jan 2016 12:15:35 +0000 Subject: [PATCH 4/4] - Delete obsolete patch: * quota-4.00-makefile.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=46 --- quota.changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quota.changes b/quota.changes index 7c4114c..33f1cb8 100644 --- a/quota.changes +++ b/quota.changes @@ -13,6 +13,8 @@ Mon Jan 4 15:07:35 UTC 2016 - tchvatal@suse.com * autotools based buildsystem - Refresh patch: * quota-4.01-warnquota.patch +- Delete obsolete patch: + * quota-4.00-makefile.patch ------------------------------------------------------------------- Fri Nov 28 10:19:05 UTC 2014 - tchvatal@suse.com