Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New Package: Calamares-3.2.44.2
@ 2021-10-04  4:09 Twilighttony
  2021-10-04  4:10 ` Twilighttony
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-04  4:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is a new pull request by Twilighttony against master on the void-packages repository

https://github.com/Twilighttony/void-packages calamares
https://github.com/void-linux/void-packages/pull/33310

New Package: Calamares-3.2.44.2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/33310.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-calamares-33310.patch --]
[-- Type: text/x-diff, Size: 12657 bytes --]

From cc4ea0b8a3b637c95b9fff2fd4cb05119fd691bb Mon Sep 17 00:00:00 2001
From: Twilighttony <starrbeartony14@zoho.com>
Date: Thu, 30 Sep 2021 22:03:01 -0400
Subject: [PATCH] New Package: Calamares-3.2.44.2

---
 .../files/49-nopasswd-calamares.rules         |   8 +
 .../calamares/patches/services-runit.patch    | 227 ++++++++++++++++++
 srcpkgs/calamares/template                    |  39 +++
 3 files changed, 274 insertions(+)
 create mode 100644 srcpkgs/calamares/files/49-nopasswd-calamares.rules
 create mode 100644 srcpkgs/calamares/patches/services-runit.patch
 create mode 100644 srcpkgs/calamares/template

diff --git a/srcpkgs/calamares/files/49-nopasswd-calamares.rules b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
new file mode 100644
index 000000000000..c152890aabd7
--- /dev/null
+++ b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
@@ -0,0 +1,8 @@
+/* Allow Calamares to be started without password authentication
+ */
+polkit.addRule(function(action, subject) {
+    if ((action.id == "com.github.calamares.calamares.pkexec.run"))
+    {
+        return polkit.Result.YES;
+    }
+});
diff --git a/srcpkgs/calamares/patches/services-runit.patch b/srcpkgs/calamares/patches/services-runit.patch
new file mode 100644
index 000000000000..158296115783
--- /dev/null
+++ b/srcpkgs/calamares/patches/services-runit.patch
@@ -0,0 +1,227 @@
+From 1eb51f4ec5f4f3c601d0100bba01b836b67e649d Mon Sep 17 00:00:00 2001
+From: artoo <artoo@artixlinux.org>
+Date: Wed, 9 Dec 2020 00:16:52 +0100
+Subject: [PATCH] add services-runit
+
+---
+ src/modules/services-runit/main.py            | 144 ++++++++++++++++++
+ src/modules/services-runit/module.desc        |   5 +
+ .../services-runit/services-runit.conf        |  44 ++++++
+ 3 files changed, 193 insertions(+)
+ create mode 100644 src/modules/services-runit/main.py
+ create mode 100644 src/modules/services-runit/module.desc
+ create mode 100644 src/modules/services-runit/services-runit.conf
+
+diff --git a/src/modules/services-runit/main.py b/src/modules/services-runit/main.py
+new file mode 100644
+index 000000000..8b616191d
+--- /dev/null
++++ b/src/modules/services-runit/main.py
+@@ -0,0 +1,144 @@
++#!/usr/bin/env python3
++# -*- coding: utf-8 -*-
++#
++# === This file is part of Calamares - <https://github.com/calamares> ===
++#
++#   Copyright 2018-2019, Adriaan de Groot <groot@kde.org>
++#   Copyright 2019, Artoo <artoo@artixlinux.org>
++#
++#   Calamares is free software: you can redistribute it and/or modify
++#   it under the terms of the GNU General Public License as published by
++#   the Free Software Foundation, either version 3 of the License, or
++#   (at your option) any later version.
++#
++#   Calamares is distributed in the hope that it will be useful,
++#   but WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++#   GNU General Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License
++#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
++
++import libcalamares
++
++from libcalamares.utils import target_env_call, warning
++from os.path import exists, join
++
++
++import gettext
++_ = gettext.translation("calamares-python",
++                        localedir=libcalamares.utils.gettext_path(),
++                        languages=libcalamares.utils.gettext_languages(),
++                        fallback=True).gettext
++
++
++def pretty_name():
++    return _("Configure Runit services")
++
++
++class RunitController:
++    """
++    This is the runit service controller.
++    All of its state comes from global storage and the job
++    configuration at initialization time.
++    """
++
++    def __init__(self):
++        self.root = libcalamares.globalstorage.value('rootMountPoint')
++
++        # Translate the entries in the config to the actions passed to sv-helper
++        self.services = dict()
++        self.services["enable"] = libcalamares.job.configuration.get('services', [])
++        self.services["disable"] = libcalamares.job.configuration.get('disable', [])
++
++        self.svDir = libcalamares.job.configuration['svDir']
++        self.runsvDir = libcalamares.job.configuration['runsvDir']
++
++
++    def make_failure_description(self, state, name, runlevel):
++        """
++        Returns a generic "could not <foo>" failure message, specialized
++        for the action @p state and the specific service @p name in @p runlevel.
++        """
++        if state == "enable":
++            description = _("Cannot enable service {name!s} to run-level {level!s}.")
++        elif state == "disable":
++            description = _("Cannot disable service {name!s} from run-level {level!s}.")
++        else:
++            description = _("Unknown service-action <code>{arg!s}</code> for service {name!s} in run-level {level!s}.")
++
++        return description.format(arg=state, name=name, level=runlevel)
++
++
++    def update(self, state):
++        """
++        Call sv-helper for each service listed
++        in services for the given @p state.
++        """
++
++        for svc in self.services.get(state, []):
++            if isinstance(svc, str):
++                name = svc
++                runlevel = "default"
++                mandatory = False
++            else:
++                name = svc["name"]
++                runlevel = svc.get("runlevel", "default")
++                mandatory = svc.get("mandatory", False)
++
++            service_path = self.root + self.svDir + "/" + name
++            runlevel_path = self.root + self.runsvDir + "/" + runlevel
++            src = self.svDir + "/" + name
++            dest = self.runsvDir + "/" + runlevel + "/"
++
++            if state == 'enable':
++                cmd = ["ln", "-sv", src, dest]
++            elif state == 'disable':
++                cmd = ["rm", "-rv", dest]
++
++            if exists(service_path):
++                if exists(runlevel_path):
++                    ec = target_env_call(cmd)
++                    if ec != 0:
++                        warning("Cannot {} service {} to {}".format(state, name, runlevel))
++                        warning("{} returned error code {!s}".format(cmd, ec))
++                        if mandatory:
++                            title = _("Cannot modify service")
++                            diagnostic = _("<code>cmd {arg!s}</code> call in chroot returned error code {num!s}.").format(arg=state, num=ec)
++                            return (title,
++                                    self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                    )
++                else:
++                    warning("Target runlevel {} does not exist for {}.".format(runlevel, name))
++                    if mandatory:
++                        title = _("Target runlevel does not exist")
++                        diagnostic = _("The path for runlevel {level!s} is <code>{path!s}</code>, which does not exist.").format(level=runlevel, path=runlevel_path)
++
++                        return (title,
++                                self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                )
++            else:
++                warning("Target service {} does not exist in {}.".format(name, self.svDir))
++                if mandatory:
++                    title = _("Target service does not exist")
++                    diagnostic = _("The path for service {name!s} is <code>{path!s}</code>, which does not exist.").format(name=name, path=service_path)
++                    return (title,
++                            self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                            )
++
++
++    def run(self):
++        """Run the controller
++        """
++
++        for state in ("enable", "disable"):
++            r = self.update(state)
++            if r is not None:
++                return r
++
++def run():
++    """
++    Setup services
++    """
++
++    return RunitController().run()
+diff --git a/src/modules/services-runit/module.desc b/src/modules/services-runit/module.desc
+new file mode 100644
+index 000000000..29737c13e
+--- /dev/null
++++ b/src/modules/services-runit/module.desc
+@@ -0,0 +1,5 @@
++---
++type:       "job"
++name:       "services-runit"
++interface:  "python"
++script:     "main.py"
+diff --git a/src/modules/services-runit/services-runit.conf b/src/modules/services-runit/services-runit.conf
+new file mode 100644
+index 000000000..04476b107
+--- /dev/null
++++ b/src/modules/services-runit/services-runit.conf
+@@ -0,0 +1,44 @@
++# runit services module to modify service runlevels via symlinks in the chroot
++#
++# Services can be added (to any runlevel, or multiple runlevels) or deleted.
++# Handle disable with care and only use it if absolutely necessary.
++#
++# if a service is listed in the conf but is not present/detected on the target system,
++# or a runlevel does not exist, it will be ignored and skipped; a warning is logged.
++#
++---
++# svDir: holds the runit service directory location
++svDir: /etc/runit/sv
++
++# runsvDir: holds the runlevels directory location
++runsvDir: /etc/runit/runsvdir
++
++# services: a list of entries to **enable**
++# disable: a list of entries to **disable**
++#
++# Each entry has three fields:
++#   - name: the service name
++#   - (optional) runlevel: can hold any runlevel present on the target
++#     system; if no runlevel is provided, "default" is assumed.
++#   - (optional) mandatory: if set to true, a failure to modify
++#     the service will result in installation failure, rather than just
++#     a warning. The default is false.
++#
++# an entry may also be a single string, which is interpreted
++# as the name field (runlevel "default" is assumed then, and not-mandatory).
++#
++# # Example services and disable settings:
++# # - add foo1 to default, but it must succeed
++# # - add foo2 to nonetwork
++# # - remove foo3 from default
++# # - remove foo4 from default
++# services:
++#     - name: foo1
++#       mandatory: true
++#     - name: foo2
++#       runlevel: nonetwork
++# disable:
++#     - name: foo3
++#     - foo4
++services: []
++disable: []
+-- 
+2.29.2
diff --git a/srcpkgs/calamares/template b/srcpkgs/calamares/template
new file mode 100644
index 000000000000..a842561a9b13
--- /dev/null
+++ b/srcpkgs/calamares/template
@@ -0,0 +1,39 @@
+# Template file for 'calamares'
+pkgname=calamares
+version=3.2.44.2
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release
+                -DCMAKE_INSTALL_PREFIX=/usr
+                -DCMAKE_INSTALL_LIBDIR=lib
+                -DWITH_PYTHONQT:BOOL=ON
+                -DINSTALL_CONFIG:BOOL=ON
+                -DINSTALL_POLKIT:BOOL=ON
+                -DBoost_NO_BOOST_CMAKE=ON
+                -DSKIP_MODULES='webview interactiveterminal services-systemd dummyprocess dummypython dummycpp dummypythonqt'"
+hostmakedepends="extra-cmake-modules boost-python3-1.72 qt5-devel python3-devel kpmcore-devel
+                gettext ckbcomp kcoreaddons kdelibs4support qt5-svg-devel yaml-cpp-devel
+                boost-python3-1.72 python3-QtPy pkg-config libpwquality qt5-webengine
+                AppStream-qt python3-yaml python3-jsonschema"
+makedepends="python3-devel python3-jsonschema python3-yaml boost-devel extra-cmake-modules
+            qt5-tools qt5-translations git boost boost-python3-1.72 python3-QtPy pkg-config
+            libpwquality qt5-webengine kde5 AppStream-qt plasma-framework-devel"
+depends="kconfig kcoreaddons kiconthemes ki18n kio ksolid yaml-cpp kpmcore boost ckbcomp
+        hardinfo qt5-svg polkit-qt5 gtk-update-icon-cache plasma-framework qt5-xmlpatterns
+        squashfs-tools libpwquality AppStream-qt icu"
+short_desc="Distribution-independent installer framework"
+maintainer="Twilighttony <starrbeartony14@zoho.com>"
+license="GPL-3.0-or-later"
+homepage="https://calamares.io"
+distfiles="https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${version}.tar.gz"
+checksum=f8ac63bcc94cce265bf8c300c47752d17c466d096198bb08745aa16938a6548d
+
+pre_configure() {
+    vsed -i -e "s/desired_size = 512 \* 1024 \* 1024  \# 512MiB/desired_size = 512 \* 1024 \* 1024 \* 4  \# 2048MiB/" src/modules/fstab/main.py
+    vsed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
+}
+
+post_install() {
+    vmkdir etc/polkit-1/rules.d/
+    vinstall ${FILESDIR}/49-nopasswd-calamares.rules 644 etc/polkit-1/rules.d/
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
@ 2021-10-04  4:10 ` Twilighttony
  2021-10-04  4:48 ` [PR REVIEW] " Johnnynator
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-04  4:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

New comment by Twilighttony on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#issuecomment-933126326

Comment:
I am sure there are things that need fixing in this, but I am proud to present this to you all for comment

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
  2021-10-04  4:10 ` Twilighttony
