Skip to contentSkip to conversation

skopeo: upgrade to 1.1.1

PATCH In review hongxu 2 participants 4 messages Sep 15, 2020 – Sep 21, 2020

lore
Share & tools
lore

hongxu

author
#0 lore raw

PATCH 1/2 skopeo: upgrade to 1.1.1

- Drop ostree

- Support native and nativesdk

---
 .../skopeo/{skopeo_git.bb => skopeo_1.1.1.bb} | 50 +++++--------------
 1 file changed, 12 insertions(+), 38 deletions(-)
 rename recipes-containers/skopeo/{skopeo_git.bb => skopeo_1.1.1.bb} (33%)
recipes-containers/skopeo/skopeo_1.1.1.bb renamed from recipes-containers/skopeo/skopeo_git.bb +12 -38
similarity index 33%
rename from recipes-containers/skopeo/skopeo_git.bb
rename to recipes-containers/skopeo/skopeo_1.1.1.bb
index f5a6231..ca23ac6 100644
@@ -1,14 +1,14 @@
 HOMEPAGE = "https://github.com/containers/skopeo"
 SUMMARY = "Work with remote images registries - retrieving information, images, signing content"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=7e611105d3e369954840a6668c438584"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=7e611105d3e369954840a6668c438584"
 
 DEPENDS = " \
     gpgme \
-    multipath-tools \
+    libdevmapper \
+    lvm2 \
     btrfs-tools \
     glib-2.0 \
-    ostree \
 "
 
 inherit go
@@ -17,64 +17,38 @@ RDEPENDS_${PN} = " \
      gpgme \
      libgpg-error \
      libassuan \
+     libdevmapper \
 "
 
 SRC_URI = " \
-    git://github.com/containers/skopeo \
+    git://${GO_IMPORT};branch=release-1.1 \
     file://storage.conf \
     file://registries.conf \
 "
 
-SRCREV = "1cf1e06582142c522543560f2bc6d6756696e8ad"
-PV = "v0.1.39-dev+git${SRCPV}"
-GO_IMPORT = "import"
+SRCREV = "67abbb3cefbdc876447583d5ea45e76bf441eba7"
+GO_IMPORT = "github.com/containers/skopeo"
 
 S = "${WORKDIR}/git"
 
 inherit goarch
 inherit pkgconfig
 
-# This disables seccomp and apparmor, which are on by default in the
-# go package. 
-EXTRA_OEMAKE="BUILDTAGS=''"
-
 do_compile() {
-	export GOARCH="${TARGET_GOARCH}"
-
-	# Setup vendor directory so that it can be used in GOPATH.
-	#
-	# Go looks in a src directory under any directory in GOPATH but riddler
-	# uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
-	#
-	# We also need to link in the ipallocator directory as that is not under
-	# a src directory.
-	ln -sfn . "${S}/src/import/vendor/src"
-	mkdir -p "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
-	ln -sfn "${S}/src/import/skopeo" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
-	ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo/version"
-	export GOPATH="${S}/src/import/vendor"
-
-	# Pass the needed cflags/ldflags so that cgo
-	# can find the needed headers files and libraries
-	export CGO_ENABLED="1"
-	export CFLAGS=""
-	export LDFLAGS=""
-	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-	cd ${S}/src/import
-
+	cd ${S}/src/${GO_IMPORT}
 	oe_runmake binary-local
 }
 
 do_install() {
 	install -d ${D}/${sbindir}
 	install -d ${D}/${sysconfdir}/containers
-
-	install ${S}/src/import/skopeo ${D}/${sbindir}/
-	install ${S}/src/import/default-policy.json ${D}/${sysconfdir}/containers/policy.json
+	install ${S}/src/${GO_IMPORT}/skopeo ${D}/${sbindir}/
+	install ${S}/src/${GO_IMPORT}/default-policy.json ${D}/${sysconfdir}/containers/policy.json
 
 	install ${WORKDIR}/storage.conf ${D}/${sysconfdir}/containers/storage.conf
 	install ${WORKDIR}/registries.conf ${D}/${sysconfdir}/containers/registries.conf
 }
 
 INSANE_SKIP_${PN} += "ldflags"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.18.2
author
#1 lore raw

PATCH 2/2 sloci-image: set CLEANBROKEN = 1

Workaround rebuild failure

---
 recipes-containers/sloci-image/sloci-image_git.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-containers/sloci-image/sloci-image_git.bb +2 -0
index 30fa4c1..fc3c329 100644
@@ -22,4 +22,6 @@ do_install() {
         make PREFIX="${exec_prefix}" DESTDIR=${D} install
 }
 
+CLEANBROKEN = "1"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.18.2
#2 lore raw

Re: [meta-virtualization][PATCH 2/2] sloci-image: set CLEANBROKEN = 1

Adjusted for me not merging the recipe name change .. and merged.

Bruce

In message: [meta-virtualization][PATCH 2/2] sloci-image: set CLEANBROKEN = 1

Quoted 21 lines · on 15/09/2020 Hongxu Jia wrote:

Workaround rebuild failure

---
 recipes-containers/sloci-image/sloci-image_git.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-containers/sloci-image/sloci-image_git.bb +2 -0
