devel@ where you _can_ ask
 help / color / mirror / Atom feed
From: Andrey Savchenko <bircoph@altlinux.org>
To: "devel@ where you _can_ ask" <devel-newbies@lists.altlinux.org>
Cc: "Николай Бурыкин" <burykin@basealt.ru>
Subject: Re: [newbies] [join] Проверка корректности пакетирования
Date: Tue, 16 Feb 2021 18:20:37 +0300
Message-ID: <20210216182037.2be6e6f2675af823ca38ae0e@altlinux.org> (raw)
In-Reply-To: <59565a38-d845-b697-f613-d25ea75c4c41@basealt.ru>

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

Добрый день!

On Mon, 15 Feb 2021 14:05:16 +0300 Николай Бурыкин wrote:
> Добрый день.
> Решил проблемы, мешающие сборке. Поправил заголовочные файлы в исходном 
> коде.
> Все исправления оформил в патч.
> Сейчас наверное нужна только оценка спека, с точки зрения корректности 
> написания.
> В этот раз делал с оглядкой на 
> https://www.altlinux.org/ALT_Packaging_HOWTO, но всё равно мог что-то 
> пропустить.
> Если не будет проблем, тогда потихоньку буду переходить к плановой 
> сборке Fleet.

Речь про https://github.com/burykinne/edbrowse , верно?

1) Поправка по лицензии:
- License: GPL and MPL
+ License: GPL-1.0+

Поясню по чему так. Случай сложный, на самом деле.

Давайте посмотрим файл COPYING:

This program is copyright (C) Karl Dahlke, 2000-2014.
It is made available by the author under the terms of the GNU General Public
License (GPL), as articulated by the Free Software Foundation.
http://www.fsf.org/licensing/licenses/gpl.html
It may be used for any purpose, and redistributed,
provided this copyright notice is included.

This program uses libcurl.so for http/ftp access.
This is released under the Mozilla public license (mpl).
I didn't change any of the source; I merely link to these libraries.
However, if you wish to release a version of edbrowse with these shared
libraries included,
or a statically linked executable, you will need to specify both gpl and mpl.

Первая часть говорит просто GPL без указания версии и даёт ссылку.
Пройдём по ней, пункт 14, параграф 2:

If the Program does not specify a version number of the GNU General Public
License, you may choose any version ever published by the Free Software Foundation.

В Альте следует указывать одну из лицензий из /usr/share/license*.
В данном случае подходит GPL1.0+ — т.е. любая из существующих
версий GPL.

Вторая часть про линковку с libcurl. Во-первых, эта часть применима
только для статической линковки (а у edbrowse динамическая) или при
совместном распространении с libcurl.so (в Вашем пакете её нет, её
исходников тоже нет, используется системная версия). Во-вторых,
у libcurl поменялась лицензия и комментарий автора edbrowse устарел.
Там сейчас MITX:
  $ rpm -qi libcurl | grep License
  License     : MITX
Текст можно посмотреть в /usr/share/license/MITX. С ней можно без
дополнительных ограничений линковать GPL софт.

2) Лучше пользоваться готовыми макросами, поэтому:
- cmake .
+ %cmake_insource

Хотя я бы предпочёл out-of-source build, тогда будет:
%build
%cmake
%cmake_build

%install
%cmakeinstall_std

Обратите внимание, что дополнительные аргументы %cmakeinstall_std
не нужны, т.е spec упрощается.

3) Ещё при таком подходе обнаружились неупакованные файлы:

warning: Installed (but unpackaged) file(s) found:
    /usr/share/doc/edbrowse/sample.ebrc
    /usr/share/doc/edbrowse/sample_fr.ebrc
    /usr/share/doc/edbrowse/sample_it.ebrc
    /usr/share/doc/edbrowse/usersguide.html
    /usr/share/doc/edbrowse/usersguide_fr.html
    /usr/share/man/man1/edbrowse.1.xz

Думаю, что man нужно паковать всегда, html-документацию —
в отдельный подпакет doc, *.ebrc — в examples (или в doc,
если считаете частью документации). Можно ещё заморочится
и разложить fr и it в doc-fr и doc-it (или examples-it);
но это дело вкуса.

Ещё есть проблема, что пакет доки в ставит в /usr/share/doc/edbrowse,
а нужно в /usr/share/doc/edbrowse-3.7.7. Это можно исправить в %prep
через sed примерно так (не проверял):
sed -i "s|/usr/share/doc/edbrowse|/usr/share/doc/edbrowse-%version|" CMakeLists.txt

4) Устанавливать файл COPYING не нужно, т.к. текст лицензии уже есть
в системе и лицензия указана в rpm пакета. Обычно текст лицензий
вместе с пакетами устанавливать не нужно. Исключение — когда лицензия
требует обязательной упаковки или установки своего текста вместе
с пакетом (это не тот случай, но в будущем такое может быть).

Best regards,
Andrew Savchenko

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

  parent reply	other threads:[~2021-02-16 15:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29  2:01       ` Andrey Savchenko
2021-02-08 12:38                   ` Michael Shigorin
2021-02-08 20:26                     ` Andrey Savchenko
2021-02-09  7:27                       ` Michael Shigorin
2021-02-09  9:49                         ` Andrey Savchenko
2021-02-16 15:20                     ` Andrey Savchenko [this message]
2021-02-19 23:32                         ` Andrey Savchenko

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=20210216182037.2be6e6f2675af823ca38ae0e@altlinux.org \
    --to=bircoph@altlinux.org \
    --cc=burykin@basealt.ru \
    --cc=devel-newbies@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

devel@ where you _can_ ask

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-newbies/0 devel-newbies/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-newbies devel-newbies/ http://lore.altlinux.org/devel-newbies \
		devel-newbies@lists.altlinux.org devel-newbies@lists.altlinux.ru devel-newbies@lists.altlinux.com
	public-inbox-index devel-newbies

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-newbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git