ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] sisyphus_check: /sbin/install-info, /sbin/ldconfig
Date: Sun, 1 Nov 2009 06:15:50 +0300
Message-ID: <20091101031550.GC11219@altlinux.org> (raw)
In-Reply-To: <20091101021442.GA15972@wo.int.altlinux.org>

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

On Sun, Nov 01, 2009 at 05:14:42AM +0300, Dmitry V. Levin wrote:
> > Как ты собираешься это сделать?  Желательно у зависимости проверять
> > флаги %{REQUIREFLAGS} на предмет %post-скриптов.  Потому что по крайней
> > мере зависимость на /sbin/install-info может быть не связана с
> > установкой info-страниц в %post-скрипте пакета.
>
> I've just pushed sisyphus_check 0.8.14-alt1-4-gc78c3ee that implements
> this check.  Please have a look.

-rpm_requires=[%{requirename:shescape}" %{requireflags:depflags} "%{requireversion:shescape}"
+rpm_requires=[%{requirename:shescape}" %{requireflags} %{requireflags:depflags} "%{requireversion:shescape}"

%{requireflags:octal} may (or may not) be more convenient here,
possibly depending on whether awk can handle octals just as easy
as decimals.

+bad_prereqs='/sbin/install-info
+/sbin/ldconfig'

+       # 2^6: RPMSENSE_PREREQ
+       # 2^14: RPMSENSE_FIND_REQUIRES
+       bad=$(printf %s "$rpm_requires" |
+               awk '$2>=64 && $2!=16384 {print $1}' |
+               egrep -x "$bad_prereqs" |
+               sort -u)

Since %{requireflags} is a bitmap, numeric comparison looks puzzling.
What are exactly the rules we'd like to follow?  Basically, what we want
to do is to forbid the use of /sbin/install-info in %post-like scripts.
For such a script, the dependency on /sbin/install-info is generated
automatically.  But usually it is also accompanied with manual PreReq
dependency on %__install_info.  We should cover both cases -- for
example, one can forget to remove the accompanying PreReq dependency
while removing the scripts.

Now to the requireflags.  Older rpmbuild implementation (the one we use)
always sets PREREQ bit along with e.g. SCRIPT_POST (please check if this
is actually true).  Thus, to handle both cases (automatic scriptlet
dependencies and manual prereqs) it would suffice to perform the test
as simple as
    
	bad = (requireflags & PREREQ);

Newer rpmbuild implementation does not set PREREQ bit along with
scriptlet bits, so the test should be extended to the scriptlet bits:

	bad = (requireflags & (PREREQ | SCRIPT_POST | SCRIPT_...));

Another idea looming around is to prohibit manual dependencies
on /sbin/install-info altogether.  I'm not quite sure if it is a good
idea, since it goes far beyond scriptlets and prereqs.  After all,
you name it "bad_prereqs", so it must be a prereq.

Also consider adding 'info-install' to bad_prereqs (since they might
use bare 'install-info' command, not /sbin/install-info).

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

  reply	other threads:[~2009-11-01  3:15 UTC|newest]

Thread overview: 241+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  8:27 [devel] Как не надо писать спеки Damir Shayhutdinov
2009-10-09  9:19 ` Artem Zolochevskiy
2009-10-09  9:41   ` Timur Batyrshin
2009-10-09 10:15     ` Evgeny Sinelnikov
2009-10-09 10:21       ` Damir Shayhutdinov
2009-10-09 10:25         ` Evgeny Sinelnikov
2009-10-09 12:56         ` Kharitonov A. Dmitry
2009-10-09 12:54           ` Andrey Rahmatullin
2009-10-09 13:27             ` Kharitonov A. Dmitry
2009-10-09 13:30               ` Andrey Rahmatullin
2009-10-09 13:53                 ` Kharitonov A. Dmitry
2009-10-09 13:56                   ` Andrey Rahmatullin
2009-10-09 14:04                     ` Kharitonov A. Dmitry
2009-10-09 14:13                       ` Andrey Rahmatullin
2009-10-09 14:24                         ` Kharitonov A. Dmitry
2009-10-09 14:24                           ` Andrey Rahmatullin
2009-10-09 14:43                             ` Kharitonov A. Dmitry
2009-10-09 14:44                               ` Andrey Rahmatullin
2009-10-09 14:51                                 ` Kharitonov A. Dmitry
2009-10-09 14:50                                   ` Andrey Rahmatullin
2009-10-09 15:13                                     ` Kharitonov A. Dmitry
2009-10-09 15:20                                       ` Andrey Rahmatullin
2009-10-09 17:15                                         ` Kharitonov A. Dmitry
2009-10-09 14:48                               ` Kharitonov A. Dmitry
2009-10-09 14:25                           ` Andrey Rahmatullin
2009-10-09 18:10           ` Kharitonov A. Dmitry
2009-10-13  7:13         ` Sergei Epiphanov
2009-10-09 10:27       ` Andrey Rahmatullin
2009-10-09 10:28         ` Evgeny Sinelnikov
2009-10-09 10:31           ` Andrey Rahmatullin
2009-10-09 12:47       ` Kharitonov A. Dmitry
2009-10-09 12:47         ` Andrey Rahmatullin
2009-10-09 18:13           ` Kharitonov A. Dmitry
2009-10-09 12:35     ` Kharitonov A. Dmitry
2009-10-09 12:43       ` Alexey I. Froloff
2009-10-09 12:46         ` Andrey Rahmatullin
2009-10-09 12:52           ` Anton Farygin
2009-10-09 13:25         ` Kharitonov A. Dmitry
2009-10-09 13:01       ` Timur Batyrshin
2009-10-09 13:38         ` Kharitonov A. Dmitry
2009-10-09 13:38           ` Sergey Y. Afonin
2009-10-09 13:58             ` Kharitonov A. Dmitry
2009-10-09 18:10           ` Timur Batyrshin
2009-10-09 18:40             ` Kharitonov A. Dmitry
2009-10-10  9:24               ` Timur Batyrshin
2009-10-10  9:46                 ` Kharitonov A. Dmitry
2009-10-10 18:08     ` Artem Zolochevskiy
2009-10-10 18:14       ` Aleksey Avdeev
2009-10-10 20:16         ` Alexey Rusakov
2009-10-10 20:17         ` Andrew Clark
2009-10-10 20:21           ` Alexey Rusakov
2009-10-10 20:28             ` Dmitry V. Levin
2009-10-10 20:39               ` Andrew Clark
2009-10-11  9:26                 ` Andrey Rahmatullin
2009-10-10 20:32             ` Andrew Clark
2009-10-10 20:38               ` Dmitry V. Levin
2009-10-10 21:16                 ` Денис Смирнов
2009-10-10 21:21                   ` Alexey Rusakov
2009-10-11 16:05                     ` Igor Vlasenko
2009-10-11 16:11                       ` Alexey I. Froloff
2009-10-11 16:22                       ` Slava Semushin
2009-10-11 16:35                         ` Alexey I. Froloff
2009-10-11 17:08                         ` Igor Vlasenko
2009-10-11 17:18                           ` Led
2009-10-11 18:32                           ` Dmitry V. Levin
2009-10-11 18:38                             ` Alexey I. Froloff
2009-10-11 18:44                               ` Dmitry V. Levin
2009-10-11 18:53                                 ` Alexey I. Froloff
2009-10-11 19:06                                 ` Alexey Gladkov
2009-10-11 19:04                             ` Alexey Tourbin
2009-10-11 16:42                       ` Денис Смирнов
2009-10-10 20:40               ` Led
2009-10-09  9:50   ` REAL
2009-10-09  8:32     ` Yury Aliaev
2009-10-09 10:56       ` Sergey Bolshakov
2009-10-09 10:58       ` [devel] [jt] " Dmitry V. Levin
2009-10-10 10:19         ` Yury Aliaev
2009-10-10 19:39           ` Anton Farygin
2009-10-15 16:19             ` Yury Aliaev
2009-10-15 19:07               ` Денис Смирнов
2009-10-16  2:37                 ` REAL
2009-10-16  5:53                   ` Yury Aliaev
2009-10-16  8:51                     ` Damir Shayhutdinov
2009-10-17  7:06                       ` Yury Aliaev
2009-10-17 15:07                         ` Денис Смирнов
2009-10-21  6:01                           ` Yury Aliaev
2009-10-21 10:10                             ` Dmitry V. Levin
2009-10-21 20:59                               ` Денис Смирнов
2009-10-22 12:22                                 ` Yury Aliaev
2009-10-22 14:23                                   ` Afanasov Dmitry
2009-10-22 14:27                                 ` Michael Bochkaryov
2009-10-23  0:00                                   ` Денис Смирнов
2009-10-22 12:17                               ` Yury Aliaev
2009-10-21 16:32                             ` Денис Смирнов
2009-10-21 16:37                               ` Dmitry V. Levin
2009-10-21 16:56                                   ` [devel] RTFM please Dmitry V. Levin
2009-10-21 20:54                                     ` Денис Смирнов
2009-10-21 19:34                               ` [devel] [jt] Как не надо писать спеки Alexey Tourbin
2009-10-22 12:35                               ` Yury Aliaev
2009-10-22 14:18                                 ` Afanasov Dmitry
2009-10-22 14:24                                 ` Mykola S. Grechukh
2009-10-22 23:59                                 ` Денис Смирнов
2009-10-16  9:15                     ` Андрей Черепанов
2009-10-16  9:28                       ` Afanasov Dmitry
2009-10-16  9:35                       ` REAL
2009-10-17 17:25                       ` Yury Aliaev
2009-10-18 13:53                         ` Evgeny Sinelnikov
2009-10-19  3:10                         ` REAL
2009-10-19  6:29                           ` Evgeny Sinelnikov
2009-10-19  6:48                             ` REAL
2009-10-21  6:05                               ` Yury Aliaev
2009-10-21  8:32                                 ` REAL
2009-10-17  0:54                     ` Денис Смирнов
2009-10-17 10:40                       ` Sergey Y. Afonin
2009-10-17 15:08                         ` Денис Смирнов
2009-10-21  6:09                       ` Yury Aliaev
2009-10-21  9:11                         ` REAL
2009-10-21 16:26                         ` Денис Смирнов
2009-10-16  5:43                 ` Yury Aliaev
2009-10-16  8:49                   ` REAL
2009-10-16  9:20                   ` Андрей Черепанов
2009-10-17  0:50                   ` Денис Смирнов
2009-10-21  6:13                     ` Yury Aliaev
2009-10-21  8:38                       ` REAL
2009-10-22 12:07                         ` Yury Aliaev
2009-10-22 13:47                           ` Led
2009-10-22 14:06                           ` Afanasov Dmitry
2009-10-23  0:00                             ` Mikhail Efremov
2009-10-22 23:49                           ` Денис Смирнов
2009-10-09 11:50       ` [devel] " Led
2009-10-10 10:22         ` Yury Aliaev
2009-10-10 19:40           ` Anton Farygin
2009-10-09 11:11     ` Anton Farygin
2009-10-09 10:05   ` Damir Shayhutdinov
2009-10-09 10:10     ` Ildar Mulyukov
2009-10-09 12:42       ` Kharitonov A. Dmitry
2009-10-09 10:14     ` Artem Zolochevskiy
2009-10-09 10:30       ` Damir Shayhutdinov
2009-10-09 10:42         ` Artem Zolochevskiy
2009-10-09 10:54           ` Damir Shayhutdinov
2009-10-09 11:11         ` Grigory Batalov
2009-10-09 11:20           ` Sergey Y. Afonin
2009-10-09 12:58         ` Kharitonov A. Dmitry
2009-10-09 12:58           ` Andrey Rahmatullin
2009-10-09 12:58           ` Timur Batyrshin
2009-10-09 13:31             ` Kharitonov A. Dmitry
2009-10-09 13:39               ` Sergey Y. Afonin
2009-10-09 13:39               ` Anton Farygin
2009-10-10 13:23               ` Денис Смирнов
2009-10-09 13:02           ` Anton Farygin
2009-10-09 13:23           ` Sergey Y. Afonin
2009-10-09 13:49             ` Kharitonov A. Dmitry
2009-10-09 17:59               ` Aleksey Avdeev
2009-10-09 20:30                 ` Kharitonov A. Dmitry
2009-10-10  6:58                   ` Aleksey Avdeev
2009-10-10  8:54                     ` Kharitonov A. Dmitry
2009-10-10  8:54                       ` Aleksey Avdeev
2009-10-10  9:27                         ` Kharitonov A. Dmitry
2009-10-10  9:30                           ` Aleksey Avdeev
2009-10-10  9:59                             ` Kharitonov A. Dmitry
2009-10-10 11:19                               ` Aleksey Avdeev
2009-10-10 13:25                           ` Денис Смирнов
2009-10-10 13:21           ` Денис Смирнов
2009-10-09 18:52         ` Kharitonov A. Dmitry
2009-10-09 19:08           ` Dmitry V. Levin
2009-10-09 19:52             ` Kharitonov A. Dmitry
2009-10-09 19:59               ` Led
2009-10-09 20:25                 ` Kharitonov A. Dmitry
2009-10-09 20:27                   ` Led
2009-10-09 20:39                     ` Kharitonov A. Dmitry
2009-10-10  7:32               ` Sergey Y. Afonin
2009-10-10  8:49                 ` Kharitonov A. Dmitry
2009-10-10 10:35                   ` Damir Shayhutdinov
2009-10-10 10:47                     ` Kharitonov A. Dmitry
2009-10-10 11:21                       ` Aleksey Avdeev
2009-10-10 13:18                   ` Денис Смирнов
2009-10-09 20:46           ` Mikhail A. Pokidko
2009-10-09 20:53             ` Kharitonov A. Dmitry
2009-10-09 12:41     ` Kharitonov A. Dmitry
2009-10-09 12:40       ` Led
2009-10-09 13:22         ` Kharitonov A. Dmitry
2009-10-09 13:31           ` Sergey Y. Afonin
2009-10-09 13:26         ` Sergey Y. Afonin
2009-10-09 13:28           ` Alexey I. Froloff
2009-10-09 13:40             ` Sergey Y. Afonin
2009-10-09 13:44               ` Alexey I. Froloff
2009-10-09 13:46                 ` Sergey Y. Afonin
2009-10-09 13:56                 ` Dmitry V. Levin
2009-10-09 14:46                   ` Alexey Tourbin
2009-10-09 14:49                     ` [devel] /sbin/install-info Dmitry V. Levin
2009-10-09 15:36                       ` Alexey Tourbin
2009-11-01  2:14                     ` [devel] sisyphus_check: /sbin/install-info, /sbin/ldconfig Dmitry V. Levin
2009-11-01  3:15                       ` Alexey Tourbin [this message]
2009-11-01 16:06                         ` Dmitry V. Levin
2009-11-02  4:39                           ` Alexey Tourbin
2009-10-09 13:51           ` [devel] Как не надо писать спеки Kharitonov A. Dmitry
2009-10-09 12:04   ` Денис Смирнов
2009-10-09 19:03     ` Kharitonov A. Dmitry
2009-10-09 19:05       ` Dmitry V. Levin
2009-10-09 19:17         ` Kharitonov A. Dmitry
2009-10-09 19:21           ` Dmitry V. Levin
2009-10-09 20:04             ` Kharitonov A. Dmitry
2009-10-10 13:45       ` Денис Смирнов
2009-10-09 12:27   ` Kharitonov A. Dmitry
2009-10-09 12:25     ` Andrey Rahmatullin
2009-10-09 12:27       ` Led
2009-10-09 13:13         ` Kharitonov A. Dmitry
2009-10-09 13:12       ` Kharitonov A. Dmitry
2009-10-09 13:19         ` Alexey I. Froloff
2009-10-09 13:46           ` Kharitonov A. Dmitry
2009-10-09 12:31     ` Денис Смирнов
2009-10-09 13:20       ` Kharitonov A. Dmitry
2009-10-10 13:53         ` Денис Смирнов
2009-10-11  7:03           ` Kharitonov A. Dmitry
2009-10-11 11:24             ` Денис Смирнов
2009-10-09 11:51 ` Kharitonov A. Dmitry
2009-10-09 11:50   ` Damir Shayhutdinov
2009-10-09 11:53   ` Alexey Morsov
2009-10-09 13:05     ` Kharitonov A. Dmitry
2009-10-09 12:09   ` Денис Смирнов
2009-10-09 13:10     ` Kharitonov A. Dmitry
2009-10-09 13:17       ` Timur Batyrshin
2009-10-09 13:43         ` Kharitonov A. Dmitry
2009-10-09 14:02           ` [devel] Как читать и отвечать на письма Dmitry V. Levin
2009-10-10 13:43       ` [devel] Как не надо писать спеки Денис Смирнов
2009-10-11  7:53         ` Kharitonov A. Dmitry
2009-10-11 11:00           ` Денис Смирнов
2009-10-09 23:50 ` Alexey Rusakov
2009-10-10 10:40   ` Alexey I. Froloff
2009-10-10 13:07     ` [devel] [JT] " Alexey Rusakov
2009-10-11  8:40 ` [devel] " Vitaly Lipatov
2009-10-11  8:54   ` Kharitonov A. Dmitry
2009-10-11 10:26     ` Vitaly Lipatov
2009-10-11 10:56       ` Kharitonov A. Dmitry
2009-10-11 11:27         ` Dmitry V. Levin
2009-10-11 11:54           ` Kharitonov A. Dmitry
2009-10-11 12:27             ` Timur Batyrshin
2009-10-11 13:21               ` Kharitonov A. Dmitry
2009-10-11 13:37                 ` Timur Batyrshin
2009-10-11 12:31             ` Денис Смирнов
2009-10-11 12:59               ` Kharitonov A. Dmitry

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=20091101031550.GC11219@altlinux.org \
    --to=at@altlinux.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