Skip to content
Permalink
Browse files

opkg: sync with OpenWrt

  • Loading branch information...
ryzhovau committed Mar 7, 2019
1 parent 4edcf8a commit 3b02b68fa18d44a25e11cd5ef3306619b2456795
Showing with 95 additions and 2,769 deletions.
  1. +46 −78 package/system/opkg/Makefile
  2. +0 −5 package/system/opkg/files/opkg.conf.arm
  3. +0 −5 package/system/opkg/files/opkg.conf.i386
  4. +0 −168 package/system/opkg/patches/001-ship-pkg-m4.patch
  5. +0 −37 package/system/opkg/patches/002-no-shave.patch
  6. +0 −20 package/system/opkg/patches/004-host_cpu.patch
  7. +0 −71 package/system/opkg/patches/007-force_static.patch
  8. +0 −12 package/system/opkg/patches/011-old-config-location.patch
  9. +0 −23 package/system/opkg/patches/012-strip-trailing-conffiles-whitespace.patch
  10. +0 −15 package/system/opkg/patches/014-errors-to-stderr.patch
  11. +0 −317 package/system/opkg/patches/020-avoid_getline.patch
  12. +0 −10 package/system/opkg/patches/030-fix-double-free.patch
  13. +0 −31 package/system/opkg/patches/040-wrap-descriptions-only-on-ttys.patch
  14. +0 −169 package/system/opkg/patches/050-add-case-insensitive-flag.patch
  15. +0 −58 package/system/opkg/patches/060-add-find-command.patch
  16. +0 −120 package/system/opkg/patches/070-use_gzipped_pkg_list.patch
  17. +0 −16 package/system/opkg/patches/080-suppress-blank-package-fields.patch
  18. +0 −11 package/system/opkg/patches/090-suppress-blank-provides-field.patch
  19. +0 −85 package/system/opkg/patches/100-add-force-checksum.patch
  20. +0 −50 package/system/opkg/patches/110-upgrade.patch
  21. +0 −91 package/system/opkg/patches/200-usign_support.patch
  22. +0 −70 package/system/opkg/patches/210-add-force-signature.patch
  23. +0 −812 package/system/opkg/patches/220-drop-release-support.patch
  24. +0 −192 package/system/opkg/patches/230-drop_md5_support.patch
  25. +0 −31 package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch
  26. +0 −39 package/system/opkg/patches/250-add-lists-dir-switch.patch
  27. +0 −74 package/system/opkg/patches/260-add-print-package-size.patch
  28. +0 −11 package/system/opkg/patches/270-fix-use-after-free.patch
  29. +0 −73 package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch
  30. +0 −61 package/system/opkg/patches/290-clarify-download-errors.patch
  31. +16 −0 package/system/opkg/patches/500-paths.patch
  32. +2 −2 package/system/opkg/patches/{999-change-default-config-path.patch → 510-config_path.patch}
  33. +1 −1 package/system/opkg/patches/{999-free-space-calc.patch → 520-root_dir.patch}
  34. +30 −0 package/system/opkg/patches/530-upgrade_all.patch
  35. +0 −11 package/system/opkg/patches/999-change-default-tmpdir.patch
@@ -1,49 +1,49 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
# Copyright (C) 2016 LEDE Project
# Copyright (C) 2016-2017 LEDE Project
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Static opkg for MIPS, enable large partitions support, revert 'upgrade all'

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk

PKG_NAME:=opkg
PKG_RELEASE:=17c
PKG_RELEASE:=1
#PKG_FLAGS:=essential

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://git.yoctoproject.org/git/opkg
PKG_SOURCE_DATE:=2011-04-08
PKG_SOURCE_VERSION:=9c97d5ecd795709c8584e972bfdf3aee3a5b846d
PKG_MIRROR_HASH:=55e05270f3eb2f3aff5d3791463ce3d13b8197ca7b301cd58e731a249552c48f
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES = autogen.sh aclocal.m4
PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
PKG_SOURCE_DATE:=2019-01-31
PKG_SOURCE_VERSION:=d4ba162bb3f931bd5a019154270a548cf1f0853b
PKG_MIRROR_HASH:=dc97e6f6409031422c3c52c513209a6b806b219713c2898cb32fb95d34e92008

PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING

PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>

PKG_FLAGS := nonshared
PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES
# Extend depends from version.mk
PKG_CONFIG_DEPENDS += \
CONFIG_SIGNED_PACKAGES \
CONFIG_TARGET_INIT_PATH

PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
PKG_INSTALL:=1

