Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
machinejobfeatures
mjf-scripts
Commits
437aa75d
Commit
437aa75d
authored
Oct 05, 2016
by
Andrew McNab
Browse files
Add mjf-onlymf
parent
46b32b7d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
437aa75d
...
...
@@ -36,9 +36,11 @@ INSTALL_FILES=VERSION mjf.init \
mjf.sh.torque mjf.csh.torque mjf-get-total-cpu.torque
\
mjf.sh.htcondor mjf.csh.htcondor mjf-get-total-cpu.htcondor
\
mjf-job-wrapper make-jobfeatures.htcondor
\
mjf.sh.onlymf mjf.csh.onlymf
\
DIRACbenchmark.py db12.init
TGZ_FILES
=
$(INSTALL_FILES)
Makefile mjf-torque.spec mjf-htcondor.spec mjf-db12.spec README
TGZ_FILES
=
$(INSTALL_FILES)
Makefile mjf-torque.spec mjf-htcondor.spec
\
mjf-onlymf mjf-db12.spec README
GNUTAR
?=
tar
mjf-scripts.tgz
:
$(TGZ_FILES)
...
...
@@ -49,12 +51,27 @@ mjf-scripts.tgz: $(TGZ_FILES)
install
:
$(INSTALL_FILES)
mkdir
-p
$(RPM_BUILD_ROOT)
/etc/rc.d/init.d
\
$(RPM_BUILD_ROOT)
/etc/profile.d
\
$(RPM_BUILD_ROOT)
/usr/sbin
$(RPM_BUILD_ROOT)
/etc/profile.d
cp
mjf.init
\
$(RPM_BUILD_ROOT)
/etc/rc.d/init.d/mjf
onlymf-install
:
$(INSTALL_FILES) install
cp
mjf.sh.onlymf
\
$(RPM_BUILD_ROOT)
/etc/profile.d/mjf.sh
cp
mjf.csh.onlymf
\
$(RPM_BUILD_ROOT)
/etc/profile.d/mjf.csh
onlymf-rpm
:
mjf-scripts.tgz
rm
-Rf
RPMTMP
mkdir
-p
RPMTMP/SOURCES RPMTMP/SPECS RPMTMP/BUILD
\
RPMTMP/SRPMS RPMTMP/RPMS/noarch RPMTMP/BUILDROOT
cp
-f
mjf-scripts.tgz RPMTMP/SOURCES
export
MJF_VERSION
=
$(VERSION)
;
rpmbuild
-ba
\
--define
"_topdir
$(
shell
pwd
)
/RPMTMP"
\
--buildroot
$(
shell
pwd
)
/RPMTMP/BUILDROOT mjf-onlymf.spec
torque-install
:
$(INSTALL_FILES) install
mkdir
-p
$(RPM_BUILD_ROOT)
/usr/sbin
cp
mjf.sh.torque
\
$(RPM_BUILD_ROOT)
/etc/profile.d/mjf.sh
cp
mjf.csh.torque
\
...
...
@@ -65,7 +82,6 @@ torque-install: $(INSTALL_FILES) install
cp
mjf-get-total-cpu.torque
\
$(RPM_BUILD_ROOT)
/usr/sbin/mjf-get-total-cpu
torque-rpm
:
mjf-scripts.tgz
rm
-Rf
RPMTMP
mkdir
-p
RPMTMP/SOURCES RPMTMP/SPECS RPMTMP/BUILD
\
...
...
@@ -76,6 +92,7 @@ torque-rpm: mjf-scripts.tgz
--buildroot
$(
shell
pwd
)
/RPMTMP/BUILDROOT mjf-torque.spec
htcondor-install
:
$(INSTALL_FILES) install
mkdir
-p
$(RPM_BUILD_ROOT)
/usr/sbin
cp
mjf.sh.htcondor
\
$(RPM_BUILD_ROOT)
/etc/profile.d/mjf.sh
cp
mjf.csh.htcondor
\
...
...
@@ -102,6 +119,8 @@ db12-install: $(INSTALL_FILES)
$(RPM_BUILD_ROOT)
/usr/sbin
cp
db12.init
\
$(RPM_BUILD_ROOT)
/etc/rc.d/init.d/db12
cp
DIRACbenchmark.py
\
$(RPM_BUILD_ROOT)
/usr/sbin
db12-rpm
:
mjf-scripts.tgz
rm
-Rf
RPMTMP
...
...
@@ -111,4 +130,3 @@ db12-rpm: mjf-scripts.tgz
export
MJF_VERSION
=
$(VERSION)
;
rpmbuild
-ba
\
--define
"_topdir
$(
shell
pwd
)
/RPMTMP"
\
--buildroot
$(
shell
pwd
)
/RPMTMP/BUILDROOT mjf-db12.spec
\ No newline at end of file
db12.init
View file @
437aa75d
...
...
@@ -18,7 +18,7 @@ if [ "$total_cpu" == "" ] ; then
# If total_cpu not given in /etc/sysconfig/db12 then count OS processors
total_cpu
=
`
grep
'^processor[[:space:]]*:'
/proc/cpuinfo |
wc
--lines
`
mkdir
-p
/etc/db12
echo
'
$total_cpu
'
>
/etc/db12/total_cpu
echo
"
$total_cpu
"
>
/etc/db12/total_cpu
fi
start
()
{
...
...
mjf-onlymf.spec
0 → 100644
View file @
437aa75d
Name: mjf-onlymf
Version: %(echo ${MJF_VERSION:-0.0})
Release: 1
BuildArch: noarch
Summary: Machine Features (no Job Features)
License: BSD
Group: System Environment/Daemons
Source: mjf-scripts.tgz
Vendor: GridPP
Packager: Andrew McNab <Andrew.McNab@cern.ch>
%description
Machine Features implementation following HSF-TN-2016-02
(install mjf-torque or mjf-htcondor instead to get both
Machine and Job Features)
%prep
%setup -n mjf-scripts
%build
%install
make onlymf-install
%post
chkconfig mjf on
service mjf start
%preun
if [ "$1" = "0" ] ; then
# if uninstallation rather than upgrade then stop
chkconfig mjf off
service mjf stop
fi
%files
/etc/rc.d/init.d/*
/etc/profile.d/*
mjf.csh.onlymf
0 → 100644
View file @
437aa75d
mjf_tmp_dir=/tmp
if ( -r /etc/sysconfig/mjf ) then
source /var/sysconfig/mjf
endif
if ( -r /var/run/mjf ) then
source /var/run/mjf
endif
if ( -d /etc/machinefeatures ) then
setenv MACHINEFEATURES /etc/machinefeatures
endif
mjf.sh.onlymf
0 → 100644
View file @
437aa75d
mjf_tmp_dir=/tmp
if [ -r /etc/sysconfig/mjf ] ; then
. /etc/sysconfig/mjf
fi
if [ -r /var/run/mjf ] ; then
. /etc/sysconfig/mjf
fi
if [ -d /etc/machinefeatures ] ; then
export MACHINEFEATURES=/etc/machinefeatures
fi
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment