From: "Dmitry V. Levin" <ldv@altlinux.org> To: ALT Linux Sisyphus mailing list <sisyphus@altlinux.ru> Subject: Re: [sisyphus] разные сборки одного пакета Date: Thu, 15 Jan 2004 14:46:17 +0300 Message-ID: <20040115114617.GB9188@basalt.office.altlinux.org> (raw) In-Reply-To: <20040115002333.GC4034@localhost.localdomain> [-- Attachment #1: Type: text/plain, Size: 1858 bytes --] On Thu, Jan 15, 2004 at 06:23:33AM +0600, Alexey Morozov wrote: > On Mon, Jan 12, 2004 at 04:13:46PM +0300, Ildar Mulyukov wrote: > > А теперь: внимание, вопрос! > > Как в спеках поддерживается сборка пакетов с альтернативным набором фич? > > То есть > > 1. можно ли писать спек так, чтобы добавлением опций команде rpmbuild из > > того же src.rpm строился иной бинарник? Что-то вроде rpmbuild --rebuild > > --build-options="--with-alsa" esound.src.rpm ? > ну, собственно, четких правил еще нет. Зато есть два _непересекающихся_ > набора макросов, которые позволяют указывать параметры при сборке > (в CLI или в настройках RPM). Макросы таковы: > > %def_with <arg> > %def_without <arg> > > и > > %def_enable <arg> > %def_disable <arg> > > Первый набор управляется параметрами --with или --without, а второй - > --enable/--disable. > > Использование %def_with в спеке разрешает по умолчанию некоторую опцию, > а %def_without - запрещает ее по умолчанию. С enable/disable - > аналогично. > > Если некоторая опция smth была объявлена с with/without, то затем в спеке > можно написать: > > %if_with smth > ... do things if smth included > %endif > ... > %if_without smth > ... do things if smth excluded > %endif > > Аналогично с enable/disable, только используются > %if_enabled/%if_disabled. Есть ещё %{subst_with smth} и %{subst_enable smth}, которые раскрываются в --with-smth либо --without-smth и, соответственно, --enable-smth либо --disable-smth. Разнообразие with/without vs enable/disable - это следствие разнообразия аналогичных параметров configure. [...] > 2ldv: похоже, я нашел баг в обработке with/without. Параметры, указанные > в ~/.rpmmacros имеют приоритет перед теми, которые указаны в командной > строке. Неконсистентно. Да, в rpm всё наоборот: сначала параметры командной строки, потом макрофайлы, потом spec-файл. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-01-15 11:46 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-01-12 13:13 Ildar Mulyukov 2004-01-12 18:19 ` led 2004-01-13 7:08 ` Низамов Шавкат 2004-01-13 7:59 ` led 2004-01-13 9:51 ` Алексей Любимов 2004-01-13 10:32 ` led 2004-01-14 17:48 ` [sisyphus] " Michael Shigorin 2004-01-13 13:17 ` [sisyphus] " Andrey Rahmatullin 2004-01-13 13:33 ` Serj 2004-01-13 13:47 ` led 2004-01-13 13:58 ` Aleksey Avdeev 2004-01-13 14:33 ` led 2004-01-13 14:44 ` Aleksey Avdeev 2004-01-13 14:55 ` Andrey Rahmatullin 2004-01-13 15:14 ` Aleksey Avdeev 2004-01-13 15:50 ` Andrey Rahmatullin 2004-01-15 1:15 ` Vitaly Lipatov 2004-01-15 11:17 ` [sisyphus][JT] " Andrey Rahmatullin 2004-01-14 17:47 ` [sisyphus] " Michael Shigorin 2004-01-15 13:29 ` led 2004-01-12 18:21 ` [sisyphus] " Dmitry V. Levin 2004-01-15 0:23 ` Alexey Morozov 2004-01-15 8:25 ` [POLICY] " Michael Shigorin 2004-01-15 11:46 ` Dmitry V. Levin [this message] 2004-01-15 14:04 ` [sisyphus] " Michael Shigorin 2004-01-16 11:04 ` [sisyphus] " Alexey Morozov 2004-01-16 11:20 ` Dmitry V. Levin 2004-01-16 12:21 ` [sisyphus] " Michael Shigorin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040115114617.GB9188@basalt.office.altlinux.org \ --to=ldv@altlinux.org \ --cc=sisyphus@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git