mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ipkg-push: build index with sha256 checksums if supported
@ 2020-04-16  8:01 Simon Falsig
  2020-04-17  6:43 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Falsig @ 2020-04-16  8:01 UTC (permalink / raw)
  To: ptxdist

Instead of always building the index with the default md5sum, the index                                                                                                            
will now be built with sha256, iff the target opkg package is                                                                                                                      
configured to support sha256.                                                                                                                                                      
                                                                                                                                                                                   
Also, the ipkg support in ipkg-push has been removed, and it now always                                                                                                            
uses the opkg tools instead. The name is kept, since everything else is                                                                                                            
still using the 'ipkg' naming scheme though.                                                                                                                                       
---                                                                                                                                                                                
 rules/post/image_ipkg.make | 6 ++++--                                                                                                                                             
 scripts/ipkg-push          | 8 ++++----                                                                                                                                           
 2 files changed, 8 insertions(+), 6 deletions(-)                                                                                                                                  
                                                                                                                                                                                   
diff --git a/rules/post/image_ipkg.make b/rules/post/image_ipkg.make                                                                                                               
index c2171574c..60b668230 100644
--- a/rules/post/image_ipkg.make
+++ b/rules/post/image_ipkg.make
@@ -25,7 +25,7 @@ endif
                --revision $(call remove_quotes,$(PTXDIST_VERSION_FULL)) \
                --project  $(call remove_quotes,$(PTXCONF_PROJECT)) \
                --dist     $(call remove_quotes,$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)) \
-               --type     opkg
+               --checksum $(call ptx/ifdef,PTXCONF_OPKG_SHA256,sha256,md5)
        @echo "ipkg-repository updated"
 ifdef PTXCONF_IMAGE_IPKG_SIGN_OPENSSL
        @echo "signing Packages..."
@@ -51,7 +51,9 @@ $(PKGDIR)/Packages: $(STATEDIR)/host-ipkg-utils.install.post $(STATEDIR)/world.t
        @echo "Creating ipkg index '$@'..."
        @rm -f $(PKGDIR)/Packages*
        @$(HOST_ENV) opkg-make-index \
-               -l "$(PKGDIR)/Packages.filelist" -p "$(@)" "$(PKGDIR)"
+               -l "$(PKGDIR)/Packages.filelist" -p "$(@)" \
+               --checksum $(call ptx/ifdef,PTXCONF_OPKG_SHA256,sha256,md5) \
+               "$(PKGDIR)"
        @echo "done."
 
 # vim: syntax=make
diff --git a/scripts/ipkg-push b/scripts/ipkg-push
index 45978b305..6467f0947 100755
--- a/scripts/ipkg-push
+++ b/scripts/ipkg-push
@@ -31,7 +31,7 @@ usage() {
        echo "  --revision <revision>      dist revision name to be updated"
        echo "  --project  <projectname>   project name"
        echo "  --dist     <distname>      use this to make a dist release (optional)"
-       echo "  --type     <package type>  specify package type (default: ipkg)"
+       echo "  --checksum <checksum>      specify checksum type, {md5,sha256}, default: md5"
        echo
        exit 1
 }
@@ -41,7 +41,7 @@ REPODIR=
 DISTREVISION=
 PROJECT=
 DIST=
-TYPE=ipkg
+CHECKSUM=md5
 
 
 #
@@ -55,7 +55,7 @@ while [ $# -gt 0 ]; do
                --revision) DISTREVISION=`ptxd_abspath $2`; shift 2 ;;
                --project)  PROJECT=$2;                     shift 2 ;;
                --dist)     DIST=$2;                        shift 2 ;;
-               --type)     TYPE=$2;                        shift 2 ;;
+               --checksum) CHECKSUM=$2;                    shift 2 ;;
                *)  usage "unknown option $1" ;;
        esac
 done
@@ -193,7 +193,7 @@ done
 
 echo "creating index.....: "
 
-(cd $REPODIR/$PROJECT/dists/$DIST && ${TYPE}-make-index . > Packages && gzip -c Packages > Packages.gz)
+(cd $REPODIR/$PROJECT/dists/$DIST && opkg-make-index --checksum ${CHECKSUM} . > Packages && gzip -c Packages > Packages.gz)
 
 exit
 
-- 
2.17.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] ipkg-push: build index with sha256 checksums if supported
  2020-04-16  8:01 [ptxdist] [PATCH] ipkg-push: build index with sha256 checksums if supported Simon Falsig
@ 2020-04-17  6:43 ` Michael Olbrich
  2020-04-17  9:52   ` Simon Falsig
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2020-04-17  6:43 UTC (permalink / raw)
  To: ptxdist; +Cc: Simon Falsig

