Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
metadata-collect-agent
Commits
c2b83bac
Commit
c2b83bac
authored
Sep 08, 2020
by
Leo Le Bouter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Makefile to build simple debian package with local kernel
parent
025a9bea
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
0 deletions
+60
-0
debian.package/Makefile
debian.package/Makefile
+26
-0
debian.package/dracut-conf-template.mk
debian.package/dracut-conf-template.mk
+14
-0
debian.package/uefi-boot-metadata-collect-agent/DEBIAN/control
...n.package/uefi-boot-metadata-collect-agent/DEBIAN/control
+8
-0
debian.package/uefi-boot-metadata-collect-agent/DEBIAN/postinst
....package/uefi-boot-metadata-collect-agent/DEBIAN/postinst
+12
-0
No files found.
debian.package/Makefile
0 → 100644
View file @
c2b83bac
SECBOOT_CRT
=
$(
shell
pwd
)
/db.crt
SECBOOT_KEY
=
$(
shell
pwd
)
/db.key
guard-%
:
@
if
[
"
${${
*
}}
"
=
""
]
;
then
\
echo
"Environment variable
$*
not set"
;
\
exit
1
;
\
fi
uefi-boot-metadata-collect-agent.deb
:
uefi-boot-metadata-collect-agent/boot/efi/uefi-boot-metadata-collect-agent.efi
dpkg-deb
--build
uefi-boot-metadata-collect-agent
||
rm
-fv
$@
include
dracut-conf-template.mk
uefi-boot-metadata-collect-agent/boot/efi/uefi-boot-metadata-collect-agent.efi
:
db.crt db.key db.cer
mkdir
-p
/tmp/dracut-empty
mkdir
-m
700
-p
uefi-boot-metadata-collect-agent/boot/efi
echo
"
$
${dracut_conf}
"
>
dracut.conf
sudo
dracut
-c
dracut.conf
--confdir
/tmp/dracut-empty
--uefi-output
$@
sudo chmod
755
$@
rm
-rfv
/tmp/dracut-empty
db.crt db.key
:
openssl req
-newkey
rsa:4096
-nodes
-keyout
db.key
-new
-x509
-sha256
-days
3650
-subj
"/CN=Nexedi's UEFI Signature Database key/"
-out
db.crt
db.cer
:
openssl x509
-outform
DER
-in
db.crt
-out
db.cer
debian.package/dracut-conf-template.mk
0 → 100644
View file @
c2b83bac
define dracut_conf
:
=
add_dracutmodules
=
"metadata-collect"
hostonly
=
no
hostonly_cmdline
=
no
kernel_cmdline
=
"root=LABEL=ROOT rd.auto rd.auto=1 rd.neednet=1 ip=dhcp"
reproducible
=
yes
compress
=
xz
uefi
=
yes
uefi_stub
=
/usr/lib/systemd/boot/efi/linuxx64.efi.stub
uefi_secureboot_cert
=
"
$(SECBOOT_CRT)
"
uefi_secureboot_key
=
"
$(SECBOOT_KEY)
"
endef
export
dracut_conf
\ No newline at end of file
debian.package/uefi-boot-metadata-collect-agent/DEBIAN/control
0 → 100644
View file @
c2b83bac
Package: uefi-boot-metadata-collect-agent
Version: 0.1
Section: custom
Priority: optional
Architecture: amd64
Essential: no
Maintainer: leo.le.bouter@nexedi.com
Description: Signed UEFI boot application with embedded pre-configured metadata-collect-agent
debian.package/uefi-boot-metadata-collect-agent/DEBIAN/postinst
0 → 100755
View file @
c2b83bac
#!/bin/sh
EFI_DEV
=
$(
mount |
grep
-Po
'^.+(?= on /boot/efi )'
)
ROOT_DEV
=
$(
mount |
grep
-Po
'^.+(?= on / )'
)
efibootmgr
--create
--disk
"
$EFI_DEV
"
--label
'UEFI metadata-collect-agent'
--loader
/uefi-boot-metadata-collect-agent.efi
e2label
"
$ROOT_DEV
"
"ROOT"
||
true
btrfs filesystem label
"
$ROOT_DEV
"
"ROOT"
||
true
reiserfstune
-l
"ROOT"
"
$ROOT_DEV
"
||
true
xfs_admin
-L
"ROOT"
"
$ROOT_DEV
"
||
true
cryptsetup config
--label
=
"ROOT"
"
$ROOT_DEV
"
||
true
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment