[packaging/kde-buildstream] /: components/ufw.bst: Do not install anything in /lib

Aleix Pol Gonzalez <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 316773f295f833ab5206a8149cfebc1847631279 by Aleix Pol Gonzalez, on behalf of Aleix Pol i Gonzalez.
Committed on 19/08/2026 at 10:19.
Pushed by apol into branch 'master'.

components/ufw.bst: Do not install anything in /lib

Backports a patch from archlinux

A  +10   -0    LICENSES/0BSD.txt
M  +2    -0    elements/components/ufw.bst
A  +39   -0    patches/ufw/01-move-from-lib-to-usr-lib.patch
A  +3    -0    patches/ufw/01-move-from-lib-to-usr-lib.patch.license

https://invent.kde.org/packaging/kde-buildstream/-/commit/316773f295f833ab5206a8149cfebc1847631279

diff --git a/LICENSES/0BSD.txt b/LICENSES/0BSD.txt
new file mode 100644
index 0000000..7ae8865
--- /dev/null
+++ b/LICENSES/0BSD.txt
@@ -0,0 +1,10 @@
+Permission to use, copy, modify, and/or distribute this software for
+any purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
+FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/elements/components/ufw.bst b/elements/components/ufw.bst
index 6fe7dd4..d7c2dd5 100644
--- a/elements/components/ufw.bst
+++ b/elements/components/ufw.bst
@@ -30,3 +30,5 @@ sources:
   - '*rc*'
   - '*pre*'
   ref: 0.36.2-0-g2ed44c38ea83e86af99ee51abc2bf9393c07a39a
+- kind: patch
+  path: patches/ufw/01-move-from-lib-to-usr-lib.patch
diff --git a/patches/ufw/01-move-from-lib-to-usr-lib.patch b/patches/ufw/01-move-from-lib-to-usr-lib.patch
new file mode 100644
index 0000000..1ceb864
--- /dev/null
+++ b/patches/ufw/01-move-from-lib-to-usr-lib.patch
@@ -0,0 +1,39 @@
+commit 58275d6974b8f5df8923ffb81a56825b88e36888
+Author: T.J. Townsend <[email protected]>
+Date:   Thu Dec 18 16:41:01 2025 -0500
+
+    move from /lib to /usr/lib
+    
+    https://bugs.archlinux.org/task/28769
+
+diff --git a/setup.py b/setup.py
+index 1c0e620..4d192b0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -54,7 +54,7 @@ class Install(_install, object):
+             return
+ 
+         real_confdir = os.path.join('/etc')
+-        real_statedir = os.path.join('/lib', 'ufw')
++        real_statedir = os.path.join('/usr/lib', 'ufw')
+         real_prefix = self.prefix
+         if self.home != None:
+             real_confdir = self.home + real_confdir
+@@ -113,7 +113,7 @@ class Install(_install, object):
+         if self.root != None:
+             prefix = self.root + real_prefix
+ 
+-        script = os.path.join(prefix, 'sbin', 'ufw')
++        script = os.path.join(prefix, 'bin', 'ufw')
+         manpage = os.path.join(prefix, 'share', 'man', 'man8', 'ufw.8')
+         manpage_f = os.path.join(prefix, 'share', 'man', 'man8', \
+                                  'ufw-framework.8')
+@@ -253,7 +253,7 @@ for e in ['iptables']:
+     # /usr/sbin/iptables to /sbin/iptables. Debian bullseye moves iptables
+     # to /usr/sbin with no symlink in /sbin except on upgrades. To accomodate
+     # buildds that may still have the old iptables, search /usr/sbin first
+-    for dir in ['/usr/sbin', '/sbin', '/usr/bin', '/bin', '/usr/local/sbin', \
++    for dir in ['/usr/bin', '/bin', '/usr/bin', '/bin', '/usr/local/bin', \
+                 '/usr/local/bin']:
+         if e == "iptables":
+             if os.path.exists(os.path.join(dir, e)):
diff --git a/patches/ufw/01-move-from-lib-to-usr-lib.patch.license b/patches/ufw/01-move-from-lib-to-usr-lib.patch.license
new file mode 100644
index 0000000..94bbf5a
--- /dev/null
+++ b/patches/ufw/01-move-from-lib-to-usr-lib.patch.license
@@ -0,0 +1,3 @@
+SPDX-License-Identifier: 0BSD
+SPDX-FileCopyrightText: Arch Linux Contributors
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.