Repository: eza-community/eza (language: rust)

Issue:
ci: v0.14.0 Unable to build .deb package
If eza fails to compile, or if there is a problem during the build process, then please include the following information in your report:

- The exact eza commit you are building : **9a9df550**
- Your operating system and hardware platform : Docker debian/bookworm

If you are seeing compilation errors, please include the output of the build process.

`./devtools/deb-package.sh` output :
```
checkout tag v0.14.0
build man pages
sh: 1: Syntax error: "(" unexpected
error: Recipe `man` failed on line 80 with exit code 2
```
---

To reproduce :
``` sh
docker run -it "debian:bookworm" bash

apt-get update -yq && apt-get install -yq aptitude curl git wget gzip lintian pandoc gpg lsb-release

# Just
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | tee /etc/apt/sources.list.d/prebuilt-mpr.list
apt-get update -yq && aptitude --quiet --assume-yes install just

git clone https://github.com/eza-community/eza && cd eza

./devtools/deb-package.sh
```


ci: v0.14.0 Unable to build .deb package
If eza fails to compile, or if there is a problem during the build process, then please include the following information in your report:

- The exact eza commit you are building : **9a9df550**
- Your operating system and hardware platform : Docker debian/bookworm

If you are seeing compilation errors, please include the output of the build process.

`./devtools/deb-package.sh` output :
```
checkout tag v0.14.0
build man pages
sh: 1: Syntax error: "(" unexpected
error: Recipe `man` failed on line 80 with exit code 2
```
---

To reproduce :
``` sh
docker run -it "debian:bookworm" bash

apt-get update -yq && apt-get install -yq aptitude curl git wget gzip lintian pandoc gpg lsb-release

# Just
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | tee /etc/apt/sources.list.d/prebuilt-mpr.list
apt-get update -yq && aptitude --quiet --assume-yes install just

git clone https://github.com/eza-community/eza && cd eza

./devtools/deb-package.sh
```




Discussion / hints:
And to be more precise, the error comes from `just` command to build manpages : 
```
cd eza
just man
```
Produce : 
```
sh: 1: Syntax error: "(" unexpected
error: Recipe `man` failed on line 80 with exit code 2
```

Everything worked fine before the commit https://github.com/eza-community/eza/commit/c496bae07749adba871fcb65dc3fb34204443356

Hm, my initial guess would be that the bash version in the container is too old maybe ... can you tell us what version that is? I'm running bash 5.1.16 on my machine and there it works.

Also, as a side note ... the `deb-package.sh` is actually just intended for us to build the packages for the deb repo not for users. But this is still a good point in case we want to CI this, too.
`bash --version` : 
```
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```

And `just --version` : 
```
just --version
just 1.14.0
```

And yeah, i noticed [deb.gierens.de](http://deb.gierens.de/pool/main/e/eza/) (thanks for that :+1: ) but has i don't have access to this domain at work… I managed to have my own auto-build of Eza .deb package based on a [tiny script + Docker](https://git.101010.fr/gardouille/eza-docker-build/src/branch/main/build-deb.package.sh) and the tools available at work ^^

I will comment in the PR for the rest :)
just updated the deb repo by the way ... now ships v0.14.0 ;)
And to be more precise, the error comes from `just` command to build manpages : 
```
cd eza
just man
```
Produce : 
```
sh: 1: Syntax error: "(" unexpected
error: Recipe `man` failed on line 80 with exit code 2
```

Everything worked fine before the commit https://github.com/eza-community/eza/commit/c496bae07749adba871fcb65dc3fb34204443356

Hm, my initial guess would be that the bash version in the container is too old maybe ... can you tell us what version that is? I'm running bash 5.1.16 on my machine and there it works.

Also, as a side note ... the `deb-package.sh` is actually just intended for us to build the packages for the deb repo not for users. But this is still a good point in case we want to CI this, too.
`bash --version` : 
```
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```

And `just --version` : 
```
just --version
just 1.14.0
```

And yeah, i noticed [deb.gierens.de](http://deb.gierens.de/pool/main/e/eza/) (thanks for that :+1: ) but has i don't have access to this domain at work… I managed to have my own auto-build of Eza .deb package based on a [tiny script + Docker](https://git.101010.fr/gardouille/eza-docker-build/src/branch/main/build-deb.package.sh) and the tools available at work ^^

I will comment in the PR for the rest :)
just updated the deb repo by the way ... now ships v0.14.0 ;)

Fix patch:
diff --git a/Justfile b/Justfile
index 66cd8580e..198c629c4 100644
--- a/Justfile
+++ b/Justfile
@@ -74,9 +74,9 @@ all-release: build-release test-release
 # build the man pages
 @man:
     mkdir -p "${CARGO_TARGET_DIR:-target}/man"
-    version=$(cat Cargo.toml | grep ^version | head -n 1 | awk '{print $NF}' | tr -d '"'); \
+    version=$(awk 'BEGIN { FS = "\"" } ; /^version/ { print $2 ; exit }' Cargo.toml); \
     for page in eza.1 eza_colors.5 eza_colors-explanation.5; do \
-        pandoc --standalone -f markdown -t man <(cat "man/${page}.md" | sed "s/\$version/v${version}/g") > "${CARGO_TARGET_DIR:-target}/man/${page}"; \
+        sed "s/\$version/v${version}/g" "man/${page}.md" | pandoc --standalone -f markdown -t man > "${CARGO_TARGET_DIR:-target}/man/${page}"; \
     done;
 
 # build and preview the main man page (eza.1)


Test patch: