Commit 3bba7f7b authored by Christian Mohrbacher's avatar Christian Mohrbacher Committed by Bernd Schubert

fhgfs-utils : added fsck to utils

git-svn-id: https://svn.itwm.fhg.de/svn/fsdevel/projects@2020 06d474eb-e7fd-0310-b1d4-fdbe02cb80bc
parent bfd46497
......@@ -6,6 +6,7 @@
FHGFS_COMMON_PATH ?= ../../fhgfs_common/
FHGFS_OPENTK_PATH ?= ../../fhgfs_opentk_lib/
FHGFS_ONLINE_CFG_PATH ?= ../../fhgfs_online_cfg
FHGFS_FSCK_PATH ?= ../../fhgfs_fsck
ifneq ($(FHGFS_VERSION),)
FHGFS_EXTRA_FLAGS += 'FHGFS_VERSION="$(FHGFS_VERSION)"'
......@@ -16,7 +17,7 @@ FHGFS_EXTRA_FLAGS += 'FHGFS_DEBUG=$(FHGFS_DEBUG)'
endif
all: fhgfs_online_cfg
all: fhgfs_online_cfg fhgfs_fsck
fhgfs_online_cfg:
make FHGFS_COMMON_PATH=$(FHGFS_COMMON_PATH) \
......@@ -24,10 +25,20 @@ fhgfs_online_cfg:
$(EXTRA_FLAGS) $(FHGFS_EXTRA_FLAGS) \
-C $(FHGFS_ONLINE_CFG_PATH)/build
cp $(FHGFS_ONLINE_CFG_PATH)/build/fhgfs-online-cfg .
fhgfs_fsck:
make FHGFS_COMMON_PATH=$(FHGFS_COMMON_PATH) \
FHGFS_OPENTK_PATH=$(FHGFS_OPENTK_PATH) \
$(EXTRA_FLAGS) $(FHGFS_EXTRA_FLAGS) \
-C $(FHGFS_FSCK_PATH)/build
cp $(FHGFS_FSCK_PATH)/build/fhgfs-fsck .
clean:
make -C $(FHGFS_ONLINE_CFG_PATH)/build clean
make -C $(FHGFS_FSCK_PATH)/build clean
rm -f fhgfs-online-cfg
rm -f fhgfs-fsck
rpm:
./make-rpm
......
......@@ -21,7 +21,8 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
make FHGFS_VERSION='__FHGFS_VERSION__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_ONLINE_CFG_PATH='__FHGFS_ONLINE_CFG_PATH__'
FHGFS_ONLINE_CFG_PATH='__FHGFS_ONLINE_CFG_PATH__' \
FHGFS_FSCK_PATH='__FHGFS_FSCK_PATH__'
touch build-stamp
......@@ -35,9 +36,10 @@ clean:
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_ONLINE_CFG_PATH='__FHGFS_ONLINE_CFG_PATH__' \
FHGFS_FSCK_PATH='__FHGFS_FSCK_PATH__' \
clean
rm -f fhgfs-online-cfg
rm -f fhgfs-fsck
dh_clean
......@@ -49,9 +51,11 @@ install: build
# manual installation
install -D fhgfs-online-cfg $(DEB_BUILD_ROOT)/opt/fhgfs/sbin/fhgfs-online-cfg
install -D fhgfs-fsck $(DEB_BUILD_ROOT)/opt/fhgfs/sbin/fhgfs-fsck
mkdir -p $(DEB_BUILD_ROOT)/usr/bin/
ln -s /opt/fhgfs/sbin/fhgfs-online-cfg $(DEB_BUILD_ROOT)/usr/bin/fhgfs-online-cfg
ln -s /opt/fhgfs/sbin/fhgfs-online-cfg $(DEB_BUILD_ROOT)/usr/bin/fhgfs-ctl
ln -s /opt/fhgfs/sbin/fhgfs-fsck $(DEB_BUILD_ROOT)/usr/bin/fhgfs-fsck
cp ../scripts/* $(DEB_BUILD_ROOT)/usr/bin
# Build architecture-independent files here.
......
......@@ -3,6 +3,7 @@
%define FHGFS_OPENTK_PATH %FHGFS_OPENTK_PATH%
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_ONLINE_CFG_PATH %FHGFS_ONLINE_CFG_PATH%
%define FHGFS_FSCK_PATH %FHGFS_FSCK_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
......@@ -60,6 +61,7 @@ The package contains FhGFS utils.
make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_ONLINE_CFG_PATH=%{FHGFS_ONLINE_CFG_PATH} \
FHGFS_FSCK_PATH=%{FHGFS_FSCK_PATH} \
FHGFS_VERSION=${FHGFS_VERSION} \
-C build/
......@@ -72,9 +74,11 @@ cd build
echo "mkdir RPM_BUILD_ROOT (${RPM_BUILD_ROOT})"
mkdir -p ${RPM_BUILD_ROOT}
install -D fhgfs-online-cfg ${RPM_BUILD_ROOT}/opt/fhgfs/sbin/fhgfs-online-cfg
install -D fhgfs-fsck ${RPM_BUILD_ROOT}/opt/fhgfs/sbin/fhgfs-fsck
mkdir -p ${RPM_BUILD_ROOT}/usr/bin/
ln -s /opt/fhgfs/sbin/fhgfs-online-cfg ${RPM_BUILD_ROOT}/usr/bin/fhgfs-online-cfg
ln -s /opt/fhgfs/sbin/fhgfs-online-cfg ${RPM_BUILD_ROOT}/usr/bin/fhgfs-ctl
ln -s /opt/fhgfs/sbin/fhgfs-fsck ${RPM_BUILD_ROOT}/usr/bin/fhgfs-fsck
cp ../scripts/* ${RPM_BUILD_ROOT}/usr/bin/
%post
......@@ -84,6 +88,7 @@ cp ../scripts/* ${RPM_BUILD_ROOT}/usr/bin/
%files
%defattr(-,root,root)
/opt/fhgfs/sbin/fhgfs-online-cfg
/opt/fhgfs/sbin/fhgfs-fsck
%dir /usr/bin
/usr/bin/*
......@@ -13,6 +13,7 @@ FHGFS_VERSION="${VER}.${RELEASE_STR}.debian${DEBIAN_VERSION}"
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_ONLINE_CFG_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_online_cfg`}
FHGFS_FSCK_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_fsck`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
......@@ -26,6 +27,7 @@ sed \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_ONLINE_CFG_PATH__#$FHGFS_ONLINE_CFG_PATH#g" \
-e "s#__FHGFS_FSCK_PATH__#$FHGFS_FSCK_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
${RULES}.in > ${RULES}
......
......@@ -20,6 +20,8 @@ rm -f $BUILD/buildroot/SOURCES/*.tgz
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_ONLINE_CFG_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_online_cfg`}
FHGFS_FSCK_PATH=${FHGFS_FSCK_PATH:-`readlink -f ../../fhgfs_fsck`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
......@@ -27,6 +29,7 @@ cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#" \
-e "s#%FHGFS_ONLINE_CFG_PATH%#$FHGFS_ONLINE_CFG_PATH#" \
-e "s#%FHGFS_FSCK_PATH%#$FHGFS_FSCK_PATH#" \
-e "s/%NAME%/$NAME/" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
......
#!/bin/bash
# License: FhGFS EULA
# only a dummy file at the moment
# will be a wrapper for fhgfs-fsck
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment