Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fscryptctl: add new package #25716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions utils/fscryptctl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
include $(TOPDIR)/rules.mk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this Makefile need a license, similar to other package Makefiles in this repo? (SPDX line)


PKG_NAME:=fscryptctl
PKG_VERSION:=1.2.0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the trailing ? intentional? If so, what is it for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with #25706 (comment), better not use the variable in the URL

PKG_HASH:=192e25733006b05592fd87038a3a51a014db22f462ce0b24d47c30e66d03ea2c

PKG_LICENSE:=Apache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apache-2.0. See https://spdx.org/licenses/

PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:google:fscryptctl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this CPE Id from? I cannot find it at https://nvd.nist.gov/products/cpe/search

PKG_MAINTAINER:=John Audia <therealgraysky@proton.me>

include $(INCLUDE_DIR)/package.mk

define Package/fscryptctl
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Encryption
TITLE:=A tool that handles keys and manages policies for Linux filesystem encryption
URL:='https://github.com/google/fscryptctl'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove single quotes

endef

define Package/fscryptctl/description
Fscryptctl is mainly intended for embedded systems which can't use the
full-featured fscrypt tool, or for testing or experimenting with the
kernel interface to Linux filesystem encryption. fscryptctl does not
handle key generation, key stretching, key wrapping, or PAM integration.
Most users should use the fscrypt tool instead, which supports these
features and generally is much easier to use.

As fscryptctl is intended for advanced users, you should read the
kernel documentation for filesystem encryption before using fscryptctl.

A limitation of fscryptctl is that is has no support for passphrases
and works only with cryptographic keys. If you need support for
passphrases, use fscrypt instead of this tool.
endef

MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)"
Comment on lines +42 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate why this is needed? What is going wrong when you remove this line? I would expect CFLAGS und LDFLAGS to be already set to TARGET_CFLAGS and TARGET_LDFLAGS by MAKE_VARS


define Package/fscryptctl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fscryptctl $(1)/usr/bin/
Comment on lines +46 to +48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can define this as

define Package/fscryptctl/install
	$(call Build/Install/Default,install-bin)
endef

endef

$(eval $(call BuildPackage,fscryptctl))
11 changes: 11 additions & 0 deletions utils/fscryptctl/patches/001-do_not_build_docs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/Makefile
+++ b/Makefile
@@ -133,7 +133,7 @@ test-all:

# Installation, uninstallation, and cleanup targets

-all:fscryptctl fscryptctl.1
+all:fscryptctl
Comment on lines +7 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you do not need to keep maintaining this patch if you set MAKE_FLAGS := fscryptctl in the Makefile instead.


.PHONY: all install install-bin install-man uninstall clean

Loading