Github messages for voidlinux
 help / color / mirror / Atom feed
From: hholst80 <hholst80@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] vifm: update to 0.13
Date: Mon, 24 Jul 2023 17:26:24 +0200	[thread overview]
Message-ID: <20230724152624.YZsEKN9-BaSv2pztH_xVVewJlRF2GsLarLQw9w7A4Ew@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44870@inbox.vuxu.org>

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

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

https://github.com/hholst80/void-packages master
https://github.com/void-linux/void-packages/pull/44870

vifm: update to 0.13
#### Testing the changes
- I tested the changes in this PR: Litterally works on my machine.

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


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

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

From 8cd59f1a586066796f03b3234bb0252e37ac5404 Mon Sep 17 00:00:00 2001
From: Henrik Holst <6200749+hholst80@users.noreply.github.com>
Date: Wed, 5 Jul 2023 22:32:17 +0000
Subject: [PATCH] Update vifm to 0.13

Co-authored-by: xaizek <xaizek@posteo.net>
---
 .../vifm/patches/disable-failed-tests.patch   |  38 -----
 .../vifm/patches/vifm-v0.13-musl-tests.patch  | 154 ++++++++++++++++++
 srcpkgs/vifm/template                         |  12 +-
 3 files changed, 160 insertions(+), 44 deletions(-)
 delete mode 100644 srcpkgs/vifm/patches/disable-failed-tests.patch
 create mode 100644 srcpkgs/vifm/patches/vifm-v0.13-musl-tests.patch

diff --git a/srcpkgs/vifm/patches/disable-failed-tests.patch b/srcpkgs/vifm/patches/disable-failed-tests.patch
deleted file mode 100644
index f674a4be66d82..0000000000000
--- a/srcpkgs/vifm/patches/disable-failed-tests.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git tests/Makefile tests/Makefile
-index 1419a4edd..a213d70ef 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -67,14 +67,14 @@ B ?=
- BUILD := $(B)bin/build/$(BINSUBDIR)
- 
- # engine
--suites += abbrevs autocmds cmds commands completion keys options parsing
-+suites += abbrevs autocmds cmds completion keys options parsing
- suites += text_buffer variables
- # io
- suites += ioeta ionotif iop ior
- # ui
- suites += colmgr column_view viewcolumns_parser
- # everything else
--suites += bmarks env escape fileops filetype filter lua misc undo utils
-+suites += bmarks env escape fileops filetype filter undo utils
- 
- # these are built, but not automatically executed
- apps := fuzz regs_shmem_app
-diff --git tests/fileops/chown.c tests/fileops/chown.c
-index ef7b1a405..cd2c33388 100644
---- a/tests/fileops/chown.c
-+++ b/tests/fileops/chown.c
-@@ -65,12 +65,10 @@ TEST(file_group_is_changed, IF(has_more_than_one_group))
- 	mark_selection_or_current(curr_view);
- 	fops_chown(0, 1, 0, gid1);
- 	assert_success(os_stat("dir/chown-me", &s));
--	assert_true(s.st_gid == gid1);
- 
- 	mark_selection_or_current(curr_view);
- 	fops_chown(0, 1, 0, gid2);
- 	assert_success(os_stat("dir/chown-me", &s));
--	assert_true(s.st_gid == gid2);
- 
- 	assert_success(unlink("dir/chown-me"));
- 	assert_success(rmdir("dir"));
diff --git a/srcpkgs/vifm/patches/vifm-v0.13-musl-tests.patch b/srcpkgs/vifm/patches/vifm-v0.13-musl-tests.patch
new file mode 100644
index 0000000000000..a134e59ebdf62
--- /dev/null
+++ b/srcpkgs/vifm/patches/vifm-v0.13-musl-tests.patch
@@ -0,0 +1,154 @@
+From c97f144231afbeb4215659d5c685fdf1e3fe5612 Mon Sep 17 00:00:00 2001
+From: xaizek <xaizek@posteo.net>
+Date: Sat, 8 Jul 2023 15:02:37 +0300
+Subject: [PATCH] Fix running tests with musl libc
+
+Thanks to Henrik Holst (a.k.a. hholst80).
+---
+ ChangeLog                       |  3 +++
+ src/filelist.c                  |  6 +++++-
+ src/opt_handlers.c              |  6 +++++-
+ src/ui/fileview.c               |  1 +
+ src/ui/ui.h                     |  3 +++
+ tests/misc/sort.c               | 13 ++++++++++---
+ tests/test-support/test-utils.c |  5 +++++
+ 7 files changed, 32 insertions(+), 5 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 21803c9e6..e6fcf5a36 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -78,6 +78,9 @@
+ 
+ 	Fixed performance degradation after preview consumes lots of color pairs.
+ 
++	Fixed running tests with musl libc.  Thanks to Henrik Holst (a.k.a.
++	hholst80).
++
+ 0.13-beta to 0.13 (2023-04-04)
+ 
+ 	Made "withicase" and "withrcase" affect how files are sorted before
+diff --git a/src/filelist.c b/src/filelist.c
+index 28d26c69f..a7121f238 100644
+--- a/src/filelist.c
++++ b/src/filelist.c
+@@ -329,7 +329,11 @@ flist_free_view(view_t *view)
+ 	modview_info_free(view->vi);
+ 	view->vi = NULL;
+ 
+-	regfree(&view->primary_group);
++	if(view->primary_group_set)
++	{
++		regfree(&view->primary_group);
++		view->primary_group_set = 0;
++	}
+ 
+ 	marks_clear_view(view);
+ 
+diff --git a/src/opt_handlers.c b/src/opt_handlers.c
+index 5d1c000b0..9905b2b7f 100644
+--- a/src/opt_handlers.c
++++ b/src/opt_handlers.c
+@@ -3301,9 +3301,13 @@ set_sortgroups(view_t *view, char **opt, char value[])
+ 	{
+ 		if(scope == OPT_LOCAL)
+ 		{
+-			regfree(&view->primary_group);
++			if(view->primary_group_set)
++			{
++				regfree(&view->primary_group);
++			}
+ 			(void)regexp_compile(&view->primary_group, first,
+ 					REG_EXTENDED | REG_ICASE);
++			view->primary_group_set = 1;
+ 		}
+ 		free(first);
+ 	}
+diff --git a/src/ui/fileview.c b/src/ui/fileview.c
+index 11c80fe8b..ef5f422be 100644
+--- a/src/ui/fileview.c
++++ b/src/ui/fileview.c
+@@ -253,6 +253,7 @@ fview_init(view_t *view)
+ 	view->sort_groups_g = strdup("");
+ 	(void)regexp_compile(&view->primary_group, view->sort_groups,
+ 			REG_EXTENDED | REG_ICASE);
++	view->primary_group_set = 1;
+ 
+ 	view->preview_prg = strdup("");
+ 	view->preview_prg_g = strdup("");
+diff --git a/src/ui/ui.h b/src/ui/ui.h
+index c9fee0782..886eb9d38 100644
+--- a/src/ui/ui.h
++++ b/src/ui/ui.h
+@@ -449,6 +449,9 @@ struct view_t
+ 	char *sort_groups, *sort_groups_g;
+ 	/* Primary group of sort_groups (not sort_groups_g) in compiled form. */
+ 	regex_t primary_group;
++	/* Indicates that primary_group was initialized, which is used to avoid
++	 * freeing uninitialized data or freeing it twice. */
++	int primary_group_set;
+ 
+ 	int history_num;    /* Number of used history elements. */
+ 	int history_pos;    /* Current position in history. */
+diff --git a/tests/misc/sort.c b/tests/misc/sort.c
+index 9938414b5..3db71db5b 100644
+--- a/tests/misc/sort.c
++++ b/tests/misc/sort.c
+@@ -409,8 +409,13 @@ TEST(groups_sorting_works)
+ 	lwin.dir_entry[6].origin = lwin.curr_dir;
+ 
+ 	update_string(&lwin.sort_groups, "-(done|todo).*");
++	if(lwin.primary_group_set)
++	{
++		regfree(&lwin.primary_group);
++	}
+ 	(void)regcomp(&lwin.primary_group, "-(done|todo).*",
+ 			REG_EXTENDED | REG_ICASE);
++	lwin.primary_group_set = 1;
+ 
+ 	/* Ascending sorting. */
+ 
+@@ -437,15 +442,17 @@ TEST(groups_sorting_works)
+ 	assert_string_equal("11-todo-publish", lwin.dir_entry[4].name);
+ 	assert_string_equal("1-done", lwin.dir_entry[5].name);
+ 	assert_string_equal("3-done", lwin.dir_entry[6].name);
+-
+-	regfree(&lwin.primary_group);
+-	update_string(&lwin.sort_groups, NULL);
+ }
+ 
+ TEST(global_groups_sorts_entries_list)
+ {
+ 	update_string(&lwin.sort_groups_g, "([0-9])");
++	if(lwin.primary_group_set)
++	{
++		regfree(&lwin.primary_group);
++	}
+ 	(void)regcomp(&lwin.primary_group, "([a-z])", REG_EXTENDED | REG_ICASE);
++	lwin.primary_group_set = 1;
+ 
+ 	dir_entry_t entry_list[] = { { .name = "a1" }, { .name = "b0" } };
+ 	entries_t entries = { entry_list, 2 };
+diff --git a/tests/test-support/test-utils.c b/tests/test-support/test-utils.c
+index 932bdc9c9..e3d9ba694 100644
+--- a/tests/test-support/test-utils.c
++++ b/tests/test-support/test-utils.c
+@@ -32,6 +32,7 @@
+ #include "../../src/utils/macros.h"
+ #include "../../src/utils/matcher.h"
+ #include "../../src/utils/path.h"
++#include "../../src/utils/regexp.h"
+ #include "../../src/utils/str.h"
+ #include "../../src/utils/string_array.h"
+ #include "../../src/utils/utils.h"
+@@ -254,6 +255,10 @@ view_setup(view_t *view)
+ 	view_set_sort(view->sort, SK_BY_NAME, SK_NONE);
+ 	view_set_sort(view->sort_g, SK_BY_NAME, SK_NONE);
+ 
++	/* The code assumes that this field is initialized. */
++	assert_success(regexp_compile(&view->primary_group, "", REG_ICASE));
++	view->primary_group_set = 1;
++
+ 	view->custom.entry_count = 0;
+ 	view->custom.entries = NULL;
+ 
diff --git a/srcpkgs/vifm/template b/srcpkgs/vifm/template
index 67cc901ec943c..28e09046a1b3b 100644
--- a/srcpkgs/vifm/template
+++ b/srcpkgs/vifm/template
@@ -1,20 +1,20 @@
 # Template file for 'vifm'
 pkgname=vifm
-version=0.12
+version=0.13
 revision=1
 build_style=gnu-configure
 configure_args="--without-gtk"
-hostmakedepends="mdocml"
+hostmakedepends="mdocml perl coreutils"
 makedepends="ncurses-devel file-devel"
 depends="desktop-file-utils"
-short_desc="Ncurses-based file manager with vi-like keybindings"
+short_desc="File manager with curses interface and a Vim-like environment"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://vifm.info/"
-distfiles="${SOURCEFORGE_SITE}/vifm/vifm-${version}.tar.bz2"
-checksum=33a9618f32b35b5b8c64483884f9ad09963ca8465b2935def79159028e27b2c0
+distfiles="https://github.com/vifm/vifm/releases/download/v${version}/vifm-${version}.tar.bz2"
+checksum=0d9293749a794076ade967ecdc47d141d85e450370594765391bdf1a9bd45075
 
-CFLAGS="-fcommon"
+CFLAGS="-fcommon -Wno-unused-result"
 
 post_install() {
 	vsconf data/vifmrc

  parent reply	other threads:[~2023-07-24 15:26 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 22:33 [PR PATCH] Update vifm " hholst80
2023-07-05 22:35 ` hholst80
2023-07-05 22:39 ` [PR PATCH] [Updated] " hholst80
2023-07-05 22:42 ` [PR REVIEW] " classabbyamp
2023-07-05 23:06 ` [PR PATCH] [Updated] " hholst80
2023-07-05 23:14 ` hholst80
2023-07-05 23:28 ` hholst80
2023-07-05 23:30 ` hholst80
2023-07-05 23:45 ` [PR REVIEW] " classabbyamp
2023-07-06 12:29 ` [PR PATCH] [Updated] " hholst80
2023-07-06 22:07 ` vifm: update " hholst80
2023-07-08 16:05 ` [PR PATCH] [Updated] " hholst80
2023-07-08 16:28 ` hholst80
2023-07-13 14:25 ` [PR PATCH] [Updated] " hholst80
2023-07-13 14:28 ` hholst80
2023-07-24 13:16 ` hholst80
2023-07-24 13:37 ` [PR REVIEW] " classabbyamp
2023-07-24 13:37 ` classabbyamp
2023-07-24 13:37 ` classabbyamp
2023-07-24 15:07 ` hholst80
2023-07-24 15:17 ` hholst80
2023-07-24 15:26 ` hholst80
2023-07-24 15:26 ` hholst80 [this message]
2023-07-24 15:29 ` xaizek
2023-07-24 15:30 ` classabbyamp
2023-07-24 16:13 ` ahesford
2023-07-24 17:01 ` xaizek
2023-07-24 17:02 ` xaizek
2023-07-24 19:43 ` hholst80
2023-07-24 20:24 ` ahesford
2023-07-24 20:24 ` [PR PATCH] [Closed]: " ahesford
2023-07-24 21:39 ` hholst80
2023-07-24 21:42 ` ahesford
2023-07-24 22:02 ` xaizek
2023-07-24 22:02 ` hholst80

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230724152624.YZsEKN9-BaSv2pztH_xVVewJlRF2GsLarLQw9w7A4Ew@z \
    --to=hholst80@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).