По какой причине нельзя избавиться от зависимости от bash в rpm?

Так и должно быть:

sed ':1;/-$/{N;b1};s/-\n//g;y/ /\n/' file | sort | uniq -c
1
19.10.2021, 11:45
1 ответ

В конце концов оказалось, что нужно удалить больше зависимостей. Мой последний патч recipes-devtools/rpm/files/0001-remove-bash-dependency.patchвыглядит как:

--- a/scripts/rpmdb_loadcvt
+++ b/scripts/rpmdb_loadcvt
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 ac=$#
 cmd=`basename $0`
--- a/scripts/pythondeps.sh
+++ b/scripts/pythondeps.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 [ $# -ge 1 ] || {
     cat > /dev/null

--- a/scripts/pkgconfigdeps.sh
+++ b/scripts/pkgconfigdeps.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 pkgconfig=/usr/bin/pkg-config
 test -x $pkgconfig || {

--- a/scripts/mono-find-requires
+++ b/scripts/mono-find-requires
@@ -1,1 +1,1 @@
-#!/bin/bash
+#!/bin/sh
--- a/scripts/mono-find-provides
+++ b/scripts/mono-find-provides
@@ -1,1 +1,1 @@
-#!/bin/bash
+#!/bin/sh
--- a/scripts/check-rpaths-worker
+++ b/scripts/check-rpaths-worker
@@ -1,1 +1,1 @@
-#! /bin/bash
+#!/bin/sh

--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #find-debuginfo.sh - automagically generate debug info and file list
 #for inclusion in an rpm spec file.
 #
--- a/scripts/find-lang.sh
+++ b/scripts/find-lang.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #findlang - automagically generate list of language specific files
 #for inclusion in an rpm spec file.
 #This does assume that the *.mo files are under.../locale/...
--- a/scripts/fontconfig.prov
+++ b/scripts/fontconfig.prov
@@ -1,1 +1,1 @@
-#!/bin/bash
+#!/bin/sh
--- a/scripts/check-prereqs
+++ b/scripts/check-prereqs
@@ -1,1 +1,1 @@
-#!/bin/bash
+#!/bin/sh
--- a/scripts/brp-python-bytecompile
+++ b/scripts/brp-python-bytecompile
@@ -1,1 +1,1 @@
-#!/bin/bash
+#!/bin/sh

Кажется, что только проверка зависимостей действительно полагается на функциональность bash, но она все равно не работала, даже с bash. Установка без проверки зависимостей работает. Это нормально для меня.

Но потом я нашел пару других скриптов, заявляющих, что они используют любые /bin/sh, но полные башизмов… вздох

0
03.11.2021, 08:10

Теги

Похожие вопросы