From patchwork Sat Dec 31 03:21:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 709895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tr7wR5nwnz9t0m for ; Sat, 31 Dec 2016 14:23:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lUgOOFai"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0723E87CDF; Sat, 31 Dec 2016 03:23:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yVIex27Lz2Gt; Sat, 31 Dec 2016 03:23:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1744987CE0; Sat, 31 Dec 2016 03:23:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E4E671C0388 for ; Sat, 31 Dec 2016 03:23:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E01E687CE0 for ; Sat, 31 Dec 2016 03:23:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kvll74GHlpWL for ; Sat, 31 Dec 2016 03:23:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id 25A3C87CDF for ; Sat, 31 Dec 2016 03:23:47 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id h201so40036027qke.3 for ; Fri, 30 Dec 2016 19:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UER3H1OxV+sRjzSxY/POUYH4CX+voRGfUl0Or3SzPmg=; b=lUgOOFaiHCkhHIy8+4NA3EmScVy/1Hqhtm9zZf7tX0iMQTDakeY1yFE8j4/5x9n/6n aKXBpTetJnho3llCGslCdkTYSijGLbkUVIBxKzWfkXWD3G6qRTwaFHprLvlpSRULBwR+ 0P+/9bLjjg4TytOi1u3695gvTQFjVDe2virr17IyRYLk0jW2rVFUNRc5uVorm5SOiCy+ gnx1qfQ/34XhibxWEOkeWp53+1Qh6+HlK4tQoYj7Zx4fmAfn3PPbUViiYMvx1HBBtEbG L3GRYi/KBQKGLsb3Q3CJ9yoWgDUQoZQzHtkmkYEQ9FsTXONO0QTGF0PPl6tmKwIz+jLl uP3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UER3H1OxV+sRjzSxY/POUYH4CX+voRGfUl0Or3SzPmg=; b=GVZRAqEJF+Jhqg/DE1JFjIej8WsZkf/WQgzLwPbRjg0djyKs4DLk1uoQLjgM0RnUxJ VSaQo1ywD2ze976atWKU+AaNurofM526nX8g1+j42B7Rg5WjfJsVVv5H8+0ozIwhr0bh L/sp3LLHQwEWpviN98iBxtUb/srXoJ5GmNPwbkOGUEEWX3vcTFUSppN1gxpsSTFsze9z 1lPH+3fRp8VtF6hwzuhjQQzKnr6jK9ygYVCt15N+DYD3L6wx9uKxrthv8XHArrzjPlZA /wRkNnkcKNwXwbp7xFiPqg21AKDP279QiTA6IRZxrwAdnHZSKt7rBKPLMXKF3K6fsCv0 GHig== X-Gm-Message-State: AIkVDXJwmZJIK3JV29uS1OmRz+POxWFjl0A8vCM9wq0pSjdjxOxrPNqDhnfR4oOLsMogtA== X-Received: by 10.55.170.140 with SMTP id t134mr46983637qke.53.1483154625742; Fri, 30 Dec 2016 19:23:45 -0800 (PST) Received: from ultri3.home ([177.132.208.130]) by smtp.gmail.com with ESMTPSA id f2sm36469897qtg.22.2016.12.30.19.23.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 19:23:44 -0800 (PST) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Sat, 31 Dec 2016 01:21:02 -0200 Message-Id: <20161231032110.11573-2-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161231032110.11573-1-ricardo.martincoski@gmail.com> References: <20161231032110.11573-1-ricardo.martincoski@gmail.com> Cc: Ricardo Martincoski Subject: [Buildroot] [PATCH 1/9] support/scripts/check-package: example X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Create an example package with many style problems. These files can be used to test the check-package script. Ideally each new warning added to the check script will have a bad style example in these files. Signed-off-by: Ricardo Martincoski --- Notes: There are also bad styles inside these files that currently do not trigger a warning message from the script in this patch series. They provide an insight of what can be tested in the future. .../package/package1/0001-do-something.patch | 24 +++++++++++ .../package/package1/0002-do-something-else.patch | 24 +++++++++++ .../package/package1/Config.in | 42 +++++++++++++++++++ .../package/package1/package1.hash | 8 ++++ .../package/package1/package1.mk | 48 ++++++++++++++++++++++ .../package/package1/wrong-name.patch | 13 ++++++ 6 files changed, 159 insertions(+) create mode 100644 support/scripts/check-package-example/package/package1/0001-do-something.patch create mode 100644 support/scripts/check-package-example/package/package1/0002-do-something-else.patch create mode 100644 support/scripts/check-package-example/package/package1/Config.in create mode 100644 support/scripts/check-package-example/package/package1/package1.hash create mode 100644 support/scripts/check-package-example/package/package1/package1.mk create mode 100644 support/scripts/check-package-example/package/package1/wrong-name.patch diff --git a/support/scripts/check-package-example/package/package1/0001-do-something.patch b/support/scripts/check-package-example/package/package1/0001-do-something.patch new file mode 100644 index 000000000..bcd01dc1a --- /dev/null +++ b/support/scripts/check-package-example/package/package1/0001-do-something.patch @@ -0,0 +1,24 @@ +From 79752a7ce44e60e276fd22031f88c796eeebf69b Mon Sep 17 00:00:00 2001 +From: Ricardo Martincoski +Date: Mon, 5 Dec 2016 23:03:16 -0200 +Subject: [PATCH 25/39] do something + + Signed-off-bye: Ricardo Martincoski +--- + file | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/file b/file +index 8a1218a..8ef9013 100644 +--- a/file ++++ b/file +@@ -1,5 +1,5 @@ + 1 + 2 +-3 ++33 + 4 + 5 +-- +2.11.0 + diff --git a/support/scripts/check-package-example/package/package1/0002-do-something-else.patch b/support/scripts/check-package-example/package/package1/0002-do-something-else.patch new file mode 100644 index 000000000..d95ec4876 --- /dev/null +++ b/support/scripts/check-package-example/package/package1/0002-do-something-else.patch @@ -0,0 +1,24 @@ +From 79752a7ce44e60e276fd22031f88c796eeebf69b Mon Sep 17 00:00:00 2001 +From: Ricardo Martincoski +Date: Mon, 5 Dec 2016 23:03:16 -0200 +Subject: [PATCH] do something else + +Signed-off-by: Ricardo Martincoski +--- + file | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/file b/file +index 8a1218a..8ef9013 100644 +--- a/file ++++ b/file +@@ -1,5 +1,5 @@ + 1 + 2 +-3 ++33 + 4 + 5 +-- +2.11.0 + diff --git a/support/scripts/check-package-example/package/package1/Config.in b/support/scripts/check-package-example/package/package1/Config.in new file mode 100644 index 000000000..8cc47390f --- /dev/null +++ b/support/scripts/check-package-example/package/package1/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_PACKAGE1 + select BR2_PACKAGE_LIBEVENT + bool "pAcKaGe" + depends on BR2_USE_MMU + select BR2_PACKAGE_NCURSES + depends on BR2_USE_WCHAR + help + package1 is a bad stylized package. Its only purpose is to exemplify + common style mistakes + some more help text but no url + +if BR2_PACKAGE_PACKAGE1 + config BR2_PACKAGE_PACKAGE1_OPTION + bool "package1 option" + depends on BR2_USE_MMU + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + This paragraph is properly wrapped. Since a tab counts as 8 + spaces and the help text must be wrapped at column 72, only 62 + characters for the text itself are expect per line. + + + Another paragraph. - But this time we cross the column 72 by 1. + wrong_line_with_single_word + http://www.example.com/ urls do not have spaces and this line is too long. + + http://www.example.com/folder/even_long_url_should_not_be_wrapped + +config BR2_PACKAGE_PACKAGE1_OPTION2 + string "option2" + default "aarch64-unknown-linux-gnu" \ + if BR2_aarch64 || BR2_aarch64_eb + +config BR2_PACKAGE_PACKAGE1_OPTION3 + string "option4" + default "value" \ + if BR2_aarch64 +endif + +comment "package1 needs a toolchain w/ locale" + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR diff --git a/support/scripts/check-package-example/package/package1/package1.hash b/support/scripts/check-package-example/package/package1/package1.hash new file mode 100644 index 000000000..78559bd4a --- /dev/null +++ b/support/scripts/check-package-example/package/package1/package1.hash @@ -0,0 +1,8 @@ +# some comment: +sha256 1234567890123456789012345678901234567890123456789012345678901234 package1-1.0.tar.gz +sha256 123456789 package1-1.0.tar.gz +crc16 123456789 package1-1.0.tar.gz +sha256 12345678901234567890123456789012345678901234567890123456789012345 dl/package1-1.0.tar.gz +sha256 1234567890123456789012345678901234567890123456789012345678901234 + + diff --git a/support/scripts/check-package-example/package/package1/package1.mk b/support/scripts/check-package-example/package/package1/package1.mk new file mode 100644 index 000000000..bbeb34b69 --- /dev/null +++ b/support/scripts/check-package-example/package/package1/package1.mk @@ -0,0 +1,48 @@ +######################################## +# +# wrong name +# +######################################################################################################################## +PACKAGE1_VERSION=1.0 +PACKAGE1_SITE = https://localhost +PACKAGE1_LICENSE = GPL +PACKAGE1_LICENSE_FILE = README +PACKAGE1_LICENSE_FILES += COPYING +# now some unneeded flags because they are the default value +PACKAGE1_INSTALL_STAGING=NO +PACKAGE1_INSTALL_TARGET = YES +PACKAGE1_INSTALL_IMAGES = NO + PACKAGE1_INSTALL_REDISTRIBUTE = YES +PACKAGE1_AUTORECONF = NO +PACKAGE1_LIBTOOL_PATCH = YES + # but non-default conditionally overridden by default is allowed +ifeq ($(BR2_STATIC_LIBS),y) + PACKAGE1_INSTALL_STAGING = NO +endif + + +PACKAGE1_DEPENDENCIES = depend1 depend2 \ + depend3 +PACKAGE1_DEPENDENCIES += depend5 \ + depend4 \ + +PACKAGE1_DEPENDENCIES = overwriting +PACKAGE1_DEEEEEEEEEES = typo +LINUX_DEPENDENCIES = messing with others +PACKACE1_DEPENDENCIES = typo + +define PACKAGE1_INSTALL_SOMETHING + mkdir -p $(TARGET_DIR)/var/lib + $(INSTALL) -m 0755 -D file1 \ + $(TARGET_DIR)/var/lib/file + $(INSTALL) -m 0755 -D file2 \ + $(TARGET_DIR)/etc/file +endef + +define PACKAGE1_INSTALL_TARGET_CMDS + $(PACKAGE1_INSTALL_SOMETHING) + $(PACKAGE1_INSTALL_SOMETHING_ELSE) +endef + +$(eval $(autotools-package)) + diff --git a/support/scripts/check-package-example/package/package1/wrong-name.patch b/support/scripts/check-package-example/package/package1/wrong-name.patch new file mode 100644 index 000000000..d4455338e --- /dev/null +++ b/support/scripts/check-package-example/package/package1/wrong-name.patch @@ -0,0 +1,13 @@ +no sob +--- +diff -purN package.orig/file package/file +--- package.orig/file 2000-01-01 22:07:43.275324499 -0300 ++++ package/file 2016-01-01 22:08:16.171453283 -0300 +@@ -268,7 +268,6 @@ line + #include + #include + #include +-#include + #include + #include + #include \ No newline at end of file