* Re: [devel] RPM macros fonts
2006-03-25 9:33 [devel] RPM macros fonts Valery V. Inozemtsev
@ 2006-03-25 10:31 ` Денис Смирнов
2006-03-27 11:20 ` Andrii Dobrovol`s`kii Dobrovol`s`kii
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Денис Смирнов @ 2006-03-25 10:31 UTC (permalink / raw)
To: ALT Devel discussion list
On Sat, Mar 25, 2006 at 12:33:18PM +0300, Valery V. Inozemtsev wrote:
VVI> Окончательный вариант макросов в атаче. Я решил отказаться от хелпера для
VVI> загрузки шрифтовых каталогов в работающие икссерверы, т.к. уж больно он
VVI> страшен
Жаль.
--
С уважением, Денис
http://freesource.info
----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-25 9:33 [devel] RPM macros fonts Valery V. Inozemtsev
2006-03-25 10:31 ` Денис Смирнов
@ 2006-03-27 11:20 ` Andrii Dobrovol`s`kii Dobrovol`s`kii
2006-03-27 15:21 ` Valery V. Inozemtsev
2006-03-27 14:20 ` Dmitry V. Levin
` (2 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: Andrii Dobrovol`s`kii Dobrovol`s`kii @ 2006-03-27 11:20 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]
Valery V. Inozemtsev пишет:
> Добрый день.
>
> Я решил начать новый тред, т.к. обсуждение в предыдущих заинтересовало всего
> четверых человек.
>
> Окончательный вариант макросов в атаче. Я решил отказаться от хелпера для
> загрузки шрифтовых каталогов в работающие икссерверы, т.к. уж больно он
> страшен
А можно озвучить последствия такого решения? Для получения
обновленных шрифтов нужна будет перезагрузка Х-ов?
>
> Осталось решить в какой пакет их положить, или сделать rpm-build-fonts. Какие
> быдут предолжения?
>
> 2ldv: может сразу в rpm?
>
--
Rgrds,
Andriy
*********************************************************************
email: dobr at iop dot kiev dot ua Kyiv, Ukraine
Phone: (380-44) 525-7824 Department of Gas Electronics
Fax: (380-44) 525-2329 Institute of Physics of NASU
*********************************************************************
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-25 9:33 [devel] RPM macros fonts Valery V. Inozemtsev
2006-03-25 10:31 ` Денис Смирнов
2006-03-27 11:20 ` Andrii Dobrovol`s`kii Dobrovol`s`kii
@ 2006-03-27 14:20 ` Dmitry V. Levin
2006-03-27 15:22 ` Valery V. Inozemtsev
2006-03-28 10:12 ` Michael Shigorin
2006-04-02 12:30 ` Sergey Vlasov
4 siblings, 1 reply; 15+ messages in thread
From: Dmitry V. Levin @ 2006-03-27 14:20 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Sat, Mar 25, 2006 at 12:33:18PM +0300, Valery V. Inozemtsev wrote:
> Окончательный вариант макросов в атаче. Я решил отказаться от хелпера для
> загрузки шрифтовых каталогов в работающие икссерверы, т.к. уж больно он
> страшен
>
> Осталось решить в какой пакет их положить, или сделать rpm-build-fonts. Какие
> быдут предолжения?
>
> 2ldv: может сразу в rpm?
rpm-build более консервативен, так что если никто не возражает, можно и
туда. Если версии макросов не окончательные, лучше сперва утрясти в
другом месте.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-27 14:20 ` Dmitry V. Levin
@ 2006-03-27 15:22 ` Valery V. Inozemtsev
2006-03-27 15:38 ` Sergey V Turchin
0 siblings, 1 reply; 15+ messages in thread
From: Valery V. Inozemtsev @ 2006-03-27 15:22 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
В сообщении от 27 марта 2006 18:20 Dmitry V. Levin написал(a):
> On Sat, Mar 25, 2006 at 12:33:18PM +0300, Valery V. Inozemtsev wrote:
> > Окончательный вариант макросов в атаче. Я решил отказаться от хелпера для
> > загрузки шрифтовых каталогов в работающие икссерверы, т.к. уж больно он
> > страшен
> >
> > Осталось решить в какой пакет их положить, или сделать rpm-build-fonts.
> > Какие быдут предолжения?
> >
> > 2ldv: может сразу в rpm?
>
> rpm-build более консервативен, так что если никто не возражает, можно и
> туда. Если версии макросов не окончательные, лучше сперва утрясти в
> другом месте.
т.к. никаких возражений/предложений больше не последовало можно считать эту
версию окончательной
--
Valery V. Inozemtsev
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-25 9:33 [devel] RPM macros fonts Valery V. Inozemtsev
` (2 preceding siblings ...)
2006-03-27 14:20 ` Dmitry V. Levin
@ 2006-03-28 10:12 ` Michael Shigorin
2006-03-28 10:23 ` Valery V. Inozemtsev
2006-04-02 12:30 ` Sergey Vlasov
4 siblings, 1 reply; 15+ messages in thread
From: Michael Shigorin @ 2006-03-28 10:12 UTC (permalink / raw)
To: ALT Devel discussion list
On Sat, Mar 25, 2006 at 12:33:18PM +0300, Valery V. Inozemtsev wrote:
> Я решил отказаться от хелпера для загрузки шрифтовых каталогов
> в работающие икссерверы, т.к. уж больно он страшен
Уже и нарвался (потребовалась уникодная терминалка, а к ней
univga-fonts-bitmap)...
2 vsu: мож не надо искать, когда сломается? Пусть хоть для
обычных случаев бы работало.
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-28 10:12 ` Michael Shigorin
@ 2006-03-28 10:23 ` Valery V. Inozemtsev
2006-03-28 10:33 ` Michael Shigorin
0 siblings, 1 reply; 15+ messages in thread
From: Valery V. Inozemtsev @ 2006-03-28 10:23 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
В сообщении от 28 марта 2006 14:12 Michael Shigorin написал(a):
> On Sat, Mar 25, 2006 at 12:33:18PM +0300, Valery V. Inozemtsev wrote:
> > Я решил отказаться от хелпера для загрузки шрифтовых каталогов
> > в работающие икссерверы, т.к. уж больно он страшен
>
> Уже и нарвался (потребовалась уникодная терминалка, а к ней
> univga-fonts-bitmap)...
$ xset +fp /usr/share/fonts/что-то_там && xset fp rehash
это ничем не хуже service xfs restart
>
> 2 vsu: мож не надо искать, когда сломается? Пусть хоть для
> обычных случаев бы работало.
--
Valery V. Inozemtsev
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-28 10:23 ` Valery V. Inozemtsev
@ 2006-03-28 10:33 ` Michael Shigorin
0 siblings, 0 replies; 15+ messages in thread
From: Michael Shigorin @ 2006-03-28 10:33 UTC (permalink / raw)
To: ALT Devel discussion list
On Tue, Mar 28, 2006 at 02:23:41PM +0400, Valery V. Inozemtsev wrote:
> > > Я решил отказаться от хелпера для загрузки шрифтовых каталогов
> > > в работающие икссерверы, т.к. уж больно он страшен
> > Уже и нарвался (потребовалась уникодная терминалка, а к ней
> > univga-fonts-bitmap)...
> $ xset +fp /usr/share/fonts/что-то_там && xset fp rehash
> это ничем не хуже service xfs restart
Ага, и вспоминается 1998 год за окном. (я-то так и сделал)
Забрось туда то, что показывал, а там уж пусть патчи вешают.
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-03-25 9:33 [devel] RPM macros fonts Valery V. Inozemtsev
` (3 preceding siblings ...)
2006-03-28 10:12 ` Michael Shigorin
@ 2006-04-02 12:30 ` Sergey Vlasov
2006-04-02 12:42 ` Dmitry V. Levin
4 siblings, 1 reply; 15+ messages in thread
From: Sergey Vlasov @ 2006-04-02 12:30 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]
On Sat, Mar 25, 2006 at 12:33:18PM +0300, Valery V. Inozemtsev wrote:
> Добрый день.
>
> Я решил начать новый тред, т.к. обсуждение в предыдущих заинтересовало всего
> четверых человек.
>
> Окончательный вариант макросов в атаче. Я решил отказаться от хелпера для
> загрузки шрифтовых каталогов в работающие икссерверы, т.к. уж больно он
> страшен
>
> Осталось решить в какой пакет их положить, или сделать rpm-build-fonts. Какие
> быдут предолжения?
>
> 2ldv: может сразу в rpm?
>
> --
> Valery V. Inozemtsev
> %_fontsdir %_datadir/fonts
>
> %_bitmapfontsdir %_fontsdir/bitmap
> %_type1fontsdir %_fontsdir/type1
> %_ttffontsdir %_fontsdir/ttf
> %_otffontsdir %_fontsdir/otf
> %_speedofontsdir %_fontsdir/speedo
>
> %add_bitmap_font_path() %_bindir/mkfontdir %1 \
> %_bindir/fc-cache %1 \
> %_sbindir/chkfontpath -q -a %1 \
>
> %add_type1_font_path() %_bindir/mkfontscale %1 \
> %_bindir/mkfontdir %1 \
> %_bindir/fc-cache %1 \
> %_sbindir/chkfontpath -q -a %1
>
> %add_ttf_font_path() %_sbindir/ttmkfdir -d %1 -o %1/fonts.scale 2>/dev/null \
> %_bindir/mkfontdir %1 \
> %_bindir/fc-cache %1 \
> %_sbindir/chkfontpath -q -a %1
>
> %add_otf_font_path() %add_ttf_font_path
Это работает? Создаётся впечатление, что параметр в этом случае
передан не будет.
> %add_bitmap_font_path_first() %_bindir/mkfontdir %1 \
> %_bindir/fc-cache %1 \
> %_sbindir/chkfontpath -q -f -a %1
>
> %remove_font_path() %_sbindir/chkfontpath -q -r %1
А где должна быть проверка $1 - в этом макросе или снаружи?
Т.е., в конечном итоге в скрипте должно получаться что-то вроде:
%postun
if [ "$1" = "0" ]; then
%_sbindir/chkfontpath -q -r %fontsdir ||:
fi
Кстати, у меня в univga-fonts-bitmap во всех командах в %post и
%postun ещё было игнорирование возможных ошибок (||:) - стоит такое
забивать в макросы?
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-04-02 12:30 ` Sergey Vlasov
@ 2006-04-02 12:42 ` Dmitry V. Levin
2006-04-02 13:31 ` Valery V. Inozemtsev
2006-04-02 14:22 ` Sergey Vlasov
0 siblings, 2 replies; 15+ messages in thread
From: Dmitry V. Levin @ 2006-04-02 12:42 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
On Sun, Apr 02, 2006 at 04:30:24PM +0400, Sergey Vlasov wrote:
> > %add_otf_font_path() %add_ttf_font_path
>
> Это работает? Создаётся впечатление, что параметр в этом случае
> передан не будет.
Не должно работать.
> > %add_bitmap_font_path_first() %_bindir/mkfontdir %1 \
> > %_bindir/fc-cache %1 \
> > %_sbindir/chkfontpath -q -f -a %1
> >
> > %remove_font_path() %_sbindir/chkfontpath -q -r %1
>
> А где должна быть проверка $1 - в этом макросе или снаружи?
>
> Т.е., в конечном итоге в скрипте должно получаться что-то вроде:
>
> %postun
> if [ "$1" = "0" ]; then
> %_sbindir/chkfontpath -q -r %fontsdir ||:
> fi
>
> Кстати, у меня в univga-fonts-bitmap во всех командах в %post и
> %postun ещё было игнорирование возможных ошибок (||:) - стоит такое
> забивать в макросы?
На оба этих вопроса у меня такой ответ: чем больше будет перенесено из
макроса во внешний скрипт, тем лучше, поскольку при необходимости внести
изменения сделать это будет существенно проще и быстрее, ибо не потребуется
пересобирать пакеты.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-04-02 12:42 ` Dmitry V. Levin
@ 2006-04-02 13:31 ` Valery V. Inozemtsev
2006-04-02 14:22 ` Sergey Vlasov
1 sibling, 0 replies; 15+ messages in thread
From: Valery V. Inozemtsev @ 2006-04-02 13:31 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
В сообщении от 2 апреля 2006 16:42 Dmitry V. Levin написал(a):
> On Sun, Apr 02, 2006 at 04:30:24PM +0400, Sergey Vlasov wrote:
> > > %add_otf_font_path() %add_ttf_font_path
> >
> > Это работает? Создаётся впечатление, что параметр в этом случае
> > передан не будет.
>
> Не должно работать.
тогда видимо должно быть
%add_otf_font_path() %add_ttf_font_path %1
>
> > > %add_bitmap_font_path_first() %_bindir/mkfontdir %1 \
> > > %_bindir/fc-cache %1 \
> > > %_sbindir/chkfontpath -q -f -a %1
> > >
> > > %remove_font_path() %_sbindir/chkfontpath -q -r %1
> >
> > А где должна быть проверка $1 - в этом макросе или снаружи?
снаружи. может кто-то захочет просто удалить каталог
--
Valery V. Inozemtsev
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-04-02 12:42 ` Dmitry V. Levin
2006-04-02 13:31 ` Valery V. Inozemtsev
@ 2006-04-02 14:22 ` Sergey Vlasov
2006-04-02 16:14 ` Dmitry V. Levin
1 sibling, 1 reply; 15+ messages in thread
From: Sergey Vlasov @ 2006-04-02 14:22 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 3171 bytes --]
On Sun, Apr 02, 2006 at 04:42:55PM +0400, Dmitry V. Levin wrote:
> На оба этих вопроса у меня такой ответ: чем больше будет перенесено из
> макроса во внешний скрипт, тем лучше, поскольку при необходимости внести
> изменения сделать это будет существенно проще и быстрее, ибо не потребуется
> пересобирать пакеты.
Хорошо, займёмся переписыванием макросов в виде скриптов по образу и
подобию info-install:
/usr/sbin/install_fonts:
-----------------------------------------------------------------------
#!/bin/sh -e
PROG=install_fonts
Fatal()
{
echo "$PROG: $*" >&2
exit 1
}
Usage()
{
cat >&2 <<EOF
install_fonts - register new fonts in various subsystems.
Usage: $PROG [options] DIR...
Valid options are:
--bitmap install X11 bitmap fonts (*.pcf)
--type1 install Type 1 fonts (*.pfa, *.pfb)
--ttf install TrueType fonts (*.ttf)
--otf install OpenType fonts (*.otf)
--first put font directory first in the font path
EOF
[ -n "$1" ] && exit "$1" || exit
}
TEMP=`getopt -n "$PROG" -o h -l help,bitmap,type1,ttf,otf,first -- "$@"` || Usage 1
eval set -- "$TEMP"
bitmap=
type1=
ttf=
otf=
first=
while :; do
case "$1" in
--bitmap)
bitmap=1
shift
;;
--type1)
type1=1
shift
;;
--ttf)
ttf=1
shift
;;
--otf)
otf=1
shift
;;
--first)
first="-f"
shift
;;
-h|--help)
Usage 0
;;
--)
shift
break
;;
*)
Fatal "$PROG: unrecognized option: $1"
;;
esac
done
for dir in "$@"; do
if [ -n "$ttf$otf" ]; then
/usr/sbin/ttmkfdir -d "$dir" -o "$dir"/fonts.scale 2>/dev/null ||:
fi
if [ -n "$type1" ]; then
/usr/bin/mkfontscale "$dir" ||:
fi
/usr/bin/mkfontdir "$dir" ||:
/usr/bin/fc-cache "$dir" ||:
/usr/sbin/chkfontpath -q $first -a "$dir" ||:
done
-----------------------------------------------------------------------
/usr/sbin/uninstall_fonts:
-----------------------------------------------------------------------
#!/bin/sh -e
PROG=uninstall_fonts
if ! [ "$RPM_INSTALL_ARG1" -ge 0 ] 2>/dev/null; then
echo "$PROG: invalid or undefined variable: RPM_INSTALL_ARG1" >&2
exit 1
fi
[ "$RPM_INSTALL_ARG1" -eq 0 ] || exit 0
for dir in "$@"; do
/usr/sbin/chkfontpath -q -r "$dir" ||:
done
-----------------------------------------------------------------------
Макросы (кроме %_*dir):
-----------------------------------------------------------------------
%add_bitmap_font_path() %_sbindir/install_fonts --bitmap %1
%add_type1_font_path() %_sbindir/install_fonts --type1 %1
%add_ttf_font_path() %_sbindir/install_fonts --ttf %1
%add_otf_font_path() %_sbindir/install_fonts --otf %1
%add_bitmap_font_path_first() %_sbindir/install_fonts --bitmap --first %1
%remove_font_path() %_sbindir/uninstall_fonts %1
-----------------------------------------------------------------------
Как назвать пакет со скриптами - alt-fonts-install? (Просто
fonts-install будет мешаться среди прочих fonts-$TYPE-$NAME - или
пусть там и торчит?)
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [devel] RPM macros fonts
2006-04-02 14:22 ` Sergey Vlasov
@ 2006-04-02 16:14 ` Dmitry V. Levin
0 siblings, 0 replies; 15+ messages in thread
From: Dmitry V. Levin @ 2006-04-02 16:14 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
On Sun, Apr 02, 2006 at 06:22:21PM +0400, Sergey Vlasov wrote:
> On Sun, Apr 02, 2006 at 04:42:55PM +0400, Dmitry V. Levin wrote:
> > На оба этих вопроса у меня такой ответ: чем больше будет перенесено из
> > макроса во внешний скрипт, тем лучше, поскольку при необходимости внести
> > изменения сделать это будет существенно проще и быстрее, ибо не потребуется
> > пересобирать пакеты.
>
> Хорошо, займёмся переписыванием макросов в виде скриптов по образу и
> подобию info-install:
>
> /usr/sbin/install_fonts:
[...]
> install_fonts - register new fonts in various subsystems.
>
> Usage: $PROG [options] DIR...
>
> Valid options are:
> --bitmap install X11 bitmap fonts (*.pcf)
> --type1 install Type 1 fonts (*.pfa, *.pfb)
> --ttf install TrueType fonts (*.ttf)
> --otf install OpenType fonts (*.otf)
А разве тип не определяется однозначно по местоположению?
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread