From: ifreund <ifreund@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: rundird-0.1.0
Date: Thu, 17 Jun 2021 03:40:56 +0200 [thread overview]
Message-ID: <20210617014056.TDBE-OqJWSijI-BM73pG7ZA8jAZmaih82-NyMyTBdTs@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29288@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]
There is an updated pull request by ifreund against master on the void-packages repository
https://github.com/ifreund/void-packages rundird
https://github.com/void-linux/void-packages/pull/29288
New package: rundird-0.1.0
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/29288.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rundird-29288.patch --]
[-- Type: text/x-diff, Size: 7738 bytes --]
From e70cec021058e226ab38d1cd37309c90af918f41 Mon Sep 17 00:00:00 2001
From: Isaac Freund <ifreund@ifreund.xyz>
Date: Thu, 17 Jun 2021 01:38:36 +0000
Subject: [PATCH 1/2] build-styles: add zig build
This requires backporting a patch to upstream zig that has been landed
in the 0.8.x branch upstream and will be included in the 0.8.1 release
in order to get zig cross-compilation integrated with xbps-src.
---
common/build-style/zig-build.sh | 41 ++++++++++++
...01-zig-build-add-libc-general-option.patch | 65 +++++++++++++++++++
srcpkgs/zig/template | 3 +-
3 files changed, 108 insertions(+), 1 deletion(-)
create mode 100644 common/build-style/zig-build.sh
create mode 100644 srcpkgs/zig/patches/0001-zig-build-add-libc-general-option.patch
diff --git a/common/build-style/zig-build.sh b/common/build-style/zig-build.sh
new file mode 100644
index 000000000000..97918c4808d2
--- /dev/null
+++ b/common/build-style/zig-build.sh
@@ -0,0 +1,41 @@
+do_build() {
+ local zig_target
+ local zig_cpu
+ case $XBPS_TARGET_MACHINE in
+ aarch64-musl|i686-musl|x86_64-musl)
+ zig_target="${XBPS_TARGET_MACHINE%-musl}-linux-musl" zig_cpu="baseline";;
+ aarch64|i686|x86_64)
+ zig_target="${XBPS_TARGET_MACHINE}-linux-gnu" zig_cpu="baseline";;
+ armv6l-musl) zig_target="arm-linux-musl" zig_cpu="generic+v6";;
+ armv6l) zig_target="arm-linux-gnu" zig_cpu="generic+v6";;
+ armv7l-musl) zig_target="arm-linux-musl" zig_cpu="generic+v7a";;
+ armv7l) zig_target="arm-linux-gnu" zig_cpu="generic+v7a";;
+ *) broken="TODO: support more target machines for the zig build style";;
+ esac
+
+ # Inform zig of the required libc include paths.
+ cat > /tmp/zig_libc.txt <<EOF
+include_dir=${XBPS_CROSS_BASE}/usr/include
+sys_include_dir=${XBPS_CROSS_BASE}/usr/include
+crt_dir=${XBPS_CROSS_BASE}/usr/lib
+msvc_lib_dir=
+kernel32_lib_dir=
+gcc_dir=
+EOF
+
+ # The Zig build system only has a single install step, there is no
+ # way to build artifacts for a given prefix and then install those artifacts
+ # to that prefix at some later time. Therefore, we build and install to the zig-out
+ # directory and later copy the artifacts to the destdir in do_install().
+ # We use zig-out to avoid path conflicts as it is the default install
+ # prefix used by the zig build system.
+ DESTDIR="zig-out" zig build \
+ --search-prefix $XBPS_CROSS_BASE \
+ --libc /tmp/zig_libc.txt \
+ -Dtarget=$zig_target -Dcpu=$zig_cpu \
+ -Drelease-safe --prefix /usr install
+}
+
+do_install() {
+ cp -r zig-out/* "${DESTDIR}"
+}
diff --git a/srcpkgs/zig/patches/0001-zig-build-add-libc-general-option.patch b/srcpkgs/zig/patches/0001-zig-build-add-libc-general-option.patch
new file mode 100644
index 000000000000..04a8e7adfb10
--- /dev/null
+++ b/srcpkgs/zig/patches/0001-zig-build-add-libc-general-option.patch
@@ -0,0 +1,65 @@
+From fd3c7ba42ec021917951a57e2f20f45ffe677368 Mon Sep 17 00:00:00 2001
+From: Isaac Freund <ifreund@ifreund.xyz>
+Date: Sun, 13 Jun 2021 04:49:54 +0000
+Subject: [PATCH] zig build: add --libc general option
+
+This new option sets a default libc paths file to be used for all
+LibExeObjSteps. Setting LibExeObjStep.libc_file overrides this default.
+
+This is required to allow users to cross compile projects linking system
+libraries without needing to patch the build.zig.
+---
+ lib/std/build.zig | 4 ++++
+ lib/std/special/build_runner.zig | 7 +++++++
+ 2 files changed, 11 insertions(+)
+
+diff --git a/lib/std/build.zig b/lib/std/build.zig
+index 572f2b2be..366444235 100644
+--- a/lib/std/build.zig
++++ b/lib/std/build.zig
+@@ -58,6 +58,7 @@ pub const Builder = struct {
+ h_dir: []const u8,
+ install_path: []const u8,
+ search_prefixes: ArrayList([]const u8),
++ libc_file: ?[]const u8 = null,
+ installed_files: ArrayList(InstalledFile),
+ build_root: []const u8,
+ cache_root: []const u8,
+@@ -2377,6 +2378,9 @@ pub const LibExeObjStep = struct {
+ if (self.libc_file) |libc_file| {
+ try zig_args.append("--libc");
+ try zig_args.append(builder.pathFromRoot(libc_file));
++ } else if (builder.libc_file) |libc_file| {
++ try zig_args.append("--libc");
++ try zig_args.append(libc_file);
+ }
+
+ switch (self.build_mode) {
+diff --git a/lib/std/special/build_runner.zig b/lib/std/special/build_runner.zig
+index c6185ef09..2a0ca86d7 100644
+--- a/lib/std/special/build_runner.zig
++++ b/lib/std/special/build_runner.zig
+@@ -93,6 +93,12 @@ pub fn main() !void {
+ return usageAndErr(builder, false, stderr_stream);
+ };
+ builder.addSearchPrefix(search_prefix);
++ } else if (mem.eql(u8, arg, "--libc")) {
++ const libc_file = nextArg(args, &arg_idx) orelse {
++ warn("Expected argument after --libc\n\n", .{});
++ return usageAndErr(builder, false, stderr_stream);
++ };
++ builder.libc_file = libc_file;
+ } else if (mem.eql(u8, arg, "--color")) {
+ const next_arg = nextArg(args, &arg_idx) orelse {
+ warn("expected [auto|on|off] after --color", .{});
+@@ -190,6 +196,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void
+ \\ --verbose Print commands before executing them
+ \\ -p, --prefix [path] Override default install prefix
+ \\ --search-prefix [path] Add a path to look for binaries, libraries, headers
++ \\ --libc [file] Provide a file which specifies libc paths
+ \\ --color [auto|off|on] Enable or disable colored error messages
+ \\
+ \\Project-Specific Options:
+--
+2.32.0
+
diff --git a/srcpkgs/zig/template b/srcpkgs/zig/template
index baefd41af01e..4af7c098c384 100644
--- a/srcpkgs/zig/template
+++ b/srcpkgs/zig/template
@@ -1,7 +1,7 @@
# Template file for 'zig'
pkgname=zig
version=0.8.0
-revision=1
+revision=2
archs="x86_64* aarch64*"
build_style=cmake
make_cmd=make
@@ -14,6 +14,7 @@ distfiles="https://ziglang.org/download/${version}/zig-${version}.tar.xz"
checksum=03a828d00c06b2e3bb8b7ff706997fd76bf32503b08d759756155b6e8c981e77
nopie=yes
nocross=yes
+patch_args=-Np1
export CMAKE_GENERATOR="Unix Makefiles"
From 8544b340d9cabf943f85a93059b2e9a6c5c6a694 Mon Sep 17 00:00:00 2001
From: Isaac Freund <ifreund@ifreund.xyz>
Date: Thu, 17 Jun 2021 01:40:15 +0000
Subject: [PATCH 2/2] New package: rundird-0.1.1
---
srcpkgs/rundird/files/rundird/run | 2 ++
srcpkgs/rundird/template | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 srcpkgs/rundird/files/rundird/run
create mode 100644 srcpkgs/rundird/template
diff --git a/srcpkgs/rundird/files/rundird/run b/srcpkgs/rundird/files/rundird/run
new file mode 100644
index 000000000000..df06fdb0fc88
--- /dev/null
+++ b/srcpkgs/rundird/files/rundird/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/rundird
diff --git a/srcpkgs/rundird/template b/srcpkgs/rundird/template
new file mode 100644
index 000000000000..c2c855164783
--- /dev/null
+++ b/srcpkgs/rundird/template
@@ -0,0 +1,17 @@
+# Template file for 'rundird'
+pkgname=rundird
+version=0.1.1
+revision=1
+build_style=zig-build
+hostmakedepends="zig"
+makedepends="pam-devel"
+short_desc="Simple daemon + PAM module providing an XDG_RUNTIME_DIR"
+maintainer="Isaac Freund <ifreund@ifreund.xyz>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/ifreund/rundird"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=d3a848fba0016841385aab57298164ba8f30377799c217b6b6abf83ce1d2ca91
+
+post_install() {
+ vsv rundird
+}
next prev parent reply other threads:[~2021-06-17 1:40 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-07 10:59 [PR PATCH] " ifreund
2021-03-07 11:01 ` [PR PATCH] [Updated] " ifreund
2021-03-08 6:34 ` ericonr
2021-03-11 9:15 ` travankor
2021-03-11 9:16 ` travankor
2021-03-11 13:10 ` ericonr
2021-03-11 13:39 ` travankor
2021-03-11 13:45 ` travankor
2021-03-11 13:45 ` travankor
2021-05-24 19:07 ` [PR PATCH] [Updated] " ifreund
2021-06-07 20:39 ` ifreund
2021-06-10 2:19 ` ifreund
2021-06-10 3:10 ` ifreund
2021-06-10 4:26 ` ifreund
2021-06-10 4:31 ` ifreund
2021-06-17 1:40 ` ifreund [this message]
2021-06-17 1:49 ` ifreund
2021-06-17 3:07 ` [PR REVIEW] " ericonr
2021-06-17 3:07 ` ericonr
2021-06-17 3:07 ` ericonr
2021-06-17 3:07 ` ericonr
2021-06-17 3:07 ` ericonr
2021-06-17 3:07 ` ericonr
2021-06-17 17:41 ` [PR PATCH] [Updated] " ifreund
2021-06-17 17:43 ` [PR REVIEW] " ifreund
2021-06-17 17:43 ` ifreund
2021-06-17 19:23 ` ericonr
2021-06-17 20:16 ` [PR PATCH] [Updated] " ifreund
2021-06-17 20:22 ` ifreund
2021-06-18 0:21 ` ifreund
2021-06-21 21:08 ` ifreund
2021-06-21 21:09 ` ifreund
2021-06-21 21:10 ` [PR PATCH] [Updated] " ifreund
2021-06-21 21:12 ` ifreund
2021-06-26 11:06 ` ifreund
2021-07-25 20:55 ` [PR REVIEW] New package: rundird-0.1.1, Add zig-build build style ericonr
2021-07-25 20:55 ` ericonr
2021-07-25 20:59 ` ericonr
2021-07-25 22:30 ` [PR REVIEW] " ifreund
2021-07-27 1:02 ` [PR PATCH] [Updated] " ifreund
2021-07-27 1:07 ` ifreund
2021-07-27 1:11 ` ifreund
2021-08-18 22:18 ` [PR REVIEW] New package: rundird-0.2.0, " ericonr
2021-08-18 22:38 ` ifreund
2021-08-18 22:41 ` [PR PATCH] [Updated] " ifreund
2021-08-18 22:41 ` ifreund
2021-09-07 17:23 ` [PR PATCH] [Updated] " ifreund
2021-09-07 17:25 ` ifreund
2021-09-15 14:50 ` [PR PATCH] [Updated] " ifreund
2021-11-03 13:49 ` ifreund
2021-11-03 16:46 ` [PR PATCH] [Updated] Add zig-build build style, river 0.1.0, rundird 0.2.0 ifreund
2021-11-08 15:56 ` ifreund
2021-11-08 15:58 ` ifreund
2021-11-10 23:48 ` subsetpark
2021-11-11 0:31 ` [PR REVIEW] " ericonr
2021-11-11 0:31 ` ericonr
2021-11-11 0:31 ` ericonr
2021-11-11 0:31 ` ericonr
2021-11-11 10:19 ` ifreund
2021-11-11 10:22 ` ifreund
2021-11-11 10:24 ` [PR PATCH] [Updated] " ifreund
2021-11-11 11:25 ` ifreund
2021-11-11 11:25 ` [PR REVIEW] " ifreund
2021-11-11 11:26 ` ifreund
2021-11-13 3:15 ` [PR REVIEW] " ericonr
2021-11-13 3:15 ` ericonr
2021-11-13 3:49 ` ericonr
2021-11-13 11:43 ` [PR PATCH] [Updated] " ifreund
2021-11-13 11:44 ` [PR REVIEW] " ifreund
2021-11-13 11:47 ` ifreund
2021-11-13 14:46 ` [PR PATCH] [Merged]: " ericonr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210617014056.TDBE-OqJWSijI-BM73pG7ZA8jAZmaih82-NyMyTBdTs@z \
--to=ifreund@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).