ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] [RFC] new macros for kernel-build-tools
@ 2004-06-17 15:13 Sergey Vlasov
  2004-06-17 15:15 ` Anton Farygin
  2004-06-18 10:35 ` Dmitry V. Levin
  0 siblings, 2 replies; 5+ messages in thread
From: Sergey Vlasov @ 2004-06-17 15:13 UTC (permalink / raw)
  To: ALT Linux Kernel Development

[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]

Hello!

Предлагается добавить в kernel-build-tools следующие макросы:

=======================================================================
# Standard %%post script for kernel-image-* packages
%post_kernel_image() \
/sbin/installkernel %1 \
%nil

# Standard %%preun script for kernel-image-* packages
%preun_kernel_image() \
/sbin/modprobe loop > /dev/null 2>&1 ||: \
/sbin/installkernel --remove %1 \
%nil

# Standard %%post script for kernel-headers-* packages
%post_kernel_headers() \
[ -x %_sbindir/adjust_kernel_headers ] && %_sbindir/adjust_kernel_headers ||: \
%nil

# Standard %%postun script for kernel-headers-* packages
%postun_kernel_headers() \
[ -x %_sbindir/adjust_kernel_headers ] && %_sbindir/adjust_kernel_headers ||: \
%nil

# Standard %%post script for kernel-modules-* packages
%post_kernel_modules() \
[ -n "$DURING_INSTALL" ] || \
/sbin/depmod -a -F /boot/System.map-%1 %1 \
%nil

# Standard %%postun script for kernel-modules-* packages
%postun_kernel_modules() \
[ -n "$DURING_INSTALL" ] || \
[ ! -f /boot/System.map-%1 ] || \
/sbin/depmod -a -F /boot/System.map-%1 %1 \
%nil
=======================================================================

Использоваться они будут в скриптах пакетов kernel-image-*:

%post
%post_kernel_image %kversion-%flavour-%krelease

%preun
%preun_kernel_image %kversion-%flavour-%krelease

%post -n kernel-headers-%flavour
%post_kernel_headers %kversion-%flavour-%krelease

%postun -n kernel-headers-%flavour
%postun_kernel_headers %kversion-%flavour-%krelease

а также в пакетах kernel-modules-*:

%post
%post_kernel_modules %kversion-%flavour-%krelease

%postun
%postun_kernel_modules %kversion-%flavour-%krelease

Непосредственная причина этих изменений - необходимость добавления
проверки DURING_INSTALL в скрипты установки kernel-modules-*; раз уж
придётся перелопатить всю эту кучу пакетов, имеет смысл постараться
сделать правильно.

Для пакетов kernel-image-* ещё придётся добавлять PreReq:
bootloader-utils >= 0.3-alt1; по сути это зависимость
%post_kernel_image, но механизм поиска зависимостей для скриптов
сейчас отсутствует, поэтому придётся добавлять эту зависимость руками.
Впрочем, в данном случае даже поиск зависимостей как для shell-скрипта
не решил бы проблему, поскольку нужна зависимость на конкретную версию
пакета, а не просто на /sbin/installkernel.

-- 
Sergey Vlasov

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [d-kernel] [RFC] new macros for kernel-build-tools
  2004-06-17 15:13 [d-kernel] [RFC] new macros for kernel-build-tools Sergey Vlasov
@ 2004-06-17 15:15 ` Anton Farygin
  2004-06-18 10:35 ` Dmitry V. Levin
  1 sibling, 0 replies; 5+ messages in thread
From: Anton Farygin @ 2004-06-17 15:15 UTC (permalink / raw)
  To: ALT Linux kernel packages development

Привет!

Sergey Vlasov пишет:
> Hello!
> 
> Предлагается добавить в kernel-build-tools следующие макросы:

<skip>

Отлично.

Просьба так же внести соответствующие изменения в policy.

Rgds,
Rider


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [d-kernel] [RFC] new macros for kernel-build-tools
  2004-06-17 15:13 [d-kernel] [RFC] new macros for kernel-build-tools Sergey Vlasov
  2004-06-17 15:15 ` Anton Farygin
@ 2004-06-18 10:35 ` Dmitry V. Levin
  2004-06-18 14:06   ` Sergey Vlasov
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry V. Levin @ 2004-06-18 10:35 UTC (permalink / raw)
  To: ALT Linux Kernel Development

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Thu, Jun 17, 2004 at 07:13:07PM +0400, Sergey Vlasov wrote:
> Hello!
> 
> Предлагается добавить в kernel-build-tools следующие макросы:
> 
> =======================================================================
> # Standard %%post script for kernel-image-* packages
> %post_kernel_image() \
> /sbin/installkernel %1 \
> %nil

Просьба не использовать макросы-функции без необходимости.

Например,
%post_kernel_image	/sbin/installkernel
выглядит проще и понятней.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [d-kernel] [RFC] new macros for kernel-build-tools
  2004-06-18 10:35 ` Dmitry V. Levin