@ 2021-10-04  4:48 ` Johnnynator
  2021-10-04  4:54 ` Johnnynator
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Johnnynator @ 2021-10-04  4:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#discussion_r721038560

Comment:
Do intend with only 1 space inside a variable.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
  2021-10-04  4:10 ` Twilighttony
  2021-10-04  4:48 ` [PR REVIEW] " Johnnynator
@ 2021-10-04  4:54 ` Johnnynator
  2021-10-04  4:55 ` Johnnynator
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Johnnynator @ 2021-10-04  4:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#discussion_r721040157

Comment:
A lot of the *depends are messed up. `kde5`, `boost` are wrong in every occurrence. `git`, `extra-cmake-modules` and `pkg-config` should it only be in hostmakedepends

`boost-python*` in hostdeps is most likely wrong, same with `qt5-webengine` also the `-devel` packages in host should most likely be in `makedepends`

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (2 preceding siblings ...)
  2021-10-04  4:54 ` Johnnynator
@ 2021-10-04  4:55 ` Johnnynator
  2021-10-04  5:07 ` Twilighttony
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Johnnynator @ 2021-10-04  4:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 546 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#discussion_r721040157

Comment:
A lot of the *depends are messed up. `kde5`, `boost` are wrong in every occurrence. `git`, `extra-cmake-modules` and `pkg-config` should it only be in hostmakedepends

`boost-python*` in hostdeps is most likely wrong, same with `qt5-webengine` also the `-devel` packages in host should most likely be in `makedepends`

This is most likely not all, I only gave it a quick look without coffee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (3 preceding siblings ...)
  2021-10-04  4:55 ` Johnnynator
@ 2021-10-04  5:07 ` Twilighttony
  2021-10-04 15:58 ` Chocimier
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-04  5:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

New review comment by Twilighttony on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#discussion_r721044805

Comment:
I am not entirely sure what you mean by that?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (4 preceding siblings ...)
  2021-10-04  5:07 ` Twilighttony
@ 2021-10-04 15:58 ` Chocimier
  2021-10-04 16:58 ` Twilighttony
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2021-10-04 15:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#issuecomment-933624833

Comment:
#11440

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (5 preceding siblings ...)
  2021-10-04 15:58 ` Chocimier
@ 2021-10-04 16:58 ` Twilighttony
  2021-10-04 18:30 ` [PR REVIEW] " Chocimier
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-04 16:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New comment by Twilighttony on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#issuecomment-933673683

Comment:
> #11440

Thanks for your concern, but I have been told by members in IRC that if I can get this fixed up and clean, that this could get merged into void-packages.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (7 preceding siblings ...)
  2021-10-04 18:30 ` [PR REVIEW] " Chocimier
@ 2021-10-04 18:30 ` Chocimier
  2021-10-04 23:44 ` [PR PATCH] [Updated] " Twilighttony
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2021-10-04 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#discussion_r721613922

Comment:
Doesn't work, this need to be separated by semicolons, not spaces to be a single argument. I'm not sure why this didn't break build.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (6 preceding siblings ...)
  2021-10-04 16:58 ` Twilighttony
@ 2021-10-04 18:30 ` Chocimier
  2021-10-04 18:30 ` Chocimier
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2021-10-04 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#discussion_r721616135

