From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH] Add tool to format rootfiles Date: Sat, 05 Sep 2020 21:14:12 +0200 Message-ID: In-Reply-To: <20200905084008.29873-1-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3956096538695477131==" List-Id: --===============3956096538695477131== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hallo Jonatan, I see that you have a rule to remove all .so shared libraries from /usr/lib With the bacula addon, this will give a problem as bacula have a different ap= proach to the naming of their shared libraries /usr/lib/libbac-9.6.5.so /usr/lib/libbaccfg-9.6.5.so /usr/lib/libbaccfg.so -> libbaccfg-9.6.5.so /usr/lib/libbacfind-9.6.5.so /usr/lib/libbacfind.so -> libbacfind-9.6.5.so /usr/lib/libbac.so -> libbac-9.6.5.so As you can see the .so is at the end of all the files so that rule would remo= ve all shared libraries causing bacula to fail to load. If this rule is implemented in make.sh then the only option I can think of fo= r bacula would be to change the library location from /usr/lib to /lib unless= someone else has any suggestions for how I could deal with it. Regards, Adolf On 05/09/2020 10:40, Jonatan Schlag wrote: > There are some rules which files should be definitely not included in a > rootfile. Applying these rules by hand is error prone and annoying. So I > wrote these simple command, because computer can apply these rules > faster and better than humans :-; > > It removes all lines starting with '-' and comment out all lines which > point to files which should not be included in the distribution. This > list needs to be extended, but I think this is a good starting point to > make the creating of rootfiles easier. > > Signed-off-by: Jonatan Schlag > --- > make.sh | 37 ++++++++++++++++++++++++++++++++++++- > 1 file changed, 36 insertions(+), 1 deletion(-) > > diff --git a/make.sh b/make.sh > index 4a9dd3cb6..909d4a4de 100755 > --- a/make.sh > +++ b/make.sh > @@ -1895,6 +1895,41 @@ downloadsrc) > fi > cd - >/dev/null 2>&1 > ;; > +format-rootfile) > + if [ ! -f $2 ]; then > + echo -n "'$2' is not a regular file" > + beautify message FAIL > + exit 1 > + fi > + > + ROOTFILE_TO_FORMAT=3D"$2" > + > + # Remove all .so files in /usr/lib > + sed -i '/^\+usr\/lib\/.*\.so$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + # Remove all .a files in /usr/lib > + sed -i '/^\+usr\/lib\/.*\.a$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + > + # Remove all .la files in /usr/lib > + sed -i '/^\+usr\/lib\/.*\.la$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + # Remove all .hpp files in /usr/include > + sed -i '/^\+usr\/include\/.*\.hpp$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + # Remove all .h files in /usr/include > + sed -i '/^\+usr\/include\/.*\.h$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + # Remove all .ipp files in /usr/include > + sed -i '/^\+usr\/include\/.*\.ipp$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + # Remove all .m4 files in /usr/share/aclocal > + sed -i '/^\+usr\/share\/aclocal\/.*\.h$/s/+/#/g' "$ROOTFILE_TO_FORMAT" > + > + # Remove all lines starting with - > + sed -i '/^-.*$/d' "$ROOTFILE_TO_FORMAT" > + > +;; > toolchain) > # Clear screen > ${INTERACTIVE} && clear > @@ -1990,7 +2025,7 @@ find-dependencies) > exec "${BASEDIR}/tools/find-dependencies" "${BASEDIR}/build" "$@" > ;; > *) > - echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|syn= c|toolchain|update-contributors|find-dependencies}" > + echo "Usage: $0 {build|changelog|clean|format-rootfile|gettoolchain|downl= oadsrc|shell|sync|toolchain|update-contributors|find-dependencies}" > cat doc/make.sh-usage > ;; > esac --===============3956096538695477131==--