Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user authored and zen0bit committed Jul 7, 2024
2 parents 156caba + b09cc5c commit 2e2ae55
Show file tree
Hide file tree
Showing 1,965 changed files with 23,175 additions and 15,129 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: 'ghcr.io/void-linux/void-buildroot-musl:20231230R1'
image: 'ghcr.io/void-linux/void-buildroot-musl:20240526R1'
env:
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
LICENSE_LIST: common/travis/license.lst
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"

container:
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20231230R1
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20240526R1
options: --platform ${{ matrix.config.platform }}
env:
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cycles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
issues: write
container:
image: 'ghcr.io/void-linux/void-buildroot-musl:20231230R1'
image: 'ghcr.io/void-linux/void-buildroot-musl:20240526R1'
env:
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
Expand Down
30 changes: 23 additions & 7 deletions Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,9 @@ built for, available architectures can be found under `common/cross-profiles`.
In general, `archs` should only be set if the upstream software explicitly targets
certain architectures or there is a compelling reason why the software should not be
available on some supported architectures.
Prepending pattern with tilde means disallowing build on indicated archs.
First matching pattern is taken to allow/deny build. When no pattern matches,
package is build if last pattern includes tilde.
Prepending a pattern with a tilde means disallowing build on the indicated archs.
The first matching pattern is taken to allow/deny build. When no pattern matches,
the package is built if the last pattern includes a tilde.
Examples:

