tini: Updated to v0.19.0 for dockerd
authorGerard Ryan <G.M0N3Y.2503@gmail.com>
Sun, 8 Nov 2020 02:09:36 +0000 (12:09 +1000)
committerDaniel Golle <dangowrt@users.noreply.github.com>
Tue, 15 Dec 2020 12:52:33 +0000 (12:52 +0000)
* Removed obsolete workaround
* Set Git source hash for executables to display

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
utils/tini/Makefile
utils/tini/patches/001-override-git-version.patch [new file with mode: 0644]

index 28abe82111f1c2360ef902ec34361972a820ba0d..8ba0d3aa185c8ac5f0a2629dd69ee615325e2477 100644 (file)
@@ -1,15 +1,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tini
-PKG_VERSION:=0.18.0
+PKG_VERSION:=0.19.0
 PKG_RELEASE:=1
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/krallin/tini/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=1097675352d6317b547e73f9dc7c6839fd0bb0d96dafc2e5c95506bb324049a2
-PKG_SOURCE_VERSION:=fec3683b971d9c3ef73f284f176672c44b448662
+PKG_HASH:=0fd35a7030052acd9f58948d1d900fe1e432ee37103c5561554408bdac6bbf0d
+PKG_SOURCE_VERSION:=de40ad007797e0dcd8b7126f27bb87401d224240
+TINI_COMMIT:=de40ad0
 
 PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
 
@@ -30,8 +31,7 @@ define Package/tini/description
 A tiny but valid init process for containers.
 endef
 
-# static version seemes to be effected by https://www.openwall.com/lists/musl/2018/07/18/8 so we use the workaround
-TARGET_CFLAGS += -Wl,--build-id
+CMAKE_OPTIONS += -DTINI_VERSION_GIT='$(TINI_COMMIT)'
 
 define Package/tini/install
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/utils/tini/patches/001-override-git-version.patch b/utils/tini/patches/001-override-git-version.patch
new file mode 100644 (file)
index 0000000..e1870d0
--- /dev/null
@@ -0,0 +1,70 @@
+commit 31b0908a5eff3926195670beecc8548c429ceff5
+Author: Gerard Ryan <G.M0N3Y.2503@gmail.com>
+Date:   Sat Oct 31 16:53:39 2020 +1000
+
+    Added support for setting git version externally
+    * This to help when building from source snapshots
+      that don't have the .git file structure.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 332b361..3f6f44b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,27 +13,37 @@ if(MINIMAL)
+       add_definitions(-DTINI_MINIMAL=1)
+ endif()
+
+-# Extract git version and dirty-ness
+-execute_process (
+-  COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h
+-  WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
+-  RESULT_VARIABLE git_version_check_ret
+-  OUTPUT_VARIABLE tini_VERSION_GIT
+-)
+-
+-execute_process(
+-  COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no
+-  WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
+-  OUTPUT_VARIABLE git_dirty_check_out
+-)
+-
+-if("${git_version_check_ret}" EQUAL 0)
+-  set(tini_VERSION_GIT " - git.${tini_VERSION_GIT}")
+-  if(NOT "${git_dirty_check_out}" STREQUAL "")
+-    set(tini_VERSION_GIT "${tini_VERSION_GIT}-dirty")
+-  endif()
++# Set the git version
++if (NOT "${TINI_VERSION_GIT}" STREQUAL "")
++      # Set by the user directly
++      set(tini_VERSION_GIT "${TINI_VERSION_GIT}")
+ else()
+-  set(tini_VERSION_GIT "")
++      # Extract git version
++      execute_process (
++              COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h
++              WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
++              RESULT_VARIABLE git_version_check_ret
++              OUTPUT_VARIABLE tini_VERSION_GIT
++      )
++
++      if("${git_version_check_ret}" EQUAL 0)
++              # Extract git dirty-ness
++              execute_process(
++                      COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no
++                      WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
++                      OUTPUT_VARIABLE git_dirty_check_out
++              )
++
++              if(NOT "${git_dirty_check_out}" STREQUAL "")
++                      set(tini_VERSION_GIT "${tini_VERSION_GIT}-dirty")
++              endif()
++      else()
++              set(tini_VERSION_GIT "")
++      endif()
++endif()
++
++if(NOT ${tini_VERSION_GIT} STREQUAL "")
++      set(tini_VERSION_GIT " - git.${tini_VERSION_GIT}")
+ endif()
+
+ # Flags