147 Commits

Author SHA1 Message Date
Luis Pabon
13f644f783 build: Support for unit tests using Cmockery2
This patch will allow for developers to create unit tests for
their code.  Documentation has been added to the patch and
is available here:

doc/hacker-guide/en-US/markdown/unittest.md

Also, unit tests are run when RPM is created.

This patch is a replacement for http://review.gluster.org/#/c/7281
which removed unit test infrastucture from the repo due to multiple
conflicts.  Cmockery2 is now available in Fedora and EPEL, and soon
to be available in Debian and Ubuntu.  For all other operating
systems, please install from the source:

https://github.com/lpabon/cmockery2

BUG: 1067059

Change-Id: I1b36cb1f56fd10916f9bf535e8ad080a3358289f
Signed-off-by: Luis Pabón <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/7538
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-18 10:55:51 -07:00
Humble Chirammal
fc84c5af7b gfapi : remove gfapi.py to avoid confusion
python binding of libgfapi is evolving via libgfapi-python
project. The example available here confuses end users,
so removing it from this path.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Bug Id: 1119328
> Reviewed-on: http://review.gluster.org/7920
> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Reviewed-by: Thiago da Silva <thiago@redhat.com>
> Reviewed-by: Prashanth Pai <ppai@redhat.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Change-Id: I17b3aa0f0505342496019ce012cca21d84184027
Reviewed-on: http://review.gluster.org/8237
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 09:47:36 -07:00
Humble Chirammal
8d8abc19b0 Autoload fuse module in centos5/el5 versions.
This patch dynamically load 'fuse' module with the installation
of glusterfs-fuse package in centos/el5 distributions.

Change-Id: I4988a025bd18716fd6d355431196540e140224b3
BUG: 1108669
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8116
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-07-14 07:12:13 -07:00
Vikhyat Umrao
aa21473f0e build: glusterfs.spec.in, adding nfs-utils package dependency for server package
nfs-utils provides rpc.statd and it is a requirement for gluster-nfs

Change-Id: I054b7d6d8fb1efe0fed9c90077a93c4f559c1ef4
BUG: 1065654
Reported-by: Satheesaran Sundaramoorthi <sasundar@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-on: http://review.gluster.org/7966
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 06:29:42 -07:00
Kaleb S. KEITHLEY
858b570a0c build/glusterfs.spec.in: %post server doesn't wait for old glusterd
'killall glusterd' needs to wait for the old glusterd to exit
before starting the updated one, otherwise the new process can't
bind to its socket ports

Change-Id: Ib43c76f232e0ea6f7f8469fb12be7f2b907fb7c8
BUG: 1113543
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8185
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 01:39:30 -07:00
Harshavardhana
3920996536 glusterd/snapshot: verify for lvm commands
On non-Linux platforms we need to verify the
run time availability of LVM specific commands
and fail accordingly with a message.

Change-Id: Ie1e3870648f01ee129e390e2240c66e0c6249b90
BUG: 1061685
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8165
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Sachin Pandit <spandit@redhat.com>
2014-06-28 11:56:59 -07:00
Vijay Bellur
85ee12f7c0 Revert "gfapi : remove gfapi.py to avoid confusion"
This reverts commit d0547a28f59d80ed572652af3e327b761c4e540f

Change-Id: I79ff562fff33d4ad7ca34c6442eb0e980890965a
Reviewed-on: http://review.gluster.org/8139
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-06-20 07:49:12 -07:00
Humble Chirammal
d0547a28f5 gfapi : remove gfapi.py to avoid confusion
python binding of libgfapi is evolving via libgfapi-python
project. The example available here confuses end users,
so removing it from this path.

Change-Id: I90a0a29972f5230b8b440e8941aaca8a62e497a6
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/7920
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Thiago da Silva <thiago@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-20 03:39:18 -07:00
Justin Clift
053389c89e tests: add missing check for yajl to run-tests.sh
Also add it to the regression test Requires line, along with other
missing dependencies.

