From: Wook Song Date: Wed, 10 Jul 2019 04:50:14 +0000 (+0900) Subject: packaging: Do not create symboic links in /bin and /sbin X-Git-Tag: accepted/tizen/5.5/unified/20191031.012639~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc9b43d79f2987264081030a76a1efb2c5ced000;p=platform%2Fupstream%2Ftoybox.git packaging: Do not create symboic links in /bin and /sbin Since the 'filesystem' package creates /bin and /sbin as symbolic links to /usr/bin and /usr/sbin, respectively, in Tizen, it is unnecessary that toybox creates symbolic links in /bin and /sbin by itself. Change-Id: Ic9b799a3f1de48b5ddaa1815ab82d9adfea70871 Signed-off-by: Wook Song --- diff --git a/packaging/bin.links b/packaging/bin.links deleted file mode 100644 index e69de29..0000000 diff --git a/packaging/sbin.links b/packaging/sbin.links deleted file mode 100644 index e69de29..0000000 diff --git a/packaging/toybox.spec b/packaging/toybox.spec index d52e4d3..67ebf39 100644 --- a/packaging/toybox.spec +++ b/packaging/toybox.spec @@ -7,8 +7,6 @@ License: BSD-2.0 URL: http://www.landley.net/toybox/ Source: %{name}-%{version}.tar.bz2 Source1: config -Source2: bin.links -Source3: sbin.links Source4: usrbin.links Source5: usrsbin.links Source11: config-full @@ -98,38 +96,36 @@ cp toybox toybox-dynamic-full %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/bin -mkdir -p $RPM_BUILD_ROOT/sbin -install -m 755 toybox-dynamic $RPM_BUILD_ROOT/bin/toybox -install -m 755 toybox-dynamic-full $RPM_BUILD_ROOT/bin/toybox-full +mkdir -p $RPM_BUILD_ROOT/%{_bindir} +mkdir -p $RPM_BUILD_ROOT/%{_sbindir} +install -m 755 toybox-dynamic $RPM_BUILD_ROOT/%{_bindir}/toybox +install -m 755 toybox-dynamic-full $RPM_BUILD_ROOT/%{_bindir}/toybox-full # debian/toybox.links pushd %{buildroot} -mkdir -p usr/bin usr/sbin sbin -cd bin -for f in `cat %SOURCE2` ; do ln -s toybox $f ; done -cd ../sbin -for f in `cat %SOURCE3` ; do ln -s ../bin/toybox $f ; done -cd ../usr/bin -for f in `cat %SOURCE4` ; do ln -s ../../bin/toybox $f ; done -cd ../../usr/sbin -for f in `cat %SOURCE5` ; do ln -s ../../bin/toybox $f ; done +mkdir -p usr/bin usr/sbin +pushd usr/bin +for f in `cat %SOURCE4` ; do ln -s toybox $f ; done +popd +pushd usr/sbin +for f in `cat %SOURCE5` ; do ln -s ../bin/toybox $f ; done +popd popd %post full -/bin/toybox-full ln -s /bin/toybox-full /bin/toybox +%{_bindir}/toybox-full ln -s %{_bindir}/toybox-full %{_bindir}/toybox %files %manifest toybox.manifest %license LICENSE.BSD %defattr(-,root,root,-) -/bin/toybox +%{_bindir}/toybox %files full %manifest toybox.manifest %license LICENSE.BSD %defattr(-,root,root,-) -/bin/toybox-full +%{_bindir}/toybox-full %files symlinks-full %manifest toybox.manifest