Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/303730/?format=api
{ "id": 303730, "url": "http://patchwork.ozlabs.org/api/patches/303730/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/1387485489-4186-17-git-send-email-clshotwe@rockwellcollins.com/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1387485489-4186-17-git-send-email-clshotwe@rockwellcollins.com>", "list_archive_url": null, "date": "2013-12-19T20:38:05", "name": "[v5,16/20] busybox: add option to install individual binaries", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "e07dc7e6e01687e9036324d58edebab8b26a609a", "submitter": { "id": 38285, "url": "http://patchwork.ozlabs.org/api/people/38285/?format=api", "name": "Clayton Shotwell", "email": "clshotwe@rockwellcollins.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/1387485489-4186-17-git-send-email-clshotwe@rockwellcollins.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/303730/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/303730/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Received": [ "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 2E84E2C0079\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 20 Dec 2013 07:40:16 +1100 (EST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 810F58A1E5;\n\tThu, 19 Dec 2013 20:40:15 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Wb0keNmMpdt4; Thu, 19 Dec 2013 20:40:10 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9E0338C8A2;\n\tThu, 19 Dec 2013 20:39:08 +0000 (UTC)", "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0D1921BF99B\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 19 Dec 2013 20:38:58 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 048988C7E7\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 19 Dec 2013 20:38:58 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id x-3YeXbcKXlt for <buildroot@lists.busybox.net>;\n\tThu, 19 Dec 2013 20:38:51 +0000 (UTC)", "from secvs01.rockwellcollins.com (secvs01.rockwellcollins.com\n\t[205.175.225.240])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 2EE128C5FF\n\tfor <buildroot@busybox.net>; Thu, 19 Dec 2013 20:38:42 +0000 (UTC)", "from nosuchhost.198.131.in-addr.arpa (HELO\n\tcollinscrsmtp01.rockwellcollins.com) ([131.198.63.132])\n\tby mail-virt.rockwellcollins.com with ESMTP;\n\t19 Dec 2013 14:38:30 -0600", "from nyx ([131.198.63.11])\n\tby collinscrsmtp01.rockwellcollins.com (Lotus Domino Release 8.5.2FP2\n\tHF162) with ESMTP id 2013121914382808-2990160 ;\n\tThu, 19 Dec 2013 14:38:28 -0600 " ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Clayton Shotwell <clshotwe@rockwellcollins.com>", "To": "buildroot@busybox.net", "Date": "Thu, 19 Dec 2013 14:38:05 -0600", "Message-Id": "<1387485489-4186-17-git-send-email-clshotwe@rockwellcollins.com>", "X-Mailer": "git-send-email 1.7.1", "In-Reply-To": "<1387485489-4186-1-git-send-email-clshotwe@rockwellcollins.com>", "References": "<1387485489-4186-1-git-send-email-clshotwe@rockwellcollins.com>", "X-MIMETrack": "Itemize by SMTP Server on\n\tCollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release\n\t8.5.2FP2 HF162|May 16, 2011) at 12/19/2013 02:38:28 PM,\n\tSerialize by Router on\n\tCollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release\n\t8.5.2FP2 HF162|May 16, 2011) at 12/19/2013 02:38:30 PM,\n\tSerialize complete at 12/19/2013 02:38:30 PM", "X-TNEFEvaluated": "1", "Cc": "Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tClayton Shotwell <clshotwe@rockwellcollins.com>", "Subject": "[Buildroot] [PATCH v5 16/20] busybox: add option to install\n\tindividual binaries", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.14", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>", "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>", "List-Archive": "<http://lists.busybox.net/pipermail/buildroot>", "List-Post": "<mailto:buildroot@busybox.net>", "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>", "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "buildroot-bounces@busybox.net" }, "content": "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n\nThe individual binaries option of busybox allows for the applets\nthat would usually be symlinks to be built as individual applications\nthat link against a shared library.\n\nThis feature is needed for SELinux to allow the applications to run\nunder the correct SELinux context.\n\nThe patch being added allows the individual applications to be\ninstalled and will be upstreamed to the busybox developers.\n\nThe initial work for this change was done by Thomas Petazzoni\n<thomas.petazzoni@free-electrons.com>.\n\nSigned-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>\n---\nChanges v4 -> v5:\n - Removed Thomas P's signed off line because the original patch\n ahs been completely reworked.\n - Cleaned up the installation of the individual binaries to be a\n upstreamable patch.\n - Added the suid bit to the applets that are declared as\n BB_SUID_REQUIRE and BB_SUID_MAYBE.\nChanges v1 -> v4:\n - Did not exist.\n---\n ...s-Add-installation-of-individual-binaries.patch | 103 ++++++++++++++++++++\n package/busybox/Config.in | 7 ++\n package/busybox/busybox.mk | 34 +++++++\n 3 files changed, 144 insertions(+), 0 deletions(-)\n create mode 100644 package/busybox/1.21.1/0005-applets-Add-installation-of-individual-binaries.patch", "diff": "diff --git a/package/busybox/1.21.1/0005-applets-Add-installation-of-individual-binaries.patch b/package/busybox/1.21.1/0005-applets-Add-installation-of-individual-binaries.patch\nnew file mode 100644\nindex 0000000..e7b9178\n--- /dev/null\n+++ b/package/busybox/1.21.1/0005-applets-Add-installation-of-individual-binaries.patch\n@@ -0,0 +1,103 @@\n+From 3451b55054a6fe2073a21301938802a27dec835d Mon Sep 17 00:00:00 2001\n+From: Clayton Shotwell <clshotwe@rockwellcollins.com>\n+Date: Mon, 16 Dec 2013 14:45:33 -0600\n+Subject: [PATCH 5/5] applets: Add installation of individual binaries\n+\n+Adding support to install individual binaries if the option is\n+enabled. This also installs the shared libbusybox.so.* library.\n+\n+Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>\n+---\n+ Makefile.custom | 4 ++++\n+ applets/install.sh | 26 ++++++++++++++++++++++++--\n+ 2 files changed, 28 insertions(+), 2 deletions(-)\n+\n+diff --git a/Makefile.custom b/Makefile.custom\n+index 6da79e6..e4dc4dc 100644\n+--- a/Makefile.custom\n++++ b/Makefile.custom\n+@@ -23,6 +23,10 @@ ifeq ($(CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER),y)\n+ INSTALL_OPTS:= --scriptwrapper\n+ endif\n+ endif\n++ifeq ($(CONFIG_FEATURE_INDIVIDUAL),y)\n++INSTALL_OPTS:= --binaries\n++LIBBUSYBOX_SONAME:= 0_lib/libbusybox.so.$(BB_VER)\n++endif\n+ install: $(srctree)/applets/install.sh busybox busybox.links\n+ \t$(Q)DO_INSTALL_LIBS=\"$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))\" \\\n+ \t\t$(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)\n+diff --git a/applets/install.sh b/applets/install.sh\n+index 95b4719..d01c98d 100755\n+--- a/applets/install.sh\n++++ b/applets/install.sh\n+@@ -5,19 +5,26 @@ export LC_CTYPE=POSIX\n+ \n+ prefix=$1\n+ if [ -z \"$prefix\" ]; then\n+-\techo \"usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]\"\n++\techo \"usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]\"\n+ \texit 1\n+ fi\n+ \n++# Source the configuration\n++. ./.config\n++\n+ h=`sort busybox.links | uniq`\n+ \n++sharedlib_dir=\"0_lib\"\n++\n+ linkopts=\"\"\n+ scriptwrapper=\"n\"\n++binaries=\"n\"\n+ cleanup=\"0\"\n+ noclobber=\"0\"\n+ case \"$2\" in\n+ \t--hardlinks) linkopts=\"-f\";;\n+ \t--symlinks) linkopts=\"-fs\";;\n++\t--binaries) binaries=\"y\";;\n+ \t--scriptwrapper) scriptwrapper=\"y\";swrapall=\"y\";;\n+ \t--sw-sh-hard) scriptwrapper=\"y\";linkopts=\"-f\";;\n+ \t--sw-sh-sym) scriptwrapper=\"y\";linkopts=\"-fs\";;\n+@@ -40,8 +47,9 @@ if [ -n \"$DO_INSTALL_LIBS\" ] && [ \"$DO_INSTALL_LIBS\" != \"n\" ]; then\n+ \tfor i in $DO_INSTALL_LIBS; do\n+ \t\trm -f \"$prefix/$libdir/$i\" || exit 1\n+ \t\tif [ -f \"$i\" ]; then\n++\t\t\techo \" Installing $i to the target at $prefix/$libdir/\"\n+ \t\t\tcp -pPR \"$i\" \"$prefix/$libdir/\" || exit 1\n+-\t\t\tchmod 0644 \"$prefix/$libdir/$i\" || exit 1\n++\t\t\tchmod 0644 \"$prefix/$libdir/`basename $i`\" || exit 1\n+ \t\tfi\n+ \tdone\n+ fi\n+@@ -68,6 +76,7 @@ install -m 755 busybox \"$prefix/bin/busybox\" || exit 1\n+ \n+ for i in $h; do\n+ \tappdir=`dirname \"$i\"`\n++\tapp=`basename \"$i\"`\n+ \tmkdir -p \"$prefix/$appdir\" || exit 1\n+ \tif [ \"$scriptwrapper\" = \"y\" ]; then\n+ \t\tif [ \"$swrapall\" != \"y\" ] && [ \"$i\" = \"/bin/sh\" ]; then\n+@@ -78,6 +87,19 @@ for i in $h; do\n+ \t\t\tchmod +x \"$prefix/$i\"\n+ \t\tfi\n+ \t\techo \"\t$prefix/$i\"\n++\telif [ \"$binaries\" = \"y\" ]; then\n++\t\t# Copy the binary over rather\n++\t\tif [ -e $sharedlib_dir/$app ]; then\n++\t\t\tif [ \"$noclobber\" = \"0\" ] || [ ! -e \"$prefix/$i\" ]; then\n++\t\t\t\techo \" Copying $sharedlib_dir/$app to $prefix/$i\"\n++\t\t\t\tcp -a $sharedlib_dir/$app $prefix/$i || exit 1\n++\t\t\telse\n++\t\t\t\techo \" $prefix/$i already exists\"\n++\t\t\tfi\n++\t\telse\n++\t\t\techo \"Error: Could not find $sharedlib_dir/$app\"\n++\t\t\texit 1\n++\t\tfi\n+ \telse\n+ \t\tif [ \"$2\" = \"--hardlinks\" ]; then\n+ \t\t\tbb_path=\"$prefix/bin/busybox\"\n+-- \n+1.7.1\n+\ndiff --git a/package/busybox/Config.in b/package/busybox/Config.in\nindex 2d55aa6..8df941b 100644\n--- a/package/busybox/Config.in\n+++ b/package/busybox/Config.in\n@@ -55,6 +55,13 @@ config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS\n \t Show packages in menuconfig that are potentially also provided\n \t by busybox.\n \n+config BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES\n+\tbool \"Individual binaries\"\n+\tdepends on !BR2_PREFER_STATIC_LIB\n+\n+comment \"Busybox individual binaries depends on dynamic libraries\"\n+\tdepends on BR2_PREFER_STATIC_LIB\n+\n config BR2_PACKAGE_BUSYBOX_WATCHDOG\n \tbool \"Install the watchdog daemon startup script\"\n \thelp\ndiff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk\nindex f6f542e..98ee288 100644\n--- a/package/busybox/busybox.mk\n+++ b/package/busybox/busybox.mk\n@@ -50,10 +50,31 @@ ifndef BUSYBOX_CONFIG_FILE\n \tBUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))\n endif\n \n+ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)\n+define BUSYBOX_PERMISSIONS\n+# Applets with BB_SUID_REQUIRE\n+/usr/bin/crontab\t\t f 4755\t0 0 - - - - -\n+/bin/login\t\t\t f 4755\t0 0 - - - - -\n+/usr/bin/passwd\t\t\t f 4755\t0 0 - - - - -\n+/bin/su\t\t\t\t f 4755\t0 0 - - - - -\n+/usr/bin/vlock\t\t\t f 4755\t0 0 - - - - -\n+/usr/bin/wall\t\t\t f 4755\t0 0 - - - - -\n+# Applets with BB_SUID_MAYBE\n+/bin/ping\t\t\t f 4755\t0 0 - - - - -\n+/bin/ping6\t\t\t f 4755\t0 0 - - - - -\n+/sbin/findfs\t\t\t f 4755\t0 0 - - - - -\n+/bin/mount\t\t\t f 4755\t0 0 - - - - -\n+/usr/bin/traceroute\t\t f 4755\t0 0 - - - - -\n+/usr/bin/traceroute6\t\t f 4755\t0 0 - - - - -\n+# Other files\n+/usr/share/udhcpc/default.script f 755 0 0 - - - - -\n+endef\n+else\n define BUSYBOX_PERMISSIONS\n /bin/busybox\t\t\t f 4755\t0 0 - - - - -\n /usr/share/udhcpc/default.script f 755 0 0 - - - - -\n endef\n+endif\n \n # If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d\n ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)\n@@ -152,6 +173,17 @@ define BUSYBOX_SET_INIT\n endef\n endif\n \n+ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)\n+define BUSYBOX_CONFIGURE_INDIVIDUAL_BINARIES\n+\t$(call KCONFIG_ENABLE_OPT,CONFIG_BUILD_LIBBUSYBOX,$(BUSYBOX_BUILD_CONFIG))\n+\t$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_INDIVIDUAL,$(BUSYBOX_BUILD_CONFIG))\n+endef\n+\n+define BUSYBOX_INSTALL_INDIVIDUAL_BINARIES\n+\trm -f $(TARGET_DIR)/bin/busybox\n+endef\n+endif\n+\n define BUSYBOX_INSTALL_LOGGING_SCRIPT\n \tif grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \\\n \t\t[ -f $(TARGET_DIR)/etc/init.d/S01logging ] || \\\n@@ -187,6 +219,7 @@ define BUSYBOX_CONFIGURE_CMDS\n \t$(BUSYBOX_INTERNAL_SHADOW_PASSWORDS)\n \t$(BUSYBOX_SET_INIT)\n \t$(BUSYBOX_SET_WATCHDOG)\n+\t$(BUSYBOX_CONFIGURE_INDIVIDUAL_BINARIES)\n \t@yes \"\" | $(MAKE) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=\"$(TARGET_CROSS)\" \\\n \t\t-C $(@D) oldconfig\n endef\n@@ -205,6 +238,7 @@ define BUSYBOX_INSTALL_TARGET_CMDS\n \t$(BUSYBOX_INSTALL_MDEV_CONF)\n \t$(BUSYBOX_INSTALL_LOGGING_SCRIPT)\n \t$(BUSYBOX_INSTALL_WATCHDOG_SCRIPT)\n+\t$(BUSYBOX_INSTALL_INDIVIDUAL_BINARIES)\n endef\n \n $(eval $(generic-package))\n", "prefixes": [ "v5", "16/20" ] }