index 30fa4c1..fc3c329 100644
@@ -22,4 +22,6 @@ do_install() {
         make PREFIX="${exec_prefix}" DESTDIR=${D} install
 }
 
+CLEANBROKEN = "1"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.18.2
#3 lore raw
In reply to hongxu
Quoted 2 lines · Hongxu Jia

- Drop ostree

We should be logging the skopeo commit that drops the support.

Quoted 35 lines

- Support native and nativesdk

---
 .../skopeo/{skopeo_git.bb => skopeo_1.1.1.bb} | 50 +++++--------------
 1 file changed, 12 insertions(+), 38 deletions(-)
 rename recipes-containers/skopeo/{skopeo_git.bb => skopeo_1.1.1.bb} (33%)
recipes-containers/skopeo/skopeo_1.1.1.bb renamed from recipes-containers/skopeo/skopeo_git.bb +3 -3
similarity index 33%
rename from recipes-containers/skopeo/skopeo_git.bb
rename to recipes-containers/skopeo/skopeo_1.1.1.bb
index f5a6231..ca23ac6 100644
@@ -1,14 +1,14 @@
 HOMEPAGE = "https://github.com/containers/skopeo"
 SUMMARY = "Work with remote images registries - retrieving information, images, signing content"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=7e611105d3e369954840a6668c438584"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=7e611105d3e369954840a6668c438584"
 
 DEPENDS = " \
     gpgme \
-    multipath-tools \
+    libdevmapper \
+    lvm2 \
     btrfs-tools \
     glib-2.0 \
-    ostree \
 "
 
 inherit go

recipes-containers/skopeo/skopeo_1.1.1.bb RDEPENDS_${PN} = " \ · line 24

Quoted 9 lines
recipes-containers/skopeo/skopeo_1.1.1.bb renamed from recipes-containers/skopeo/skopeo_git.bb +2 -1
@@ -17,64 +17,38 @@ RDEPENDS_${PN} = " \
      gpgme \
      libgpg-error \
      libassuan \
+     libdevmapper \
 "
 
 SRC_URI = " \
-    git://github.com/containers/skopeo \
+    git://${GO_IMPORT};branch=release-1.1 \

Leave this as github.com, GO_IMPORT makes this unreadable. It can be used below, but not in the SRC_URI.

recipes-containers/skopeo/skopeo_1.1.1.bb RDEPENDS_${PN} = " \ · line 29

Quoted 6 lines
recipes-containers/skopeo/skopeo_1.1.1.bb renamed from recipes-containers/skopeo/skopeo_git.bb +0 -2
     file://storage.conf \
     file://registries.conf \
 "
 
-SRCREV = "1cf1e06582142c522543560f2bc6d6756696e8ad"
-PV = "v0.1.39-dev+git${SRCPV}"

I don't like removing the PV and then having to re-add it constantly.

So although this is for now on a specific release, I want the PV with +git to stay, since it is only going to be exactly on 1.1 for a very small amount of time.

Cheers,

Bruce

Quoted 61 lines
recipes-containers/skopeo/skopeo_1.1.1.bb renamed from recipes-containers/skopeo/skopeo_git.bb +7 -33
-GO_IMPORT = "import"
+SRCREV = "67abbb3cefbdc876447583d5ea45e76bf441eba7"
+GO_IMPORT = "github.com/containers/skopeo"
 
 S = "${WORKDIR}/git"
 
 inherit goarch
 inherit pkgconfig
 
-# This disables seccomp and apparmor, which are on by default in the
-# go package.
-EXTRA_OEMAKE="BUILDTAGS=''"
-
 do_compile() {
-       export GOARCH="${TARGET_GOARCH}"
-
-       # Setup vendor directory so that it can be used in GOPATH.
-       #
-       # Go looks in a src directory under any directory in GOPATH but riddler
-       # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
-       #
-       # We also need to link in the ipallocator directory as that is not under
-       # a src directory.
-       ln -sfn . "${S}/src/import/vendor/src"
-       mkdir -p "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
-       ln -sfn "${S}/src/import/skopeo" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
-       ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo/version"
-       export GOPATH="${S}/src/import/vendor"
-
-       # Pass the needed cflags/ldflags so that cgo
-       # can find the needed headers files and libraries
-       export CGO_ENABLED="1"
-       export CFLAGS=""
-       export LDFLAGS=""
-       export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-       export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-       cd ${S}/src/import
-
+       cd ${S}/src/${GO_IMPORT}
        oe_runmake binary-local
 }
 
 do_install() {
        install -d ${D}/${sbindir}
        install -d ${D}/${sysconfdir}/containers
-
-       install ${S}/src/import/skopeo ${D}/${sbindir}/
-       install ${S}/src/import/default-policy.json ${D}/${sysconfdir}/containers/policy.json
+       install ${S}/src/${GO_IMPORT}/skopeo ${D}/${sbindir}/
+       install ${S}/src/${GO_IMPORT}/default-policy.json ${D}/${sysconfdir}/containers/policy.json
 
        install ${WORKDIR}/storage.conf ${D}/${sysconfdir}/containers/storage.conf
        install ${WORKDIR}/registries.conf ${D}/${sysconfdir}/containers/registries.conf
 }
 
 INSANE_SKIP_${PN} += "ldflags"
+
+BBCLASSEXTEND = "native nativesdk"
--

2.18.2

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II