```
Expand All @@ -778,6 +778,9 @@ A special value `noarch` used to be available, but has since been removed.

- `nofixperms` If set, xbps-src will not fix common permission errors (executable manpages, etc.)

- `no_generic_pkgconfig_link` If set, xbps-src will not create a symlink from `$XBPS_CROSS_TRIPLET-pkg-config`
to `$XBPS_WRAPPERDIR/pkg-config` before building the template.

<a id="explain_depends"></a>
#### About the many types of `depends` variables

Expand Down Expand Up @@ -1044,7 +1047,7 @@ Additional install arguments can be specified via `make_install_args`.
- `slashpackage` For packages that use the /package hierarchy and package/compile to build,
such as `daemontools` or any `djb` software.

- `qmake` For packages that use Qt4/Qt5 qmake profiles (`*.pro`), qmake arguments
- `qmake` For packages that use Qt5/Qt6 qmake profiles (`*.pro`), qmake arguments
for the configure phase can be passed in via `configure_args`, make build arguments can
be passed in via `make_build_args` and install arguments via `make_install_args`. The build
target can be overridden via `make_build_target` and the install target
Expand Down Expand Up @@ -1127,7 +1130,9 @@ It also creates the `vtargetrun` function to wrap commands in a call to
needed for cross builds and a qmake-wrapper to make `qmake` use this configuration.
This aims to fix cross-builds for when the build-style is mixed: e.g. when in a
`gnu-configure` style the configure script calls `qmake` or a `Makefile` in
`gnu-makefile` style, respectively.
`gnu-makefile` style, respectively. This is for Qt5 packages.

- `qmake6` is like `qmake` but for Qt6.

- `rust` specifies environment variables required for cross-compiling crates via cargo and
for compiling cargo -sys crates. This helper is added by default for packages that use the
Expand Down Expand Up @@ -1801,8 +1806,19 @@ executable binary formats, know as binfmts.
During installation/removal it uses `update-binfmts` from the `binfmt-support` package
to register/remove entries from the arbitrary executable binary formats database.

To include the trigger use the `binfmts` variable, as the trigger won't do anything unless
it is defined.
It is automatically added to packages that contain files in `usr/share/binfmts`.
These files should be `update-binfmts` format files and will be imported with
`update-binfmts --import`.

While it is not preferred, the trigger can also be added by using the `binfmts` variable,
which should contain lines defining binfmts to register:

```
/path/to/interpreter [update-binfmts binary format specification arguments ...]
...
```

See [`update-binfmts(8)`](https://man.voidlinux.org/man8/update-binfmts.8) for more details.

<a id="triggers_dkms"></a>
#### dkms
Expand Down
97 changes: 97 additions & 0 deletions common/build-helper/qmake6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# This build-helper sets up qmake’s cross environment
# in cases the build-style is mixed,
# e.g. when in a gnu-configure style the configure
# script calls qmake or a makefile in a gnu-makefile style,
# respectively.

if [ "$CROSS_BUILD" ]; then
mkdir -p "${XBPS_WRAPPERDIR}/target-spec/linux-g++"
cat > "${XBPS_WRAPPERDIR}/target-spec/linux-g++/qmake.conf" <<_EOF
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
include(/usr/lib/qt6/mkspecs/common/linux.conf)
include(/usr/lib/qt6/mkspecs/common/gcc-base-unix.conf)
include(/usr/lib/qt6/mkspecs/common/g++-unix.conf)
QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/qconfig.pri
QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/qmodule.pri
QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/modules
QMAKE_CC = ${CC}
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
QMAKE_LINK_C = ${CC}
QMAKE_LINK_SHLIB = ${CXX}
QMAKE_AR = ${XBPS_CROSS_TRIPLET}-gcc-ar cqs
QMAKE_OBJCOPY = ${OBJCOPY}
QMAKE_NM = ${NM} -P
QMAKE_STRIP = ${STRIP}
QMAKE_CFLAGS = ${CFLAGS}
QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
load(qt_config)
_EOF
echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/linux-g++/qplatformdefs.h\"" > "${XBPS_WRAPPERDIR}/target-spec/linux-g++/qplatformdefs.h"

cat > "${XBPS_WRAPPERDIR}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=${XBPS_CROSS_BASE}/usr
ArchData=${XBPS_CROSS_BASE}/usr/lib/qt6
Data=${XBPS_CROSS_BASE}/usr/share/qt6
Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt6
Headers=${XBPS_CROSS_BASE}/usr/include/qt6
Libraries=${XBPS_CROSS_BASE}/usr/lib
LibraryExecutables=/usr/lib/qt6/libexec
Binaries=/usr/lib/qt6/bin
Tests=${XBPS_CROSS_BASE}/usr/tests
Plugins=/usr/lib/qt6/plugins
Imports=${XBPS_CROSS_BASE}/usr/lib/qt6/imports
Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt6/qml
Translations=${XBPS_CROSS_BASE}/usr/share/qt6/translations
Settings=${XBPS_CROSS_BASE}/etc/xdg
Examples=${XBPS_CROSS_BASE}/usr/lib/qt6/examples
HostPrefix=/usr
HostData=/usr/lib/qt6
HostBinaries=/usr/lib/qt6/bin
HostLibraries=/usr/lib
HostLibraryExecutables=/usr/lib/qt6/libexec
Spec=linux-g++
TargetSpec=$XBPS_WRAPPERDIR/target-spec/linux-g++
_EOF

# create the qmake-wrapper here because it only
# makes sense together with the qmake build-helper
# and not to interfere with e.g. the qmake build-style
#
# + base flags will be picked up from QMAKE_{C,CXX,LD}FLAGS
# + hardening flags will be picked up from environment variables
cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
#!/bin/sh
exec /usr/lib/qt6/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt.conf" \\
QMAKE_CFLAGS+="\${CFLAGS}" \\
QMAKE_CXXFLAGS+="\${CXXFLAGS}" \\
QMAKE_LFLAGS+="\${LDFLAGS}"
_EOF
else
cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
#!/bin/sh
exec /usr/lib/qt6/bin/qmake \
"\$@" \
PREFIX=/usr \
QT_INSTALL_PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC="$CC" QMAKE_CXX="$CXX" \
QMAKE_LINK="$CXX" QMAKE_LINK_C="$CC" \
QMAKE_CFLAGS+="\${CFLAGS}" \
QMAKE_CXXFLAGS+="\${CXXFLAGS}" \
QMAKE_LFLAGS+="\${LDFLAGS}" \
CONFIG+=no_qt_rpath
_EOF
fi
chmod 755 ${XBPS_WRAPPERDIR}/qmake
cp -p ${XBPS_WRAPPERDIR}/qmake{,-qt6}
cp -p ${XBPS_WRAPPERDIR}/qmake{,6}
2 changes: 2 additions & 0 deletions common/container/noextract.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
noextract=/etc/sv*
noextract=/usr/share/man*
noextract=/usr/lib/dracut*
noextract=/etc/hosts
noextract=/etc/mtab
noextract=/etc/skel*
noextract=/usr/lib/modprobe.d*
noextract=/usr/lib/sysctl.d*
Expand Down
62 changes: 37 additions & 25 deletions common/environment/setup/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ unalias -a

# disable wildcards helper
_noglob_helper() {
set +f
"$@"
set +f
IFS= "$@"
}

# Apply _noglob to v* commands
for cmd in vinstall vcopy vcompletion vmove vmkdir vbin vman vdoc vconf vsconf vlicense vsv; do
alias ${cmd}="set -f; _noglob_helper _${cmd}"
# intentionally expanded when defined
# shellcheck disable=SC2139
alias ${cmd}="set -f; _noglob_helper _${cmd}"
done

_vsv() {
Expand All @@ -24,6 +26,8 @@ _vsv() {
local svdir="${PKGDESTDIR}/etc/sv/${service}"

if [ $# -lt 1 ] || [ $# -gt 2 ]; then
# pkgver is defined in common/xbps-src/shutils/commmon.sh
# shellcheck disable=SC2154
msg_red "$pkgver: vsv: up to 2 arguments expected: <service> [<log facility>]\n"
return 1
fi
Expand All @@ -34,26 +38,26 @@ _vsv() {

vmkdir etc/sv
vcopy "${FILESDIR}/$service" etc/sv
if [ ! -L $svdir/run ]; then
grep -Fq 'exec 2>&1' $svdir/run || msg_warn "$pkgver: vsv: service '$service' does not contain 'exec 2>&1' to log stderr\n"
chmod 755 $svdir/run
if [ ! -L "$svdir/run" ]; then
grep -Fq 'exec 2>&1' "$svdir/run" || msg_warn "$pkgver: vsv: service '$service' does not contain 'exec 2>&1' to log stderr\n"
chmod 755 "$svdir/run"
fi
if [ -e $svdir/finish ] && [ ! -L $svdir/finish ]; then
chmod 755 $svdir/finish
if [ -e "$svdir/finish" ] && [ ! -L "$svdir/finish" ]; then
chmod 755 "$svdir/finish"
fi
ln ${LN_OPTS} /run/runit/supervise.${service} $svdir/supervise
if [ -d $svdir/log ] || [ -L $svdir/log ]; then
ln ${LN_OPTS} "/run/runit/supervise.${service}" "$svdir/supervise"
if [ -d "$svdir/log" ] || [ -L "$svdir/log" ]; then
msg_warn "$pkgver: vsv: overriding default log service\n"
else
mkdir $svdir/log
cat <<-EOF > $svdir/log/run
mkdir "$svdir/log"
cat <<-EOF > "$svdir/log/run"
#!/bin/sh
exec vlogger -t $service -p $facility
EOF
fi
ln ${LN_OPTS} /run/runit/supervise.${service}-log $svdir/log/supervise
if [ -e $svdir/log/run ] && [ ! -L $svdir/log/run ]; then
chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
ln ${LN_OPTS} "/run/runit/supervise.${service}-log" "$svdir/log/supervise"
if [ -e "$svdir/log/run" ] && [ ! -L "$svdir/log/run" ]; then
chmod 755 "${PKGDESTDIR}/etc/sv/${service}/log/run"
fi
}

Expand Down Expand Up @@ -120,6 +124,8 @@ _vdoc() {
return 1
fi

# pkgname is defined in the package
# shellcheck disable=SC2154
vinstall "$file" 644 "usr/share/doc/${pkgname}" "$targetfile"
}

Expand Down Expand Up @@ -175,9 +181,9 @@ _vinstall() {
fi

if [ -z "$targetfile" ]; then
install -Dm${mode} "${file}" "${PKGDESTDIR}/${targetdir}/${file##*/}"
install -Dm"${mode}" "${file}" "${PKGDESTDIR}/${targetdir}/${file##*/}"
else
install -Dm${mode} "${file}" "${PKGDESTDIR}/${targetdir}/${targetfile##*/}"
install -Dm"${mode}" "${file}" "${PKGDESTDIR}/${targetdir}/${targetfile##*/}"
fi
}

Expand All @@ -193,7 +199,9 @@ _vcopy() {
return 1
fi

cp -a $files ${PKGDESTDIR}/${targetdir}
# intentionally unquoted for globbing
# shellcheck disable=SC2086
cp -a $files "${PKGDESTDIR}/${targetdir}"
}

_vmove() {
Expand All @@ -219,13 +227,17 @@ _vmove() {
done

if [ -z "${_targetdir}" ]; then
[ ! -d ${PKGDESTDIR} ] && install -d ${PKGDESTDIR}
mv ${DESTDIR}/$files ${PKGDESTDIR}
[ ! -d "${PKGDESTDIR}" ] && install -d "${PKGDESTDIR}"
# intentionally unquoted for globbing
# shellcheck disable=SC2086
mv "${DESTDIR}"/$files "${PKGDESTDIR}"
else
if [ ! -d ${PKGDESTDIR}/${_targetdir} ]; then
install -d ${PKGDESTDIR}/${_targetdir}
if [ ! -d "${PKGDESTDIR}/${_targetdir}" ]; then
install -d "${PKGDESTDIR}/${_targetdir}"
fi
mv ${DESTDIR}/$files ${PKGDESTDIR}/${_targetdir}
# intentionally unquoted for globbing
# shellcheck disable=SC2086
mv "${DESTDIR}"/$files "${PKGDESTDIR}/${_targetdir}"
fi
}

Expand All @@ -243,9 +255,9 @@ _vmkdir() {
fi

if [ -z "$mode" ]; then
install -d ${PKGDESTDIR}/${dir}
install -d "${PKGDESTDIR}/${dir}"
else
install -dm${mode} ${PKGDESTDIR}/${dir}
install -dm"${mode}" "${PKGDESTDIR}/${dir}"
fi
}

Expand Down
8 changes: 7 additions & 1 deletion common/hooks/post-install/04-create-xbps-metadata-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,16 @@ _EOF
#
# Handle binfmts trigger
#
if [ -n "${binfmts}" ]; then
if [ -n "${binfmts}" ] || [ -d "${PKGDESTDIR}/usr/share/binfmts" ]; then
_add_trigger binfmts
fi
if [ -n "${binfmts}" ]; then
echo "export binfmts=\"${binfmts}\"" >> $tmpf
fi
if [ -d "${PKGDESTDIR}/usr/share/binfmts" ]; then
_import_binfmts="$(find "${PKGDESTDIR}/usr/share/binfmts" -type f -printf '%f\n')"
echo "export import_binfmts=\"${_import_binfmts}\"" >> $tmpf
fi
#
# Handle GNU Info files.
#
Expand Down
Loading

0 comments on commit 2e2ae55

Please sign in to comment.