The last sed release had a "minor" problem which was fixed after the release: https://git.savannah.gnu.org/gitweb/?p=sed.git;a=commit;h=8f600f2df293d539e9e9137f6f82faa1633b97c1 - mishandling of symlinks.

There was unfortunately no new release, and this is a major issue, because the packaged version of sed breaks buildroot (specfically the mkusers script) with targets that contain a second level of indirection, shortened reproducer:



```
export TARGET=/work2/work/abc/br2_target/basesystem/abcdef_ghij/build/buildroot-fs/squashfs/target
mkdir -p $TARGET/etc/
mkdir -p  $TARGET/tmp/etc/
touch $TARGET/etc/group.default
ln -sf -T ../tmp/etc/group $TARGET/etc/group
ln -sf -T ../../etc/group.default $TARGET/tmp/etc/group

sed -i --follow-symlinks -e '/^service:.*/d;' $TARGET/etc/group
unset TARGET
```
This breaks:
```
sed -i --follow-symlinks -e '/^service:.*/d;' $TARGET/etc/group
sed: couldn't readlink /work2/work/abc/br2_target/basesystem/abcdef_ghij/build/buildroot-fs/squashfs/target/etc/../tmp/etc/../../etc/group.defaul: No such file or directory
```

Mind the path - the "t" at the end is missing. Sed line borrowed from buildroot.

Reply via email to