From: Andrey Savchenko <bircoph@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] rpm макросы для пакета mk-configure
Date: Thu, 28 May 2020 00:30:31 +0300
Message-ID: <20200528003031.61eba8e4ba861419dd2f6a54@altlinux.org> (raw)
In-Reply-To: <4526171590499652@mail.yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 3479 bytes --]
On Tue, 26 May 2020 21:30:20 +0300 Aleksey Cheusov wrote:
> 25.05.2020, 22:49, "Andrey Savchenko" <bircoph@altlinux.org>:
> > On Mon, 25 May 2020 21:59:49 +0300 Aleksey Cheusov wrote:
> >>> Нужен review и разрешение на публикацию в Сизифе.
> >
> > Вот замеченные проблемы. Большинство из них есть в логах сборки, так
>
> Обновил.
> См. http://git.altlinux.org/tasks/252281/
Там добавился ещё paexec. По нему есть gcc warning:
In file included from /usr/include/string.h:507,
from paexec.c:32:
In function 'strncpy',
inlined from 'init__read_graph_tasks' at paexec.c:276:3:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' specified bound 2000 equals destination size [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Это вот эта строка:
strncpy (buf_copy, buf, sizeof (buf_copy));
Размер buf может быть больше buf_copy, т.к. он определяется функцией
getdelim(NULL,0,…) и данные читаются из stdin. В таком случае buf_copy
будет без терминирующего нуля.
Я предлагаю сделать так:
strncpy (buf_copy, buf, sizeof (buf_copy) - 1);
buf_copy[sizeof (buf_copy) - 1] = '\0';
Других проблем я не нашёл, так что даю аппрув на таск: проблема
в коде не является проблемой опакечивания и не является основанием
для блокирования коммита.
Всё же, я рекомендую исправить эту проблему.
> > 2) libmaa-1.4.7-alt2:
> >
> > 2.1) Нет зависимости на макрос.
> > Зависимости на макросы нужно делать через BuildRequires(pre):
> > BuildRequires(pre): rpm-macros-mk-configure
>
> Я сделал так, как сделано с cmake, где cmake Requires rpm-macro-cmake и этого вроде достаточно.
> "BuildRequires: rpm-macro-mk-configure" действительно исправляет ворнинги, но мне непонятно,
> зачем они. Зависимость добавил -- бессмысленные ворнинги пропали :-)
Как следует из комментария ldv, это бесполезный warning. Поэтому
мейнтенеру приходится выбирать между бесполезными предупреждениями
и бесполезными зависимостями :/
> > 3.2) Безопаснее использовать mkstemp вместо tempnam:
> > /usr/src/RPM/BUILD/runawk-1.6.1/runawk/runawk.c:168: warning: the use of `tempnam' is dangerous, better use `mkstemp'
>
> С точки зрения security здесь все в порядке. Так что это предупреждение я сознательно игнорирую.
Да, действительно, там используется mkdir, что подразумевает O_EXCL,
что делает tempnam безопасным.
Best regards,
Andrew Savchenko
[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-05-27 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 18:59 Aleksey Cheusov
2020-05-25 19:49 ` Andrey Savchenko
2020-05-25 19:53 ` Andrey Savchenko
2020-05-25 22:09 ` Dmitry V. Levin
2020-05-25 22:36 ` Andrey Savchenko
2020-05-26 18:30 ` Aleksey Cheusov
2020-05-27 21:30 ` Andrey Savchenko [this message]
2020-06-01 16:15 ` Aleksey Cheusov
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=20200528003031.61eba8e4ba861419dd2f6a54@altlinux.org \
--to=bircoph@altlinux.org \
--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