Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb48950' into 'master'
[packaging] Add procps support. JB#48950

See merge request mer-core/busybox!22
  • Loading branch information
ballock committed Aug 24, 2020
2 parents 9f26721 + abf61d5 commit b75bf72
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 22 deletions.
20 changes: 20 additions & 0 deletions rpm/0003-applets-watch-in-usr-bin.patch
@@ -0,0 +1,20 @@
commit 0972a8d9725e1fa65fdfb87a5d0509cb8bef0bde (HEAD)
Author: Boleslaw Tokarski <boleslaw.tokarski@jollamobile.com>
Date: Tue Aug 4 15:22:35 2020 +0100

Align watch with what is in procps-ng

diff --git a/procps/watch.c b/procps/watch.c
index 059eb1dda..3ea55fd81 100644
--- a/procps/watch.c
+++ b/procps/watch.c
@@ -14,7 +14,7 @@
//config: watch is used to execute a program periodically, showing
//config: output to the screen.

-//applet:IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP))
+//applet:IF_WATCH(APPLET(watch, BB_DIR_USR_BIN, BB_SUID_DROP))

//kbuild:lib-$(CONFIG_WATCH) += watch.o


44 changes: 22 additions & 22 deletions rpm/busybox-sailfish.config
Expand Up @@ -332,7 +332,7 @@ CONFIG_WC=y
CONFIG_FEATURE_WC_LARGE=y
CONFIG_WHOAMI=y
CONFIG_WHO=y
# CONFIG_W is not set
CONFIG_W=y
CONFIG_USERS=y
CONFIG_YES=y

Expand Down Expand Up @@ -996,7 +996,7 @@ CONFIG_FEATURE_MIME_CHARSET=""
#
# Process Utilities
#
# CONFIG_FREE is not set
CONFIG_FREE=y
# CONFIG_FUSER is not set
# CONFIG_IOSTAT is not set
# CONFIG_KILL is not set
Expand All @@ -1005,36 +1005,36 @@ CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_LSOF is not set
# CONFIG_MPSTAT is not set
# CONFIG_NMETER is not set
# CONFIG_PGREP is not set
# CONFIG_PKILL is not set
CONFIG_PGREP=y
CONFIG_PKILL=y
# CONFIG_PIDOF is not set
# CONFIG_FEATURE_PIDOF_SINGLE is not set
# CONFIG_FEATURE_PIDOF_OMIT is not set
# CONFIG_PMAP is not set
CONFIG_PMAP=y
# CONFIG_POWERTOP is not set
# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set
# CONFIG_PS is not set
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_FEATURE_PS_LONG is not set
CONFIG_PS=y
CONFIG_FEATURE_PS_WIDE=y
CONFIG_FEATURE_PS_LONG=y
# CONFIG_FEATURE_PS_TIME is not set
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_PSTREE is not set
# CONFIG_PWDX is not set
CONFIG_PWDX=y
# CONFIG_SMEMCAP is not set
# CONFIG_BB_SYSCTL is not set
# CONFIG_TOP is not set
# CONFIG_FEATURE_TOP_INTERACTIVE is not set
# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set
# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set
# CONFIG_FEATURE_TOP_SMP_CPU is not set
# CONFIG_FEATURE_TOP_DECIMALS is not set
# CONFIG_FEATURE_TOP_SMP_PROCESS is not set
# CONFIG_FEATURE_TOPMEM is not set
# CONFIG_UPTIME is not set
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
# CONFIG_WATCH is not set
# CONFIG_FEATURE_SHOW_THREADS is not set
CONFIG_BB_SYSCTL=y
CONFIG_TOP=y
CONFIG_FEATURE_TOP_INTERACTIVE=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_UPTIME=y
CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y
CONFIG_WATCH=y
CONFIG_FEATURE_SHOW_THREADS=y

#
# Runit Utilities
Expand Down
30 changes: 30 additions & 0 deletions rpm/busybox.spec
Expand Up @@ -9,6 +9,7 @@ Source2: busybox-static.config
Source3: busybox-sailfish.config
Patch0: 0001-Copy-extended-attributes-if-p-flag-is-provided-to-cp.patch
Patch1: 0002-applets-Busybox-in-usr-bin-instead-of-bin.patch
Patch2: 0003-applets-watch-in-usr-bin.patch
URL: https://git.sailfishos.org/mer-core/busybox
BuildRequires: glibc-static
BuildRequires: libselinux-static libsepol-static
Expand Down Expand Up @@ -118,6 +119,16 @@ Conflicts: gnu-cpio
%description symlinks-cpio
%{summary} as symlinks.

%package symlinks-procps
Requires: %{name} = %{version}-%{release}
Summary: Busybox replacement for procps
Provides: procps = 3.3.15+git2
Obsoletes: procps < 3.3.15+git2
Conflicts: procps-ng

%description symlinks-procps
%{summary} as symlinks.

%package symlinks-tar
Requires: %{name} = %{version}-%{release}
Summary: Busybox replacement for tar
Expand Down Expand Up @@ -159,6 +170,7 @@ Obsoletes: ncurses < 6.1+git2
%setup -q -n %{name}-%{version}/upstream
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
# TODO: This config should be synced with the dynamic config at some point
Expand All @@ -185,6 +197,7 @@ cat >> busybox.links << EOF
%{_bindir}/ping6
%{_sbindir}/mkdosfs
%{_sbindir}/mkfs.vfat
%{_sbindir}/sysctl
%{_bindir}/gzip
%{_bindir}/gunzip
%{_bindir}/zcat
Expand Down Expand Up @@ -220,6 +233,7 @@ cat >> busybox.links << EOF
%{_bindir}/mv
%{_bindir}/nice
%{_bindir}/printenv
%{_bindir}/ps
%{_bindir}/pwd
%{_bindir}/rm
%{_bindir}/rmdir
Expand Down Expand Up @@ -434,6 +448,22 @@ install -m 644 -t %{buildroot}/%{_docdir}/%{name}-%{version} \
/bin/cpio
%{_bindir}/cpio

%files symlinks-procps
%defattr(-,root,root,-)
/bin/ps
/sbin/sysctl
%{_bindir}/ps
%{_bindir}/watch
%{_sbindir}/sysctl
%{_bindir}/free
%{_bindir}/pgrep
%{_bindir}/pkill
%{_bindir}/pmap
%{_bindir}/pwdx
%{_bindir}/top
%{_bindir}/uptime
%{_bindir}/w

%files symlinks-tar
%defattr(-,root,root,-)
/bin/tar
Expand Down

0 comments on commit b75bf72

Please sign in to comment.