Change-Id: I2a83eb6797bafe8883d90565bb4c1ab93c074644
BUG: 1108958
Reviewed-on: http://review.gluster.org/8054
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-13 09:59:20 -07:00
Varun Shastry
17f3667221 extras: bash command completion for gluster
Change-Id: Ifd6e68b0288dc65e41e467b4ad02bfc3bded341f
BUG: 1108767
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/7979
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-13 09:56:39 -07:00
Poornima G
a726e3e538 rpm: Rename old hookscripts in an RPM-standard way.
Change-Id: I5e47ac8af8033821787281574276f38933de73cf
BUG: 1100251
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/7362
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-29 10:09:31 -07:00
Niels de Vos
79de5b6377 tests/rpm: always run ./autogen.sh to create missing files
In some occasions 'install-sh' seems to be missing in the 'make dist'
tarball when ./autogen.sh has not been run (skipped when 'configure'
exists). With this changes, 'autogen.sh' is always run so that missing
files should get added to the tarball.

Also write the logs from mock to a known location, and copy them to the
'/var/log/' directory that Jenkins archives after a regression test
failure. This makes it easier to find build issues that mock detects.

Change-Id: I8d0cf1afef61ebab0137aa0d20521e75a35ddbdd
BUG: 1038391
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7786
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-05-21 22:21:49 -07:00
Avra Sengupta
09e9775127 glusterd/geo-rep: Allow gverify.sh and S56glusterd-geo-rep-create-post.sh
to operate for non-root privileged slave volume

Mounting the slave-volume on local node, to perform disk checks
in order to allow gverify.sh to operate for non-root privileged
slave volume

Allowing the hook script S56glusterd-geo-rep-create-post.sh
to operate for non-root privileged slave volume

Modified peer_add_secret_pub.in to accept username as argument
and add the pem keys to the users's_home_dir/.ssh/authorized_keys

Wrote set_geo_rep_pem_keys.sh which accepts username as argument
and copies the pem keys from the user's home directory to
$GLUSTERD_WORKING_DIR/geo-replication/ and then copies the keys
to other nodes in the cluster and add them to the respective
authorized keys. The script takes as argument the user name and
assumes that the user will be present in all the nodes in the
cluster. It is not needed for root.

To summarize:
For a privileged slave user, execute the following on master node as super user:
gluster system:: execute gsec_create
gluster volume geo-replication <master_vol> [root@]<slave_ip>::<slave_vol> create push_pem

For a non-privileged slave user execute the following on master node as super user:
gluster system:: execute gsec_create
gluster volume geo-replication <master_vol> <slave_user>@<slave_ip>::<slave_vol> create push_pem
then on the slave node execute the following as super user:
/usr/local/libexec/glusterfs/set_geo_rep_pem_keys.sh <slave_user>

BUG: 1077452
Change-Id: I88020968aa5b13a2c2ab86b1d6661b60071f6f5e
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7744
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-05-14 10:24:25 -07:00
Pranith Kumar K
4cf348fcb6 glusterfs.spec: Add missing files in %files section
Thanks to Niels for all the help in finding RCA.

Change-Id: I5678c53a5c04de18ccd676fbaf5bf8b0c77c9c14
BUG: 1080970
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7645
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-05-04 21:21:56 -07:00
Meghana M
0088e318c1 cli/hooks : Add volume set options to enable/disable nfs-ganesha support.
1. gluster volume set nfs-ganesha.enable ON/OFF
If the option is set to ON, the volume field in the nfs-ganesha configuartion file is
edited. Gluster-nfs is disabled on that volume and the volume is exported using
nfs-ganesha.

2.gluster volume set nfs-ganesha.host IP
This is used to provide the IP of the nfs-ganesha host.

Note : nfs-ganesha.host MUST be set before using nfs-ganesha.enable ON

