Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] octoxbps: fix detection of Void Linux
@ 2022-03-19 20:05 chili-b
  2022-03-19 20:12 ` [PR REVIEW] " classabbyamp
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chili-b @ 2022-03-19 20:05 UTC (permalink / raw)
  To: ml

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

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

https://github.com/chili-b/void-packages octoxbps
https://github.com/void-linux/void-packages/pull/36228

octoxbps: fix detection of Void Linux
Without this change, OctoXBPS fails to detect that it is running on Void
Linux which causes a password prompt to be shown every time OctoXBPS is
opened.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)


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

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

From 2030dee3ae963bc03ef8116ebc5c4d6971c12c64 Mon Sep 17 00:00:00 2001
From: chili-b <dexter.gaonshatford@gmail.com>
Date: Sat, 19 Mar 2022 16:00:40 -0400
Subject: [PATCH] octoxbps: fix detection of Void Linux

Without this change, OctoXBPS fails to detect that it is running on Void
Linux which causes a password prompt to be shown every time OctoXBPS is
opened.
---
 ...tion-of-Void-Linux-in-getLinuxDistro.patch | 39 +++++++++++++++++++
 srcpkgs/octoxbps/template                     |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch

diff --git a/srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch b/srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch
new file mode 100644
index 000000000000..8c0e139286ca
--- /dev/null
+++ b/srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch
@@ -0,0 +1,39 @@
+From 0d06083d98b831e5b05bfb044c93dfe52c3cd9d5 Mon Sep 17 00:00:00 2001
+From: chili-b <dexter.gaonshatford@gmail.com>
+Date: Sat, 19 Mar 2022 15:33:41 -0400
+Subject: [PATCH] Fix detection of Void Linux in getLinuxDistro
+
+Before this change, OctoXBPS detects Void Linux based on whether or not
+the string, `PRETTY_NAME="void"`, occurs in the file, `/etc/os-release`.
+As of March 15 2022, the contents of `/etc/os-release` have been changed
+and `PRETTY_NAME="Void Linux"` replaces the previous value.
+(see https://github.com/void-linux/void-packages/commit/1dfc401d1237120e8e936627e7e28d2441916e80)
+
+This change is important because OctoXBPS only checks for the existence
+of the local package db if it detects that it is running on either Void
+Linux or Trident Linux. If OctoXBPS does not detect that it is running
+on either distribution (which it doesn't without this change), it will
+prompt for elevated privileges in order to synchronize the local package
+database with the remote database using `xbps-install -Syy` every time
+it is started, regardless of whether or not there are remote changes
+that need to be synced.
+---
+ src/unixcommand.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp
+index 8a88a2f..ea84cd8 100644
+--- a/src/unixcommand.cpp
++++ b/src/unixcommand.cpp
+@@ -709,7 +709,7 @@ LinuxDistro UnixCommand::getLinuxDistro()
+ 
+       QString contents = file.readAll();
+ 
+-      if (contents.contains("PRETTY_NAME=\"void\""))
++      if (contents.contains("PRETTY_NAME=\"Void Linux\""))
+       {
+         ret = ectn_VOID;
+       }
+-- 
+2.35.1
+
diff --git a/srcpkgs/octoxbps/template b/srcpkgs/octoxbps/template
index fef8bb3ab323..8315f57ff0d8 100644
--- a/srcpkgs/octoxbps/template
+++ b/srcpkgs/octoxbps/template
@@ -1,7 +1,7 @@
 # Template file for 'octoxbps'
 pkgname=octoxbps
 version=0.3.0
-revision=2
+revision=3
 build_style=qmake
 hostmakedepends="qt5-qmake pkg-config qt5-host-tools"
 makedepends="qt5-declarative-devel qtermwidget-devel"

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

* Re: [PR REVIEW] octoxbps: fix detection of Void Linux
  2022-03-19 20:05 [PR PATCH] octoxbps: fix detection of Void Linux chili-b
@ 2022-03-19 20:12 ` classabbyamp
  2022-03-19 20:56 ` [PR PATCH] [Updated] " chili-b
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-03-19 20:12 UTC (permalink / raw)
  To: ml

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

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36228#discussion_r830522676

Comment:
```suggestion
+      if (contents.contains("ID=\"void\""))
```
`ID` or `ID_LIKE` would be the proper way to check this, as it should never change, unlike `PRETTY_NAME`. (see also [the os-release spec](https://www.freedesktop.org/software/systemd/man/os-release.html))

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

* Re: [PR PATCH] [Updated] octoxbps: fix detection of Void Linux
  2022-03-19 20:05 [PR PATCH] octoxbps: fix detection of Void Linux chili-b
  2022-03-19 20:12 ` [PR REVIEW] " classabbyamp