On Thu, Apr 16, 2020 at 08:01:20AM +0000, Simon Falsig wrote:
> Instead of always building the index with the default md5sum, the index
> will now be built with sha256, iff the target opkg package is
> configured to support sha256.
>
> Also, the ipkg support in ipkg-push has been removed, and it now always
> uses the opkg tools instead. The name is kept, since everything else is
> still using the 'ipkg' naming scheme though.
> ---

Looks good, but something broke all white-spaces, to the patch cannot be
applied.

Michael

>  rules/post/image_ipkg.make | 6 ++++--
>  scripts/ipkg-push          | 8 ++++----
>  2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/rules/post/image_ipkg.make b/rules/post/image_ipkg.make
> index c2171574c..60b668230 100644
> --- a/rules/post/image_ipkg.make
> +++ b/rules/post/image_ipkg.make
> @@ -25,7 +25,7 @@ endif
>                 --revision $(call remove_quotes,$(PTXDIST_VERSION_FULL)) \
>                 --project  $(call remove_quotes,$(PTXCONF_PROJECT)) \
>                 --dist     $(call remove_quotes,$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)) \
> -               --type     opkg
> +               --checksum $(call ptx/ifdef,PTXCONF_OPKG_SHA256,sha256,md5)
>         @echo "ipkg-repository updated"
>  ifdef PTXCONF_IMAGE_IPKG_SIGN_OPENSSL
>         @echo "signing Packages..."
> @@ -51,7 +51,9 @@ $(PKGDIR)/Packages: $(STATEDIR)/host-ipkg-utils.install.post $(STATEDIR)/world.t
>         @echo "Creating ipkg index '$@'..."
>         @rm -f $(PKGDIR)/Packages*
>         @$(HOST_ENV) opkg-make-index \
> -               -l "$(PKGDIR)/Packages.filelist" -p "$(@)" "$(PKGDIR)"
> +               -l "$(PKGDIR)/Packages.filelist" -p "$(@)" \
> +               --checksum $(call ptx/ifdef,PTXCONF_OPKG_SHA256,sha256,md5) \
> +               "$(PKGDIR)"
>         @echo "done."
>  
>  # vim: syntax=make
> diff --git a/scripts/ipkg-push b/scripts/ipkg-push
> index 45978b305..6467f0947 100755
> --- a/scripts/ipkg-push
> +++ b/scripts/ipkg-push
> @@ -31,7 +31,7 @@ usage() {
>         echo "  --revision <revision>      dist revision name to be updated"
>         echo "  --project  <projectname>   project name"
>         echo "  --dist     <distname>      use this to make a dist release (optional)"
> -       echo "  --type     <package type>  specify package type (default: ipkg)"
> +       echo "  --checksum <checksum>      specify checksum type, {md5,sha256}, default: md5"
>         echo
>         exit 1
>  }
> @@ -41,7 +41,7 @@ REPODIR=
>  DISTREVISION=
>  PROJECT=
>  DIST=
> -TYPE=ipkg
> +CHECKSUM=md5
>  
>  
>  #
> @@ -55,7 +55,7 @@ while [ $# -gt 0 ]; do
>                 --revision) DISTREVISION=`ptxd_abspath $2`; shift 2 ;;
>                 --project)  PROJECT=$2;                     shift 2 ;;
>                 --dist)     DIST=$2;                        shift 2 ;;
> -               --type)     TYPE=$2;                        shift 2 ;;
> +               --checksum) CHECKSUM=$2;                    shift 2 ;;
>                 *)  usage "unknown option $1" ;;
>         esac
>  done
> @@ -193,7 +193,7 @@ done
>  
>  echo "creating index.....: "
>  
> -(cd $REPODIR/$PROJECT/dists/$DIST && ${TYPE}-make-index . > Packages && gzip -c Packages > Packages.gz)
> +(cd $REPODIR/$PROJECT/dists/$DIST && opkg-make-index --checksum ${CHECKSUM} . > Packages && gzip -c Packages > Packages.gz)
>  
>  exit
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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] 3+ messages in thread

* Re: [ptxdist] [PATCH] ipkg-push: build index with sha256 checksums if supported
  2020-04-17  6:43 ` Michael Olbrich
@ 2020-04-17  9:52   ` Simon Falsig
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Falsig @ 2020-04-17  9:52 UTC (permalink / raw)
  To: Michael Olbrich, ptxdist

> 
> Looks good, but something broke all white-spaces, to the patch cannot be applied.
> 

Hmm - probably Outlook messing up things... I'll try a v2 through git send-email instead...

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-17  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16  8:01 [ptxdist] [PATCH] ipkg-push: build index with sha256 checksums if supported Simon Falsig
2020-04-17  6:43 ` Michael Olbrich
2020-04-17  9:52   ` Simon Falsig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox