mirror of
https://github.com/apple/foundationdb.git
synced 2026-01-25 04:18:18 +00:00
Changed the installation path for fdbmonitor and backup_agent (apple/foundationdb#2579) to /usr/bin and /usr/sbin respectively from /usr/lib/foundationdb.
This commit is contained in:
@@ -89,15 +89,13 @@ function(symlink_files)
|
||||
endfunction()
|
||||
|
||||
fdb_install_packages(TGZ DEB EL9 VERSIONED)
|
||||
fdb_install_dirs(BIN SBIN LIB FDBMONITOR INCLUDE ETC LOG DATA BACKUPAGENT)
|
||||
fdb_install_dirs(BIN SBIN LIB INCLUDE ETC LOG DATA)
|
||||
message(STATUS "FDB_INSTALL_DIRS -> ${FDB_INSTALL_DIRS}")
|
||||
|
||||
install_destinations(TGZ
|
||||
BIN bin
|
||||
SBIN sbin
|
||||
LIB lib
|
||||
FDBMONITOR sbin
|
||||
BACKUPAGENT usr/lib/foundationdb
|
||||
INCLUDE include
|
||||
ETC etc/foundationdb
|
||||
LOG log/foundationdb
|
||||
@@ -107,8 +105,6 @@ install_destinations(DEB
|
||||
BIN usr/bin
|
||||
SBIN usr/sbin
|
||||
LIB usr/lib
|
||||
FDBMONITOR usr/lib/foundationdb
|
||||
BACKUPAGENT usr/lib/foundationdb
|
||||
INCLUDE usr/include
|
||||
ETC etc/foundationdb
|
||||
LOG var/log/foundationdb
|
||||
|
||||
@@ -325,7 +325,7 @@ Backup agent sections
|
||||
.. code-block:: ini
|
||||
|
||||
[backup_agent]
|
||||
command = /usr/lib/foundationdb/backup_agent/backup_agent
|
||||
command = /usr/bin/backup_agent
|
||||
|
||||
[backup_agent.1]
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ target_link_libraries(fdbdecode PRIVATE fdbclient)
|
||||
if(NOT OPEN_FOR_IDE)
|
||||
if(GENERATE_DEBUG_PACKAGES)
|
||||
fdb_install(TARGETS fdbbackup DESTINATION bin COMPONENT clients)
|
||||
fdb_install(PROGRAMS $<TARGET_FILE:fdbbackup> DESTINATION backupagent COMPONENT clients RENAME backup_agent/backup_agent)
|
||||
fdb_install(PROGRAMS $<TARGET_FILE:fdbbackup> DESTINATION bin COMPONENT clients RENAME backup_agent)
|
||||
fdb_install(PROGRAMS $<TARGET_FILE:fdbbackup> DESTINATION bin COMPONENT clients RENAME fdbrestore)
|
||||
fdb_install(PROGRAMS $<TARGET_FILE:fdbbackup> DESTINATION bin COMPONENT clients RENAME dr_agent)
|
||||
fdb_install(PROGRAMS $<TARGET_FILE:fdbbackup> DESTINATION bin COMPONENT clients RENAME fdbdr)
|
||||
else()
|
||||
add_custom_target(prepare_fdbbackup_install ALL DEPENDS strip_only_fdbbackup)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbbackup DESTINATION bin COMPONENT clients)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbbackup DESTINATION backupagent COMPONENT clients RENAME backup_agent/backup_agent)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbbackup DESTINATION bin COMPONENT clients RENAME backup_agent)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbbackup DESTINATION bin COMPONENT clients RENAME fdbrestore)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbbackup DESTINATION bin COMPONENT clients RENAME dr_agent)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbbackup DESTINATION bin COMPONENT clients RENAME fdbdr)
|
||||
|
||||
@@ -37,10 +37,10 @@ if(NOT "${fdbmonitor_options}" STREQUAL "fdbmonitor_options-NOTFOUND")
|
||||
endif()
|
||||
|
||||
if(GENERATE_DEBUG_PACKAGES)
|
||||
fdb_install(TARGETS fdbmonitor DESTINATION fdbmonitor COMPONENT server)
|
||||
fdb_install(TARGETS fdbmonitor DESTINATION sbin COMPONENT server)
|
||||
else()
|
||||
add_custom_target(prepare_fdbmonitor_install ALL DEPENDS strip_only_fdbmonitor)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbmonitor DESTINATION fdbmonitor COMPONENT server)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/bin/fdbmonitor DESTINATION sbin COMPONENT server)
|
||||
endif()
|
||||
|
||||
# Create a local sandbox for quick manual testing without simulator
|
||||
|
||||
@@ -21,7 +21,7 @@ mkdir -p -m 0755 $SERVERDIR/usr/lib/foundationdb
|
||||
install -m 0664 packaging/foundationdb.conf $SERVERDIR/etc/foundationdb
|
||||
install -m 0755 packaging/deb/foundationdb-init $SERVERDIR/etc/init.d/foundationdb
|
||||
install -m 0755 bin/fdbserver $SERVERDIR/usr/sbin
|
||||
install -m 0755 bin/fdbmonitor $SERVERDIR/usr/lib/foundationdb
|
||||
install -m 0755 bin/fdbmonitor $SERVERDIR/usr/sbin
|
||||
install -m 0755 packaging/make_public.py $SERVERDIR/usr/lib/foundationdb
|
||||
dos2unix -q -n README.md $SERVERDIR/usr/share/doc/foundationdb-server/README
|
||||
chmod 0644 $SERVERDIR/usr/share/doc/foundationdb-server/README
|
||||
@@ -49,18 +49,18 @@ mkdir -p -m 0755 $CLIENTSDIR/usr/bin
|
||||
mkdir -p -m 0755 $CLIENTSDIR/usr/lib
|
||||
mkdir -p -m 0755 $CLIENTSDIR/usr/include/foundationdb
|
||||
mkdir -p -m 0755 $CLIENTSDIR/usr/share/doc/foundationdb-clients
|
||||
mkdir -p -m 0755 $CLIENTSDIR/usr/lib/foundationdb/backup_agent
|
||||
|
||||
install -m 0755 bin/fdbcli $CLIENTSDIR/usr/bin
|
||||
install -m 0644 lib/libfdb_c.so lib/libfdb_c_shim.so $CLIENTSDIR/usr/lib
|
||||
install -m 0644 bindings/c/foundationdb/fdb_c.h bindings/c/foundationdb/fdb_c_types.h bindings/c/foundationdb/fdb_c_internal.h bindings/c/foundationdb/fdb_c_options.g.h fdbclient/vexillographer/fdb.options bindings/c/foundationdb/fdb_c_shim.h $CLIENTSDIR/usr/include/foundationdb
|
||||
dos2unix -q -n README.md $CLIENTSDIR/usr/share/doc/foundationdb-clients/README
|
||||
chmod 0644 $CLIENTSDIR/usr/share/doc/foundationdb-clients/README
|
||||
install -m 0755 bin/fdbbackup $CLIENTSDIR/usr/lib/foundationdb/backup_agent/backup_agent
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $CLIENTSDIR/usr/bin/fdbbackup
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $CLIENTSDIR/usr/bin/fdbrestore
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $CLIENTSDIR/usr/bin/fdbdr
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $CLIENTSDIR/usr/bin/dr_agent
|
||||
install -m 0755 bin/fdbbackup $CLIENTSDIR/usr/bin/backup_agent
|
||||
|
||||
ln -s backup_agent $CLIENTSDIR/usr/bin/fdbbackup
|
||||
ln -s backup_agent $CLIENTSDIR/usr/bin/fdbrestore
|
||||
ln -s backup_agent $CLIENTSDIR/usr/bin/fdbdr
|
||||
ln -s backup_agent $CLIENTSDIR/usr/bin/dr_agent
|
||||
|
||||
echo "Installed-Size:" $(du -sx --exclude DEBIAN $CLIENTSDIR | awk '{print $1}') >> $CLIENTSDIR/DEBIAN/control
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="FoundationDB Process Monitor"
|
||||
NAME=fdbmonitor
|
||||
DAEMON=/usr/lib/foundationdb/$NAME
|
||||
DAEMON=/usr/sbin/$NAME
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/foundationdb
|
||||
CONFFILE=/etc/foundationdb/foundationdb.conf
|
||||
|
||||
@@ -41,7 +41,7 @@ logdir = /var/log/foundationdb
|
||||
[fdbserver.4500]
|
||||
|
||||
[backup_agent]
|
||||
command = /usr/lib/foundationdb/backup_agent/backup_agent
|
||||
command = /usr/bin/backup_agent
|
||||
logdir = /var/log/foundationdb
|
||||
|
||||
[backup_agent.1]
|
||||
|
||||
@@ -8,7 +8,7 @@ chown -R foundationdb:foundationdb /var/lib/foundationdb /var/log/foundationdb
|
||||
chmod -R 0750 /var/lib/foundationdb/data /var/log/foundationdb
|
||||
|
||||
update-alternatives --install /usr/sbin/fdbserver fdbserver /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/sbin/fdbserver @ALTERNATIVES_PRIORITY@ \
|
||||
--slave /usr/lib/foundationdb/fdbmonitor fdbmonitor /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/sbin/fdbmonitor \
|
||||
--slave /usr/sbin/fdbmonitor fdbmonitor /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/sbin/fdbmonitor \
|
||||
--slave /etc/init.d/foundationdb foundationdb.service /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/etc/init.d/foundationdb
|
||||
|
||||
if mkdir /etc/foundationdb
|
||||
|
||||
@@ -9,7 +9,7 @@ chmod -R 0750 /var/lib/foundationdb/data /var/log/foundationdb
|
||||
|
||||
mkdir -p /usr/lib/foundationdb
|
||||
update-alternatives --install /usr/sbin/fdbserver fdbserver /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/sbin/fdbserver @ALTERNATIVES_PRIORITY@ \
|
||||
--slave /usr/lib/foundationdb/fdbmonitor fdbmonitor /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/sbin/fdbmonitor \
|
||||
--slave /usr/sbin/fdbmonitor fdbmonitor /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/sbin/fdbmonitor \
|
||||
--slave /lib/systemd/system/foundationdb.service foundationdb.service /usr/lib/foundationdb-@FDB_VERSION@@FDB_BUILDTIME_STRING@/lib/systemd/system/foundationdb.service
|
||||
|
||||
if mkdir /etc/foundationdb
|
||||
|
||||
@@ -23,7 +23,6 @@ mkdir -p -m 0755 $INSTDIR/usr/include/foundationdb
|
||||
mkdir -p -m 0755 $INSTDIR/usr/share/doc/foundationdb-clients
|
||||
mkdir -p -m 0755 $INSTDIR/usr/share/doc/foundationdb-server
|
||||
mkdir -p -m 0755 $INSTDIR/var/log/foundationdb
|
||||
mkdir -p -m 0755 $INSTDIR/usr/lib/foundationdb/backup_agent
|
||||
mkdir -p -m 0755 $INSTDIR/var/lib/foundationdb/data
|
||||
|
||||
install -m 0644 packaging/foundationdb.conf $INSTDIR/etc/foundationdb
|
||||
@@ -31,7 +30,7 @@ install -m 0755 packaging/rpm/foundationdb-init $INSTDIR/etc/rc.d/init.d/foundat
|
||||
install -m 0644 packaging/rpm/foundationdb.service $INSTDIR/lib/systemd/system/foundationdb.service
|
||||
install -m 0755 bin/fdbcli $INSTDIR/usr/bin
|
||||
install -m 0755 bin/fdbserver $INSTDIR/usr/sbin
|
||||
install -m 0755 bin/fdbmonitor $INSTDIR/usr/lib/foundationdb
|
||||
install -m 0755 bin/fdbmonitor $INSTDIR/usr/sbin
|
||||
install -m 0755 lib/libfdb_c.so $INSTDIR/usr/lib64
|
||||
install -m 0755 lib/libfdb_c_shim.so $INSTDIR/usr/lib64
|
||||
install -m 0644 bindings/c/foundationdb/fdb_c.h bindings/c/foundationdb/fdb_c_options.g.h bindings/c/foundationdb/fdb_c_types.h bindings/c/foundationdb/fdb_c_internal.h bindings/c/foundationdb/fdb_c_shim.h fdbclient/vexillographer/fdb.options $INSTDIR/usr/include/foundationdb
|
||||
@@ -39,13 +38,13 @@ dos2unix -q -n README.md $INSTDIR/usr/share/doc/foundationdb-clients/README
|
||||
dos2unix -q -n README.md $INSTDIR/usr/share/doc/foundationdb-server/README
|
||||
chmod 0644 $INSTDIR/usr/share/doc/foundationdb-clients/README
|
||||
chmod 0644 $INSTDIR/usr/share/doc/foundationdb-server/README
|
||||
install -m 0755 bin/fdbbackup $INSTDIR/usr/lib/foundationdb/backup_agent/backup_agent
|
||||
install -m 0755 bin/fdbbackup $INSTDIR/usr/bin/backup_agent
|
||||
install -m 0755 packaging/make_public.py $INSTDIR/usr/lib/foundationdb
|
||||
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $INSTDIR/usr/bin/fdbbackup
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $INSTDIR/usr/bin/fdbrestore
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $INSTDIR/usr/bin/fdbdr
|
||||
ln -s ../lib/foundationdb/backup_agent/backup_agent $INSTDIR/usr/bin/dr_agent
|
||||
ln -s backup_agent $INSTDIR/usr/bin/fdbbackup
|
||||
ln -s backup_agent $INSTDIR/usr/bin/fdbrestore
|
||||
ln -s backup_agent $INSTDIR/usr/bin/fdbdr
|
||||
ln -s backup_agent $INSTDIR/usr/bin/dr_agent
|
||||
|
||||
(cd $INSTDIR ; tar -czf $TEMPDIR/SOURCES/install-files.tar.gz *)
|
||||
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
FDBMONITOR_BIN="/usr/sbin/fdbmonitor"
|
||||
|
||||
start()
|
||||
{
|
||||
echo -n $"Starting FoundationDB: "
|
||||
eval daemon /usr/lib/foundationdb/fdbmonitor --conffile /etc/foundationdb/foundationdb.conf --lockfile /var/run/fdbmonitor.pid --daemonize
|
||||
eval daemon $FDBMONITOR_BIN --conffile /etc/foundationdb/foundationdb.conf --lockfile /var/run/fdbmonitor.pid --daemonize
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/foundationdb
|
||||
@@ -22,7 +24,7 @@ start()
|
||||
stop()
|
||||
{
|
||||
echo -n $"Stopping FoundationDB: "
|
||||
killproc -p /var/run/fdbmonitor.pid -d 300 /usr/lib/foundationdb/fdbmonitor
|
||||
killproc -p /var/run/fdbmonitor.pid -d 300 $FDBMONITOR_BIN
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/foundationdb
|
||||
@@ -47,7 +49,7 @@ case "$1" in
|
||||
[ -f /var/lock/subsys/foundationdb ] && restart || :
|
||||
;;
|
||||
status)
|
||||
status /usr/lib/foundationdb/fdbmonitor
|
||||
status $FDBMONITOR_BIN
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -6,7 +6,7 @@ Wants=network-online.target
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/run/fdbmonitor.pid
|
||||
ExecStart=/usr/lib/foundationdb/fdbmonitor --conffile /etc/foundationdb/foundationdb.conf --lockfile /var/run/fdbmonitor.pid --daemonize
|
||||
ExecStart=/usr/sbin/fdbmonitor --conffile /etc/foundationdb/foundationdb.conf --lockfile /var/run/fdbmonitor.pid --daemonize
|
||||
KillMode=mixed
|
||||
Restart=on-failure
|
||||
RestartSec=60s
|
||||
|
||||
@@ -123,7 +123,7 @@ exit 0
|
||||
%doc /usr/share/doc/foundationdb-clients
|
||||
%attr(0775,foundationdb,foundationdb) %dir /etc/foundationdb
|
||||
%dir /usr/lib/foundationdb
|
||||
/usr/lib/foundationdb/backup_agent/backup_agent
|
||||
/usr/bin/backup_agent
|
||||
/usr/bin/dr_agent
|
||||
/usr/bin/fdbcli
|
||||
/usr/bin/fdbdr
|
||||
|
||||
Reference in New Issue
Block a user