dbscripts merge requestshttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests2023-12-26T20:50:28Zhttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/50fix(db-functions): fix locking issue that overwrote the same fd2023-12-26T20:50:28ZLevente Polyakanthraxx@archlinux.orgfix(db-functions): fix locking issue that overwrote the same fdCalling `acquire_fd` in a subshell doesn't populate the global lockfd associate array properly. This resulted in the reuse of the same fd multiple times, effectively only holding a single latest lock and releasing any previous.
Fix the ...Calling `acquire_fd` in a subshell doesn't populate the global lockfd associate array properly. This resulted in the reuse of the same fd multiple times, effectively only holding a single latest lock and releasing any previous.
Fix the issue by avoiding a global variable that causes issues in subshell calls by using the file descriptor table directly. Instead of storing file descriptors, the lookup call iterates through all fds and checks their handle. In case a file is not yet opened, allocate the next free fd between 4 and 1023.
Operating directly on the file descriptor table has the nice side effect that we avoid reusing descriptors by accident in case they have been opened for none locking purpose within the statically defined range.
Reported-by: Felix Yan [felixonmars@archlinux.org](mailto:felixonmars@archlinux.orgCo-authored-by)
Co-authored-by: Felix Yan felixonmars@archlinux.org
Signed-off-by: Levente Polyak anthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/42fix(db-move): correct a typo2023-06-08T18:54:30ZFelix Yanfelixonmars@archlinux.orgfix(db-move): correct a typoFixes db-move from the following issue:
```
/packages/db-move: line 52: fetch_pkgbuil: command not found
```Fixes db-move from the following issue:
```
/packages/db-move: line 52: fetch_pkgbuil: command not found
```Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/36Use zst to compress repo databases2023-01-06T04:54:00ZAllan McRaeUse zst to compress repo databasesRepos become about 9% smaller without performance loss.
Signed-off-by: Allan McRae <allan@archlinux.org>Repos become about 9% smaller without performance loss.
Signed-off-by: Allan McRae <allan@archlinux.org>https://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/52Add package signatures back to repo desc files and fix various other issues2024-03-28T13:56:15ZDavid RungeAdd package signatures back to repo desc files and fix various other issuesWith pacman 6.1 the addition of package signatures to the repository
sync database "desc" file has been demoted to the `--include-sigs`
options.
We want signatures in our sync database because it allows us to search
for signer of a pack...With pacman 6.1 the addition of package signatures to the repository
sync database "desc" file has been demoted to the `--include-sigs`
options.
We want signatures in our sync database because it allows us to search
for signer of a package using `pacman -Sii`.
Replace the use of sq with rsop as the SOP interfaces are not changing and sq breaks on every release.
Fix various issues wrt GnuPG >= 2.4 and pacman >= 6.1.https://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/51fix(test): adapt tests to sq 0.33.0 cli changes2024-02-14T23:37:52ZChristian Heuselfix(test): adapt tests to sq 0.33.0 cli changesSigned-off-by: Christian Heusel <christian@heusel.eu>Signed-off-by: Christian Heusel <christian@heusel.eu>Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/49db-functions: fix locking issues due to all locks share the same fd2023-12-26T20:50:45ZFelix Yanfelixonmars@archlinux.orgdb-functions: fix locking issues due to all locks share the same fdCalling `acquire_fd` in a subshell doesn't populate the global lockfd
associate array properly. Let's use return code to pass the value to
avoid the subshell.
Fixes locking issues with db-update where a subsequence unlock on a
different...Calling `acquire_fd` in a subshell doesn't populate the global lockfd
associate array properly. Let's use return code to pass the value to
avoid the subshell.
Fixes locking issues with db-update where a subsequence unlock on a
different lock will release the first lock guard of the whole operation
because all locks always reuse the same fd due to this bug.https://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/48fix(coverage): do not suppress errors and print statistics2024-02-15T19:00:21ZLevente Polyakanthraxx@archlinux.orgfix(coverage): do not suppress errors and print statisticsLevente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/47fix(db-functions): Lock state repo before creating a file2023-12-02T19:22:44ZJan Alexander Steffens (heftig)heftig@archlinux.orgfix(db-functions): Lock state repo before creating a fileMaybe this doesn't matter because the change isn't staged yet anyway,
but it makes me feel safer.Maybe this doesn't matter because the change isn't staged yet anyway,
but it makes me feel safer.https://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/46db-update: Empty arrays each iteration2023-11-04T11:39:40ZJan Alexander Steffens (heftig)heftig@archlinux.orgdb-update: Empty arrays each iterationThis broke db-update for more than one repo at a time. Most importantly,
because the `pkgkeys` array kept accumulating keys, we created bogus
copies of state repo entries, "releasing" packages into multiple repos.This broke db-update for more than one repo at a time. Most importantly,
because the `pkgkeys` array kept accumulating keys, we created bogus
copies of state repo entries, "releasing" packages into multiple repos.Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/45transaction handling and reworked checks2023-10-21T20:07:41ZLevente Polyakanthraxx@archlinux.orgtransaction handling and reworked checksImplement transactional handling and reworked to perform all checks before acting.
Fixes #21 #22 #30 #35 #39 #40 #44 #42 #45Implement transactional handling and reworked to perform all checks before acting.
Fixes #21 #22 #30 #35 #39 #40 #44 #42 #45Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/44fix(git): lock state repo for each transaction avoiding script aborts2023-06-11T19:01:29ZLevente Polyakanthraxx@archlinux.orgfix(git): lock state repo for each transaction avoiding script abortsThis fixes the issue that a Git operation may already be running on the
state repo leading to an error which subsequently aborts db operations.
Fixes #32
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>This fixes the issue that a Git operation may already be running on the
state repo leading to an error which subsequently aborts db operations.
Fixes #32
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/43chore(acl): allow all packagers to use the unstable desktop repos2023-06-11T19:31:22ZLevente Polyakanthraxx@archlinux.orgchore(acl): allow all packagers to use the unstable desktop reposFixes #37
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>Fixes #37
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/41feature(db-move): check if package repo is up to date before fetching2023-06-06T22:36:24ZLevente Polyakanthraxx@archlinux.orgfeature(db-move): check if package repo is up to date before fetchingThis avoids most fetch scenarios when moving packages between repos as
the released tags should already be available from a previous db-update.
Now the existence of the expected tag is checked prior to any Git fetch
operations, massivel...This avoids most fetch scenarios when moving packages between repos as
the released tags should already be available from a previous db-update.
Now the existence of the expected tag is checked prior to any Git fetch
operations, massively speeding up big rebuild moves.
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/40Allow all packagers access to multilib2023-06-07T22:47:25ZJelle van der WaaAllow all packagers access to multilibLevente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/39db-functions: rename chk_license -> check_license2022-12-11T18:52:12ZLevente Polyakanthraxx@archlinux.orgdb-functions: rename chk_license -> check_licenseRequires !38Requires !38Levente Polyakanthraxx@archlinux.orgLevente Polyakanthraxx@archlinux.orghttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/38ci: compatibility with latest gitlab coverage report syntax2022-12-11T17:44:17ZLevente Polyakanthraxx@archlinux.orgci: compatibility with latest gitlab coverage report syntaxJelle van der WaaLevente Polyakanthraxx@archlinux.orgJelle van der Waahttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/37git support2023-05-19T15:36:18ZLevente Polyakanthraxx@archlinux.orggit supporthttps://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/35ftpdir-cleanup.bats: Ensure we check for the correct package2022-01-31T20:06:55ZMorten Linderudfoxboron@archlinux.orgftpdir-cleanup.bats: Ensure we check for the correct packageSigned-off-by: Morten Linderud <morten@linderud.pw>Signed-off-by: Morten Linderud <morten@linderud.pw>https://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/34Add x86_64_v3 architecture2023-01-06T04:54:00ZAllan McRaeAdd x86_64_v3 architectureSigned-off-by: Allan McRae <allan@archlinux.org>Signed-off-by: Allan McRae <allan@archlinux.org>https://gitlab.archlinux.org/archlinux/dbscripts/-/merge_requests/33Clean ups from the ftpdir-cleanup source2022-01-27T08:39:51ZMorten Linderudfoxboron@archlinux.orgClean ups from the ftpdir-cleanup sourceI found a few issues in the end :)I found a few issues in the end :)