Skip to contentSkip to conversation

Cdrtools is a set of command line programs that allows to record CD/DVD/BluRay media. This package contains the cdrecord & mkisofs programs.

PATCH New Steve Kenton 2 participants 7 messages Feb 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Cdrtools is a set of command line programs that allows to record CD/DVD/BluRay media. This package contains the cdrecord & mkisofs programs.

http://sourceforge.net/projects/cdrtools

---
 package/Config.in            |  1 +
 package/cdrtools/Config.in   | 12 ++++++++++++
 package/cdrtools/cdrtools.mk | 21 +++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 package/cdrtools/Config.in
 create mode 100644 package/cdrtools/cdrtools.mk
package/Config.in +1 -0
index dd011be..1748e88 100644
@@ -6,6 +6,7 @@ menu "Audio and video applications"
 	source "package/alsa-utils/Config.in"
 	source "package/aumix/Config.in"
 	source "package/bellagio/Config.in"
+	source "package/cdrtools/Config.in"
 	source "package/dvdauthor/Config.in"
 	source "package/espeak/Config.in"
 	source "package/faad2/Config.in"
package/cdrtools/Config.in new file +12 -0
new file mode 100644
index 0000000..8583cec
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CDRTOOLS
+	bool "cdrtools"
+	depends on BR2_USE_WCHAR && BR2_LARGEFILE
+	help
+	  Cdrtools is a set of command line programs that
+	  allows to record CD/DVD/BluRay media. This
+	  package contains the cdrecord & mkisofs programs.
+	  
+	  http://sourceforge.net/projects/cdrtools
+
+comment "cdrtools needs a toolchain w/ wchar, largefile"
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE
package/cdrtools/cdrtools.mk new file +21 -0
new file mode 100644
index 0000000..a732e69
@@ -0,0 +1,21 @@
+#############################################################
+#
+# cdrtools
+#
+#############################################################
+CDRTOOLS_VERSION = 3.00
+CDRTOOLS_SITE = http://sourceforge.net/projects/cdrtools/files
+CDRTOOLS_LICENSE = Various parts under GPLv2.0, LGPLv2.1, CDDL - see COPYING
+CDRTOOLS_LICENSE_FILES = COPYING
+
+define CDRTOOLS_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef
+
+define CDRTOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/cdrecord/OBJ/x86_64-linux-cc/cdrecord $(TARGET_DIR)/usr/bin/cdrecord
+	$(INSTALL) -m 0755 -D $(@D)/readcd/OBJ/x86_64-linux-cc/readcd $(TARGET_DIR)/usr/bin/readcd
+	$(INSTALL) -m 0755 -D $(@D)/mkisofs/OBJ/x86_64-linux-cc/mkisofs $(TARGET_DIR)/usr/bin/mkisofs
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 Add hash file

---
 package/cdrtools/cdrtools.hash | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 package/cdrtools/cdrtools.hash
package/cdrtools/cdrtools.hash new file +3 -0
new file mode 100644
index 0000000..c9f9c29
@@ -0,0 +1,3 @@
+cdrtools-3.00.tar.gz 	2010-06-02 	2.5 MB 	6363 weekly downloads 	i
+md5	bb21cefefcfbb76cf249120e8978ffdd	cdrtools-3.00.tar.gz 
+sha1	2cd7d1725e0da2267b7a033cc744295d6e2bc6b9	cdrtools-3.00.tar.gz 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 Add hash file

Dear Steve Kenton,

Quoted 5 lines · Steve Kenton
---
 package/cdrtools/cdrtools.hash | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 package/cdrtools/cdrtools.hash

This patch should not be separated from the previous, it should be merged with it.

package/cdrtools/cdrtools.hash line 1

Quoted 8 lines
package/cdrtools/cdrtools.hash new file +1 -0
new file mode 100644
index 0000000..c9f9c29
@@ -0,0 +1,3 @@
+cdrtools-3.00.tar.gz 	2010-06-02 	2.5 MB 	6363 weekly downloads 	i

This line doesn't make sense in a hash file. There should instead be a comment saying where the hashes are coming from. Something like:

# From http://sourceforge.net/....

or

# Locally computed

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/2 Add hash file

Quoted 10 lines · Thomas Petazzoni

Dear Steve Kenton,

Quoted 5 lines · Steve Kenton
---
  package/cdrtools/cdrtools.hash | 3 +++
  1 file changed, 3 insertions(+)

create mode 100644 package/cdrtools/cdrtools.hash

This patch should not be separated from the previous, it should be merged with it.

This was my first attempt at git. I tried to follow the directions in the buildroot manual but
since these were separate commits they generated separate emails using the git format patch command example. What should it be to make it all one patch?

