umtprd: Add package
PATCH 1/1 umtprd: Add package
uMTP-Responder is a lightweight USB Media Transfer Protocol (MTP) responder daemon for GNU/Linux.
--- package/Config.in | 1 + ...thread.h-include-in-inc-mtp.h-header.patch | 28 +++++++++++++++++++ package/umtprd/Config.in | 6 ++++ package/umtprd/umtprd.hash | 2 ++ package/umtprd/umtprd.mk | 20 +++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch create mode 100644 package/umtprd/Config.in create mode 100644 package/umtprd/umtprd.hash create mode 100644 package/umtprd/umtprd.mk
package/Config.in +1 -0
@@ -550,6 +550,7 @@ endmenu source "package/udev/Config.in" source "package/udisks/Config.in" source "package/uhubctl/Config.in" + source "package/umtprd/Config.in" source "package/upower/Config.in" source "package/usb_modeswitch/Config.in" source "package/usb_modeswitch_data/Config.in"
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 6572d07a68466aaa3a7efcb4a55cc61ff31cfde3 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil <[email protected]> +Date: Thu, 30 May 2019 00:23:11 +0200 +Subject: [PATCH] Add missing <pthread.h> include in inc/mtp.h header + +This fixes the build under GCC 8 with the musl C library. + +Signed-off-by: Paul Cercueil <[email protected]> +--- + inc/mtp.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/inc/mtp.h b/inc/mtp.h +index 238de68..5f5b804 100644 +--- a/inc/mtp.h ++++ b/inc/mtp.h +@@ -26,6 +26,8 @@ + #ifndef _INC_MTP_H_ + #define _INC_MTP_H_ + ++#include <pthread.h> ++ + #define MAX_STORAGE_NB 16 + #define MAX_CFG_STRING_SIZE 512 + +-- +2.21.0.593.g511ec345e18 +
package/umtprd/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_UMTPRD + bool "umtprd" + help + Lightweight USB MTP responder daemon for GNU/Linux + + https://github.com/viveris/uMTP-Responder
package/umtprd/umtprd.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 e1301bdd89170cc2c679446c1cc5873feaacd061bf0ab547fc0a11670bae9163 umtprd-1.0.0.tar.gz
package/umtprd/umtprd.mk new file +20 -0
@@ -0,0 +1,20 @@ +################################################################################ +# +# umtprd +# +################################################################################ + +UMTPRD_VERSION = 1.0.0 +UMTPRD_SITE = https://github.com/viveris/uMTP-Responder/archive +UMTPRD_LICENSE = GPL-3.0 +UMTPRD_LICENSE_FILES = LICENSE + +define UMTPRD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define UMTPRD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/umtprd $(TARGET_DIR)/usr/sbin/umtprd +endef + +$(eval $(generic-package))
Signature · 1 line
2.24.0.rc1
PATCH 1/1 umtprd: Add package
Hi Paul,
Quoted 34 lines · Paul Cercueil
uMTP-Responder is a lightweight USB Media Transfer Protocol (MTP) responder daemon for GNU/Linux.
Signed-off-by Paul Cercueil <[email protected]>--- package/Config.in | 1 + ...thread.h-include-in-inc-mtp.h-header.patch | 28 +++++++++++++++++++ package/umtprd/Config.in | 6 ++++ package/umtprd/umtprd.hash | 2 ++ package/umtprd/umtprd.mk | 20 +++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch create mode 100644 package/umtprd/Config.in create mode 100644 package/umtprd/umtprd.hash create mode 100644 package/umtprd/umtprd.mkpackage/Config.in +1
-0@@ -550,6 +550,7 @@ endmenu source "package/udev/Config.in" source "package/udisks/Config.in" source "package/uhubctl/Config.in" + source "package/umtprd/Config.in" source "package/upower/Config.in" source "package/usb_modeswitch/Config.in" source "package/usb_modeswitch_data/Config.in"package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch new file +0
-0
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch line 6
Quoted 6 lines
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch new file +6
-0@@ -0,0 +1,28 @@ +From 6572d07a68466aaa3a7efcb4a55cc61ff31cfde3 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil <[email protected]> +Date: Thu, 30 May 2019 00:23:11 +0200 +Subject: [PATCH] Add missing <pthread.h> include in inc/mtp.h header + +This fixes the build under GCC 8 with the musl C library.
Please add a link to your upstream pull request:
Quoted 5 lines
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch new file +5
-0+ +Signed-off-by: Paul Cercueil <[email protected]> +--- + inc/mtp.h | 2 ++ + 1 file changed, 2 insertions(+)
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch line 21
Quoted 10 lines
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch new file +10
-0+ +diff --git a/inc/mtp.h b/inc/mtp.h +index 238de68..5f5b804 100644 +--- a/inc/mtp.h ++++ b/inc/mtp.h +@@ -26,6 +26,8 @@ + #ifndef _INC_MTP_H_ + #define _INC_MTP_H_ + ++#include <pthread.h>
This most likely means ...
Quoted 13 lines
package/umtprd/0001-Add-missing-pthread.h-include-in-inc-mtp.h-header.patch new file +7
-0++ + #define MAX_STORAGE_NB 16 + #define MAX_CFG_STRING_SIZE 512 + +-- +2.21.0.593.g511ec345e18 +package/umtprd/Config.in new file +0
-0
package/umtprd/Config.in line 6
Quoted 6 lines
package/umtprd/Config.in new file +6
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_UMTPRD + bool "umtprd" + help + Lightweight USB MTP responder daemon for GNU/Linux + + https://github.com/viveris/uMTP-Responder
... that the package needs to depend on BR2_TOOLCHAIN_HAS_THREADS?
baruch
Quoted 34 lines
package/umtprd/umtprd.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 e1301bdd89170cc2c679446c1cc5873feaacd061bf0ab547fc0a11670bae9163 umtprd-1.0.0.tar.gzpackage/umtprd/umtprd.mk new file +20
-0@@ -0,0 +1,20 @@ +################################################################################ +# +# umtprd +# +################################################################################ + +UMTPRD_VERSION = 1.0.0 +UMTPRD_SITE = https://github.com/viveris/uMTP-Responder/archive +UMTPRD_LICENSE = GPL-3.0 +UMTPRD_LICENSE_FILES = LICENSE + +define UMTPRD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define UMTPRD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/umtprd $(TARGET_DIR)/usr/sbin/umtprd +endef + +$(eval $(generic-package))
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 umtprd: Add package
Paul, All,
On 2019-11-07 19:05 +0200, Baruch Siach spake thusly:
Quoted 3 lines · Paul Cercueil
Quoted 2 lines
uMTP-Responder is a lightweight USB Media Transfer Protocol (MTP) responder daemon for GNU/Linux.
[--SNIP--]
Quoted 5 lines
Quoted 1 line
++#include <
pthread.h>This most likely means ...
package/umtprd/Config.in line 2
Quoted 2 lines
package/umtprd/Config.in new file +2
-0+config BR2_PACKAGE_UMTPRD + bool "umtprd"... that the package needs to depend on
BR2_TOOLCHAIN_HAS_THREADS?
It also needs kernel headers >= 3.15 (for FUNCTIONFS_HAS_FS_DESC and FUNCTIONFS_HAS_HS_DESC in functionfs.h)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 umtprd: Add package
In reply to Paul CercueilHello Paul,
Some comments in addition to the ones done by Baruch and Yann.
Quoted 6 lines · On Thu, 7 Nov 2019 17:45:13 +0100 Paul Cercueil <[email protected]> wrote:
package/Config.in | 1 + ...thread.h-include-in-inc-mtp.h-header.patch | 28 +++++++++++++++++++ package/umtprd/Config.in | 6 ++++ package/umtprd/umtprd.hash | 2 ++ package/umtprd/umtprd.mk | 20 +++++++++++++ 5 files changed, 57 insertions(+)
You should add an entry in the DEVELOPERS file.
package/umtprd/umtprd.hash line 2
Quoted 8 lines
package/umtprd/umtprd.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 e1301bdd89170cc2c679446c1cc5873feaacd061bf0ab547fc0a11670bae9163 umtprd-1.0.0.tar.gz
Please add a hash for the license file.
Quoted 6 lines
package/umtprd/umtprd.mk new file +0
-0
package/umtprd/umtprd.mk line 8
Quoted 8 lines
package/umtprd/umtprd.mk new file +8
-0@@ -0,0 +1,20 @@ +################################################################################ +# +# umtprd +# +################################################################################ + +UMTPRD_VERSION = 1.0.0 +UMTPRD_SITE = https://github.com/viveris/uMTP-Responder/archive
It is never clear to me if those URLs are auto-generated tarballs, or tarballs produced by the project maintainer and uploaded to Github. If these are auto-generated tarballs, then the "github" macro should be used instead.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 umtprd: Add package
Hi Thomas,
Le jeu., nov. 7, 2019 at 22:09, Thomas Petazzoni
<[email protected]> a ?crit :
Quoted 42 lines
Hello Paul,
Some comments in addition to the ones done by Baruch and Yann.
Quoted 7 lines · On Thu, 7 Nov 2019 17:45:13 +0100 Paul Cercueil <[email protected]> wrote:
package/Config.in | 1 + ...thread.h-include-in-inc-mtp.h-header.patch | 28 +++++++++++++++++++ package/umtprd/Config.in | 6 ++++ package/umtprd/umtprd.hash | 2 ++ package/umtprd/umtprd.mk | 20 +++++++++++++ 5 files changed, 57 insertions(+)You should add an entry in the DEVELOPERS file.
Quoted 9 lines
diff --git a/package/umtprd/umtprd.hash b/package/umtprd/umtprd.hash new file mode 100644
index 0000000000..aa91696613
---/dev/null
+++ b/package/umtprd/umtprd.hash
@@ -0,0 +1,2 @@
+# Locally computed+sha256
e1301bdd89170cc2c679446c1cc5873feaacd061bf0ab547fc0a11670bae9163umtprd-1.0.0.tar.gzPlease add a hash for the license file.
Quoted 12 lines
diff --git
a/package/umtprd/umtprd.mkb/package/umtprd/umtprd.mknew file mode 100644
index 0000000000..8460f82b7d
---/dev/null
+++b/package/umtprd/umtprd.mk
@@ -0,0 +1,20 @@+################################################################################
+#
+# umtprd
+#
Quoted 9 lines
Quoted 4 lines
+################################################################################
+
+UMTPRD_VERSION = 1.0.0
+UMTPRD_SITE = https://github.com/viveris/uMTP-Responder/archiveIt is never clear to me if those URLs are auto-generated tarballs, or tarballs produced by the project maintainer and uploaded to Github. If these are auto-generated tarballs, then the "github" macro should be used instead.
It's a release manually uploaded to github, that's why I didn't use the "github" macro.
Cheers,
-Paul
Quoted 8 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
PATCH 1/1 umtprd: Add package
In reply to Thomas PetazzoniQuoted 39 lines · Thomas Petazzoni
Hello Paul,
Some comments in addition to the ones done by Baruch and Yann.
Quoted 6 lines · On Thu, 7 Nov 2019 17:45:13 +0100 Paul Cercueil <[email protected]> wrote:
package/Config.in | 1 + ...thread.h-include-in-inc-mtp.h-header.patch | 28 +++++++++++++++++++ package/umtprd/Config.in | 6 ++++ package/umtprd/umtprd.hash | 2 ++ package/umtprd/umtprd.mk | 20 +++++++++++++ 5 files changed, 57 insertions(+)You should add an entry in the DEVELOPERS file.
package/umtprd/umtprd.hash line 2
Quoted 8 lines
package/umtprd/umtprd.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 e1301bdd89170cc2c679446c1cc5873feaacd061bf0ab547fc0a11670bae9163 umtprd-1.0.0.tar.gzPlease add a hash for the license file.
Quoted 11 lines
package/umtprd/umtprd.mk new file +5
-0@@ -0,0 +1,20 @@ +################################################################################ +# +# umtprd +# +################################################################################
Quoted 8 lines
package/umtprd/umtprd.mk line 8
Quoted 3 lines
package/umtprd/umtprd.mk new file +3
-0+ +UMTPRD_VERSION = 1.0.0 +UMTPRD_SITE = https://github.com/viveris/uMTP-Responder/archiveIt is never clear to me if those URLs are auto-generated tarballs, or tarballs produced by the project maintainer and uploaded to Github. If these are auto-generated tarballs, then the "github" macro should be used instead.
The documentation mentions it [1]: the uploaded tarballs have a different icon.
Actually, there's an easier way to see it: if the URL has 'archive', then it's
automatically generated. If it has 'releases/download', then it's been uploaded.
So in this case, it actually *is* an autogenerated tarball.
The original reason to use the github helper was because the URL construction
had changed twice in a short time. That's no longer the case.
Now, the reason is that it gives better tarball names. Normally, the URL is:
https://github.com/<project>/<repo>/archive/<version>.tar.gz
so you get a tarball called <version>.tar.gz. The github helper uses a trick to get a good tarball name: it constructs the following URL:
https://github.com/<project>/<repo>/archive/<version>/<foo>.tar.gz
github will use <version> as the version and ignore the whole <foo> thing. This allows us to set <foo> to $(PKG_NAME)-$(PKG_VERSION) and we get a nicely named tarball.
In this particular case, the tag is in fact umtprd-1.0.0. So, using the normal
URL gives a conveniently-named tarball, and using github-helper would actually make it weirder:
UMTPRD_SITE = $(call github,viveris,uMTP-Responder,umtprd-$(UMTPRD_VERSION))
Therefore, I tend to agree that using the archive link is better in this case.
Regards,
Arnout
[1] https://buildroot.org/downloads/manual/manual.html#github-download-url
Quoted 5 lines
Thanks,
Thomas