Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/luajit: bump to version 41fb94defa8f830ce69a8122b03f6ac3216d392a
@ 2023-09-08  6:49 Francois Perrad
  2023-09-08 21:58 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Perrad @ 2023-09-08  6:49 UTC (permalink / raw)
  To: buildroot

The LuaJIT project switches to a rolling release scheme.
Now, the version contains the timestamp of the latest commit.
So, we need to switch to the SITE_METHOD to git.

The timestamp can be seen in build log:
==== Successfully installed LuaJIT 2.1.1693350652 to /usr ====

diff COPYRIGHT:
-Copyright (C) 2005-2022 Mike Pall. All rights reserved.
+Copyright (C) 2005-2023 Mike Pall. All rights reserved.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/luajit/0001-no-bin-symlink.patch |  4 ++--
 package/luajit/0002-install-inc.patch    |  6 +++---
 package/luajit/luajit.hash               |  4 ++--
 package/luajit/luajit.mk                 | 13 +++++++++++--
 4 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/package/luajit/0001-no-bin-symlink.patch b/package/luajit/0001-no-bin-symlink.patch
index dc36fa58d..ea0e5bf8d 100644
--- a/package/luajit/0001-no-bin-symlink.patch
+++ b/package/luajit/0001-no-bin-symlink.patch
@@ -6,7 +6,7 @@ Index: b/Makefile
 ===================================================================
 --- a/Makefile
 +++ b/Makefile
-@@ -45,8 +45,7 @@
+@@ -50,8 +50,7 @@
  INSTALL_MAN= $(INSTALL_SHARE)/man/man1
  INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
  
@@ -16,7 +16,7 @@ Index: b/Makefile
  INSTALL_ANAME= libluajit-$(ABIVER).a
  INSTALL_SOSHORT1= libluajit-$(ABIVER).so
  INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
-@@ -61,7 +60,6 @@
+@@ -66,7 +65,6 @@
  INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT1)
  INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT2)
  INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME)
diff --git a/package/luajit/0002-install-inc.patch b/package/luajit/0002-install-inc.patch
index 8de777dce..163a5d36f 100644
--- a/package/luajit/0002-install-inc.patch
+++ b/package/luajit/0002-install-inc.patch
@@ -6,12 +6,12 @@ Index: b/Makefile
 ===================================================================
 --- a/Makefile
 +++ b/Makefile
-@@ -33,7 +33,7 @@
+@@ -38,7 +38,7 @@
  INSTALL_BIN=   $(DPREFIX)/bin
  INSTALL_LIB=   $(DPREFIX)/$(MULTILIB)
  INSTALL_SHARE= $(DPREFIX)/share
--INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
+-INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
 +INSTALL_DEFINC= $(DPREFIX)/include
  INSTALL_INC=   $(INSTALL_DEFINC)
  
- INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
+ INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
diff --git a/package/luajit/luajit.hash b/package/luajit/luajit.hash
index 049f8c2fc..9e5060ea8 100644
--- a/package/luajit/luajit.hash
+++ b/package/luajit/luajit.hash
@@ -1,5 +1,5 @@
 # Locally calculated
-sha256  835035b244c3dc3d3d19bdd5ac623af90b84207e6330fb78f9fa51d6e200d760  luajit-8635cbabf3094c4d8bd00578c7d812bea87bb2d3.tar.gz
+sha256  1f43430957ea2889ea736d610cf449e9ac6d7140252a697803fccc1aeff241b5  luajit-41fb94defa8f830ce69a8122b03f6ac3216d392a-br1.tar.gz
 
 # Locally calculated
-sha256  52fc5b15ac968ed81aabb4c1e23ab3bce50f57a5764e9cdca86b463a11072921  COPYRIGHT
+sha256  1130331ac861a4b4520e9c8ad0814efdc6f1e79ea55ea9c460c73733d13ccb5f  COPYRIGHT
diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index 2a27aa505..db3bdc913 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-LUAJIT_VERSION = 8635cbabf3094c4d8bd00578c7d812bea87bb2d3
-LUAJIT_SITE = $(call github,LuaJIT,LuaJIT,$(LUAJIT_VERSION))
+LUAJIT_VERSION = 41fb94defa8f830ce69a8122b03f6ac3216d392a
+LUAJIT_SITE_METHOD = git
+LUAJIT_SITE = https://github.com/LuaJIT/LuaJIT.git
 LUAJIT_LICENSE = MIT
 LUAJIT_LICENSE_FILES = COPYRIGHT
 LUAJIT_CPE_ID_VENDOR = luajit
@@ -33,6 +34,14 @@ LUAJIT_HOST_CC = $(HOSTCC) -m32
 LUAJIT_XCFLAGS += -DLUAJIT_DISABLE_GC64
 endif
 
+# emulation of git archive with .gitattributes & export-subst
+define LUAJIT_ROLLING_VERSION
+	cd $(LUAJIT_DL_DIR)/git && $(GIT) show -s --format=%ct $(LUAJIT_VERSION) > $(@D)/.relver
+endef
+
+LUAJIT_POST_EXTRACT_HOOKS = LUAJIT_ROLLING_VERSION
+HOST_LUAJIT_POST_EXTRACT_HOOKS = LUAJIT_ROLLING_VERSION
+
 # We unfortunately can't use TARGET_CONFIGURE_OPTS, because the luajit
 # build system uses non conventional variable names.
 define LUAJIT_BUILD_CMDS
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/luajit: bump to version 41fb94defa8f830ce69a8122b03f6ac3216d392a
  2023-09-08  6:49 [Buildroot] [PATCH] package/luajit: bump to version 41fb94defa8f830ce69a8122b03f6ac3216d392a Francois Perrad
