Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package noisetorch for openSUSE:Factory 
checked in at 2026-07-21 23:00:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/noisetorch (Old)
 and      /work/SRC/openSUSE:Factory/.noisetorch.new.24530 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "noisetorch"

Tue Jul 21 23:00:06 2026 rev:5 rq:1366705 version:0.12.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/noisetorch/noisetorch.changes    2025-08-21 
17:00:39.089287284 +0200
+++ /work/SRC/openSUSE:Factory/.noisetorch.new.24530/noisetorch.changes 
2026-07-21 23:00:08.369178241 +0200
@@ -1,0 +2,8 @@
+Fri Jul 17 10:06:40 UTC 2026 - Matthias Gerstner <[email protected]>
+
+- add remove-self-cap-assignment.patch (bsc#1270715): capabilities are
+  exclusively managed by the permissions package. We don't want self-modifying
+  applications. Thus patch out the problematic code portions and display an
+  openSUSE-specific hint instead.
+
+-------------------------------------------------------------------

New:
----
  remove-self-cap-assignment.patch

----------(New B)----------
  New:
- add remove-self-cap-assignment.patch (bsc#1270715): capabilities are
  exclusively managed by the permissions package. We don't want self-modifying
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ noisetorch.spec ++++++
--- /var/tmp/diff_new_pack.ZKqzs1/_old  2026-07-21 23:00:09.709223907 +0200
+++ /var/tmp/diff_new_pack.ZKqzs1/_new  2026-07-21 23:00:09.713224042 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package noisetorch
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@
 Source0:        NoiseTorch-%{version}.tar.gz
 # osc service disabledrun
 Source1:        vendor.tar.gz
+Patch0:         remove-self-cap-assignment.patch
 BuildRequires:  c++_compiler
 BuildRequires:  cmake
 BuildRequires:  git-core

++++++ remove-self-cap-assignment.patch ++++++
Index: NoiseTorch-0.12.2/capability.go
===================================================================
--- NoiseTorch-0.12.2.orig/capability.go
+++ NoiseTorch-0.12.2/capability.go
@@ -3,7 +3,6 @@ package main
 import (
        "log"
        "os"
-       "os/exec"
 
        "github.com/syndtr/gocapability/capability"
 )
@@ -44,33 +43,3 @@ func getSelfFileCaps() *capability.Capab
 func hasCapSysResource(caps *capability.Capabilities) bool {
        return (*caps).Get(capability.EFFECTIVE, capability.CAP_SYS_RESOURCE)
 }
-
-func makeBinarySetcapped() error {
-       fileCaps := *getSelfFileCaps()
-       if !hasCapSysResource(&fileCaps) {
-               
fileCaps.Set(capability.EFFECTIVE|capability.PERMITTED|capability.INHERITABLE, 
capability.CAP_SYS_RESOURCE)
-               err := fileCaps.Apply(capability.EFFECTIVE | 
capability.PERMITTED | capability.INHERITABLE)
-               if err != nil {
-                       return err
-               }
-       }
-       return nil
-}
-
-func pkexecSetcapSelf() error {
-       self, err := os.Executable()
-       if err != nil {
-               log.Fatalf("Couldn't find path to own binary\n")
-               return err
-       }
-
-       cmd := exec.Command("pkexec", self, "-setcap")
-       log.Printf("Calling: %s\n", cmd.String())
-       err = cmd.Run()
-       if err != nil {
-               log.Printf("Couldn't setcap self as root: %v\n", err)
-               return err
-       }
-
-       return nil
-}
Index: NoiseTorch-0.12.2/cli.go
===================================================================
--- NoiseTorch-0.12.2.orig/cli.go
+++ NoiseTorch-0.12.2/cli.go
@@ -25,7 +25,6 @@ type CLIOpts struct {
 func parseCLIOpts() CLIOpts {
        var opt CLIOpts
        flag.BoolVar(&opt.doLog, "log", false, "Print debugging output to 
stdout")
-       flag.BoolVar(&opt.setcap, "setcap", false, "for internal use only")
        flag.StringVar(&opt.sinkName, "s", "", "Use the specified source/sink 
device ID")
        flag.BoolVar(&opt.loadInput, "i", false, "Load supressor for input. If 
no source device ID is specified the default pulse audio source is used.")
        flag.BoolVar(&opt.loadOutput, "o", false, "Load supressor for output. 
If no source device ID is specified the default pulse audio source is used.")
@@ -54,14 +53,6 @@ func doCLI(opt CLIOpts, config *config,
                }
                cleanupExit(librnnoise, 0)
        }
-
-       if opt.setcap {
-               err := makeBinarySetcapped()
-               if err != nil {
-                       cleanupExit(librnnoise, 1)
-               }
-               cleanupExit(librnnoise, 0)
-       }
 
        paClient, err := pulseaudio.NewClient()
        if err != nil {
Index: NoiseTorch-0.12.2/update.go
===================================================================
--- NoiseTorch-0.12.2.orig/update.go
+++ NoiseTorch-0.12.2/update.go
@@ -127,7 +127,6 @@ func update(ctx *ntcontext) {
        }
 
        untar(bytes.NewReader(tgz), os.Getenv("HOME"))
-       pkexecSetcapSelf()
 
        log.Printf("Update installed!\n")
        ctx.update.updatingText = "Update installed! (Restart NoiseTorch to 
apply)"
Index: NoiseTorch-0.12.2/ui.go
===================================================================
--- NoiseTorch-0.12.2.orig/ui.go
+++ NoiseTorch-0.12.2/ui.go
@@ -6,7 +6,6 @@ import (
        "log"
        "os"
        "os/exec"
-       "syscall"
        "time"
 
        "github.com/aarzilli/nucular"
@@ -395,7 +394,7 @@ func capabilitiesView(ctx *ntcontext, w
        w.Row(15).Dynamic(1)
        w.Label("NoiseTorch currently does not have the capabilities to 
function properly.", "CB")
        w.Row(15).Dynamic(1)
-       w.Label("We require CAP_SYS_RESOURCE. If that doesn't mean anything to 
you, don't worry. I'll fix it for you.", "CB")
+       w.Label("We require CAP_SYS_RESOURCE. openSUSE manages this via 
permissions profiles. Try `permctl --system` as root.", "CB")
        if ctx.capsMismatch {
                w.Row(15).Dynamic(1)
                w.LabelColored("Warning: File has CAP_SYS_RESOURCE but our 
process doesn't.", "CB", orange)
@@ -404,23 +403,6 @@ func capabilitiesView(ctx *ntcontext, w
        }
        w.Row(40).Dynamic(1)
        w.Row(25).Dynamic(1)
-       if w.ButtonText("Grant capability (requires root)") {
-               err := pkexecSetcapSelf()
-               if err != nil {
-                       ctx.views.Push(makeErrorView(ctx, err.Error()))
-                       return
-               }
-               self, err := os.Executable()
-               if err != nil {
-                       ctx.views.Push(makeErrorView(ctx, err.Error()))
-                       return
-               }
-               err = syscall.Exec(self, []string{""}, os.Environ())
-               if err != nil {
-                       ctx.views.Push(makeErrorView(ctx, err.Error()))
-                       return
-               }
-       }
 }
 
 func makeErrorView(ctx *ntcontext, errorMsg string) ViewFunc {

Reply via email to