@ 2022-03-19 20:56 ` chili-b
  2022-03-19 21:03 ` [PR REVIEW] " chili-b
  2022-03-20 19:25 ` [PR PATCH] [Merged]: " leahneukirchen
  3 siblings, 0 replies; 5+ messages in thread
From: chili-b @ 2022-03-19 20:56 UTC (permalink / raw)
  To: ml

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

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

https://github.com/chili-b/void-packages octoxbps
https://github.com/void-linux/void-packages/pull/36228

octoxbps: fix detection of Void Linux
Without this change, OctoXBPS fails to detect that it is running on Void
Linux which causes a password prompt to be shown every time OctoXBPS is
opened.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)


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

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

From afbfd6a78d7f037ed26e08acddad9b7eccf0f642 Mon Sep 17 00:00:00 2001
From: chili-b <dexter.gaonshatford@gmail.com>
Date: Sat, 19 Mar 2022 16:00:40 -0400
Subject: [PATCH] octoxbps: fix detection of Void Linux

Without this change, OctoXBPS fails to detect that it is running on Void
Linux which causes a password prompt to be shown every time OctoXBPS is
opened.
---
 ...tion-of-Void-Linux-in-getLinuxDistro.patch | 42 +++++++++++++++++++
 srcpkgs/octoxbps/template                     |  2 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch

diff --git a/srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch b/srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch
new file mode 100644
index 000000000000..9941fc6da8c2
--- /dev/null
+++ b/srcpkgs/octoxbps/patches/0001-Fix-detection-of-Void-Linux-in-getLinuxDistro.patch
@@ -0,0 +1,42 @@
+From 41e0ba546e85f812d89899a3034d67256ec5f23c Mon Sep 17 00:00:00 2001
+From: chili-b <dexter.gaonshatford@gmail.com>
+Date: Sat, 19 Mar 2022 15:33:41 -0400
+Subject: [PATCH] Fix detection of Void Linux in getLinuxDistro
+
+Before this change, OctoXBPS detects Void Linux based on whether or not
+the string, `PRETTY_NAME="void"`, occurs in the file, `/etc/os-release`.
+As of March 15 2022, the contents of `/etc/os-release` have been changed
+and `PRETTY_NAME="Void Linux"` replaces the previous value.
+(see https://github.com/void-linux/void-packages/commit/1dfc401d1237120e8e936627e7e28d2441916e80)
+
+With this change, Void Linux is detected based on the value of `ID` in
+`/etc/os-release` which is less subject to change.
+
+This change is important because OctoXBPS only checks for the existence
+of the local package db if it detects that it is running on either Void
+Linux or Trident Linux. If OctoXBPS does not detect that it is running
+on either distribution (which it doesn't without this change), it will
+prompt for elevated privileges in order to synchronize the local package
+database with the remote database using `xbps-install -Syy` every time
+it is started, regardless of whether or not there are remote changes
+that need to be synced.
+---
+ src/unixcommand.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp
+index 8a88a2f..1762c4b 100644
+--- a/src/unixcommand.cpp
++++ b/src/unixcommand.cpp
+@@ -709,7 +709,7 @@ LinuxDistro UnixCommand::getLinuxDistro()
+ 
+       QString contents = file.readAll();
+ 
+-      if (contents.contains("PRETTY_NAME=\"void\""))
++      if (contents.contains("ID=\"void\""))
+       {
+         ret = ectn_VOID;
+       }
+-- 
+2.35.1
+
diff --git a/srcpkgs/octoxbps/template b/srcpkgs/octoxbps/template
index fef8bb3ab323..8315f57ff0d8 100644
--- a/srcpkgs/octoxbps/template
+++ b/srcpkgs/octoxbps/template
@@ -1,7 +1,7 @@
 # Template file for 'octoxbps'
 pkgname=octoxbps
 version=0.3.0
-revision=2
+revision=3
 build_style=qmake
 hostmakedepends="qt5-qmake pkg-config qt5-host-tools"
 makedepends="qt5-declarative-devel qtermwidget-devel"

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

* Re: [PR REVIEW] octoxbps: fix detection of Void Linux
  2022-03-19 20:05 [PR PATCH] octoxbps: fix detection of Void Linux chili-b
  2022-03-19 20:12 ` [PR REVIEW] " classabbyamp
  2022-03-19 20:56 ` [PR PATCH] [Updated] " chili-b
@ 2022-03-19 21:03 ` chili-b
  2022-03-20 19:25 ` [PR PATCH] [Merged]: " leahneukirchen
  3 siblings, 0 replies; 5+ messages in thread
From: chili-b @ 2022-03-19 21:03 UTC (permalink / raw)
  To: ml

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

New review comment by chili-b on void-packages repository

https://github.com/void-linux/void-packages/pull/36228#discussion_r830527067

Comment:
Done

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

* Re: [PR PATCH] [Merged]: octoxbps: fix detection of Void Linux
  2022-03-19 20:05 [PR PATCH] octoxbps: fix detection of Void Linux chili-b
                   ` (2 preceding siblings ...)
  2022-03-19 21:03 ` [PR REVIEW] " chili-b
@ 2022-03-20 19:25 ` leahneukirchen
  3 siblings, 0 replies; 5+ messages in thread
From: leahneukirchen @ 2022-03-20 19:25 UTC (permalink / raw)
  To: ml

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

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

octoxbps: fix detection of Void Linux
https://github.com/void-linux/void-packages/pull/36228

Description:
Without this change, OctoXBPS fails to detect that it is running on Void
Linux which causes a password prompt to be shown every time OctoXBPS is
opened.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)


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

end of thread, other threads:[~2022-03-20 19:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19 20:05 [PR PATCH] octoxbps: fix detection of Void Linux chili-b
2022-03-19 20:12 ` [PR REVIEW] " classabbyamp
2022-03-19 20:56 ` [PR PATCH] [Updated] " chili-b
2022-03-19 21:03 ` [PR REVIEW] " chili-b
2022-03-20 19:25 ` [PR PATCH] [Merged]: " leahneukirchen

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).