[arch-commits] Commit in nsjail/repos (3 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Wed Dec 22 21:02:37 UTC 2021


    Date: Wednesday, December 22, 2021 @ 21:02:37
  Author: foutrelis
Revision: 1082886

archrelease: copy trunk to community-staging-x86_64

Added:
  nsjail/repos/community-staging-x86_64/
  nsjail/repos/community-staging-x86_64/PKGBUILD
    (from rev 1082885, nsjail/trunk/PKGBUILD)
  nsjail/repos/community-staging-x86_64/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch
    (from rev 1082885, nsjail/trunk/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch)

-----------------------------------------------------------+
 PKGBUILD                                                  |   33 ++++++++++++
 replace-YYUSE-with-attribute-unused-in-src-parser.y.patch |   33 ++++++++++++
 2 files changed, 66 insertions(+)

Copied: nsjail/repos/community-staging-x86_64/PKGBUILD (from rev 1082885, nsjail/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-12-22 21:02:37 UTC (rev 1082886)
@@ -0,0 +1,33 @@
+# Maintainer: Bruno Pagani <archange at archlinux.org> 
+
+pkgname=nsjail
+pkgver=3.0
+pkgrel=5
+pkgdesc="Light-weight process isolation tool"
+arch=(x86_64)
+url="https://nsjail.com"
+license=(Apache)
+depends=(protobuf libnl)
+makedepends=(git)
+source=("https://github.com/google/nsjail/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+        'git+https://github.com/google/kafel.git#commit=8e69b8efae415cde3debffbb1e379d9e7a16835a'
+        replace-YYUSE-with-attribute-unused-in-src-parser.y.patch)
+sha256sums=('cfa66d3ed136b2e221752287b95e544915e8a6760aa866f023b604d14a374919'
+            'SKIP'
+            '9773c57a2eaa3460a0656a5fdc3603d141aac34ded53e18e29a890fd5b7a71f8')
+
+prepare() {
+    # https://github.com/google/kafel/pull/28
+    patch -Np1 -d kafel <replace-YYUSE-with-attribute-unused-in-src-parser.y.patch
+    mv kafel ${pkgname}-${pkgver}
+}
+
+build() {
+    cd ${pkgname}-${pkgver}
+    make
+}
+
+package() {
+    cd ${pkgname}-${pkgver}
+    install -Dm755 nsjail -t "${pkgdir}"/usr/bin/ 
+}

Copied: nsjail/repos/community-staging-x86_64/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch (from rev 1082885, nsjail/trunk/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch)
===================================================================
--- community-staging-x86_64/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch	                        (rev 0)
+++ community-staging-x86_64/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch	2021-12-22 21:02:37 UTC (rev 1082886)
@@ -0,0 +1,33 @@
+From 521aab466e50f822298ae7bf817b14c1b9eaab74 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Sun, 14 Mar 2021 03:20:43 +0200
+Subject: [PATCH] Replace YYUSE with attribute unused in src/parser.y
+
+The YYUSE macro was renamed to YY_USE in bison 3.7.5; might as well
+avoid using it altogether, and instead mark the variable as unused.
+
+Fixes the following linker error:
+
+/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror':
+arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE'
+---
+ src/parser.y | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/parser.y b/src/parser.y
+index e0f109c..e5980c9 100644
+--- a/src/parser.y
++++ b/src/parser.y
+@@ -418,10 +418,9 @@ const_def
+ 
+ %%
+ 
+-void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt, yyscan_t scanner,
+-             const char *msg) {
++void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt,
++             __attribute__((unused)) yyscan_t scanner, const char *msg) {
+   if (!ctxt->lexical_error) {
+-    YYUSE(scanner);
+     if (loc->filename != NULL) {
+       append_error(ctxt, "%s:%d:%d: %s", loc->filename, loc->first_line, loc->first_column, msg);
+     } else {



More information about the arch-commits mailing list