Skip to contentSkip to conversation

ca-certificates: new package

PATCH Superseded Martin Bark 3 participants 6 messages Jan 7, 2014 – Jan 28, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ca-certificates: new package

CA certificates used for SSL based applications. The package installs CA certificates to /usr/share/ca-certificates and creates symbolic links under /etc/ssl/certs. For example, the existing libcurl package will use these certificates for https urls. Based on the debian ca-certifcates package.

---
 package/Config.in                          |    1 +
 package/ca-certificates/Config.in          |    9 +++++++
 package/ca-certificates/ca-certificates.mk |   39 ++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 100644 package/ca-certificates/Config.in
 create mode 100644 package/ca-certificates/ca-certificates.mk
package/Config.in +1 -0
index e502cde..28ad4f4 100644
@@ -471,6 +471,7 @@ endmenu
 
 menu "Crypto"
 source "package/beecrypt/Config.in"
+source "package/ca-certificates/Config.in"
 source "package/cryptodev/Config.in"
 source "package/gnutls/Config.in"
 source "package/libassuan/Config.in"
package/ca-certificates/Config.in new file +9 -0
new file mode 100644
index 0000000..0e52bc1
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_CA_CERTIFICATES
+    bool "CA Certificates"
+    help
+      This package includes PEM files of CA certificates to allow
+      SSL-based applications to check for the authenticity of SSL
+      connections.
+
+      It includes, among others, certificate authorities used by the
+      Debian infrastructure and those shipped with Mozilla's browsers.
package/ca-certificates/ca-certificates.mk new file +39 -0
new file mode 100644
index 0000000..1035d2f
@@ -0,0 +1,39 @@
+################################################################################
+#
+# ca-certificates
+#
+################################################################################
+
+CA_CERTIFICATES_VERSION = 20130906
+CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.gz
+CA_CERTIFICATES_SITE = ftp://ftp.debian.org/debian/pool/main/c/ca-certificates
+CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python
+CA_CERTIFICATES_LICENSE = GPLv2+ MPLv2.0
+CA_CERTIFICATES_LICENSE_FILES = debian/copyright
+
+define CA_CERTIFICATES_BUILD_CMDS
+    PATH=$(HOST_PATH) $(MAKE) -C $(@D) all
+endef
+
+define CA_CERTIFICATES_INSTALL_TARGET_CMDS
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs
+    $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
+    rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates
+
+    #remove any existing certificates under /etc/ssl/certs
+    rm -f  $(TARGET_DIR)/etc/ssl/certs/*
+
+    #generate symlinks to certificates under /etc/ssl/certs
+    ( \
+      cd $(TARGET_DIR) ;\
+      for i in `find usr/share/ca-certificates -name "*.crt"` ; do \
+            ln -sf ../../../$$i etc/ssl/certs/`basename $${i%.crt}.pem` ;\
+      done ;\
+    )
+
+    #create symbolic links to the certificates by their hash values
+    $(HOST_DIR)/usr/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ca-certificates: new package

Hi Martin,

Thanks for the patch. A few comments below.

Quoted 6 lines · Martin Bark

CA certificates used for SSL based applications. The package installs CA certificates to /usr/share/ca-certificates and creates symbolic links under /etc/ssl/certs. For example, the existing libcurl package will use these certificates for https urls. Based on the debian ca-certifcates package.

[...]

package/ca-certificates/ca-certificates.mk line 9

Quoted 3 lines
package/ca-certificates/ca-certificates.mk new file +3 -0
+CA_CERTIFICATES_VERSION = 20130906
+CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.gz
+CA_CERTIFICATES_SITE = ftp://ftp.debian.org/debian/pool/main/c/ca-certificates

Please use $(BR2_DEBIAN_MIRROR). See package/at/at.mk, for example.

package/ca-certificates/ca-certificates.mk line 12

Quoted 3 lines
package/ca-certificates/ca-certificates.mk new file +3 -0
+CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python
+CA_CERTIFICATES_LICENSE = GPLv2+ MPLv2.0
+CA_CERTIFICATES_LICENSE_FILES = debian/copyright

According to debian/copyright these licenses apply to the specific files listed there. You don't use any of these files as far as I can see.

Quoted 17 lines
package/ca-certificates/ca-certificates.mk new file +16 -0
+define CA_CERTIFICATES_BUILD_CMDS
+    PATH=$(HOST_PATH) $(MAKE) -C $(@D) all
+endef
+
+define CA_CERTIFICATES_INSTALL_TARGET_CMDS
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs
+    $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
+    rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates
+
+    #remove any existing certificates under /etc/ssl/certs
+    rm -f  $(TARGET_DIR)/etc/ssl/certs/*
+
+    #generate symlinks to certificates under /etc/ssl/certs
+    ( \
+      cd $(TARGET_DIR) ;\

package/ca-certificates/ca-certificates.mk line 39

Quoted 10 lines
package/ca-certificates/ca-certificates.mk new file +10 -0
+      for i in `find usr/share/ca-certificates -name "*.crt"` ; do \
+            ln -sf ../../../$$i etc/ssl/certs/`basename $${i%.crt}.pem` ;\
+      done ;\
+    )
+
+    #create symbolic links to the certificates by their hash values
+    $(HOST_DIR)/usr/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
+endef
+
+$(eval $(generic-package))

baruch

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 -
#2 lore raw

PATCH 1/1 ca-certificates: new package

Thanks for the feedback Baruch,

I'll update to use $(BR2_DEBIAN_MIRROR)

Although the files mentioned in debian/copying do not directly end up in the rootfs they are used. mozilla/certdata.txt is a big list of certificates and mozilla/certdata2pem.py is a python script which is run to split mozilla/certdata.txt into all the separate pem files that end up in the rootfs. Therefore i think this license info is valid.

Please let me know what you think and I'll post a v2 patch

Thanks

Martin

Quoted 61 lines · Baruch Siach

Hi Martin,

Thanks for the patch. A few comments below.

Quoted 2 lines · Martin Bark

CA certificates used for SSL based applications. The package installs CA certificates to /usr/share/ca-certificates and creates symbolic links

under

Quoted 4 lines

/etc/ssl/certs. For example, the existing libcurl package will use these certificates for https urls. Based on the debian ca-certifcates package.

[...]

Review

Quoted 2 lines
(quoted diff) +2 -0
+CA_CERTIFICATES_VERSION = 20130906
+CA_CERTIFICATES_SOURCE =

ca-certificates_$(CA_CERTIFICATES_VERSION).tar.gz

Quoted 1 line

+CA_CERTIFICATES_SITE =

ftp://ftp.debian.org/debian/pool/main/c/ca-certificates

Please use $(BR2_DEBIAN_MIRROR). See package/at/at.mk, for example.

package/ca-certificates/ca-certificates.mk line 12

Quoted 3 lines
package/ca-certificates/ca-certificates.mk new file +3 -0
+CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python
+CA_CERTIFICATES_LICENSE = GPLv2+ MPLv2.0
+CA_CERTIFICATES_LICENSE_FILES = debian/copyright

According to debian/copyright these licenses apply to the specific files listed there. You don't use any of these files as far as I can see.

Quoted 8 lines
package/ca-certificates/ca-certificates.mk new file +8 -0
+define CA_CERTIFICATES_BUILD_CMDS
+    PATH=$(HOST_PATH) $(MAKE) -C $(@D) all
+endef
+
+define CA_CERTIFICATES_INSTALL_TARGET_CMDS
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs
+    $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)

package/ca-certificates/ca-certificates.mk

Quoted 10 lines
package/ca-certificates/ca-certificates.mk new file +10 -0
+    rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates
+
+    #remove any existing certificates under /etc/ssl/certs
+    rm -f  $(TARGET_DIR)/etc/ssl/certs/*
+
+    #generate symlinks to certificates under /etc/ssl/certs
+    ( \
+      cd $(TARGET_DIR) ;\
+      for i in `find usr/share/ca-certificates -name "*.crt"` ; do \
+            ln -sf ../../../$$i etc/ssl/certs/`basename $${i%.crt}.pem`

;\

package/ca-certificates/ca-certificates.mk

Quoted 9 lines
package/ca-certificates/ca-certificates.mk new file +8 -1
+      done ;\
+    )
+
+    #create symbolic links to the certificates by their hash values
+    $(HOST_DIR)/usr/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
+endef
+
+$(eval $(generic-package))
--

baruch

Quoted 6 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 -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140108/9f96d801/attachment.html>

#3 lore raw

PATCH 1/1 ca-certificates: new package

Hi Martin,

Quoted 9 lines · Martin Bark

Thanks for the feedback Baruch,

I'll update to use $(BR2_DEBIAN_MIRROR)

Although the files mentioned in debian/copying do not directly end up in the rootfs they are used. mozilla/certdata.txt is a big list of certificates and mozilla/certdata2pem.py is a python script which is run to split mozilla/certdata.txt into all the separate pem files that end up in the rootfs. Therefore i think this license info is valid.

I think you are right, but the string should indicate that. Something like

CA_CERTIFICATES_LICENSE = GPLv2+ (script), MPLv2.0 (data)

baruch

Quoted 57 lines · Baruch Siach
Quoted 56 lines

Thanks for the patch. A few comments below.

Quoted 2 lines · Martin Bark

CA certificates used for SSL based applications. The package installs CA certificates to /usr/share/ca-certificates and creates symbolic links

under

Quoted 4 lines

/etc/ssl/certs. For example, the existing libcurl package will use these certificates for https urls. Based on the debian ca-certifcates package.

[...]

Review

Quoted 2 lines
(quoted diff) +2 -0
+CA_CERTIFICATES_VERSION = 20130906
+CA_CERTIFICATES_SOURCE =

ca-certificates_$(CA_CERTIFICATES_VERSION).tar.gz

Quoted 1 line

+CA_CERTIFICATES_SITE =

ftp://ftp.debian.org/debian/pool/main/c/ca-certificates

Please use $(BR2_DEBIAN_MIRROR). See package/at/at.mk, for example.

package/ca-certificates/ca-certificates.mk line 12

Quoted 3 lines
package/ca-certificates/ca-certificates.mk new file +3 -0
+CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python
+CA_CERTIFICATES_LICENSE = GPLv2+ MPLv2.0
+CA_CERTIFICATES_LICENSE_FILES = debian/copyright

According to debian/copyright these licenses apply to the specific files listed there. You don't use any of these files as far as I can see.

Quoted 8 lines
package/ca-certificates/ca-certificates.mk new file +8 -0
+define CA_CERTIFICATES_BUILD_CMDS
+    PATH=$(HOST_PATH) $(MAKE) -C $(@D) all
+endef
+
+define CA_CERTIFICATES_INSTALL_TARGET_CMDS
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs
+    $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)

package/ca-certificates/ca-certificates.mk

Quoted 10 lines
package/ca-certificates/ca-certificates.mk new file +10 -0
+    rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates
+
+    #remove any existing certificates under /etc/ssl/certs
+    rm -f  $(TARGET_DIR)/etc/ssl/certs/*
+
+    #generate symlinks to certificates under /etc/ssl/certs
+    ( \
+      cd $(TARGET_DIR) ;\
+      for i in `find usr/share/ca-certificates -name "*.crt"` ; do \
+            ln -sf ../../../$$i etc/ssl/certs/`basename $${i%.crt}.pem`

;\

Quoted 9 lines
package/ca-certificates/ca-certificates.mk new file +8 -1
+      done ;\
+    )
+
+    #create symbolic links to the certificates by their hash values
+    $(HOST_DIR)/usr/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
+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 -
#4 lore raw

PATCH 1/1 ca-certificates: new package

Baruch,

I'll make that change and submit a v2 patch

Thanks

Martin

Quoted 73 lines · Baruch Siach

Hi Martin,

Quoted 7 lines · Martin Bark

Thanks for the feedback Baruch,

I'll update to use $(BR2_DEBIAN_MIRROR)

Although the files mentioned in debian/copying do not directly end up in the rootfs they are used. mozilla/certdata.txt is a big list of certificates and mozilla/certdata2pem.py is a python script which is run

to

Quoted 2 lines

split mozilla/certdata.txt into all the separate pem files that end up in the rootfs. Therefore i think this license info is valid.

I think you are right, but the string should indicate that. Something like

CA_CERTIFICATES_LICENSE = GPLv2+ (script), MPLv2.0 (data)

baruch

Quoted 5 lines · Baruch Siach
Quoted 4 lines

Thanks for the patch. A few comments below.

Quoted 1 line · Martin Bark

CA certificates used for SSL based applications. The package

installs CA

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

certificates to /usr/share/ca-certificates and creates symbolic links

under

Quoted 1 line

/etc/ssl/certs. For example, the existing libcurl package will use

these

Quoted 1 line
Quoted 1 line
Quoted 1 line

certificates for https urls. Based on the debian ca-certifcates

package.

Quoted 11 lines
Quoted 11 lines
Quoted 2 lines

[...]

Review

Quoted 2 lines
(quoted diff) +2 -0
+CA_CERTIFICATES_VERSION = 20130906
+CA_CERTIFICATES_SOURCE =

ca-certificates_$(CA_CERTIFICATES_VERSION).tar.gz

Quoted 1 line

+CA_CERTIFICATES_SITE =

ftp://ftp.debian.org/debian/pool/main/c/ca-certificates

Quoted 7 lines
Quoted 7 lines

Please use $(BR2_DEBIAN_MIRROR). See package/at/at.mk, for example.

package/ca-certificates/ca-certificates.mk line 12

Quoted 3 lines
package/ca-certificates/ca-certificates.mk new file +3 -0
+CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python
+CA_CERTIFICATES_LICENSE = GPLv2+ MPLv2.0
+CA_CERTIFICATES_LICENSE_FILES = debian/copyright

According to debian/copyright these licenses apply to the specific

files

Quoted 12 lines
Quoted 12 lines

listed there. You don't use any of these files as far as I can see.

Quoted 10 lines
package/ca-certificates/ca-certificates.mk new file +10 -0
+define CA_CERTIFICATES_BUILD_CMDS
+    PATH=$(HOST_PATH) $(MAKE) -C $(@D) all
+endef
+
+define CA_CERTIFICATES_INSTALL_TARGET_CMDS
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates
+    $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs
+    $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
+    rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates
+
Quoted 8 lines
Quoted 8 lines

package/ca-certificates/ca-certificates.mk

Quoted 8 lines
package/ca-certificates/ca-certificates.mk new file +8 -0
+    #remove any existing certificates under /etc/ssl/certs
+    rm -f  $(TARGET_DIR)/etc/ssl/certs/*
+
+    #generate symlinks to certificates under /etc/ssl/certs
+    ( \
+      cd $(TARGET_DIR) ;\
+      for i in `find usr/share/ca-certificates -name "*.crt"` ; do \
+            ln -sf ../../../$$i etc/ssl/certs/`basename

$${i%.crt}.pem`

Quoted 1 line
Quoted 1 line

;\

Quoted 16 lines
Quoted 9 lines
Quoted 9 lines

package/ca-certificates/ca-certificates.mk

Quoted 9 lines
package/ca-certificates/ca-certificates.mk new file +8 -1
+      done ;\
+    )
+
+    #create symbolic links to the certificates by their hash values
+    $(HOST_DIR)/usr/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
+endef
+
+$(eval $(generic-package))
--

--
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 -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140108/9d9efdfa/attachment.html>

#5 lore raw

PATCH 1/1 ca-certificates: new package

In reply to Baruch Siach

Dear Baruch Siach,

Quoted 5 lines · Baruch Siach

package/ca-certificates/ca-certificates.mk line 9

Quoted 3 lines
package/ca-certificates/ca-certificates.mk new file +3 -0
+CA_CERTIFICATES_VERSION = 20130906
+CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.gz
+CA_CERTIFICATES_SITE = ftp://ftp.debian.org/debian/pool/main/c/ca-certificates

Please use $(BR2_DEBIAN_MIRROR). See package/at/at.mk, for example.

No. We don't want to use BR2_DEBIAN_MIRROR. This should be removed.

The problem with normal Debian mirrors is that files disappear after some time (when Debian packages are updated). Instead, we should use snapshot.debian.net everywhere.

Thomas

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