mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 21:27:31 +02:00
[backfire] merge r23256, r23257 and r23258
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23295 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8f907fd599
commit
28caf5dec8
@ -49,6 +49,7 @@ ifeq ($(DUMP),)
|
|||||||
IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
|
IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
|
||||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
||||||
INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
|
INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
|
||||||
|
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
|
||||||
|
|
||||||
ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT))
|
ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT))
|
||||||
ifdef Package/$(1)/install
|
ifdef Package/$(1)/install
|
||||||
@ -115,6 +116,20 @@ ifeq ($(DUMP),)
|
|||||||
$(RSTRIP) $$(IDIR_$(1))
|
$(RSTRIP) $$(IDIR_$(1))
|
||||||
SIZE=`cd $$(IDIR_$(1)); du -bs --exclude=./CONTROL . 2>/dev/null | cut -f1`; \
|
SIZE=`cd $$(IDIR_$(1)); du -bs --exclude=./CONTROL . 2>/dev/null | cut -f1`; \
|
||||||
$(SED) "s|^\(Installed-Size:\).*|\1 $$$$SIZE|g" $$(IDIR_$(1))/CONTROL/control
|
$(SED) "s|^\(Installed-Size:\).*|\1 $$$$SIZE|g" $$(IDIR_$(1))/CONTROL/control
|
||||||
|
|
||||||
|
ifneq ($$(KEEP_$(1)),)
|
||||||
|
@( \
|
||||||
|
keepfiles=""; \
|
||||||
|
for x in $$(KEEP_$(1)); do \
|
||||||
|
[ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
|
||||||
|
done; \
|
||||||
|
[ -z "$keepfiles" ] || { \
|
||||||
|
mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
|
||||||
|
for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
|
||||||
|
}; \
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
||||||
@[ -f $$(IPKG_$(1)) ] || false
|
@[ -f $$(IPKG_$(1)) ] || false
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=43.7
|
PKG_RELEASE:=43.8
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
@ -54,6 +54,8 @@ define Package/base-files/conffiles
|
|||||||
/etc/shells
|
/etc/shells
|
||||||
/etc/sysctl.conf
|
/etc/sysctl.conf
|
||||||
/etc/rc.local
|
/etc/rc.local
|
||||||
|
/etc/config/
|
||||||
|
/etc/dropbear/
|
||||||
$(call $(TARGET)/conffiles)
|
$(call $(TARGET)/conffiles)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
5
package/base-files/files/etc/sysupgrade.conf
Normal file
5
package/base-files/files/etc/sysupgrade.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## This file contains files and directories that should
|
||||||
|
## be preserved during an upgrade.
|
||||||
|
|
||||||
|
# /etc/example.conf
|
||||||
|
# /etc/openvpn/
|
@ -0,0 +1,10 @@
|
|||||||
|
# Essential files that will be always kept
|
||||||
|
/etc/banner
|
||||||
|
/etc/hosts
|
||||||
|
/etc/inittab
|
||||||
|
/etc/group
|
||||||
|
/etc/passwd
|
||||||
|
/etc/profile
|
||||||
|
/etc/shells
|
||||||
|
/etc/sysctl.conf
|
||||||
|
/etc/rc.local
|
@ -51,8 +51,9 @@ EOF
|
|||||||
|
|
||||||
add_uci_conffiles() {
|
add_uci_conffiles() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
( find /etc/config /etc/passwd /etc/group /etc/dropbear \
|
( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
|
||||||
/etc/firewall.user /etc/rc.local -type f;
|
/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
|
||||||
|
-type f 2>/dev/null;
|
||||||
opkg list-changed-conffiles ) | sort -u > "$file"
|
opkg list-changed-conffiles ) | sort -u > "$file"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
23
tools/ipkg-utils/patches/170-resolve_conffiles.patch
Normal file
23
tools/ipkg-utils/patches/170-resolve_conffiles.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- a/ipkg-build
|
||||||
|
+++ b/ipkg-build
|
||||||
|
@@ -160,12 +160,15 @@ You probably want to chown these to a sy
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -f $CONTROL/conffiles ]; then
|
||||||
|
- for cf in `cat $CONTROL/conffiles`; do
|
||||||
|
- if [ ! -f ./$cf ]; then
|
||||||
|
- echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2
|
||||||
|
- PKG_ERROR=1
|
||||||
|
- fi
|
||||||
|
+ rm -f $CONTROL/conffiles.resolved
|
||||||
|
+
|
||||||
|
+ for cf in `$FIND $(sed -e "s!^/!$pkg_dir/!" $CONTROL/conffiles) -type f`; do
|
||||||
|
+ echo "${cf#$pkg_dir}" >> $CONTROL/conffiles.resolved
|
||||||
|
done
|
||||||
|
+
|
||||||
|
+ rm $CONTROL/conffiles
|
||||||
|
+ mv $CONTROL/conffiles.resolved $CONTROL/conffiles
|
||||||
|
+ chmod 0644 $CONTROL/conffiles
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $owd
|
Loading…
Reference in New Issue
Block a user