HOST_BUILD_DEPENDS:=libubox/host

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/opkg
SECTION:=base
CATEGORY:=Base system
TITLE:=opkg package manager
# DEPENDS:=+libpthread
URL:=http://wiki.openmoko.org/wiki/Opkg
DEPENDS:=+libpthread +libubox
URL:=$(PKG_SOURCE_URL)
MENU:=1
endef

@@ -57,76 +57,44 @@ define Package/opkg/description
opkg knows how to install both .ipk and .deb packages.
endef

define Package/opkg/config
config OPKG_SUPPORT_MD5
bool
default n
depends on PACKAGE_opkg
prompt "Support reading old md5 hashes."
help
Old opkg used md5s, new uses sha. This options enables understanding both while prefering sha.
endef

#define Package/opkg/conffiles
#/opt/etc/opkg.conf
#/etc/opkg.conf
#/etc/opkg/keys/
#/etc/opkg/customfeeds.conf
#endef

TARGET_CFLAGS += -ffunction-sections -fdata-sections -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
TARGET_CFLAGS += -ffunction-sections -fdata-sections
EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
#!!!TARGET_LDFLAGS + =$(if $(CONFIG_TARGET_mipselsf),--static)

CONFIGURE_ARGS += \
--disable-curl \
--disable-gpg \
--enable-sha256 \
--with-opkgetcdir=/opt/etc \
--with-opkglibdir=/opt/lib \
--with-opkglockfile=/opt/var/lock/opkg.lock

ifndef CONFIG_SIGNED_PACKAGES
CONFIGURE_ARGS += --disable-usign
endif
ifeq ($(CONFIG_OPKG_SUPPORT_MD5),y)
CONFIGURE_ARGS += --enable-md5
else
CONFIGURE_ARGS += --disable-md5
endif

MAKE_FLAGS = \
CC="$(TARGET_CC)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
HOST_CPU="$(PKGARCH)" \
LDFLAGS="-Wl,--gc-sections $(TARGET_LDFLAGS)" \

define Package/opkg/Default/install
$(INSTALL_DIR) $(1)/opt/lib/opkg $(1)/opt/{bin,etc,tmp} $(1)/opt/var/{lock,log,run}
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/opkg-cl $(1)/opt/bin/opkg
endef

CMAKE_OPTIONS += \
-DSTATIC_UBOX=ON \
-DBUILD_TESTS=OFF \
-DHOST_CPU=$(PKGARCH) \
-DLOCK_FILE=/opt/tmp/opkg.lock \
-DPATH_SPEC="$(TARGET_INIT_PATH)" \
-DVERSION="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"

CMAKE_HOST_OPTIONS += \
-DSTATIC_UBOX=ON \
-DBUILD_TESTS=OFF \
-DHOST_CPU=$(PKGARCH) \
-DLOCK_FILE=/tmp/opkg.lock \
-DVERSION="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"

define Package/opkg/install
$(call Package/opkg/Default/install,$(1),)
# $(INSTALL_DIR) $(1)/usr/lib/opkg
$(INSTALL_DIR) $(1)/opt/bin
# $(INSTALL_DIR) $(1)/etc/opkg
# $(INSTALL_DIR) $(1)/etc/uci-defaults
# $(INSTALL_DATA) ./files/customfeeds.conf $(1)/etc/opkg/customfeeds.conf
# $(INSTALL_DATA) ./files/opkg$(2).conf $(1)/etc/opkg.conf
# $(INSTALL_BIN) ./files/20_migrate-feeds $(1)/etc/uci-defaults/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/opkg-cl $(1)/opt/bin/opkg
# ifneq ($(CONFIG_SIGNED_PACKAGES),)
# echo "option check_signature 1" >> $(1)/etc/opkg.conf
# echo "option check_signature" >> $(1)/etc/opkg.conf
# endif
# mkdir $(1)/opt/sbin
# $(INSTALL_BIN) ./files/opkg-key $(1)/opt/sbin/
endef

define Build/InstallDev
mkdir -p $(1)/opt/include
$(CP) $(PKG_INSTALL_DIR)/opt/include/libopkg $(1)/opt/include/
endef


HOST_CONFIGURE_ARGS+= \
--disable-curl \
--disable-gpg \
--enable-sha256 \
--with-opkgetcdir=/etc \
--with-opkglockfile=/tmp/opkg.lock

define Host/Compile
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) CC="$(HOSTCC)" all
# $(INSTALL_DIR) $(1)/usr/sbin
# $(INSTALL_BIN) ./files/opkg-key $(1)/usr/sbin/
endef

define Host/Install

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 3b02b68

Please sign in to comment.
You can’t perform that action at this time.