![]() |
![]() |
#1 | |
Aug 2002
3×37 Posts |
![]()
Hello,
As an exercise of my RPM doc reading, I've finally build an mprime RPM package for SuSE >= 8.2. I have not tried on Red-Hat. You can download both the source-RPM (precompiled) and the binary one from the directory http://www.oxixares.com/rpms/SuSE_8.2/ Of course, It is built using the precompiled binary and files supplied in mprime235.tar.gz, plus some small files and scripts. Any comment or suggestion is welcome. It is build as a service, so it starts at boot time following the system V and LSB (Linux Standard Base) method. This is the README_OR_DIE file: Quote:
I think it is good to do the instalation easy to linux users. Similar RPMS could be built for Glucas and Mlucas. Have a nice start of 2004. Guillermo. |
|
![]() |
![]() |
![]() |
#2 |
Sep 2003
258310 Posts |
![]()
Guillermo,
I was also thinking about an RPM for Red Hat. When I saw your thread here, I cleaned it up a bit today and uploaded it. The RPM is here: http://opteron.mersenneforum.org/RPM...3.5-1.i386.rpm The source RPM is here: http://opteron.mersenneforum.org/SRP...23.5-1.src.rpm mprime runs as a daemon under the unprivileged user "mersenne", which is created (httpd does something similar with user "apache"). The usual daemon commands are available: /etc/rc.d/init.d/mprimed start /etc/rc.d/init.d/mprimed stop /etc/rc.d/init.d/mprimed restart /etc/rc.d/init.d/mprimed status # shows savefile iteration! However, there is also /etc/rc.d/init/mprimed config # to run menus -m /etc/rc.d/init/mprimed manualstart # to run as non-daemon, displaying -d in the current window BUGS: - It needs a man page - I can't test SMP. If it worked it would be run as: /etc/rc.d/init.d/mprimed start 2 # runs with -B2 , see readme.txt By modifying the source RPM, and using conditional statements, it should be possible to make it work for other distributions other than Red Hat. By the way, there is a useful book which I think I'll be buying: Red Hat RPM Guide Comments or feedback welcome. |
![]() |
![]() |
![]() |
#3 | |
Aug 2002
6F16 Posts |
![]() Quote:
Well, it seems like we both were thinking almost the same. I think there will be more convenient to use the same spec file, if possible, with the aim to unify the RPMS. I also wrote some specs (for other packages) with some lines to detect the distribution and version. May be we can use it. You can reach me directly at gbv at oxixares dot com. Guillermo |
|
![]() |
![]() |
![]() |
#4 |
Aug 2002
3·37 Posts |
![]()
Hi,
I read GP2 spec file and mprime.init daemon. It will not be easy to merge the RPMS. Anyway, we must to merge in the the following things: 1) The directory of mprime, where save files, results, and output list are. I used '/opt/prime'. I also left the binary mprime there because of some problems when output the 'iter.log' file. I think GP2 use '/var/mprime'. This time I like '/opt/prime' a bit much. 2) The doc directory: i.e., all the *.txt and all README and docs files we could write in a future. SuSE installs all the doc files in '/usr/share/doc/packages/name_of_package' directory. May be Red Hat also installs the doc files in a predefined directory, but I think it is different than SuSE. I guess that the predefined macro %doc does the job here. 3) The name of daemon. It could be mprimed or rcprime. No problem, we can made a soft link to call it. I saw a bit more elaborate status item in GP2 RPM. I could borrow part of it ![]() 4) The name of deamon user. 'mersenne' is a nice user. What about the group?. Must we use predefined user ID < 100? 5) Where to upload and how we should name the rpms. (suited for different distributions). 6) the man pages ![]() On the other hand, I also have to add possible SMP support a few more small details. Guillermo |
![]() |
![]() |
![]() |
#5 | ||||||
Sep 2003
32×7×41 Posts |
![]() Quote:
I don't agree that the mprime executable should go into /var/mprime... it should go into a global system bin directory and use the -W flag to find its working directory. Quote:
I used %doc at first, but then commented it out, and put all those documentation .txt files in the same directory, because that's where longtime mprime users expect to find them. On the other hand, %doc follows Linux standards much more closely. We could go with that, and maybe put symbolic links in the /var/mprime directory pointing to /usr/share/doc/mprime/ Quote:
Quote:
Quote:
Quote:
|
||||||
![]() |
![]() |
![]() |
#6 | |
Aug 2003
24·3 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Sep 2003
32·7·41 Posts |
![]() Quote:
Obviously for automatic startup at reboot time, it's not possible to specify an argument. It's possible to specify a default for shell functions arguments via the ${1:-2} syntax. You're right that it needs to be settable via some config file... or maybe we can automatically read how many CPUs the box has. |
|
![]() |
![]() |
![]() |
#8 | ||||
Aug 2002
3·37 Posts |
![]()
A line like
%define _suse %(if [ -e /etc/SuSE-release ]; then echo 1; else echo 0; fi) works for me to detect SuSE distribution. Is there an /etc/RedHat-release file on Red-Hat? Quote:
Using %if , we could rename mprimed.init.suse to mprimed if suse, and mprimed.init.redhat to mprimed.init if redhat. We also should direct the mprime output to /var/log/mprime.log and write a mprime.logrotate as I saw commented in GP2 spec file. Quote:
Quote:
Quote:
binary RPMS for SuSE?. This weekend I'll try to write a first draft of a merged mprime.spec file based on GP2 one. Guillermo. |
||||
![]() |
![]() |
![]() |
#9 | |||
Sep 2003
258310 Posts |
![]() Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#10 | |
Sep 2003
32·7·41 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
"Mike"
Aug 2002
797910 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing mprime on Linux | lidocorc | Software | 9 | 2009-11-06 20:59 |
mprime and linux | Echoblade | Information & Answers | 3 | 2007-06-24 22:28 |
Debian package of mprime | Matt | Linux | 1 | 2007-02-22 22:36 |
Instructions for using Mprime under Linux | tha | Software | 7 | 2004-01-12 18:45 |
MPrime on Linux | optim | Software | 13 | 2003-12-06 04:27 |