Steve

#4 lore raw

PATCH 2/2 Add hash file

Dear Steve Kenton,

Quoted 5 lines · Steve Kenton

This was my first attempt at git. I tried to follow the directions in the buildroot manual but
since these were separate commits they generated separate emails using the git format patch command example. What should it be to make it all one patch?

Look at "Interactive git rebasing", using 'git rebase -i'. It allows you to reorder patches, merge patches, edit patches, etc.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/2 Cdrtools is a set of command line programs that allows to record CD/DVD/BluRay media. This package contains the cdrecord & mkisofs programs.

In reply to Steve Kenton

Dear Steve Kenton,

Have you looked at the 'cdrkit' package? I believe it bundles the same tools as cdrtools, but with a sane build system and not this brain-damaged build system that cdrtools uses.

That being said, here is a review of your patch below.

First, the title should be simply:

cdrtools: new package

package/Config.in menu "Audio and video applications" · line 9

Quoted 9 lines · Steve Kenton
package/Config.in +1 -0
index dd011be..1748e88 100644
@@ -6,6 +6,7 @@ menu "Audio and video applications"
 	source "package/alsa-utils/Config.in"
 	source "package/aumix/Config.in"
 	source "package/bellagio/Config.in"
+	source "package/cdrtools/Config.in"

Since it's really the same sort of tools than cdrkit, I'd rather see cdrtools next to cdrkit in the menus.

package/cdrtools/Config.in line 3

Quoted 9 lines
package/cdrtools/Config.in new file +3 -0
new file mode 100644
index 0000000..8583cec
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CDRTOOLS
+	bool "cdrtools"
+	depends on BR2_USE_WCHAR && BR2_LARGEFILE

We generally put this on two separate lines.

Quoted 15 lines
package/cdrtools/Config.in new file +9 -0
+	help
+	  Cdrtools is a set of command line programs that
+	  allows to record CD/DVD/BluRay media. This
+	  package contains the cdrecord & mkisofs programs.
+	  
+	  http://sourceforge.net/projects/cdrtools
+
+comment "cdrtools needs a toolchain w/ wchar, largefile"
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE
package/cdrtools/cdrtools.mk new file +0 -0
new file mode 100644
index 0000000..a732e69

package/cdrtools/cdrtools.mk line 5

Quoted 5 lines
package/cdrtools/cdrtools.mk new file +5 -0
@@ -0,0 +1,21 @@
+#############################################################
+#
+# cdrtools
+#
+#############################################################

You should have 80 # signs for the header. And one empty new line between the header and the first variable.

package/cdrtools/cdrtools.mk line 8

Quoted 3 lines
package/cdrtools/cdrtools.mk new file +3 -0
+CDRTOOLS_VERSION = 3.00
+CDRTOOLS_SITE = http://sourceforge.net/projects/cdrtools/files
+CDRTOOLS_LICENSE = Various parts under GPLv2.0, LGPLv2.1, CDDL - see COPYING

Don't use "see COPYING", this is already encoded by the <pkg>_LICENSE_FILES variable below.

package/cdrtools/cdrtools.mk line 13

Quoted 5 lines
package/cdrtools/cdrtools.mk new file +5 -0
+CDRTOOLS_LICENSE_FILES = COPYING
+
+define CDRTOOLS_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef

This unfortunately doesn't work at all: it builds the tools with the host compiler, so always for x86 or x86-64. Is this your intention? If it is your intention, then it should be a host package, and not a target package.

package/cdrtools/cdrtools.mk line 19

Quoted 6 lines
package/cdrtools/cdrtools.mk new file +6 -0
+
+define CDRTOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/cdrecord/OBJ/x86_64-linux-cc/cdrecord $(TARGET_DIR)/usr/bin/cdrecord
+	$(INSTALL) -m 0755 -D $(@D)/readcd/OBJ/x86_64-linux-cc/readcd $(TARGET_DIR)/usr/bin/readcd
+	$(INSTALL) -m 0755 -D $(@D)/mkisofs/OBJ/x86_64-linux-cc/mkisofs $(TARGET_DIR)/usr/bin/mkisofs
+endef

This cannot work: you enforce "x86_64-linux-cc", but we might be building for ARM, PowerPC, MIPS, etc. Also, isn't there a "make install" rule to simplify the installation logic?

So basically, try to do a build for ARM, and make sure 1/ it builds fine and 2/ the installed binaries are actually built for ARM.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/2 Cdrtools is a set of command line programs that allows to record CD/DVD/BluRay media. This package contains the cdrecord & mkisofs programs.

