[pkg-lua-devel] Bug#996781: luarocks: Installation fails with dpkg error

Chris MacNaughton chris.macnaughton at ubuntu.com
Fri Nov 5 14:34:33 GMT 2021


Package: luarocks
Version: 3.7.0+dfsg1-1
Followup-For: Bug #996781
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

The luarocks postinst sript was updated to have the manifest creation
go into an existing directory, and update that directory to match
luarocks' expectations:

  * d/luarocks.postinst: Add global flag to fix installation.
  * d/tests: Add basic autopkgtests.


Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy
  APT policy: (500, 'jammy')
Architecture: amd64 (x86_64)

Kernel: Linux 5.13.0-19-generic (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru luarocks-3.7.0+dfsg1/debian/luarocks.postinst luarocks-3.7.0+dfsg1/debian/luarocks.postinst
--- luarocks-3.7.0+dfsg1/debian/luarocks.postinst	2021-09-28 10:53:39.000000000 +0000
+++ luarocks-3.7.0+dfsg1/debian/luarocks.postinst	2021-11-05 09:22:18.000000000 +0000
@@ -1,9 +1,9 @@
 #!/bin/sh
 set -e 
 
-if [ ! -e /usr/local/lib/luarocks/rocks/manifest ]; then
-	mkdir -p /usr/local/lib/luarocks/rocks/
-	luarocks-admin make_manifest --local-tree
+if [ ! -e /usr/local/lib/luarocks/rocks-5.1/manifest ]; then
+	mkdir -p /usr/local/lib/luarocks/rocks-5.1
+	luarocks-admin make_manifest --local-tree --global --tree /usr/local
 fi
 
 #DEBHELPER#
diff -Nru luarocks-3.7.0+dfsg1/debian/tests/clients luarocks-3.7.0+dfsg1/debian/tests/clients
--- luarocks-3.7.0+dfsg1/debian/tests/clients	1970-01-01 00:00:00.000000000 +0000
+++ luarocks-3.7.0+dfsg1/debian/tests/clients	2021-11-05 09:22:18.000000000 +0000
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+CLIENTS=('luarocks-admin')
+
+for client in "${CLIENTS[@]}"; do
+    echo -n "Testing client $client: "
+    $client --version 2>&1 > /dev/null
+    echo "OK"
+done
diff -Nru luarocks-3.7.0+dfsg1/debian/tests/control luarocks-3.7.0+dfsg1/debian/tests/control
--- luarocks-3.7.0+dfsg1/debian/tests/control	1970-01-01 00:00:00.000000000 +0000
+++ luarocks-3.7.0+dfsg1/debian/tests/control	2021-11-05 09:22:18.000000000 +0000
@@ -0,0 +1,4 @@
+Tests: clients
+Depends:
+  luarocks
+Restrictions: needs-root


More information about the pkg-lua-devel mailing list