This commit is contained in:
Kaleb S. KEITHLEY 2016-10-26 12:49:55 -04:00
parent f7c808dc05
commit f78d93315a
3 changed files with 151 additions and 11 deletions

View File

@ -0,0 +1,48 @@
--- glusterfs-3.9.0rc2/xlators/encryption/crypt/src/keys.c.orig 2016-10-26 10:28:14.832787325 -0400
+++ glusterfs-3.9.0rc2/xlators/encryption/crypt/src/keys.c 2016-10-26 12:04:34.175730111 -0400
@@ -113,29 +113,41 @@
static void kderive_update(struct kderive_context *ctx)
{
uint32_t i;
+#if (OPENSSL_VERSION_NUMBER < 0x1010002f)
HMAC_CTX hctx;
+#endif
+ HMAC_CTX *phctx = NULL;
unsigned char *pos = ctx->out;
uint32_t *p_iter = (uint32_t *)ctx->fid;
uint32_t num_iters = ctx->out_len / PRF_OUTPUT_SIZE;
check_prf_iters(num_iters);
+#if (OPENSSL_VERSION_NUMBER < 0x1010002f)
HMAC_CTX_init(&hctx);
+ phctx = &hctx;
+#else
+ phctx = HMAC_CTX_new();
+#endif
for (i = 0; i < num_iters; i++) {
/*
* update the iteration number in the fid
*/
*p_iter = htobe32(i);
- HMAC_Init_ex(&hctx,
+ HMAC_Init_ex(phctx,
ctx->pkey, ctx->pkey_len >> 3,
EVP_sha256(),
NULL);
- HMAC_Update(&hctx, ctx->fid, ctx->fid_len);
- HMAC_Final(&hctx, pos, NULL);
+ HMAC_Update(phctx, ctx->fid, ctx->fid_len);
+ HMAC_Final(phctx, pos, NULL);
pos += PRF_OUTPUT_SIZE;
}
- HMAC_CTX_cleanup(&hctx);
+#if (OPENSSL_VERSION_NUMBER < 0x1010002f)
+ HMAC_CTX_cleanup(phctx);
+#else
+ HMAC_CTX_free(phctx);
+#endif
}
static void kderive_final(struct kderive_context *ctx, unsigned char *child)

View File

@ -3,7 +3,7 @@
%global _for_fedora_koji_builds 1
# uncomment and add '%' to use the prereltag for pre-releases
# %%global prereltag rc2
%global prereltag rc2
##-----------------------------------------------------------------------------
## All argument definitions should be placed here and keep them sorted
@ -90,6 +90,11 @@
%global _with_tmpfilesdir --without-tmpfilesdir
%endif
# Eventing
%if ( 0%{?rhel} && 0%{?rhel} < 6 )
%global _without_events --disable-events
%endif
# From https://fedoraproject.org/wiki/Packaging:Python#Macros
%if ( 0%{?rhel} && 0%{?rhel} < 6 )
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@ -110,6 +115,7 @@
# can't seem to make a generic macro that works
%global _init_glusterd %{_unitdir}/glusterd.service
%global _init_glusterfsd %{_unitdir}/glusterfsd.service
%global _init_glustereventsd %{_unitdir}/glustereventsd.service
%else
%global _init_enable() /sbin/chkconfig --add %1 ;
%global _init_disable() /sbin/chkconfig --del %1 ;
@ -120,6 +126,7 @@
# can't seem to make a generic macro that works
%global _init_glusterd %{_sysconfdir}/init.d/glusterd
%global _init_glusterfsd %{_sysconfdir}/init.d/glusterfsd
%global _init_glustereventsd %{_sysconfdir}/init.d/glustereventsd
%endif
%if ( 0%{_for_fedora_koji_builds} )
@ -160,8 +167,8 @@
Summary: Distributed File System
%if ( 0%{_for_fedora_koji_builds} )
Name: glusterfs
Version: 3.8.5
Release: 1%{?prereltag:.%{prereltag}}%{?dist}
Version: 3.9.0
Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
Vendor: Fedora Project
%else
Name: @PACKAGE_NAME@
@ -171,7 +178,7 @@ Vendor: Gluster Community
%endif
License: GPLv2 or LGPLv3+
Group: System Environment/Base
URL: http://www.gluster.org/docs/index.php/GlusterFS
URL: http://gluster.readthedocs.io/en/latest/
%if ( 0%{_for_fedora_koji_builds} )
Source0: http://bits.gluster.org/pub/gluster/%{name}/src/%{name}-%{version}%{?prereltag}.tar.gz
Source1: glusterd.sysconfig
@ -182,7 +189,7 @@ Source8: glusterfsd.init
%else
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
%endif
Patch0: glusterfs-3.8.5.xlators.crypt.patch
Patch0: glusterfs-3.9.0rc2.xlators.crypt.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -337,6 +344,31 @@ is in user space and easily manageable.
This package provides the development libraries and include files.
%if ( 0%{!?_without_events:1} )
%package events
Summary: GlusterFS Events
Group: Applications/File
Requires: %{name}-server%{?_isa} = %{version}-%{release}
Requires: python python-fasteners python-requests python-flask
Requires: python-prettytable
Requires: python-gluster = %{version}-%{release}
%if ( 0%{?rhel} && 0%{?rhel} <= 6 )
Requires: python-argparse
%endif
%description events
GlusterFS is a distributed file-system capable of scaling to several
petabytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file systems in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in user space and easily manageable.
This package provides the GlusterFS Events
%endif
%package extra-xlators
Summary: Extra Gluster filesystem Translators
Group: Applications/File
@ -392,6 +424,8 @@ Requires: pcs, dbus
%if ( 0%{?rhel} && 0%{?rhel} == 6 )
Requires: cman, pacemaker, corosync
%endif
# we need portblock resource-agent
Requires: %{_prefix}/lib/ocf/resource.d/portblock
%description ganesha
GlusterFS is a distributed file-system capable of scaling to several
@ -411,7 +445,8 @@ Summary: GlusterFS Geo-replication
Group: Applications/File
Requires: %{name} = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
Requires: python
Requires: python python-prettytable
Requires: python-gluster = %{version}-%{release}
Requires: rsync
%description geo-replication
@ -609,7 +644,8 @@ export CFLAGS
%{?_without_ocf} \
%{?_without_rdma} \
%{?_without_syslog} \
%{?_without_tiering}
%{?_without_tiering} \
%{?_without_events}
# fix hardening and remove rpath in shlibs
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
@ -751,6 +787,12 @@ exit 0
%post api -p /sbin/ldconfig
%if ( 0%{!?_without_events:1} )
%post events
%_init_restart glustereventsd
exit 0
%endif
%if ( 0%{?rhel} == 5 )
%post fuse
modprobe fuse
@ -818,7 +860,7 @@ fi
#reload service files if firewalld running
if $(systemctl is-active firewalld 1>/dev/null 2>&1); then
#firewalld-filesystem is not available for rhel7, so command used for reload.
firewall-cmd --quiet --reload 1>/dev/null 2>&1
firewall-cmd --reload 1>/dev/null 2>&1
fi
%endif
@ -848,6 +890,17 @@ exit 0
##-----------------------------------------------------------------------------
## All %%preun should be placed here and keep them sorted
##
%if ( 0%{!?_without_events:1} )
%preun events
if [ $1 -eq 0 ]; then
if [ -f %_init_glustereventsd ]; then
%_init_stop glustereventsd
%_init_disable glustereventsd
fi
fi
exit 0
%endif
%preun server
if [ $1 -eq 0 ]; then
if [ -f %_init_glusterfsd ]; then
@ -892,7 +945,7 @@ exit 0
%if (0%{?_with_firewalld:1})
#reload service files if firewalld running
if $(systemctl is-active firewalld 1>/dev/null 2>&1); then
firewall-cmd --quiet --reload
firewall-cmd --reload
fi
%endif
exit 0
@ -931,6 +984,7 @@ exit 0
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/barrier.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/cdc.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/changelog.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/fdl.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/gfid-access.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/read-only.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/shard.so
@ -971,8 +1025,9 @@ exit 0
%files client-xlators
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster/*.so
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster/pump.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/ganesha.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/client.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/dht2c.so
%files devel
%dir %{_includedir}/glusterfs
@ -1030,13 +1085,18 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs-georep
%{_sbindir}/gfind_missing_files
%{_sbindir}/gluster-mountbroker
%{_libexecdir}/glusterfs/gsyncd
%{_libexecdir}/glusterfs/python/syncdaemon/*
%{_libexecdir}/glusterfs/gverify.sh
%{_libexecdir}/glusterfs/set_geo_rep_pem_keys.sh
%{_libexecdir}/glusterfs/peer_gsec_create
%{_libexecdir}/glusterfs/peer_mountbroker
%{_libexecdir}/glusterfs/peer_mountbroker.py*
%{_libexecdir}/glusterfs/gfind_missing_files
%{_libexecdir}/glusterfs/peer_georep-sshkey.py*
%{_sbindir}/gluster-georep-sshkey
%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/geo-replication
%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
@ -1066,6 +1126,7 @@ exit 0
# introducing glusterfs module in site packages.
# so that all other gluster submodules can reside in the same namespace.
%{python_sitelib}/gluster/__init__.*
%{python_sitelib}/gluster/cliutils
%if ( 0%{!?_without_rdma:1} )
%files rdma
@ -1090,6 +1151,7 @@ exit 0
%doc extras/clear_xattrs.sh
# sysconf
%config(noreplace) %{_sysconfdir}/glusterfs
%exclude %{_sysconfdir}/glusterfs/eventsconfig.json
%dir %{_localstatedir}/run/gluster
%config(noreplace) %{_sysconfdir}/sysconfig/glusterd
%if ( 0%{_for_fedora_koji_builds} )
@ -1112,6 +1174,12 @@ exit 0
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/arbiter.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bit-rot.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bitrot-stub.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/jbrc.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/jbr.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/dht2s.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/posix2-ds.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/posix2-mds.so
%{_libdir}/libposix2common.so
%if ( 0%{!?_without_tiering:1} )
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/changetimerecorder.so
%endif
@ -1136,6 +1204,7 @@ exit 0
# snap_scheduler
%{_sbindir}/snap_scheduler.py
%{_sbindir}/gcron.py
%{_sbindir}/conf.py
# /var/lib/glusterd, e.g. hookscripts, etc.
%ghost %attr(0644,-,-) %config(noreplace) %{_sharedstatedir}/glusterd/glusterd.info
@ -1208,7 +1277,30 @@ exit 0
%{_prefix}/lib/firewalld/services/glusterfs.xml
%endif
%{_sbindir}/gf_logdump
%{_sbindir}/gf_recon
# Events
%if ( 0%{!?_without_events:1} )
%files events
%config(noreplace) %{_sysconfdir}/glusterfs/eventsconfig.json
%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/events
%{_libexecdir}/glusterfs/events
%{_libexecdir}/glusterfs/peer_eventsapi.py*
%{_sbindir}/glustereventsd
%{_sbindir}/gluster-eventsapi
%{_datadir}/glusterfs/scripts/eventsdash.py*
%if ( 0%{?_with_systemd:1} )
%{_unitdir}/glustereventsd.service
%else
%{_sysconfdir}/init.d/glustereventsd
%endif
%endif
%changelog
* Wed Oct 26 2016 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.9.0-0.1rc2
- 3.9.0rc2
* Thu Oct 13 2016 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.8.5-1
- 3.8.5 GA

View File

@ -1 +1 @@
371b853f946bb50ddac9a0df648690f8 glusterfs-3.8.5.tar.gz
f15980be6b404008169d512bbc7ebec8 glusterfs-3.9.0rc2.tar.gz