FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-09-2012, 11:02 PM
Jochen Schmitt
 
Default iSuggestion] Initscript system independen rpm scriptlets macros

Hallo,

unfortunately, I have missed the discussion of the introduction of the
new systemd rpm macros as a new packaging gueidlines.

From my point of view this new set of macros has two disadvantages:

1. The macros are depending on systemd

2. The most commont restart case has a more
complicate name then the case without the
restart of the service.

I will suggest the following set of rpm macros:

init_requires Define the Requires for post, preun and postun steps

init_pos Scriptlet for the post scriptliet

init_preun Scriptlet for the preun scriptlet

init_postun Scriptlet for postun with restart

init_postun_woithout_restart Scriptlet for postun without restart

A SPEC file should look like

BuildRequires: systemd

%init_requires

%post
%init_post innd

%preun
%init_preun innd

%postun
%init_postun innd

The kind how this macros will been expanded depend on the
initscript system which is declared as a BuildRequires.
For F19+ whitch may be systemd. For the EPEL packages we may
create a package called rpm-macros-initscripts whitch contains
the definition for the SysV init system.

Best Regards:

Jochen Schmitt

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 09:06 AM
"Richard W.M. Jones"
 
Default iSuggestion] Initscript system independen rpm scriptlets macros

On Wed, Oct 10, 2012 at 01:02:54AM +0200, Jochen Schmitt wrote:
> Hallo,
>
> unfortunately, I have missed the discussion of the introduction of the
> new systemd rpm macros as a new packaging gueidlines.
>
> From my point of view this new set of macros has two disadvantages:
>
> 1. The macros are depending on systemd
>
> 2. The most commont restart case has a more
> complicate name then the case without the
> restart of the service.

My meta-suggestion is that scriptlets should be minimized and removed
wherever possible. Instead RPM should have some %-directives such as:

%service foo --enabled-by-default

RPM should then collect together the full set of instructions across
the whole transaction and perform the necessary steps (defined by the
distribution) at the end. Performing the steps could include ignoring
%service directives entirely, which would be useful in the non-root
install-to-a-subdirectory case.

Also extend this to other cases where scriptlets are used, eg:

%user --requires=qemu.qemu

(The vast majority of scriptlets are used simply to run ldconfig, and
rpm should just autodetect this case when a library is installed by
any package in the transaction).

And no, I'm not going to code this just yet ...

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 10:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org