[gluster-packaging] Fwd: Bug#873878: glusterfs-client: mount.glusterfs needs bash as /bin/sh
Patrick Matthäi
pmatthaei at debian.org
Fri Sep 1 11:25:14 UTC 2017
Am 01.09.2017 um 11:40 schrieb Niels de Vos:
> On Fri, Sep 01, 2017 at 09:36:16AM +0200, Patrick Matthäi wrote:
>> Hi,
>>
>> how should it be fixed for glusterfs now? Better shell code without
>> bashishm or do you want /bin/bash as shebang?
> Do you have a preference? I do not know how much work is it is to
> rewrite the mount.glusterfs script to remove all the Bashisms. At least
> in the Debian builds you may want to patch it to /bin/bash for the time
> being.
I would prefer a patch, so that it works without bash. Luckily the bug
reporter just wrote a patch :)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873878#10
If you would merge it, I also would add it to the repository. I have
attached two other patches for 3.12.x, too.
>
> Opinions welcome :) Thanks,
> Niels
>
>>
>>
>> -------- Weitergeleitete Nachricht --------
>> Betreff: Bug#873878: glusterfs-client: mount.glusterfs needs bash as
>> /bin/sh
>> Weitersenden-Datum: Thu, 31 Aug 2017 20:21:01 +0000
>> Weitersenden-Von: Michael Lundkvist <brels.debian at solske.net>
>> Weitersenden-An: debian-bugs-dist at lists.debian.org
>> Weitersenden-CC: Patrick Matthäi <pmatthaei at debian.org>
>> Datum: Thu, 31 Aug 2017 21:46:18 +0200
>> Von: Michael Lundkvist <brels.debian at solske.net>
>> Antwort an: Michael Lundkvist <brels.debian at solske.net>,
>> 873878 at bugs.debian.org
>> An: Debian Bug Tracking System <submit at bugs.debian.org>
>>
>>
>>
>> Package: glusterfs-client
>> Version: 3.12.0-1
>> Severity: serious
>> Tags: upstream
>> Justification: Policy 10.4
>>
>> Version 3.12 of Glusterfs adds code in /sbin/mount.glusterfs that depends on bash.
>>
>> With dash as /bin/sh, I get the following error message when trying to mount a glusterfs volume:
>>> /sbin/mount.glusterfs: 667: /sbin/mount.glusterfs: Bad substitution
>> Line 667 is:
>> 667 [ ${volume_str:0:1} = '/' ] && {
>>
>> Modifying mount.glusterfs to use /bin/bash makes it possible to mount again.
>>
>> /Micke
>>
>>
>> -- System Information:
>> Debian Release: buster/sid
>> APT prefers unstable
>> APT policy: (500, 'unstable')
>> Architecture: amd64 (x86_64)
>>
>> Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
>> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
>> Shell: /bin/sh linked to /bin/dash
>> Init: systemd (via /run/systemd/system)
>>
>> Versions of packages glusterfs-client depends on:
>> ii fuse 2.9.7-1
>> ii glusterfs-common 3.12.0-1
>> ii libc6 2.24-17
>> ii libssl1.1 1.1.0f-5
>> ii python 2.7.13-2
>>
>> glusterfs-client recommends no packages.
>>
>> glusterfs-client suggests no packages.
>>
>> -- no debconf information
>>
>> _______________________________________________
>> packaging mailing list
>> packaging at gluster.org
>> http://lists.gluster.org/mailman/listinfo/packaging
--
/*
Mit freundlichem Gruß / With kind regards,
Patrick Matthäi
GNU/Linux Debian Developer
Blog: http://www.linux-dev.org/
E-Mail: pmatthaei at debian.org
patrick at linux-dev.org
*/
-------------- next part --------------
# Fix syntax error in shell script.
diff -Naur glusterfs-3.11.1.orig/extras/hook-scripts/create/post/S10selinux-label-brick.sh glusterfs-3.11.1/extras/hook-scripts/create/post/S10selinux-label-brick.sh
--- glusterfs-3.11.1.orig/extras/hook-scripts/create/post/S10selinux-label-brick.sh 2017-06-27 17:25:12.237136825 +0200
+++ glusterfs-3.11.1/extras/hook-scripts/create/post/S10selinux-label-brick.sh 2017-07-03 16:21:05.113301642 +0200
@@ -43,7 +43,7 @@
do
# Add a file context for each brick path and associate with the
# glusterd_brick_t SELinux type.
- semanage fcontext --add -t glusterd_brick_t -r s0 $b(/.*)?
+ semanage fcontext --add -t glusterd_brick_t -r s0 $b
# Set the labels on the new brick path.
restorecon -R $b
-------------- next part --------------
# Fix new spelling errors.
diff -Naur glusterfs-3.12.0.orig/xlators/mgmt/glusterd/src/glusterd-geo-rep.c glusterfs-3.12.0/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
--- glusterfs-3.12.0.orig/xlators/mgmt/glusterd/src/glusterd-geo-rep.c 2017-08-30 14:46:33.875359178 +0200
+++ glusterfs-3.12.0/xlators/mgmt/glusterd/src/glusterd-geo-rep.c 2017-08-31 10:43:14.228479030 +0200
@@ -3615,7 +3615,7 @@
"geo-replication start failed",
strerror (errno));
snprintf (errmsg, sizeof(errmsg),
- "fuse unvailable");
+ "fuse unavailable");
ret = -1;
goto out;
}
diff -Naur glusterfs-3.12.0.orig/xlators/mgmt/glusterd/src/glusterd-volume-set.c glusterfs-3.12.0/xlators/mgmt/glusterd/src/glusterd-volume-set.c
--- glusterfs-3.12.0.orig/xlators/mgmt/glusterd/src/glusterd-volume-set.c 2017-08-30 14:46:33.901359256 +0200
+++ glusterfs-3.12.0/xlators/mgmt/glusterd/src/glusterd-volume-set.c 2017-08-31 10:43:41.580365099 +0200
@@ -253,7 +253,7 @@
ret = glusterd_volinfo_get_boolean (volinfo,
"features.record-counters");
if (ret == -1) {
- snprintf (errstr, sizeof (errstr), "Failed to retrive value of"
+ snprintf (errstr, sizeof (errstr), "Failed to retrieve value of"
"features.record-counters from volume info");
goto out;
}
@@ -273,7 +273,7 @@
"cluster.read-freq-threshold");
if (current_rt == -1) {
snprintf (errstr, sizeof (errstr),
- " Failed to retrive value of"
+ " Failed to retrieve value of"
"cluster.read-freq-threshold");
goto out;
}
@@ -285,7 +285,7 @@
"cluster.write-freq-threshold");
if (current_wt == -1) {
snprintf (errstr, sizeof (errstr),
- " Failed to retrive value of"
+ " Failed to retrieve value of"
"cluster.write-freq-threshold");
goto out;
}
More information about the packaging
mailing list