Quoted 5 lines · Thomas Petazzoni

Dear Steve Kenton,

Have you looked at the 'cdrkit' package? I believe it bundles the same tools as cdrtools, but with a sane build system and not this brain-damaged build system that cdrtools uses

Yes, I started with cdrkit, but genisofs and wodim did not do everything we needed.
We're needing UDF support and while I like xorriso it also does not do everything we need.
I don't remember right off what all went wrong but it was with some reluctance that I returned to cdrtools
for the reasons you mention. Jorg Shilly does seem to do things his own way....

Quoted 9 lines

That being said, here is a review of your patch below.

First, the title should be simply:

cdrtools: new package

On Mon, 2 Feb 2015 05:40:52 +0000, Steve Kenton wrote:

Quoted 11 lines

package/Config.in menu "Audio and video applications" · line 9

Quoted 9 lines
package/Config.in +1 -0
index dd011be..1748e88 100644
@@ -6,6 +6,7 @@ menu "Audio and video applications"
  	source "package/alsa-utils/Config.in"
  	source "package/aumix/Config.in"
  	source "package/bellagio/Config.in"
+	source "package/cdrtools/Config.in"

Since it's really the same sort of tools than cdrkit, I'd rather see cdrtools next to cdrkit in the menus.

OK

Quoted 11 lines

package/cdrtools/Config.in line 3

Quoted 10 lines
package/cdrtools/Config.in new file +3 -0
new file mode 100644
index 0000000..8583cec
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CDRTOOLS
+	bool "cdrtools"
+	depends on BR2_USE_WCHAR&&  BR2_LARGEFILE

We generally put this on two separate lines.

OK

Quoted 15 lines
Quoted 15 lines
package/cdrtools/Config.in new file +9 -0
+	help
+	  Cdrtools is a set of command line programs that
+	  allows to record CD/DVD/BluRay media. This
+	  package contains the cdrecord&  mkisofs programs.
+	
+	  http://sourceforge.net/projects/cdrtools
+
+comment "cdrtools needs a toolchain w/ wchar, largefile"
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE
package/cdrtools/cdrtools.mk new file +0 -0
new file mode 100644
index 0000000..a732e69
Quoted 8 lines

package/cdrtools/cdrtools.mk line 5

Quoted 6 lines
package/cdrtools/cdrtools.mk new file +5 -0
@@ -0,0 +1,21 @@
+#############################################################
+#
+# cdrtools
+#
+#############################################################

You should have 80 # signs for the header. And one empty new line between the header and the first variable.

Oops

Quoted 6 lines

package/cdrtools/cdrtools.mk line 8

Quoted 4 lines
package/cdrtools/cdrtools.mk new file +3 -0
+CDRTOOLS_VERSION = 3.00
+CDRTOOLS_SITE = http://sourceforge.net/projects/cdrtools/files
+CDRTOOLS_LICENSE = Various parts under GPLv2.0, LGPLv2.1, CDDL - see COPYING

Don't use "see COPYING", this is already encoded by the <pkg>_LICENSE_FILES variable below.

OK, it was strange and I was not sure what the heck to do

Quoted 10 lines

package/cdrtools/cdrtools.mk line 13

Quoted 6 lines
package/cdrtools/cdrtools.mk new file +5 -0
+CDRTOOLS_LICENSE_FILES = COPYING
+
+define CDRTOOLS_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef

This unfortunately doesn't work at all: it builds the tools with the host compiler, so always for x86 or x86-64. Is this your intention? If it is your intention, then it should be a host package, and not a target package.

I'm using an x86 host and target so it's easy to get them confused. I'll look into this and the note below and try again

Steve

Quoted 16 lines

package/cdrtools/cdrtools.mk line 19

Quoted 6 lines
package/cdrtools/cdrtools.mk new file +6 -0
+
+define CDRTOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/cdrecord/OBJ/x86_64-linux-cc/cdrecord $(TARGET_DIR)/usr/bin/cdrecord
+	$(INSTALL) -m 0755 -D $(@D)/readcd/OBJ/x86_64-linux-cc/readcd $(TARGET_DIR)/usr/bin/readcd
+	$(INSTALL) -m 0755 -D $(@D)/mkisofs/OBJ/x86_64-linux-cc/mkisofs $(TARGET_DIR)/usr/bin/mkisofs
+endef

This cannot work: you enforce "x86_64-linux-cc", but we might be building for ARM, PowerPC, MIPS, etc. Also, isn't there a "make install" rule to simplify the installation logic?

So basically, try to do a build for ARM, and make sure 1/ it builds fine and 2/ the installed binaries are actually built for ARM.

Thanks!

Thomas