add XBPS_SYSLOG environment variable to overwrite configuration
This commit is contained in:
parent
d962eaaf3c
commit
a1a0167d80
4
NEWS
4
NEWS
@ -52,6 +52,10 @@ xbps-X.XX.X (2020-XX-XX):
|
|||||||
|
|
||||||
* xbps.d(5): describe ignorepkg more precisely. [chocimier]
|
* xbps.d(5): describe ignorepkg more precisely. [chocimier]
|
||||||
|
|
||||||
|
* libxbps, xbps-install(1), xbps-remove(1), xbps-reconfigure(1),
|
||||||
|
xbps-alternatives(1): add `XBPS_SYSLOG` environment variable to overwrite
|
||||||
|
syslog configuration option. [duncaen]
|
||||||
|
|
||||||
xbps-0.59.1 (2020-04-01):
|
xbps-0.59.1 (2020-04-01):
|
||||||
|
|
||||||
* libxbps: fixed a double free with malformed/incomplete
|
* libxbps: fixed a double free with malformed/incomplete
|
||||||
|
@ -69,6 +69,20 @@ Default package database (0.38 format). Keeps track of installed packages and pr
|
|||||||
.It Ar /var/cache/xbps
|
.It Ar /var/cache/xbps
|
||||||
Default cache directory to store downloaded binary packages.
|
Default cache directory to store downloaded binary packages.
|
||||||
.El
|
.El
|
||||||
|
.Sh ENVIRONMENT
|
||||||
|
.Bl -tag -width XBPS_TARGET_ARCH
|
||||||
|
.It Sy XBPS_ARCH
|
||||||
|
Overrides
|
||||||
|
.Xr uname 2
|
||||||
|
machine result with this value.
|
||||||
|
.It Sy XBPS_TARGET_ARCH
|
||||||
|
Sets the target architecture to this value.
|
||||||
|
.It Sy XBPS_SYSLOG
|
||||||
|
Overrides the
|
||||||
|
.Xr xbps.d 5
|
||||||
|
.Sy syslog=true|false
|
||||||
|
configuration option.
|
||||||
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr xbps-checkvers 1 ,
|
.Xr xbps-checkvers 1 ,
|
||||||
.Xr xbps-create 1 ,
|
.Xr xbps-create 1 ,
|
||||||
|
@ -245,6 +245,11 @@ This variable differs from
|
|||||||
in that it allows you to install packages partially, because
|
in that it allows you to install packages partially, because
|
||||||
configuration phase is skipped (the target binaries might not be compatible with
|
configuration phase is skipped (the target binaries might not be compatible with
|
||||||
the native architecture).
|
the native architecture).
|
||||||
|
.It Sy XBPS_SYSLOG
|
||||||
|
Overrides the
|
||||||
|
.Xr xbps.d 5
|
||||||
|
.Sy syslog=true|false
|
||||||
|
configuration option.
|
||||||
.El
|
.El
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
|
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
|
||||||
|
@ -71,6 +71,26 @@ Enables verbose messages.
|
|||||||
.It Fl V, Fl -version
|
.It Fl V, Fl -version
|
||||||
Show the version information.
|
Show the version information.
|
||||||
.El
|
.El
|
||||||
|
.Sh ENVIRONMENT
|
||||||
|
.Bl -tag -width XBPS_TARGET_ARCH
|
||||||
|
.It Sy XBPS_ARCH
|
||||||
|
Overrides
|
||||||
|
.Xr uname 2
|
||||||
|
machine result with this value.
|
||||||
|
Useful to install packages with a fake architecture
|
||||||
|
.It Sy XBPS_TARGET_ARCH
|
||||||
|
Sets the target architecture to this value.
|
||||||
|
This variable differs from
|
||||||
|
.Sy XBPS_ARCH
|
||||||
|
in that it allows you to install packages partially, because
|
||||||
|
configuration phase is skipped (the target binaries might not be compatible with
|
||||||
|
the native architecture).
|
||||||
|
.It Sy XBPS_SYSLOG
|
||||||
|
Overrides the
|
||||||
|
.Xr xbps.d 5
|
||||||
|
.Sy syslog=true|false
|
||||||
|
configuration option.
|
||||||
|
.El
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
|
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
|
||||||
.It Ar /etc/xbps.d
|
.It Ar /etc/xbps.d
|
||||||
|
@ -97,6 +97,26 @@ Assume yes to all questions and avoid interactive questions.
|
|||||||
.It Fl V, Fl -version
|
.It Fl V, Fl -version
|
||||||
Show the version information.
|
Show the version information.
|
||||||
.El
|
.El
|
||||||
|
.Sh ENVIRONMENT
|
||||||
|
.Bl -tag -width XBPS_TARGET_ARCH
|
||||||
|
.It Sy XBPS_ARCH
|
||||||
|
Overrides
|
||||||
|
.Xr uname 2
|
||||||
|
machine result with this value.
|
||||||
|
Useful to remove packages with a fake architecture
|
||||||
|
.It Sy XBPS_TARGET_ARCH
|
||||||
|
Sets the target architecture to this value.
|
||||||
|
This variable differs from
|
||||||
|
.Sy XBPS_ARCH
|
||||||
|
in that it allows you to remove packages partially, because
|
||||||
|
configuration phase is skipped (the target binaries might not be compatible with
|
||||||
|
the native architecture).
|
||||||
|
.It Sy XBPS_SYSLOG
|
||||||
|
Overrides the
|
||||||
|
.Xr xbps.d 5
|
||||||
|
.Sy syslog=true|false
|
||||||
|
configuration option.
|
||||||
|
.El
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
|
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
|
||||||
.It Ar /etc/xbps.d
|
.It Ar /etc/xbps.d
|
||||||
|
@ -25,9 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#include "xbps_api_impl.h"
|
#include "xbps_api_impl.h"
|
||||||
|
|
||||||
@ -43,7 +44,7 @@
|
|||||||
int
|
int
|
||||||
xbps_init(struct xbps_handle *xhp)
|
xbps_init(struct xbps_handle *xhp)
|
||||||
{
|
{
|
||||||
const char *native_arch = NULL;
|
const char *native_arch = NULL, *p;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
assert(xhp != NULL);
|
assert(xhp != NULL);
|
||||||
@ -154,16 +155,13 @@ xbps_init(struct xbps_handle *xhp)
|
|||||||
if (xbps_path_clean(xhp->metadir) == -1)
|
if (xbps_path_clean(xhp->metadir) == -1)
|
||||||
return ENOTSUP;
|
return ENOTSUP;
|
||||||
|
|
||||||
xbps_dbg_printf("rootdir=%s\n", xhp->rootdir);
|
p = getenv("XBPS_SYSLOG");
|
||||||
xbps_dbg_printf("metadir=%s\n", xhp->metadir);
|
if (p) {
|
||||||
xbps_dbg_printf("cachedir=%s\n", xhp->cachedir);
|
if (strcasecmp(p, "true") == 0)
|
||||||
xbps_dbg_printf("confdir=%s\n", xhp->confdir);
|
xhp->flags &= ~XBPS_FLAG_DISABLE_SYSLOG;
|
||||||
xbps_dbg_printf("sysconfdir=%s\n", xhp->sysconfdir);
|
else if (strcasecmp(p, "false") == 0)
|
||||||
xbps_dbg_printf("syslog=%s\n", xhp->flags & XBPS_FLAG_DISABLE_SYSLOG ? "false" : "true");
|
xhp->flags |= XBPS_FLAG_DISABLE_SYSLOG;
|
||||||
xbps_dbg_printf("bestmatching=%s\n", xhp->flags & XBPS_FLAG_BESTMATCH ? "true" : "false");
|
}
|
||||||
xbps_dbg_printf("keepconf=%s\n", xhp->flags & XBPS_FLAG_KEEP_CONFIG ? "true" : "false");
|
|
||||||
xbps_dbg_printf("Architecture: %s\n", xhp->native_arch);
|
|
||||||
xbps_dbg_printf("Target Architecture: %s\n", xhp->target_arch ? xhp->target_arch : "(null)");
|
|
||||||
|
|
||||||
if (xhp->flags & XBPS_FLAG_DEBUG) {
|
if (xhp->flags & XBPS_FLAG_DEBUG) {
|
||||||
const char *repodir;
|
const char *repodir;
|
||||||
|
@ -9,6 +9,7 @@ NPROCS=1
|
|||||||
if [ -r /proc/cpuinfo ]; then
|
if [ -r /proc/cpuinfo ]; then
|
||||||
NPROCS=$(grep ^proc /proc/cpuinfo|wc -l)
|
NPROCS=$(grep ^proc /proc/cpuinfo|wc -l)
|
||||||
fi
|
fi
|
||||||
|
export XBPS_SYSLOG=false
|
||||||
LIBRARY_PATH=$PWD/lib LD_LIBRARY_PATH=$PWD/lib ATF_SHELL=/bin/sh kyua --variable parallelism=$NPROCS test -r result.db -k tests/xbps/Kyuafile
|
LIBRARY_PATH=$PWD/lib LD_LIBRARY_PATH=$PWD/lib ATF_SHELL=/bin/sh kyua --variable parallelism=$NPROCS test -r result.db -k tests/xbps/Kyuafile
|
||||||
rv=$?
|
rv=$?
|
||||||
kyua report --verbose -r result.db
|
kyua report --verbose -r result.db
|
||||||
|
Loading…
Reference in New Issue
Block a user