Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
On Thu, Jun 17, 2010 at 08:09:02AM -0500, Travis Kemen wrote: > Did you check this against both opkg and the ipkg-script the buildroot uses > to generate the info file? (they are different) My thought was to compile > the opkg on the host as well and use it during the compile to fix this issue > but I haven't had time to do it yet. SUDDENLY, opkg now keeps md5sums of conffiles (and conffiles lists not kept in status file). I'll think about adding "show_configs_that_have_been_changed_from_original" command to opkg. -- Regards,-- Sir Raorn. --- http://thousandsofhate.blogspot.com/ signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
Did you check this against both opkg and the ipkg-script the buildroot uses to generate the info file? (they are different) My thought was to compile the opkg on the host as well and use it during the compile to fix this issue but I haven't had time to do it yet. Travis On Thu, Jun 17, 2010 at 7:11 AM, Alexey I. Froloff wrote: > On Wed, Feb 03, 2010 at 09:27:21AM +0100, Bastian Bittorf wrote: > > > > > + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat > >> "$file" > > > > seems complicated to me, why not: > > > > cat /usr/lib/opkg/info/*.conffiles >>"$file" > > > There's still an opportunity that none of *.conffiles exists. > > hmm, then this: > > local pattern="/usr/lib/opkg/info/*.conffiles" > > cat $pattern >/dev/null 2>&1 && cat $pattern >>"$file" > So? Will anyone do anything? Should I resend something? > > -- > Regards,-- > Sir Raorn. --- http://thousandsofhate.blogspot.com/ > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkwaEOQACgkQVqT7+fkT8wqgaQCgte8wMklby9s4EzX5HNWRIBRF > g68An0mV6i4cel0bh4t9xlBNtOlwire9 > =ty6p > -END PGP SIGNATURE- > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
On Wed, Feb 03, 2010 at 09:27:21AM +0100, Bastian Bittorf wrote: > > > > + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> > > > > "$file" > > > seems complicated to me, why not: > > > cat /usr/lib/opkg/info/*.conffiles >>"$file" > > There's still an opportunity that none of *.conffiles exists. > hmm, then this: > local pattern="/usr/lib/opkg/info/*.conffiles" > cat $pattern >/dev/null 2>&1 && cat $pattern >>"$file" So? Will anyone do anything? Should I resend something? -- Regards,-- Sir Raorn. --- http://thousandsofhate.blogspot.com/ signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
When performing sysupgrade process, opkg should report its conffiles list. Signed-off-by: Alexey I. Froloff --- package/opkg/Makefile|2 ++ package/opkg/files/opkg-conffiles.sh |9 + 2 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 package/opkg/files/opkg-conffiles.sh diff --git a/package/opkg/Makefile b/package/opkg/Makefile index 6894ae7..40147ce 100644 --- a/package/opkg/Makefile +++ b/package/opkg/Makefile @@ -69,7 +69,9 @@ define Package/opkg/install $(INSTALL_DIR) $(1)/usr/lib/opkg $(INSTALL_DIR) $(1)/bin $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/lib/upgrade $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/ + $(INSTALL_DATA) ./files/opkg-conffiles.sh $(1)/lib/upgrade/ $(SED) 's,S,$(PKGARCH),g' $(1)/etc/opkg.conf $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg endef diff --git a/package/opkg/files/opkg-conffiles.sh b/package/opkg/files/opkg-conffiles.sh new file mode 100644 index 000..237fd9f --- /dev/null +++ b/package/opkg/files/opkg-conffiles.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +add_opkg_conffiles() { + local file="$1" + local pattern="/usr/lib/opkg/info/*.conffiles" + cat $pattern >/dev/null 2>&1 && cat $pattern >>"$file" + return 0 +} +append sysupgrade_init_conffiles add_opkg_conffiles -- 1.6.5.8 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
On Wed, Feb 03, 2010 at 09:27:21AM +0100, Bastian Bittorf wrote: > personally i try to avoid unnecessary usage of "complicated" > commands to leave the way open for busybox minimal builts Should I resend patch? -- Regards,-- Sir Raorn. --- http://thousandsofhate.blogspot.com/ signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
* Alexey I. Froloff [03.02.2010 09:10]: > On Wed, Feb 03, 2010 at 08:59:04AM +0100, Bastian Bittorf wrote: > > > + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> "$file" > > seems complicated to me, why not: > > cat /usr/lib/opkg/info/*.conffiles >>"$file" > There's still an opportunity that none of *.conffiles exists. hmm, then this: local pattern="/usr/lib/opkg/info/*.conffiles" cat $pattern >/dev/null 2>&1 && cat $pattern >>"$file" this avoids forking and only uses simple commands. personally i try to avoid unnecessary usage of "complicated" commands to leave the way open for busybox minimal builts > You may call me "paranoid" ;-) no, it's ok 8-) bye, Bastian signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
On Wed, Feb 03, 2010 at 08:59:04AM +0100, Bastian Bittorf wrote: > > + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> "$file" > seems complicated to me, why not: > cat /usr/lib/opkg/info/*.conffiles >>"$file" There's still an opportunity that none of *.conffiles exists. You may call me "paranoid" ;-) -- Regards,-- Sir Raorn. --- http://thousandsofhate.blogspot.com/ signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
* Alexey I. Froloff [03.02.2010 00:00]: > +#!/bin/sh > + > +add_opkg_conffiles() { > + local file="$1" > + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> "$file" > + return 0 > +} seems complicated to me, why not: cat /usr/lib/opkg/info/*.conffiles >>"$file" bye, Bastian signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
When performing sysupgrade process, opkg should report its conffiles list. Signed-off-by: Alexey I. Froloff --- package/opkg/Makefile|2 ++ package/opkg/files/opkg-conffiles.sh |8 2 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 package/opkg/files/opkg-conffiles.sh diff --git a/package/opkg/Makefile b/package/opkg/Makefile index 6894ae7..40147ce 100644 --- a/package/opkg/Makefile +++ b/package/opkg/Makefile @@ -69,7 +69,9 @@ define Package/opkg/install $(INSTALL_DIR) $(1)/usr/lib/opkg $(INSTALL_DIR) $(1)/bin $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/lib/upgrade $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/ + $(INSTALL_DATA) ./files/opkg-conffiles.sh $(1)/lib/upgrade/ $(SED) 's,S,$(PKGARCH),g' $(1)/etc/opkg.conf $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg endef diff --git a/package/opkg/files/opkg-conffiles.sh b/package/opkg/files/opkg-conffiles.sh new file mode 100644 index 000..21a0dda --- /dev/null +++ b/package/opkg/files/opkg-conffiles.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +add_opkg_conffiles() { + local file="$1" + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> "$file" + return 0 +} +append sysupgrade_init_conffiles add_opkg_conffiles -- 1.6.5.8 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel