From: snwnde <snwnde@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: singularity-3.11.0
Date: Tue, 07 Mar 2023 20:01:21 +0100 [thread overview]
Message-ID: <20230307190121._LzZMWG4Hq_5uMO83CkdldjLgKGXH8dqFYbrHCCjLgo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42592@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
There is an updated pull request by snwnde against master on the void-packages repository
https://github.com/snwnde/void-packages singularity
https://github.com/void-linux/void-packages/pull/42592
[WIP] New package: singularity-3.11.0
This is based on the work of @olafmersmann, https://github.com/void-linux/void-packages/pull/28129.
When merged, this should close https://github.com/void-linux/void-packages/issues/8135.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/42592.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-singularity-42592.patch --]
[-- Type: text/x-diff, Size: 3789 bytes --]
From c8dd70d14db7ec7f48988c10b87e89d9b0349004 Mon Sep 17 00:00:00 2001
From: Senwen Deng <void@snwn.de>
Date: Sat, 4 Mar 2023 23:06:11 +0100
Subject: [PATCH] New package: singularity-3.11.0
---
srcpkgs/singularity/INSTALL | 10 +++++
srcpkgs/singularity/template | 80 ++++++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+)
create mode 100644 srcpkgs/singularity/INSTALL
create mode 100644 srcpkgs/singularity/template
diff --git a/srcpkgs/singularity/INSTALL b/srcpkgs/singularity/INSTALL
new file mode 100644
index 000000000000..77fe1c22bdcd
--- /dev/null
+++ b/srcpkgs/singularity/INSTALL
@@ -0,0 +1,10 @@
+case "${ACTION}" in
+post)
+ if [ "$(readlink -f . 2>/dev/null || echo .)" != "/" ]; then
+ exit 1
+ else
+ chown root:_singularity usr/libexec/singularity/bin/starter-suid
+ chmod 4755 usr/libexec/singularity/bin/starter-suid
+ fi
+ ;;
+esac
diff --git a/srcpkgs/singularity/template b/srcpkgs/singularity/template
new file mode 100644
index 000000000000..f65543252294
--- /dev/null
+++ b/srcpkgs/singularity/template
@@ -0,0 +1,80 @@
+# Template file for 'singularity'
+pkgname=singularity
+version=3.11.0
+revision=1
+build_style=go
+go_import_path=github.com/sylabs.io/singularity
+go_mod_mode=vendor
+configure_script=./mconfig
+configure_args="--prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --libexecdir=/usr/libexec \
+ --sysconfdir=/etc \
+ --sharedstatedir=/var/lib \
+ --mandir=/usr/share/man \
+ --localstatedir=/var/lib \
+ --without-conmon \
+ -v"
+make_dirs="/var/lib/singularity/mnt/session 755 root root"
+hostmakedepends="wget pkg-config go cryptsetup"
+makedepends="libseccomp-devel glib-devel squashfs-tools runc"
+depends="squashfs-tools cryptsetup conmon"
+short_desc="HPC centric container platform"
+maintainer="Senwen Deng <void@snwn.de>"
+license="BSD-3-Clause-LBNL"
+homepage="https://sylabs.io/singularity/"
+distfiles="https://github.com/sylabs/${pkgname}/releases/download/v${version}/${pkgname}-ce-${version}.tar.gz"
+checksum=45c297f05065c7c920898af37acb781070b2330f141d7a566073197801577753
+
+post_configure() {
+ # cannot run binary built for another architecture
+ if ! [[ -z ${CROSS_BUILD} ]]; then
+ vsed -i \
+ -e '/feature: NO_NEW_PRIVS/,/feature: MS_SLAVE/{//!d}' \
+ ./mlocal/checks/project-post.chk
+ # host go is needed to run mconfig
+ GOARCH=$(go env | grep GOHOSTARCH | sed "s/GOHOSTARCH=//" | tr -d '"') ${configure_script} ${configure_args} -c cc -x c++ -C ${XBPS_CROSS_TRIPLET}-gcc -X ${XBPS_CROSS_TRIPLET}-c++
+ else
+ ${configure_script} ${configure_args}
+ fi
+}
+
+pre_build() {
+ # Fixup Makefile
+ # * Force use of vendored packages
+ # * Don't install bash completions into /etc/bash_completion.d
+ vsed -i \
+ -e 's@^GO_MODFLAGS := .*@GO_MODFLAGS := -mod=vendor@' \
+ -e "s/ldflags=\"/ldflags=\" -extld=${LD} /" \
+ -e 's@INSTALLFILES += $(bash_completion_INSTALL)@@' \
+ builddir/Makefile
+
+ # target ld needs to be specified for go build in flags
+ if ! [[ -z ${CROSS_BUILD} ]]; then
+ vsed -i \
+ -e "s/ldflags=\"/ldflags=\" -extld=${LD} /" \
+ builddir/Makefile
+ fi
+}
+
+do_build() {
+ # host go is needed to generate some prerequisite codes
+ if ! [[ -z ${CROSS_BUILD} ]]; then
+ GOARCH=$(go env | grep GOHOSTARCH | sed "s/GOHOSTARCH=//" | tr -d '"') srcdir=$PWD make -C builddir old_config= codegen
+ fi
+ PATH="$PATH:/usr/aarch64-linux-gnu/usr/bin/" srcdir=$PWD make -C builddir old_config=
+}
+
+do_install() {
+ make DESTDIR="${DESTDIR}" -C builddir install all
+ chmod 0750 $DESTDIR/usr/libexec/singularity/bin/starter-suid
+ vlicense LICENSE.md
+ vcompletion builddir/etc/bash_completion.d/singularity bash
+}
+
+do_check() {
+ # XXX: tests require sudo, so skip for now.
+ # make -C builddir unit-test integration-test e2e-test
+ : "Pass"
+}
next prev parent reply other threads:[~2023-03-07 19:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 22:49 [PR PATCH] " snwnde
2023-03-04 22:53 ` [PR REVIEW] " classabbyamp
2023-03-04 23:14 ` snwnde
2023-03-06 20:50 ` [PR PATCH] [Updated] [WIP] " snwnde
2023-03-06 20:59 ` snwnde
2023-03-06 21:40 ` snwnde
2023-03-06 21:55 ` snwnde
2023-03-06 22:16 ` [PR PATCH] [Updated] " snwnde
2023-03-06 22:17 ` snwnde
2023-03-07 19:01 ` snwnde [this message]
2023-03-07 19:06 ` snwnde
2023-03-07 19:07 ` snwnde
2023-03-07 19:07 ` snwnde
2023-03-07 19:09 ` snwnde
2023-03-07 19:10 ` snwnde
2023-03-07 19:11 ` snwnde
2023-03-07 19:12 ` [PR REVIEW] " snwnde
2023-03-07 19:13 ` snwnde
2023-03-07 19:15 ` snwnde
2023-03-07 19:26 ` snwnde
2023-03-07 19:31 ` snwnde
2023-03-07 19:32 ` snwnde
2023-03-07 19:34 ` snwnde
2023-06-06 2:05 ` github-actions
2023-06-21 1:57 ` [PR PATCH] [Closed]: " github-actions
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=20230307190121._LzZMWG4Hq_5uMO83CkdldjLgKGXH8dqFYbrHCCjLgo@z \
--to=snwnde@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).