From: Aleksey Avdeev <solo@solin.spb.ru> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: Re: [devel] Автоматические release (was: rpmbph with git branches) Date: Tue, 04 Aug 2009 19:29:54 +0400 Message-ID: <4A7853F2.7030706@solin.spb.ru> (raw) In-Reply-To: <4A11B914.20101@altlinux.com> [-- Attachment #1.1: Type: text/plain, Size: 1576 bytes --] Anton Farygin пишет: > Aleksey Avdeev пишет: >> Anton Farygin пишет: ... >>> Кстати, почему-то у нас в Release: не получается использовать >>> макросы, определённые в /etc/rpm/macros.d/ ? Они вообще должны >>> работать ? >> >> Можно, и оно работает. См. >> <http://git.altlinux.org/people/solo/packages/?p=apache2.git;a=blob;f=apache2.spec;h=2d4284a637889841f6dba3f089bcfc55372a0e21;hb=ALT/apache2/spec>: >> >> часть макросов, на основе которых вычисляется Release (%distr_switch, >> в частности) определена в другом пакете (в rpm-macros-apache2). Для >> данного пакета требуется использовать BuildRequires(pre). > > Интересно было бы полностью вычислить Release в /etc/rpm/macros.d/ > > Всё, что еу нужно передавать - это номер релиза - циферку. > > Т.е. - в итоге должно получиться что-то вроде > > %_altrelease 1 > Release: %alt_release Похоже начало вытанцовываться что-то похожее. Если использовать прилагаемый макрофайл (см. вложение), то: Release: %distr_auto_release <prefix><number>[.<suffix>] При этом если определён и не пуст макрос %distr_switch, конструкция раскроется так (если %distr_num не определён или пуст -- он будет считаться "1"): Release: <prefix><number-1>.%distr_switch.%distr_num[.<suffix>] А если %distr_switch не определён или пуст -- так: Release: <prefix><number>[.<suffix>] PS: Данный вариант мне нравиться дольше, чем используемый сейчас. Думаю запаковать его. Прошу предлагать более внятные названия для макросов и/или самого пакета. -- С уважением. Алексей. [-- Attachment #1.2: auto_distr --] [-- Type: text/plain, Size: 433 bytes --] #auto_distr macros # release format: <prefix><number>[.<suffix>] %distr_auto_release() %(if [ "%{?distr_switch}" = "" ]; then echo "%1"; else echo "%1"|sed -rn -e 's@^([^[:space:]]+)([0-9]+)(|(\\.[^[:space:]]+))$@\\1/\\2/\\3@p'|awk -v FS='/' -v distr_name='%{?distr_switch}' -v distr_num='%{?distr_num}' 'BEGIN {if (distr_num == "") {num="1"} else {num=distr_num}; suf=("." distr_name "." num) }; {print $1 ($2-1) suf $3}'; fi) [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 552 bytes --]
next prev parent reply other threads:[~2009-08-04 15:29 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-05-18 9:58 [devel] rpmbph with git branches Eugene Prokopiev 2009-05-18 14:50 ` Max Ivanov 2009-05-18 15:00 ` Alexey I. Froloff 2009-05-18 15:25 ` Afanasov Dmitry 2009-05-18 15:32 ` Max Ivanov 2009-05-18 16:53 ` Eugene Prokopiev 2009-05-18 16:59 ` Alexey I. Froloff 2009-05-19 4:15 ` Eugene Prokopiev 2009-05-24 13:09 ` Michael Shigorin 2009-05-24 13:36 ` Afanasov Dmitry 2009-05-24 16:21 ` Grigory Batalov 2009-05-24 17:38 ` Afanasov Dmitry 2009-05-24 13:40 ` Aleksey Avdeev 2009-05-18 17:00 ` Igor Vlasenko 2009-05-18 17:04 ` Led 2009-05-18 15:40 ` Anton Farygin 2009-05-18 16:49 ` Eugene Prokopiev 2009-05-18 17:53 ` Anton Farygin 2009-05-18 18:10 ` Aleksey Avdeev 2009-05-18 19:37 ` Anton Farygin 2009-05-18 19:49 ` Aleksey Avdeev 2009-08-04 15:29 ` Aleksey Avdeev [this message] 2009-08-04 16:40 ` [devel] Автоматические release (was: rpmbph with git branches) Michael Shigorin 2009-08-04 17:07 ` [devel] Автоматические release Aleksey Avdeev 2009-08-04 17:13 ` Led 2009-08-04 17:55 ` Aleksey Avdeev 2009-08-07 14:59 ` Aleksey Avdeev 2009-08-07 19:56 ` Aleksey Avdeev 2009-08-08 9:12 ` [devel] I: У buildreq проблемы с %(<shell-coms>)? (was: Автоматические release) Aleksey Avdeev 2009-08-08 10:02 ` Alexey Tourbin 2009-08-08 11:47 ` [devel] I: У buildreq проблемы с %(<shell-coms>)? Aleksey Avdeev 2009-08-05 4:20 ` [devel] Автоматические release (was: rpmbph with git branches) Eugene Prokopiev 2009-08-05 4:30 ` Eugene Prokopiev 2009-08-05 11:50 ` [devel] Автоматические release Aleksey Avdeev 2009-05-18 20:06 ` [devel] rpmbph with git branches Vitaly Lipatov 2009-05-18 20:05 ` Aleksey Avdeev 2009-05-19 4:14 ` Eugene Prokopiev 2009-05-19 5:03 ` Vitaly Lipatov 2009-05-19 5:42 ` Anton Farygin 2009-05-19 7:53 ` Eugene Prokopiev 2009-05-19 8:06 ` Anton Farygin 2009-05-19 8:39 ` Eugene Prokopiev 2009-05-20 8:21 ` Vitaly Lipatov 2009-05-19 5:41 ` Anton Farygin 2009-05-19 9:56 ` Aleksey Avdeev 2009-05-19 10:34 ` Anton Farygin 2009-05-19 10:39 ` Max Ivanov 2009-05-19 10:58 ` Anton Farygin
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=4A7853F2.7030706@solin.spb.ru \ --to=solo@solin.spb.ru \ --cc=devel@lists.altlinux.org \ /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 Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git