@ 2023-09-08 21:58 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-09-08 21:58 UTC (permalink / raw)
  To: Francois Perrad; +Cc: buildroot

Francois, All,

On 2023-09-08 08:49 +0200, Francois Perrad spake thusly:
> The LuaJIT project switches to a rolling release scheme.
> Now, the version contains the timestamp of the latest commit.

Containing a timstamp is not a problem per-s. The problem is that is
done with a .gitatrribute, so is replaced on the github side, and this
has proven to be non-reproducible.

The format is %ct, which is a the committer's UNIX timestamp. In
practice, that one is reproducible, but we don't want to get bitten,
so we want to use a constanto, see below...

> So, we need to switch to the SITE_METHOD to git.
> 
> The timestamp can be seen in build log:
> ==== Successfully installed LuaJIT 2.1.1693350652 to /usr ====
                                         ^^^^^^^^^^^
This is not the tiemstamp that you would have expected, see below too...

> 
> diff COPYRIGHT:
> -Copyright (C) 2005-2022 Mike Pall. All rights reserved.
> +Copyright (C) 2005-2023 Mike Pall. All rights reserved.

Please, don't write unindented diff-like blurbs in commit logs; they
screw up patchwork:

    https://patchwork.ozlabs.org/project/buildroot/patch/20230908064944.2558686-1-francois.perrad@gadz.org/

If you ant to provide a diif-like blurb (the one you provide, indented
it. Besides, a commit log is not a machine-readable section; it's meant
for users to review and udnerstand the change, so I'd prefer to read:

    Hash for the COPYRIGHT file changed, due to an update in the
    copyright years.

That is enough for us to know that you actually looked at the diff, and
that is enough to understand that the licensing terms did not change,
which is the whole point of trackign the hashes for the license files:
to detec ta change in licensing terms.

> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
[--SNIP--]
> diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
> index 2a27aa505..db3bdc913 100644
> --- a/package/luajit/luajit.mk
> +++ b/package/luajit/luajit.mk
> @@ -4,8 +4,9 @@
>  #
>  ################################################################################
>  
> -LUAJIT_VERSION = 8635cbabf3094c4d8bd00578c7d812bea87bb2d3
> -LUAJIT_SITE = $(call github,LuaJIT,LuaJIT,$(LUAJIT_VERSION))
> +LUAJIT_VERSION = 41fb94defa8f830ce69a8122b03f6ac3216d392a
> +LUAJIT_SITE_METHOD = git
> +LUAJIT_SITE = https://github.com/LuaJIT/LuaJIT.git
>  LUAJIT_LICENSE = MIT
>  LUAJIT_LICENSE_FILES = COPYRIGHT
>  LUAJIT_CPE_ID_VENDOR = luajit
> @@ -33,6 +34,14 @@ LUAJIT_HOST_CC = $(HOSTCC) -m32
>  LUAJIT_XCFLAGS += -DLUAJIT_DISABLE_GC64
>  endif
>  
> +# emulation of git archive with .gitattributes & export-subst
> +define LUAJIT_ROLLING_VERSION
> +	cd $(LUAJIT_DL_DIR)/git && $(GIT) show -s --format=%ct $(LUAJIT_VERSION) > $(@D)/.relver

This is incorrect, for two reasons:

 1. if there is a git tree, it will not be the expected one: the archive
    Buildroot generates does not have the .git of the upstream project,
    so for in-tree builds, this would be the Buildroot git tree.

 1. there might not even be a git tree available: for out-of-tree builds
    as for Buildroot release tarballs, there will be no git tree
    available.

Here, all you are interested in is probably just the tiemstamp, which is
a constant, so;

    # Tiemstamp of the $(LUAJIT_VERSION) commit, obtained in the LuaJit
    # repo, with:   git show -s --format=%ct $(LUAJIT_VERSION)
    define LUAJIT_ROLLING_VERSION
        echo 1689194086 >$(@D)/.relver
    endef
    LUAJIT_POST_EXTRACT_HOOKS = LUAJIT_ROLLING_VERSION
    HOST_LUAJIT_POST_EXTRACT_HOOKS = LUAJIT_ROLLING_VERSION

Regards,
Yann E. MORIN.

> +endef
> +
> +LUAJIT_POST_EXTRACT_HOOKS = LUAJIT_ROLLING_VERSION
> +HOST_LUAJIT_POST_EXTRACT_HOOKS = LUAJIT_ROLLING_VERSION
> +
>  # We unfortunately can't use TARGET_CONFIGURE_OPTS, because the luajit
>  # build system uses non conventional variable names.
>  define LUAJIT_BUILD_CMDS
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-09-08 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08  6:49 [Buildroot] [PATCH] package/luajit: bump to version 41fb94defa8f830ce69a8122b03f6ac3216d392a Francois Perrad
2023-09-08 21:58 ` Yann E. MORIN

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