Re: non-root installation of fluka

From: Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
Date: Fri, 12 Jun 2009 09:10:34 +0200

Dear Salvatore,

here is the spec file use to make the rpm. The RPM_BUILD_ROOT directory
is included in the creation of the /etc/profile.d/fluka.*sh files. I
don't understand why it should not work then.

Cheers
Vasilis

Salvatore Podda wrote:
> Dear Fluka experts,
> I'm trying to install fluka-2008.3-7.i386.rpm without root access
> (is the usual way
> we follow before asking for a system-wide installation of codes or
> applicatons).
>
> I am using the following syntax:
>
> [user_at_host:dir] rpm -iv --force /fluka-2008.3-7.i386.rpm --root
> user_home --prefix user_home -dbpath var/lib/rpm --nodeps
> Preparing packages for installation...
> fluka-2008.3-7
> error: unpacking of archive failed on file
> /etc/profile.d/fluka.csh;4a2fc164: cpio: open failed - Permission denied
> [user_at_host:dir]
>
> The rpm is trying to write in the "/etc" root directory instead to
> point to the "user_home/etc". It looks like in the rpmbuild the root
> prefix
> was missed in the path "etc/profile.d".
> Is this correct or I am making some other mistakes?
>
> Menwhile I will try a non-root installation from source
>
> Best Regards
>
>
> Salvatore Podda
>
>

%define _prefix /usr/local
%define bindir %{_prefix}/bin
%define prgdir %{_prefix}/%{name}
%define profdir /etc/profile.d
%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define debug_package %{nil}

Name: fluka
Version: 2008.3b
Release: 1
Vendor: Alfredo.Ferrari_at_cern.ch
Prefix: %{_prefix}
#Source: https://www.fluka.org/%{name}/%{name}%{version}.%{release}-linuxAA.tar.gz
Source: https://www.fluka.org/%{name}/%{name}%{version}-linuxAA.tar.gz
URL: http://www.fluka.org
BuildRoot: %{_tmppath}/%{name}-buildroot
License: Free for non-commercial non weapon related use

Summary: FLUKA is a fully integrated particle physics MonteCarlo simulation package. It has many applications in high energy experimental physics and engineering, shielding, detector and telescope design, cosmic ray studies, dosimetry, medical physics and radio-biology.
Group: Applications/Engineering
%if %is_fedora
Requires: compat-libf2c-34
Requires: compat-gcc-34
Requires: gnuplot
%endif
#%if %is_suse
#%endif
#%if %is_mandrake
#%endif

%description
A fully integrated particle physics MonteCarlo simulation package. FLUKA has
many applications in high energy experimental physics and engineering,
shielding, detector and telescope design, cosmic ray studies, dosimetry,
medical physics and radio-biology.

%prep
rm -rf $RPM_BUILD_ROOT
%setup -c

%build
make
rm flutil/*.o flutil/*.map

%install
rm -Rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prgdir}
cp -Rdpvu . $RPM_BUILD_ROOT%{prgdir}
mkdir -p $RPM_BUILD_ROOT%{profdir}
cat > $RPM_BUILD_ROOT%{profdir}/%{name}.sh << EOF
FLUPRO=%{prgdir}
export FLUPRO
EOF
cat > $RPM_BUILD_ROOT%{profdir}/%{name}.csh << EOF
setenv FLUPRO %{prgdir}
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,0755)
%doc README RELEASE-NOTES.* LICENSE.* *.pdf
%{prgdir}/*
%{profdir}/%{name}.*

%changelog
* Fri Jun 12 2009 Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
- Release 2008.3b.1
* Wed Dec 24 2008 Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
- Release 2008.3.7
- It contains corrections for a couple of rare PEANUT crashes, as
  well as a (partial) protection for inputs which redefine a standard
  material with a very different density, without defining or
  undefining through MAT-PROP the relevant gas pressure.
Received on Fri Jun 12 2009 - 10:05:37 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 12 2009 - 10:06:07 CEST