Commit Graph

514 Commits

Author SHA1 Message Date
Tim Burke e1377f6f50 CI: Remove centos-7 jobs
CentOS 7 will go EOL later this year, and infra wants to drop the nodes
soon-ish -- don't make them wait on our account.

Change-Id: Iaa31fc95ed2d100726adf60807c8bf95599afd3f
2024-03-01 10:39:38 -08:00
Eli Schwartz 46f237a7e0
configure: use more idiomatic test command
The autoconf manual warns against using the posix shell command `[ ... ]`:

> The `test` program is the way to perform many file and string tests. It
> is often invoked by the alternate name `[`, but using that name in
> Autoconf code is asking for trouble since it is an M4 quote character.

Using `[ foo = bar ]` is evaluated as `foo = bar` with m4-quoting
resolved. Here, we used `[[ foo = bar ]]` instead, which superficially
looks like a bashism, but is actually an m4 quote escape that resolves
to `[ foo = bar ]`.

Avoid the confusion by using the configure.ac standard for spelling
`test`.

Change-Id: I31dfa6ab4abb181159a4364900e6da24c929705f
2024-01-29 18:40:38 -05:00
Eli Schwartz b9a8a5b0b8
configure: fix basic syntax errors in the shell script programming language
Fixes regression in commit f3a99e81e9
which prevented successfully running on non-bash shells.

Bash provides the standard `test XXX = YYY` or `[ XXX = YYY ]`
utilities. It also provides the ability to spell the equals sign as a
double equals. This does nothing whatsoever -- it adds no new
functionality to bash, it forbids nothing, it is *literally* an exact
alias.

It should never be used under any circumstances. All developers must
immediately forget that it exists. Using it is non-portable and does not
work in /bin/sh scripts such as configure scripts, and it results in
dangerous muscle memory when used in bash scripts because it makes
people unthinkingly use the double equals even in /bin/sh scripts. To
add insult to injury, it makes scripts take up more disk space (by a
whole byte! and sometimes even a few bytes...)

Delete this accidental bashism, and restore the ability to get correct
./configure behavior on systems where /bin/sh is something other than a
symlink to GNU bash.

Change-Id: I38ee6d19d12cf8702ef394f3ee40f353f749b2c6
2024-01-29 18:40:16 -05:00
Takashi Kajinami ca2caab1ad Use spaces for code indent, instead of tabs
Some files use tabs instead of spaces for indent. Even some other
files use both of tabs and spaces which is quite confusing.

This updates all *.c files and *.h files to use spaces consistently.
Note that indent width is still inconsistent (2 vs 4), which may be
fixed later.

Change-Id: I7c0b2629785bfbaf3d0a06d8d81aa29c00168083
2024-01-27 17:03:16 +09:00
Takashi Kajinami ee1d5548b4 Replace CRLF by LF
We use LF instead of CRLF in general.

Change-Id: I81b7e30394db32293d990adfb923541f405da7e1
2024-01-27 12:17:49 +09:00
Zuul 6998dce1a0 Merge "Add missing dependency to README" 2024-01-25 19:32:46 +00:00
Zuul 8401b484b4 Merge "Fix bounds check in get_fragment_partition" 2024-01-25 19:31:48 +00:00
Takashi Kajinami 0cc4d28940 Remove trailing whitespaces
We probably want some format tools (like clang-format) in the future,
but for now all these spaces are deleted by sed.

Change-Id: Idcc1cbfa39aecf0d5109488defd89b8a60b786da
2024-01-25 15:17:45 +00:00
Tim Burke 4fe70e2303 Add missing dependency to README
We started requiring zlib headers a while back now.

See also: https://github.com/openstack/liberasurecode/pull/1 and
https://github.com/openstack/liberasurecode/pull/2

Co-Authored-By: Dorian Burihabwa <dorian@burihabwa.com>
Co-Authored-By: Mobile Developer <app.mobile.developer@gmail.com>
Change-Id: I1a3514b224dc284f7482960d1888cc1466cfadb1
2023-10-04 15:13:15 -07:00
Tim Burke 9c16df272a Fix bounds check in get_fragment_partition
See also: https://github.com/openstack/liberasurecode/pull/4 and
https://github.com/openstack/liberasurecode/pull/5

Co-Authored-By: utree <aproc@qq.com>
Co-Authored-By: Martin Raiber <martin@urbackup.org>
Change-Id: I174160dc1190398b6a8bbf60bec55f72ae1bec37
2023-10-04 15:08:07 -07:00
Zuul cc7de356d6 Merge "Switch from yasm to nasm" 2023-07-13 19:33:26 +00:00
Tim Burke a8faa01f6c Switch from yasm to nasm
... and build it from source so we can build latest ISA-L
(otherwise, the version shipped by some distros would
complain about a %use directive).

Change-Id: Ic9284c0c24860e44f0c73281492ad4bf873b3d7c
2023-07-13 16:59:36 +00:00
Tim Burke e8cd6112c3 Replace Flat XOR link with an archived version
Change-Id: I72f003c704beafe4c0f1ff72aa6202f4b70be46a
2023-01-04 15:38:25 -08:00
Zuul 296cf48e5a Merge "Add CentOS 9 Stream job" 2022-08-30 19:59:04 +00:00
Tim Burke defab5eacd Add CentOS 9 Stream job
Go ahead and move the FIPS job to CentOS 9; there doesn't seem to be
much value in having more than one FIPS job.

Change-Id: I8c2c95e490ec083116f2ed7b9fb0d66918424fb7
2022-08-30 12:12:08 -07:00
Tim Burke f592409bcc Release 1.6.3
Change-Id: I7214aeecc3c568d7b0be5db441d62ca7901ec855
2022-04-08 23:59:40 +00:00
Zuul 078906d03e Merge "Add build-time option to suffix library names sent to dlopen" 2022-04-06 14:25:54 +00:00
Tim Burke 9213d2c24b CI: Use https:// instead of git:// when cloning ISA-L
Change-Id: I8232a77c17b6a5ab3bd6cc7bde6510f2d038319c
2022-04-05 11:51:53 -07:00
Zuul 85d128ed77 Merge "Make arm64 jobs voting" 2021-12-10 23:45:34 +00:00
Tim Burke c54c90bc63 Include pointers to launchpad, ML, IRC in README
Change-Id: I230e19615dd5de388645fc9ec46664258f042a0c
2021-12-09 17:06:05 -08:00
Tim Burke 93cf181036 Make arm64 jobs voting
Note that the job still won't trigger a +1/-1 vote, but the comment will
accurately say whether the pipeline succeeded or failed.

Change-Id: I3fbc109526d194e1928fec5180e97071ad082b15
2021-12-08 11:25:09 -08:00
Tim Burke 9d7f6e83ed Move CI from CentOS 8 to CentOS 8 Stream
See also: http://lists.opendev.org/pipermail/service-announce/2021-December/000029.html

Change-Id: I370ea89682a871ec60ea593639b4b9212f0471cf
2021-12-08 11:18:23 -08:00
Zuul 373358c2ef Merge "Add FIPS jobs" 2021-10-30 05:30:12 +00:00
Tim Burke a42bad199c Pin ISA-L to v2.30.0
This is before they started having %use directives in their ASM.

Change-Id: I00418c3ad31055f44c11f6cf52603fe0d7496235
2021-10-26 15:37:09 -07:00
Tim Burke 53b5c5649b Add build-time option to suffix library names sent to dlopen
This is useful when repacking libraries for python wheels, for example.

Change-Id: Ie7b36584de5054c14a9b77d87a5c5fa5cc7a3719
2021-10-26 15:20:10 -07:00
Tim Burke 83765a37ec Add FIPS jobs
Change-Id: I95c805558510459b05df6220b9e3a46407258446
2021-10-26 15:18:32 -07:00
Zuul 7b235691e9 Merge "Fix underflow in flat_xor_hd code" 2021-07-26 22:24:08 +00:00
Tim Burke a7e1ddf685 Fix underflow in flat_xor_hd code
Change-Id: I9102f9883e979862557bd33958b2d116795b3169
Closes-Bug: #1726816
2021-06-28 22:55:19 -07:00
Tim Burke d1e129453b Add arm64 gate jobs
Change-Id: I9c05059a2342594598abaa965b326737de4fab45
2021-06-08 15:42:05 -07:00
Tim Burke 9dccbc9ff1 Release 1.6.2
Change-Id: I733c4bcf28d845aa0413ef4af06cdab6bc25cc7b
2020-10-08 14:46:14 -07:00
Kota Tsuyuzaki 15a257e572 Add a few coverage for legacy crc code
it actually doesn't assert the value
becase we now use same if statement
for the assertion but hope it to be
even a little better than no covarage.

Change-Id: I8860a2a8227e43e02afddcbad1e108157c0872f6
2020-10-02 21:18:02 +09:00
Tim Burke 5626cd5791 Be willing to write fragments with legacy crc
...if users *really* want to. They opt-in at run time by setting

    LIBERASURECODE_WRITE_LEGACY_CRC=1

in the environment; leaving it unset, set to an empty string, or set to
the string "0" continues to write zlib crcs.

UpgradeImpact
=============
This option is intended to allow a smooth upgrade from liberasurecode
1.5.0 and earlier in a system with multiple readers and writers:

  * Before upgrade, ensure the environment variable is set on all nodes.
    This will be ignored by earlier versions.
  * Upgrade liberasurecode on each node in the system, restarting any
    services that use it. Every node continues writing CRCs that are
    still usable by nodes that have not yet upgraded.
  * Now that every node is capable of reading zlib CRCs, remove the
    environment variable from each node to start writing new CRCs.

If you are already using 1.6.0 or later, just upgrade normally.