The switch from gluster-nfs to nfs-ganesha is mostly done by the hook-scripts
in the post phase of the 'set' option. As a result, gluster volume reset does not
function as it is expected to. By default, nfs-ganesha will be set to off but the
process  will not be killed.

Hence, a few changes have to be made post 'reset' option as well. Those changes
also have been added.

Change-Id: I7fdc14ee49d1724af96eda33c6a3ec08b1020788
BUG: 1092283
Signed-off-by: Meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7321
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-03 07:24:07 -07:00
Kaleb S. KEITHLEY
fe7d28e598 build: glusterfs.spec.in, minor/nit changes to sync with Fedora spec
minor/nit changes to sync with Fedora spec

Change-Id: I939eb79d5c3a19c09a3df3f30c82c86e1a610cd0
BUG: 1091408
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/7565
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-04-29 04:40:57 -07:00
Bala.FA
8647ea41d4 build: fix RHEL 7 build issue
Glusterfs build on RHEL 7 fails with "Installed (but unpackaged)
file(s) found".  This patch fixes it.

BUG: 1058188
Change-Id: I8f37935b75ba02d085e75a66cdbc4017d82faa2e
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7557
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-25 14:47:13 -07:00
Krutika Dhananjay
e55f3fe25a Add upgrade scripts for quota
Change-Id: I289662300d32f75e2fc6e789037c3224054a38a5
BUG: 969461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7418
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-17 11:38:20 -07:00
Bala.FA
2045c9ea1c build: rearrange spec file elements
This is majorly cleanup wrt spec file elements/definitions.  This
patch fixes to ease adding downstream specific conditions.

BUG: 1074939
Change-Id: I311abf8457417591a0d08569d3f83d73fa63cdc0
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7165
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-04-10 04:53:30 -07:00
Bala.FA
4bacb40fc8 build: set version based on git tag or specific
This patch brings version and release number generated at build time
using git tags or fixed content from VERSION file.

With git tag, version/release number are got from output of
'git describe --tags --match "v[0-9]*"' command.

This behavior can be overriden by having VERSION file with fixed
version/release.  The VERSION file should have text describing version
and release for example something like 'v3.4.0-1'

For testing this patch, its required to remove autom4te.cache
directory to avoid seeing previously set version.

BUG: 1074919
Change-Id: I8f68172e8b389b0ba0846e9adb4b597e67a909aa
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7164
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-04-10 04:52:28 -07:00
Kaleb S. KEITHLEY
091c49d85c rpm: fix broken glusterfs-server install of hooks
the %ghost hook directories are no longer ghosts now that files
are installed in them