Comment:
Don't align to quote with many spaces, use just 1.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (8 preceding siblings ...)
  2021-10-04 18:30 ` Chocimier
@ 2021-10-04 23:44 ` Twilighttony
  2021-10-06  3:53 ` Twilighttony
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-04 23:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by Twilighttony against master on the void-packages repository

https://github.com/Twilighttony/void-packages calamares
https://github.com/void-linux/void-packages/pull/33310

New Package: Calamares-3.2.44.2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/33310.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-calamares-33310.patch --]
[-- Type: text/x-diff, Size: 12568 bytes --]

From 314f635212dfdf4cc13a25eb04e4155855717e45 Mon Sep 17 00:00:00 2001
From: Twilighttony <starrbeartony14@zoho.com>
Date: Thu, 30 Sep 2021 22:03:01 -0400
Subject: [PATCH] New Package: Calamares-3.2.44.2

---
 .../files/49-nopasswd-calamares.rules         |   8 +
 .../calamares/patches/services-runit.patch    | 227 ++++++++++++++++++
 srcpkgs/calamares/template                    |  38 +++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/calamares/files/49-nopasswd-calamares.rules
 create mode 100644 srcpkgs/calamares/patches/services-runit.patch
 create mode 100644 srcpkgs/calamares/template

diff --git a/srcpkgs/calamares/files/49-nopasswd-calamares.rules b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
new file mode 100644
index 000000000000..c152890aabd7
--- /dev/null
+++ b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
@@ -0,0 +1,8 @@
+/* Allow Calamares to be started without password authentication
+ */
+polkit.addRule(function(action, subject) {
+    if ((action.id == "com.github.calamares.calamares.pkexec.run"))
+    {
+        return polkit.Result.YES;
+    }
+});
diff --git a/srcpkgs/calamares/patches/services-runit.patch b/srcpkgs/calamares/patches/services-runit.patch
new file mode 100644
index 000000000000..158296115783
--- /dev/null
+++ b/srcpkgs/calamares/patches/services-runit.patch
@@ -0,0 +1,227 @@
+From 1eb51f4ec5f4f3c601d0100bba01b836b67e649d Mon Sep 17 00:00:00 2001
+From: artoo <artoo@artixlinux.org>
+Date: Wed, 9 Dec 2020 00:16:52 +0100
+Subject: [PATCH] add services-runit
+
+---
+ src/modules/services-runit/main.py            | 144 ++++++++++++++++++
+ src/modules/services-runit/module.desc        |   5 +
+ .../services-runit/services-runit.conf        |  44 ++++++
+ 3 files changed, 193 insertions(+)
+ create mode 100644 src/modules/services-runit/main.py
+ create mode 100644 src/modules/services-runit/module.desc
+ create mode 100644 src/modules/services-runit/services-runit.conf
+
+diff --git a/src/modules/services-runit/main.py b/src/modules/services-runit/main.py
+new file mode 100644
+index 000000000..8b616191d
+--- /dev/null
++++ b/src/modules/services-runit/main.py
+@@ -0,0 +1,144 @@
++#!/usr/bin/env python3
++# -*- coding: utf-8 -*-
++#
++# === This file is part of Calamares - <https://github.com/calamares> ===
++#
++#   Copyright 2018-2019, Adriaan de Groot <groot@kde.org>
++#   Copyright 2019, Artoo <artoo@artixlinux.org>
++#
++#   Calamares is free software: you can redistribute it and/or modify
++#   it under the terms of the GNU General Public License as published by
++#   the Free Software Foundation, either version 3 of the License, or
++#   (at your option) any later version.
++#
++#   Calamares is distributed in the hope that it will be useful,
++#   but WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++#   GNU General Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License
++#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
++
++import libcalamares
++
++from libcalamares.utils import target_env_call, warning
++from os.path import exists, join
++
++
++import gettext
++_ = gettext.translation("calamares-python",
++                        localedir=libcalamares.utils.gettext_path(),
++                        languages=libcalamares.utils.gettext_languages(),
++                        fallback=True).gettext
++
++
++def pretty_name():
++    return _("Configure Runit services")
++
++
++class RunitController:
++    """
++    This is the runit service controller.
++    All of its state comes from global storage and the job
++    configuration at initialization time.
++    """
++
++    def __init__(self):
++        self.root = libcalamares.globalstorage.value('rootMountPoint')
++
++        # Translate the entries in the config to the actions passed to sv-helper
++        self.services = dict()
++        self.services["enable"] = libcalamares.job.configuration.get('services', [])
++        self.services["disable"] = libcalamares.job.configuration.get('disable', [])
++
++        self.svDir = libcalamares.job.configuration['svDir']
++        self.runsvDir = libcalamares.job.configuration['runsvDir']
++
++
++    def make_failure_description(self, state, name, runlevel):
++        """
++        Returns a generic "could not <foo>" failure message, specialized
++        for the action @p state and the specific service @p name in @p runlevel.
++        """
++        if state == "enable":
++            description = _("Cannot enable service {name!s} to run-level {level!s}.")
++        elif state == "disable":
++            description = _("Cannot disable service {name!s} from run-level {level!s}.")
++        else:
++            description = _("Unknown service-action <code>{arg!s}</code> for service {name!s} in run-level {level!s}.")
++
++        return description.format(arg=state, name=name, level=runlevel)
++
++
++    def update(self, state):
++        """
++        Call sv-helper for each service listed
++        in services for the given @p state.
++        """
++
++        for svc in self.services.get(state, []):
++            if isinstance(svc, str):
++                name = svc
++                runlevel = "default"
++                mandatory = False
++            else:
++                name = svc["name"]
++                runlevel = svc.get("runlevel", "default")
++                mandatory = svc.get("mandatory", False)
++
++            service_path = self.root + self.svDir + "/" + name
++            runlevel_path = self.root + self.runsvDir + "/" + runlevel
++            src = self.svDir + "/" + name
++            dest = self.runsvDir + "/" + runlevel + "/"
++
++            if state == 'enable':
++                cmd = ["ln", "-sv", src, dest]
++            elif state == 'disable':
++                cmd = ["rm", "-rv", dest]
++
++            if exists(service_path):
++                if exists(runlevel_path):
++                    ec = target_env_call(cmd)
++                    if ec != 0:
++                        warning("Cannot {} service {} to {}".format(state, name, runlevel))
++                        warning("{} returned error code {!s}".format(cmd, ec))
++                        if mandatory:
++                            title = _("Cannot modify service")
++                            diagnostic = _("<code>cmd {arg!s}</code> call in chroot returned error code {num!s}.").format(arg=state, num=ec)
++                            return (title,
++                                    self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                    )
++                else:
++                    warning("Target runlevel {} does not exist for {}.".format(runlevel, name))
++                    if mandatory:
++                        title = _("Target runlevel does not exist")
++                        diagnostic = _("The path for runlevel {level!s} is <code>{path!s}</code>, which does not exist.").format(level=runlevel, path=runlevel_path)
++
++                        return (title,
++                                self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                )
++            else:
++                warning("Target service {} does not exist in {}.".format(name, self.svDir))
++                if mandatory:
++                    title = _("Target service does not exist")
++                    diagnostic = _("The path for service {name!s} is <code>{path!s}</code>, which does not exist.").format(name=name, path=service_path)
++                    return (title,
++                            self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                            )
++
++
++    def run(self):
++        """Run the controller
++        """
++
++        for state in ("enable", "disable"):
++            r = self.update(state)
++            if r is not None:
++                return r
++
++def run():
++    """
++    Setup services
++    """
++
++    return RunitController().run()
+diff --git a/src/modules/services-runit/module.desc b/src/modules/services-runit/module.desc
+new file mode 100644
+index 000000000..29737c13e
+--- /dev/null
++++ b/src/modules/services-runit/module.desc
+@@ -0,0 +1,5 @@
++---
++type:       "job"
++name:       "services-runit"
++interface:  "python"
++script:     "main.py"
+diff --git a/src/modules/services-runit/services-runit.conf b/src/modules/services-runit/services-runit.conf
+new file mode 100644
+index 000000000..04476b107
+--- /dev/null
++++ b/src/modules/services-runit/services-runit.conf
+@@ -0,0 +1,44 @@
++# runit services module to modify service runlevels via symlinks in the chroot
++#
++# Services can be added (to any runlevel, or multiple runlevels) or deleted.
++# Handle disable with care and only use it if absolutely necessary.
++#
++# if a service is listed in the conf but is not present/detected on the target system,
++# or a runlevel does not exist, it will be ignored and skipped; a warning is logged.
++#
++---
++# svDir: holds the runit service directory location
++svDir: /etc/runit/sv
++
++# runsvDir: holds the runlevels directory location
++runsvDir: /etc/runit/runsvdir
++
++# services: a list of entries to **enable**
++# disable: a list of entries to **disable**
++#
++# Each entry has three fields:
++#   - name: the service name
++#   - (optional) runlevel: can hold any runlevel present on the target
++#     system; if no runlevel is provided, "default" is assumed.
++#   - (optional) mandatory: if set to true, a failure to modify
++#     the service will result in installation failure, rather than just
++#     a warning. The default is false.
++#
++# an entry may also be a single string, which is interpreted
++# as the name field (runlevel "default" is assumed then, and not-mandatory).
++#
++# # Example services and disable settings:
++# # - add foo1 to default, but it must succeed
++# # - add foo2 to nonetwork
++# # - remove foo3 from default
++# # - remove foo4 from default
++# services:
++#     - name: foo1
++#       mandatory: true
++#     - name: foo2
++#       runlevel: nonetwork
++# disable:
++#     - name: foo3
++#     - foo4
++services: []
++disable: []
+-- 
+2.29.2
diff --git a/srcpkgs/calamares/template b/srcpkgs/calamares/template
new file mode 100644
index 000000000000..e8a9ed78a734
--- /dev/null
+++ b/srcpkgs/calamares/template
@@ -0,0 +1,38 @@
+# Template file for 'calamares'
+pkgname=calamares
+version=3.2.44.2
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release
+                -DCMAKE_INSTALL_PREFIX=/usr
+                -DCMAKE_INSTALL_LIBDIR=lib
+                -DWITH_PYTHONQT:BOOL=ON
+                -DINSTALL_CONFIG:BOOL=ON
+                -DINSTALL_POLKIT:BOOL=ON
+                -DBoost_NO_BOOST_CMAKE=ON
+                -DSKIP_MODULES='webview interactiveterminal services-systemd dummyprocess dummypython dummycpp dummypythonqt'"
+hostmakedepends="git extra-cmake-modules pkg-config gettext 
+                ckbcomp kcoreaddons kdelibs4support python3-QtPy libpwquality 
+                AppStream-qt python3-yaml python3-jsonschema"
+makedepends="python3-devel python3-jsonschema yaml-cpp-devel python3-yaml boost-devel qt5-devel python3-devel kpmcore-devel
+            qt5-tools qt5-translations boost boost-python3-1.72 python3-QtPy qt5-svg-devel
+            libpwquality qt5-webengine AppStream-qt plasma-framework-devel qt5-webengine"
+depends="kconfig kcoreaddons kiconthemes ki18n kio ksolid yaml-cpp kpmcore boost ckbcomp
+        hardinfo qt5-svg polkit-qt5 gtk-update-icon-cache plasma-framework qt5-xmlpatterns
+        squashfs-tools libpwquality AppStream-qt icu"
+short_desc="Distribution-independent installer framework"
+maintainer="Twilighttony <starrbeartony14@zoho.com>"
+license="GPL-3.0-or-later"
+homepage="https://calamares.io"
+distfiles="https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${version}.tar.gz"
+checksum=f8ac63bcc94cce265bf8c300c47752d17c466d096198bb08745aa16938a6548d
+
+pre_configure() {
+    vsed -i -e "s/desired_size = 512 \* 1024 \* 1024  \# 512MiB/desired_size = 512 \* 1024 \* 1024 \* 4  \# 2048MiB/" src/modules/fstab/main.py
+    vsed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
+}
+
+post_install() {
+    vmkdir etc/polkit-1/rules.d/
+    vinstall ${FILESDIR}/49-nopasswd-calamares.rules 644 etc/polkit-1/rules.d/
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] New Package: Calamares-3.2.44.2
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (9 preceding siblings ...)
  2021-10-04 23:44 ` [PR PATCH] [Updated] " Twilighttony