Closes-Bug: #1886088
Closes-Bug: #1867937
Related-Bug: #1666320
Needed-By: https://review.opendev.org/#/c/739164/
Change-Id: I9adfbe631a2dddc592fd08f8a325f3e8331b92f1
2020-09-30 16:38:11 -07:00
Zuul fb13b37506 Merge "Reformat license file" 2020-04-04 05:49:06 +00:00
Tim Burke 4230042476 Use ceph's GitHub mirrors for gf-complete/jerasure
Apparently upstream now requires that you log in?

Change-Id: I065ca37e5d69bb6ee3c7f00374af2e9c3da7739f
2020-03-12 23:52:20 -07:00
Tim Burke b24c23dadd Reformat license file
*Hopefully*, this will make it "standard" enough that GitHub will
call it out as the BSD-2-Clause that it is.

Change-Id: If097a3d86e1bd22cebbcbc160c6ae238663843c5
2020-03-10 18:38:10 -07:00
Zuul 03aa44f7d2 Merge "Do not discard a technical return value in tests" 2020-02-11 00:22:56 +00:00
Pete Zaitcev 4568188d77 Do not discard a technical return value in tests
Compilers are getting smarter, and we started getting this:

libec_slap.c: In function 'test_hd_code':
libec_slap.c:285:14: error: 'frags.array' may be used uninitialized
 in this function [-Werror=maybe-uninitialized]

The fix is to consume the error code in such a way that the
test proceeds further only when frags are indeed initialized.

Change-Id: I54db0172a36419206d00b22608523a08818f41f6
2020-02-05 23:26:31 -06:00
Thiago da Silva 4e4995cccc Build and test on centos-8 node
Change-Id: I6c7a1725ba00981d45511fc3c18795737b1967cb
2020-02-06 13:36:17 +11:00
Corey Bryant 0eb6cd321e Fix create_fake_frags_no_meta to use memset to fill frags
These aren't C strings; we shouldn't be using strncpy and friends.

Change-Id: I50cd7922dfa377ea27f3c9558a8a7268120ec733
Closes-Bug: #1859710
2020-01-28 16:33:01 -08:00
donnydavis 135c3a272f Update test to build on FreeBSD 12
Change-Id: I1ab792c3c509539a73a1808b8c28c6748185ae00
Closes-Bug: 1835071
2019-07-02 11:18:56 -04:00
Tim Burke 909d199ae9 Update .gitreview following project rename
Change-Id: Ifb497f1b65588c16a61ad59165ae10bb42bceb1b
2019-06-12 10:30:14 -07:00
Zuul 778bddf2c9 Merge "1.6.1 release" 2019-05-24 13:10:22 +00:00
Tim Burke 917859e239 1.6.1 release
Change-Id: Iaa6cc5bb06e715aafb3ecab86ae7cde6ef30413d
2019-05-23 16:03:58 -07:00
OpenDev Sysadmins 40dc74a6e9 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:24 +00:00
Tim Burke 7f7edb26bb Install yasm in RHEL based systems
...then switch CentOS job to be a voting gate job instead of
experimental.

Change-Id: I510e4da82deb779ece9ea5436b63c038a6c25b58
2019-04-09 10:09:16 -04:00
Zuul 8d7877fb19 Merge "Remove get_chksum to hush warnings" 2019-02-14 02:12:57 +00:00
Pete Zaitcev 7e97b2f808 Make our alt crc32 more portable
Apparently the author of our old crc32 assumed that shifting an int
to the right sign-extends, which is not always the case. Result is,
building and running make test on s390x fails. The fix is to force
a sign-extension using the "xor 0x80; sub 0x80" trick.

N.B. This does not cause a compatibility problem, because by a
miracle the "broken" crc32_alt was actually computing a stock
crc32, same that zlib has. Therefore, if someone, somewhere,
ran a Swift cluster on s390x with erasure coding policy,
the data in it is already stored with zlib checksums, as we
do it now anyway. This fix only permits the tests pass, which
used the bad data sample from x86.

Change-Id: Ibd5e4e6c02be00540a9648cc7e0f8efda275bf3f
Related-Change: Ib5ea2a830c7c23d66bf2ca404a3eb84ad00c5bc5
Related-Bug: 1666320
2019-02-13 21:25:33 +00:00
Pete Zaitcev 3564b711b4 Remove get_chksum to hush warnings
This popped up because Fedora mandates warning-free builds,
and get_chksum triggers a warning because it returns an
unaligned pointer (it is so analigned, static analysis in
the compiler can detect it).

The easiest fix is to remove it altogether. We think it should
be safe, because:

 - The function is not listed in any headers
 - Its counterpart is called "set_checksum", not "set_chksum"
 - PyECLib does not use it

We also hush some doxygen warnings about wrong comments.

Change-Id: Ie5bc736f912706e0ffd507765abd24e7f4761233
2019-02-13 00:46:52 -06:00
Zuul 405775cba1 Merge "Install Jerasure and ISA-L libs" 2018-10-22 19:10:33 +00:00
Thiago da Silva 096effe62a Install Jerasure and ISA-L libs
Install libraries to be tested w/ liberasurecode

Change-Id: Ic1cd7b61c780cf794640e4ce0d57e6126ad5756b
2018-10-22 10:40:16 -04:00