@ 2004-06-18 14:06   ` Sergey Vlasov
  2004-06-21 12:14     ` Dmitry V. Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Vlasov @ 2004-06-18 14:06 UTC (permalink / raw)
  To: ALT Linux Kernel Development

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

On Fri, Jun 18, 2004 at 02:35:42PM +0400, Dmitry V. Levin wrote:
> On Thu, Jun 17, 2004 at 07:13:07PM +0400, Sergey Vlasov wrote:
> > Hello!
> > 
> > Предлагается добавить в kernel-build-tools следующие макросы:
> > 
> > =======================================================================
> > # Standard %%post script for kernel-image-* packages
> > %post_kernel_image() \
> > /sbin/installkernel %1 \
> > %nil
> 
> Просьба не использовать макросы-функции без необходимости.
> 
> Например,
> %post_kernel_image	/sbin/installkernel
> выглядит проще и понятней.

Хорошо, тогда так:

# Standard %%post script for kernel-image-* packages
%post_kernel_image	/sbin/installkernel

# Standard %%preun script for kernel-image-* packages
%preun_kernel_image	/sbin/modprobe loop > /dev/null 2>&1 ||: \
/sbin/installkernel --remove

# Standard %%post script for kernel-headers-* packages
%post_kernel_headers 	[ -x %_sbindir/adjust_kernel_headers ] && %_sbindir/adjust_kernel_headers ||:

# Standard %%postun script for kernel-headers-* packages
%postun_kernel_headers	[ -x %_sbindir/adjust_kernel_headers ] && %_sbindir/adjust_kernel_headers ||:

# Standard %%post script for kernel-modules-* packages
%post_kernel_modules()		[ -n "$DURING_INSTALL" ] || \
/sbin/depmod -a -F /boot/System.map-%1 %1 \
%nil

# Standard %%postun script for kernel-modules-* packages
%postun_kernel_modules()	[ -n "$DURING_INSTALL" ] || \
[ ! -f /boot/System.map-%1 ] || \
/sbin/depmod -a -F /boot/System.map-%1 %1 \
%nil


Против этого есть возражения?

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [d-kernel] [RFC] new macros for kernel-build-tools
  2004-06-18 14:06   ` Sergey Vlasov
@ 2004-06-21 12:14     ` Dmitry V. Levin
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry V. Levin @ 2004-06-21 12:14 UTC (permalink / raw)
  To: ALT Linux Kernel Development

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

On Fri, Jun 18, 2004 at 06:06:16PM +0400, Sergey Vlasov wrote:
> Хорошо, тогда так:
> 
> # Standard %%post script for kernel-image-* packages
> %post_kernel_image	/sbin/installkernel
> 
> # Standard %%preun script for kernel-image-* packages
> %preun_kernel_image	/sbin/modprobe loop > /dev/null 2>&1 ||: \
> /sbin/installkernel --remove
> 
> # Standard %%post script for kernel-headers-* packages
> %post_kernel_headers 	[ -x %_sbindir/adjust_kernel_headers ] && %_sbindir/adjust_kernel_headers ||:
> 
> # Standard %%postun script for kernel-headers-* packages
> %postun_kernel_headers	[ -x %_sbindir/adjust_kernel_headers ] && %_sbindir/adjust_kernel_headers ||:
> 
> # Standard %%post script for kernel-modules-* packages
> %post_kernel_modules()		[ -n "$DURING_INSTALL" ] || \
> /sbin/depmod -a -F /boot/System.map-%1 %1 \
> %nil
> 
> # Standard %%postun script for kernel-modules-* packages
> %postun_kernel_modules()	[ -n "$DURING_INSTALL" ] || \
> [ ! -f /boot/System.map-%1 ] || \
> /sbin/depmod -a -F /boot/System.map-%1 %1 \
> %nil
> 
> Против этого есть возражения?

Вроде бы нет.  Если скрипты сложнее среднестатистических, то их можно
выносить наружу, см. /usr/sbin/*install_info; про эти я не уверен, что они
сложнее.  Впрочем, install_info тоже не сложнее.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-06-21 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17 15:13 [d-kernel] [RFC] new macros for kernel-build-tools Sergey Vlasov
2004-06-17 15:15 ` Anton Farygin
2004-06-18 10:35 ` Dmitry V. Levin
2004-06-18 14:06   ` Sergey Vlasov
2004-06-21 12:14     ` Dmitry V. Levin

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git