@ 2021-10-06  3:53 ` Twilighttony
  2021-10-06  4:02 ` [PR PATCH] [Updated] New Package: Calamares-3.2.44.3 Twilighttony
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-06  3:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by Twilighttony against master on the void-packages repository

https://github.com/Twilighttony/void-packages calamares
https://github.com/void-linux/void-packages/pull/33310

New Package: Calamares-3.2.44.2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/33310.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-calamares-33310.patch --]
[-- Type: text/x-diff, Size: 12436 bytes --]

From 7f948017a300cfc525d59fae0511d1c20fee3ac2 Mon Sep 17 00:00:00 2001
From: Twilighttony <starrbeartony14@zoho.com>
Date: Thu, 30 Sep 2021 22:03:01 -0400
Subject: [PATCH] New Package: Calamares-3.2.44.3

---
 .../files/49-nopasswd-calamares.rules         |   8 +
 .../calamares/patches/services-runit.patch    | 227 ++++++++++++++++++
 srcpkgs/calamares/template                    |  38 +++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/calamares/files/49-nopasswd-calamares.rules
 create mode 100644 srcpkgs/calamares/patches/services-runit.patch
 create mode 100644 srcpkgs/calamares/template

diff --git a/srcpkgs/calamares/files/49-nopasswd-calamares.rules b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
new file mode 100644
index 000000000000..c152890aabd7
--- /dev/null
+++ b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
@@ -0,0 +1,8 @@
+/* Allow Calamares to be started without password authentication
+ */
+polkit.addRule(function(action, subject) {
+    if ((action.id == "com.github.calamares.calamares.pkexec.run"))
+    {
+        return polkit.Result.YES;
+    }
+});
diff --git a/srcpkgs/calamares/patches/services-runit.patch b/srcpkgs/calamares/patches/services-runit.patch
new file mode 100644
index 000000000000..158296115783
--- /dev/null
+++ b/srcpkgs/calamares/patches/services-runit.patch
@@ -0,0 +1,227 @@
+From 1eb51f4ec5f4f3c601d0100bba01b836b67e649d Mon Sep 17 00:00:00 2001
+From: artoo <artoo@artixlinux.org>
+Date: Wed, 9 Dec 2020 00:16:52 +0100
+Subject: [PATCH] add services-runit
+
+---
+ src/modules/services-runit/main.py            | 144 ++++++++++++++++++
+ src/modules/services-runit/module.desc        |   5 +
+ .../services-runit/services-runit.conf        |  44 ++++++
+ 3 files changed, 193 insertions(+)
+ create mode 100644 src/modules/services-runit/main.py
+ create mode 100644 src/modules/services-runit/module.desc
+ create mode 100644 src/modules/services-runit/services-runit.conf
+
+diff --git a/src/modules/services-runit/main.py b/src/modules/services-runit/main.py
+new file mode 100644
+index 000000000..8b616191d
+--- /dev/null
++++ b/src/modules/services-runit/main.py
+@@ -0,0 +1,144 @@
++#!/usr/bin/env python3
++# -*- coding: utf-8 -*-
++#
++# === This file is part of Calamares - <https://github.com/calamares> ===
++#
++#   Copyright 2018-2019, Adriaan de Groot <groot@kde.org>
++#   Copyright 2019, Artoo <artoo@artixlinux.org>
++#
++#   Calamares is free software: you can redistribute it and/or modify
++#   it under the terms of the GNU General Public License as published by
++#   the Free Software Foundation, either version 3 of the License, or
++#   (at your option) any later version.
++#
++#   Calamares is distributed in the hope that it will be useful,
++#   but WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++#   GNU General Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License
++#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
++
++import libcalamares
++
++from libcalamares.utils import target_env_call, warning
++from os.path import exists, join
++
++
++import gettext
++_ = gettext.translation("calamares-python",
++                        localedir=libcalamares.utils.gettext_path(),
++                        languages=libcalamares.utils.gettext_languages(),
++                        fallback=True).gettext
++
++
++def pretty_name():
++    return _("Configure Runit services")
++
++
++class RunitController:
++    """
++    This is the runit service controller.
++    All of its state comes from global storage and the job
++    configuration at initialization time.
++    """
++
++    def __init__(self):
++        self.root = libcalamares.globalstorage.value('rootMountPoint')
++
++        # Translate the entries in the config to the actions passed to sv-helper
++        self.services = dict()
++        self.services["enable"] = libcalamares.job.configuration.get('services', [])
++        self.services["disable"] = libcalamares.job.configuration.get('disable', [])
++
++        self.svDir = libcalamares.job.configuration['svDir']
++        self.runsvDir = libcalamares.job.configuration['runsvDir']
++
++
++    def make_failure_description(self, state, name, runlevel):
++        """
++        Returns a generic "could not <foo>" failure message, specialized
++        for the action @p state and the specific service @p name in @p runlevel.
++        """
++        if state == "enable":
++            description = _("Cannot enable service {name!s} to run-level {level!s}.")
++        elif state == "disable":
++            description = _("Cannot disable service {name!s} from run-level {level!s}.")
++        else:
++            description = _("Unknown service-action <code>{arg!s}</code> for service {name!s} in run-level {level!s}.")
++
++        return description.format(arg=state, name=name, level=runlevel)
++
++
++    def update(self, state):
++        """
++        Call sv-helper for each service listed
++        in services for the given @p state.
++        """
++
++        for svc in self.services.get(state, []):
++            if isinstance(svc, str):
++                name = svc
++                runlevel = "default"
++                mandatory = False
++            else:
++                name = svc["name"]
++                runlevel = svc.get("runlevel", "default")
++                mandatory = svc.get("mandatory", False)
++
++            service_path = self.root + self.svDir + "/" + name
++            runlevel_path = self.root + self.runsvDir + "/" + runlevel
++            src = self.svDir + "/" + name
++            dest = self.runsvDir + "/" + runlevel + "/"
++
++            if state == 'enable':
++                cmd = ["ln", "-sv", src, dest]
++            elif state == 'disable':
++                cmd = ["rm", "-rv", dest]
++
++            if exists(service_path):
++                if exists(runlevel_path):
++                    ec = target_env_call(cmd)
++                    if ec != 0:
++                        warning("Cannot {} service {} to {}".format(state, name, runlevel))
++                        warning("{} returned error code {!s}".format(cmd, ec))
++                        if mandatory:
++                            title = _("Cannot modify service")
++                            diagnostic = _("<code>cmd {arg!s}</code> call in chroot returned error code {num!s}.").format(arg=state, num=ec)
++                            return (title,
++                                    self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                    )
++                else:
++                    warning("Target runlevel {} does not exist for {}.".format(runlevel, name))
++                    if mandatory:
++                        title = _("Target runlevel does not exist")
++                        diagnostic = _("The path for runlevel {level!s} is <code>{path!s}</code>, which does not exist.").format(level=runlevel, path=runlevel_path)
++
++                        return (title,
++                                self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                )
++            else:
++                warning("Target service {} does not exist in {}.".format(name, self.svDir))
++                if mandatory:
++                    title = _("Target service does not exist")
++                    diagnostic = _("The path for service {name!s} is <code>{path!s}</code>, which does not exist.").format(name=name, path=service_path)
++                    return (title,
++                            self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                            )
++
++
++    def run(self):
++        """Run the controller
++        """
++
++        for state in ("enable", "disable"):
++            r = self.update(state)
++            if r is not None:
++                return r
++
++def run():
++    """
++    Setup services
++    """
++
++    return RunitController().run()
+diff --git a/src/modules/services-runit/module.desc b/src/modules/services-runit/module.desc
+new file mode 100644
+index 000000000..29737c13e
+--- /dev/null
++++ b/src/modules/services-runit/module.desc
+@@ -0,0 +1,5 @@
++---
++type:       "job"
++name:       "services-runit"
++interface:  "python"
++script:     "main.py"
+diff --git a/src/modules/services-runit/services-runit.conf b/src/modules/services-runit/services-runit.conf
+new file mode 100644
+index 000000000..04476b107
+--- /dev/null
++++ b/src/modules/services-runit/services-runit.conf
+@@ -0,0 +1,44 @@
++# runit services module to modify service runlevels via symlinks in the chroot
++#
++# Services can be added (to any runlevel, or multiple runlevels) or deleted.
++# Handle disable with care and only use it if absolutely necessary.
++#
++# if a service is listed in the conf but is not present/detected on the target system,
++# or a runlevel does not exist, it will be ignored and skipped; a warning is logged.
++#
++---
++# svDir: holds the runit service directory location
++svDir: /etc/runit/sv
++
++# runsvDir: holds the runlevels directory location
++runsvDir: /etc/runit/runsvdir
++
++# services: a list of entries to **enable**
++# disable: a list of entries to **disable**
++#
++# Each entry has three fields:
++#   - name: the service name
++#   - (optional) runlevel: can hold any runlevel present on the target
++#     system; if no runlevel is provided, "default" is assumed.
++#   - (optional) mandatory: if set to true, a failure to modify
++#     the service will result in installation failure, rather than just
++#     a warning. The default is false.
++#
++# an entry may also be a single string, which is interpreted
++# as the name field (runlevel "default" is assumed then, and not-mandatory).
++#
++# # Example services and disable settings:
++# # - add foo1 to default, but it must succeed
++# # - add foo2 to nonetwork
++# # - remove foo3 from default
++# # - remove foo4 from default
++# services:
++#     - name: foo1
++#       mandatory: true
++#     - name: foo2
++#       runlevel: nonetwork
++# disable:
++#     - name: foo3
++#     - foo4
++services: []
++disable: []
+-- 
+2.29.2
diff --git a/srcpkgs/calamares/template b/srcpkgs/calamares/template
new file mode 100644
index 000000000000..13c5d2f5d114
--- /dev/null
+++ b/srcpkgs/calamares/template
@@ -0,0 +1,38 @@
+# Template file for 'calamares'
+pkgname=calamares
+version=3.2.44.3
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release
+    -DCMAKE_INSTALL_PREFIX=/usr
+    -DCMAKE_INSTALL_LIBDIR=lib
+    -DWITH_PYTHONQT:BOOL=ON
+    -DINSTALL_CONFIG:BOOL=ON
+    -DINSTALL_POLKIT:BOOL=ON
+    -DBoost_NO_BOOST_CMAKE=ON
+    -DSKIP_MODULES='webview;interactiveterminal;services-systemd;dummyprocess;dummypython;dummycpp;dummypythonqt'"
+hostmakedepends="git extra-cmake-modules pkg-config gettext 
+    ckbcomp kcoreaddons kdelibs4support python3-QtPy libpwquality 
+    AppStream-qt python3-yaml python3-jsonschema"
+makedepends="python3-devel python3-jsonschema yaml-cpp-devel python3-yaml boost-devel qt5-devel python3-devel kpmcore-devel
+    qt5-tools qt5-translations boost boost-python3-1.72 python3-QtPy qt5-svg-devel
+    libpwquality qt5-webengine AppStream-qt plasma-framework-devel qt5-webengine"
+depends="kconfig kcoreaddons kiconthemes ki18n kio ksolid yaml-cpp kpmcore boost ckbcomp
+    hardinfo qt5-svg polkit-qt5 gtk-update-icon-cache plasma-framework qt5-xmlpatterns
+    squashfs-tools libpwquality AppStream-qt icu"
+short_desc="Distribution-independent installer framework"
+maintainer="Twilighttony <starrbeartony14@zoho.com>"
+license="GPL-3.0-or-later"
+homepage="https://calamares.io"
+distfiles="https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${version}.tar.gz"
+checksum=a7772d50baf35cfb7d74db3c0a46fb72a74e069a78a8e984c2ed1d115abc944c
+
+pre_configure() {
+    vsed -i -e "s/desired_size = 512 \* 1024 \* 1024  \# 512MiB/desired_size = 512 \* 1024 \* 1024 \* 4  \# 2048MiB/" src/modules/fstab/main.py
+    vsed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
+}
+
+post_install() {
+    vmkdir etc/polkit-1/rules.d/
+    vinstall ${FILESDIR}/49-nopasswd-calamares.rules 644 etc/polkit-1/rules.d/
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] New Package: Calamares-3.2.44.3
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (10 preceding siblings ...)
  2021-10-06  3:53 ` Twilighttony
@ 2021-10-06  4:02 ` Twilighttony
  2022-06-06  2:15 ` github-actions
  2022-06-21  2:12 ` [PR PATCH] [Closed]: " github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: Twilighttony @ 2021-10-06  4:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by Twilighttony against master on the void-packages repository

