From patchwork Fri Jun 19 14:57:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1313019 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=NvQ7NgRA; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49pMP22q6kz9sWp for ; Sat, 20 Jun 2020 00:57:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E896A87AB1; Fri, 19 Jun 2020 14:57:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZVm2Y58Day5c; Fri, 19 Jun 2020 14:57:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A8C1787ADD; Fri, 19 Jun 2020 14:57:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2AC2A1BF9C6 for ; Fri, 19 Jun 2020 14:57:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 27DF188FC1 for ; Fri, 19 Jun 2020 14:57:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dEzO9zpndCIH for ; Fri, 19 Jun 2020 14:57:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 482FE88E88 for ; Fri, 19 Jun 2020 14:57:31 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id d128so9387960wmc.1 for ; Fri, 19 Jun 2020 07:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C/o+pMG4BBWjXWS4mC+gJBoHkKQcs4r9FNxge8ppzgE=; b=NvQ7NgRAnSyYxLOWnaaOJ7QSsGfeWLAN7KzZpv/LyfSf3e2uFzeUycOwrejrhikHbK W4M+0ywhTdrS9pjiylQvLy7vYZnzbknbxLAylwzeXQRA1UUdRVUNwwQrWXsMz9mnflYe GX0cQb4hbtCFn8s583mk13w5YVTk3gOUMGEDw= 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:mime-version:content-transfer-encoding; bh=C/o+pMG4BBWjXWS4mC+gJBoHkKQcs4r9FNxge8ppzgE=; b=KSwlCZOOPeVoMByFDqtYmnuuBIxH0s/IhS3DjQOns0rBHIDSfdWW1w9tzwLQpTX2oG 2SU4TRknSd28Uitg2hISbQJxm8NWAtsRgP4OxFs4nMGoW125h427q152zMn+gW4AwbiZ rUHfBahx6q2bWaEjADRhId29c5DKnLlPRnbNM2V/Eft+G+Vex/HCsWRGNw/Iemj0hl3r CmiNqPo7hQwSjH3uTPRw7q47Abx3XFjTYLOfuNKSDUBPoUN0ktUf+LGHXy/5n1mTw9VO 4AEO69S8bjWVpGGZCjCSrS1b/KEFqWBp80Zm5JVB80yqPKB72jbFVAivj+9NJ4xGlZDo CCGg== X-Gm-Message-State: AOAM533b1IdtU5OljFE5XoEJ2tzi02QoYv+sCpynKIR4m+YGTS3ATg8V QjD5ojoof1P2alXswb942rzQ0k8X099OXw== X-Google-Smtp-Source: ABdhPJz0ZtjZoqpjSAUXeDHldGZImCP1O/DofP5ickDPWJrZ32Y/lKvBGmoNDO1g/C/1JbGOWQnfyA== X-Received: by 2002:a1c:3881:: with SMTP id f123mr4114117wma.178.1592578649290; Fri, 19 Jun 2020 07:57:29 -0700 (PDT) Received: from localhost.localdomain (host194055151123.static.fidoka.tech. [194.55.151.123]) by smtp.gmail.com with ESMTPSA id a16sm7302165wrx.8.2020.06.19.07.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 07:57:28 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 19 Jun 2020 16:57:17 +0200 Message-Id: <20200619145719.2352019-6-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200619145719.2352019-1-angelo@amarulasolutions.com> References: <20200619145719.2352019-1-angelo@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Trimarchi , Angelo Compagnucci Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch is based on patch from the rockchip tree: commit c8a337593660f27379c30248a11bf08dc8712113 Author: Jeffy Chen Date: Tue Nov 13 18:59:43 2018 +0800 package: cups: Add udev rules to assign usb printers' group to lp Change-Id: Ieae17deaa7d3623e1f0e1cc826871f1719d98d88 Signed-off-by: Jeffy Chen Signed-off-by: Michael Trimarchi Signed-off-by: Angelo Compagnucci --- package/cups/70-usb-printers.rules | 4 ++++ package/cups/cups.mk | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 package/cups/70-usb-printers.rules diff --git a/package/cups/70-usb-printers.rules b/package/cups/70-usb-printers.rules new file mode 100644 index 0000000000..537645523d --- /dev/null +++ b/package/cups/70-usb-printers.rules @@ -0,0 +1,4 @@ +# Allow USB printers in the lp group +# Match rules converted from usblp.c driver's usblp_ids +ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", GROUP="lp" +ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0202", GROUP="lp" diff --git a/package/cups/cups.mk b/package/cups/cups.mk index 40fe210c94..617b402969 100644 --- a/package/cups/cups.mk +++ b/package/cups/cups.mk @@ -75,6 +75,15 @@ else CUPS_CONF_OPTS += --disable-avahi endif +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +define CUPS_INSTALL_UDEV_RULES + $(INSTALL) -D -m 0644 package/cups/70-usb-printers.rules \ + $(TARGET_DIR)/lib/udev/rules.d/70-usb-printers.rules +endef + +CUPS_POST_INSTALL_TARGET_HOOKS += CUPS_INSTALL_UDEV_RULES +endif + define CUPS_INSTALL_INIT_SYSV @$(RM) $(TARGET_DIR)/etc/init.d/cups $(INSTALL) -D -m 0755 package/cups/S81cupsd \