Using `mountrepo` without a config repo
natefoo opened this issue · 8 comments
I've removed dist/etc/cvmfs/default.d/50-cern.conf
since I don't have a need or desire to mount/use CERN's config repo, and this results in two issues:
- The test for an intact dist fails since that's the only .conf file in default.d. It can be worked around by creating an empty .conf file in default.d. Should this check be changed to
/etc/cvmfs/default.conf
? - You get the follow non-fatal errors at runtime:
c506-001[skx](652)$ ~/bin/cvmfsexec data.galaxyproject.org -- /bin/bash ./mountrepo: line 71: cd: /home1/03166/xcgalaxy/bin/.cvmfsexec/dist/cvmfs//etc/cvmfs: No such file or directory ./mountrepo: line 71: cd: /home1/03166/xcgalaxy/bin/.cvmfsexec/dist/cvmfs//etc/cvmfs/domain.d: No such file or directory ./mountrepo: line 71: cd: /home1/03166/xcgalaxy/bin/.cvmfsexec/dist/cvmfs//etc/cvmfs/config.d: No such file or directory
The latter can be worked around with:
index 2f60908..1512c91 100755
--- a/mountrepo
+++ b/mountrepo
@@ -88,7 +88,7 @@ CVMFS_MOUNT_DIR=$DIST/cvmfs
relocate $DIST/etc/cvmfs/default.conf
relocate $DIST/etc/cvmfs/default.d/*.conf
-if [ "$REPO" != "$CONFIG_REPO" ]; then
+if [ -n "$CONFIG_REPO" -a "$REPO" != "$CONFIG_REPO" ]; then
relocate $DIST/cvmfs/$CONFIG_REPO/etc/cvmfs/default.conf
fi
@@ -107,12 +107,12 @@ if ! grep -q "^CVMFS_CACHE_BASE=" $DEFLOCAL 2>/dev/null && [ -d /e2fs ]; then
echo "CVMFS_CACHE_BASE=/e2fs/cvmfscache"
fi
-if [ "$REPO" != "$CONFIG_REPO" ]; then
+if [ -n "$CONFIG_REPO" -a "$REPO" != "$CONFIG_REPO" ]; then
relocate $DIST/cvmfs/$CONFIG_REPO/etc/cvmfs/domain.d/$DOMAIN.conf
fi
relocate $DIST/etc/cvmfs/domain.d/$DOMAIN.conf
relocate $DIST/etc/cvmfs/domain.d/$DOMAIN.local
-if [ "$REPO" != "$CONFIG_REPO" ]; then
+if [ -n "$CONFIG_REPO" -a "$REPO" != "$CONFIG_REPO" ]; then
REPOCONF=$DIST/cvmfs/$CONFIG_REPO/etc/cvmfs/config.d/$REPO.conf
if [ "$REPO" = oasis.opensciencegrid.org ]; then
# OASIS_CERTIFICATES is one special variable we do not want relocated
I didn't make a PR since something is confusing me here - should it be relocating if $REPO
is equal to $CONFIG_REPO
and not the other way around?
No, it is correct. $REPO
is the repository being mounted. If that is the config repo itself, it will not use any configuration from the config repo; only configuration from /etc/cvmfs
gets used for that.
Ok, thanks. Is my change correct, then? I'll make a PR if so.
Yes, go ahead. You might want to also add a makedist option for a "none" distribution.
I'm not sure what you mean by a none distribution? As I understand it you build for either cvmfsexec
or singcvmfs
, what would a "none" distribution build?
Currently makedist requires egi|osg|default
; I am suggesting to add a none
option there to not include any config repo in the distribution created.
Ah, thanks, that explains the difference between the download options that I didn't really understand.
The packages from CERN depend on a cvmfs-config package that ship the CERN config repo, I assume the same is true of OSG and EGI? Is there a source for packages that don't ship a preconfigured config repo?
Yes, there's a cvmfs-config-none package in http://ecsft.cern.ch/dist/cvmfs/cvmfs-config/. I think it was going to be put in a yum repo too but I don't see it.
Perfect, thanks, I'll add it to the PR.