From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 15 Nov 2018 16:17:58 +0300 From: "Dmitry V. Levin" To: Alexey Gladkov Message-ID: <20181115131758.GA1966@altlinux.org> References: <20181108214121.348D084402E8@gitery.altlinux.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <20181108214121.348D084402E8@gitery.altlinux.org> Cc: ALT Devel discussion list Subject: Re: [devel] [SCM] packages/sisyphus_check: heads/master X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2018 13:17:58 -0000 Archived-At: List-Archive: List-Post: --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 08, 2018 at 09:41:21PM +0000, Alexey Gladkov wrote: > Update of /people/legion/packages/sisyphus_check.git >=20 > Changes statistics since `0.8.30-alt1-39-g331a919' follows: > .../sisyphus_check.d/150-check-intersects | 23 ++++++++++++++++= +++++- > 1 file changed, 22 insertions(+), 1 deletion(-) >=20 > Changelog since `0.8.30-alt1-39-g331a919' follows: > commit 8d6e61ac4ee0a31c1f25ba0e432193e1b83f155f > Author: Alexey Gladkov > Date: Fri Nov 9 00:40:47 2018 +0300 >=20 > Forbid intersections with common-licenses > =20 > Signed-off-by: Alexey Gladkov >=20 > Full diff since `0.8.30-alt1-39-g331a919' follows: > diff --git a/sisyphus_check/sisyphus_check.d/150-check-intersects b/sisyp= hus_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 > } > =20 > +# check files intersections with common-licenses > +check_intersects_common_licenses() > +{ > + local f=3D"$1" && shift || return 1 > + > + # Do not check common-licenses package. > + [ "$rpm_name" !=3D 'common-licenses' ] || return 0 > + > + local rc=3D0 > + local text > + > + text=3D"$(printf %s\\n "$rpm_filenames" |LC_LANG=3DC grep -e '^/usr/sha= re/license/' -e '^/usr/share/license-exception/')" ||: =F0=C5=D2=C5=D3=C5=DE=C5=CE=C9=D1 =D0=CF =D3=C1=CD=C9=CD =CB=C1=D4=C1=CC=CF= =C7=C1=CD =D4=CF=D6=C5, =CE=C1=D7=C5=D2=CE=CF=C5, =CE=C1=C4=CF =D7=D9=D1=D7= =CC=D1=D4=D8; =CE=C1=D0=D2=C9=CD=C5=D2, =D4=C1=CB: grep -Ex '/usr/share/license(-exception)?(/.*)?' > + > + if [ -n "$text" ]; then > + FileError "common-license intersections: $(oneliner "$text")" "$f" > + rc=3D1 > + 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 --=20 ldv --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJb7XIGAAoJEAVFT+BVnCUIbpYP/3+prp7OOlfvLvfeGa/BM/dO x4CQz0ZLhb6Fk9rvCHTDIIrEuv7OOf4h+aPt80Ahd0qgHv3/i7BlfkdD3Is8mAx2 626gFz3w7mE3jnq3KWEx96TZ29vislJMEq7yy/T+2GjDHr8nlmZANbNUs6Pn7l+M L8ABszEGVgbICqoBmKyHq9zUkD7iCma4/bHOYcwMhd9VcbF+FvqLZYJ+eNLugMAM 72fWUqVnJ1bybodtKL8FYV2StbWRkhLSfrYpW34qHePSI05i3K+G7oESnwf9o3al xsnqoLQkmPEaBDIv8IKCy/ihRB2912y1BTsS1qMHDbCdERDMoBiQ7Nk/bpphpMRd 2iXetTcKVSGPAkrrCOSk0ZA/w68LU/uXgb6ll0RksOggs6AblgHB5acbBi5kKqU0 mP/ZFd7XYfabsF+UGm5/9vEFzDAWZx8iW+gviDC+oLo5WDuNZmxw5ObUkySgpP6J EbbjDLuglkC42OgZ+KLpIkf0gHyNAw14LRbqi6twgtf2AXGtNdMit2T3Foeld0/g j2mTr7P4Bd1VEzBKTPt/+zs5OFaKFc0dP/BSPZNGE4Xq/MZ+5w2MZpQjMspKBqgn c4sOjSwvlhKeJCEu08epjEIeTHV2GAe1wsHczRrrkHQb6K7YGjXqAN7XtWBHyqD5 gsghVC6wWHGmSP41mP1v =fbn5 -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--