* [PATCH 11/14] t/convert-compact: allow S_ISGID bit
2023-12-13 0:50 5% [PATCH 00/14] Alpine Linux support Eric Wong
@ 2023-12-13 0:50 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-12-13 0:50 UTC (permalink / raw)
To: meta
My user home directory on Alpine has S_ISGID set on it and every
subdirectory inherits it. This includes my work tree and the
t/data-gen/* subdirectories. So just ignore the presence (or
non-presence) of the S_ISGID bit on directories descended from
the cached t/data-gen/* directories.
Now, public-inbox-convert may want to preserve S_ISGID on the
newly-created v2 inbox, but that's a separate discussion.
---
t/convert-compact.t | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/convert-compact.t b/t/convert-compact.t
index c7b7f77e..b123f17b 100644
--- a/t/convert-compact.t
+++ b/t/convert-compact.t
@@ -35,14 +35,14 @@ EOF
$im->add($eml) or BAIL_OUT '->add';
};
umask(077) or BAIL_OUT "umask: $!";
-oct_is(((stat("$ibx->{inboxdir}/public-inbox"))[2]) & 07777, 0755,
+oct_is(((stat("$ibx->{inboxdir}/public-inbox"))[2]) & 05777, 0755,
'sharedRepository respected for v1');
-oct_is(((stat("$ibx->{inboxdir}/public-inbox/msgmap.sqlite3"))[2]) & 07777,
+oct_is(((stat("$ibx->{inboxdir}/public-inbox/msgmap.sqlite3"))[2]) & 05777,
0644, 'sharedRepository respected for v1 msgmap');
my @xdir = glob("$ibx->{inboxdir}/public-inbox/xap*/*");
foreach (@xdir) {
my @st = stat($_);
- oct_is($st[2] & 07777, -f _ ? 0644 : 0755,
+ oct_is($st[2] & 05777, -f _ ? 0644 : 0755,
'sharedRepository respected on file after convert');
}
@@ -55,7 +55,7 @@ ok(run_script($cmd, undef, $rdr), 'v1 compact works');
@xdir = glob("$ibx->{inboxdir}/public-inbox/xap*");
is(scalar(@xdir), 1, 'got one xapian directory after compact');
-oct_is(((stat($xdir[0]))[2]) & 07777, 0755,
+oct_is(((stat($xdir[0]))[2]) & 05777, 0755,
'sharedRepository respected on v1 compact');
my $hwm = do {
@@ -71,7 +71,7 @@ ok(run_script($cmd, undef, $rdr), 'convert --no-index works');
$cmd = [ '-convert', $ibx->{inboxdir}, "$tmpdir/x/v2" ];
ok(run_script($cmd, undef, $rdr), 'convert works');
@xdir = glob("$tmpdir/x/v2/xap*/*");
-foreach (@xdir) {
+for (@xdir) { # TODO: should public-inbox-convert preserve S_ISGID bit?
my @st = stat($_);
oct_is($st[2] & 07777, -f _ ? 0644 : 0755,
'sharedRepository respected after convert');
^ permalink raw reply related [relevance 7%]
* [PATCH 00/14] Alpine Linux support
@ 2023-12-13 0:50 5% Eric Wong
2023-12-13 0:50 7% ` [PATCH 11/14] t/convert-compact: allow S_ISGID bit Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-12-13 0:50 UTC (permalink / raw)
To: meta
I haven't tested every single possible package combination, but
I think this is enough to get started.
Patch 3 was a WTF moment for me.
Some of these are relevant for other platforms, as well, and
patch 7 decoupling from Inline::C is a good step towards making
our codebase more modular.
Patch 12 is a good fix regardless.
Eric Wong (14):
t/io: strace is optional on Linux
tests: account for missing git-http-backend
t/cindex*: skip --join when join(1) is missing
tests: attempt compatibility w/ busybox lsof
lei inspect: drop unneeded strftime import
treewide: avoid strftime %k for portability
xap_helper_cxx: decouple from Inline::C
xap_helper_cxx: support clang w/o `c++' executable
install: updates for Alpine Linux and apk
test_common: extract oct_is from search.t
t/convert-compact: allow S_ISGID bit
www_coderepo: fix read buffering
gzip_filter: use OO ->zflush dispatch
t/lei-import: relax EIO regexp
install/deps.perl | 38 +++++++++++++++++++++----
install/os.perl | 12 ++++++--
lib/PublicInbox/Admin.pm | 10 ++++++-
lib/PublicInbox/ExtSearchIdx.pm | 4 +--
lib/PublicInbox/GzipFilter.pm | 2 +-
lib/PublicInbox/Hval.pm | 6 +++-
lib/PublicInbox/LeiInspect.pm | 1 -
lib/PublicInbox/LeiMirror.pm | 4 +--
lib/PublicInbox/LeiXSearch.pm | 3 +-
lib/PublicInbox/RepoAtom.pm | 4 +--
lib/PublicInbox/TestCommon.pm | 50 +++++++++++++++++++++++++++++++--
lib/PublicInbox/WwwCoderepo.pm | 6 ++--
lib/PublicInbox/WwwStatic.pm | 5 ++--
lib/PublicInbox/XapHelperCxx.pm | 26 +++++++++++------
t/cindex-join.t | 1 +
t/cindex.t | 11 ++++----
t/clone-coderepo.t | 1 +
t/convert-compact.t | 20 ++++++-------
t/ds-leak.t | 5 +---
t/httpd-corner.t | 31 ++++++++------------
t/httpd.t | 1 +
t/lei-import.t | 5 ++--
t/lei-mirror.t | 1 +
t/nntpd.t | 16 +++++------
t/search.t | 5 ----
t/solver_git.t | 8 ++++--
t/v2reindex.t | 5 ++--
t/www_listing.t | 1 +
t/xap_helper.t | 6 ++--
xt/msgtime_cmp.t | 2 +-
30 files changed, 190 insertions(+), 100 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-12-13 0:50 5% [PATCH 00/14] Alpine Linux support Eric Wong
2023-12-13 0:50 7% ` [PATCH 11/14] t/convert-compact: allow S_ISGID bit Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).