Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
airnandez committed May 18, 2018
1 parent b7325ba commit 0a983eb
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 57 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ ADD ["buildLinuxPkg.sh", "version.sh", "./"]
ADD ["etc/", "./etc/"]

ENTRYPOINT /home/${username}/buildLinuxPkg.sh

32 changes: 16 additions & 16 deletions buildLinuxPkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ rm -f ${outputDir}/${packageName}*.{rpm,deb}
# Build RPM and DEB packages
#
for out in rpm deb; do
fpm --name ${packageName} \
--version ${version} \
--depends cvmfs \
--description "Configuration files for CernVM-FS file system /cvmfs/sw.lsst.eu" \
--maintainer "Fabio Hernandez (fabio@in2p3.fr)" \
--url "https://sw.lsst.eu" \
--license "Apache v2.0" \
--vendor "CNRS / IN2P3 computing center (CC-IN2P3)" \
--architecture all \
--output-type ${out} \
--input-type dir \
--package ${outputDir} \
--config-files ./etc \
./etc
done
fpm --name ${packageName} \
--version ${version} \
--depends cvmfs \
--description "Configuration files for CernVM-FS file system /cvmfs/sw.lsst.eu" \
--maintainer "Fabio Hernandez (fabio@in2p3.fr)" \
--url "https://sw.lsst.eu" \
--license "Apache v2.0" \
--vendor "CNRS / IN2P3 computing center (CC-IN2P3)" \
--architecture all \
--output-type ${out} \
--input-type dir \
--package ${outputDir} \
--config-files ./etc \
./etc
done

#
# Set file ownership, if necessary
#
userName="lsstsw"
if getent passwd ${userName} > /dev/null 2>&1; then
chown ${userName}:${userName} ${outputDir}/${packageName}*.{rpm,deb}
chown ${userName}:${userName} ${outputDir}/${packageName}*.{rpm,deb}
fi
18 changes: 9 additions & 9 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ fi

curlCmd=$(command -v curl)
if [[ -z ${curlCmd} ]]; then
echo "command curl not found"
exit 1
echo "command curl not found"
exit 1
fi

source /etc/cvmfs/domain.d/lsst.eu.conf
Expand All @@ -25,13 +25,13 @@ proxies=`echo ${CVMFS_HTTP_PROXY} | sed -e 's/|/ /g' -e 's/;/ /g'`

rc=0
for u in ${urls}; do
for p in ${proxies}; do
ok=`${curlCmd} --silent --head --proxy ${p} ${u} | grep "HTTP/1.1 200 OK"`
if [[ -z ${ok} ]]; then
echo "HTTP HEAD request for $u via proxy $p failed"
rc=1
fi
done
for p in ${proxies}; do
ok=`${curlCmd} --silent --head --proxy ${p} ${u} | grep "HTTP/1.1 200 OK"`
if [[ -z ${ok} ]]; then
echo "HTTP HEAD request for $u via proxy $p failed"
rc=1
fi
done
done

exit $rc
38 changes: 17 additions & 21 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,23 @@ usage() {
# We must run as 'root'
#
if [[ $EUID -ne 0 ]]; then
usage
exit 1
usage
exit 1
fi


#
# Execute 'cvmfs_config setup'
#
cvmfscfg=$(command -v cvmfs_config)
if [[ -z ${cvmfscfg} ]] || [[ ! -x ${cvmfscfg} ]]; then
echo "Could not find CernVM FS configuration command 'cvmfs_config'"
exit 1
echo "Could not find CernVM FS configuration command 'cvmfs_config'"
exit 1
fi
${cvmfscfg} setup
if [ $? -ne 0 ]; then
exit 1
exit 1
fi


#
# Copy configuration files to their destination under
# /etc/cvmfs
Expand All @@ -43,28 +41,26 @@ srcDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
destDir='/'
toInstall="etc/cvmfs/domain.d etc/cvmfs/keys/lsst.eu"
for dir in ${toInstall}; do
dest=$(readlink -m ${destDir}/${dir})
install -d ${dest}
install --backup --compare --mode=u=r,g=r,o=r -D ${srcDir}/${dir}/* ${dest}
dest=$(readlink -m ${destDir}/${dir})
install -d ${dest}
install --backup --compare --mode=u=r,g=r,o=r -D ${srcDir}/${dir}/* ${dest}
done


#
# Perform system-specific tasks
#
thisOS=`uname`
if [ "$thisOS" == "Linux" ]; then
# Use 'cvmfs_config' to check the configuration
result=`${cvmfscfg} chksetup`
if [ "$result" != "OK" ]; then
echo "There was an error checking your CernVM FS configuration:"
echo $result
exit 1
fi
# Use 'cvmfs_config' to check the configuration
result=`${cvmfscfg} chksetup`
if [ "$result" != "OK" ]; then
echo "There was an error checking your CernVM FS configuration:"
echo $result
exit 1
fi
elif [ "$thisOS" == "Darwin" ]; then
# On MacOS X, create the mount directory
mkdir -p /cvmfs/sw.lsst.eu
# On MacOS X, create the mount directory
mkdir -p /cvmfs/sw.lsst.eu
fi


exit 0
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
**************************************
Cloud-based LSST software distribution
**************************************
****************************************
LSST software delivered to your computer
****************************************

In this document you will find information on a service designed so that you can use a binary distribution of the `LSST science pipelines <https://pipelines.lsst.io>`_ on your personal computer without actually installing the software.
Here you will can information on how to get a binary distribution of the `Large Synoptic Survey Telescope (LSST) <https://lsst.org>`_ `science pipelines <https://pipelines.lsst.io>`_ to use on your personal computer without installing the software.

As a user of this distribution mechanism, **stable and weekly releases** of the LSST software appear as if they were locally installed on your computer under the path ``/cvmfs/sw.lsst.eu``. Since new releases just appear there without you to take any action, you can focus on using the software, instead on the technicalities of installing and updating it regularly.
As a user of this software distribution service, both **stable and weekly releases** of the LSST software appear as if they were locally installed on your computer. Since **new releases just appear under the local path** ``/cvmfs/sw.lsst.eu`` **without you to take any action**, you can focus on using the software, instead of on the technicalities of installing and updating it regularly.

Visit the :ref:`overview` to get more details on the benefits and intended audience of this service brought to the `LSST community <https://community.lsst.org>`_ by `LSST-France <http://www.lsst.fr>`_ and `CC-IN2P3 <https://cc.in2p3.fr>`_.
Visit the :ref:`overview` to get more details on the benefits and intended audience of this service brought to the `LSST community <https://community.lsst.org>`_ by `LSST-France <http://www.lsst.fr>`_ and `CNRS / IN2P3 computing center <https://cc.in2p3.fr>`_ (CC-IN2P3).

.. toctree::
:caption: OVERVIEW
Expand Down
8 changes: 4 additions & 4 deletions version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Returns the version of the configuration package
pkgVersion() {
echo "0.1"
}
# Returns the version of the configuration package
pkgVersion() {
echo "0.5"
}

0 comments on commit 0a983eb

Please sign in to comment.