Compare commits
7 commits
master
...
release/7.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1f38429b1c | ||
![]() |
c685ae6412 | ||
![]() |
e3aedfb7aa | ||
![]() |
2a147eb7bb | ||
![]() |
77361331ae | ||
![]() |
6270dd81a3 | ||
![]() |
7cf2b0186d |
7 changed files with 20 additions and 5 deletions
|
@ -297,7 +297,7 @@ Environment Variables
|
|||
**BUILDTOOLVER=**"<version>"::
|
||||
The version of the '$BUILDTOOL' used.
|
||||
|
||||
**MAKEPKG_LINT_PKGBUILD=**0
|
||||
**MAKEPKG_LINT_PKGBUILD=**0::
|
||||
Setting to 0 disables PKGBUILD linting within makepkg. Useful on systems
|
||||
with slow bash subshell operations, or on PKGBUILDs with extreme amounts of
|
||||
package splitting.
|
||||
|
|
|
@ -76,13 +76,16 @@ static mode_t _getumask(void)
|
|||
static int finalize_download_file(const char *filename)
|
||||
{
|
||||
struct stat st;
|
||||
uid_t myuid = getuid();
|
||||
ASSERT(filename != NULL, return -1);
|
||||
ASSERT(stat(filename, &st) == 0, return -1);
|
||||
if(st.st_size == 0) {
|
||||
unlink(filename);
|
||||
return 1;
|
||||
}
|
||||
ASSERT(chown(filename, 0, 0) != -1, return -1);
|
||||
if(myuid == 0) {
|
||||
ASSERT(chown(filename, 0, 0) != -1, return -1);
|
||||
}
|
||||
ASSERT(chmod(filename, ~(_getumask()) & 0666) != -1, return -1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1356,6 +1359,7 @@ int SYMEXPORT alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls,
|
|||
if(payloads) {
|
||||
event.type = ALPM_EVENT_PKG_RETRIEVE_START;
|
||||
event.pkg_retrieve.num = alpm_list_count(payloads);
|
||||
event.pkg_retrieve.total_size = 0;
|
||||
EVENT(handle, &event);
|
||||
if(_alpm_download(handle, payloads, cachedir, temporary_cachedir) == -1) {
|
||||
_alpm_log(handle, ALPM_LOG_WARNING, _("failed to retrieve some files\n"));
|
||||
|
|
|
@ -222,7 +222,9 @@ bool _alpm_sandbox_process_cb_download(alpm_handle_t *handle, int callback_pipe)
|
|||
ASSERT(read_from_pipe(callback_pipe, filename, filename_size) != -1, FREE(filename); return false);
|
||||
filename[filename_size] = '\0';
|
||||
|
||||
handle->dlcb(handle->dlcb_ctx, filename, type, &cb_data);
|
||||
if(handle->dlcb) {
|
||||
handle->dlcb(handle->dlcb_ctx, filename, type, &cb_data);
|
||||
}
|
||||
FREE(filename);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -150,6 +150,9 @@ bool _alpm_sandbox_fs_restrict_writes_to(alpm_handle_t *handle, const char *path
|
|||
path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC | O_DIRECTORY);
|
||||
path_beneath.allowed_access = _LANDLOCK_ACCESS_FS_READ | _LANDLOCK_ACCESS_FS_WRITE | _LANDLOCK_ACCESS_FS_TRUNCATE;
|
||||
|
||||
/* make sure allowed_access is a subset of handled_access_fs, which may change for older landlock ABI */
|
||||
path_beneath.allowed_access &= ruleset_attr.handled_access_fs;
|
||||
|
||||
if(landlock_add_rule(ruleset_fd, LANDLOCK_RULE_PATH_BENEATH, &path_beneath, 0) == 0) {
|
||||
if(landlock_restrict_self(ruleset_fd, 0)) {
|
||||
_alpm_log(handle, ALPM_LOG_ERROR, _("restricting filesystem access failed because the landlock ruleset could not be applied!\n"));
|
||||
|
|
|
@ -817,6 +817,8 @@ static int download_files(alpm_handle_t *handle)
|
|||
}
|
||||
|
||||
event.type = ALPM_EVENT_PKG_RETRIEVE_START;
|
||||
event.pkg_retrieve.total_size = 0;
|
||||
event.pkg_retrieve.num = 0;
|
||||
|
||||
/* sum up the number of packages to download and its total size */
|
||||
for(i = files; i; i = i->next) {
|
||||
|
|
|
@ -49,7 +49,7 @@ download_git() {
|
|||
|
||||
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
|
||||
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
|
||||
if ! git clone --origin=origin ---mirror "$url" "$dir"; then
|
||||
if ! git clone --origin=origin --mirror "$url" "$dir"; then
|
||||
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
|
||||
plainerr "$(gettext "Aborting...")"
|
||||
exit 1
|
||||
|
|
|
@ -363,12 +363,16 @@ char *strreplace(const char *str, const char *needle, const char *replace)
|
|||
const char *p = NULL, *q = NULL;
|
||||
char *newstr = NULL, *newp = NULL;
|
||||
alpm_list_t *i = NULL, *list = NULL;
|
||||
size_t needlesz = strlen(needle), replacesz = strlen(replace);
|
||||
size_t needlesz = strlen(needle), replacesz;
|
||||
size_t newsz;
|
||||
|
||||
if(!str) {
|
||||
return NULL;
|
||||
}
|
||||
if(!replace) {
|
||||
replace = "";
|
||||
}
|
||||
replacesz = strlen(replace);
|
||||
|
||||
p = str;
|
||||
q = strstr(p, needle);
|
||||
|
|
Loading…
Add table
Reference in a new issue