Change-Id: I6133b891c73d87e4e35dc9c6c7ba7febbc9e2e7f
BUG: 1080970
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/7391
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-05 11:14:48 -07:00
Poornima G
326b77695f rpm: Include the hook scripts of add-brick, volume start, stop and set.
Change-Id: I9485da3d9a54a52cc524daff8f4f4caca3a6065d
BUG: 1080970
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/7346
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-27 21:35:22 -07:00
Justin Clift
f7a815a2d0 features/glupy: Rename Glupy python module to avoid namespace conflict
* Rename gluster.py to glupy.py to avoid namespace conflict (#1018619)
* Move the main Glupy files into glusterfs-extra-xlators rpm
* Move the Glupy Translator examples into glusterfs-devel rpm
* Add Glupy entry to the MAINTAINERS file

BUG: 1018619
Change-Id: I48de598ba5ae8eec0e7e276bbcca1abb0e549cef
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/6979
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2014-03-24 10:31:22 -07:00
Luis Pabon
6224e878cd build: Remove cmockery2 from repo
While we wait for cmockery2 to be available from Fedora,
we can remove cmockery2 from the repo.

BUG: 1077011

Change-Id: I75d462c607cd376a5d838ea83f4d12eb59757e73
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/7281
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-03-17 11:12:08 -07:00
Justin Clift
e9ab4bc851 build: Don't build geo-replication rpms when on EL5
Also fixes a typo bug where geo-replication isn't
being disabled correctly

BUG: 1074045
Change-Id: I28d42637bedcc28d65b6a34ab0183559202c4aed
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7210
Reviewed-by: Joe Julian <joe@julianfamily.org>
Tested-by: Joe Julian <joe@julianfamily.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2014-03-08 09:41:16 -08:00
Luis Pabon
c817c21403 build: GlusterFS Unit Test Framework
This patch will allow for developers to create unit tests for
their code.  Documentation has been added to the patch and
is available here:

doc/hacker-guide/en-US/markdown/unittest.md

Also, unit tests are run when RPM is created.

BUG: 1067059
Change-Id: I95cf8bb0354d4ca4ed4476a0f2385436a17d2369
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/7145
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Justin Clift <justin@gluster.org>
2014-03-06 04:10:46 -08:00
Niels de Vos
7098d6adb0 rpm: drop the glusterfs-devel dependency from glusterfs-api
This dependency was introduced when the Fedora packaging change for Bug
1016938 was (incorrectly) merged back into the upstream community
version.

Change-Id: I74a52c96533fa381e86b47f719480f00b12722ac
BUG: 1065750
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7022
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
2014-02-26 11:33:53 -08:00
Aravinda VK
d4e7dd1d2f spec: geo-rep: Include hooks and upgrade scripts
Added hook script S56glusterd-geo-rep-create-post.sh to
%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/ and upgrade
scripts added to %{_datadir}/glusterfs/scripts/

BUG: 1036539
Change-Id: Id114b827824e55516181ab8f564d419c258be3e2
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/6926
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-02-10 16:34:02 -08:00
Niels de Vos
fdc82748a1 build: Install /var/lib/glusterd/groups/virt by default
/var/lib/glusterd/groups/virt is not installed by default, but that
should be the case. It is provided as extras/groups-virt.example.

"make install" should correctly install this file, and the rpm packages
should include it.

Change-Id: I5284306cfc2882e3147bd72f496ad29db906fcb2
BUG: 1053854
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6717
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-21 06:48:35 -08:00
Niels de Vos
1e4f2d08f1 build: the main glusterfs package should not provide glusterfs-libs
Because of this incorrect provides, there is no requirement to update
glusterfs-libs. Most users will get a newer glusterfs-libs when updating
anyway, but users that manually select RPMs for updating my skip the
package, which will break their system.

Change-Id: I636dfac3f0a521924f1c2e82948bb513b0a5c9f9
BUG: 950083
Fedora-BUG: 1048489
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6642
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-01-07 05:16:11 -08:00
Harshavardhana
412e6ab758 build: fix day in the %changelog
This fixes `warnings` during build tests `rpm.t`

Change-Id: I706ceb1a39d046fe26f70f7b1b06f059abd5d3c0
BUG: 1000019
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6584
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-27 03:29:33 -08:00
Kaleb S. KEITHLEY
51a614384e build: Merge glusterfs.spec changes from Fedora
sync with FedoraSCM glusterfs.spec

N.B. the %doc hack for clear_xattrs.sh doesn't work in the CentOS 5 mock
builds of the rpm.t regression test, thus I'm leaving that out for now

Change-Id: I6fa85618c916a90fdbed5b231ea58bb51c9d2b70
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6473
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-12-13 08:58:32 -08:00
Harshavardhana
a25d321bad glusterfs.spec: Add 'python and python-ctypes' dependency
Change-Id: Icde586131bab00476abc44d8dd4e2db7e9d59b2b
BUG: 1033275
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6339
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-11-26 17:48:46 -08:00
Bala.FA
9228618f9d build: disable logging framework on rhel6
As rsyslog-mmcount is not yet available in rhel6 variant, this patch
disables logging framework on rhel6 and its dependency

BUG: 1018308
Change-Id: I6b7c04640f8d38055e00c697d1017c7a530463d0
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/6108
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-18 08:30:08 -07:00
Kaleb S. KEITHLEY
9a31a25cfa glusterfs.spec.in: bad %define _sharedstatedir for rhel5
Change-Id: If2ca7052dfce9fada42180f1d469316fcde5adcb
BUG: 1003184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6105
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-17 14:11:17 -07:00
Harshavardhana
46302d0f00 glusterfs.spec: Add _sharedstatedir for RHEL5
-------------------------------------------------
> # rpm --showrc | grep sharedstatedir | grep com
-14: _sharedstatedir %{_prefix}/com
> # cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
-------------------------------------------------

EL5 package has a missing macro _sharedstatedir which
should be pointing to `/var/lib` not `%{_prefix}/com`

Change-Id: Ida72360d73d5dffa767c69642ee395e9c82fa8c6
BUG: 1003184
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6054
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-12 00:41:14 -07:00
Kaleb S. KEITHLEY
6d28941b0b build: sync glusterfs.spec.in with Fedora glusterfs.spec
(this is the master branch)

sync with Fedora glusterfs.spec 3.4.1-2+

Change-Id: I8a303efb0ac8cd3e04531e2f02427e3590387493
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6059
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-11 12:26:52 -07:00
Niels de Vos
c436b89a71 rpm: glusterfs-api-devel requires glusterfs-devel
When installing the glusterfs-api-devel package in order to build
software that uses libgfapi, there are unmet dependencies. Installing
glusterfs-devel additionally solved these link errors:

  $ echo 'int main(){}' > bar.c
  $ gcc -o bar bar.c $(pkg-config --libs glusterfs-api)
  /usr/bin/ld: cannot find -lglusterfs
  /usr/bin/ld: cannot find -lgfrpc
  /usr/bin/ld: cannot find -lgfxdr
  collect2: error: ld returned 1 exit status

Change-Id: I12e922aa6609809c03ec2c9a0d8a47c5df91d0a1
BUG: 1017094
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6056
Reviewed-by: Bala FA <barumuga@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-09 20:25:11 -07:00
Aravinda VK
79ba7b3e2e geo-rep: logrotate: Logrotate handling
In existing georep logrotate was implemented by handling SIGSTOP
and SIGCONT, gsyncd was failing to start again after SIGSTOP.
New approach uses WatchedFileHandler in logging, which tracks the
log file changes or logrotate. Reopens the log file if logrotate is
triggered or if same log file is updated from other process.

As per python doc:
http://docs.python.org/2/library/logging.handlers.html:
The WatchedFileHandler class, located in the logging.handlers module,
is a FileHandler which watches the file it is logging to. If the file
changes, it is closed and reopened using the file name.

A file change can happen because of usage of programs such as newsyslog
and logrotate which perform log file rotation. This handler, intended
for use under Unix/Linux, watches the file to see if it has changed
since the last emit. (A file is deemed to have changed if its device
or inode have changed.) If the file has changed, the old file stream
is closed, and the file opened to get a new stream.

Change-Id: I30f65eb1e9778b12943d6e43b60a50344a7885c6
BUG: 1012776
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/5968
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-03 21:26:00 -07:00
Niels de Vos
c499ef86a2 gfapi.py: support dynamic loading of versioned libraries
Currently gfapi.py only loads libraries by filename ending in ".so".  On
an installed system without development packages, the <lib>.so filenames
are not available. ctypes.util.find_library() can be used to detect the
files dynamically.

In addition to this, also fixing some minor indention errors and package
the library into the Python site-packages path. Python applications and
libraries can now access libgfapi through 'from glusterfs import gfapi'.

Change-Id: I71e38dabd3ade5dcf24813bf2fc25cda91b571c6
BUG: 1005146
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5835
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-02 13:04:03 -07:00
Anand Avati
7f60841506 tests: take regression tests out of autotools
make run-tests.sh "location independent" and replace 'make install'
with cpio in glusterfs.spec.in

Change-Id: I140473c7f558e1e0af93a863b79098ced516a76b
BUG: 764966
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5986
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-09-20 21:12:39 -07:00
Harshavardhana
5d94695e9a tests: Create a regression-tests package for distribution
As of today regression tests are an in-house breed, by making
it a new package and distributing it ensures larger set of
people use it and contribute to it. This can also be used
by any consumer/user to build their own environment for glusterfs
regression testing which is today limited only to 'upstream'
'glusterfs' releases and build.gluster.org

Change-Id: I4f7e9fd1c49982dcf0d788ef6a83ffe895a956ac
BUG: 764966
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5674
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-09-19 09:28:44 -07:00
Niels de Vos
0b60850874 qemu-block: fix building from distribution tarball when glib2-devel is installed
Building RPMs from a 'make dist' tarball fails when qemu-block is
enabled. Enabling is done automatically when the glib2 development files
are available (enabled by ./configure).

Manual building with:

  $ ./autogen.sh && ./configure && make dist && rpmbuild -ta *.tar.gz

Building in mock works fine, glib2-devel is not installed by default so
the qemu-block xlator gets disabled. This change also adds glib2-devel
to the BuildRequires in the glusterfs.spec file, causing the qemu-block
xlator to be built by default, and included in the glusterfs RPM.

Change-Id: Ibb73628772586d9e07bbfde7a8ff2fc973489086
BUG: 986775
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5896
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-12 13:45:40 -07:00
Niels de Vos
d3e533fe33 rpm: fix "warning: File listed twice: .../glusterd.info"
Commit a482e422 added glusterd.info to the %files section of the
glusterfs-server package. However, this file was listed already. This
causes the following warning when building the RPMs:

    warning: File listed twice: /var/lib/glusterd/glusterd.info

Merging the attributes for /var/lib/glusterd/glusterd.info into one line
prevents this warning.

Change-Id: I0d518ec186a8725dc4c5cba00b60da83fdadf103
BUG: 1005161
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5836
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-08 09:49:31 -07:00
Bala.FA
f8e968a494 build: handle dependencies for syslog properly
This patch conditionally enables rsyslog dependencies based on syslog
build option.

Change-Id: I2168f29a03504ec839c3048ce112e8dfb2226aa0
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5684
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-09-03 00:47:51 -07:00
Niels de Vos
32fb404ef2 build: fix days and dates in the %changelog of the spec-file (2nd part)
This prevents more unneeded build warnings like:

    warning: bogus date in %changelog: Mon Apr 22 2008 ...

Bug: 1000019
Change-Id: I1d59fb93806e25a4629ce027beec324d03702e15
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5701
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-23 12:05:56 -07:00
Niels de Vos
19fa9b4d6e build: fix days and dates in the %changelog of the spec-file
This prevents unneeded build warnings like:

    warning: bogus date in %changelog: Mon Apr 22 2008 ...

Bug: 1000019
Change-Id: Ie584e5faf5d04672186eada718aba7e71bd82b42
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5692
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-22 21:31:40 -07:00
Bala.FA
1ea8ee6bc9 log: add logger.conf.example file
This example file can be safely renamed as logger.conf to enable
syslog logging

Change-Id: If49dd6002a046915b2eca330b7a539f4fa1f94fa
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5622
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-14 13:06:31 -07:00
Bala.FA
e75071a5ee log: add rsyslog gluster configuration file
This patch comes with rsyslog gluster configuration file for fedora
and rhel >= 6.  It disables syslog at rpm build time if targetted
platform is rhel < 6 as there is no rsyslog support.

Change-Id: I95c076874b6891ff08dee1b35980f95529fb0f37
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5543
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-08-13 07:08:21 -07:00
Kaleb S. KEITHLEY
5fb1714c64 build: sync glusterfs.spec.in with Fedora glusterfs.spec
(this is the master branch)

* add necessary requires
* add -cli subpackage
* fix other minor differences with Fedora glusterfs.spec

Change-Id: Ifd535463a68cfd0793691e37148f411b95b41867
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5522
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-08-07 22:23:04 -07:00