ALT Linux Team development discussions
 help / color / mirror / Atom feed
* Re: [devel] [SCM] packages/sisyphus_check: heads/master
  @ 2018-11-15 13:17 ` Dmitry V. Levin
  2018-11-15 13:54   ` Alexey Gladkov
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry V. Levin @ 2018-11-15 13:17 UTC (permalink / raw)
  To: Alexey Gladkov; +Cc: ALT Devel discussion list

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

On Thu, Nov 08, 2018 at 09:41:21PM +0000, Alexey Gladkov wrote:
> Update of /people/legion/packages/sisyphus_check.git
> 
> Changes statistics since `0.8.30-alt1-39-g331a919' follows:
>  .../sisyphus_check.d/150-check-intersects          | 23 +++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> Changelog since `0.8.30-alt1-39-g331a919' follows:
> commit 8d6e61ac4ee0a31c1f25ba0e432193e1b83f155f
> Author: Alexey Gladkov <legion@altlinux.org>
> Date:   Fri Nov 9 00:40:47 2018 +0300
> 
>     Forbid intersections with common-licenses
>     
>     Signed-off-by: Alexey Gladkov <legion@altlinux.org>
> 
> Full diff since `0.8.30-alt1-39-g331a919' follows:
> diff --git a/sisyphus_check/sisyphus_check.d/150-check-intersects b/sisyphus_check/sisyphus_check.d/150-check-intersects
> index ea148e9..5d65217 100644
> --- a/sisyphus_check/sisyphus_check.d/150-check-intersects
> +++ b/sisyphus_check/sisyphus_check.d/150-check-intersects
> @@ -27,8 +27,29 @@ check_intersects()
>  	return $rc
>  }
>  
> +# check files intersections with common-licenses
> +check_intersects_common_licenses()
> +{
> +	local f="$1" && shift || return 1
> +
> +	# Do not check common-licenses package.
> +	[ "$rpm_name" != 'common-licenses' ] || return 0
> +
> +	local rc=0
> +	local text
> +
> +	text="$(printf %s\\n "$rpm_filenames" |LC_LANG=C grep -e '^/usr/share/license/' -e '^/usr/share/license-exception/')" ||:

Пересечения по самим каталогам тоже, наверное, надо выявлять;
например, так:

grep -Ex '/usr/share/license(-exception)?(/.*)?'

> +
> +	if [ -n "$text" ]; then
> +		FileError "common-license intersections: $(oneliner "$text")" "$f"
> +		rc=1
> +	fi
> +
> +	return $rc
> +}
> +
>  run_check() {
> -	if ! check_intersects "$1"; then
> +	if ! check_intersects "$1" || ! check_intersects_common_licenses "$1"; then
>  		CheckError 'intersections with system packages'
>  		return 1
>  	fi

-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [devel] [SCM] packages/sisyphus_check: heads/master
  2018-11-15 13:17 ` [devel] [SCM] packages/sisyphus_check: heads/master Dmitry V. Levin
@ 2018-11-15 13:54   ` Alexey Gladkov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Gladkov @ 2018-11-15 13:54 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: ALT Devel discussion list

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

On Thu, Nov 15, 2018 at 04:17:58PM +0300, Dmitry V. Levin wrote:
> > +	text="$(printf %s\\n "$rpm_filenames" |LC_LANG=C grep -e '^/usr/share/license/' -e '^/usr/share/license-exception/')" ||:
> 
> Пересечения по самим каталогам тоже, наверное, надо выявлять;
> например, так:
> 
> grep -Ex '/usr/share/license(-exception)?(/.*)?'

Угу.

Кстати, эта моя новая проверка не просто так взялась. У нас есть пакеты,
которые в /usr/share/license/ кладут файлы.

-- 
Rgrds, legion


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-15 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 13:17 ` [devel] [SCM] packages/sisyphus_check: heads/master Dmitry V. Levin
2018-11-15 13:54   ` Alexey Gladkov

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