* [ptxdist] [PATCH] image_ipkg.make: create repository directory
@ 2012-03-14 23:25 Ladislav Michl
2012-03-15 9:21 ` Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Ladislav Michl @ 2012-03-14 23:25 UTC (permalink / raw)
To: ptxdist
Pushing ipks fails when top level repository directory does not exists.
Once here, use helper variables for repository paths.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
image_ipkg.make | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/rules/post/image_ipkg.make b/rules/post/image_ipkg.make
index 5449553..4989632 100644
--- a/rules/post/image_ipkg.make
+++ b/rules/post/image_ipkg.make
@@ -11,17 +11,21 @@
SEL_ROOTFS-$(PTXCONF_IMAGE_IPKG_PUSH_TO_REPOSITORY) += $(STATEDIR)/ipkg-push
-ipkg-push : $(STATEDIR)/ipkg-push
+ipkg-push: $(STATEDIR)/ipkg-push
+
+IPKG_DISTDIR := $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION))
+IPKG_REPODIR := $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY))
$(STATEDIR)/ipkg-push: $(STATEDIR)/host-ipkg-utils.install.post $(STATEDIR)/world.targetinstall
@$(call targetinfo)
ifdef PTXCONF_IMAGE_IPKG_FORCED_PUSH
- rm -rf $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)
+ rm -rf $(IPKG_DISTDIR)
endif
+ mkdir -p $(IPKG_REPODIR)
@echo "pushing ipkg packages to ipkg-repository..."
@$(HOST_ENV) $(PTXDIST_TOPDIR)/scripts/ipkg-push \
--ipkgdir $(call remove_quotes,$(PKGDIR)) \
- --repodir $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY)) \
+ --repodir $(IPKG_REPODIR) \
--revision $(call remove_quotes,$(PTXDIST_VERSION_FULL)) \
--project $(call remove_quotes,$(PTXCONF_PROJECT)) \
--dist $(call remove_quotes,$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)) \
@@ -30,12 +34,12 @@ endif
ifdef PTXCONF_IMAGE_IPKG_SIGN_OPENSSL
@echo "signing Packages..."
openssl smime -sign \
- -in $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)/Packages \
+ -in $(IPKG_DISTDIR)/Packages \
-text -binary \
-outform PEM \
-signer $(PTXCONF_IMAGE_IPKG_SIGN_OPENSSL_SIGNER) \
-inkey $(PTXCONF_IMAGE_IPKG_SIGN_OPENSSL_KEY) \
- -out $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)/Packages.sig
+ -out $(IPKG_DISTDIR)/Packages.sig
@echo "Packages.sig created"
endif
@touch $@
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [PATCH] image_ipkg.make: create repository directory
2012-03-14 23:25 [ptxdist] [PATCH] image_ipkg.make: create repository directory Ladislav Michl
@ 2012-03-15 9:21 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-03-15 9:21 UTC (permalink / raw)
To: ptxdist
On Thu, Mar 15, 2012 at 12:25:45AM +0100, Ladislav Michl wrote:
> Pushing ipks fails when top level repository directory does not exists.
> Once here, use helper variables for repository paths.
This is not quite correct. Although it wasn't all that good before.
Can you please check, that the quoting is correct?
- 'call remove_quotes' is only needed for PTXCONF_* variables (ptxconfig
is sourced into the Makefile and make keeps the quotes).
- When the shell is called all paths and strings provided by the user
should then be quoted to avoid any problems.
Michael
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
> image_ipkg.make | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/rules/post/image_ipkg.make b/rules/post/image_ipkg.make
> index 5449553..4989632 100644
> --- a/rules/post/image_ipkg.make
> +++ b/rules/post/image_ipkg.make
> @@ -11,17 +11,21 @@
>
> SEL_ROOTFS-$(PTXCONF_IMAGE_IPKG_PUSH_TO_REPOSITORY) += $(STATEDIR)/ipkg-push
>
> -ipkg-push : $(STATEDIR)/ipkg-push
> +ipkg-push: $(STATEDIR)/ipkg-push
> +
> +IPKG_DISTDIR := $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION))
> +IPKG_REPODIR := $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY))
>
> $(STATEDIR)/ipkg-push: $(STATEDIR)/host-ipkg-utils.install.post $(STATEDIR)/world.targetinstall
> @$(call targetinfo)
> ifdef PTXCONF_IMAGE_IPKG_FORCED_PUSH
> - rm -rf $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)
> + rm -rf $(IPKG_DISTDIR)
> endif
> + mkdir -p $(IPKG_REPODIR)
> @echo "pushing ipkg packages to ipkg-repository..."
> @$(HOST_ENV) $(PTXDIST_TOPDIR)/scripts/ipkg-push \
> --ipkgdir $(call remove_quotes,$(PKGDIR)) \
> - --repodir $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY)) \
> + --repodir $(IPKG_REPODIR) \
> --revision $(call remove_quotes,$(PTXDIST_VERSION_FULL)) \
> --project $(call remove_quotes,$(PTXCONF_PROJECT)) \
> --dist $(call remove_quotes,$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)) \
> @@ -30,12 +34,12 @@ endif
> ifdef PTXCONF_IMAGE_IPKG_SIGN_OPENSSL
> @echo "signing Packages..."
> openssl smime -sign \
> - -in $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)/Packages \
> + -in $(IPKG_DISTDIR)/Packages \
> -text -binary \
> -outform PEM \
> -signer $(PTXCONF_IMAGE_IPKG_SIGN_OPENSSL_SIGNER) \
> -inkey $(PTXCONF_IMAGE_IPKG_SIGN_OPENSSL_KEY) \
> - -out $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)/Packages.sig
> + -out $(IPKG_DISTDIR)/Packages.sig
> @echo "Packages.sig created"
> endif
> @touch $@
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-15 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-14 23:25 [ptxdist] [PATCH] image_ipkg.make: create repository directory Ladislav Michl
2012-03-15 9:21 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox