Skip to content

Commit ad67ff8

Browse files
authored
Merge pull request #1 from DrDaveD/master
Make general purpose shared source between Redhat & Debian
2 parents e2b54cd + b47413a commit ad67ff8

26 files changed

+377
-137
lines changed
+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# /etc/cvmfs/default.d/60-osg.conf
22
#
33
# DO NOT EDIT THIS FILE
4-
# It will be replaced on upgrade. To override, edit:
5-
# /etc/cvmfs/default.local
4+
# It will be replaced on upgrade. To override, edit /etc/cvmfs/default.local
5+
#
66
CVMFS_SEND_INFO_HEADER=yes
77
CVMFS_KEYS_DIR=/etc/cvmfs/keys/opensciencegrid.org
88
CVMFS_USE_GEOAPI=yes
99
CVMFS_CONFIG_REPOSITORY=config-osg.opensciencegrid.org
10+
CVMFS_CONFIG_REPO_REQUIRED=yes
1011
CVMFS_FALLBACK_PROXY="http://cvmfsbproxy.cern.ch:3126;http://cvmfsbproxy.fnal.gov:3126"

Makefile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/make -f
2+
3+
# This make file takes care of installing files
4+
5+
all: # nothing to build
6+
7+
# default install target is debian because that's the easist way to
8+
# set up the 'rules' file.
9+
install: install-debian
10+
11+
install-common:
12+
mkdir -p $(DESTDIR)/etc/cvmfs/default.d \
13+
$(DESTDIR)/etc/cvmfs/config.d \
14+
$(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
15+
install -D -m 444 60-osg.conf $(DESTDIR)/etc/cvmfs/default.d
16+
install -D -m 444 config-osg.opensciencegrid.org.conf $(DESTDIR)/etc/cvmfs/config.d
17+
install -D -m 444 opensciencegrid.org.pub $(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
18+
19+
install-debian: install-common
20+
mkdir -p $(DESTDIR)/lib/systemd/system \
21+
$(DESTDIR)/lib/systemd/system/autofs.service.wants \
22+
$(DESTDIR)/usr/sbin
23+
install -D -m 444 cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system
24+
ln -s ../cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system/autofs.service.wants/cvmfs-config-osg.service
25+
install -D -m 555 cvmfs-config-osgd $(DESTDIR)/usr/sbin
26+
27+
# assume DESTDIR=$RPM_BUILD_ROOT is passed in
28+
install-redhat: install-common

README.md

+35-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
11
# cvmfs-config-osg
22

3-
## CVMFS configuration files
4-
5-
Repository for configuration files used to setup experiment-specific CVMFS area within OSG.
6-
Things to remember:
7-
* keep this repository and existing `cvmfs-config-osg` RPM in sync, current stream at https://vdt.cs.wisc.edu/svn/native/redhat/trunk/cvmfs-config-osg/
8-
9-
### For LIGO
10-
11-
Please, refer to [`ligo directory`](ligo/) for config files. Useful documenation about site specific configuration:
12-
> https://wiki.ligo.org/LVCcomputing/SiteConfiguration
13-
14-
### For OSG
15-
16-
This repository is meant for packaging CVMFS configuration; it is not meant for end-users.
17-
18-
End-user documentation can be found here:
19-
https://twiki.grid.iu.edu/bin/view/Documentation/Release3/InstallCvmfs
20-
3+
## CVMFS configuration package for the Open Science Grid
4+
5+
This is the source for the CernVM File System (CVMFS) configuration
6+
files for the Open Science Grid (OSG). It includes packaging for
7+
Redhat and Debian.
8+
9+
### Redhat
10+
11+
End-user documentation for Redhat systems can be found
12+
[here](https://twiki.grid.iu.edu/bin/view/Documentation/Release3/InstallCvmfs).
13+
14+
### Debian
15+
16+
For Debian, the End-user instructions are to install cvmfs from
17+
[the cvmfs download page](https://cernvm.cern.ch/portal/filesystem/downloads)
18+
and this package from
19+
[github](https://github.com/opensciencegrid/cvmfs-config-osg/releases).
20+
Then if you want to enable autofs, add the following contents
21+
into /etc/auto.master.d/cvmfs.autofs:
22+
```
23+
/cvmfs /etc/auto.cvmfs
24+
```
25+
and restart autofs with
26+
```
27+
systemctl restart autofs
28+
```
29+
and also enable and start the cvmfs-config-osg service with:
30+
```
31+
systemctl enable cvmfs-config-osg
32+
systemctl start cvmfs-config-osg
33+
```
34+
That service will start a daemon to make sure that the configuration
35+
repository /cvmfs/config-osg.opensciencegrid.org stays mounted,
36+
which is necessary to work around a Debian bug that causes autofs to
37+
hang if a recursive automount is attempted.

config-osg.opensciencegrid.org.conf

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CVMFS_SERVER_URL="http://cvmfs-s1bnl.opensciencegrid.org:8000/cvmfs/@fqrn@;http://cvmfs-s1fnal.opensciencegrid.org:8000/cvmfs/@fqrn@;http://cvmfs-s1goc.opensciencegrid.org:8000/cvmfs/@fqrn@"

cvmfs-config-osg.service

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=daemon to keep /cvmfs/config-osg.opensciencegrid.org mounted
3+
Requires=autofs.service
4+
After=autofs.service
5+
6+
[Service]
7+
Type=simple
8+
ExecStart=/usr/sbin/cvmfs-config-osgd /cvmfs/config-osg.opensciencegrid.org/etc
9+
10+
[Install]
11+
WantedBy=multi-user.target

cvmfs-config-osgd

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
# This is intended to be run as a daemon in order to keep a CVMFS
3+
# configuration repository mounted indefinitely on Debian.
4+
# It is to work around the fact that Debian's autofs does not allow
5+
# recursive mounts.
6+
ME="`basename $0`"
7+
usage()
8+
{
9+
echo "Usage: $ME directory_to_mount" >&2
10+
exit 1
11+
}
12+
13+
if [ $# != 1 ]; then
14+
usage
15+
fi
16+
set -e
17+
cd "$1"
18+
exec -a $ME sleep infinity

ligo/README.md

-26
This file was deleted.

ligo/config-osg.opensciencegrid.org.conf

-9
This file was deleted.

ligo/cvmfs-config\x2dosg.opensciencegrid.org.automount

-8
This file was deleted.

ligo/cvmfs-config\x2dosg.opensciencegrid.org.mount

-10
This file was deleted.

ligo/cvmfs-ligo.osgstorage.org.automount

-12
This file was deleted.

ligo/cvmfs-ligo.osgstorage.org.mount

-10
This file was deleted.

ligo/cvmfs-oasis.opensciencegrid.org.automount

-12
This file was deleted.

ligo/cvmfs-oasis.opensciencegrid.org.mount

-10
This file was deleted.

ligo/default.local

-20
This file was deleted.

opensciencegrid.org.pub

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqQGYXTp9cRcMbGeDoijB
3+
gKNTCEpIWB7XcqIHVXJjfxEkycQXMyZkB7O0CvV3UmmY2K7CQqTnd9ddcApn7BqQ
4+
/7QGP0H1jfXLfqVdwnhyjIHxmV2x8GIHRHFA0wE+DadQwoi1G0k0SNxOVS5qbdeV
5+
yiyKsoU4JSqy5l2tK3K/RJE4htSruPCrRCK3xcN5nBeZK5gZd+/ufPIG+hd78kjQ
6+
Dy3YQXwmEPm7kAZwIsEbMa0PNkp85IDkdR1GpvRvDMCRmUaRHrQUPBwPIjs0akL+
7+
qoTxJs9k6quV0g3Wd8z65s/k5mEZ+AnHHI0+0CL3y80wnuLSBYmw05YBtKyoa1Fb
8+
FQIDAQAB
9+
-----END PUBLIC KEY-----
10+

packaging/debian/build.sh

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
#
6+
# This script used for package creation and debugging
7+
#
8+
9+
PKG=cvmfs-config-osg
10+
11+
usage() {
12+
echo "Sample script that builds the $PKG debian package from source"
13+
echo "Usage: $0"
14+
exit 1
15+
}
16+
17+
if [ $# -ne 0 ]; then
18+
usage
19+
fi
20+
21+
workdir=/tmp/build-$PKG
22+
srctree=$(readlink --canonicalize ../..)
23+
24+
if [ "$(ls -A $workdir 2>/dev/null)" != "" ]; then
25+
echo "$workdir must be empty"
26+
exit 2
27+
fi
28+
29+
echo -n "creating workspace in $workdir... "
30+
mkdir -p ${workdir}/tmp ${workdir}/src ${workdir}/result
31+
echo "done"
32+
33+
echo -n "copying source tree to $workdir/tmp... "
34+
cp -R $srctree/* ${workdir}/tmp
35+
echo "done"
36+
37+
echo -n "initializing build environment... "
38+
mkdir ${workdir}/src/$PKG
39+
cp -R $srctree/* ${workdir}/src/$PKG
40+
mkdir ${workdir}/src/$PKG/debian
41+
cp -R ${workdir}/tmp/packaging/debian/* ${workdir}/src/$PKG/debian
42+
echo "done"
43+
44+
echo -n "figuring out version number from rpm packaging... "
45+
upstream_version="`sed -n 's/^Version: //p' ../redhat/$PKG.spec`"
46+
echo "done: $upstream_version"
47+
48+
echo "building..."
49+
cd ${workdir}/src/$PKG
50+
dch -v $upstream_version -M "bumped upstream version number"
51+
52+
cd debian
53+
pdebuild --buildresult ${workdir}/result -- --save-after-exec --debug
54+
55+
echo "Results are in ${workdir}/result"

packaging/debian/changelog

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cvmfs-config-osg (0.1.0) stable; urgency=low
2+
3+
* Place holder; this file is generated in build.sh
4+
5+
-- Dave Dykstra <[email protected]> Fri, 24 Feb 2017 18:00:00 +0000

packaging/debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9

packaging/debian/control

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Source: cvmfs-config-osg
2+
Maintainer: Dave Dykstra <[email protected]>
3+
Section: config
4+
Priority: extra
5+
Standards-Version: 3.9.3.1
6+
Build-Depends: debhelper (>= 9)
7+
Homepage: http://github.conf/opensciencegrid/cvmfs-config-osg
8+
9+
Package: cvmfs-config-osg
10+
Architecture: all
11+
Depends:
12+
Description: CernVM File System configuration for OSG

packaging/debian/copyright

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
Copyright:
3+
4+
Copyright (c) 2017, Fermi National Accelerator Laboratory
5+
6+
License:
7+
8+
Distributed unter the BSD License.
9+
10+
The Debian packaging is:
11+
12+
Copyright (C) 2017 Dave Dykstra <[email protected]>
13+
14+
You are free to distribute this software under the terms of
15+
the BSD License.
16+
On Debian systems, the complete text of the BSD License can be
17+
found in the file `/usr/share/common-licenses/BSD'.

packaging/debian/postrm

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
# postrm script for cvmfs-config-osg
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
# summary of how this script can be called:
9+
# * <postrm> `remove'
10+
# * <postrm> `purge'
11+
# * <old-postrm> `upgrade' <new-version>
12+
# * <new-postrm> `failed-upgrade' <old-version>
13+
# * <new-postrm> `abort-install'
14+
# * <new-postrm> `abort-install' <old-version>
15+
# * <new-postrm> `abort-upgrade' <old-version>
16+
# * <disappearer's-postrm> `disappear' <overwriter>
17+
# <overwriter-version>
18+
# for details, see http://www.debian.org/doc/debian-policy/ or
19+
# the debian-policy package
20+
21+
22+
case "$1" in
23+
purge|remove)
24+
:
25+
;;
26+
esac
27+
28+
# dh_installdeb will replace this with shell code automatically
29+
# generated by other debhelper scripts.
30+
31+
#DEBHELPER#
32+
33+
exit 0

0 commit comments

Comments
 (0)