From patchwork Wed Jun 24 20:43:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1316574 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.133; helo=hemlock.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=DgYbWWDp; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49sZrB4jsxz9sSn for ; Thu, 25 Jun 2020 06:44:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8DE4C88418; Wed, 24 Jun 2020 20:44:07 +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 qGCDZgF41DkN; Wed, 24 Jun 2020 20:44:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3D71488415; Wed, 24 Jun 2020 20:44:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6BF371BF2AA for ; Wed, 24 Jun 2020 20:44:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 68DE5203EA for ; Wed, 24 Jun 2020 20:44:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fdpdHzQdopzn for ; Wed, 24 Jun 2020 20:43:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by silver.osuosl.org (Postfix) with ESMTPS id DDCE52039C for ; Wed, 24 Jun 2020 20:43:58 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id z13so3603716wrw.5 for ; Wed, 24 Jun 2020 13:43:58 -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=QyUFJx8qx3KAYDvpm7MVXSsCFW7yAkiNkS3bJS1UBEs=; b=DgYbWWDpl6qyv6Ue4nqoaM3TtdMuKmGAq1q8+ySbIFZKnrDzURqjb4uKbwQ8XRmJ1r SImxIyW2Z+crNGurUliCmVoSYluTtocZc+6trPWY7mcjJVl+uxJCFPH5rtlx1gLboG3+ l47NfN7TQ3SbA+5c/we/x4du5c0u8S4BDDMvg= 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=QyUFJx8qx3KAYDvpm7MVXSsCFW7yAkiNkS3bJS1UBEs=; b=R9EZtVu7LDjfm0+gkNyhq+J8x/6HPb2La5ai5Ov2MLRj+OMjJ9wW+w8n2jzzKEzSJC A8XirECQ4vOzgQZtVsBLA6kVlxBM9ho87EKoA3f1ewECcLitewMAZ/Y1isMIn1s/pDBE xGAmIPamRl2z8XY7rtLHq77Fi3PyT2zr/5m8Bh+hlFbodLuvvjDQRsyycp1wgAEK0o2i CVRDNd1z13PF7DtH1Yi156NSOOPFVUhq3s9ABnSCyhSt29j+e5PDbMqZLPZ28+TTZbry JfhQu+y/Yy8ZdLhSIgb2+7DMScdPNDIw2+Xbl4iE1HU+Hse0qYyBXLkrIXEzifvjLgka FKbg== X-Gm-Message-State: AOAM531tOwnCHX/86I/1eWvGfsFYXUDWyJCIyNd5IIlSLrzZu3Irb57c E1FUhlfxJQePJ7jg4+Ste2ThbZDhGXNyaA== X-Google-Smtp-Source: ABdhPJwzvv3afTkrQHMXdl1rqjW2B/y7Q0KZ5tROcksm/N2dbfNfyv4HeAupEX81y6puv5wZo0q11g== X-Received: by 2002:adf:f751:: with SMTP id z17mr23558462wrp.114.1593031436817; Wed, 24 Jun 2020 13:43:56 -0700 (PDT) Received: from localhost.localdomain (host194055151123.static.fidoka.tech. [194.55.151.123]) by smtp.gmail.com with ESMTPSA id 11sm9643996wmg.41.2020.06.24.13.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 13:43:56 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 24 Jun 2020 22:43:41 +0200 Message-Id: <20200624204347.797088-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200624204347.797088-1-angelo@amarulasolutions.com> References: <20200624204347.797088-1-angelo@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service 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: Angelo Compagnucci Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" cups-browsed service is compiled and installed by the package, but the corresponding services file were not installed for systemv and systemd. Signed-off-by: Angelo Compagnucci --- package/cups-filters/S82cups-browsed | 48 ++++++++++++++++++++++++++++ package/cups-filters/cups-filters.mk | 13 +++++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 package/cups-filters/S82cups-browsed diff --git a/package/cups-filters/S82cups-browsed b/package/cups-filters/S82cups-browsed new file mode 100644 index 0000000000..08909c7f98 --- /dev/null +++ b/package/cups-filters/S82cups-browsed @@ -0,0 +1,48 @@ +#!/bin/sh + +DAEMON="cups-browsed" +PIDFILE="/var/run/$DAEMON.pid" + +start() { + printf 'Starting %s: ' "$DAEMON" + # shellcheck disable=SC2086 # we need the word splitting + start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \ + -- -c /etc/cups/cups-browsed.conf + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + # Restart, since there is no true "reload" feature. + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/cups-filters/cups-filters.mk b/package/cups-filters/cups-filters.mk index 1f17018bc5..0a2622b87b 100644 --- a/package/cups-filters/cups-filters.mk +++ b/package/cups-filters/cups-filters.mk @@ -19,7 +19,8 @@ CUPS_FILTERS_CONF_OPTS = \ --with-cups-config=$(STAGING_DIR)/usr/bin/cups-config \ --with-sysroot=$(STAGING_DIR) \ --with-pdftops=pdftops \ - --with-jpeg + --with-jpeg \ + --with-rcdir=no ifeq ($(BR2_PACKAGE_LIBPNG),y) CUPS_FILTERS_CONF_OPTS += --with-png @@ -71,4 +72,14 @@ else CUPS_FILTERS_CONF_OPTS += --disable-poppler endif +define CUPS_FILTERS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/cups-filters/S82cups-browsed \ + $(TARGET_DIR)/etc/init.d/S82cups-browsed +endef + +define CUPS_FILTERS_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0755 $(@D)/utils/cups-browsed.service \ + $(TARGET_DIR)/usr/lib/systemd/system/cups-browsed.service +endef + $(eval $(autotools-package))