Re: func on freebsd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 30, 2007 5:23 PM, Angelo <nglrossi.ml@xxxxxxxxx> wrote:


On Nov 28, 2007 8:53 PM, Michael DeHaan <mdehaan@xxxxxxxxxx> wrote:
Angelo wrote:
> Hi list,
>
> a couple of days ago I downloaded a snapshot of the code from the
> repository and succesfully ran commands through the command module on
> Freebsd 6.2 and 7.0, wasn't that surprise after a glance at the code
> but still was nice to see it working.
> I was really impressed by the tool and appreciate the fact that is
> kept quite platform independent, although I have a couple of
> suggestions to make it running potentially on every host (well, didn't
> tried w1n yet..)
>
> Working on non RPM distros is not really hard since a `make install`
> does not involve any rpm tools; still, the system installs a couple of
> redhat-like init scripts in /etc/init.d/ that are useless and confusing.
>
> I strongly suggest to keep the core of the system untied by any distro
> or even os and then packaging (or letting others packaging) it adding
> the needed startup scripts etc..
>
>
> I didn't try other modules like hardware or service but I am pretty
> sure they will fail. Probably is not possible to write a clean
> hardware module that runs on any platform, in this case I wonder if
> it's better to rename those modules to something like rh_service and
> rh_hardware.

As they would return different data, most likely.

A better suggestion might be to make the smolt module just be called
"smolt", and the hal module just "hal", that way we don't have to
specify distro stuff when commands do work on multiple distributions
(ex: Debian)
right, a consistent layer would be the cleanest way.



>
> I really like the way the yum module is separated by the rest of the
> system and allows people to expand func writing interfaces for apt,
> portage or any other package system.
>
> Ok, no more complaints :-) func seems great to me and I am interested
> to start using it in the management of a few bsd servers, I shouldn't
> take too long to package it and write startup scripts, if somebody
> wants them.
>
Would love to have them.   If you'd like to take a shot at making other
things more portable as well, please go ahead.
I just finished to write and test the bsd startup scripts.
I will remove the installation of the (linux/bsd) startup scripts from the python setup and move them in the Makefile where I think to put a target `make port`.
I will move the installation of the bsd startup scripts in the postinstall script but I am afraid I won't be the best person for do the same in rpm (but still I think this would be the best place).


Also you're welcome to join #func on irc.freenode.net if you haven't
already.
I will as soon as I have a minute: I am leaving my job and these are the last days..


(Speaking of func, I really should start/finish the command multiplexer
soon to make it nice and extra speedy)

> (hope not to start a flame :p )
>

Not a problem, those were good suggestions!   Thanks!

--Michael

> thanks,
> Angelo
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Func-list mailing list
> Func-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/func-list




--
Angelo Rossi
Bluemetrix Ltd
Northpoint House
Northpoint Business Park
Mallow Road
Cork
Ireland

Ph: +353 021 4640107
Fax: +353 21 4309131
Web: www.bluemetrix.com

The content of this e-mail may be confidential or legally privileged. If you are not the named addressee or the intended recipient please do not copy it or forward it to anyone. If you have received this email in error please destroy it and kindly notify the sender. Email cannot be guaranteed to be secure or error-free, it is your responsibility to ensure that the message (including attachments) is safe and authorised for use in your environment. Bluemetrix Ltd, Registered in Ireland at Northpoint House, Northpoint Business Park, Mallow Road, Cork

Co Reg No.: 335879

Hi,
I am attaching a few changes I've done, not sure if they will reach the list.

The startup scripts work fine, but they still need to be manually copied in /usr/local/etc/rc.d/.
The daemons are controlled by the rcvars $certmaster_enable and $funcd_enable in /etc/rc.conf.

The diff for setup.py remove from the python module parts of the tool that are OS specific (startup scripts and logrotate config) that needs to be moved to an higher layer.

Somebody should put these things back in the Makefile for the redhat-specific installation, not sure I'm the best candidate since I dont use rpm since years.
I think that the Makefile and setup.py in func should only build the python module and install the software and the documentation (and uninstall them) and leave the packaged version and its post-install scripts to distribute, configure and install the distro specific tools (startup, logrotate and maybe other stuff).

I am working on a freebsd port for automatize the installation, but I can't make it download directly the packages from the internet:
Fetching the URL https://hosted.fedoraproject.org/projects/func/attachment/wiki/FuncReleases/func-0.13.tar.3.gz I just get an html page or I need to force the URL with ?format=raw, but I can't make it working from fetch/wget (Internal Server Error).
The url for downloading a snapshot from git seems to be http-session specific to me: http://git.fedoraproject.org/hosted/func.git/?p=hosted/func.git;a=snapshot;h=b483a73ca70817f608f61eb2710feb203063c38b so I didn't even try.
On freshmeat I only found a link for the rpm version.

Another problem is that the "all" action for Makefile is to run "make rpms", I had to change it in make install because Freebsd ports uses the default action to compile the package (not sure how to modify it) and I think this is the normal behavior of the most of the source based package managers. The patch for Makefile is attached.

Just making the port working on an already downloaded and renamed package, with a slighlty modified Makefile works fine, in fact I just open the tar.gz and run "make; make install".

Let me know what you think. If you agree with these changes I can go on removing rh-specific stuff and from the next release I can provide a port that automatically downloads the required files and install func.

Angelo

Attachment: freebsdstartupscripts.tar.gz
Description: GNU Zip compressed data

--- setup.py	2007-11-15 15:25:17.000000000 +0000
+++ mysetup.py	2007-11-30 18:51:26.000000000 +0000
@@ -16,10 +16,8 @@
         manpath    = "share/man/man1/"
         etcpath    = "/etc/%s" % NAME
         etcmodpath = "/etc/%s/modules" % NAME
-        initpath   = "/etc/init.d/"
         logpath    = "/var/log/%s/" % NAME
         pkipath    = "/etc/pki/%s" % NAME
-        rotpath    = "/etc/logrotate.d"
         aclpath    = "%s/minion-acl.d" % etcpath
         setup(
                 name="%s" % NAME,
@@ -42,9 +40,7 @@
 			    "%s/overlord/cmd_modules" % NAME,
 	        	    "%s/minion/modules" % NAME
                 ],
-                data_files = [(initpath, ["init-scripts/funcd"]),
-                              (initpath, ["init-scripts/certmaster"]),
-                              (etcpath,  ["etc/minion.conf"]),
+                data_files = [(etcpath,  ["etc/minion.conf"]),
                               (etcpath,  ["etc/certmaster.conf"]),
                               (etcmodpath, []),
                               (manpath,  ["docs/func.1.gz"]),
@@ -52,7 +48,6 @@
                               (manpath,  ["docs/funcd.1.gz"]),
                               (manpath,  ["docs/certmaster.1.gz"]),
                               (manpath,  ["docs/certmaster-ca.1.gz"]),
-			      (rotpath,  ['etc/func_rotate']),
                               (logpath,  []),
 			      (etcpath,  []),
 			      (pkipath,  []),
--- Makefile	2007-11-15 15:25:17.000000000 +0000
+++ /home/nglrossi/hosted/func.git/Makefile	2007-12-02 15:21:32.000000000 +0000
@@ -10,7 +10,7 @@ PYDIRS	= func scripts
 EXAMPLEDIR = examples
 INITDIR	= init-scripts
 
-all: rpms
+all: install
 
 
 manpage:

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux