Comments (6)
Huh the script for reason uses windows line ending? when i check it seems to use unix line ending "\n" (0xa):
$ hexdump -C checkelf | head -1
00000000 23 21 2f 62 69 6e 2f 73 68 0a 73 65 74 20 2d 65 |#!/bin/sh.set -e|
Could it be git playing tricks on us changing the line ending to windows?
from static-ffmpeg.
hmm - this is on linux:
$ hexdump -C checkelf | head -1
00000000 23 21 2f 62 69 6e 2f 73 68 0d 0a 73 65 74 20 2d |#!/bin/sh..set -|
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
$ git config --global core.autocrlf
true
$ git config core.autocrlf
true
What does your git config say?
from static-ffmpeg.
Hmm empty. This is on macOS, git version 2.42.1, i'm using docker desktop 4.23.0 (120376)
➜ static-ffmpeg git:(master) ✗ git config --global core.autocrlf
➜ static-ffmpeg git:(master) ✗ git config core.autocrlf
➜ static-ffmpeg git:(master) ✗ git ls-tree HEAD
040000 tree 29f55a374cb1a0ca551dd3741b6ce4606f0dbed7 .github
100644 blob 94143827ed065ca0d7d5be1b765d255c5c32cd9a Bumpfile
100644 blob f3fc603f3f915f96e408152daea3fdf070329a2a Dockerfile
100644 blob 7680014da05e351ef9f0ebb11d6c101a85f061db LICENSE
100644 blob 7c2d796e1e164a1cbdc188d8ea65d4d102aa6885 README.md
100755 blob b0d5a0df2357ff5f1eb3e5134ce3cab7ed87d518 checkelf
100755 blob 0b81608e7e5dcca66ed0ac378ab7a5050e8a0a3a hashupdate
➜ static-ffmpeg git:(master) ✗ git cat-file -p b0d5a0df2357ff5f1eb3e5134ce3cab7ed87d518 | hexdump -C| head -n 1
00000000 23 21 2f 62 69 6e 2f 73 68 0a 73 65 74 20 2d 65 |#!/bin/sh.set -e|
No idea what is going on. Could you hexdump checkelf from inside the container?
from static-ffmpeg.
Is it possible to reproduce this from an empty directory by creating a new dummy shells script and a Dockerfile with same base image with just COPY/RUN?
from static-ffmpeg.
Looks like the issue is on my side, I'm not sure when/why my autocrlf was set to true, but for Mac and Linux it should be 'input' as per the GitHub docs
By default, it appears to be false: source 1, source 2
ps, this is how i verifed:
docker run --rm --name static-ffmpeg-test -it alpine:3.18.4 /bin/ash
then inside the container:
apk update
apk add git
echo autocrlf global: $(git config --global core.autocrlf)
cd tmp
git clone https://github.com/wader/static-ffmpeg.git
hexdump -C static-ffmpeg/checkelf | head -1
rm -rf static-ffmpeg
git config --global core.autocrlf true
git clone https://github.com/wader/static-ffmpeg.git
hexdump -C static-ffmpeg/checkelf | head -1
output:
/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
v3.18.4-236-g33d1fef0e6f [https://dl-cdn.alpinelinux.org/alpine/v3.18/main]
v3.18.4-235-g6b65dd40013 [https://dl-cdn.alpinelinux.org/alpine/v3.18/community]
OK: 20076 distinct packages available
/ # apk add git
(1/9) Installing ca-certificates (20230506-r0)
(2/9) Installing brotli-libs (1.0.9-r14)
(3/9) Installing libunistring (1.1-r1)
(4/9) Installing libidn2 (2.3.4-r1)
(5/9) Installing nghttp2-libs (1.57.0-r0)
(6/9) Installing libcurl (8.4.0-r0)
(7/9) Installing libexpat (2.5.0-r1)
(8/9) Installing pcre2 (10.42-r1)
(9/9) Installing git (2.40.1-r0)
Executing busybox-1.36.1-r2.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 18 MiB in 24 packages
/ # echo autocrlf global: $(git config --global core.autocrlf)
autocrlf global:
/ # cd tmp
/tmp # git clone https://github.com/wader/static-ffmpeg.git
Cloning into 'static-ffmpeg'...
remote: Enumerating objects: 1974, done.
remote: Counting objects: 100% (383/383), done.
remote: Compressing objects: 100% (219/219), done.
remote: Total 1974 (delta 214), reused 268 (delta 163), pack-reused 1591
Receiving objects: 100% (1974/1974), 469.97 KiB | 2.49 MiB/s, done.
Resolving deltas: 100% (1096/1096), done.
/tmp # hexdump -C static-ffmpeg/checkelf | head -1
00000000 23 21 2f 62 69 6e 2f 73 68 0a 73 65 74 20 2d 65 |#!/bin/sh.set -e|
/tmp # rm -rf static-ffmpeg
/tmp # git config --global core.autocrlf true
/tmp # git clone https://github.com/wader/static-ffmpeg.git
Cloning into 'static-ffmpeg'...
remote: Enumerating objects: 1974, done.
remote: Counting objects: 100% (383/383), done.
remote: Compressing objects: 100% (219/219), done.
remote: Total 1974 (delta 214), reused 268 (delta 163), pack-reused 1591
Receiving objects: 100% (1974/1974), 469.97 KiB | 3.59 MiB/s, done.
Resolving deltas: 100% (1096/1096), done.
/tmp # hexdump -C static-ffmpeg/checkelf | head -1
00000000 23 21 2f 62 69 6e 2f 73 68 0d 0a 73 65 74 20 2d |#!/bin/sh..set -|
from static-ffmpeg.
👍 Part of the mystery solved at least. Been there done that also, i commited as author [email protected] for a few days until i noticed it, think i had accidentally ran som CI script locally :)
from static-ffmpeg.
Related Issues (20)
- License issue HOT 6
- Multi-arch build is currently failing HOT 1
- Build fails due to libass extraction HOT 2
- Possibly use Dockerfile heredoc in the future
- Suggestion: using UPX to pack binaries HOT 2
- AOMediaCodec requires login HOT 6
- ENABLE_FDKAAC=1 not working HOT 3
- ffmpeg: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory HOT 5
- using existing packages? HOT 4
- --enable-libharfbuzz missing HOT 1
- tag 7.0 and master won't compile HOT 6
- platform tags missing HOT 4
- Add librsvg for SVG rasterization support HOT 12
- Help HOT 4
- OpenSSL issue with binary outside container (RedHat/Fedora specific) HOT 6
- [Bug] Custom font config in `/etc/fonts/conf.d` not working due to missing fontconfig binaries HOT 7
- [Enhancement] Support for CUDA HOT 2
- AVX512 not working with x265 or svt-av1 codecs HOT 6
- librav1e produces segfault HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from static-ffmpeg.