git: fc0bd5a7b6dd - main - sysutils/riak-cs: remove
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 04 Oct 2021 20:05:00 UTC
The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=fc0bd5a7b6dd00b7200750215fe24273c30fa976 commit fc0bd5a7b6dd00b7200750215fe24273c30fa976 Author: Dave Cottlehuber <dch@FreeBSD.org> AuthorDate: 2021-10-04 09:05:08 +0000 Commit: Dave Cottlehuber <dch@FreeBSD.org> CommitDate: 2021-10-04 20:04:09 +0000 sysutils/riak-cs: remove - requires unsupported erlang version - port version has not been updated in years Approved by: wg (maintainer) --- sysutils/Makefile | 1 - sysutils/riak-cs/Makefile | 82 ------------ sysutils/riak-cs/distinfo | 2 - sysutils/riak-cs/files/patch-rel_vars.config | 47 ------- .../patch-riak_test_src_downgrage_bitcask.erl | 140 --------------------- sysutils/riak-cs/files/riak_cs.in | 83 ------------ sysutils/riak-cs/pkg-descr | 6 - sysutils/riak-cs/pkg-plist | 19 --- 8 files changed, 380 deletions(-) diff --git a/sysutils/Makefile b/sysutils/Makefile index 910f92f3630e..311c12395da2 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1122,7 +1122,6 @@ SUBDIR += retail SUBDIR += rex SUBDIR += rhc - SUBDIR += riak-cs SUBDIR += rinse SUBDIR += rmlint SUBDIR += rocr diff --git a/sysutils/riak-cs/Makefile b/sysutils/riak-cs/Makefile deleted file mode 100644 index 3b13f5871e63..000000000000 --- a/sysutils/riak-cs/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -PORTNAME= riak-cs -PORTVERSION= 2.1.0 -PORTREVISION= 4 -CATEGORIES= sysutils -MASTER_SITES= http://s3.amazonaws.com/downloads.basho.com/riak-cs/${PORTVERSION:R}/${PORTVERSION}/ \ - http://downloads.basho.com.s3.amazonaws.com/riak-cs/${PORTVERSION:R}/${PORTVERSION}/ - -MAINTAINER= wg@FreeBSD.org -COMMENT= Open source, distributed, S3 interface to Riak KV - -LICENSE= APACHE20 -LICENSE_FILE= ${WRKSRC}/LICENSE - -BUILD_DEPENDS= ${LOCALBASE}/lib/riak-erlang/bin/erlc:lang/erlang-riak - -USES= gmake readline shebangfix -SHEBANG_FILES= deps/eper/priv/bin/dtop \ - deps/eper/priv/bin/ntop \ - deps/eper/priv/bin/redbug -USE_RC_SUBR= riak_cs - -USERS= riakcs -GROUPS= riak - -RIAKCS_CONFDIR?=${PREFIX}/etc/riak-cs -RIAKCS_DBDIR?= /var/db/riak-cs -RIAKCS_HOMEDIR?=${PREFIX}/lib/riak-cs -RIAKCS_LIBDIR?= ${PREFIX}/lib/riak-cs/lib -RIAKCS_LOGDIR?= /var/log/riak-cs - -PLIST_SUB+= RIAKCS_CONFDIR=${RIAKCS_CONFDIR} \ - RIAKCS_DBDIR=${RIAKCS_DBDIR} \ - RIAKCS_HOMEDIR=${RIAKCS_HOMEDIR} \ - RIAKCS_LIBDIR=${RIAKCS_LIBDIR} \ - RIAKCS_LOGDIR=${RIAKCS_LOGDIR} \ - USERS=${USERS} \ - GROUPS=${GROUPS} - -ALL_TARGET= rel -MAKE_JOBS_UNSAFE=yes -MAKE_ENV= PATH=${LOCALBASE}/lib/riak-erlang/bin:${PATH} - -post-patch: - @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/rel/vars.config - -do-install: - ${MKDIR} ${STAGEDIR}${RIAKCS_CONFDIR} - ${MKDIR} ${STAGEDIR}${RIAKCS_DBDIR} - ${MKDIR} ${STAGEDIR}${RIAKCS_LOGDIR} - ${INSTALL_DATA} ${WRKSRC}/rel/riak-cs/etc/riak-cs.conf ${STAGEDIR}${RIAKCS_CONFDIR}/riak-cs.conf.sample - ${INSTALL_DATA} ${WRKSRC}/rel/riak-cs/etc/advanced.config ${STAGEDIR}${RIAKCS_CONFDIR}/advanced.config.sample - ${INSTALL_DATA} ${WRKSRC}/rel/riak-cs/etc/cert.pem ${STAGEDIR}${RIAKCS_CONFDIR}/cert.pem.sample - ${INSTALL_DATA} ${WRKSRC}/rel/riak-cs/etc/key.pem ${STAGEDIR}${RIAKCS_CONFDIR}/key.pem.sample - (cd ${WRKSRC}/rel/riak-cs/lib/ && ${COPYTREE_BIN} . ${STAGEDIR}${RIAKCS_LIBDIR}) - (cd ${WRKSRC}/rel/riak-cs/bin/ && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin/) - (cd ${WRKSRC}/rel/riak-cs/lib/basho-patches && ${COPYTREE_SHARE} . ${STAGEDIR}${RIAKCS_LIBDIR}/basho-patches) - (cd ${WRKSRC}/rel/riak-cs/releases && ${COPYTREE_SHARE} . ${STAGEDIR}${RIAKCS_HOMEDIR}/releases) - ${CP} -R ${WRKSRC}/rel/riak-cs/erts-* ${STAGEDIR}${RIAKCS_HOMEDIR} - -post-install: - (cd ${STAGEDIR}${RIAKCS_HOMEDIR}; ${FIND} releases -type f \ - | ${SED} -e 's,^\./,,g' \ - | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ - | ${AWK} '{print "lib/riak-cs/"$$2 }' >> ${TMPPLIST}) - (cd ${STAGEDIR}${RIAKCS_HOMEDIR}; ${FIND} erts-* -type f \ - | ${SED} -e 's,^\./,,g' \ - | ${AWK} '{print length, $$0}' | ${SORT} -rn \ - | ${AWK} '{print "lib/riak-cs/"$$2 }' >> ${TMPPLIST}) - (cd ${STAGEDIR}${RIAKCS_HOMEDIR}; ${FIND} erts-* -type d -empty \ - | ${SED} -e 's,^\./,,g' \ - | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ - | ${AWK} '{print "@dir lib/riak-cs/"$$2 }' >> ${TMPPLIST}) - (cd ${STAGEDIR}${RIAKCS_LIBDIR}; ${FIND} . -type f \ - | ${SED} -e 's,^\./,,g' \ - | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ - | ${AWK} '{print "lib/riak-cs/lib/"$$2 }' >> ${TMPPLIST}) - (cd ${STAGEDIR}${RIAKCS_LIBDIR}; ${FIND} . -type d -empty \ - | ${SED} -e 's,^\./,,g' \ - | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ - | ${AWK} '{print "@dir lib/riak-cs/lib/"$$2 }' >> ${TMPPLIST}) - -.include <bsd.port.mk> diff --git a/sysutils/riak-cs/distinfo b/sysutils/riak-cs/distinfo deleted file mode 100644 index ca3e9ef9b693..000000000000 --- a/sysutils/riak-cs/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (riak-cs-2.1.0.tar.gz) = 3a7a67069f170986f6275defe9e79c3b87937865e6c978eb7f7f97be3cf99360 -SIZE (riak-cs-2.1.0.tar.gz) = 10670941 diff --git a/sysutils/riak-cs/files/patch-rel_vars.config b/sysutils/riak-cs/files/patch-rel_vars.config deleted file mode 100644 index e84e06e89c7d..000000000000 --- a/sysutils/riak-cs/files/patch-rel_vars.config +++ /dev/null @@ -1,47 +0,0 @@ ---- rel/vars.config.orig 2015-05-29 10:29:55.000000000 +1000 -+++ rel/vars.config 2015-09-24 14:36:24.429038742 +1000 -@@ -2,11 +2,12 @@ - %% ex: ts=4 sw=4 et - - %% Platform-specific installation paths --{platform_bin_dir, "./bin"}. --{platform_data_dir, "./data"}. --{platform_etc_dir, "./etc"}. --{platform_lib_dir, "./lib"}. --{platform_log_dir, "./log"}. -+{platform_base_dir, "%%PREFIX%%/lib/riak-cs"}. -+{platform_bin_dir, "%%PREFIX%%/sbin"}. -+{platform_etc_dir, "%%PREFIX%%/etc/riak-cs"}. -+{platform_lib_dir, "%%PREFIX%%/lib/riak-cs/lib"}. -+{platform_data_dir, "/var/db/riak-cs"}. -+{platform_log_dir, "/var/log/riak-cs"}. - - %% lager - {console_log_default, file}. -@@ -41,16 +42,18 @@ - %% bin/riak_cs - %% - {data_dir, "{{target_dir}}/data"}. --{runner_script_dir, "\`cd \\`dirname $0\\` && /bin/pwd\`"}. --{runner_base_dir, "{{runner_script_dir}}/.."}. --{runner_etc_dir, "$RUNNER_BASE_DIR/etc"}. --{runner_log_dir, "$RUNNER_BASE_DIR/log"}. --{runner_lib_dir, "$RUNNER_BASE_DIR/lib"}. --{runner_patch_dir, "$RUNNER_BASE_DIR/lib/basho-patches"}. --{pipe_dir, "/tmp/$RUNNER_BASE_DIR/"}. --{runner_user, ""}. -+{runner_script_dir, "{{platform_bin_dir}}"}. -+{runner_base_dir, "{{platform_base_dir}}"}. -+{runner_etc_dir, "{{platform_etc_dir}}"}. -+{runner_log_dir, "{{platform_log_dir}}"}. -+{runner_lib_dir, "{{platform_lib_dir}}"}. -+{runner_patch_dir, "{{platform_lib_dir}}/basho-patches"}. -+{pipe_dir, "/tmp/riak-cs"}. -+{runner_user, "riakcs"}. - {runner_wait_process, "riak_cs_put_fsm_sup"}. - -+ -+ - %% - %% cuttlefish - %% diff --git a/sysutils/riak-cs/files/patch-riak_test_src_downgrage_bitcask.erl b/sysutils/riak-cs/files/patch-riak_test_src_downgrage_bitcask.erl deleted file mode 100644 index 7965d6f7d5fb..000000000000 --- a/sysutils/riak-cs/files/patch-riak_test_src_downgrage_bitcask.erl +++ /dev/null @@ -1,140 +0,0 @@ -diff -ruN temp/riak-cs-2.1.0/riak_test/src/downgrade_bitcask.erl work/riak-cs-2.1.0/riak_test/src/downgrade_bitcask.erl ---- temp/riak-cs-2.1.0/riak_test/src/downgrade_bitcask.erl 1970-01-01 10:00:00.000000000 +1000 -+++ riak_test/src/downgrade_bitcask.erl 2015-10-22 08:44:18.415188879 +1100 -@@ -0,0 +1,136 @@ -+% Run this script to downgrade Bitcask files from the format -+% introduced in Riak 2.0 to the format used in Riak 1.4 -+% Run it by calling escript on it and pointing it to a data -+% directory after stopping the Riak node. -+% The script will recursively find all Bitcask files under that -+% directory and reformat them. -+% $ escript downgrade_bitcask.erl /my/riak/data/bitcask -+-module(downgrade_bitcask). -+-mode(compile). -+-export([main/1]). -+ -+-define(HEADER_SIZE, 14). -+-record(entry, { crc, tstamp, keysz, valsz, key, val}). -+ -+main([DataDir]) -> -+ downgrade_if_dir(DataDir). -+ -+maybe_downgrade_file(F) -> -+ is_bitcask_file(F) andalso downgrade_file(F). -+ -+downgrade_if_dir(Dir) -> -+ case filelib:is_dir(Dir) of -+ true -> -+ downgrade_dir(Dir); -+ false -> -+ ok -+ end. -+ -+downgrade_dir(Dir) -> -+ {ok, Children0} = file:list_dir(Dir), -+ Children = [filename:join(Dir, Child) || Child <- Children0], -+ case is_bitcask_dir(Dir) of -+ false -> -+ [downgrade_if_dir(Child) || Child <- Children]; -+ true -> -+ [maybe_downgrade_file(Child) || Child <- Children] -+ end. -+ -+is_bitcask_file(Filename0) -> -+ Filename = filename:basename(Filename0), -+ Match = re:run(Filename, "^\\d+\\.bitcask\\.data$"), -+ nomatch =/= Match. -+ -+is_bitcask_dir(Dir) -> -+ case filelib:is_dir(Dir) of -+ false -> -+ false; -+ true -> -+ {ok, Files} = file:list_dir(Dir), -+ lists:any(fun is_bitcask_file/1, Files) -+ end. -+ -+read_entry(F) -> -+ case file:read(F, ?HEADER_SIZE) of -+ {ok, <<CRC:32,Tstamp:32,KeySz:16,ValueSz:32>>} -> -+ case file:read(F, KeySz+ValueSz) of -+ {ok, <<Key:KeySz/bytes, Value:ValueSz/bytes>>} -> -+ % io:format("K: ~p, V: ~p\n", [Key, Value]), -+ {ok, #entry{crc=CRC, tstamp=Tstamp, keysz=KeySz, valsz=ValueSz, -+ key=Key, val=Value}}; -+ _ -> -+ error -+ end; -+ eof -> -+ eof; -+ _ -> -+ io:format("Error reading entry\n"), -+ error -+ end. -+ -+downgrade_file(F) -> -+ Dir = filename:dirname(F), -+ NewF = F ++ ".new", -+ HintFile = filename:join(Dir, filename:basename(F, ".data")++".hint"), -+ NewHF = HintFile ++ ".new", -+ io:format("Downgrading file ~s\n", [F]), -+ {ok, Fi} = file:open(F, [read, raw, binary]), -+ {ok, Fo} = file:open(NewF, [write, raw, binary]), -+ {ok, Fh} = file:open(NewHF, [write, raw, binary]), -+ ok = convert_file(Fi, Fo, Fh, 0, 0, fun tx_pre_20/1), -+ ok = file:close(Fi), -+ ok = file:close(Fo), -+ ok = file:close(Fh), -+ HintBak = HintFile ++ ".bak", -+ FBak = F ++ ".bak", -+ ok = file:rename(HintFile, HintBak), -+ ok = file:rename(F, FBak), -+ ok = file:rename(NewF, F), -+ ok = file:rename(NewHF, HintFile), -+ ok = file:delete(HintBak), -+ ok = file:delete(FBak), -+ ok. -+ -+convert_file(Fi, Fo, Fh, Ofs, Crc, Tx) -> -+ case read_entry(Fi) of -+ {ok, Entry} -> -+ NewEntry = Tx(Entry), -+ Sz = write_entry(Fo, NewEntry), -+ NewCrc = write_hint_entry(Fh, Ofs, Sz, Crc, NewEntry), -+ convert_file(Fi, Fo, Fh, Ofs+Sz, NewCrc, Tx); -+ eof -> -+ write_hint_entry(Fh, 16#ffffFFFFffffFFFF, Crc, 0, -+ #entry{key= <<>>, tstamp=0}), -+ % io:format("Finished reading file\n", []), -+ ok; -+ _ -> -+ io:format(standard_error, "Error reading file\n", []), -+ error -+ end. -+ -+write_hint_entry(F, Ofs, Sz, Crc, #entry{key=Key, tstamp=Tstamp}) -> -+ KeySz = size(Key), -+ Hint = [<<Tstamp:32, KeySz:16, Sz:32, Ofs:64>>, Key], -+ ok = file:write(F, Hint), -+ erlang:crc32(Crc, Hint). -+ -+write_entry(F, #entry {key=Key, val=Value, tstamp=Tstamp}) -> -+ KeySz = size(Key), -+ ValueSz = size(Value), -+ Bytes0 = [<<Tstamp:32>>, <<KeySz:16>>, <<ValueSz:32>>, Key, Value], -+ Bytes = [<<(erlang:crc32(Bytes0)):32>> | Bytes0], -+ ok = file:write(F, Bytes), -+ iolist_size(Bytes). -+ -+tx_pre_20(Entry = -+ #entry{key= <<2, BucketSz:16, Bucket:BucketSz/binary, -+ Key/binary>>}) -> -+ OldKey=term_to_binary({Bucket, Key}), -+ % io:format("Converted B/K ~s/~s\n", [Bucket, Key]), -+ tx_pre_20(Entry#entry{key=OldKey, keysz=size(OldKey)}); -+tx_pre_20(Entry= -+ #entry{val= <<"bitcask_tombstone2", _/binary>>}) -> -+ NewVal = <<"bitcask_tombstone">>, -+ Entry#entry{val=NewVal, valsz=size(NewVal)}; -+tx_pre_20(Entry) -> -+ Entry. diff --git a/sysutils/riak-cs/files/riak_cs.in b/sysutils/riak-cs/files/riak_cs.in deleted file mode 100644 index 550d354335ab..000000000000 --- a/sysutils/riak-cs/files/riak_cs.in +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -# PROVIDE: riak-cs -# REQUIRE: LOGIN cleanvar -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable riak-cs: -# riak-cs_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable riak-cs on boot. -# - -. /etc/rc.subr - -name=riak_cs -rcvar=riak_cs_enable - -pidfile=/var/run/riak-cs/riak-cs.pid - -start_cmd="riak_cs_start" -stop_cmd="riak_cs_stop" -restart_cdm="riak_cs_restart" -status_cmd="riak_cs_status" -command="%%PREFIX%%/sbin/riak-cs" - -load_rc_config $name - -# Read rc.d config and set defaults -load_rc_config "$name" -: ${riak_cs_enable="NO"} - -riak_cs_start() -{ - echo "Starting Riak." - %%PREFIX%%/sbin/riak-cs start - return 0 -} - -riak_cs_stop() -{ - echo "Stopping Riak processes" - %%PREFIX%%/sbin/riak-cs stop - killall -9 epmd - return 0 -} - -riak_cs_restart() -{ - riak_cs_stop - riak_cs_start - return 0 -} - -riak_cs_status() -{ - if riak_cs_running; then - echo "Riak is running." - return 0 - else - echo "Riak is not running" - return 1 - fi -} - -riak_cs_running() -{ - local pid result ps - pid=`%%PREFIX%%/sbin/riak-cs getpid` - result=`echo $?` - if [ "$result" == 0 ]; then - ps=`ps -waux | grep ${pid} | grep riak-cs` - result=`echo $?` - if [ "$result" ]; then - return 0 - else - return 1 - fi - else - return 1 - fi -} - -run_rc_command "$1" diff --git a/sysutils/riak-cs/pkg-descr b/sysutils/riak-cs/pkg-descr deleted file mode 100644 index 433dfdd9270d..000000000000 --- a/sysutils/riak-cs/pkg-descr +++ /dev/null @@ -1,6 +0,0 @@ -Riak CS is an object storage system built on top of Riak. It facilitates -storing large objects in Riak and presents an S3-compatible interface. It also -provides multi-tenancy features such as user accounts, authentication, access -control mechanisms, and per account usage reporting. - -WWW: https://github.com/basho/riak_cs diff --git a/sysutils/riak-cs/pkg-plist b/sysutils/riak-cs/pkg-plist deleted file mode 100644 index efa884a6db69..000000000000 --- a/sysutils/riak-cs/pkg-plist +++ /dev/null @@ -1,19 +0,0 @@ -sbin/riak-cs -sbin/riak-cs-access -sbin/riak-cs-admin -sbin/riak-cs-debug -sbin/riak-cs-gc -sbin/riak-cs-multibag -sbin/riak-cs-stanchion -sbin/riak-cs-storage -sbin/riak-cs-supercluster -@sample %%RIAKCS_CONFDIR%%/riak-cs.conf.sample -@sample %%RIAKCS_CONFDIR%%/advanced.config.sample -@sample %%RIAKCS_CONFDIR%%/key.pem.sample -@sample %%RIAKCS_CONFDIR%%/cert.pem.sample -@owner %%USERS%% -@group %%GROUPS%% -@dir %%RIAKCS_DBDIR%% -@dir %%RIAKCS_HOMEDIR%% -@dir %%RIAKCS_LIBDIR%% -@dir %%RIAKCS_LOGDIR%%