https://github.com/Twilighttony/void-packages calamares
https://github.com/void-linux/void-packages/pull/33310

New Package: Calamares-3.2.44.3
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/33310.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-calamares-33310.patch --]
[-- Type: text/x-diff, Size: 12434 bytes --]

From 81631ed23c8f2abc2d318f191fce6fdbbdc25151 Mon Sep 17 00:00:00 2001
From: Twilighttony <starrbeartony14@zoho.com>
Date: Thu, 30 Sep 2021 22:03:01 -0400
Subject: [PATCH] New Package: Calamares-3.2.44.3

---
 .../files/49-nopasswd-calamares.rules         |   8 +
 .../calamares/patches/services-runit.patch    | 227 ++++++++++++++++++
 srcpkgs/calamares/template                    |  38 +++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/calamares/files/49-nopasswd-calamares.rules
 create mode 100644 srcpkgs/calamares/patches/services-runit.patch
 create mode 100644 srcpkgs/calamares/template

diff --git a/srcpkgs/calamares/files/49-nopasswd-calamares.rules b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
new file mode 100644
index 000000000000..c152890aabd7
--- /dev/null
+++ b/srcpkgs/calamares/files/49-nopasswd-calamares.rules
@@ -0,0 +1,8 @@
+/* Allow Calamares to be started without password authentication
+ */
+polkit.addRule(function(action, subject) {
+    if ((action.id == "com.github.calamares.calamares.pkexec.run"))
+    {
+        return polkit.Result.YES;
+    }
+});
diff --git a/srcpkgs/calamares/patches/services-runit.patch b/srcpkgs/calamares/patches/services-runit.patch
new file mode 100644
index 000000000000..158296115783
--- /dev/null
+++ b/srcpkgs/calamares/patches/services-runit.patch
@@ -0,0 +1,227 @@
+From 1eb51f4ec5f4f3c601d0100bba01b836b67e649d Mon Sep 17 00:00:00 2001
+From: artoo <artoo@artixlinux.org>
+Date: Wed, 9 Dec 2020 00:16:52 +0100
+Subject: [PATCH] add services-runit
+
+---
+ src/modules/services-runit/main.py            | 144 ++++++++++++++++++
+ src/modules/services-runit/module.desc        |   5 +
+ .../services-runit/services-runit.conf        |  44 ++++++
+ 3 files changed, 193 insertions(+)
+ create mode 100644 src/modules/services-runit/main.py
+ create mode 100644 src/modules/services-runit/module.desc
+ create mode 100644 src/modules/services-runit/services-runit.conf
+
+diff --git a/src/modules/services-runit/main.py b/src/modules/services-runit/main.py
+new file mode 100644
+index 000000000..8b616191d
+--- /dev/null
++++ b/src/modules/services-runit/main.py
+@@ -0,0 +1,144 @@
++#!/usr/bin/env python3
++# -*- coding: utf-8 -*-
++#
++# === This file is part of Calamares - <https://github.com/calamares> ===
++#
++#   Copyright 2018-2019, Adriaan de Groot <groot@kde.org>
++#   Copyright 2019, Artoo <artoo@artixlinux.org>
++#
++#   Calamares is free software: you can redistribute it and/or modify
++#   it under the terms of the GNU General Public License as published by
++#   the Free Software Foundation, either version 3 of the License, or
++#   (at your option) any later version.
++#
++#   Calamares is distributed in the hope that it will be useful,
++#   but WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++#   GNU General Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License
++#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
++
++import libcalamares
++
++from libcalamares.utils import target_env_call, warning
++from os.path import exists, join
++
++
++import gettext
++_ = gettext.translation("calamares-python",
++                        localedir=libcalamares.utils.gettext_path(),
++                        languages=libcalamares.utils.gettext_languages(),
++                        fallback=True).gettext
++
++
++def pretty_name():
++    return _("Configure Runit services")
++
++
++class RunitController:
++    """
++    This is the runit service controller.
++    All of its state comes from global storage and the job
++    configuration at initialization time.
++    """
++
++    def __init__(self):
++        self.root = libcalamares.globalstorage.value('rootMountPoint')
++
++        # Translate the entries in the config to the actions passed to sv-helper
++        self.services = dict()
++        self.services["enable"] = libcalamares.job.configuration.get('services', [])
++        self.services["disable"] = libcalamares.job.configuration.get('disable', [])
++
++        self.svDir = libcalamares.job.configuration['svDir']
++        self.runsvDir = libcalamares.job.configuration['runsvDir']
++
++
++    def make_failure_description(self, state, name, runlevel):
++        """
++        Returns a generic "could not <foo>" failure message, specialized
++        for the action @p state and the specific service @p name in @p runlevel.
++        """
++        if state == "enable":
++            description = _("Cannot enable service {name!s} to run-level {level!s}.")
++        elif state == "disable":
++            description = _("Cannot disable service {name!s} from run-level {level!s}.")
++        else:
++            description = _("Unknown service-action <code>{arg!s}</code> for service {name!s} in run-level {level!s}.")
++
++        return description.format(arg=state, name=name, level=runlevel)
++
++
++    def update(self, state):
++        """
++        Call sv-helper for each service listed
++        in services for the given @p state.
++        """
++
++        for svc in self.services.get(state, []):
++            if isinstance(svc, str):
++                name = svc
++                runlevel = "default"
++                mandatory = False
++            else:
++                name = svc["name"]
++                runlevel = svc.get("runlevel", "default")
++                mandatory = svc.get("mandatory", False)
++
++            service_path = self.root + self.svDir + "/" + name
++            runlevel_path = self.root + self.runsvDir + "/" + runlevel
++            src = self.svDir + "/" + name
++            dest = self.runsvDir + "/" + runlevel + "/"
++
++            if state == 'enable':
++                cmd = ["ln", "-sv", src, dest]
++            elif state == 'disable':
++                cmd = ["rm", "-rv", dest]
++
++            if exists(service_path):
++                if exists(runlevel_path):
++                    ec = target_env_call(cmd)
++                    if ec != 0:
++                        warning("Cannot {} service {} to {}".format(state, name, runlevel))
++                        warning("{} returned error code {!s}".format(cmd, ec))
++                        if mandatory:
++                            title = _("Cannot modify service")
++                            diagnostic = _("<code>cmd {arg!s}</code> call in chroot returned error code {num!s}.").format(arg=state, num=ec)
++                            return (title,
++                                    self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                    )
++                else:
++                    warning("Target runlevel {} does not exist for {}.".format(runlevel, name))
++                    if mandatory:
++                        title = _("Target runlevel does not exist")
++                        diagnostic = _("The path for runlevel {level!s} is <code>{path!s}</code>, which does not exist.").format(level=runlevel, path=runlevel_path)
++
++                        return (title,
++                                self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                                )
++            else:
++                warning("Target service {} does not exist in {}.".format(name, self.svDir))
++                if mandatory:
++                    title = _("Target service does not exist")
++                    diagnostic = _("The path for service {name!s} is <code>{path!s}</code>, which does not exist.").format(name=name, path=service_path)
++                    return (title,
++                            self.make_failure_description(state, name, runlevel) + " " + diagnostic
++                            )
++
++
++    def run(self):
++        """Run the controller
++        """
++
++        for state in ("enable", "disable"):
++            r = self.update(state)
++            if r is not None:
++                return r
++
++def run():
++    """
++    Setup services
++    """
++
++    return RunitController().run()
+diff --git a/src/modules/services-runit/module.desc b/src/modules/services-runit/module.desc
+new file mode 100644
+index 000000000..29737c13e
+--- /dev/null
++++ b/src/modules/services-runit/module.desc
+@@ -0,0 +1,5 @@
++---
++type:       "job"
++name:       "services-runit"
++interface:  "python"
++script:     "main.py"
+diff --git a/src/modules/services-runit/services-runit.conf b/src/modules/services-runit/services-runit.conf
+new file mode 100644
+index 000000000..04476b107
+--- /dev/null
++++ b/src/modules/services-runit/services-runit.conf
+@@ -0,0 +1,44 @@
++# runit services module to modify service runlevels via symlinks in the chroot
++#
++# Services can be added (to any runlevel, or multiple runlevels) or deleted.
++# Handle disable with care and only use it if absolutely necessary.
++#
++# if a service is listed in the conf but is not present/detected on the target system,
++# or a runlevel does not exist, it will be ignored and skipped; a warning is logged.
++#
++---
++# svDir: holds the runit service directory location
++svDir: /etc/runit/sv
++
++# runsvDir: holds the runlevels directory location
++runsvDir: /etc/runit/runsvdir
++
++# services: a list of entries to **enable**
++# disable: a list of entries to **disable**
++#
++# Each entry has three fields:
++#   - name: the service name
++#   - (optional) runlevel: can hold any runlevel present on the target
++#     system; if no runlevel is provided, "default" is assumed.
++#   - (optional) mandatory: if set to true, a failure to modify
++#     the service will result in installation failure, rather than just
++#     a warning. The default is false.
++#
++# an entry may also be a single string, which is interpreted
++# as the name field (runlevel "default" is assumed then, and not-mandatory).
++#
++# # Example services and disable settings:
++# # - add foo1 to default, but it must succeed
++# # - add foo2 to nonetwork
++# # - remove foo3 from default
++# # - remove foo4 from default
++# services:
++#     - name: foo1
++#       mandatory: true
++#     - name: foo2
++#       runlevel: nonetwork
++# disable:
++#     - name: foo3
++#     - foo4
++services: []
++disable: []
+-- 
+2.29.2
diff --git a/srcpkgs/calamares/template b/srcpkgs/calamares/template
new file mode 100644
index 000000000000..870a61663ffb
--- /dev/null
+++ b/srcpkgs/calamares/template
@@ -0,0 +1,38 @@
+# Template file for 'calamares'
+pkgname=calamares
+version=3.2.44.3
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release
+    -DCMAKE_INSTALL_PREFIX=/usr
+    -DCMAKE_INSTALL_LIBDIR=lib
+    -DWITH_PYTHONQT:BOOL=ON
+    -DINSTALL_CONFIG:BOOL=ON
+    -DINSTALL_POLKIT:BOOL=ON
+    -DBoost_NO_BOOST_CMAKE=ON
+    -DSKIP_MODULES='webview;interactiveterminal;services-systemd;dummyprocess;dummypython;dummycpp;dummypythonqt'"
+hostmakedepends="git extra-cmake-modules pkg-config gettext
+    ckbcomp kcoreaddons kdelibs4support python3-QtPy libpwquality
+    AppStream-qt python3-yaml python3-jsonschema"
+makedepends="python3-devel python3-jsonschema yaml-cpp-devel python3-yaml boost-devel qt5-devel python3-devel kpmcore-devel
+    qt5-tools qt5-translations boost boost-python3-1.72 python3-QtPy qt5-svg-devel
+    libpwquality qt5-webengine AppStream-qt plasma-framework-devel qt5-webengine"
+depends="kconfig kcoreaddons kiconthemes ki18n kio ksolid yaml-cpp kpmcore boost ckbcomp
+    hardinfo qt5-svg polkit-qt5 gtk-update-icon-cache plasma-framework qt5-xmlpatterns
+    squashfs-tools libpwquality AppStream-qt icu"
+short_desc="Distribution-independent installer framework"
+maintainer="Twilighttony <starrbeartony14@zoho.com>"
+license="GPL-3.0-or-later"
+homepage="https://calamares.io"
+distfiles="https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${version}.tar.gz"
+checksum=a7772d50baf35cfb7d74db3c0a46fb72a74e069a78a8e984c2ed1d115abc944c
+
+pre_configure() {
+    vsed -i -e "s/desired_size = 512 \* 1024 \* 1024  \# 512MiB/desired_size = 512 \* 1024 \* 1024 \* 4  \# 2048MiB/" src/modules/fstab/main.py
+    vsed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
+}
+
+post_install() {
+    vmkdir etc/polkit-1/rules.d/
+    vinstall ${FILESDIR}/49-nopasswd-calamares.rules 644 etc/polkit-1/rules.d/
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: New Package: Calamares-3.2.44.3
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (11 preceding siblings ...)
  2021-10-06  4:02 ` [PR PATCH] [Updated] New Package: Calamares-3.2.44.3 Twilighttony
@ 2022-06-06  2:15 ` github-actions
  2022-06-21  2:12 ` [PR PATCH] [Closed]: " github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-06-06  2:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/33310#issuecomment-1146964515

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Closed]: New Package: Calamares-3.2.44.3
  2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
                   ` (12 preceding siblings ...)
  2022-06-06  2:15 ` github-actions
@ 2022-06-21  2:12 ` github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-06-21  2:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]

There's a closed pull request on the void-packages repository

New Package: Calamares-3.2.44.3
https://github.com/void-linux/void-packages/pull/33310

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-06-21  2:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04  4:09 [PR PATCH] New Package: Calamares-3.2.44.2 Twilighttony
2021-10-04  4:10 ` Twilighttony
2021-10-04  4:48 ` [PR REVIEW] " Johnnynator
2021-10-04  4:54 ` Johnnynator
2021-10-04  4:55 ` Johnnynator
2021-10-04  5:07 ` Twilighttony
2021-10-04 15:58 ` Chocimier
2021-10-04 16:58 ` Twilighttony
2021-10-04 18:30 ` [PR REVIEW] " Chocimier
2021-10-04 18:30 ` Chocimier
2021-10-04 23:44 ` [PR PATCH] [Updated] " Twilighttony
2021-10-06  3:53 ` Twilighttony
2021-10-06  4:02 ` [PR PATCH] [Updated] New Package: Calamares-3.2.44.3 Twilighttony
2022-06-06  2:15 ` github-actions
2022-06-21  2:12 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).