From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3E4AC1396D0 for ; Thu, 10 Aug 2017 14:31:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E9911FC06B; Thu, 10 Aug 2017 14:30:54 +0000 (UTC) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF0E51FC051 for ; Thu, 10 Aug 2017 14:30:53 +0000 (UTC) Received: by mail-wm0-x236.google.com with SMTP id t201so21264093wmt.1 for ; Thu, 10 Aug 2017 07:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=n/kLFFz0KfcV/ij+gsLUJdvoUVNRyQu6j0NK0A0kwZM=; b=T08oZyDQV3G4XnzKU1cajvsBOhtkswogx/vV06Z+kvo7kxUQo+3GCd8oxpvaXOEhWm NpKQequJ6fwSCysQu/ZPQzgbde1XbpUfX7BuHWSc1uLJkvFULgtCYYOMdFjiazzCG7Ha apyN9eSHpd98m4/Wfpjt5PWoan26K/Zi/IDphGMMb5ztqMbR/2S2+xJpQ2d8l5PwZ2XW 9Vhn1zX2aHkGMN0BzkA+XUstd/o3UAfyRmvqC/YLGDHRGviCbUXaedYqg/KnCOoWrYut Zqt2GTigzXWKt5bgImbp9Pxc5bg0dlm6jZ2t4pNefAiIVegl1BzgOCLLEzdPcQkCYrnx udiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=n/kLFFz0KfcV/ij+gsLUJdvoUVNRyQu6j0NK0A0kwZM=; b=TNcKCKVT9UuRZ3A7MYnUPqZrQZAbPygstz3QX1XPLO0fo/eO6q+EG7h4A9hcImvEOZ VXehEiWFJaB5prm0U5dTzC66BOkweeLPpBFOUSJRR+zC/CYg5WqzycUu/gP4a6j3lBBf VWKMPIN6vx/iG5lHxN2wc3Y+04ERhquLcrKlrq8PEIEG8MctCh7XFDH4YrMtT0Cs7RDM f5ZZdq9sPmciNGJuxTyzWto8IfsYoieuCgrjAGjvJSBViAIWU+QI5c2Jfs86PdG1BLYL FlhYtGcy5LxChzC3Qbr4bh40Z4iEP9bMUIS8/c+gFrQZ8It9WPugNM0R5Nuk8BWklTJx WjGQ== X-Gm-Message-State: AHYfb5gicSqWGnY9wHNdJVIl5yP0Wwy+tZeXf9jnksRcFLyN5W0B6w7s TrCs1FZShnoNxxqY X-Received: by 10.28.234.145 with SMTP id g17mr7225225wmi.144.1502375452181; Thu, 10 Aug 2017 07:30:52 -0700 (PDT) Received: from asterix.xonet.at ([185.148.239.249]) by smtp.gmail.com with ESMTPSA id n22sm4483191wra.30.2017.08.10.07.30.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Aug 2017 07:30:51 -0700 (PDT) Date: Thu, 10 Aug 2017 16:30:49 +0200 From: Michael Mair-Keimberger To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Gentoo QA Help Message-ID: <20170810143048.GA19313@asterix.xonet.at> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) X-Archives-Salt: e3c2a35e-013d-4893-8b76-5918c331f199 X-Archives-Hash: 3002583251d7c6bb740d7a6f00d3333b --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Gentoo Team, As some of you may noticed i started to clean up some old patches in the gentoo portage tree. I did so already a while ago, and like before I'm using a small script in order to identify unused patches. I few days ago i started to hack again on that script and thought about to make it easier to use the output. The result is following: http://gentoo.levelnine.at This is my homepage, were you can see the output of my patchtest and other scripts (gonna explain below). The scripts gonna run once a day and sort the findings by package and maintainer. The scripts itself are hosted on github, you can find them on: https://github.com/mm1ke/gentoo-scripts The scripts aren't very polish and probably lacks a lot of comments and cleanups. However, for now they working as expected and do help me to find a lot of unused patches. The scripts: As mentioned, the homepage actually has 3 scripts running once a day. I gonna give you a short description of what every script is doing and what are its limitations. patchtest: This is my oldest script, and my main source of lists with unused patches. I won't go into detail how it exactly works, but it basically checks every package if there is a "files" dir, creates a list of pachtes/files included in this dir and greps every ebuild if it can find any of the patches or files. As you know this isn't very easy as patches aren't usually written with their filename in the ebuild, so it has some limitations, which are: * asterisk: patching using an asterisk to get the files to patch (like epatch packagename-vers-patch*.patch) will give false positives. * special variables (like ${MY_PN}) when scripts use such variables in patchnames it will give false positives. * patching like epatch patchname-vers-patch{1,2,3,4}.patch will give "some" false positives. Just some because I've already added a feature to identify such naming, but it's still not 100% perfect. * eclasses which uses files in FILESDIR. Not many do that, but it will give still a false positive. I probably forget something, but apart from those limitations it works quite well. Just have a look at the results. patchcheck: This is a spinoff of patchtest. The idea was to identify packages who have a "files" directory, but no ebuild has the keywords "FILESDIR,.patch,.diff" and a few eclasses in it. The result is much smaller then with patchtest, but in this case the results are more useful as there are just a few false-positives. wwwtest: This is a new scirpt, which, as the name might suggest, checks the homepages of every ebuild. Apart from sorting the output by package and maintainer it also creates lists by httpcode. That way it's quite easy to check which homepage aren't available anymore (just look at the=20 404.txt file). The other sortings however doesn't include "good" http codes, which are for now: 200,302,307,400,503 (this can be changed anytime) Also links to ftp sites aren't included and are in a separate file (FTP.txt). Furthermore, there is another file called VAR.txt. This one includes packages who use variables in the homepage fild (which i really don't like). I think i gonna update my script someday to replace the vars and be able to check them, however special vars like ${MY_PN} gonna be still a problem... The 000.txt file contains usually homepages who timed out. Usually i try 10 seconds to get an httpcode before giving up. Comments, suggestions and even patches are welcomed. :) I hope someone can use these findings. Kind regards, Michael Mair-Keimberger --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEziMvKnVM8MvqPmO8SV7cZr5DswMFAlmMbhcACgkQSV7cZr5D swONKw/+KXxr8587XcYIKfAAyLt0+nkOgc4u6bnkD3fkiq8mmErmxWqqcYkqHNeA jFVJDbhW5HHyQv5kKZsd2ISH7O8MbpzR4QYWKXQ8j6VSuRgSM6XaVvgnK6NI4/X6 rPe+jmkztB+f/8FQ6XU4dBQ9gK318/LHiNc7rmjmekXDfFO0lWZAaXKPLhrltlXK Umgg48JqbPal2ttbaNmVIyib3HAoyl6I3QUwG+u4Lxgn6GuT+2m/ikZ+hWYdUiiu XurDZShrQUwtwHM8VxDqGWTr44ZicIMbWBC4ZsRS+YjKy8cqQ2TEXVkMPk8/3HTe S0OIJfuguPEszsyMPAAAWYKE+e8fyL9rv8CtowuQfev8C2b09TaArpvPhYphARiG P5YjWtEC3o/sKWggVF2T0DSLC6XlRoW8cqCwbRZhPTUIxv19vRM/s5BLFgrdxShk 9Le4vizQdk3Nrav1LlDk38Un7cYFGgYau1AYtFStr7Hq9VShm2yQgNo4SRzIppTk NQIinsQb1to1/rPhdQT5ObxaFVbSdEMQbNEk8kM/izws4Z3O4lHXYCaliiNN1Eee 4/F5gYUPj/bNpf1SvJ9f+8+Lr+LBWg8zhi3yS5ZjBCI8ge84Qsnle6r200UDdCXy 0D56GFF0w8iz53TiG+D7XCz8/tqJTZyC+wYQ1HjTAFfxirSQiQ4= =Hpam -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3--