Skip to content

Commit

Permalink
Merge branch 'jb44454' into 'master'
Browse files Browse the repository at this point in the history
Enable which and add symlinks-which subpackage.

See merge request mer-core/busybox!10
  • Loading branch information
Tomin1 committed Aug 2, 2019
2 parents 229dcd7 + a8b7273 commit 9526aea
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion rpm/busybox-sailfish.config
Expand Up @@ -375,7 +375,7 @@ CONFIG_DEFAULT_SETFONT_DIR=""
# CONFIG_START_STOP_DAEMON is not set
# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
# CONFIG_WHICH is not set
CONFIG_WHICH=y

#
# klibc-utils
Expand Down
48 changes: 33 additions & 15 deletions rpm/busybox.spec
Expand Up @@ -157,6 +157,20 @@ useful for recovering from certain types of system failures,
particularly those involving broken shared libraries. This
is the symlink implementing tar replacement.

%package symlinks-which
Requires: %{name} = %{version}-%{release}
Group: System/Shells
Summary: Busybox replacements for which
Provides: which = %{version}
Conflicts: util-linux <= 2.33+git1

%description symlinks-which
Busybox is a single binary which includes versions of a large number
of system commands, including a shell. This package can be very
useful for recovering from certain types of system failures,
particularly those involving broken shared libraries. This
is the symlink implementing which replacement.

%prep
%setup -q -n %{name}-%{version}/upstream
%patch0 -p1
Expand All @@ -180,12 +194,12 @@ yes "" | make oldconfig
make %{_smp_mflags}
make busybox.links
cat >> busybox.links << EOF
/usr/bin/gzip
/usr/bin/gunzip
%{_bindir}/gzip
%{_bindir}/gunzip
/usr/sbin/udhcpc
/bin/find
/usr/bin/cpio
/usr/bin/tar
%{_bindir}/cpio
%{_bindir}/tar
EOF

%install
Expand All @@ -207,9 +221,9 @@ install -m 644 -t %{buildroot}/%{_docdir}/%{name}-%{version} \
/bin/busybox
/bin/ping
/bin/ping6
/usr/bin/time
/usr/bin/traceroute
/usr/bin/traceroute6
%{_bindir}/time
%{_bindir}/traceroute
%{_bindir}/traceroute6
/usr/sbin/arping

%files static
Expand All @@ -228,9 +242,9 @@ install -m 644 -t %{buildroot}/%{_docdir}/%{name}-%{version} \
%files symlinks-gzip
%defattr(-,root,root,-)
/bin/gunzip
/usr/bin/gunzip
%{_bindir}/gunzip
/bin/gzip
/usr/bin/gzip
%{_bindir}/gzip
/bin/zcat

%files symlinks-dhcp
Expand All @@ -241,14 +255,14 @@ install -m 644 -t %{buildroot}/%{_docdir}/%{name}-%{version} \

%files symlinks-diffutils
%defattr(-,root,root,-)
/usr/bin/diff
/usr/bin/cmp
%{_bindir}/diff
%{_bindir}/cmp

%files symlinks-findutils
%defattr(-,root,root,-)
/bin/find
/usr/bin/find
/usr/bin/xargs
%{_bindir}/find
%{_bindir}/xargs

%files symlinks-grep
%defattr(-,root,root,-)
Expand All @@ -258,10 +272,14 @@ install -m 644 -t %{buildroot}/%{_docdir}/%{name}-%{version} \

%files symlinks-cpio
%defattr(-,root,root,-)
/usr/bin/cpio
%{_bindir}/cpio
/bin/cpio

%files symlinks-tar
%defattr(-,root,root,-)
/usr/bin/tar
%{_bindir}/tar
/bin/tar

%files symlinks-which
%defattr(-,root,root,-)
%{_bindir}/which

0 comments on commit 9526aea

Please sign in to comment.